binutils-gdb/gas/testsuite/gasp/exp.was
Steve Chamberlain a5f4bc3075 More testcases.
1994-04-27 18:03:31 +00:00

133 lines
1.7 KiB
Plaintext

******** exp.amp
!
!; test all ops
; test all ops
!
!a1 .EQU 4+10
!a2 .EQU 4-10
!a3 .EQU 4&10
!a4 .EQU 4|2
!a5 .EQU 4~2
!a6 .EQU 4*10
!a7 .EQU 40/10
!a8 .EQU +7
!a9 .EQU -7
!a10 .EQU ~7
!
!
! a1 a2 a3 a4 a5 a6 a7 a8 a9 a10
14 -6 0 6 6 40 4 7 -7 -8
!
!; test the priorities
; test the priorities
!
!b1 .EQU 1|2~3&4+5-8*7/2
!b2 .EQU (1|2~(3&(4+5-(8*(7/2)))))
!b3 .EQU 10*2/3*4
!b4 .EQU (((10*2)/3)*4)
!b5 .EQU 10+2-3+4
!b6 .EQU (((10+2)-3)+4)
!
! b1 b2 b3 b4
2 2 24 24
!
!; test association
; test association
!
!c1 .EQU -~3
!c2 .EQU ~-3
!c3 .EQU -(~3)
!c4 .EQU ~(-3)
!
! c1 c2 c3 c4
4 2 4 2
!
!; test rules for symbols
; test rules for symbols
!
!ok1 .EQU FOO
!ok2 .EQU FOO+10
!ok3 .EQU 10+FOO
!ok4 .EQU FOO-10
!
! ok1
FOO
! ok2
FOO+10
! ok3
FOO+10
! ok4
FOO+-10
!
!ok5 .EQU FOO+3+4+5+6
!ok6 .EQU FOO-BAR
!
! ok5
FOO+18
! ok6
FOO-FOO
!
!bad1 .EQU FOO+FOO
!bad2 .EQU FOO*2
!bad3 .EQU FOO/2
!bad4 .EQU FOO|2
!bad5 .EQU FOO&2
!bad6 .EQU FOO~2
!bad7 .EQU FOO*2
!
!; test spacing
; test spacing
!
!space1 .EQU 1 + 2 +3+FOO + 3
!space2
space2:
!
!; from the SH manual
; from the SH manual
!
! .DATA.L 1+(2-(3+(4-5))),1
.long 1,1
!
! .DATA.L -H'fffffff1+H'000000f0*H'00000010|H'000000f0&H'0000ffff,H'00000fff
.long 4095,4095
!
! .DATA.L -~-~H'0000000f,H'00
.long 17,0
!
!
!
!
! .END
exp.asm:56 can't add two relocatable expressions
exp.asm:57 the * operator cannot take non-absolute arguments.
exp.asm:58 the / operator cannot take non-absolute arguments.
exp.asm:59 the | operator cannot take non-absolute arguments.
exp.asm:60 the & operator cannot take non-absolute arguments.
exp.asm:61 the ~ operator cannot take non-absolute arguments.
exp.asm:62 the * operator cannot take non-absolute arguments.