1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-25 16:13:17 +00:00
freebsd/contrib/llvm
Dimitry Andric 86a34ce5a4 Pull in r300404 from upstream llvm trunk (by me):
Use correct registers for "A" inline asm constraint

  Summary:
  In PR32594, inline assembly using the 'A' constraint on x86_64 causes
  llvm to crash with a "Cannot select" stack trace.  This is because
  `X86TargetLowering::getRegForInlineAsmConstraint` hardcodes that 'A'
  means the EAX and EDX registers.

  However, on x86_64 it means the RAX and RDX registers, and on 16-bit
  x86 (ia16?) it means the old AX and DX registers.

  Add new register classes in `X86RegisterInfo.td` to support these
  cases, and amend the logic in `getRegForInlineAsmConstraint` to cope
  with different subtargets.  Also add a test case, derived from
  PR32594.

  Reviewers: craig.topper, qcolombet, RKSimon, ab

  Reviewed By: ab

  Subscribers: ab, emaste, royger, llvm-commits

  Differential Revision: https://reviews.llvm.org/D31902

This should fix crashes when using the 'A' constraint on amd64, for
example as it is being used in Xen.

Reported by:	royger
MFC after:	3 days
2017-04-15 22:34:22 +00:00
..
include Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch 2017-02-25 15:00:57 +00:00
lib Pull in r300404 from upstream llvm trunk (by me): 2017-04-15 22:34:22 +00:00
patches
projects/libunwind libunwind: add noexec stack annotation 2017-01-07 14:40:58 +00:00
tools lld: hack version and help output for compatibility with libtool 2017-03-27 16:01:16 +00:00
utils/TableGen
FREEBSD-Xlist
LICENSE.TXT Merge llvm, clang, lld and lldb release_40 branch r292009. Also update 2017-01-14 22:12:13 +00:00