aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2004-03-21 23:47:54 +0000
committerHans-Peter Nilsson <hp@axis.com>2004-03-21 23:47:54 +0000
commit95631471e2a5e4a39a26ad271edd037c66ab9c9c (patch)
tree24c4803091099ca43221a4f06f6df59bcc532aee /gas
parent73b179faf894eaabc0edc2b25fbdb37fbf309508 (diff)
downloadgdb-95631471e2a5e4a39a26ad271edd037c66ab9c9c.zip
gdb-95631471e2a5e4a39a26ad271edd037c66ab9c9c.tar.gz
gdb-95631471e2a5e4a39a26ad271edd037c66ab9c9c.tar.bz2
* gas/cris/regreg.d: Assemble with --no-mul-bug-abort.
* gas/cris/mulbug-err-1.s, gas/cris/rd-mulbug-1.d: New tests.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/cris/mulbug-err-1.s55
-rw-r--r--gas/testsuite/gas/cris/rd-mulbug-1.d24
-rw-r--r--gas/testsuite/gas/cris/regreg.d1
4 files changed, 85 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 0eb9ca4..d2c765d 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-22 Hans-Peter Nilsson <hp@axis.com>
+
+ * gas/cris/regreg.d: Assemble with --no-mul-bug-abort.
+ * gas/cris/mulbug-err-1.s, gas/cris/rd-mulbug-1.d: New tests.
+
2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* gas/cfi/cfi-sh-1.d: New file.
diff --git a/gas/testsuite/gas/cris/mulbug-err-1.s b/gas/testsuite/gas/cris/mulbug-err-1.s
new file mode 100644
index 0000000..fbd8303
--- /dev/null
+++ b/gas/testsuite/gas/cris/mulbug-err-1.s
@@ -0,0 +1,55 @@
+; Test error message for mul insns at locations likely to trig
+; a hardware bug.
+
+; { dg-do assemble { target cris-*-* } }
+
+ ; First, .text isn't dword-aligned by default.
+ .text
+ muls.w $r1,$r4 ; { dg-error "align" }
+ nop
+ muls.b $r1,$r4 ; { dg-error "align" }
+ mulu.d $r1,$r4 ; { dg-error "align" }
+
+; Neither are other code sections, aligned to word.
+ .section .text.1,"ax",@progbits
+ .p2align 1
+ muls.w $r1,$r4 ; { dg-error "align" }
+ nop
+ mulu.b $r1,$r4 ; { dg-error "align" }
+ muls.d $r1,$r4 ; { dg-error "align" }
+
+; Now, a section aligned to dword. Errors for certain relative
+; positions only.
+ .section .text.2,"ax",@progbits
+ .p2align 2
+ mulu.w $r1,$r4
+ nop
+ muls.d $r1,$r4
+ mulu.w $r1,$r4 ; { dg-error "align" }
+
+; For good measure, a cache-line-aligned section.
+ .section .text.3,"ax",@progbits
+ .p2align 5
+ muls.w $r1,$r4
+ mulu.d $r4,$r1
+ mulu.b $r1,$r4
+ .rept 12
+ nop
+ .endr
+ mulu.b $r1,$r4 ; { dg-error "align" }
+ mulu.b $r1,$r4
+
+; Last, make sure typical alignment use by a fixed gcc passes.
+ .section .text.4,"ax",@progbits
+ .align 1
+ moveq 0,$r13
+ moveq 1,$r13
+ .p2alignw 5,0x050f,2
+ muls.d $r1,$r4
+ .rept 12
+ moveq 2,$r13
+ .endr
+ .p2alignw 5,0x050f,2
+ muls.w $r1,$r4
+ .p2alignw 5,0x050f,2
+ muls.b $r4,$r1
diff --git a/gas/testsuite/gas/cris/rd-mulbug-1.d b/gas/testsuite/gas/cris/rd-mulbug-1.d
new file mode 100644
index 0000000..42ac192
--- /dev/null
+++ b/gas/testsuite/gas/cris/rd-mulbug-1.d
@@ -0,0 +1,24 @@
+#objdump: -s
+#source: mulbug-err-1.s
+#as: --em=criself --no-mul-bug-abort
+
+# Check that we don't get any errors or messages with
+# "--no-mul-bug-abort". No checking for "--mul-bug-abort",
+# though.
+
+.*: file format .*-cris
+
+Contents of section \.text:
+ 0+ 114d0f05 014d2149 .*
+Contents of section \.text\.1:
+ 0+ 114d0f05 0149214d .*
+Contents of section \.text\.2:
+ 0+ 11490f05 214d1149 .*
+Contents of section \.text\.3:
+ 0+ 114d2419 01490f05 0f050f05 0f050f05 .*
+ 0+10 0f050f05 0f050f05 0f050f05 0f050149 .*
+ 0+20 0149 .*
+Contents of section \.text\.4:
+ 0+ 40d241d2 214d42d2 42d242d2 42d242d2 .*
+ 0+10 42d242d2 42d242d2 42d242d2 42d20f05 .*
+ 0+20 114d041d .*
diff --git a/gas/testsuite/gas/cris/regreg.d b/gas/testsuite/gas/cris/regreg.d
index c0e6026..37e2e77 100644
--- a/gas/testsuite/gas/cris/regreg.d
+++ b/gas/testsuite/gas/cris/regreg.d
@@ -1,4 +1,5 @@
#objdump: -dr
+#as: --no-mul-bug-abort
#name: @OC@
# Test the @OC@ insn.