filename | test/sh4/bt.s |
changeset | 231:a9e61a96a885 |
author | nkeynes |
date | Fri Feb 24 21:11:58 2012 +1000 (12 years ago) |
permissions | -rw-r--r-- |
last change | Add preprocessing support to genglsl |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/test/sh4/bt.s Fri Feb 24 21:11:58 2012 +10001.3 @@ -0,0 +1,140 @@1.4 +.section .text1.5 +.include "sh4/inc.s"1.6 +!1.7 +! Test bt pcrel1.8 +! Test bt/s pcrel1.9 +1.10 +.global _test_bt1.11 +_test_bt:1.12 + start_test1.13 +1.14 +test_bt_1: ! Test branch not taken1.15 + add #1, r121.16 + clc1.17 + bt test_bt_1_b1.18 + bra test_bt_21.19 + nop1.20 +test_bt_1_b:1.21 + fail test_bt_str_k1.22 +1.23 +test_bt_2: ! Test branch taken1.24 + add #1, r121.25 + setc1.26 + bt test_bt_31.27 + fail test_bt_str_k1.28 +1.29 +test_bt_3: ! Test branch taken (backwards)1.30 + add #1, r121.31 + setc1.32 + bra test_bt_3_b1.33 + nop1.34 + fail test_bt_str_k1.35 + bra test_bt_41.36 +test_bt_3_c:1.37 + nop1.38 + bra test_bt_41.39 + nop1.40 + fail test_bt_str_k1.41 + bra test_bt_41.42 +test_bt_3_b:1.43 + nop1.44 + bt test_bt_3_c1.45 + fail test_bt_str_k1.46 + bra test_bt_41.47 + nop1.48 +test_bt_4: ! Test branch not taken w/ delay1.49 + add #1, r121.50 + clc1.51 + xor r0, r01.52 + bt/s test_bt_4_b1.53 + add #1, r01.54 + bra test_bt_4_c1.55 + nop1.56 +test_bt_4_b:1.57 + fail test_bt_str_k1.58 + bra test_bt_51.59 + nop1.60 +test_bt_4_c:1.61 + xor r1,r11.62 + add #1, r11.63 + cmp/eq r0, r11.64 +1.65 +test_bt_5: ! Test branch taken w/ delay1.66 + add #1, r121.67 + setc1.68 + xor r0,r01.69 + bt/s test_bt_5_b1.70 + add #1, r01.71 + fail test_bt_str_k1.72 + bra test_bt_61.73 +test_bt_5_b:1.74 + xor r1,r11.75 + add #1, r11.76 + cmp/eq r0,r11.77 + bt test_bt_61.78 + fail test_bt_str_k1.79 +1.80 +test_bt_6: ! Test back-branch taken w/ delay1.81 + add #1, r121.82 + setc1.83 + xor r0, r01.84 + bra test_bt_6_b1.85 + nop1.86 + fail test_bt_str_k1.87 + bra test_bt_71.88 + nop1.89 + add #1, r131.90 +test_bt_6_c:1.91 + mov #1, r11.92 + cmp/eq r0, r11.93 + bt test_bt_71.94 + fail test_bt_str_k1.95 + bra test_bt_71.96 + nop1.97 + fail test_bt_str_k1.98 + bra test_bt_71.99 +test_bt_6_b:1.100 + nop1.101 + bt/s test_bt_6_c1.102 + add #1, r01.103 + fail test_bt_str_k1.104 + bra test_bt_71.105 + nop1.106 +1.107 +test_bt_7:1.108 + add #1, r121.109 + expect_exc 0x000001A0 ! BT is slot illegal1.110 +test_bt_7_exc:1.111 + bra test_bt_7_b1.112 + bt test_bt_7_b1.113 + assert_exc_caught test_bt_str_k test_bt_7_exc1.114 + bra test_bt_81.115 + nop1.116 +test_bt_7_b:1.117 +test_bt_7_c:1.118 + fail test_bt_str_k1.119 +1.120 +test_bt_8:1.121 + add #1, r121.122 + expect_exc 0x000001A0 ! BT/S is slot illegal1.123 +test_bt_8_exc:1.124 + bra test_bt_8_b1.125 + bt/s test_bt_8_b1.126 + nop1.127 + assert_exc_caught test_bt_str_k test_bt_8_exc1.128 + bra test_bt_end1.129 + nop1.130 +test_bt_8_b:1.131 +test_bt_8_c:1.132 + fail test_bt_str_k1.133 +1.134 +test_bt_end:1.135 + end_test test_bt_str_k1.136 +1.137 +test_bt_str:1.138 + .string "BT"1.139 +1.140 +.align 41.141 +test_bt_str_k:1.142 + .long test_bt_str1.143 +1.144 \ No newline at end of file
.