summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorToma Tabacu <toma.tabacu@imgtec.com>2015-05-14 14:51:32 +0000
committerToma Tabacu <toma.tabacu@imgtec.com>2015-05-14 14:51:32 +0000
commite625b5fc020315705f9b8f8c4c85036e4956b529 (patch)
tree7d4c4dd94cd8398760a5f7dd55a0a32b32e4d03e /llvm/test
parent9376e9998e554dbe171eba409eabdc2dddae16f0 (diff)
downloadbcm5719-llvm-e625b5fc020315705f9b8f8c4c85036e4956b529.tar.gz
bcm5719-llvm-e625b5fc020315705f9b8f8c4c85036e4956b529.zip
[mips] [IAS] Enforce .set nomacro.
Summary: When used, ".set nomacro" causes warning messages to be reported when we expand pseudo-instructions to multiple machine instructions. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9564 llvm-svn: 237366
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/MC/Mips/set-nomacro-micromips.s33
-rw-r--r--llvm/test/MC/Mips/set-nomacro.s46
2 files changed, 79 insertions, 0 deletions
diff --git a/llvm/test/MC/Mips/set-nomacro-micromips.s b/llvm/test/MC/Mips/set-nomacro-micromips.s
new file mode 100644
index 00000000000..c4d8b7c2d3e
--- /dev/null
+++ b/llvm/test/MC/Mips/set-nomacro-micromips.s
@@ -0,0 +1,33 @@
+# RUN: llvm-mc %s -arch=mips -mcpu=mips32 -mattr=micromips 2>&1 | FileCheck %s
+
+ .text
+ .type main, @function
+ .set micromips
+main:
+# CHECK-NOT: warning: macro instruction expanded into multiple instructions
+ .set macro
+ b 132
+ b 1332
+ b bar
+
+ lwm $16, $17, 8($sp)
+ swm $16, $17, 8($sp)
+
+ add $4, $5, $6
+
+ .set noreorder
+ .set nomacro
+ b 132
+# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
+ b 1332
+# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
+ b bar
+# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
+
+ lwm $16, $17, 8($sp)
+# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
+ swm $16, $17, 8($sp)
+# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
+
+ add $4, $5, $6
+# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
diff --git a/llvm/test/MC/Mips/set-nomacro.s b/llvm/test/MC/Mips/set-nomacro.s
new file mode 100644
index 00000000000..d81048ff12e
--- /dev/null
+++ b/llvm/test/MC/Mips/set-nomacro.s
@@ -0,0 +1,46 @@
+# RUN: llvm-mc %s -arch=mips -mcpu=mips32 2>&1 | FileCheck %s
+
+# CHECK-NOT: warning: macro instruction expanded into multiple instructions
+ .set macro
+ li $8, -16
+ li $8, 16
+ li $8, 161616
+
+ la $8, 16
+ la $8, 161616
+ la $8, 16($9)
+ la $8, 161616($9)
+ la $8, symbol
+
+ jal $25
+ jal $4, $25
+
+ add $4, $5, $6
+
+ .set noreorder
+ .set nomacro
+ li $8, -16
+# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
+ li $8, 16
+# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
+ li $8, 161616
+# CHECK: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
+
+ la $8, 16
+# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
+ la $8, 161616
+# CHECK: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
+ la $8, 16($9)
+# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
+ la $8, 161616($9)
+# CHECK: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
+ la $8, symbol
+# CHECK: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
+
+ jal $25
+# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
+ jal $4, $25
+# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
+
+ add $4, $5, $6
+# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
OpenPOWER on IntegriCloud