OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [gas/] [testsuite/] [gas/] [cris/] [operand-err-1.s] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
; Error cases for invalid operands.
2
;  { dg-do assemble { target cris-*-* } }
3
 .text
4
 .syntax no_register_prefix
5
start:
6
 add.w r3,r4,r5 ; { dg-error "(Illegal|Invalid) operands" }
7
 add.w 42,r4,r5 ; { dg-error "(Illegal|Invalid) operands" }
8
 add.w [r3],r4,r5 ; Not an error: [r3] implies [r3+0].
9
 add.w r3,[r3],r4 ; { dg-error "(Illegal|Invalid) operands" }
10
 add.w r3,[r3] ; { dg-error "(Illegal|Invalid) operands" }
11
 test.w [r3],r4,r5 ; { dg-error "(Illegal|Invalid) operands" }
12
 test.d [r3],r4 ; { dg-error "(Illegal|Invalid) operands" }
13
 move.d [r3],r4,r5 ; { dg-error "(Illegal|Invalid) operands" }
14
 
15
; These two could be seen useful in extreme cases, but those
16
; would be shadowed by not flagging erroneous use of
17
; e.g. "test.d $r3" for CRISv32.  If you really need it, use
18
; e.g. "test.d [$pc+] @ .dword whatever".
19
 test.d whatever ; { dg-error "(Illegal|Invalid) operands" "" }
20
 test.d 42 ; { dg-error "(Illegal|Invalid) operands" "" }
21
 
22
 clear.d whatever ; { dg-error "(Illegal|Invalid) operands" }
23
 clear.d 42 ; { dg-error "(Illegal|Invalid) operands" }
24
 addi r5,r3 ; { dg-error "(Illegal|Invalid) operands" }
25
 
26
; These two are valid instructions, though not recognized by
27
; the assembler since they're obscure and generally useless.
28
 ba [external_symbol] ; { dg-error "(Illegal|Invalid) operands|(B|b)ad expression" }
29
 ba [r3] ; { dg-error "(Illegal|Invalid) operands|(B|b)ad expression" }
30
 lsl r3,r5 ; { dg-error "(Illegal|Invalid) operands" }
31
 xor.d r5,r6 ; { dg-error "(Illegal|Invalid) operands" }
32
 
33
; Addressing modes
34
 test.d [r3+r4] ; { dg-error "(Illegal|Invalid) operands" }
35
 test.d [r3=r2+[r4]] ; { dg-error "(Illegal|Invalid) operands" }
36
 test.d [r3=r2+[r4].w ; { dg-error "(Illegal|Invalid) operands" }
37
 test.d [r3=r2] ; { dg-error "(Illegal|Invalid) operands" }
38
 test.d [r3=r2+] ; { dg-error "(Illegal|Invalid) operands|(B|b)ad expression" }
39
 test.d [r3++] ; { dg-error "(Illegal|Invalid) operands|(B|b)ad expression" }
40
 
41
; I think these should be valid; a dip with "postincrement" on
42
; the insn that follows.
43
 test.d [r3=external_symbol] ; { dg-error "(Illegal|Invalid) operands" }
44
 test.d [r3=[r4]] ; { dg-error "(Illegal|Invalid) operands" }
45
 test.d [r3=[r4+]] ; { dg-error "(Illegal|Invalid) operands" }
46
 
47
 test.d [[r3+r4.b]] ; { dg-error "(Illegal|Invalid) operands" }
48
 test.d [r3=external+[r5]] ; { dg-error "(Illegal|Invalid) operands" }
49
 test.d [r3=[r5]+external] ; { dg-error "(Illegal|Invalid) operands" }
50
 test.d [r3+[r3+r5.d]] ; { dg-error "(Illegal|Invalid) operands" }
51
 test.d [r3+[r3+external]] ; { dg-error "(Illegal|Invalid) operands" }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.