1; Test that we get errors when we require a register prefix. 2 3; { dg-do assemble } 4 5 .syntax register_prefix 6start: 7 8; Some simple tests that we indeed require a register prefix, and some 9; that should not be flagged as syntax errors. 10 11 push srp ; { dg-error "(Illegal|Invalid) operands" } 12 push r3 ; { dg-error "(Illegal|Invalid) operands" } 13 move.d $r7,r8 ; { dg-error "(Illegal|Invalid) operands" } 14 move.d r8,[$r11] ; { dg-error "(Illegal|Invalid) operands" } 15 move.d $r8,[$r11+] 16 move.d $r8,[$r10+$r9.b] 17 move.d $r7,[$r10+[$r1].d] 18 move.d $r7,[$r10+[$r3+].w] 19 move $r8,srp ; { dg-error "(Illegal|Invalid) operands" } 20 move ccr,$r13 ; { dg-error "(Illegal|Invalid) operands" } 21 movem r4,[$r12+] ; { dg-error "(Illegal|Invalid) operands" } 22 23; Here we have no ambiguity; r10 can only be a symbol when we reuire a 24; prefix. It does not just miss a size specifier, e.g. as in [r12+r10.d]. 25 move.d $r13,[$r12+r10] 26 27 .syntax no_register_prefix 28 29; Perhaps in this one we should backtrack and retry r10 as a symbol, but 30; the ambiguity is closer to a programming error, so we should catch it as 31; such. 32 move.d $r13,[$r12+r10] ; { dg-error "(Illegal|Invalid) operands" } 33 move.d r13,[r12+r16] ; No register named r16 so must be a symbol. 34 nop 35