* gas/cris/regreg.d: Assemble with --no-mul-bug-abort.
authorHans-Peter Nilsson <hp@axis.com>
Sun, 21 Mar 2004 23:47:54 +0000 (23:47 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Sun, 21 Mar 2004 23:47:54 +0000 (23:47 +0000)
* gas/cris/mulbug-err-1.s, gas/cris/rd-mulbug-1.d: New tests.

gas/testsuite/ChangeLog
gas/testsuite/gas/cris/mulbug-err-1.s [new file with mode: 0644]
gas/testsuite/gas/cris/rd-mulbug-1.d [new file with mode: 0644]
gas/testsuite/gas/cris/regreg.d

index 0eb9ca4..d2c765d 100644 (file)
@@ -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 (file)
index 0000000..fbd8303
--- /dev/null
@@ -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 (file)
index 0000000..42ac192
--- /dev/null
@@ -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                             .*
index c0e6026..37e2e77 100644 (file)
@@ -1,4 +1,5 @@
 #objdump: -dr
+#as: --no-mul-bug-abort
 #name: @OC@
 
 # Test the @OC@ insn.