Search
lxdream.org :: lxdream/test/sh4/ldc.s :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/ldc.s
changeset 823:8a592668322f
prev822:6e0536758465
next976:e57a25d9eb7d
author nkeynes
date Sun Aug 24 01:40:58 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Mask fpscr correctly as well while we're in there
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/sh4/ldc.s Sun Aug 24 01:40:58 2008 +0000
1.3 @@ -0,0 +1,44 @@
1.4 +.section .text
1.5 +.include "sh4/inc.s"
1.6 +
1.7 +.global _test_ldc
1.8 +_test_ldc:
1.9 + start_test
1.10 +
1.11 +test_ldcsr_1:
1.12 + add #1, r12
1.13 +
1.14 + stc sr, r0
1.15 + mov #-1, r1
1.16 + ldc r1, sr
1.17 + stc sr, r2
1.18 + ldc r0, sr
1.19 + mov.l sr_mask, r3
1.20 + cmp/eq r2, r3
1.21 + bt test_ldsfpscr_1
1.22 + fail test_ldc_str_k
1.23 +
1.24 +test_ldsfpscr_1:
1.25 + add #1,r12
1.26 + sts fpscr, r0
1.27 + mov #-1, r1
1.28 + lds r1, fpscr
1.29 + sts fpscr, r2
1.30 + lds r0, fpscr
1.31 + mov.l fpscr_mask, r3
1.32 + cmp/eq r2, r3
1.33 + bt test_ldc_end
1.34 + fail test_ldc_str_k
1.35 +
1.36 +test_ldc_end:
1.37 + end_test test_ldc_str_k
1.38 +
1.39 +test_ldc_str:
1.40 + .string "LDC/S"
1.41 +.align 4
1.42 +sr_mask:
1.43 + .long 0x700083F3
1.44 +fpscr_mask:
1.45 + .long 0x003FFFFF
1.46 +test_ldc_str_k:
1.47 + .long test_ldc_str
.