1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
; ###----------------------------------------------------------------###
; # file : exc022.u #
; # date : Mar 26 1996 #
; # descr. : functional test for mips #
; ###----------------------------------------------------------------###
; ###--------------------------------------------------------###
; # exceptions : #
; # - data bus error (when loading an unsigned bute) #
; ###--------------------------------------------------------###
adr .equ 0x400000C8 ; data bus error address
data .equ 0x9043ad6b ; data
.org 0x00400000
.start init
init:
loadi r1 , adr ; word's address
loadi r2 , data ; init. r2 with a data
loadi r3 , data ; init. r3 with the same value
; ###--------------------------------------------------------###
; # load a word and dbe low (data bus error exception) #
; # berr is driven by mips_dec.vbe... #
; ###--------------------------------------------------------###
lbu r2 , 0 (r1 ) ; EXCEPTION (data bus error)
nop
; ###--------------------------------------------------------###
; # check that the load has faild and the content of the #
; # register has not been altered #
; ###--------------------------------------------------------###
back_from_exception:
beq r3 ,r2, good
nop
j bad
nop
.org 0x004000D0
good: j good
nop
.org 0x004000D8
bad: j bad
nop
.end
|