summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorSasa Stankovic <Sasa.Stankovic@imgtec.com>2014-06-09 14:09:28 +0000
committerSasa Stankovic <Sasa.Stankovic@imgtec.com>2014-06-09 14:09:28 +0000
commite435f5b2d42c40f33f4bd8126ac726f1cfdde59d (patch)
tree392bfdd56b1e37e2e74e29743aea9b1426a29d27 /llvm/test
parent1de1d63aec1e6e319ddc4928a0bdd2decc64e301 (diff)
downloadbcm5719-llvm-e435f5b2d42c40f33f4bd8126ac726f1cfdde59d.tar.gz
bcm5719-llvm-e435f5b2d42c40f33f4bd8126ac726f1cfdde59d.zip
[mips] Fix a bug for NaCl target - Don't report the error when non-dangerous
load/store is in branch delay slot. Differential Revision: http://llvm-reviews.chandlerc.com/D4048 llvm-svn: 210470
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/MC/Mips/nacl-mask.s34
1 files changed, 34 insertions, 0 deletions
diff --git a/llvm/test/MC/Mips/nacl-mask.s b/llvm/test/MC/Mips/nacl-mask.s
index 820583549c3..22286ac7dbb 100644
--- a/llvm/test/MC/Mips/nacl-mask.s
+++ b/llvm/test/MC/Mips/nacl-mask.s
@@ -283,3 +283,37 @@ test5:
# CHECK-NEXT: and $25, $25, $14
# CHECK-NEXT: jalr $25
# CHECK-NEXT: addiu $4, $zero, 5
+
+
+
+# Test that we can put non-dangerous loads and stores in branch delay slot.
+
+ .align 4
+test6:
+ .set noreorder
+
+ jal func1
+ sw $4, 0($sp)
+
+ bal func2
+ lw $5, 0($t8)
+
+ jalr $t9
+ sw $sp, 0($sp)
+
+# CHECK-LABEL: test6:
+
+# CHECK-NEXT: nop
+# CHECK-NEXT: nop
+# CHECK-NEXT: jal
+# CHECK-NEXT: sw $4, 0($sp)
+
+# CHECK-NEXT: nop
+# CHECK-NEXT: nop
+# CHECK-NEXT: bal
+# CHECK-NEXT: lw $5, 0($24)
+
+# CHECK-NEXT: nop
+# CHECK-NEXT: and $25, $25, $14
+# CHECK-NEXT: jalr
+# CHECK-NEXT: sw $sp, 0($sp)
OpenPOWER on IntegriCloud