summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/Mips
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2016-05-12 14:01:50 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2016-05-12 14:01:50 +0000
commit241c67989b24acccd5ff230cab6291a5e19bd32d (patch)
treed15c0a6713e1468655503792d95d46425a0850ae /llvm/test/MC/Mips
parent5fb391c893073547f546a88f461a0de15924c55b (diff)
downloadbcm5719-llvm-241c67989b24acccd5ff230cab6291a5e19bd32d.tar.gz
bcm5719-llvm-241c67989b24acccd5ff230cab6291a5e19bd32d.zip
[mips][ias] Fix O32 .cprestore directive when inside .set noat region and offset is in range.
Summary: This expands on r269179 to fix an additional case that was not covered by our tests. The assembler temporary is not needed when the .cprestore offset fits inside a simm16 and it is not an error to use it inside a '.set noat' in this case. Reviewers: emaste, seanbruno, sdardis Subscribers: dsanders, sdardis, llvm-commits Differential Revision: http://reviews.llvm.org/D20199 llvm-svn: 269295
Diffstat (limited to 'llvm/test/MC/Mips')
-rw-r--r--llvm/test/MC/Mips/cprestore-noreorder-noat.s21
1 files changed, 20 insertions, 1 deletions
diff --git a/llvm/test/MC/Mips/cprestore-noreorder-noat.s b/llvm/test/MC/Mips/cprestore-noreorder-noat.s
index d71d8fb91ed..0716145effa 100644
--- a/llvm/test/MC/Mips/cprestore-noreorder-noat.s
+++ b/llvm/test/MC/Mips/cprestore-noreorder-noat.s
@@ -24,7 +24,7 @@ foo:
.cpload $25
.cprestore 8
-# O32: :[[@LINE-1]]:3: error: pseudo-instruction requires $at, which is not available
+# O32-NOT: error: pseudo-instruction requires $at, which is not available
# N32-NOT: error: pseudo-instruction requires $at, which is not available
# N64-NOT: error: pseudo-instruction requires $at, which is not available
# NO-STORE-NOT: sw $gp, 8($sp)
@@ -34,3 +34,22 @@ foo:
jal foo
.end foo
+
+ .ent bar
+bar:
+ .frame $sp, 0, $ra
+ .set noreorder
+ .set noat
+
+ .cpload $25
+ .cprestore 65536
+# O32: :[[@LINE-1]]:3: error: pseudo-instruction requires $at, which is not available
+# N32-NOT: error: pseudo-instruction requires $at, which is not available
+# N64-NOT: error: pseudo-instruction requires $at, which is not available
+# NO-STORE-NOT: sw $gp,
+
+ jal $25
+ jal $4, $25
+ jal bar
+
+ .end bar
OpenPOWER on IntegriCloud