summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2014-03-24 15:42:21 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2014-03-24 15:42:21 +0000
commit75002071fd7aea0d7d2b41856641f56ad3e9f31b (patch)
tree0aa1d498faf913a3a88af977cc649bd51ed3f59d /test
parenteaae58309582818f4ff9a8c06e7a3237ff329b60 (diff)
downloadllvm-75002071fd7aea0d7d2b41856641f56ad3e9f31b.tar.gz
llvm-75002071fd7aea0d7d2b41856641f56ad3e9f31b.tar.bz2
llvm-75002071fd7aea0d7d2b41856641f56ad3e9f31b.tar.xz
[mips] Add regression tests for parenthetic expressions in MIPS assembly.
Summary: These expressions already worked but weren't tested. Patch by Robert N. M. Watson and David Chisnall (it was originally two patches) Their work was sponsored by: DARPA, AFRL Differential Revision: http://llvm-reviews.chandlerc.com/D3156 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204612 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/MC/Mips/mips64-alu-instructions.s12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/MC/Mips/mips64-alu-instructions.s b/test/MC/Mips/mips64-alu-instructions.s
index 675cae8f24..41761d16d3 100644
--- a/test/MC/Mips/mips64-alu-instructions.s
+++ b/test/MC/Mips/mips64-alu-instructions.s
@@ -132,3 +132,15 @@
dsubu $9, $3
dsub $9, 10
dsubu $9, 10
+
+#------------------------------------------------------------------------------
+# Did you know that GAS supports complex arithmetic expressions in assembly?
+#------------------------------------------------------------------------------
+# CHECK: daddiu $9, $3, 32 # encoding: [0x20,0x00,0x69,0x64]
+# CHECK: daddiu $9, $3, 32 # encoding: [0x20,0x00,0x69,0x64]
+# CHECK: daddiu $9, $3, -32 # encoding: [0xe0,0xff,0x69,0x64]
+# CHECK: daddiu $9, $3, -32 # encoding: [0xe0,0xff,0x69,0x64]
+ daddiu $9, $3, 8 * 4
+ daddiu $9, $3, (8 * 4)
+ dsubu $9, $3, 8 * 4
+ dsubu $9, $3, (8 * 4)