[llvm-commits] [PATCH 10/10] Fix PPC64 branch plus nop MC emission

Adhemerval Zanella azanella at linux.vnet.ibm.com
Mon Sep 17 13:21:59 PDT 2012


This patch fixes the MC object emission of 'nop' for external function branch.
The 'nop' is needed so a restore TOC instruction (ld r2,40(r1)) can be placed
by the linked to correct restore the TOC of previous function.

Current code has two issues: first it defines in .td file a LDinto_toc and
LDtoc_restore as a DSForm_1 with DS_RA=0 and second the MC intruction emission
just prints a uint32_t value while the PPC::BL8_NOP_ELF and PPC::BLA8_NOP_ELF
are both uint64_t (because of the following 'nop').

I didn't add any tests because I focused on existing ones. This patch corrects
the remaining MCJIT ones:

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 

-- 
Adhemerval Zanella Netto
  Software Engineer
  Linux Technology Center Brazil
  Toolchain / GLIBC on Power Architecture
  azanella at linux.vnet.ibm.com / azanella at br.ibm.com
  +55 61 8642-9890

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0011-Fix-PPC64-branch-plus-nop-MC-emission.patch
Type: text/x-patch
Size: 2659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120917/6bb2aabb/attachment.bin>


More information about the llvm-commits mailing list