home *** CD-ROM | disk | FTP | other *** search
- !
- ! Test load/store instructions
- !
- .seg "data"
- .align 8
- in:
- .word 0x12345678, 0x9abcdef0
- out:
- .skip 8
- .seg "text"
- set in,%o0
- ! ld
- ld [%o0],%o1
- set 0x12345678,%l0
- cmp %o1,%l0
- bne,a .+0x8
- unimp 0
- ld [%o0],%g0
- tst %g0
- bne,a .+0x8
- unimp 0
- ! ldd
- ldd [%o0],%o2
- set 0x9abcdef0,%l1
- cmp %o2,%l0
- bne,a .+0x8
- unimp 0
- cmp %o3,%l1
- bne,a .+0x8
- unimp 0
- ! ldub
- ldub [%o0+7],%o1
- cmp %o1,0xf0
- bne,a .+0x8
- unimp 0
- ! ldsb
- ldsb [%o0+7],%o1
- cmp %o1,0xfffffff0
- bne,a .+0x8
- unimp 0
- ! lduh
- lduh [%o0+6],%o1
- set 0xdef0,%g1
- cmp %o1,%g1
- bne,a .+0x8
- unimp 0
- ! ldsh
- ldsh [%o0+6],%o1
- set 0xffffdef0,%g1
- cmp %o1,%g1
- bne,a .+0x8
- unimp 0
- ! st
- set out,%o0
- st %l1,[%o0]
- ld [%o0],%o1
- cmp %o1,%l1
- bne,a .+0x8
- unimp 0
- ! std
- std %l0,[%o0]
- ldd [%o0],%l2
- cmp %l0,%l2
- bne,a .+0x8
- unimp 0
- cmp %l1,%l3
- bne,a .+0x8
- unimp 0
- ! sth
- sth %l0,[%o0]
- lduh [%o0],%l2
- set 0x5678,%l3
- cmp %l2,%l3
- bne,a .+0x8
- unimp 0
- ! stb
- stb %l0,[%o0]
- ldub [%o0],%l2
- cmp %l2,0x78
- bne,a .+0x8
- unimp 0
- ! ldstub
- ldstub [%o0],%l2
- cmp %l2,0x78
- bne,a .+0x8
- unimp 0
- ldub [%o0],%l2
- cmp %l2,0xff
- bne,a .+0x8
- unimp 0
- ! swap
- swap [%o0+4],%l2
- cmp %l2,%l1
- bne,a .+0x8
- unimp 0
- ld [%o0+4],%l2
- cmp %l2,0xff
- bne,a .+0x8
- unimp 0
- ! floating point load/store
- set d1,%o0
- set d2,%o1
- ldd [%o0],%l0
- ld [%o0],%f3
- ldd [%o0],%f4
- !
- ! the following fsr test is implementation
- ! dependent and hence commented out...
- !
- /*
- ld [%o0],%fsr
- st %fsr,[%o1]
- ld [%o1],%i0
- set 0xcfc40fff,%l2
- and %l0,%l2,%l3
- set 0x40000,%l2
- or %l3,%l2,%l2
- cmp %i0,%l2
- bne,a .+0x8
- unimp 0
- */
- st %f3,[%o1]
- ld [%o1],%i0
- cmp %i0,%l0
- bne,a .+0x8
- unimp 0
- std %f4,[%o1]
- ldd [%o1],%i0
- cmp %i0,%l0
- bne,a .+0x8
- unimp 0
- cmp %i1,%l1
- bne,a .+0x8
- unimp 0
-
- exit:
- mov 1,%g1
- clr %o0
- ta 0
- nop
-
- .seg "data"
- .align 8
- d1:
- .word 0x12345678, 0x9abcdef0
- d2:
- .skip 8
-