llvm-6502/lib/Target/PowerPC/MCTargetDesc
Adhemerval Zanella 18560fae0b This patch fixes the MC object emission of 'nop' for external function calls
and also fixes the R_PPC64_TOC16 and R_PPC64_TOC16_DS relocation offset.
The 'nop' is needed so a restore TOC instruction (ld r2,40(r1)) can be placed
by the linker to correct restore the TOC of previous function.

Current code has two issues: it defines in PPCInstr64Bit.td file a LDinto_toc
and LDtoc_restore as a DSForm_1 with DS_RA=0 where it should be
DS=2 (the 8 bytes displacement of the TOC saving). It also wrongly emits a
MC intruction using an uint32_t value while the PPC::BL8_NOP_ELF
and PPC::BLA8_NOP_ELF are both uint64_t (because of the following 'nop').

This patch corrects the remaining ExecutionEngine using MCJIT:

ExecutionEngine/2002-12-16-ArgTest.ll
ExecutionEngine/2003-05-07-ArgumentTest.ll
ExecutionEngine/2005-12-02-TailCallBug.ll
ExecutionEngine/hello.ll
ExecutionEngine/hello2.ll
ExecutionEngine/test-call.ll



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166682 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 14:29:13 +00:00
..
CMakeLists.txt Fix cmake. 2011-12-22 02:06:17 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Makefile
PPCAsmBackend.cpp Initial TOC support for PowerPC64 object creation 2012-10-25 12:27:42 +00:00
PPCBaseInfo.h Emacs-tag and some comment fix for all ARM, CellSPU, Hexagon, MBlaze, MSP430, PPC, PTX, Sparc, X86, XCore. 2012-02-18 12:03:15 +00:00
PPCELFObjectWriter.cpp This patch fixes the MC object emission of 'nop' for external function calls 2012-10-25 14:29:13 +00:00
PPCFixupKinds.h Initial TOC support for PowerPC64 object creation 2012-10-25 12:27:42 +00:00
PPCMCAsmInfo.cpp Enable exceptions handling on PPC64 now that cr misaligned spilling 2012-09-12 15:29:32 +00:00
PPCMCAsmInfo.h Emacs-tag and some comment fix for all ARM, CellSPU, Hexagon, MBlaze, MSP430, PPC, PTX, Sparc, X86, XCore. 2012-02-18 12:03:15 +00:00
PPCMCCodeEmitter.cpp This patch fixes the MC object emission of 'nop' for external function calls 2012-10-25 14:29:13 +00:00
PPCMCTargetDesc.cpp Make MCInstrInfo available to the MCInstPrinter. This will be used to remove getInstructionName and the static data it contains since the same tables are already in MCInstrInfo. 2012-04-02 06:09:36 +00:00
PPCMCTargetDesc.h When creating MCAsmBackend pass the CPU string as well. In X86AsmBackend 2012-09-18 16:08:49 +00:00
PPCPredicates.cpp Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser. 2011-07-26 00:24:13 +00:00
PPCPredicates.h Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser. 2011-07-26 00:24:13 +00:00