[EABI] Add LLVM support for -meabi flag
authorRenato Golin <renato.golin@linaro.org>
Mon, 9 Nov 2015 12:40:30 +0000 (12:40 +0000)
committerRenato Golin <renato.golin@linaro.org>
Mon, 9 Nov 2015 12:40:30 +0000 (12:40 +0000)
commitf60aec48e9b727a4dc2fe2914c61baa37208f8d3
tree233871dfe35c2ba060e3a08052eeb03426257fb1
parenta7fb0ca80248b360602c7b95e057b79258fc1275
[EABI] Add LLVM support for -meabi flag

"GCC requires the freestanding environment provide memcpy, memmove, memset
and memcmp": https://gcc.gnu.org/onlinedocs/gcc-5.2.0/gcc/Standards.html

Hence in GNUEABI targets LLVM should not convert 'memops' to their equivalent
'__aeabi_memops'. This convertion violates GCC contract.

The -meabi flag controls whether or not LLVM will modify 'memops' in GNUEABI
targets.

Without -meabi: use the triple default EABI.
With -meabi=default: use the triple default EABI.
With -meabi=gnu: use 'memops'.
With -meabi=4 or -meabi=5: use '__aeabi_memops'.
With -meabi set to an unknown value: same as -meabi=default.

Patch by Vinicius Tinti.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252462 91177308-0d34-0410-b5e6-96231b3b80d8
docs/CommandGuide/llc.rst
include/llvm/CodeGen/CommandFlags.h
include/llvm/Target/TargetOptions.h
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMSubtarget.h
lib/Target/ARM/ARMTargetMachine.cpp
test/CodeGen/ARM/arm-eabi.ll [new file with mode: 0644]
test/CodeGen/ARM/memfunc.ll