Search
lxdream.org :: lxdream/test/sh4/and.s
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/and.s
changeset 226:0eeeb25447d3
next231:a9e61a96a885
author nkeynes
date Mon Sep 25 11:13:56 2006 +0000 (17 years ago)
permissions -rw-r--r--
last change Commit BF tests and initial exception handler
view annotate diff log raw
     1 .section .text
     2 .include "sh4/inc.s"
     3 !
     4 ! Test AND Rm,Rn operation
     5 !
     6 .global _test_and
     7 _test_and:
     8 	start_test
     9 	mov.l r11, @-r15
    10 	mov.l test_and_data_k, r11
    12 test_and_loop:
    13 	mov.l test_and_data_end_k, r4
    14 	cmp/eq r11, r4
    15 	bt test_and_end
    16 	add #1, r12
    18 	clc
    19 	mov.l @r11+, r0
    20 	mov.l @r11+, r1
    21 	and r0, r1
    22 	stc sr, r4
    23 	mov.l @r11+, r2
    24 	mov.l @r11+, r3
    25 	cmp/eq r1, r2
    26 	bt test_and_b
    27 	fail test_and_str_k
    28 	bra test_and_loop
    29 	nop
    30 test_and_b:
    31 	ldc r4, sr
    32 	xor r0, r0
    33 	add #1, r0
    34 	and r0, r4
    35 	cmp/eq r3, r4
    36 	bt test_and_loop
    37 	fail test_and_str_k
    38 	bra test_and_loop
    39 	nop
    41 test_and_end:
    42 	end_test test_and_str_k
    44 	.align 4	
    45 test_and_data_k:
    46 	.long test_and_data
    47 test_and_data:
    48 test_and_data_1:
    49 	.long 0xFFFFFFFF
    50 	.long 0x00000000
    51 	.long 0x00000000
    52 	.long 0x00000000
    54 	.long 0x55555555
    55 	.long 0xAAAAAAAA
    56 	.long 0x00000000
    57 	.long 0x00000000
    59 	.long 0xFFFFFFFF
    60 	.long 0xA5A5A5A5
    61 	.long 0xA5A5A5A5
    62 	.long 0x00000000
    64 	.long 0xFFFFFFFF
    65 	.long 0xFFFFFFFF
    66 	.long 0xFFFFFFFF
    67 	.long 0x00000000
    69 	.long 0x12345678
    70 	.long 0x98765432
    71 	.long 0x10345430
    72 	.long 0x00000000
    74 	.long 0x00FFFFFF
    75 	.long 0x98765432
    76 	.long 0x00765432
    77 	.long 0x00000000
    79 test_and_data_end:	
    80 	.align 4
    81 test_and_data_end_k:
    82 	.long test_and_data_end	
    83 test_and_str_k:
    84 	.long test_and_str
    85 test_and_str:
    86 	.string "AND"
.