diff options
| author | Daniel Sanders <daniel.sanders@imgtec.com> | 2014-03-24 15:42:21 +0000 |
|---|---|---|
| committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2014-03-24 15:42:21 +0000 |
| commit | 68fd4c784c5655bc6c0d605321969c4f74064c5f (patch) | |
| tree | 864d3f3ba65f458eae1e13262d18b518aec0493c | |
| parent | 01f9fc06e754100763c692acc83cefd5f1c6e4d8 (diff) | |
| download | bcm5719-llvm-68fd4c784c5655bc6c0d605321969c4f74064c5f.tar.gz bcm5719-llvm-68fd4c784c5655bc6c0d605321969c4f74064c5f.zip | |
[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
llvm-svn: 204612
| -rw-r--r-- | llvm/test/MC/Mips/mips64-alu-instructions.s | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/MC/Mips/mips64-alu-instructions.s b/llvm/test/MC/Mips/mips64-alu-instructions.s index 675cae8f24d..41761d16d37 100644 --- a/llvm/test/MC/Mips/mips64-alu-instructions.s +++ b/llvm/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) |

