summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/Mips/sym-expr.s
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2014-04-01 10:41:48 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2014-04-01 10:41:48 +0000
commitffd8436d6c31bbe2190bd195a44de1b736703934 (patch)
tree3c29dabba3344723ce6fe2b32653c60802020e68 /llvm/test/MC/Mips/sym-expr.s
parent315386c0836810d27e7c156fa4921846b0cde586 (diff)
downloadbcm5719-llvm-ffd8436d6c31bbe2190bd195a44de1b736703934.tar.gz
bcm5719-llvm-ffd8436d6c31bbe2190bd195a44de1b736703934.zip
[mips] Extend ParseJumpTarget to support the full symbol expression syntax.
Summary: This should fix the issues the D3222 caused in lld. Testcase is based on the one that failed in the buildbot. Depends on D3233 Reviewers: matheusalmeida, vmedic Reviewed By: matheusalmeida Differential Revision: http://llvm-reviews.chandlerc.com/D3234 llvm-svn: 205298
Diffstat (limited to 'llvm/test/MC/Mips/sym-expr.s')
-rw-r--r--llvm/test/MC/Mips/sym-expr.s14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/MC/Mips/sym-expr.s b/llvm/test/MC/Mips/sym-expr.s
new file mode 100644
index 00000000000..efefb1d5c4a
--- /dev/null
+++ b/llvm/test/MC/Mips/sym-expr.s
@@ -0,0 +1,14 @@
+# Check parsing symbol expressions
+
+# RUN: llvm-mc -triple=mipsel -show-inst-operands %s 2> %t0
+# RUN: FileCheck %s < %t0
+
+ .global __start
+ .ent __start
+__start:
+ nop
+loc:
+ jal __start + 0x4 # CHECK: instruction: [jal, Imm<__start+4>]
+ jal __start + (-0x10) # CHECK: instruction: [jal, Imm<__start-16>]
+ jal (__start + (-0x10)) # CHECK: instruction: [jal, Imm<__start-16>]
+ .end __start
OpenPOWER on IntegriCloud