old-cross-binutils/sim/testsuite/v850eq-elf/t-macros.i
Andrew Cagney f4822f1e6e More tests.
Have sld check verify that the processor is a v850eq.
1997-09-19 06:40:11 +00:00

64 lines
718 B
OpenEdge ABL

.macro start
.text
.globl _start
_start:
.endm
.macro exit47
mov 1, r6
addi 47, r0, r7
trap 31
.endm
.macro exit0
mov 1, r6
mov 0, r7
trap 31
.endm
.macro load reg val
jr 1f
.align 2
1: jarl 2f, \reg
.long \val
2: ld.w 0[\reg], \reg
.endm
.macro check1 reg val
jr 1f
.align 2
1: jarl 2f, r1
.long \val
2: ld.w 0[r1], r1
cmp r1, \reg
be 1f
exit47
1:
.endm
.macro check1x sts reg val
jr 1f
.align 2
1: jarl 2f, r1
.long \val
2: ld.w 0[r1], r1
cmp r1, \reg
be 1f
mov 1, r6
addi \sts, r0, r7
trap 31
1:
.endm
# definitions of various PSW bits
PSW_US = 0x100
PSW_NP = 0x80
PSW_EP = 0x40
PSW_ID = 0x20
PSW_SAT = 0x10
PSW_CY = 0x8
PSW_OV = 0x4
PSW_S = 0x2
PSW_Z = 0x1