1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/CodeGen/XCore/call.ll
Richard Osborne b9f5c6e728 [XCore] Fix call of absolute address.
Previously for:

tail call void inttoptr (i64 65536 to void ()*)() nounwind

We would emit:

bl 65536

The immediate operand of the bl instruction is a relative offset so it is
wrong to use the absolute address here.

llvm-svn: 202860
2014-03-04 16:50:30 +00:00

11 lines
232 B
LLVM

; RUN: llc < %s -march=xcore | FileCheck %s
; CHECK-LABEL: bl_imm:
; CHECK: ldw [[R0:r[0-9]+]], cp
; CHECK: bla [[R0]]
define void @bl_imm() nounwind {
entry:
tail call void inttoptr (i64 65536 to void ()*)() nounwind
ret void
}