* gas/cris/regreg.d: Assemble with --no-mul-bug-abort.

* gas/cris/mulbug-err-1.s, gas/cris/rd-mulbug-1.d: New tests.
This commit is contained in:
Hans-Peter Nilsson 2004-03-21 23:47:54 +00:00
parent 73b179faf8
commit 95631471e2
4 changed files with 85 additions and 0 deletions

View 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.

View File

@ -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

View File

@ -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 .*

View File

@ -1,4 +1,5 @@
#objdump: -dr
#as: --no-mul-bug-abort
#name: @OC@
# Test the @OC@ insn.