diff options
author | Daniel Sanders <daniel.sanders@imgtec.com> | 2016-01-11 15:57:46 +0000 |
---|---|---|
committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2016-01-11 15:57:46 +0000 |
commit | 58a84d9b9c6b0e08c4b2d259fdd1877e3deec532 (patch) | |
tree | 7255fa71ce9e6e7b911b54c38ee30bd3b4d544c8 /test/CodeGen/Mips/llvm-ir/call.ll | |
parent | 274cad526032f03690d2829b5921d901cc5a6eb3 (diff) |
[mips] Never select JAL for calls to an absolute immediate address.
Summary:
It actually takes an offset into the current PC-region.
This fixes the 'expr' command in lldb.
Reviewers: vkalintiris, jaydeep, bhushan
Subscribers: dsanders, llvm-commits
Differential Revision: http://reviews.llvm.org/D16054
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257339 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips/llvm-ir/call.ll')
-rw-r--r-- | test/CodeGen/Mips/llvm-ir/call.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/llvm-ir/call.ll b/test/CodeGen/Mips/llvm-ir/call.ll index 22a44da0b06..a4b03405f72 100644 --- a/test/CodeGen/Mips/llvm-ir/call.ll +++ b/test/CodeGen/Mips/llvm-ir/call.ll @@ -182,3 +182,18 @@ define hidden void @thunk_undef_double(i32 %this, double %volume) unnamed_addr a tail call void @undef_double(i32 undef, double undef) #8 ret void } + +; Check that immediate addresses do not use jal. +define i32 @jal_only_allows_symbols() { +; ALL-LABEL: jal_only_allows_symbols: + +; ALL-NOT: {{jal }} +; ALL: addiu $[[TGT:[0-9]+]], $zero, 1234 +; ALL-NOT: {{jal }} +; ALL: jalr $[[TGT]] +; ALL-NOT: {{jal }} + + call void () inttoptr (i32 1234 to void ()*)() + ret i32 0 +} + |