1 1.1 christos # Hitachi H8 testcase 'exts.l, extu.l' 2 1.1 christos # mach(): h8300h h8300s h8sx 3 1.1 christos # as(h8300): --defsym sim_cpu=0 4 1.1 christos # as(h8300h): --defsym sim_cpu=1 5 1.1 christos # as(h8300s): --defsym sim_cpu=2 6 1.1 christos # as(h8sx): --defsym sim_cpu=3 7 1.1 christos # ld(h8300h): -m h8300helf 8 1.1 christos # ld(h8300s): -m h8300self 9 1.1 christos # ld(h8sx): -m h8300sxelf 10 1.1 christos 11 1.1 christos .include "testutils.inc" 12 1.1 christos 13 1.1 christos start 14 1.1 christos 15 1.1 christos .data 16 1.1 christos .align 4 17 1.1 christos pos: .long 0xffff0001 18 1.1 christos neg: .long 0x00008000 19 1.1 christos 20 1.1 christos pos2: .long 0xffffff01 21 1.1 christos neg2: .long 0x00000080 22 1.1 christos 23 1.1 christos .text 24 1.1 christos 25 1.1 christos exts_l_reg32_p: 26 1.1 christos set_grs_a5a5 27 1.1 christos set_ccr_zero 28 1.1 christos ;; exts.l ern32 29 1.1 christos mov.w #1, r0 30 1.1 christos exts.l er0 31 1.1 christos 32 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 33 1.1 christos test_cc_clear 34 1.1 christos 35 1.1 christos test_h_gr32 0x00000001 er0 ; result of sign extend 36 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 37 1.1 christos test_gr_a5a5 2 38 1.1 christos test_gr_a5a5 3 39 1.1 christos test_gr_a5a5 4 40 1.1 christos test_gr_a5a5 5 41 1.1 christos test_gr_a5a5 6 42 1.1 christos test_gr_a5a5 7 43 1.1 christos 44 1.1 christos exts_l_reg32_n: 45 1.1 christos set_grs_a5a5 46 1.1 christos set_ccr_zero 47 1.1 christos ;; exts.l ern32 48 1.1 christos mov.w #0xffff, r0 49 1.1 christos exts.l er0 50 1.1 christos 51 1.1 christos ;; Test ccr H=0 N=1 Z=0 V=0 C=0 52 1.1 christos test_neg_set 53 1.1 christos test_zero_clear 54 1.1 christos test_ovf_clear 55 1.1 christos test_carry_clear 56 1.1 christos 57 1.1 christos test_h_gr32 0xffffffff er0 ; result of sign extend 58 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 59 1.1 christos test_gr_a5a5 2 60 1.1 christos test_gr_a5a5 3 61 1.1 christos test_gr_a5a5 4 62 1.1 christos test_gr_a5a5 5 63 1.1 christos test_gr_a5a5 6 64 1.1 christos test_gr_a5a5 7 65 1.1 christos 66 1.1 christos extu_l_reg32_n: 67 1.1 christos set_grs_a5a5 68 1.1 christos set_ccr_zero 69 1.1 christos ;; extu.l ern32 70 1.1 christos mov.w #0xffff, r0 71 1.1 christos extu.l er0 72 1.1 christos 73 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 74 1.1 christos test_cc_clear 75 1.1 christos 76 1.1 christos test_h_gr32 0x0000ffff er0 ; result of zero extend 77 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 78 1.1 christos test_gr_a5a5 2 79 1.1 christos test_gr_a5a5 3 80 1.1 christos test_gr_a5a5 4 81 1.1 christos test_gr_a5a5 5 82 1.1 christos test_gr_a5a5 6 83 1.1 christos test_gr_a5a5 7 84 1.1 christos 85 1.1 christos .if (sim_cpu == h8sx) 86 1.1 christos exts_l_ind_p: 87 1.1 christos set_grs_a5a5 88 1.1 christos set_ccr_zero 89 1.1 christos ;; exts.l @ern32 90 1.1 christos mov.l #pos, er1 91 1.1 christos exts.l @er1 92 1.1 christos 93 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 94 1.1 christos test_cc_clear 95 1.1 christos 96 1.1 christos test_h_gr32 pos er1 ; er1 still contains target address 97 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 98 1.1 christos test_gr_a5a5 2 99 1.1 christos test_gr_a5a5 3 100 1.1 christos test_gr_a5a5 4 101 1.1 christos test_gr_a5a5 5 102 1.1 christos test_gr_a5a5 6 103 1.1 christos test_gr_a5a5 7 104 1.1 christos cmp.l #0x00000001, @pos 105 1.1 christos beq .Lslindp 106 1.1 christos fail 107 1.1 christos .Lslindp: 108 1.1 christos mov.l #0xffff0001, @pos ; Restore initial value 109 1.1 christos 110 1.1 christos exts_l_ind_n: 111 1.1 christos set_grs_a5a5 112 1.1 christos set_ccr_zero 113 1.1 christos ;; exts.l @ern32 114 1.1 christos mov.l #neg, er1 115 1.1 christos exts.l @er1 116 1.1 christos 117 1.1 christos ;; Test ccr H=0 N=1 Z=0 V=0 C=0 118 1.1 christos test_neg_set 119 1.1 christos test_zero_clear 120 1.1 christos test_ovf_clear 121 1.1 christos test_carry_clear 122 1.1 christos 123 1.1 christos test_h_gr32 neg er1 ; er1 still contains target address 124 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 125 1.1 christos test_gr_a5a5 2 126 1.1 christos test_gr_a5a5 3 127 1.1 christos test_gr_a5a5 4 128 1.1 christos test_gr_a5a5 5 129 1.1 christos test_gr_a5a5 6 130 1.1 christos test_gr_a5a5 7 131 1.1 christos cmp.l #0xffff8000, @neg 132 1.1 christos beq .Lslindn 133 1.1 christos fail 134 1.1 christos .Lslindn: 135 1.1 christos ;;; Note: leave the value as 0xffff8000, so that extu has work to do. 136 1.1 christos 137 1.1 christos extu_l_ind_n: 138 1.1 christos set_grs_a5a5 139 1.1 christos set_ccr_zero 140 1.1 christos ;; extu.l @ern32 141 1.1 christos mov.l #neg, er1 142 1.1 christos extu.l @er1 143 1.1 christos 144 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 145 1.1 christos test_cc_clear 146 1.1 christos 147 1.1 christos test_h_gr32 neg er1 ; er1 still contains target address 148 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 149 1.1 christos test_gr_a5a5 2 150 1.1 christos test_gr_a5a5 3 151 1.1 christos test_gr_a5a5 4 152 1.1 christos test_gr_a5a5 5 153 1.1 christos test_gr_a5a5 6 154 1.1 christos test_gr_a5a5 7 155 1.1 christos cmp.l #0x00008000, @neg 156 1.1 christos beq .Lulindn 157 1.1 christos fail 158 1.1 christos .Lulindn: 159 1.1 christos ;;; Note: leave the value as 0x00008000, so that extu has work to do. 160 1.1 christos 161 1.1 christos exts_l_postinc_p: 162 1.1 christos set_grs_a5a5 163 1.1 christos set_ccr_zero 164 1.1 christos ;; exts.l @ern32+ 165 1.1 christos mov.l #pos, er1 166 1.1 christos exts.l @er1+ 167 1.1 christos 168 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 169 1.1 christos test_cc_clear 170 1.1 christos 171 1.1 christos test_h_gr32 pos+4 er1 ; er1 still contains target address 172 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 173 1.1 christos test_gr_a5a5 2 174 1.1 christos test_gr_a5a5 3 175 1.1 christos test_gr_a5a5 4 176 1.1 christos test_gr_a5a5 5 177 1.1 christos test_gr_a5a5 6 178 1.1 christos test_gr_a5a5 7 179 1.1 christos cmp.l #0x00000001, @pos 180 1.1 christos beq .Lslpostincp 181 1.1 christos fail 182 1.1 christos .Lslpostincp: 183 1.1 christos mov.l #0xffff0001, @pos ; Restore initial value 184 1.1 christos 185 1.1 christos exts_l_postinc_n: 186 1.1 christos set_grs_a5a5 187 1.1 christos set_ccr_zero 188 1.1 christos ;; exts.l @ern32+ 189 1.1 christos mov.l #neg, er1 190 1.1 christos exts.l @er1+ 191 1.1 christos 192 1.1 christos ;; Test ccr H=0 N=1 Z=0 V=0 C=0 193 1.1 christos test_neg_set 194 1.1 christos test_zero_clear 195 1.1 christos test_ovf_clear 196 1.1 christos test_carry_clear 197 1.1 christos 198 1.1 christos test_h_gr32 neg+4 er1 ; er1 still contains target address 199 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 200 1.1 christos test_gr_a5a5 2 201 1.1 christos test_gr_a5a5 3 202 1.1 christos test_gr_a5a5 4 203 1.1 christos test_gr_a5a5 5 204 1.1 christos test_gr_a5a5 6 205 1.1 christos test_gr_a5a5 7 206 1.1 christos cmp.l #0xffff8000, @neg 207 1.1 christos beq .Lslpostincn 208 1.1 christos fail 209 1.1 christos .Lslpostincn: 210 1.1 christos ;;; Note: leave the value as 0xffff8000, so that extu has work to do. 211 1.1 christos 212 1.1 christos extu_l_postinc_n: 213 1.1 christos set_grs_a5a5 214 1.1 christos set_ccr_zero 215 1.1 christos ;; extu.l @ern32+ 216 1.1 christos mov.l #neg, er1 217 1.1 christos extu.l @er1+ 218 1.1 christos 219 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 220 1.1 christos test_cc_clear 221 1.1 christos 222 1.1 christos test_h_gr32 neg+4 er1 ; er1 still contains target address 223 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 224 1.1 christos test_gr_a5a5 2 225 1.1 christos test_gr_a5a5 3 226 1.1 christos test_gr_a5a5 4 227 1.1 christos test_gr_a5a5 5 228 1.1 christos test_gr_a5a5 6 229 1.1 christos test_gr_a5a5 7 230 1.1 christos cmp.l #0x00008000, @neg 231 1.1 christos beq .Lulpostincn 232 1.1 christos fail 233 1.1 christos .Lulpostincn: 234 1.1 christos ;;; Note: leave the value as 0x00008000, so that extu has work to do. 235 1.1 christos 236 1.1 christos exts_l_postdec_p: 237 1.1 christos set_grs_a5a5 238 1.1 christos set_ccr_zero 239 1.1 christos ;; exts.l @ern32- 240 1.1 christos mov.l #pos, er1 241 1.1 christos exts.l @er1- 242 1.1 christos 243 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 244 1.1 christos test_cc_clear 245 1.1 christos 246 1.1 christos test_h_gr32 pos-4 er1 ; er1 still contains target address 247 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 248 1.1 christos test_gr_a5a5 2 249 1.1 christos test_gr_a5a5 3 250 1.1 christos test_gr_a5a5 4 251 1.1 christos test_gr_a5a5 5 252 1.1 christos test_gr_a5a5 6 253 1.1 christos test_gr_a5a5 7 254 1.1 christos cmp.l #0x00000001, @pos 255 1.1 christos beq .Lslpostdecp 256 1.1 christos fail 257 1.1 christos .Lslpostdecp: 258 1.1 christos mov.l #0xffff0001, @pos ; Restore initial value 259 1.1 christos 260 1.1 christos exts_l_postdec_n: 261 1.1 christos set_grs_a5a5 262 1.1 christos set_ccr_zero 263 1.1 christos ;; exts.l @ern32- 264 1.1 christos mov.l #neg, er1 265 1.1 christos exts.l @er1- 266 1.1 christos 267 1.1 christos ;; Test ccr H=0 N=1 Z=0 V=0 C=0 268 1.1 christos test_neg_set 269 1.1 christos test_zero_clear 270 1.1 christos test_ovf_clear 271 1.1 christos test_carry_clear 272 1.1 christos 273 1.1 christos test_h_gr32 neg-4 er1 ; er1 still contains target address 274 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 275 1.1 christos test_gr_a5a5 2 276 1.1 christos test_gr_a5a5 3 277 1.1 christos test_gr_a5a5 4 278 1.1 christos test_gr_a5a5 5 279 1.1 christos test_gr_a5a5 6 280 1.1 christos test_gr_a5a5 7 281 1.1 christos cmp.l #0xffff8000, @neg 282 1.1 christos beq .Lslpostdecn 283 1.1 christos fail 284 1.1 christos .Lslpostdecn: 285 1.1 christos ;;; Note: leave the value as 0xffff8000, so that extu has work to do. 286 1.1 christos 287 1.1 christos extu_l_postdec_n: 288 1.1 christos set_grs_a5a5 289 1.1 christos set_ccr_zero 290 1.1 christos ;; extu.l @ern32- 291 1.1 christos mov.l #neg, er1 292 1.1 christos extu.l @er1- 293 1.1 christos 294 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 295 1.1 christos test_cc_clear 296 1.1 christos 297 1.1 christos test_h_gr32 neg-4 er1 ; er1 still contains target address 298 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 299 1.1 christos test_gr_a5a5 2 300 1.1 christos test_gr_a5a5 3 301 1.1 christos test_gr_a5a5 4 302 1.1 christos test_gr_a5a5 5 303 1.1 christos test_gr_a5a5 6 304 1.1 christos test_gr_a5a5 7 305 1.1 christos cmp.l #0x00008000, @neg 306 1.1 christos beq .Lulpostdecn 307 1.1 christos fail 308 1.1 christos .Lulpostdecn: 309 1.1 christos ;;; Note: leave the value as 0x00008000, so that extu has work to do. 310 1.1 christos 311 1.1 christos exts_l_preinc_p: 312 1.1 christos set_grs_a5a5 313 1.1 christos set_ccr_zero 314 1.1 christos ;; exts.l @+ern32 315 1.1 christos mov.l #pos-4, er1 316 1.1 christos exts.l @+er1 317 1.1 christos 318 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 319 1.1 christos test_cc_clear 320 1.1 christos 321 1.1 christos test_h_gr32 pos er1 ; er1 still contains target address 322 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 323 1.1 christos test_gr_a5a5 2 324 1.1 christos test_gr_a5a5 3 325 1.1 christos test_gr_a5a5 4 326 1.1 christos test_gr_a5a5 5 327 1.1 christos test_gr_a5a5 6 328 1.1 christos test_gr_a5a5 7 329 1.1 christos cmp.l #0x00000001, @pos 330 1.1 christos beq .Lslpreincp 331 1.1 christos fail 332 1.1 christos .Lslpreincp: 333 1.1 christos mov.l #0xffff0001, @pos ; Restore initial value 334 1.1 christos 335 1.1 christos exts_l_preinc_n: 336 1.1 christos set_grs_a5a5 337 1.1 christos set_ccr_zero 338 1.1 christos ;; exts.l @+ern32 339 1.1 christos mov.l #neg-4, er1 340 1.1 christos exts.l @+er1 341 1.1 christos 342 1.1 christos ;; Test ccr H=0 N=1 Z=0 V=0 C=0 343 1.1 christos test_neg_set 344 1.1 christos test_zero_clear 345 1.1 christos test_ovf_clear 346 1.1 christos test_carry_clear 347 1.1 christos 348 1.1 christos test_h_gr32 neg er1 ; er1 still contains target address 349 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 350 1.1 christos test_gr_a5a5 2 351 1.1 christos test_gr_a5a5 3 352 1.1 christos test_gr_a5a5 4 353 1.1 christos test_gr_a5a5 5 354 1.1 christos test_gr_a5a5 6 355 1.1 christos test_gr_a5a5 7 356 1.1 christos cmp.l #0xffff8000, @neg 357 1.1 christos beq .Lslpreincn 358 1.1 christos fail 359 1.1 christos .Lslpreincn: 360 1.1 christos ;;; Note: leave the value as 0xffff8000, so that extu has work to do. 361 1.1 christos 362 1.1 christos extu_l_preinc_n: 363 1.1 christos set_grs_a5a5 364 1.1 christos set_ccr_zero 365 1.1 christos ;; extu.l @+ern32 366 1.1 christos mov.l #neg-4, er1 367 1.1 christos extu.l @+er1 368 1.1 christos 369 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 370 1.1 christos test_cc_clear 371 1.1 christos 372 1.1 christos test_h_gr32 neg er1 ; er1 still contains target address 373 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 374 1.1 christos test_gr_a5a5 2 375 1.1 christos test_gr_a5a5 3 376 1.1 christos test_gr_a5a5 4 377 1.1 christos test_gr_a5a5 5 378 1.1 christos test_gr_a5a5 6 379 1.1 christos test_gr_a5a5 7 380 1.1 christos cmp.l #0x00008000, @neg 381 1.1 christos beq .Lulpreincn 382 1.1 christos fail 383 1.1 christos .Lulpreincn: 384 1.1 christos ;;; Note: leave the value as 0x00008000, so that extu has work to do. 385 1.1 christos 386 1.1 christos exts_l_predec_p: 387 1.1 christos set_grs_a5a5 388 1.1 christos set_ccr_zero 389 1.1 christos ;; exts.l @-ern32 390 1.1 christos mov.l #pos+4, er1 391 1.1 christos exts.l @-er1 392 1.1 christos 393 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 394 1.1 christos test_cc_clear 395 1.1 christos 396 1.1 christos test_h_gr32 pos er1 ; er1 still contains target address 397 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 398 1.1 christos test_gr_a5a5 2 399 1.1 christos test_gr_a5a5 3 400 1.1 christos test_gr_a5a5 4 401 1.1 christos test_gr_a5a5 5 402 1.1 christos test_gr_a5a5 6 403 1.1 christos test_gr_a5a5 7 404 1.1 christos cmp.l #0x00000001, @pos 405 1.1 christos beq .Lslpredecp 406 1.1 christos fail 407 1.1 christos .Lslpredecp: 408 1.1 christos mov.l #0xffff0001, @pos ; Restore initial value 409 1.1 christos 410 1.1 christos exts_l_predec_n: 411 1.1 christos set_grs_a5a5 412 1.1 christos set_ccr_zero 413 1.1 christos ;; exts.l @-ern32 414 1.1 christos mov.l #neg+4, er1 415 1.1 christos exts.l @-er1 416 1.1 christos 417 1.1 christos ;; Test ccr H=0 N=1 Z=0 V=0 C=0 418 1.1 christos test_neg_set 419 1.1 christos test_zero_clear 420 1.1 christos test_ovf_clear 421 1.1 christos test_carry_clear 422 1.1 christos 423 1.1 christos test_h_gr32 neg er1 ; er1 still contains target address 424 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 425 1.1 christos test_gr_a5a5 2 426 1.1 christos test_gr_a5a5 3 427 1.1 christos test_gr_a5a5 4 428 1.1 christos test_gr_a5a5 5 429 1.1 christos test_gr_a5a5 6 430 1.1 christos test_gr_a5a5 7 431 1.1 christos cmp.l #0xffff8000, @neg 432 1.1 christos beq .Lslpredecn 433 1.1 christos fail 434 1.1 christos .Lslpredecn: 435 1.1 christos ;;; Note: leave the value as 0xffff8000, so that extu has work to do. 436 1.1 christos 437 1.1 christos extu_l_predec_n: 438 1.1 christos set_grs_a5a5 439 1.1 christos set_ccr_zero 440 1.1 christos ;; extu.l @-ern32 441 1.1 christos mov.l #neg+4, er1 442 1.1 christos extu.l @-er1 443 1.1 christos 444 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 445 1.1 christos test_cc_clear 446 1.1 christos 447 1.1 christos test_h_gr32 neg er1 ; er1 still contains target address 448 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 449 1.1 christos test_gr_a5a5 2 450 1.1 christos test_gr_a5a5 3 451 1.1 christos test_gr_a5a5 4 452 1.1 christos test_gr_a5a5 5 453 1.1 christos test_gr_a5a5 6 454 1.1 christos test_gr_a5a5 7 455 1.1 christos cmp.l #0x00008000, @neg 456 1.1 christos beq .Lulpredecn 457 1.1 christos fail 458 1.1 christos .Lulpredecn: 459 1.1 christos ;;; Note: leave the value as 0x00008000, so that extu has work to do. 460 1.1 christos 461 1.1 christos extu_l_disp2_n: 462 1.1 christos set_grs_a5a5 463 1.1 christos set_ccr_zero 464 1.1 christos ;; extu.l @(dd:2, ern32) 465 1.1 christos mov.l #neg-8, er1 466 1.1 christos extu.l @(8:2, er1) 467 1.1 christos 468 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 469 1.1 christos test_cc_clear 470 1.1 christos 471 1.1 christos test_h_gr32 neg-8 er1 ; er1 still contains target address 472 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 473 1.1 christos test_gr_a5a5 2 474 1.1 christos test_gr_a5a5 3 475 1.1 christos test_gr_a5a5 4 476 1.1 christos test_gr_a5a5 5 477 1.1 christos test_gr_a5a5 6 478 1.1 christos test_gr_a5a5 7 479 1.1 christos cmp.l #0x00008000, @neg 480 1.1 christos beq .Luldisp2n 481 1.1 christos fail 482 1.1 christos .Luldisp2n: 483 1.1 christos ;;; Note: leave the value as 0x00008000, so that extu has work to do. 484 1.1 christos 485 1.1 christos extu_l_disp16_n: 486 1.1 christos set_grs_a5a5 487 1.1 christos set_ccr_zero 488 1.1 christos ;; extu.l @(dd:16, ern32) 489 1.1 christos mov.l #neg-44, er1 490 1.1 christos extu.l @(44:16, er1) 491 1.1 christos 492 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 493 1.1 christos test_cc_clear 494 1.1 christos 495 1.1 christos test_h_gr32 neg-44 er1 ; er1 still contains target address 496 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 497 1.1 christos test_gr_a5a5 2 498 1.1 christos test_gr_a5a5 3 499 1.1 christos test_gr_a5a5 4 500 1.1 christos test_gr_a5a5 5 501 1.1 christos test_gr_a5a5 6 502 1.1 christos test_gr_a5a5 7 503 1.1 christos cmp.l #0x00008000, @neg 504 1.1 christos beq .Luldisp16n 505 1.1 christos fail 506 1.1 christos .Luldisp16n: 507 1.1 christos ;;; Note: leave the value as 0x00008000, so that extu has work to do. 508 1.1 christos 509 1.1 christos extu_l_disp32_n: 510 1.1 christos set_grs_a5a5 511 1.1 christos set_ccr_zero 512 1.1 christos ;; extu.l @(dd:32, ern32) 513 1.1 christos mov.l #neg+444, er1 514 1.1 christos extu.l @(-444:32, er1) 515 1.1 christos 516 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 517 1.1 christos test_cc_clear 518 1.1 christos 519 1.1 christos test_h_gr32 neg+444 er1 ; er1 still contains target address 520 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 521 1.1 christos test_gr_a5a5 2 522 1.1 christos test_gr_a5a5 3 523 1.1 christos test_gr_a5a5 4 524 1.1 christos test_gr_a5a5 5 525 1.1 christos test_gr_a5a5 6 526 1.1 christos test_gr_a5a5 7 527 1.1 christos cmp.l #0x00008000, @neg 528 1.1 christos beq .Luldisp32n 529 1.1 christos fail 530 1.1 christos .Luldisp32n: 531 1.1 christos ;;; Note: leave the value as 0x00008000, so that extu has work to do. 532 1.1 christos 533 1.1 christos extu_l_abs16_n: 534 1.1 christos set_grs_a5a5 535 1.1 christos set_ccr_zero 536 1.1 christos ;; extu.l @aa:16 537 1.1 christos extu.l @neg:16 538 1.1 christos 539 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 540 1.1 christos test_cc_clear 541 1.1 christos 542 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 543 1.1 christos test_gr_a5a5 1 544 1.1 christos test_gr_a5a5 2 545 1.1 christos test_gr_a5a5 3 546 1.1 christos test_gr_a5a5 4 547 1.1 christos test_gr_a5a5 5 548 1.1 christos test_gr_a5a5 6 549 1.1 christos test_gr_a5a5 7 550 1.1 christos cmp.l #0x00008000, @neg 551 1.1 christos beq .Lulabs16n 552 1.1 christos fail 553 1.1 christos .Lulabs16n: 554 1.1 christos ;;; Note: leave the value as 0x00008000, so that extu has work to do. 555 1.1 christos 556 1.1 christos extu_l_abs32_n: 557 1.1 christos set_grs_a5a5 558 1.1 christos set_ccr_zero 559 1.1 christos ;; extu.l @aa:32 560 1.1 christos extu.l @neg:32 561 1.1 christos 562 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 563 1.1 christos test_cc_clear 564 1.1 christos 565 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 566 1.1 christos test_gr_a5a5 1 567 1.1 christos test_gr_a5a5 2 568 1.1 christos test_gr_a5a5 3 569 1.1 christos test_gr_a5a5 4 570 1.1 christos test_gr_a5a5 5 571 1.1 christos test_gr_a5a5 6 572 1.1 christos test_gr_a5a5 7 573 1.1 christos cmp.l #0x00008000, @neg 574 1.1 christos beq .Lulabs32n 575 1.1 christos fail 576 1.1 christos .Lulabs32n: 577 1.1 christos ;;; Note: leave the value as 0x00008000, so that extu has work to do. 578 1.1 christos 579 1.1 christos 580 1.1 christos 581 1.1 christos # 582 1.1 christos # exts #2, nn 583 1.1 christos # 584 1.1 christos 585 1.1 christos exts_l_reg32_2_p: 586 1.1 christos set_grs_a5a5 587 1.1 christos set_ccr_zero 588 1.1 christos ;; exts.l #2, ern32 589 1.1 christos mov.b #1, r0l 590 1.1 christos exts.l #2, er0 591 1.1 christos 592 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 593 1.1 christos test_cc_clear 594 1.1 christos 595 1.1 christos test_h_gr32 0x00000001 er0 ; result of sign extend 596 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 597 1.1 christos test_gr_a5a5 2 598 1.1 christos test_gr_a5a5 3 599 1.1 christos test_gr_a5a5 4 600 1.1 christos test_gr_a5a5 5 601 1.1 christos test_gr_a5a5 6 602 1.1 christos test_gr_a5a5 7 603 1.1 christos 604 1.1 christos exts_l_reg32_2_n: 605 1.1 christos set_grs_a5a5 606 1.1 christos set_ccr_zero 607 1.1 christos ;; exts.l #2, ern32 608 1.1 christos mov.b #0xff, r0l 609 1.1 christos exts.l #2, er0 610 1.1 christos 611 1.1 christos ;; Test ccr H=0 N=1 Z=0 V=0 C=0 612 1.1 christos test_neg_set 613 1.1 christos test_ovf_clear 614 1.1 christos test_zero_clear 615 1.1 christos test_carry_clear 616 1.1 christos 617 1.1 christos test_h_gr32 0xffffffff er0 ; result of sign extend 618 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 619 1.1 christos test_gr_a5a5 2 620 1.1 christos test_gr_a5a5 3 621 1.1 christos test_gr_a5a5 4 622 1.1 christos test_gr_a5a5 5 623 1.1 christos test_gr_a5a5 6 624 1.1 christos test_gr_a5a5 7 625 1.1 christos 626 1.1 christos extu_l_reg32_2_n: 627 1.1 christos set_grs_a5a5 628 1.1 christos set_ccr_zero 629 1.1 christos ;; extu.l #2, ern32 630 1.1 christos mov.b #0xff, r0l 631 1.1 christos extu.l #2, er0 632 1.1 christos 633 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 634 1.1 christos test_cc_clear 635 1.1 christos 636 1.1 christos test_h_gr32 0x000000ff er0 ; result of zero extend 637 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 638 1.1 christos test_gr_a5a5 2 639 1.1 christos test_gr_a5a5 3 640 1.1 christos test_gr_a5a5 4 641 1.1 christos test_gr_a5a5 5 642 1.1 christos test_gr_a5a5 6 643 1.1 christos test_gr_a5a5 7 644 1.1 christos 645 1.1 christos exts_l_ind_2_p: 646 1.1 christos set_grs_a5a5 647 1.1 christos set_ccr_zero 648 1.1 christos ;; exts.l #2, @ern32 649 1.1 christos mov.l #pos2, er1 650 1.1 christos exts.l #2, @er1 651 1.1 christos 652 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 653 1.1 christos test_cc_clear 654 1.1 christos 655 1.1 christos test_h_gr32 pos2 er1 ; result of sign extend 656 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 657 1.1 christos test_gr_a5a5 2 658 1.1 christos test_gr_a5a5 3 659 1.1 christos test_gr_a5a5 4 660 1.1 christos test_gr_a5a5 5 661 1.1 christos test_gr_a5a5 6 662 1.1 christos test_gr_a5a5 7 663 1.1 christos cmp.l #0x00000001, @pos2 664 1.1 christos beq .Lslindp2 665 1.1 christos fail 666 1.1 christos .Lslindp2: 667 1.1 christos mov.l #0xffffff01, @pos2 ; Restore initial value 668 1.1 christos 669 1.1 christos exts_l_ind_2_n: 670 1.1 christos set_grs_a5a5 671 1.1 christos set_ccr_zero 672 1.1 christos ;; exts.l #2, @ern32 673 1.1 christos mov.l #neg2, er1 674 1.1 christos exts.l #2, @er1 675 1.1 christos 676 1.1 christos ;; Test ccr H=0 N=1 Z=0 V=0 C=0 677 1.1 christos test_neg_set 678 1.1 christos test_ovf_clear 679 1.1 christos test_zero_clear 680 1.1 christos test_carry_clear 681 1.1 christos 682 1.1 christos test_h_gr32 neg2 er1 ; result of sign extend 683 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 684 1.1 christos test_gr_a5a5 2 685 1.1 christos test_gr_a5a5 3 686 1.1 christos test_gr_a5a5 4 687 1.1 christos test_gr_a5a5 5 688 1.1 christos test_gr_a5a5 6 689 1.1 christos test_gr_a5a5 7 690 1.1 christos cmp.l #0xffffff80, @neg2 691 1.1 christos beq .Lslindn2 692 1.1 christos fail 693 1.1 christos .Lslindn2: 694 1.1 christos ;;; Note: leave the value as 0xffffff80, so that extu has work to do. 695 1.1 christos 696 1.1 christos extu_l_ind_2_n: 697 1.1 christos set_grs_a5a5 698 1.1 christos set_ccr_zero 699 1.1 christos ;; extu.l #2, @ern32 700 1.1 christos mov.l #neg2, er1 701 1.1 christos extu.l #2, @er1 702 1.1 christos 703 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 704 1.1 christos test_cc_clear 705 1.1 christos 706 1.1 christos test_h_gr32 neg2 er1 ; result of zero extend 707 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 708 1.1 christos test_gr_a5a5 2 709 1.1 christos test_gr_a5a5 3 710 1.1 christos test_gr_a5a5 4 711 1.1 christos test_gr_a5a5 5 712 1.1 christos test_gr_a5a5 6 713 1.1 christos test_gr_a5a5 7 714 1.1 christos cmp.l #0x00000080, @neg2 715 1.1 christos beq .Lulindn2 716 1.1 christos fail 717 1.1 christos .Lulindn2: 718 1.1 christos ;;; Note: leave the value as 0x00000080, like it started out. 719 1.1 christos 720 1.1 christos exts_l_postinc_2_p: 721 1.1 christos set_grs_a5a5 722 1.1 christos set_ccr_zero 723 1.1 christos ;; exts.l #2, @ern32+ 724 1.1 christos mov.l #pos2, er1 725 1.1 christos exts.l #2, @er1+ 726 1.1 christos 727 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 728 1.1 christos test_cc_clear 729 1.1 christos 730 1.1 christos test_h_gr32 pos2+4 er1 ; result of sign extend 731 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 732 1.1 christos test_gr_a5a5 2 733 1.1 christos test_gr_a5a5 3 734 1.1 christos test_gr_a5a5 4 735 1.1 christos test_gr_a5a5 5 736 1.1 christos test_gr_a5a5 6 737 1.1 christos test_gr_a5a5 7 738 1.1 christos cmp.l #0x00000001, @pos2 739 1.1 christos beq .Lslpostincp2 740 1.1 christos fail 741 1.1 christos .Lslpostincp2: 742 1.1 christos mov.l #0xffffff01, @pos2 ; Restore initial value 743 1.1 christos 744 1.1 christos exts_l_postinc_2_n: 745 1.1 christos set_grs_a5a5 746 1.1 christos set_ccr_zero 747 1.1 christos ;; exts.l #2, @ern32+ 748 1.1 christos mov.l #neg2, er1 749 1.1 christos exts.l #2, @er1+ 750 1.1 christos 751 1.1 christos ;; Test ccr H=0 N=1 Z=0 V=0 C=0 752 1.1 christos test_neg_set 753 1.1 christos test_ovf_clear 754 1.1 christos test_zero_clear 755 1.1 christos test_carry_clear 756 1.1 christos 757 1.1 christos test_h_gr32 neg2+4 er1 ; result of sign extend 758 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 759 1.1 christos test_gr_a5a5 2 760 1.1 christos test_gr_a5a5 3 761 1.1 christos test_gr_a5a5 4 762 1.1 christos test_gr_a5a5 5 763 1.1 christos test_gr_a5a5 6 764 1.1 christos test_gr_a5a5 7 765 1.1 christos cmp.l #0xffffff80, @neg2 766 1.1 christos beq .Lslpostincn2 767 1.1 christos fail 768 1.1 christos .Lslpostincn2: 769 1.1 christos ;;; Note: leave the value as 0xffffff80, so that extu has work to do. 770 1.1 christos 771 1.1 christos extu_l_postinc_2_n: 772 1.1 christos set_grs_a5a5 773 1.1 christos set_ccr_zero 774 1.1 christos ;; extu.l #2, @ern32+ 775 1.1 christos mov.l #neg2, er1 776 1.1 christos extu.l #2, @er1+ 777 1.1 christos 778 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 779 1.1 christos test_cc_clear 780 1.1 christos 781 1.1 christos test_h_gr32 neg2+4 er1 ; result of zero extend 782 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 783 1.1 christos test_gr_a5a5 2 784 1.1 christos test_gr_a5a5 3 785 1.1 christos test_gr_a5a5 4 786 1.1 christos test_gr_a5a5 5 787 1.1 christos test_gr_a5a5 6 788 1.1 christos test_gr_a5a5 7 789 1.1 christos cmp.l #0x00000080, @neg2 790 1.1 christos beq .Lulpostincn2 791 1.1 christos fail 792 1.1 christos .Lulpostincn2: 793 1.1 christos ;;; Note: leave the value as 0x00000080, like it started out. 794 1.1 christos 795 1.1 christos exts_l_postdec_2_p: 796 1.1 christos set_grs_a5a5 797 1.1 christos set_ccr_zero 798 1.1 christos ;; exts.l #2, @ern32- 799 1.1 christos mov.l #pos2, er1 800 1.1 christos exts.l #2, @er1- 801 1.1 christos 802 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 803 1.1 christos test_cc_clear 804 1.1 christos 805 1.1 christos test_h_gr32 pos2-4 er1 ; result of sign extend 806 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 807 1.1 christos test_gr_a5a5 2 808 1.1 christos test_gr_a5a5 3 809 1.1 christos test_gr_a5a5 4 810 1.1 christos test_gr_a5a5 5 811 1.1 christos test_gr_a5a5 6 812 1.1 christos test_gr_a5a5 7 813 1.1 christos cmp.l #0x00000001, @pos2 814 1.1 christos beq .Lslpostdecp2 815 1.1 christos fail 816 1.1 christos .Lslpostdecp2: 817 1.1 christos mov.l #0xffffff01, @pos2 ; Restore initial value 818 1.1 christos 819 1.1 christos exts_l_postdec_2_n: 820 1.1 christos set_grs_a5a5 821 1.1 christos set_ccr_zero 822 1.1 christos ;; exts.l #2, @ern32- 823 1.1 christos mov.l #neg2, er1 824 1.1 christos exts.l #2, @er1- 825 1.1 christos 826 1.1 christos ;; Test ccr H=0 N=1 Z=0 V=0 C=0 827 1.1 christos test_neg_set 828 1.1 christos test_ovf_clear 829 1.1 christos test_zero_clear 830 1.1 christos test_carry_clear 831 1.1 christos 832 1.1 christos test_h_gr32 neg2-4 er1 ; result of sign extend 833 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 834 1.1 christos test_gr_a5a5 2 835 1.1 christos test_gr_a5a5 3 836 1.1 christos test_gr_a5a5 4 837 1.1 christos test_gr_a5a5 5 838 1.1 christos test_gr_a5a5 6 839 1.1 christos test_gr_a5a5 7 840 1.1 christos cmp.l #0xffffff80, @neg2 841 1.1 christos beq .Lslpostdecn2 842 1.1 christos fail 843 1.1 christos .Lslpostdecn2: 844 1.1 christos ;;; Note: leave the value as 0xffffff80, so that extu has work to do. 845 1.1 christos 846 1.1 christos extu_l_postdec_2_n: 847 1.1 christos set_grs_a5a5 848 1.1 christos set_ccr_zero 849 1.1 christos ;; extu.l #2, @ern32- 850 1.1 christos mov.l #neg2, er1 851 1.1 christos extu.l #2, @er1- 852 1.1 christos 853 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 854 1.1 christos test_cc_clear 855 1.1 christos 856 1.1 christos test_h_gr32 neg2-4 er1 ; result of zero extend 857 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 858 1.1 christos test_gr_a5a5 2 859 1.1 christos test_gr_a5a5 3 860 1.1 christos test_gr_a5a5 4 861 1.1 christos test_gr_a5a5 5 862 1.1 christos test_gr_a5a5 6 863 1.1 christos test_gr_a5a5 7 864 1.1 christos cmp.l #0x00000080, @neg2 865 1.1 christos beq .Lulpostdecn2 866 1.1 christos fail 867 1.1 christos .Lulpostdecn2: 868 1.1 christos ;;; Note: leave the value as 0x00000080, like it started out. 869 1.1 christos 870 1.1 christos exts_l_preinc_2_p: 871 1.1 christos set_grs_a5a5 872 1.1 christos set_ccr_zero 873 1.1 christos ;; exts.l #2, @+ern32 874 1.1 christos mov.l #pos2-4, er1 875 1.1 christos exts.l #2, @+er1 876 1.1 christos 877 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 878 1.1 christos test_cc_clear 879 1.1 christos 880 1.1 christos test_h_gr32 pos2 er1 ; result of sign extend 881 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 882 1.1 christos test_gr_a5a5 2 883 1.1 christos test_gr_a5a5 3 884 1.1 christos test_gr_a5a5 4 885 1.1 christos test_gr_a5a5 5 886 1.1 christos test_gr_a5a5 6 887 1.1 christos test_gr_a5a5 7 888 1.1 christos cmp.l #0x00000001, @pos2 889 1.1 christos beq .Lslpreincp2 890 1.1 christos fail 891 1.1 christos .Lslpreincp2: 892 1.1 christos mov.l #0xffffff01, @pos2 ; Restore initial value 893 1.1 christos 894 1.1 christos exts_l_preinc_2_n: 895 1.1 christos set_grs_a5a5 896 1.1 christos set_ccr_zero 897 1.1 christos ;; exts.l #2, @+ern32 898 1.1 christos mov.l #neg2-4, er1 899 1.1 christos exts.l #2, @+er1 900 1.1 christos 901 1.1 christos ;; Test ccr H=0 N=1 Z=0 V=0 C=0 902 1.1 christos test_neg_set 903 1.1 christos test_ovf_clear 904 1.1 christos test_zero_clear 905 1.1 christos test_carry_clear 906 1.1 christos 907 1.1 christos test_h_gr32 neg2 er1 ; result of sign extend 908 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 909 1.1 christos test_gr_a5a5 2 910 1.1 christos test_gr_a5a5 3 911 1.1 christos test_gr_a5a5 4 912 1.1 christos test_gr_a5a5 5 913 1.1 christos test_gr_a5a5 6 914 1.1 christos test_gr_a5a5 7 915 1.1 christos cmp.l #0xffffff80, @neg2 916 1.1 christos beq .Lslpreincn2 917 1.1 christos fail 918 1.1 christos .Lslpreincn2: 919 1.1 christos ;;; Note: leave the value as 0xffffff80, so that extu has work to do. 920 1.1 christos 921 1.1 christos extu_l_preinc_2_n: 922 1.1 christos set_grs_a5a5 923 1.1 christos set_ccr_zero 924 1.1 christos ;; extu.l #2, @+ern32 925 1.1 christos mov.l #neg2-4, er1 926 1.1 christos extu.l #2, @+er1 927 1.1 christos 928 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 929 1.1 christos test_cc_clear 930 1.1 christos 931 1.1 christos test_h_gr32 neg2 er1 ; result of zero extend 932 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 933 1.1 christos test_gr_a5a5 2 934 1.1 christos test_gr_a5a5 3 935 1.1 christos test_gr_a5a5 4 936 1.1 christos test_gr_a5a5 5 937 1.1 christos test_gr_a5a5 6 938 1.1 christos test_gr_a5a5 7 939 1.1 christos cmp.l #0x00000080, @neg2 940 1.1 christos beq .Lulpreincn2 941 1.1 christos fail 942 1.1 christos .Lulpreincn2: 943 1.1 christos ;;; Note: leave the value as 0x00000080, like it started out. 944 1.1 christos 945 1.1 christos exts_l_predec_2_p: 946 1.1 christos set_grs_a5a5 947 1.1 christos set_ccr_zero 948 1.1 christos ;; exts.l #2, @-ern32 949 1.1 christos mov.l #pos2+4, er1 950 1.1 christos exts.l #2, @-er1 951 1.1 christos 952 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 953 1.1 christos test_cc_clear 954 1.1 christos 955 1.1 christos test_h_gr32 pos2 er1 ; result of sign extend 956 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 957 1.1 christos test_gr_a5a5 2 958 1.1 christos test_gr_a5a5 3 959 1.1 christos test_gr_a5a5 4 960 1.1 christos test_gr_a5a5 5 961 1.1 christos test_gr_a5a5 6 962 1.1 christos test_gr_a5a5 7 963 1.1 christos cmp.l #0x00000001, @pos2 964 1.1 christos beq .Lslpredecp2 965 1.1 christos fail 966 1.1 christos .Lslpredecp2: 967 1.1 christos mov.l #0xffffff01, @pos2 ; Restore initial value 968 1.1 christos 969 1.1 christos exts_l_predec_2_n: 970 1.1 christos set_grs_a5a5 971 1.1 christos set_ccr_zero 972 1.1 christos ;; exts.l #2, @-ern32 973 1.1 christos mov.l #neg2+4, er1 974 1.1 christos exts.l #2, @-er1 975 1.1 christos 976 1.1 christos ;; Test ccr H=0 N=1 Z=0 V=0 C=0 977 1.1 christos test_neg_set 978 1.1 christos test_ovf_clear 979 1.1 christos test_zero_clear 980 1.1 christos test_carry_clear 981 1.1 christos 982 1.1 christos test_h_gr32 neg2 er1 ; result of sign extend 983 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 984 1.1 christos test_gr_a5a5 2 985 1.1 christos test_gr_a5a5 3 986 1.1 christos test_gr_a5a5 4 987 1.1 christos test_gr_a5a5 5 988 1.1 christos test_gr_a5a5 6 989 1.1 christos test_gr_a5a5 7 990 1.1 christos cmp.l #0xffffff80, @neg2 991 1.1 christos beq .Lslpredecn2 992 1.1 christos fail 993 1.1 christos .Lslpredecn2: 994 1.1 christos ;;; Note: leave the value as 0xffffff80, so that extu has work to do. 995 1.1 christos 996 1.1 christos extu_l_predec_2_n: 997 1.1 christos set_grs_a5a5 998 1.1 christos set_ccr_zero 999 1.1 christos ;; extu.l #2, @-ern32 1000 1.1 christos mov.l #neg2+4, er1 1001 1.1 christos extu.l #2, @-er1 1002 1.1 christos 1003 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 1004 1.1 christos test_cc_clear 1005 1.1 christos 1006 1.1 christos test_h_gr32 neg2 er1 ; result of zero extend 1007 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 1008 1.1 christos test_gr_a5a5 2 1009 1.1 christos test_gr_a5a5 3 1010 1.1 christos test_gr_a5a5 4 1011 1.1 christos test_gr_a5a5 5 1012 1.1 christos test_gr_a5a5 6 1013 1.1 christos test_gr_a5a5 7 1014 1.1 christos cmp.l #0x00000080, @neg2 1015 1.1 christos beq .Lulpredecn2 1016 1.1 christos fail 1017 1.1 christos .Lulpredecn2: 1018 1.1 christos ;;; Note: leave the value as 0x00000080, like it started out. 1019 1.1 christos 1020 1.1 christos extu_l_disp2_2_n: 1021 1.1 christos set_grs_a5a5 1022 1.1 christos set_ccr_zero 1023 1.1 christos ;; extu.l #2, @(dd:2, ern32) 1024 1.1 christos mov.l #neg2-8, er1 1025 1.1 christos extu.l #2, @(8:2, er1) 1026 1.1 christos 1027 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 1028 1.1 christos test_cc_clear 1029 1.1 christos 1030 1.1 christos test_h_gr32 neg2-8 er1 ; result of zero extend 1031 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 1032 1.1 christos test_gr_a5a5 2 1033 1.1 christos test_gr_a5a5 3 1034 1.1 christos test_gr_a5a5 4 1035 1.1 christos test_gr_a5a5 5 1036 1.1 christos test_gr_a5a5 6 1037 1.1 christos test_gr_a5a5 7 1038 1.1 christos cmp.l #0x00000080, @neg2 1039 1.1 christos beq .Luldisp2n2 1040 1.1 christos fail 1041 1.1 christos .Luldisp2n2: 1042 1.1 christos ;;; Note: leave the value as 0x00000080, like it started out. 1043 1.1 christos 1044 1.1 christos extu_l_disp16_2_n: 1045 1.1 christos set_grs_a5a5 1046 1.1 christos set_ccr_zero 1047 1.1 christos ;; extu.l #2, @(dd:16, ern32) 1048 1.1 christos mov.l #neg2-44, er1 1049 1.1 christos extu.l #2, @(44:16, er1) 1050 1.1 christos 1051 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 1052 1.1 christos test_cc_clear 1053 1.1 christos 1054 1.1 christos test_h_gr32 neg2-44 er1 ; result of zero extend 1055 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 1056 1.1 christos test_gr_a5a5 2 1057 1.1 christos test_gr_a5a5 3 1058 1.1 christos test_gr_a5a5 4 1059 1.1 christos test_gr_a5a5 5 1060 1.1 christos test_gr_a5a5 6 1061 1.1 christos test_gr_a5a5 7 1062 1.1 christos cmp.l #0x00000080, @neg2 1063 1.1 christos beq .Luldisp16n2 1064 1.1 christos fail 1065 1.1 christos .Luldisp16n2: 1066 1.1 christos ;;; Note: leave the value as 0x00000080, like it started out. 1067 1.1 christos 1068 1.1 christos extu_l_disp32_2_n: 1069 1.1 christos set_grs_a5a5 1070 1.1 christos set_ccr_zero 1071 1.1 christos ;; extu.l #2, @(dd:32, ern32) 1072 1.1 christos mov.l #neg2+444, er1 1073 1.1 christos extu.l #2, @(-444:32, er1) 1074 1.1 christos 1075 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 1076 1.1 christos test_cc_clear 1077 1.1 christos 1078 1.1 christos test_h_gr32 neg2+444 er1 ; result of zero extend 1079 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 1080 1.1 christos test_gr_a5a5 2 1081 1.1 christos test_gr_a5a5 3 1082 1.1 christos test_gr_a5a5 4 1083 1.1 christos test_gr_a5a5 5 1084 1.1 christos test_gr_a5a5 6 1085 1.1 christos test_gr_a5a5 7 1086 1.1 christos cmp.l #0x00000080, @neg2 1087 1.1 christos beq .Luldisp32n2 1088 1.1 christos fail 1089 1.1 christos .Luldisp32n2: 1090 1.1 christos ;;; Note: leave the value as 0x00000080, like it started out. 1091 1.1 christos 1092 1.1 christos extu_l_abs16_2_n: 1093 1.1 christos set_grs_a5a5 1094 1.1 christos set_ccr_zero 1095 1.1 christos ;; extu.l #2, @aa:16 1096 1.1 christos extu.l #2, @neg2:16 1097 1.1 christos 1098 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 1099 1.1 christos test_cc_clear 1100 1.1 christos 1101 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 1102 1.1 christos test_gr_a5a5 1 1103 1.1 christos test_gr_a5a5 2 1104 1.1 christos test_gr_a5a5 3 1105 1.1 christos test_gr_a5a5 4 1106 1.1 christos test_gr_a5a5 5 1107 1.1 christos test_gr_a5a5 6 1108 1.1 christos test_gr_a5a5 7 1109 1.1 christos cmp.l #0x00000080, @neg2 1110 1.1 christos beq .Lulabs16n2 1111 1.1 christos fail 1112 1.1 christos .Lulabs16n2: 1113 1.1 christos ;;; Note: leave the value as 0x00000080, like it started out. 1114 1.1 christos 1115 1.1 christos extu_l_abs32_2_n: 1116 1.1 christos set_grs_a5a5 1117 1.1 christos set_ccr_zero 1118 1.1 christos ;; extu.l #2, @aa:32 1119 1.1 christos extu.l #2, @neg2:32 1120 1.1 christos 1121 1.1 christos ;; Test ccr H=0 N=0 Z=0 V=0 C=0 1122 1.1 christos test_cc_clear 1123 1.1 christos 1124 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 1125 1.1 christos test_gr_a5a5 1 1126 1.1 christos test_gr_a5a5 2 1127 1.1 christos test_gr_a5a5 3 1128 1.1 christos test_gr_a5a5 4 1129 1.1 christos test_gr_a5a5 5 1130 1.1 christos test_gr_a5a5 6 1131 1.1 christos test_gr_a5a5 7 1132 1.1 christos cmp.l #0x00000080, @neg2 1133 1.1 christos beq .Lulabs32n2 1134 1.1 christos fail 1135 1.1 christos .Lulabs32n2: 1136 1.1 christos ;;; Note: leave the value as 0x00000080, like it started out. 1137 1.1 christos 1138 1.1 christos .endif 1139 1.1 christos 1140 1.1 christos pass 1141 1.1 christos 1142 1.1 christos exit 0 1143 1.1 christos 1144 1.1 christos 1145 1.1 christos 1146 1.1 christos 1147