[llvm-commits] (patch) PR7608 ARMv4 JIT forgets to set the lr register when making a indirect function call

Xerxes Ranby xerxes at zafena.se
Sun Jul 11 15:19:52 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7608
Attached patch fixes the PR7608 bug by defining a new ARM selection dag node
ARMmovlrpc and makes sure both jit and non-jit got a ARMmovlrpc chained and
flagged before any ARMcall_nolink non-tailcall selection dag node. 

* llvm/lib/Target/ARM/ARMISelLowering.cpp
(ARMTargetLowering::getTargetNodeName): Update to handle ARMISD::MOVLRPC.
(ARMTargetLowering::LowerCall): Add chain and flag a ARMmovlrpc before any
ARMcall_nolink non-tailcall selection dag node.
* llvm/lib/Target/ARM/ARMISelLowering.h
(ARMISD::MOVLRPC): New enum.
* llvm/lib/Target/ARM/ARMInstrInfo.td
(ARMmovlrpc): New defined selection dag node.
(MOVLRPC): New defined instruction.
(BX): Emit only one instruction for non-jit.
(BMOVPCRX): Likewise.
(BXr9): Likewise.
(BMOVPCRXr9): Likewise.

Ok to push?

Cheers
Xerxes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: MOVLRPC.patch
Type: text/x-patch
Size: 4545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100712/0ba2c777/attachment.bin>


More information about the llvm-commits mailing list