3 ; { dg-do assemble { target cris-*-* } }
5 ; A variant of exbwtest.s. This is an example of invalid use of the broken-
6 ; dot-word function. The nearest label occurs about 32 kbytes after the primary
7 ; jump table so the secondary jump table can't be reached by word displace-
8 ; ments and the broken words overflow.
14 ; for (i=0; i <= 3; i++) {
15 ; result[i] = funct(i);
19 ; Register use : r1 - i
23 .syntax no_register_prefix
44 ; case 0 : return 0x1111;
45 ; case 1 : return 0x2222;
46 ; case 2 : return 0x3333;
47 ; case 3 : return 0x4444;
53 ; Register use : r1 - pjt address
58 pjt: .word near1 - pjt
63 ; Note that the line-number of the source-location of the error
64 ; seems slightly off from the user perspective, but it's the
65 ; best I could get without major changes in BW-handling. Not
66 ; sure it it's worth fixing. May need adjustments if
67 ; BW-handling changes. Four errors from four .words are what's
70 .space 32760,0xFF; { dg-error "Adjusted signed \.word \(.*\) overflow.*" }
72 near1: move.w 0x1111,r0
76 near2: move.w 0x2222,r0
80 far1: move.w 0x3333,r0
84 far2: move.w 0x4444,r0
89 result: .space 4 * 2 ; static uword result[4];