summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorSimon Dardis <simon.dardis@imgtec.com>2016-11-21 20:30:41 +0000
committerSimon Dardis <simon.dardis@imgtec.com>2016-11-21 20:30:41 +0000
commit43115a1ce4e70ec1738a044ba18173ca210f1322 (patch)
tree92032b1432956e998fa96f95f4738de4edb6dfbd /llvm/test
parentd559da84af3bb8087cece160e0ab89bdacb9b30e (diff)
downloadbcm5719-llvm-43115a1ce4e70ec1738a044ba18173ca210f1322.tar.gz
bcm5719-llvm-43115a1ce4e70ec1738a044ba18173ca210f1322.zip
[mips] seq macro support
This patch adds the seq macro. This partially resolves PR/30381. Thanks to Sean Bruno for reporting the issue! Reviewers: zoran.jovanovic, vkalintiris, seanbruno Differential Revision: https://reviews.llvm.org/D24607 llvm-svn: 287573
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/MC/Mips/macro-seq.s52
1 files changed, 52 insertions, 0 deletions
diff --git a/llvm/test/MC/Mips/macro-seq.s b/llvm/test/MC/Mips/macro-seq.s
new file mode 100644
index 00000000000..814f198a07b
--- /dev/null
+++ b/llvm/test/MC/Mips/macro-seq.s
@@ -0,0 +1,52 @@
+# RUN: llvm-mc -arch=mips -mcpu=mips1 < %s | FileCheck --check-prefixes=ALL,MIPS32 %s
+# RUN: llvm-mc -arch=mips -mcpu=mips64 < %s | FileCheck --check-prefixes=ALL,MIPS64 %s
+
+# ALL: .text
+seq $2, $11, $0
+# ALL: sltiu $2, $11, 1
+seq $2, $0, $11
+# ALL: sltiu $2, $11, 1
+seq $2, $0, $0
+# ALL: sltiu $2, $zero, 1
+seq $2, $11, $12
+# ALL: xor $2, $11, $12
+# ALL: sltiu $2, $2, 1
+seq $2, $11, 45
+# ALL: xori $2, $11, 45
+seq $2, $12, 0x76666
+# ALL: lui $1, 7
+# ALL: ori $1, $1, 26214
+# ALL: xor $2, $12, $1
+# ALL: sltiu $2, $2, 1
+seq $2, $3
+# ALL: xor $2, $2, $3
+# ALL: sltiu $2, $2, 1
+seq $2, 0x8888
+# ALL: xori $2, $2, 34952
+# ALL: sltiu $2, $2, 1
+seq $2, $3, -1546
+# MIPS32: addiu $2, $3, 1546
+# MIPS64: daddiu $2, $3, 1546
+# ALL: sltiu $2, $2, 1
+seq $2, -7546
+# MIPS32: addiu $2, $2, 7546
+# MIPS64: daddiu $2, $2, 7546
+# ALL: sltiu $2, $2, 1
+seq $4, $5, -66666
+# ALL: lui $1, 65534
+# ALL: ori $1, $1, 64406
+# ALL: xor $4, $5, $1
+# ALL: sltiu $4, $4, 1
+seq $4, $5, -2147483648
+# ALL: lui $1, 32768
+# ALL: xor $4, $5, $1
+# ALL: sltiu $4, $4, 1
+seq $4, -2147483648
+# ALL: lui $1, 32768
+# ALL: xor $4, $4, $1
+# ALL: sltiu $4, $4, 1
+seq $4, $5, 0
+# ALL: sltiu $4, $5, 1
+seq $4, $zero, 1
+# MIPS32: move $4, $zero
+# MIPS64: daddu $4, $zero, $zero
OpenPOWER on IntegriCloud