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
LLVMBuild.txt
Makefile
PPCAsmBackend.cpp Initial TOC support for PowerPC64 object creation 2012-10-25 12:27:42 +00:00
PPCBaseInfo.h
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
PPCMCAsmInfo.h
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
PPCMCTargetDesc.h
PPCPredicates.cpp
PPCPredicates.h