diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2006-10-18 16:21:43 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2006-10-18 16:21:43 +0000 |
commit | 71d94d8817edd01481c2a21625bcfafdb3874d0a (patch) | |
tree | 542ec24414c253b3818025633b62b16a3f34c324 | |
parent | 70673a1a90e355d7b9aa552d673b81e5fa1d2c80 (diff) |
add blx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31037 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMInstrInfo.td | 1 | ||||
-rw-r--r-- | test/CodeGen/ARM/call.ll | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMInstrInfo.td b/lib/Target/ARM/ARMInstrInfo.td index 5392929462..349c358b89 100644 --- a/lib/Target/ARM/ARMInstrInfo.td +++ b/lib/Target/ARM/ARMInstrInfo.td @@ -149,6 +149,7 @@ let isReturn = 1 in { let noResults = 1, Defs = [R0, R1, R2, R3, R14] in { def bl: InstARM<(ops i32imm:$func, variable_ops), "bl $func", []>; + def blx : InstARM<(ops IntRegs:$func, variable_ops), "blx $func", [(ARMcall IntRegs:$func)]>; } def ldr : InstARM<(ops IntRegs:$dst, memri:$addr), diff --git a/test/CodeGen/ARM/call.ll b/test/CodeGen/ARM/call.ll index 316cb548bb..b223698c65 100644 --- a/test/CodeGen/ARM/call.ll +++ b/test/CodeGen/ARM/call.ll @@ -1,4 +1,7 @@ -; RUN: llvm-as < %s | llc -march=arm +; RUN: llvm-as < %s | llc -march=arm && +; RUN: llvm-as < %s | llc -march=arm | grep bl && +; RUN: llvm-as < %s | llc -march=arm | grep blx + void %f() { entry: call void %g( int 1, int 2, int 3, int 4 ) @@ -8,3 +11,10 @@ entry: declare void %g(int, int, int, int) declare fastcc void %h() + +void %g(void (...)* %g) { +entry: + %g_c = cast void (...)* %g to void ()* + call void %g_c( ) + ret void +} |