Search
lxdream.org :: lxdream/test/sh4/ldc.s
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/ldc.s
changeset 823:8a592668322f
prevtest/sh4/ldcsr.s@822:6e0536758465
next976:e57a25d9eb7d
author nkeynes
date Sun Aug 24 01:40:58 2008 +0000 (13 years ago)
permissions -rw-r--r--
last change Mask fpscr correctly as well while we're in there
file annotate diff log raw
nkeynes@822
     1
.section .text
nkeynes@822
     2
.include "sh4/inc.s"
nkeynes@822
     3
nkeynes@823
     4
.global _test_ldc
nkeynes@823
     5
_test_ldc:
nkeynes@822
     6
	start_test
nkeynes@822
     7
	
nkeynes@822
     8
test_ldcsr_1:
nkeynes@822
     9
	add #1, r12
nkeynes@822
    10
nkeynes@822
    11
	stc sr, r0
nkeynes@822
    12
	mov #-1, r1
nkeynes@822
    13
	ldc r1, sr
nkeynes@822
    14
	stc sr, r2
nkeynes@822
    15
	ldc r0, sr
nkeynes@822
    16
	mov.l sr_mask, r3
nkeynes@822
    17
	cmp/eq r2, r3
nkeynes@823
    18
	bt test_ldsfpscr_1
nkeynes@823
    19
	fail test_ldc_str_k
nkeynes@822
    20
nkeynes@823
    21
test_ldsfpscr_1:
nkeynes@823
    22
	add #1,r12
nkeynes@823
    23
	sts fpscr, r0
nkeynes@823
    24
	mov #-1, r1
nkeynes@823
    25
	lds r1, fpscr
nkeynes@823
    26
	sts fpscr, r2
nkeynes@823
    27
	lds r0, fpscr
nkeynes@823
    28
	mov.l fpscr_mask, r3
nkeynes@823
    29
	cmp/eq r2, r3
nkeynes@823
    30
	bt test_ldc_end
nkeynes@823
    31
	fail test_ldc_str_k
nkeynes@822
    32
nkeynes@823
    33
test_ldc_end:
nkeynes@823
    34
	end_test test_ldc_str_k
nkeynes@823
    35
nkeynes@823
    36
test_ldc_str:
nkeynes@823
    37
	.string "LDC/S"
nkeynes@822
    38
.align 4
nkeynes@822
    39
sr_mask:
nkeynes@822
    40
	.long 0x700083F3
nkeynes@823
    41
fpscr_mask:
nkeynes@823
    42
	.long 0x003FFFFF
nkeynes@823
    43
test_ldc_str_k:	
nkeynes@823
    44
	.long test_ldc_str
.