home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
progasm
/
sprcbnch.arj
/
BRANCH.S
< prev
next >
Wrap
Text File
|
1991-10-30
|
3KB
|
263 lines
!
! Test branch on integer condition code (bicc) insns
!
! Set up constants
!
set 0x7fffffff,%o1
mov 1, %o2
mov -1, %o3
set 0x80000001, %o4
!
! First, without annulment
!
! ba
!
ba L1
nop
L2:
unimp 0
L1:
! bn
bn L2
nop
! bne
subcc %g0,1,%g0
bne .+0xc
nop
unimp 0
! be
orcc %g0,%g0,%g0
be .+0xc
nop
unimp 0
! bg
addcc %o1,%o1,%g0
bg .+0xc
nop
unimp 0
add %o2,%o2,%g0
bg .+0xc
nop
unimp 0
! ble
tst %g0
ble .+0xc
nop
unimp 0
tst %o3
ble .+0xc
nop
unimp 0
addcc %o3,%o3,%g0
ble .+0xc
nop
unimp 0
! bge
tst %o2
bge .+0xc
nop
unimp 0
addcc %o1,%o1,%g0
bge .+0xc
nop
unimp 0
! bl
orcc %g0,-1,%g0
bl .+0xc
nop
unimp 0
addcc %o4,%o4,%g0
bl .+0xc
nop
unimp 0
! bgu
orcc %g0,1,%g0
bgu .+0xc
nop
unimp 0
! bleu
addcc %o3,%o3,%g0
bleu .+0xc
nop
unimp 0
orcc %g0,%g0,%g0
bleu .+0xc
nop
unimp 0
addcc %o2,-1,%g0
bleu .+0xc
nop
unimp 0
! bcc
orcc %g0,%g0,%g0
bcc .+0xc
nop
unimp 0
! bcs
addcc %o2,%o3,%g0
bcs .+0xc
nop
unimp 0
! bpos
tst %o2
bpos .+0xc
nop
unimp 0
! bneg
tst %o3
bneg .+0xc
nop
unimp 0
! bvc
orcc %g0,%g0,%g0
bvc .+0xc
nop
unimp 0
! bvs
addcc %o1,%o1,%g0
bvs .+0xc
nop
unimp 0
!
! Now with annulment
!
! ba,a
ba,a .+0x8
unimp 0
! bn,a
bn,a .+0x8
unimp 0
! be,a
subcc %g0,1,%g0
be,a .+0x8
unimp 0
! bne,a
orcc %g0,%g0,%g0
bne,a .+0x8
unimp 0
! ble,a
addcc %o1,%o1,%g0
ble,a .+0x8
unimp 0
add %o2,%o2,%g0
ble,a .+0x8
unimp 0
! bg,a
tst %g0
bg,a .+0xc
unimp 0
tst %o3
bg,a .+0xc
unimp 0
addcc %o3,%o3,%g0
bg,a .+0xc
unimp 0
! bl,a
tst %o2
bl,a .+0xc
unimp 0
addcc %o1,%o1,%g0
bl,a .+0xc
unimp 0
! bge,a
orcc %g0,-1,%g0
bge,a .+0xc
unimp 0
addcc %o4,%o4,%g0
bge,a .+0xc
unimp 0
! bleu,a
orcc %g0,1,%g0
bleu,a .+0xc
unimp 0
! bgu,a
addcc %o3,%o3,%g0
bgu,a .+0xc
unimp 0
orcc %g0,%g0,%g0
bgu,a .+0xc
unimp 0
addcc %o2,-1,%g0
bgu,a .+0xc
unimp 0
! bcs,a
orcc %g0,%g0,%g0
bcs,a .+0xc
unimp 0
! bcc,a
addcc %o2,%o3,%g0
bcc,a .+0xc
unimp 0
! bneg,a
tst %o2
bneg,a .+0xc
unimp 0
! bpos,a
tst %o3
bpos,a .+0xc
unimp 0
! bvs,a
orcc %g0,%g0,%g0
bvs,a .+0xc
unimp 0
! bvc,a
addcc %o1,%o1,%g0
bvc,a .+0xc
unimp 0
!
! back-to-back branch tests
!
! case 1
ba .+0xc
ba .+0x10
unimp 0
tst %g0
unimp 1
! case 2
ba .+0x10
bne .+0x8
unimp 2
unimp 3
! case 3
ba .+0x10
bne,a .+0x8
unimp 4
unimp 5
unimp 6
! case 4
ba .+0xc
ba,a .+0x10
unimp 7
unimp 8
unimp 9
! case 5
ba,a .+0x10
be .+0x8
unimp 10
unimp 11
ba,a .+0x10
ba .+0x8
unimp 12
unimp 13
ba,a .+0x10
ba,a .+0x8
unimp 14
unimp 15
! case 6 (behaves like case 1)
be .+0xc
ba .+0x10
unimp 16
nop
unimp 17
bne .+0xc
ba .+0x10
nop
unimp 18
unimp 19
exit:
clr %o0
mov 1,%g1
ta 0