1 ; Test error cases for constant ranges. 2 3 ; { dg-do assemble { target cris-*-* } } 4 5 .set two701867, 2701867 6 .set mtwo701867, -2701867 7 .set const_int_32, 0x1b94452b 8 .set const_int_m32, -3513208907 9 .set three2767, 32767 10 11 .text 12 .syntax no_register_prefix 13 start: 14 moveq 32,r0 ; { dg-error "Immediate value not in 6 bit range: 32" } 15 moveq 63,r0 ; { dg-error "Immediate value not in 6 bit range: 63" } 16 moveq 0x20,r0 ; { dg-error "Immediate value not in 6 bit range: 32" } 17 moveq 0x3f,r0 ; { dg-error "Immediate value not in 6 bit range: 63" } 18 moveq -33,r0 ; { dg-error "Immediate value not in 6 bit range: -33" } 19 addq 64,r0 ; { dg-error "Immediate value not in 6 bit unsigned range: 64" } 20 addq -1,r0 ; { dg-error "Immediate value not in 6 bit unsigned range: -1" } 21 subq 64,r0 ; { dg-error "Immediate value not in 6 bit unsigned range: 64" } 22 subq -1,r0 ; { dg-error "Immediate value not in 6 bit unsigned range: -1" } 23 break 16 ; { dg-error "Immediate value not in 4 bit unsigned range: 16" } 24 movs.b 256,r0 ; { dg-error "Immediate value not in 8 bit range: 256" } 25 movs.b 255,r0 ; { dg-error "Immediate value not in 8 bit range: 255" "" { xfail *-*-* } } 26 movs.b -129,r0 ; { dg-error "Immediate value not in 8 bit range: -129" } 27 movs.b 128,r0 ; { dg-error "Immediate value not in 8 bit range: 128" "" { xfail *-*-* } } 28 movs.b -32769,r0 ; { dg-error "Immediate value not in (8|16) bit range: -32769" } 29 movs.b 0xffffffff,r0 ; { dg-error "Immediate value not in (8|16) bit range: (4294967295|-1)" "" { xfail *-*-* } } 30 31 movs.w 32768,r0 ; { dg-error "Immediate value not in 16 bit range: 32768" "" { xfail *-*-* } } 32 movs.w 0x8000,r0 ; { dg-error "Immediate value not in 16 bit range: 32768" "" { xfail *-*-* } } 33 movs.w 65535,r0 ; { dg-error "Immediate value not in 16 bit range: 65535" "" { xfail *-*-* } } 34 movs.w 0xffff,r0 ; { dg-error "Immediate value not in 16 bit range: 65535" "" { xfail *-*-* } } 35 movs.w -32769,r0 ; { dg-error "Immediate value not in 16 bit range: -32769" } 36 movs.w 65536,r0 ; { dg-error "Immediate value not in 16 bit range: 65536" } 37 movs.w -32769,r0 ; { dg-error "Immediate value not in 16 bit range: -32769" } 38 movs.w 0xffffffff,r0 ; { dg-error "Immediate value not in 16 bit range: (4294967295|-1)" "" { xfail *-*-* } } 39 40 movu.b 256,r0 ; { dg-error "Immediate value not in 8 bit range: 256" } 41 movu.b 0x100,r0 ; { dg-error "Immediate value not in 8 bit range: 256" } 42 movu.b -1,r0 ; { dg-error "Immediate value not in 8 bit unsigned range: -1" "" { xfail *-*-* } } 43 movu.b -127,r0 ; { dg-error "Immediate value not in 8 bit unsigned range: -127" "" { xfail *-*-* } } 44 movu.b -129,r0 ; { dg-error "Immediate value not in 8 bit range: -129" } 45 movu.b -128,r0 ; { dg-error "Immediate value not in 8 bit unsigned range: -128" "" { xfail *-*-* } } 46 47 movu.w 65536,r0 ; { dg-error "Immediate value not in 16 bit range: 65536" } 48 movu.w -32769,r0 ; { dg-error "Immediate value not in 16 bit range: -32769" } 49 movu.w -1,r0 ; { dg-error "Immediate value not in 16 bit unsigned range: -1" "" { xfail *-*-* } } 50 movu.w 0xffffffff,r0 ; { dg-error "Immediate value not in 16 bit (unsigned )?range: (4294967295|-1)" "" { xfail *-*-* } } 51 52 add.b -129,r5 ; { dg-error "Immediate value not in 8 bit range: -129" } 53 add.b -255,r5 ; { dg-error "Immediate value not in 8 bit range: -255" } 54 add.b 256,r5 ; { dg-error "Immediate value not in 8 bit range: 256" } 55 add.b -8856,r5 ; { dg-error "Immediate value not in 8 bit range: -8856" } 56 add.b 8856,r5 ; { dg-error "Immediate value not in 8 bit range: 8856" } 57 58 add.w two701867,r13 ; { dg-error "Immediate value not in 16 bit range: 2701867" } 59 add.w mtwo701867,r13 ; { dg-error "Immediate value not in 16 bit range: -2701867" } 60 61 add.w 2781868,r13 ; { dg-error "Immediate value not in 16 bit range: 2781868" } 62 add.w -2701867,r13 ; { dg-error "Immediate value not in 16 bit range: -2701867" } 63 64 add.w 0x9ec0ceac,r13 ; { dg-error "Immediate value not in 16 bit range: (2663435948|-1631531348)" } 65 add.w -0x7ec0cead,r13 ; { dg-error "Immediate value not in 16 bit range: -2126565037" } 66 67 add.w const_int_m32,r13 ; { dg-error "Immediate value not in 16 bit range: (-3513208907|781758389)" } 68 add.w const_int_32,r13 ; { dg-error "Immediate value not in 16 bit range: 462701867" } 69 add.w -(three2767+2),r5 ; { dg-error "Immediate value not in 16 bit range: -32769" } 70