summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/Mips/sym-expr.s
diff options
context:
space:
mode:
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