llvm-6502/lib
Hal Finkel cf988bca67 [PowerPC] Print all inline-asm consts as signed numbers
Almost all immediates in PowerPC assembly (both 32-bit and 64-bit) are signed
numbers, and it is important that we print them as such. To make sure that
happens, we change PPCTargetLowering::LowerAsmOperandForConstraint so that it
does all intermediate checks on a signed-extended int64_t value, and then
creates the resulting target constant using MVT::i64. This will ensure that all
negative values are printed as negative values (mirroring what is done in other
backends to achieve the same sign-extension effect).

This came up in the context of inline assembly like this:
  "add%I2   %0,%0,%2", ..., "Ir"(-1ll)
where we used to print:
  addi   3,3,4294967295
and gcc would print:
  addi   3,3,-1
and gas accepts both forms, but our builtin assembler (correctly) does not. Now
we print -1 like gcc does.

While here, I replaced a bunch of custom integer checks with isInt<16> and
friends from MathExtras.h.

Thanks to Paul Hargrove for the bug report.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223220 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-03 09:37:50 +00:00
..
Analysis
AsmParser Prologue support 2014-12-03 02:08:38 +00:00
Bitcode Ask the module for its the identified types. 2014-12-03 07:18:23 +00:00
CodeGen Prologue support 2014-12-03 02:08:38 +00:00
DebugInfo Make DWARFAcceleratorTable::dump() const. 2014-11-20 16:21:11 +00:00
ExecutionEngine [MCJIT] Unique-ptrify the RTDyldMemoryManager member of MCJIT. NFC. 2014-12-03 00:51:19 +00:00
IR Ask the module for its the identified types. 2014-12-03 07:18:23 +00:00
IRReader
LineEditor
Linker Ask the module for its the identified types. 2014-12-03 07:18:23 +00:00
LTO
MC [NVPTX] Do not emit .weak symbols for NVPTX 2014-12-01 21:16:17 +00:00
Object Add ARM relocations to ELFYAML 2014-12-02 09:49:09 +00:00
Option
ProfileData
Support Triple: Add AMDHSA operating system type 2014-12-02 16:45:47 +00:00
TableGen
Target [PowerPC] Print all inline-asm consts as signed numbers 2014-12-03 09:37:50 +00:00
Transforms Revert r222997. The newly added compile-time checks are finding missing origins, testcase is being reduced and a PR will be posted shortly. 2014-12-03 05:47:00 +00:00
CMakeLists.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
LLVMBuild.txt
Makefile