Commit | Line | Data |
---|---|---|
95631471 HPN |
1 | ; Test error message for mul insns at locations likely to trig |
2 | ; a hardware bug. | |
3 | ||
4 | ; { dg-do assemble { target cris-*-* } } | |
5 | ||
6 | ; First, .text isn't dword-aligned by default. | |
7 | .text | |
8 | muls.w $r1,$r4 ; { dg-error "align" } | |
9 | nop | |
10 | muls.b $r1,$r4 ; { dg-error "align" } | |
11 | mulu.d $r1,$r4 ; { dg-error "align" } | |
12 | ||
13 | ; Neither are other code sections, aligned to word. | |
14 | .section .text.1,"ax",@progbits | |
15 | .p2align 1 | |
16 | muls.w $r1,$r4 ; { dg-error "align" } | |
17 | nop | |
18 | mulu.b $r1,$r4 ; { dg-error "align" } | |
19 | muls.d $r1,$r4 ; { dg-error "align" } | |
20 | ||
21 | ; Now, a section aligned to dword. Errors for certain relative | |
22 | ; positions only. | |
23 | .section .text.2,"ax",@progbits | |
24 | .p2align 2 | |
25 | mulu.w $r1,$r4 | |
26 | nop | |
27 | muls.d $r1,$r4 | |
28 | mulu.w $r1,$r4 ; { dg-error "align" } | |
29 | ||
30 | ; For good measure, a cache-line-aligned section. | |
31 | .section .text.3,"ax",@progbits | |
32 | .p2align 5 | |
33 | muls.w $r1,$r4 | |
34 | mulu.d $r4,$r1 | |
35 | mulu.b $r1,$r4 | |
36 | .rept 12 | |
37 | nop | |
38 | .endr | |
39 | mulu.b $r1,$r4 ; { dg-error "align" } | |
40 | mulu.b $r1,$r4 | |
41 | ||
42 | ; Last, make sure typical alignment use by a fixed gcc passes. | |
43 | .section .text.4,"ax",@progbits | |
44 | .align 1 | |
45 | moveq 0,$r13 | |
46 | moveq 1,$r13 | |
47 | .p2alignw 5,0x050f,2 | |
48 | muls.d $r1,$r4 | |
49 | .rept 12 | |
50 | moveq 2,$r13 | |
51 | .endr | |
52 | .p2alignw 5,0x050f,2 | |
53 | muls.w $r1,$r4 | |
54 | .p2alignw 5,0x050f,2 | |
55 | muls.b $r4,$r1 |