| 1 | # Copyright (C) 2012-2019 Free Software Foundation, Inc. |
| 2 | |
| 3 | # This program is free software; you can redistribute it and/or modify |
| 4 | # it under the terms of the GNU General Public License as published by |
| 5 | # the Free Software Foundation; either version 3 of the License, or |
| 6 | # (at your option) any later version. |
| 7 | # |
| 8 | # This program is distributed in the hope that it will be useful, |
| 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | # GNU General Public License for more details. |
| 12 | # |
| 13 | # You should have received a copy of the GNU General Public License |
| 14 | # along with this program; if not, write to the Free Software |
| 15 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. |
| 16 | |
| 17 | # |
| 18 | # Some h8300sx tests -- t07_ari3 |
| 19 | # |
| 20 | |
| 21 | proc do_t07_ari3_test {} { |
| 22 | set testname "t07_ari3.s -- h8sx arithmetic tests" |
| 23 | |
| 24 | gas_start "t07_ari3.s" "-al" |
| 25 | |
| 26 | # Check each instruction bit pattern to verify it got assembled correctly. |
| 27 | |
| 28 | set x 0 |
| 29 | expect { |
| 30 | -re ".* 7 0000 1781" { set x [expr $x+1]; exp_continue; } |
| 31 | -re ".* 8 0002 7D101780" { set x [expr $x+1]; exp_continue; } |
| 32 | -re ".* 9 0006 01776818" { set x [expr $x+1]; exp_continue; } |
| 33 | -re ".* 9 1780" { set x [expr $x+1]; exp_continue; } |
| 34 | -re ".* 10 000c 01746C18" { set x [expr $x+1]; exp_continue; } |
| 35 | -re ".* 10 1780" { set x [expr $x+1]; exp_continue; } |
| 36 | -re ".* 11 0012 01776C18" { set x [expr $x+1]; exp_continue; } |
| 37 | -re ".* 11 1780" { set x [expr $x+1]; exp_continue; } |
| 38 | -re ".* 12 0018 01756C18" { set x [expr $x+1]; exp_continue; } |
| 39 | -re ".* 12 1780" { set x [expr $x+1]; exp_continue; } |
| 40 | -re ".* 13 001e 01766C18" { set x [expr $x+1]; exp_continue; } |
| 41 | -re ".* 13 1780" { set x [expr $x+1]; exp_continue; } |
| 42 | -re ".* 14 0024 01746E18" { set x [expr $x+1]; exp_continue; } |
| 43 | -re ".* 14 12341780" { set x [expr $x+1]; exp_continue; } |
| 44 | -re ".* 15 002c 78146A28" { set x [expr $x+1]; exp_continue; } |
| 45 | -re ".* 15 12345678" { set x [expr $x+1]; exp_continue; } |
| 46 | -re ".* 15 1780" { set x [expr $x+1]; exp_continue; } |
| 47 | -re ".* 16 0036 01756E28" { set x [expr $x+1]; exp_continue; } |
| 48 | -re ".* 16 12341780" { set x [expr $x+1]; exp_continue; } |
| 49 | -re ".* 17 003e 01766E28" { set x [expr $x+1]; exp_continue; } |
| 50 | -re ".* 17 12341780" { set x [expr $x+1]; exp_continue; } |
| 51 | -re ".* 18 0046 01776E28" { set x [expr $x+1]; exp_continue; } |
| 52 | -re ".* 18 12341780" { set x [expr $x+1]; exp_continue; } |
| 53 | -re ".* 19 004e 78256A28" { set x [expr $x+1]; exp_continue; } |
| 54 | -re ".* 19 12345678" { set x [expr $x+1]; exp_continue; } |
| 55 | -re ".* 19 1780" { set x [expr $x+1]; exp_continue; } |
| 56 | -re ".* 20 0058 78266A28" { set x [expr $x+1]; exp_continue; } |
| 57 | -re ".* 20 12345678" { set x [expr $x+1]; exp_continue; } |
| 58 | -re ".* 20 1780" { set x [expr $x+1]; exp_continue; } |
| 59 | -re ".* 21 0062 78276A28" { set x [expr $x+1]; exp_continue; } |
| 60 | -re ".* 21 12345678" { set x [expr $x+1]; exp_continue; } |
| 61 | -re ".* 21 1780" { set x [expr $x+1]; exp_continue; } |
| 62 | -re ".* 22 006c 7F121780" { set x [expr $x+1]; exp_continue; } |
| 63 | -re ".* 23 0070 6A181234" { set x [expr $x+1]; exp_continue; } |
| 64 | -re ".* 23 1780" { set x [expr $x+1]; exp_continue; } |
| 65 | -re ".* 24 0076 6A381234" { set x [expr $x+1]; exp_continue; } |
| 66 | -re ".* 24 56781780" { set x [expr $x+1]; exp_continue; } |
| 67 | -re ".* 25 " { |
| 68 | if [expr $x == 37] then { |
| 69 | pass "$testname: neg.b ..." |
| 70 | } else { |
| 71 | fail "$testname: neg.b ... ($x)" |
| 72 | } |
| 73 | } |
| 74 | default { fail "$testname: neg.b ... ($x)" } |
| 75 | } |
| 76 | |
| 77 | set x 0 |
| 78 | expect { |
| 79 | -re ".* 26 007e 1791" { set x [expr $x+1]; exp_continue; } |
| 80 | -re ".* 27 0080 7D901790" { set x [expr $x+1]; exp_continue; } |
| 81 | -re ".* 28 0084 01576918" { set x [expr $x+1]; exp_continue; } |
| 82 | -re ".* 28 1790" { set x [expr $x+1]; exp_continue; } |
| 83 | -re ".* 29 008a 01546D18" { set x [expr $x+1]; exp_continue; } |
| 84 | -re ".* 29 1790" { set x [expr $x+1]; exp_continue; } |
| 85 | -re ".* 30 0090 01576D18" { set x [expr $x+1]; exp_continue; } |
| 86 | -re ".* 30 1790" { set x [expr $x+1]; exp_continue; } |
| 87 | -re ".* 31 0096 01556D18" { set x [expr $x+1]; exp_continue; } |
| 88 | -re ".* 31 1790" { set x [expr $x+1]; exp_continue; } |
| 89 | -re ".* 32 009c 01566D18" { set x [expr $x+1]; exp_continue; } |
| 90 | -re ".* 32 1790" { set x [expr $x+1]; exp_continue; } |
| 91 | -re ".* 33 00a2 01546F18" { set x [expr $x+1]; exp_continue; } |
| 92 | -re ".* 33 12341790" { set x [expr $x+1]; exp_continue; } |
| 93 | -re ".* 34 00aa 78146B28" { set x [expr $x+1]; exp_continue; } |
| 94 | -re ".* 34 12345678" { set x [expr $x+1]; exp_continue; } |
| 95 | -re ".* 34 1790" { set x [expr $x+1]; exp_continue; } |
| 96 | -re ".* 35 00b4 01556F28" { set x [expr $x+1]; exp_continue; } |
| 97 | -re ".* 35 12341790" { set x [expr $x+1]; exp_continue; } |
| 98 | -re ".* 36 00bc 01566F28" { set x [expr $x+1]; exp_continue; } |
| 99 | -re ".* 36 12341790" { set x [expr $x+1]; exp_continue; } |
| 100 | -re ".* 37 00c4 01576F28" { set x [expr $x+1]; exp_continue; } |
| 101 | -re ".* 37 12341790" { set x [expr $x+1]; exp_continue; } |
| 102 | -re ".* 38 00cc 78256B28" { set x [expr $x+1]; exp_continue; } |
| 103 | -re ".* 38 12345678" { set x [expr $x+1]; exp_continue; } |
| 104 | -re ".* 38 1790" { set x [expr $x+1]; exp_continue; } |
| 105 | -re ".* 39 00d6 78266B28" { set x [expr $x+1]; exp_continue; } |
| 106 | -re ".* 39 12345678" { set x [expr $x+1]; exp_continue; } |
| 107 | -re ".* 39 1790" { set x [expr $x+1]; exp_continue; } |
| 108 | -re ".* 40 00e0 78276B28" { set x [expr $x+1]; exp_continue; } |
| 109 | -re ".* 40 12345678" { set x [expr $x+1]; exp_continue; } |
| 110 | -re ".* 40 1790" { set x [expr $x+1]; exp_continue; } |
| 111 | -re ".* 41 00ea 6B181234" { set x [expr $x+1]; exp_continue; } |
| 112 | -re ".* 41 1790" { set x [expr $x+1]; exp_continue; } |
| 113 | -re ".* 42 00f0 6B381234" { set x [expr $x+1]; exp_continue; } |
| 114 | -re ".* 42 56781790" { set x [expr $x+1]; exp_continue; } |
| 115 | -re ".* 43 " { |
| 116 | if [expr $x == 36] then { |
| 117 | pass "$testname: neg.w ..." |
| 118 | } else { |
| 119 | fail "$testname: neg.w ... ($x)" |
| 120 | } |
| 121 | } |
| 122 | default { fail "$testname: neg.w ... ($x)" } |
| 123 | } |
| 124 | |
| 125 | set x 0 |
| 126 | expect { |
| 127 | -re ".* 44 00f8 17B1" { set x [expr $x+1]; exp_continue; } |
| 128 | -re ".* 45 00fa 01046918" { set x [expr $x+1]; exp_continue; } |
| 129 | -re ".* 45 17B0" { set x [expr $x+1]; exp_continue; } |
| 130 | -re ".* 46 0100 01076918" { set x [expr $x+1]; exp_continue; } |
| 131 | -re ".* 46 17B0" { set x [expr $x+1]; exp_continue; } |
| 132 | -re ".* 47 0106 01046D18" { set x [expr $x+1]; exp_continue; } |
| 133 | -re ".* 47 17B0" { set x [expr $x+1]; exp_continue; } |
| 134 | -re ".* 48 010c 01076D18" { set x [expr $x+1]; exp_continue; } |
| 135 | -re ".* 48 17B0" { set x [expr $x+1]; exp_continue; } |
| 136 | -re ".* 49 0112 01056D18" { set x [expr $x+1]; exp_continue; } |
| 137 | -re ".* 49 17B0" { set x [expr $x+1]; exp_continue; } |
| 138 | -re ".* 50 0118 01066D18" { set x [expr $x+1]; exp_continue; } |
| 139 | -re ".* 50 17B0" { set x [expr $x+1]; exp_continue; } |
| 140 | -re ".* 51 011e 01046F18" { set x [expr $x+1]; exp_continue; } |
| 141 | -re ".* 51 123417B0" { set x [expr $x+1]; exp_continue; } |
| 142 | -re ".* 52 0126 78946B28" { set x [expr $x+1]; exp_continue; } |
| 143 | -re ".* 52 12345678" { set x [expr $x+1]; exp_continue; } |
| 144 | -re ".* 52 17B0" { set x [expr $x+1]; exp_continue; } |
| 145 | -re ".* 53 0130 01056F28" { set x [expr $x+1]; exp_continue; } |
| 146 | -re ".* 53 123417B0" { set x [expr $x+1]; exp_continue; } |
| 147 | -re ".* 54 0138 01066F28" { set x [expr $x+1]; exp_continue; } |
| 148 | -re ".* 54 123417B0" { set x [expr $x+1]; exp_continue; } |
| 149 | -re ".* 55 0140 01076F28" { set x [expr $x+1]; exp_continue; } |
| 150 | -re ".* 55 123417B0" { set x [expr $x+1]; exp_continue; } |
| 151 | -re ".* 56 0148 78A56B28" { set x [expr $x+1]; exp_continue; } |
| 152 | -re ".* 56 12345678" { set x [expr $x+1]; exp_continue; } |
| 153 | -re ".* 56 17B0" { set x [expr $x+1]; exp_continue; } |
| 154 | -re ".* 57 0152 78A66B28" { set x [expr $x+1]; exp_continue; } |
| 155 | -re ".* 57 12345678" { set x [expr $x+1]; exp_continue; } |
| 156 | -re ".* 57 17B0" { set x [expr $x+1]; exp_continue; } |
| 157 | -re ".* 58 015c 78A76B28" { set x [expr $x+1]; exp_continue; } |
| 158 | -re ".* 58 12345678" { set x [expr $x+1]; exp_continue; } |
| 159 | -re ".* 58 17B0" { set x [expr $x+1]; exp_continue; } |
| 160 | -re ".* 59 0166 01046B08" { set x [expr $x+1]; exp_continue; } |
| 161 | -re ".* 59 123417B0" { set x [expr $x+1]; exp_continue; } |
| 162 | -re ".* 60 016e 01046B28" { set x [expr $x+1]; exp_continue; } |
| 163 | -re ".* 60 12345678" { set x [expr $x+1]; exp_continue; } |
| 164 | -re ".* 60 17B0" { set x [expr $x+1]; exp_continue; } |
| 165 | -re ".* 61 " { |
| 166 | if [expr $x == 38] then { |
| 167 | pass "$testname: neg.l ..." |
| 168 | } else { |
| 169 | fail "$testname: neg.l ... ($x)" |
| 170 | } |
| 171 | } |
| 172 | default { fail "$testname: neg.l ... ($x)" } |
| 173 | } |
| 174 | |
| 175 | set x 0 |
| 176 | expect { |
| 177 | -re ".* 62 0178 01E07B1C" { set x [expr $x+1]; exp_continue; } |
| 178 | -re ".* 63 " { |
| 179 | if [expr $x == 1] then { |
| 180 | pass "$testname: tas @er1" |
| 181 | } else { |
| 182 | fail "$testname: tas @er1 ($x)" |
| 183 | } |
| 184 | } |
| 185 | default { fail "$testname: tas @er1 ($x)" } |
| 186 | } |
| 187 | |
| 188 | set x 0 |
| 189 | expect { |
| 190 | -re ".* 64 017c 1751" { set x [expr $x+1]; exp_continue; } |
| 191 | -re ".* 65 017e 7D901750" { set x [expr $x+1]; exp_continue; } |
| 192 | -re ".* 66 0182 01576918" { set x [expr $x+1]; exp_continue; } |
| 193 | -re ".* 66 1750" { set x [expr $x+1]; exp_continue; } |
| 194 | -re ".* 67 0188 01546D18" { set x [expr $x+1]; exp_continue; } |
| 195 | -re ".* 67 1750" { set x [expr $x+1]; exp_continue; } |
| 196 | -re ".* 68 018e 01576D18" { set x [expr $x+1]; exp_continue; } |
| 197 | -re ".* 68 1750" { set x [expr $x+1]; exp_continue; } |
| 198 | -re ".* 69 0194 01556D18" { set x [expr $x+1]; exp_continue; } |
| 199 | -re ".* 69 1750" { set x [expr $x+1]; exp_continue; } |
| 200 | -re ".* 70 019a 01566D18" { set x [expr $x+1]; exp_continue; } |
| 201 | -re ".* 70 1750" { set x [expr $x+1]; exp_continue; } |
| 202 | -re ".* 71 01a0 01546F18" { set x [expr $x+1]; exp_continue; } |
| 203 | -re ".* 71 12341750" { set x [expr $x+1]; exp_continue; } |
| 204 | -re ".* 72 01a8 78146B28" { set x [expr $x+1]; exp_continue; } |
| 205 | -re ".* 72 12345678" { set x [expr $x+1]; exp_continue; } |
| 206 | -re ".* 72 1750" { set x [expr $x+1]; exp_continue; } |
| 207 | -re ".* 73 01b2 01556F28" { set x [expr $x+1]; exp_continue; } |
| 208 | -re ".* 73 12341750" { set x [expr $x+1]; exp_continue; } |
| 209 | -re ".* 74 01ba 01566F28" { set x [expr $x+1]; exp_continue; } |
| 210 | -re ".* 74 12341750" { set x [expr $x+1]; exp_continue; } |
| 211 | -re ".* 75 01c2 01576F28" { set x [expr $x+1]; exp_continue; } |
| 212 | -re ".* 75 12341750" { set x [expr $x+1]; exp_continue; } |
| 213 | -re ".* 76 01ca 78256B28" { set x [expr $x+1]; exp_continue; } |
| 214 | -re ".* 76 12345678" { set x [expr $x+1]; exp_continue; } |
| 215 | -re ".* 76 1750" { set x [expr $x+1]; exp_continue; } |
| 216 | -re ".* 77 01d4 78266B28" { set x [expr $x+1]; exp_continue; } |
| 217 | -re ".* 77 12345678" { set x [expr $x+1]; exp_continue; } |
| 218 | -re ".* 77 1750" { set x [expr $x+1]; exp_continue; } |
| 219 | -re ".* 78 01de 78276B28" { set x [expr $x+1]; exp_continue; } |
| 220 | -re ".* 78 12345678" { set x [expr $x+1]; exp_continue; } |
| 221 | -re ".* 78 1750" { set x [expr $x+1]; exp_continue; } |
| 222 | -re ".* 79 01e8 6B181234" { set x [expr $x+1]; exp_continue; } |
| 223 | -re ".* 79 1750" { set x [expr $x+1]; exp_continue; } |
| 224 | -re ".* 80 01ee 6B381234" { set x [expr $x+1]; exp_continue; } |
| 225 | -re ".* 80 56781750" { set x [expr $x+1]; exp_continue; } |
| 226 | -re ".* 81 " { |
| 227 | if [expr $x == 36] then { |
| 228 | pass "$testname: extu.w ..." |
| 229 | } else { |
| 230 | fail "$testname: extu.w ... ($x)" |
| 231 | } |
| 232 | } |
| 233 | default { fail "$testname: extu.w ... ($x)" } |
| 234 | } |
| 235 | |
| 236 | set x 0 |
| 237 | expect { |
| 238 | -re ".* 82 01f6 1771" { set x [expr $x+1]; exp_continue; } |
| 239 | -re ".* 83 01f8 01046918" { set x [expr $x+1]; exp_continue; } |
| 240 | -re ".* 83 1770" { set x [expr $x+1]; exp_continue; } |
| 241 | -re ".* 84 01fe 01076918" { set x [expr $x+1]; exp_continue; } |
| 242 | -re ".* 84 1770" { set x [expr $x+1]; exp_continue; } |
| 243 | -re ".* 85 0204 01046D18" { set x [expr $x+1]; exp_continue; } |
| 244 | -re ".* 85 1770" { set x [expr $x+1]; exp_continue; } |
| 245 | -re ".* 86 020a 01076D18" { set x [expr $x+1]; exp_continue; } |
| 246 | -re ".* 86 1770" { set x [expr $x+1]; exp_continue; } |
| 247 | -re ".* 87 0210 01056D18" { set x [expr $x+1]; exp_continue; } |
| 248 | -re ".* 87 1770" { set x [expr $x+1]; exp_continue; } |
| 249 | -re ".* 88 0216 01066D18" { set x [expr $x+1]; exp_continue; } |
| 250 | -re ".* 88 1770" { set x [expr $x+1]; exp_continue; } |
| 251 | -re ".* 89 021c 01046F18" { set x [expr $x+1]; exp_continue; } |
| 252 | -re ".* 89 12341770" { set x [expr $x+1]; exp_continue; } |
| 253 | -re ".* 90 0224 78946B28" { set x [expr $x+1]; exp_continue; } |
| 254 | -re ".* 90 12345678" { set x [expr $x+1]; exp_continue; } |
| 255 | -re ".* 90 1770" { set x [expr $x+1]; exp_continue; } |
| 256 | -re ".* 91 022e 01056F28" { set x [expr $x+1]; exp_continue; } |
| 257 | -re ".* 91 12341770" { set x [expr $x+1]; exp_continue; } |
| 258 | -re ".* 92 0236 01066F28" { set x [expr $x+1]; exp_continue; } |
| 259 | -re ".* 92 12341770" { set x [expr $x+1]; exp_continue; } |
| 260 | -re ".* 93 023e 01076F28" { set x [expr $x+1]; exp_continue; } |
| 261 | -re ".* 93 12341770" { set x [expr $x+1]; exp_continue; } |
| 262 | -re ".* 94 0246 78A56B28" { set x [expr $x+1]; exp_continue; } |
| 263 | -re ".* 94 12345678" { set x [expr $x+1]; exp_continue; } |
| 264 | -re ".* 94 1770" { set x [expr $x+1]; exp_continue; } |
| 265 | -re ".* 95 0250 78A66B28" { set x [expr $x+1]; exp_continue; } |
| 266 | -re ".* 95 12345678" { set x [expr $x+1]; exp_continue; } |
| 267 | -re ".* 95 1770" { set x [expr $x+1]; exp_continue; } |
| 268 | -re ".* 96 025a 78A76B28" { set x [expr $x+1]; exp_continue; } |
| 269 | -re ".* 96 12345678" { set x [expr $x+1]; exp_continue; } |
| 270 | -re ".* 96 1770" { set x [expr $x+1]; exp_continue; } |
| 271 | -re ".* 97 0264 01046B08" { set x [expr $x+1]; exp_continue; } |
| 272 | -re ".* 97 12341770" { set x [expr $x+1]; exp_continue; } |
| 273 | -re ".* 98 026c 01046B28" { set x [expr $x+1]; exp_continue; } |
| 274 | -re ".* 98 12345678" { set x [expr $x+1]; exp_continue; } |
| 275 | -re ".* 98 1770" { set x [expr $x+1]; exp_continue; } |
| 276 | -re ".* 99 " { |
| 277 | if [expr $x == 38] then { |
| 278 | pass "$testname: extu.l ..." |
| 279 | } else { |
| 280 | fail "$testname: extu.l ... ($x)" |
| 281 | } |
| 282 | } |
| 283 | default { fail "$testname: extu.l ... ($x)" } |
| 284 | } |
| 285 | |
| 286 | set x 0 |
| 287 | expect { |
| 288 | -re ".* 100 0276 1761" { set x [expr $x+1]; exp_continue; } |
| 289 | -re ".* 101 0278 01046918" { set x [expr $x+1]; exp_continue; } |
| 290 | -re ".* 101 1760" { set x [expr $x+1]; exp_continue; } |
| 291 | -re ".* 102 027e 01076918" { set x [expr $x+1]; exp_continue; } |
| 292 | -re ".* 102 1760" { set x [expr $x+1]; exp_continue; } |
| 293 | -re ".* 103 0284 01046D18" { set x [expr $x+1]; exp_continue; } |
| 294 | -re ".* 103 1760" { set x [expr $x+1]; exp_continue; } |
| 295 | -re ".* 104 028a 01076D18" { set x [expr $x+1]; exp_continue; } |
| 296 | -re ".* 104 1760" { set x [expr $x+1]; exp_continue; } |
| 297 | -re ".* 105 0290 01056D18" { set x [expr $x+1]; exp_continue; } |
| 298 | -re ".* 105 1760" { set x [expr $x+1]; exp_continue; } |
| 299 | -re ".* 106 0296 01066D18" { set x [expr $x+1]; exp_continue; } |
| 300 | -re ".* 106 1760" { set x [expr $x+1]; exp_continue; } |
| 301 | -re ".* 107 029c 01046F18" { set x [expr $x+1]; exp_continue; } |
| 302 | -re ".* 107 12341760" { set x [expr $x+1]; exp_continue; } |
| 303 | -re ".* 108 02a4 78946B28" { set x [expr $x+1]; exp_continue; } |
| 304 | -re ".* 108 12345678" { set x [expr $x+1]; exp_continue; } |
| 305 | -re ".* 108 1760" { set x [expr $x+1]; exp_continue; } |
| 306 | -re ".* 109 02ae 01056F28" { set x [expr $x+1]; exp_continue; } |
| 307 | -re ".* 109 12341760" { set x [expr $x+1]; exp_continue; } |
| 308 | -re ".* 110 02b6 01066F28" { set x [expr $x+1]; exp_continue; } |
| 309 | -re ".* 110 12341760" { set x [expr $x+1]; exp_continue; } |
| 310 | -re ".* 111 02be 01076F28" { set x [expr $x+1]; exp_continue; } |
| 311 | -re ".* 111 12341760" { set x [expr $x+1]; exp_continue; } |
| 312 | -re ".* 112 02c6 78A56B28" { set x [expr $x+1]; exp_continue; } |
| 313 | -re ".* 112 12345678" { set x [expr $x+1]; exp_continue; } |
| 314 | -re ".* 112 1760" { set x [expr $x+1]; exp_continue; } |
| 315 | -re ".* 113 02d0 78A66B28" { set x [expr $x+1]; exp_continue; } |
| 316 | -re ".* 113 12345678" { set x [expr $x+1]; exp_continue; } |
| 317 | -re ".* 113 1760" { set x [expr $x+1]; exp_continue; } |
| 318 | -re ".* 114 02da 78A76B28" { set x [expr $x+1]; exp_continue; } |
| 319 | -re ".* 114 12345678" { set x [expr $x+1]; exp_continue; } |
| 320 | -re ".* 114 1760" { set x [expr $x+1]; exp_continue; } |
| 321 | -re ".* 115 02e4 01046B08" { set x [expr $x+1]; exp_continue; } |
| 322 | -re ".* 115 12341760" { set x [expr $x+1]; exp_continue; } |
| 323 | -re ".* 116 02ec 01046B28" { set x [expr $x+1]; exp_continue; } |
| 324 | -re ".* 116 12345678" { set x [expr $x+1]; exp_continue; } |
| 325 | -re ".* 116 1760" { set x [expr $x+1]; exp_continue; } |
| 326 | -re ".* 117 " { |
| 327 | if [expr $x == 38] then { |
| 328 | pass "$testname: extu.l #2, ..." |
| 329 | } else { |
| 330 | fail "$testname: extu.l #2, ... ($x)" |
| 331 | } |
| 332 | } |
| 333 | default { fail "$testname: extu.l #2, ... ($x)" } |
| 334 | } |
| 335 | |
| 336 | set x 0 |
| 337 | expect { |
| 338 | -re ".* 118 02f6 17D1" { set x [expr $x+1]; exp_continue; } |
| 339 | -re ".* 119 02f8 7D9017D0" { set x [expr $x+1]; exp_continue; } |
| 340 | -re ".* 120 02fc 01576918" { set x [expr $x+1]; exp_continue; } |
| 341 | -re ".* 120 17D0" { set x [expr $x+1]; exp_continue; } |
| 342 | -re ".* 121 0302 01546D18" { set x [expr $x+1]; exp_continue; } |
| 343 | -re ".* 121 17D0" { set x [expr $x+1]; exp_continue; } |
| 344 | -re ".* 122 0308 01576D18" { set x [expr $x+1]; exp_continue; } |
| 345 | -re ".* 122 17D0" { set x [expr $x+1]; exp_continue; } |
| 346 | -re ".* 123 030e 01556D18" { set x [expr $x+1]; exp_continue; } |
| 347 | -re ".* 123 17D0" { set x [expr $x+1]; exp_continue; } |
| 348 | -re ".* 124 0314 01566D18" { set x [expr $x+1]; exp_continue; } |
| 349 | -re ".* 124 17D0" { set x [expr $x+1]; exp_continue; } |
| 350 | -re ".* 125 031a 01546F18" { set x [expr $x+1]; exp_continue; } |
| 351 | -re ".* 125 123417D0" { set x [expr $x+1]; exp_continue; } |
| 352 | -re ".* 126 0322 78146B28" { set x [expr $x+1]; exp_continue; } |
| 353 | -re ".* 126 12345678" { set x [expr $x+1]; exp_continue; } |
| 354 | -re ".* 126 17D0" { set x [expr $x+1]; exp_continue; } |
| 355 | -re ".* 127 032c 01556F28" { set x [expr $x+1]; exp_continue; } |
| 356 | -re ".* 127 123417D0" { set x [expr $x+1]; exp_continue; } |
| 357 | -re ".* 128 0334 01566F28" { set x [expr $x+1]; exp_continue; } |
| 358 | -re ".* 128 123417D0" { set x [expr $x+1]; exp_continue; } |
| 359 | -re ".* 129 033c 01576F28" { set x [expr $x+1]; exp_continue; } |
| 360 | -re ".* 129 123417D0" { set x [expr $x+1]; exp_continue; } |
| 361 | -re ".* 130 0344 78256B28" { set x [expr $x+1]; exp_continue; } |
| 362 | -re ".* 130 12345678" { set x [expr $x+1]; exp_continue; } |
| 363 | -re ".* 130 17D0" { set x [expr $x+1]; exp_continue; } |
| 364 | -re ".* 131 034e 78266B28" { set x [expr $x+1]; exp_continue; } |
| 365 | -re ".* 131 12345678" { set x [expr $x+1]; exp_continue; } |
| 366 | -re ".* 131 17D0" { set x [expr $x+1]; exp_continue; } |
| 367 | -re ".* 132 0358 78276B28" { set x [expr $x+1]; exp_continue; } |
| 368 | -re ".* 132 12345678" { set x [expr $x+1]; exp_continue; } |
| 369 | -re ".* 132 17D0" { set x [expr $x+1]; exp_continue; } |
| 370 | -re ".* 133 0362 6B181234" { set x [expr $x+1]; exp_continue; } |
| 371 | -re ".* 133 17D0" { set x [expr $x+1]; exp_continue; } |
| 372 | -re ".* 134 0368 6B381234" { set x [expr $x+1]; exp_continue; } |
| 373 | -re ".* 134 567817D0" { set x [expr $x+1]; exp_continue; } |
| 374 | -re ".* 135 " { |
| 375 | if [expr $x == 36] then { |
| 376 | pass "$testname: exts.w ..." |
| 377 | } else { |
| 378 | fail "$testname: exts.w ... ($x)" |
| 379 | } |
| 380 | } |
| 381 | default { fail "$testname: exts.w ... ($x)" } |
| 382 | } |
| 383 | |
| 384 | set x 0 |
| 385 | expect { |
| 386 | -re ".* 136 0370 17F1" { set x [expr $x+1]; exp_continue; } |
| 387 | -re ".* 137 0372 01046918" { set x [expr $x+1]; exp_continue; } |
| 388 | -re ".* 137 17F0" { set x [expr $x+1]; exp_continue; } |
| 389 | -re ".* 138 0378 01076918" { set x [expr $x+1]; exp_continue; } |
| 390 | -re ".* 138 17F0" { set x [expr $x+1]; exp_continue; } |
| 391 | -re ".* 139 037e 01046D18" { set x [expr $x+1]; exp_continue; } |
| 392 | -re ".* 139 17F0" { set x [expr $x+1]; exp_continue; } |
| 393 | -re ".* 140 0384 01076D18" { set x [expr $x+1]; exp_continue; } |
| 394 | -re ".* 140 17F0" { set x [expr $x+1]; exp_continue; } |
| 395 | -re ".* 141 038a 01056D18" { set x [expr $x+1]; exp_continue; } |
| 396 | -re ".* 141 17F0" { set x [expr $x+1]; exp_continue; } |
| 397 | -re ".* 142 0390 01066D18" { set x [expr $x+1]; exp_continue; } |
| 398 | -re ".* 142 17F0" { set x [expr $x+1]; exp_continue; } |
| 399 | -re ".* 143 0396 01046F18" { set x [expr $x+1]; exp_continue; } |
| 400 | -re ".* 143 123417F0" { set x [expr $x+1]; exp_continue; } |
| 401 | -re ".* 144 039e 78946B28" { set x [expr $x+1]; exp_continue; } |
| 402 | -re ".* 144 12345678" { set x [expr $x+1]; exp_continue; } |
| 403 | -re ".* 144 17F0" { set x [expr $x+1]; exp_continue; } |
| 404 | -re ".* 145 03a8 01056F28" { set x [expr $x+1]; exp_continue; } |
| 405 | -re ".* 145 123417F0" { set x [expr $x+1]; exp_continue; } |
| 406 | -re ".* 146 03b0 01066F28" { set x [expr $x+1]; exp_continue; } |
| 407 | -re ".* 146 123417F0" { set x [expr $x+1]; exp_continue; } |
| 408 | -re ".* 147 03b8 01076F28" { set x [expr $x+1]; exp_continue; } |
| 409 | -re ".* 147 123417F0" { set x [expr $x+1]; exp_continue; } |
| 410 | -re ".* 148 03c0 78A56B28" { set x [expr $x+1]; exp_continue; } |
| 411 | -re ".* 148 12345678" { set x [expr $x+1]; exp_continue; } |
| 412 | -re ".* 148 17F0" { set x [expr $x+1]; exp_continue; } |
| 413 | -re ".* 149 03ca 78A66B28" { set x [expr $x+1]; exp_continue; } |
| 414 | -re ".* 149 12345678" { set x [expr $x+1]; exp_continue; } |
| 415 | -re ".* 149 17F0" { set x [expr $x+1]; exp_continue; } |
| 416 | -re ".* 150 03d4 78A76B28" { set x [expr $x+1]; exp_continue; } |
| 417 | -re ".* 150 12345678" { set x [expr $x+1]; exp_continue; } |
| 418 | -re ".* 150 17F0" { set x [expr $x+1]; exp_continue; } |
| 419 | -re ".* 151 03de 01046B08" { set x [expr $x+1]; exp_continue; } |
| 420 | -re ".* 151 123417F0" { set x [expr $x+1]; exp_continue; } |
| 421 | -re ".* 152 03e6 01046B28" { set x [expr $x+1]; exp_continue; } |
| 422 | -re ".* 152 12345678" { set x [expr $x+1]; exp_continue; } |
| 423 | -re ".* 152 17F0" { set x [expr $x+1]; exp_continue; } |
| 424 | -re ".* 153 " { |
| 425 | if [expr $x == 38] then { |
| 426 | pass "$testname: exts.l ..." |
| 427 | } else { |
| 428 | fail "$testname: exts.l ... ($x)" |
| 429 | } |
| 430 | } |
| 431 | default { fail "$testname: exts.l ... ($x)" } |
| 432 | } |
| 433 | |
| 434 | set x 0 |
| 435 | expect { |
| 436 | -re ".* 154 03f0 17E1" { set x [expr $x+1]; exp_continue; } |
| 437 | -re ".* 155 03f2 01046918" { set x [expr $x+1]; exp_continue; } |
| 438 | -re ".* 155 17E0" { set x [expr $x+1]; exp_continue; } |
| 439 | -re ".* 156 03f8 01076918" { set x [expr $x+1]; exp_continue; } |
| 440 | -re ".* 156 17E0" { set x [expr $x+1]; exp_continue; } |
| 441 | -re ".* 157 03fe 01046D18" { set x [expr $x+1]; exp_continue; } |
| 442 | -re ".* 157 17E0" { set x [expr $x+1]; exp_continue; } |
| 443 | -re ".* 158 0404 01076D18" { set x [expr $x+1]; exp_continue; } |
| 444 | -re ".* 158 17E0" { set x [expr $x+1]; exp_continue; } |
| 445 | -re ".* 159 040a 01056D18" { set x [expr $x+1]; exp_continue; } |
| 446 | -re ".* 159 17E0" { set x [expr $x+1]; exp_continue; } |
| 447 | -re ".* 160 0410 01066D18" { set x [expr $x+1]; exp_continue; } |
| 448 | -re ".* 160 17E0" { set x [expr $x+1]; exp_continue; } |
| 449 | -re ".* 161 0416 01046F18" { set x [expr $x+1]; exp_continue; } |
| 450 | -re ".* 161 123417E0" { set x [expr $x+1]; exp_continue; } |
| 451 | -re ".* 162 041e 78946B28" { set x [expr $x+1]; exp_continue; } |
| 452 | -re ".* 162 12345678" { set x [expr $x+1]; exp_continue; } |
| 453 | -re ".* 162 17E0" { set x [expr $x+1]; exp_continue; } |
| 454 | -re ".* 163 0428 01056F28" { set x [expr $x+1]; exp_continue; } |
| 455 | -re ".* 163 123417E0" { set x [expr $x+1]; exp_continue; } |
| 456 | -re ".* 164 0430 01066F28" { set x [expr $x+1]; exp_continue; } |
| 457 | -re ".* 164 123417E0" { set x [expr $x+1]; exp_continue; } |
| 458 | -re ".* 165 0438 01076F28" { set x [expr $x+1]; exp_continue; } |
| 459 | -re ".* 165 123417E0" { set x [expr $x+1]; exp_continue; } |
| 460 | -re ".* 166 0440 78A56B28" { set x [expr $x+1]; exp_continue; } |
| 461 | -re ".* 166 12345678" { set x [expr $x+1]; exp_continue; } |
| 462 | -re ".* 166 17E0" { set x [expr $x+1]; exp_continue; } |
| 463 | -re ".* 167 044a 78A66B28" { set x [expr $x+1]; exp_continue; } |
| 464 | -re ".* 167 12345678" { set x [expr $x+1]; exp_continue; } |
| 465 | -re ".* 167 17E0" { set x [expr $x+1]; exp_continue; } |
| 466 | -re ".* 168 0454 78A76B28" { set x [expr $x+1]; exp_continue; } |
| 467 | -re ".* 168 12345678" { set x [expr $x+1]; exp_continue; } |
| 468 | -re ".* 168 17E0" { set x [expr $x+1]; exp_continue; } |
| 469 | -re ".* 169 045e 01046B08" { set x [expr $x+1]; exp_continue; } |
| 470 | -re ".* 169 123417E0" { set x [expr $x+1]; exp_continue; } |
| 471 | -re ".* 170 0466 01046B28" { set x [expr $x+1]; exp_continue; } |
| 472 | -re ".* 170 12345678" { set x [expr $x+1]; exp_continue; } |
| 473 | -re ".* 170 17E0" { set x [expr $x+1]; exp_continue; } |
| 474 | -re ".* 171 " { |
| 475 | if [expr $x == 38] then { |
| 476 | pass "$testname: exts.l #2, ..." |
| 477 | } else { |
| 478 | fail "$testname: exts.l #2, ... ($x)" |
| 479 | } |
| 480 | } |
| 481 | default { fail "$testname: exts.l #2, ... ($x)" } |
| 482 | } |
| 483 | |
| 484 | # This was intended to do any cleanup necessary. |
| 485 | # It kinda looks like it isn't needed, but just |
| 486 | # in case, please keep it in for now. |
| 487 | |
| 488 | gas_finish |
| 489 | |
| 490 | } |
| 491 | |
| 492 | if [istarget h8300*-*-elf] then { |
| 493 | # Test advanced h8300sx instructions. |
| 494 | do_t07_ari3_test |
| 495 | } |
| 496 | |