[llvm] r204612 - [mips] Add regression tests for parenthetic expressions in MIPS assembly.
Daniel Sanders
daniel.sanders at imgtec.com
Mon Mar 24 08:42:21 PDT 2014
Author: dsanders
Date: Mon Mar 24 10:42:21 2014
New Revision: 204612
URL: http://llvm.org/viewvc/llvm-project?rev=204612&view=rev
Log:
[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
Modified:
llvm/trunk/test/MC/Mips/mips64-alu-instructions.s
Modified: llvm/trunk/test/MC/Mips/mips64-alu-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/mips64-alu-instructions.s?rev=204612&r1=204611&r2=204612&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/mips64-alu-instructions.s (original)
+++ llvm/trunk/test/MC/Mips/mips64-alu-instructions.s Mon Mar 24 10:42:21 2014
@@ -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)
More information about the llvm-commits
mailing list