Search
lxdream.org :: lxdream/test/sh4/shl.s
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/shl.s
changeset 396:0738dbc01d95
author nkeynes
date Fri Dec 02 18:18:04 2011 +1000 (10 years ago)
permissions -rw-r--r--
last change SH4 shadow-mode tweaks
- Fix exceptions generated by the translator to account for the excepting
instruction(s) in the cycle counts.
- Compare floating point regs bitwise rather than with FP comparisons
(otherwise can fail due to nan != nan)
- Dump the translated block when we abort with an inconsistency
view annotate diff log raw
     1 .section .text
     2 .include "sh4/inc.s"
     4 .global _test_shl
     5 _test_shl:
     6 	start_test
     8 test_shll_1:
     9 	add #1, r12
    11 	mov.l test_shll_1_input, r3
    12 	mov.l test_shll_1_result, r4
    13 	clrt
    14 	shll r3
    15 	bf test_shll_1_fail
    16 	cmp/eq r3, r4
    17 	bt test_shll_2
    18 test_shll_1_fail:	
    19 	fail test_shl_str_k
    20 	bra test_shll_2
    21 	nop
    22 test_shll_1_input:
    23 	.long 0x94E12323
    24 test_shll_1_result:
    25 	.long 0x29C24646
    27 test_shll_2:
    28 	add #1, r12
    29 	mov.l test_shll_2_input, r3
    30 	mov.l test_shll_2_result, r4
    31 	sett
    32 	shll r3
    33 	bt test_shll_2_fail
    34 	cmp/eq r3, r4
    35 	bt test_shal_1
    36 test_shll_2_fail:	
    37 	fail test_shl_str_k
    38 	bra test_shal_1
    39 	nop
    40 test_shll_2_input:
    41 	.long 0x29C24646
    42 test_shll_2_result:
    43 	.long 0x53848C8C
    45 test_shal_1:
    46 	add #1, r12
    48 	mov.l test_shal_1_input, r3
    49 	mov.l test_shal_1_result, r4
    50 	clrt
    51 	shal r3
    52 	bf test_shal_1_fail
    53 	cmp/eq r3, r4
    54 	bt test_shal_2
    55 test_shal_1_fail:	
    56 	fail test_shl_str_k
    57 	bra test_shal_2
    58 	nop
    59 test_shal_1_input:
    60 	.long 0x94E12323
    61 test_shal_1_result:
    62 	.long 0x29C24646
    64 test_shal_2:
    65 	add #1, r12
    66 	mov.l test_shal_2_input, r3
    67 	mov.l test_shal_2_result, r4
    68 	sett
    69 	shal r3
    70 	bt test_shal_2_fail
    71 	cmp/eq r3, r4
    72 	bt test_shlr_1
    73 test_shal_2_fail:	
    74 	fail test_shl_str_k
    75 	bra test_shlr_1
    76 	nop
    77 test_shal_2_input:
    78 	.long 0x29C24646
    79 test_shal_2_result:
    80 	.long 0x53848C8C
    82 test_shlr_1:
    83 	add #1, r12
    85 	mov.l test_shlr_1_input, r3
    86 	mov.l test_shlr_1_result, r4
    87 	clrt
    88 	shlr r3
    89 	bf test_shlr_1_fail
    90 	cmp/eq r3, r4
    91 	bt test_shlr_2
    92 test_shlr_1_fail:	
    93 	fail test_shl_str_k
    94 	bra test_shlr_2
    95 	nop
    96 test_shlr_1_input:
    97 	.long 0x94E12323
    98 test_shlr_1_result:
    99 	.long 0x4A709191
   101 test_shlr_2:
   102 	add #1, r12
   103 	mov.l test_shlr_2_input, r3
   104 	mov.l test_shlr_2_result, r4
   105 	sett
   106 	shlr r3
   107 	bt test_shlr_2_fail
   108 	cmp/eq r3, r4
   109 	bt test_shar_1
   110 test_shlr_2_fail:	
   111 	fail test_shl_str_k
   112 	bra test_shar_1
   113 	nop
   114 test_shlr_2_input:
   115 	.long 0x42709192
   116 test_shlr_2_result:
   117 	.long 0x213848C9
   120 test_shar_1:
   121 	add #1, r12
   123 	mov.l test_shar_1_input, r3
   124 	mov.l test_shar_1_result, r4
   125 	clrt
   126 	shar r3
   127 	bf test_shar_1_fail
   128 	cmp/eq r3, r4
   129 	bt test_shar_2
   130 test_shar_1_fail:	
   131 	fail test_shl_str_k
   132 	bra test_shar_2
   133 	nop
   134 test_shar_1_input:
   135 	.long 0x94E12323
   136 test_shar_1_result:
   137 	.long 0xCA709191
   139 test_shar_2:
   140 	add #1, r12
   141 	mov.l test_shar_2_input, r3
   142 	mov.l test_shar_2_result, r4
   143 	sett
   144 	shar r3
   145 	bt test_shar_2_fail
   146 	cmp/eq r3, r4
   147 	bt test_shl_end
   148 test_shar_2_fail:	
   149 	fail test_shl_str_k
   150 	bra test_shl_end
   151 	nop
   152 test_shar_2_input:
   153 	.long 0x42709192
   154 test_shar_2_result:
   155 	.long 0x213848C9
   159 test_shl_end:
   160 	end_test test_shl_str_k
   162 test_shl_str:
   163 	.string "SHL"
   165 .align 4	
   166 test_shl_str_k:	
   167 	.long test_shl_str
.