llvm-project/clang/lib/Basic/Targets
Mikhail Maltsev 89f7b46b7a [Targets] Implement getConstraintRegister for ARM and AArch64
Summary:
The getConstraintRegister method is used by semantic checking of
inline assembly statements in order to diagnose conflicts between
clobber list and input/output lists. Currently ARM and AArch64 don't
override getConstraintRegister, so conflicts between registers
assigned to variables in asm labels and clobber lists are not
diagnosed. Such conflicts can cause assertion failures in the back end
and even miscompilations.

This patch implements getConstraintRegister for ARM and AArch64
targets. Since these targets don't have single-register constraints,
the implementation is trivial and just returns the register specified
in an asm label (if any).

Reviewers: eli.friedman, javed.absar, thopre

Reviewed By: thopre

Subscribers: rengolin, eraman, rogfer01, myatsina, kristof.beyls, cfe-commits, chrib

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

llvm-svn: 331164
2018-04-30 09:11:08 +00:00
..
AArch64.cpp [AAch64] Add the __ARM_FEATURE_DOTPROD macro definition 2018-04-17 22:38:40 +00:00
AArch64.h [Targets] Implement getConstraintRegister for ARM and AArch64 2018-04-30 09:11:08 +00:00
AMDGPU.cpp [CUDA] Revert defining __CUDA_ARCH__ for amdgcn targets 2018-04-09 15:43:01 +00:00
AMDGPU.h [CUDA] Revert defining __CUDA_ARCH__ for amdgcn targets 2018-04-09 15:43:01 +00:00
ARM.cpp [ARM] Add __ARM_FEATURE_DOTPROD pre-defined macro 2018-04-27 13:56:02 +00:00
ARM.h [Targets] Implement getConstraintRegister for ARM and AArch64 2018-04-30 09:11:08 +00:00
AVR.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
AVR.h [AVR] Set the program address space in the data layout 2018-02-19 10:46:16 +00:00
BPF.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
BPF.h bpf: accept all asm register names 2018-04-11 16:08:00 +00:00
Hexagon.cpp [Hexagon] Remove -mhvx-double and the corresponding subtarget feature 2018-04-03 15:59:10 +00:00
Hexagon.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
Lanai.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
Lanai.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
Le64.cpp
Le64.h
MSP430.cpp
MSP430.h
Mips.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
Mips.h [RISCV] Enable __int128_t and __uint128_t through clang flag 2018-02-25 03:58:23 +00:00
NVPTX.cpp [NVPTX] Removed 'satom' feature which is no longer used. 2018-04-11 17:51:33 +00:00
NVPTX.h [NVPTX] Removed 'satom' feature which is no longer used. 2018-04-11 17:51:33 +00:00
Nios2.cpp
Nios2.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
OSTargets.cpp Toolchain: Normalize dwarf, sjlj and seh eh 2017-11-29 07:25:12 +00:00
OSTargets.h [Solaris] __float128 is supported on Solaris/x86 2018-04-23 09:28:08 +00:00
PNaCl.cpp
PNaCl.h
PPC.cpp Fix typos in clang 2018-04-06 15:14:32 +00:00
PPC.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
RISCV.cpp [PATCH] [RISCV] Extend getTargetDefines for RISCVTargetInfo 2018-04-05 12:54:00 +00:00
RISCV.h [PATCH] [RISCV] Extend getTargetDefines for RISCVTargetInfo 2018-04-05 12:54:00 +00:00
SPIR.cpp
SPIR.h [OpenMP] Show error if VLAs are not supported 2017-11-18 21:00:46 +00:00
Sparc.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
Sparc.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
SystemZ.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
SystemZ.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
TCE.cpp
TCE.h [OpenCL] Add LangAS::opencl_private to represent private address space in AST 2017-10-13 03:37:48 +00:00
WebAssembly.cpp [WebAssembly] Add exception handling option 2018-03-02 00:39:16 +00:00
WebAssembly.h [WebAssembly] Add exception handling option 2018-03-02 00:39:16 +00:00
X86.cpp [X86] WaitPKG intrinsics 2018-04-20 18:44:33 +00:00
X86.h [X86] WaitPKG intrinsics 2018-04-20 18:44:33 +00:00
XCore.cpp
XCore.h