Search
lxdream.org :: lxdream/test/sh4/trapa.s
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/trapa.s
changeset 533:9764673fd4a5
author nkeynes
date Tue Nov 20 08:31:34 2007 +0000 (14 years ago)
permissions -rw-r--r--
last change Fix TRAPA (translator) and add test case
view annotate diff log raw
     1 .section .text
     2 .include "sh4/inc.s"
     4 .global _test_trapa
     5 _test_trapa:	
     6 	start_test
     8 test_trapa_1:
     9 	add #1, r12
    10 	expect_exc 0x00000160
    11 	trapa #42
    13 test_trapa_1_pc:
    14 	assert_exc_caught test_trapa_str_k test_trapa_1_pc
    16 	mov.l test_trapa_tra, r1
    17 	mov.l @r1, r2
    18 	mov #42, r0
    19 	shll r0
    20 	shll r0
    21 	cmp/eq r0, r2
    22 	bt test_trapa_end
    23 	fail test_trapa_str_k
    24 	bra test_trapa_end
    25 	nop
    27 test_trapa_tra:
    28 	.long 0xFF000020
    30 test_trapa_end:
    31 	end_test test_trapa_str_k
    33 test_trapa_str_k:
    34 	.long test_trapa_str
    35 test_trapa_str:
    36 	.string "TRAPA"
.