1# Copyright (c) 2021-2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14definitions: [] 15tests: 16 - file-name: "fsub2.64" 17 isa: 18 title: Two address floating-point binary operation on accumulator 19 description: > 20 Perform specified floating-point binary operation on accumulator and register and store result into accumulator. 21 The results of instructions correspond IEEE-754 arithmetic rules. 22 exceptions: 23 - x_none 24 commands: 25 - file-name: "op_vs_8_nan" 26 isa: 27 instructions: 28 - sig: fsub2.64 v:in:f64 29 acc: inout:f64 30 format: [op_v_8] 31 description: Any operation with NaN results to NaN value. 32 check-type: check-acc-nan-f64 33 tags: ['irtoc_ignore'] 34 code-template: | 35 # 36 fldai.64 %s 37 fmovi.64 v0, *s 38 fsub2.64 v0 39 description: > 40 Check fsub2.64 results in NaN when acc or v0 is NaN 41 template-cases: 42 - values: 43 # NaN 44 - "0x7ff8000000000000" 45 - values: 46 # NaN representation 47 - "0xFFFFFFFFFFFFFFFF" 48 - values: 49 - "0" 50 exclude: [hasval] 51 - values: 52 - "-0.0" 53 exclude: [hasval] 54 - values: 55 - "1" 56 exclude: [hasval] 57 - values: 58 - "-1" 59 exclude: [hasval] 60 - values: 61 # +Inf 62 - "0x7ff0000000000000" 63 exclude: [hasval] 64 - values: 65 # -Inf 66 - "0xfff0000000000000" 67 exclude: [hasval] 68 - values: 69 # +max 70 - "0x7fefffffffffffff" 71 exclude: [hasval] 72 - values: 73 # -max 74 - "0xffefffffffffffff" 75 exclude: [hasval] 76 - values: 77 # +min 78 - "0x0000000000000001" 79 exclude: [hasval] 80 - values: 81 # -min 82 - "0x8000000000000001" 83 exclude: [hasval] 84 - values: 85 - "3.14159265358979323846" 86 exclude: [hasval] 87 - values: 88 - "1234567890987654321" 89 exclude: [hasval] 90 cases: 91 - values: 92 # NaN 93 - "0x7ff8000000000000" 94 - values: 95 # NaN 96 - "0xFFFFFFFFFFFFFFFF" 97 - values: 98 - "0" 99 id: hasval 100 - values: 101 - "-0.0" 102 id: hasval 103 - values: 104 - "1" 105 id: hasval 106 - values: 107 - "-1" 108 id: hasval 109 - values: 110 # +Inf 111 - "0x7ff0000000000000" 112 id: hasval 113 - values: 114 # -Inf 115 - "0xfff0000000000000" 116 id: hasval 117 - values: 118 # +max 119 - "0x7fefffffffffffff" 120 id: hasval 121 - values: 122 # -max 123 - "0xffefffffffffffff" 124 id: hasval 125 - values: 126 # +min 127 - "0x0000000000000001" 128 id: hasval 129 - values: 130 # -min 131 - "0x8000000000000001" 132 id: hasval 133 - values: 134 - "3.14159265358979323846" 135 id: hasval 136 - values: 137 - "1234567890987654321" 138 id: hasval 139 140 - file-name: "op_vs_8_pinf" 141 isa: 142 instructions: 143 - sig: fsub2.64 v:in:f64 144 acc: inout:f64 145 format: [op_v_8] 146 description: > 147 The sum of two infinities of the same sign or the difference of two infinities of opposite sign is infinity. 148 The sign of result matches the sign of accumulator value. 149 The sum or the difference of infinity and any finite value is infinity. 150 The sign of result matches the sign of infinity. 151 check-type: check-positive 152 tags: ['irtoc_ignore'] 153 code-template: | 154 # 155 fldai.64 0x7ff0000000000000 # +Inf 156 fmovi.64 v0, %s 157 # Sub of +Inf and value 158 fsub2.64 v0 159 fmovi.64 v1, %s 160 fcmpg.64 v1 161 description: Check fsub2.64 with positive Inf and various values (NaN, Inf, min, max, numbers). 162 cases: 163 - values: 164 # -Inf 165 - "0xfff0000000000000" 166 - "0x7ff0000000000000" 167 - values: 168 - "0" 169 - "0x7ff0000000000000" 170 - values: 171 - "-0.0" 172 - "0x7ff0000000000000" 173 - values: 174 - "1" 175 - "0x7ff0000000000000" 176 - values: 177 - "-1" 178 - "0x7ff0000000000000" 179 - values: 180 # +max 181 - "0x7fefffffffffffff" 182 - "0x7ff0000000000000" 183 - values: 184 # -max 185 - "0xffefffffffffffff" 186 - "0x7ff0000000000000" 187 - values: 188 # +min 189 - "0x0000000000000001" 190 - "0x7ff0000000000000" 191 - values: 192 # -min 193 - "0x8000000000000001" 194 - "0x7ff0000000000000" 195 - values: 196 - "3.14159265358979323846" 197 - "0x7ff0000000000000" 198 - values: 199 - "1234567890987654321" 200 - "0x7ff0000000000000" 201 202 - file-name: "op_vs_8_ninf" 203 isa: 204 instructions: 205 - sig: fsub2.64 v:in:f64 206 acc: inout:f64 207 format: [op_v_8] 208 description: > 209 The sum of two infinities of the same sign or the difference of two infinities of opposite sign is infinity. 210 The sign of result matches the sign of accumulator value. 211 The sum or the difference of infinity and any finite value is infinity. 212 The sign of result matches the sign of infinity. 213 check-type: check-positive 214 tags: ['irtoc_ignore'] 215 code-template: | 216 # 217 fldai.64 0xfff0000000000000 # -Inf 218 fmovi.64 v0, %s 219 # Sub of -Inf and value 220 fsub2.64 v0 221 fmovi.64 v1, %s 222 fcmpg.64 v1 223 description: Check fsub2.64 with negative Inf and various values (NaN, Inf, min, max, numbers). 224 cases: 225 - values: 226 # +Inf 227 - "0x7ff0000000000000" 228 # -Inf 229 - "0xfff0000000000000" 230 - values: 231 - "0" 232 # -Inf 233 - "0xfff0000000000000" 234 - values: 235 - "-0.0" 236 # -Inf 237 - "0xfff0000000000000" 238 - values: 239 - "1" 240 # -Inf 241 - "0xfff0000000000000" 242 - values: 243 - "-1" 244 # -Inf 245 - "0xfff0000000000000" 246 - values: 247 # +max 248 - "0x7fefffffffffffff" 249 # -Inf 250 - "0xfff0000000000000" 251 - values: 252 # -max 253 - "0xffefffffffffffff" 254 # -Inf 255 - "0xfff0000000000000" 256 - values: 257 # +min 258 - "0x0000000000000001" 259 # -Inf 260 - "0xfff0000000000000" 261 - values: 262 # -min 263 - "0x8000000000000001" 264 # -Inf 265 - "0xfff0000000000000" 266 - values: 267 - "3.14159265358979323846" 268 # -Inf 269 - "0xfff0000000000000" 270 - values: 271 - "1234567890987654321" 272 # -Inf 273 - "0xfff0000000000000" 274 275 - file-name: "op_vs_8_inf_nan" 276 isa: 277 instructions: 278 - sig: fsub2.64 v:in:f64 279 acc: inout:f64 280 format: [op_v_8] 281 description: > 282 The sum of opposite infinities or the difference of the same sign infinities is NaN. 283 check-type: check-acc-nan-f64 284 tags: ['irtoc_ignore'] 285 code-template: | 286 # 287 fldai.64 %s 288 fmovi.64 v0, %s 289 # Sub of same sign Inf-s 290 fsub2.64 v0 291 description: > 292 Check fsub2.64 with (-Inf, -Inf) and (+Inf, +Inf) is NaN. 293 cases: 294 - values: 295 - "0x7ff0000000000000" 296 - "0x7ff0000000000000" 297 - values: 298 - "0xfff0000000000000" 299 - "0xfff0000000000000" 300 301 - file-name: "op_vs_8_pzero" 302 isa: 303 instructions: 304 - sig: fsub2.64 v:in:f64 305 acc: inout:f64 306 format: [op_v_8] 307 description: > 308 The sum or the difference of infinity and any finite value is infinity. 309 The sign of result matches the sign of infinity. 310 The sum or the difference of zeros is zero. 311 Exceptions are the sum of two negative zeros and the difference of negative and positive zero - the result is negative zero. 312 check-type: check-positive 313 tags: ['irtoc_ignore'] 314 code-template: | 315 # 316 fldai.64 0.0 # 317 fmovi.64 v0, %s 318 # Sub of +0.0 and value 319 fsub2.64 v0 320 fmovi.64 v1, %s 321 fcmpg.64 v1 322 description: Check fsub2.64 with positive zero and various values (NaN, Inf, min, max, numbers). 323 cases: 324 - values: 325 - "0" 326 - "0" 327 - values: 328 - "-0.0" 329 - "0" 330 - values: 331 - "1" 332 - "-1" 333 - values: 334 - "-1" 335 - "1" 336 - values: 337 # +Inf 338 - "0x7ff0000000000000" 339 - "0xfff0000000000000" 340 - values: 341 # -Inf 342 - "0xfff0000000000000" 343 # +Inf 344 - "0x7ff0000000000000" 345 - values: 346 # +max 347 - "0x7fefffffffffffff" 348 # -max 349 - "0xffefffffffffffff" 350 - values: 351 # -max 352 - "0xffefffffffffffff" 353 # +max 354 - "0x7fefffffffffffff" 355 - values: 356 # +min 357 - "0x0000000000000001" 358 - "0x8000000000000001" 359 - values: 360 # -min 361 - "0x8000000000000001" 362 - "0x0000000000000001" 363 - values: 364 - "3.14159265358979323846" 365 - "-3.14159265358979323846" 366 - values: 367 - "-3.14159265358979323846" 368 - "3.14159265358979323846" 369 370 - file-name: "op_vs_8_nzero" 371 isa: 372 instructions: 373 - sig: fsub2.64 v:in:f64 374 acc: inout:f64 375 format: [op_v_8] 376 description: > 377 The sum or the difference of infinity and any finite value is infinity. 378 The sign of result matches the sign of infinity. 379 The sum or the difference of zeros is zero. 380 Exceptions are the sum of two negative zeros and the difference of negative and positive zero - the result is negative zero. 381 check-type: check-positive 382 tags: ['irtoc_ignore'] 383 code-template: | 384 # 385 fldai.64 -0.0 # 386 fmovi.64 v0, %s 387 # Sub of -0.0 and value 388 fsub2.64 v0 389 fmovi.64 v1, %s 390 fcmpg.64 v1 391 description: Check fsub2.64 with negative zero and various values (NaN, Inf, min, max, numbers). 392 cases: 393 # Commented because there is no direct way to compare 0.0 and -0.0 394 # - case-template: | 395 # # 396 # fldai.64 -0.0 # 397 # fmovi.64 v0, +0.0 398 # # Sub of -0.0 and +0.0 should be -0.0 399 # fsub2.64 v0 400 # fmovi.64 v1, -0.0 401 # fcmpg.64 v1 # compare as binary values, due to +0.0 == -0.0, but 0x8000000000000000 != 0x0000000000000000 402 - values: 403 - "0" 404 - "0" 405 - values: 406 - "-0.0" 407 - "0" 408 - values: 409 - "1" 410 - "-1" 411 - values: 412 - "-1" 413 - "1" 414 - values: 415 # +Inf 416 - "0x7ff0000000000000" 417 - "0xfff0000000000000" 418 - values: 419 # -Inf 420 - "0xfff0000000000000" 421 # +Inf 422 - "0x7ff0000000000000" 423 - values: 424 # +max 425 - "0x7fefffffffffffff" 426 # -max 427 - "0xffefffffffffffff" 428 - values: 429 # -max 430 - "0xffefffffffffffff" 431 # +max 432 - "0x7fefffffffffffff" 433 - values: 434 # +min 435 - "0x0000000000000001" 436 - "0x8000000000000001" 437 - values: 438 # -min 439 - "0x8000000000000001" 440 - "0x0000000000000001" 441 - values: 442 - "3.14159265358979323846" 443 - "-3.14159265358979323846" 444 - values: 445 - "-3.14159265358979323846" 446 - "3.14159265358979323846" 447 448 - file-name: "op_vs_8_pone" 449 isa: 450 instructions: 451 - sig: fsub2.64 v:in:f64 452 acc: inout:f64 453 format: [op_v_8] 454 description: > 455 The sum or the difference of infinity and any finite value is infinity. 456 The sign of result matches the sign of infinity. 457 check-type: check-positive 458 tags: ['irtoc_ignore'] 459 code-template: | 460 # 461 fldai.64 1.0 # 462 fmovi.64 v0, %s 463 # Sub of 1.0 and value 464 fsub2.64 v0 465 fmovi.64 v1, %s 466 fcmpg.64 v1 467 description: Check fsub2.64 with +1 and various values (NaN, Inf, min, max, numbers). 468 cases: 469 - values: 470 - "0" 471 - "1" 472 - values: 473 - "-0.0" 474 - "1" 475 - values: 476 - "1" 477 - "0" 478 - values: 479 - "-1" 480 - "2" 481 - values: 482 # +Inf 483 - "0x7ff0000000000000" 484 - "0xFFF0000000000000" 485 - values: 486 # -Inf 487 - "0xfff0000000000000" 488 # +Inf 489 - "0x7FF0000000000000" 490 - values: 491 # +max 492 - "0x7fefffffffffffff" 493 - "0xFFEFFFFFFFFFFFFF" 494 - values: 495 # -max 496 - "0xFFEFFFFFFFFFFFFF" 497 # +max 498 - "0x7FEFFFFFFFFFFFFF" 499 - values: 500 # +min 501 - "0x0000000000000001" 502 - "1" 503 - values: 504 # -min 505 - "0x8000000000000001" 506 - "1" 507 - values: 508 - "3.14159265358979323846" 509 - "-2.141592653589793" 510 - values: 511 - "-3.14159265358979323846" 512 - "4.14159265358979323846" 513 - values: 514 - "1234567890.987654321" 515 - "-1234567889.9876542" 516 517 - file-name: "op_vs_8_none" 518 isa: 519 instructions: 520 - sig: fsub2.64 v:in:f64 521 acc: inout:f64 522 format: [op_v_8] 523 description: > 524 The sum or the difference of infinity and any finite value is infinity. 525 The sign of result matches the sign of infinity. 526 check-type: check-positive 527 tags: ['irtoc_ignore'] 528 code-template: | 529 # 530 fldai.64 -1.0 # 531 fmovi.64 v0, %s 532 # Sub of -1.0 and value 533 fsub2.64 v0 534 fmovi.64 v1, %s 535 fcmpg.64 v1 536 description: Check fsub2.64 with -1 and various values (NaN, Inf, min, max, numbers). 537 cases: 538 - values: 539 - "0" 540 - "-1" 541 - values: 542 - "-0.0" 543 - "-1" 544 - values: 545 - "1" 546 - "-2" 547 - values: 548 - "-1" 549 - "0" 550 - values: 551 # +Inf 552 - "0x7ff0000000000000" 553 - "0xfff0000000000000" 554 - values: 555 # -Inf 556 - "0xfff0000000000000" 557 # -Inf 558 - "0x7FF0000000000000" 559 - values: 560 # +max 561 - "0x7fefffffffffffff" 562 - "0xFFEFFFFFFFFFFFFF" 563 - values: 564 # -max 565 - "0xFFEFFFFFFFFFFFFF" 566 - "0x7FEFFFFFFFFFFFFF" 567 - values: 568 # +min 569 - "0x0000000000000001" 570 - "-1" 571 - values: 572 # -min 573 - "0x8000000000000001" 574 - "-1" 575 - values: 576 - "3.14159265358979323846" 577 - "-4.14159265358979323846" 578 - values: 579 - "-3.14159265358979323846" 580 - "2.14159265358979323846" 581 - values: 582 - "1234567890.987654321" 583 - "-1234567891.9876542" 584 - file-name: "op_vs_8" 585 isa: 586 instructions: 587 - sig: fsub2.64 v:in:f64 588 acc: inout:f64 589 format: [op_v_8] 590 description: > 591 The sum or the difference of zeros is zero. 592 Exceptions are the sum of two negative zeros and the difference of negative and positive zero - the result is negative zero. 593 check-type: check-positive 594 tags: ['irtoc_ignore'] 595 code-template: | 596 # 597 fldai.64 %s # 598 fmovi.64 v0, %s 599 # Sub of -1.0 and value 600 fsub2.64 v0 601 fmovi.64 v1, %s 602 fcmpg.64 v1 603 description: Check fsub2.64 with various values. 604 cases: 605 - values: 606 - "0.0" 607 - "0.0" 608 - "0.0" 609 - values: 610 - "0.0" 611 - "-0.0" 612 - "0.0" 613 - values: 614 - "-0.0" 615 - "0.0" 616 - "0.0" 617 - values: 618 - "-0.0" 619 - "-0.0" 620 - "0.0" 621 - values: 622 - "1.0" 623 - "-1.0" 624 - "2.0" 625 - values: 626 - "1.0" 627 - "1.0" 628 - "0.0" 629 - values: 630 - "-1.0" 631 - "1.0" 632 - "-2.0" 633 - values: 634 - "1.0e100" 635 - "1.0e100" 636 - "0.0" 637 - values: 638 - "1.0e100" 639 - "-1.0e100" 640 - "2.0e100" 641 - values: 642 - "1.0e+100" 643 - "1.0e-100" 644 - "1.0e+100" 645 - values: 646 - "-1.0e100" 647 - "1.0e100" 648 - "-2.0e100" 649 - values: 650 - "-1.0e-100" 651 - "1.0e-100" 652 - "-2.0e-100" 653 - values: 654 - "-1.0e+100" 655 - "-1.0e-100" 656 - "-1.0e+100" 657 - values: 658 - "3.14159265358979323846" 659 - "-3.14159265358979323846" 660 - "6.283185307179586" 661 - values: 662 - "3.14159265358979323846e200" 663 - "-3.14159265358979323846e200" 664 - "6.283185307179587e200" 665# - values: 666# # TODO add test cases for maximal and minimal FP value in decimal scientific literal 667 - file-name: "op_vs_8_max" 668 isa: 669 instructions: 670 - sig: fsub2.64 v:in:f64 671 acc: inout:f64 672 format: [op_v_8] 673 check-type: check-positive 674 tags: ['irtoc_ignore'] 675 code-template: | 676 # 677 fldai.64 %s 678 fmovi.64 v0, %s 679 # Sub of two values 680 fsub2.64 v0 681 fmovi.64 v1, %s 682 fcmpg.64 v1 683 description: Check fsub2.64 with various max values. 684 cases: 685 - values: 686 # +max 687 - "0x7fefffffffffffff" 688 # +max 689 - "0x7fefffffffffffff" 690 - "0" 691 - values: 692 # -max 693 - "0xFFEFFFFFFFFFFFFF" 694 # -max 695 - "0xFFEFFFFFFFFFFFFF" 696 - "0" 697 - values: 698 # +max 699 - "0x7fefffffffffffff" 700 # -max 701 - "0xFFEFFFFFFFFFFFFF" 702 # +Inf 703 - "0x7ff0000000000000" 704 705 - values: 706 # +max 707 - "0x7fefffffffffffff" 708 - "1" 709 # +max 710 - "0x7fefffffffffffff" 711 712 - values: 713 # +max 714 - "0x7fefffffffffffff" 715 - "-1" 716 # +max 717 - "0x7fefffffffffffff" 718 - values: 719 # -max 720 - "0xFFEFFFFFFFFFFFFF" 721 - "1" 722 # -max 723 - "0xFFEFFFFFFFFFFFFF" 724 - values: 725 # -max 726 - "0xFFEFFFFFFFFFFFFF" 727 - "-1" 728 # -max 729 - "0xFFEFFFFFFFFFFFFF" 730 731 - file-name: "incorrect_reg" 732 isa: 733 instructions: 734 - sig: fsub2.64 v:in:f64 735 acc: inout:f64 736 format: [op_v_8] 737 check-type: none 738 runner-options: [compile-failure] 739 description: Check fsub2.64 with incorrect register numbers. 740 code-template: | 741 # 742 fsub2.64 %s 743 cases: 744 - values: [v256] 745 - values: [v65535] 746 - values: [a0] 747 - values: [a255] 748 - values: ['null'] 749 - values: [0] 750 - values: [1.1] 751 - values: ['2.2'] 752 753 - file-name: "reg_number" 754 isa: 755 instructions: 756 - sig: fsub2.64 v:in:f64 757 acc: inout:f64 758 format: [op_v_8] 759 check-type: none 760 runner-options: [compile-only] 761 description: Check fsub2.64 with correct register numbers. 762 code-template: | 763 # 764 fsub2.64 %s 765 cases: 766 - values: [v0] 767 - values: [v16] 768 - values: [v128] 769 - values: [v255] 770 771 772 - file-name: "calc" 773 isa: 774 instructions: 775 - sig: fsub2.64 v:in:f64 776 acc: inout:f64 777 format: [op_v_8] 778 check-type: check-positive 779 code-template: | 780 # 781 fldai.64 %s # 782 fmovi.64 v0, %s 783 fsub2.64 v0 784 fmovi.64 v1, %s 785 fcmpg.64 v1 786 description: Check fsub2.64 with various values. 787 tags: ['tsan', 'irtoc_ignore'] 788 cases: 789 - values: 790 - "-0.05673353446563578" 791 - "0.4165127778130051" 792 - "-0.4732463122786409" 793 - values: 794 - "-0.2607618506052821" 795 - "0.0750908448423836" 796 - "-0.3358526954476657" 797 - values: 798 - "-0.13674848473769208" 799 - "-0.37436759865021485" 800 - "0.23761911391252277" 801 - values: 802 - "0.12866094924106286" 803 - "0.4168653788046697" 804 - "-0.2882044295636068" 805 - values: 806 - "0.37966868911751406" 807 - "0.4990010036832817" 808 - "-0.11933231456576765" 809 - values: 810 - "0.18564113444569652" 811 - "0.21971091949324728" 812 - "-0.03406978504755076" 813 - values: 814 - "0.4065300094565073" 815 - "0.11364008159171668" 816 - "0.2928899278647906" 817 - values: 818 - "-0.1010416144789762" 819 - "-0.11197993505013781" 820 - "0.01093832057116162" 821 - values: 822 - "0.3251595799516377" 823 - "-0.09596574355268472" 824 - "0.4211253235043224" 825 - values: 826 - "0.23107785598444763" 827 - "-0.2677659750461253" 828 - "0.49884383103057295" 829 - values: 830 - "2.2049776702532387e-20" 831 - "-8.69113551313747e-21" 832 - "3.0740912215669856e-20" 833 - values: 834 - "2.4603309829023933e10" 835 - "-3.531811165213039e9" 836 - "2.8135120994236973e10" 837 - values: 838 - "3.76992083887569e67" 839 - "4.90327629307566e67" 840 - "-1.1333554541999702e67" 841 - values: 842 - "-4.120943556081973e-97" 843 - "4.725011085672193e-97" 844 - "-8.845954641754166e-97" 845 - values: 846 - "-1.27679146268046e52" 847 - "-4.561463650315357e52" 848 - "3.284672187634897e52" 849 - values: 850 - "2.650888284901465e34" 851 - "7.5105380484769e34" 852 - "-4.859649763575435e34" 853 - values: 854 - "1.651217057264739e43" 855 - "-2.0157034930418428e42" 856 - "1.8527874065689232e43" 857 - values: 858 - "-1.7009917118749317e40" 859 - "7.921976453192359e39" 860 - "-2.4931893571941675e40" 861 - values: 862 - "-2.6073128733459994e80" 863 - "-3.133709440359744e79" 864 - "-2.293941929310025e80" 865 - values: 866 - "-1.644446855906727e-73" 867 - "4.45120026009637e-73" 868 - "-6.095647116003097e-73" 869 870 - file-name: "type" 871 isa: 872 instructions: 873 - sig: fsub2.64 v:in:f64 874 acc: inout:f64 875 format: [op_v_8] 876 verification: 877 - acc_type 878 - v1_type 879 tags: ['verifier'] 880 runner-options: ['verifier-failure', 'verifier-config'] 881 header-template: [] 882 code-template: | 883 # 884 .record A {} 885 .record B {} 886 .record panda.String <external> 887 .record panda.Object <external> 888 .function i32 main() { 889 %s 890 *s 891 fsub2.64 v0 892 check-type: exit-positive 893 description: Check 'fsub2.64' with incorrect register and accumulator type. 894 template-cases: 895 - values: 896 - movi v0, 0 897 - values: 898 - movi.64 v0, 0 899 - values: 900 - fmovi v0, 0 901 bugid: ['7315'] 902 - values: 903 - fmovi.64 v0, 0 904 exclude: [val] 905 - values: 906 - | 907 # 908 lda.type B 909 sta.obj v0 910 - values: 911 - | 912 # 913 lda.type B[] 914 sta.obj v0 915 - values: 916 - | 917 # 918 lda.type panda.String 919 sta.obj v0 920 - values: 921 - | 922 # 923 lda.str "string" 924 sta.obj v0 925 - values: 926 - | 927 # 928 movi v0, 10 929 newarr v0, v0, i32[] 930 - values: 931 - mov.null v0 932 933 cases: 934 - values: 935 - ldai 0 936 - values: 937 - ldai.64 0 938 - values: 939 - fldai 0 940 bugid: ['7315'] 941 - values: 942 - fldai.64 0 943 id: val 944 - values: 945 - | 946 # 947 lda.type A 948 - values: 949 - | 950 # 951 lda.type A[] 952 - values: 953 - | 954 # 955 lda.type panda.String 956 - values: 957 - | 958 # 959 lda.str "string" 960 - values: 961 - | 962 # 963 movi v1, 10 964 newarr v1, v1, f64[] 965 lda.obj v1 966 - values: 967 - lda.null 968 969 - file-name: uninitialized_regs 970 isa: 971 instructions: 972 - sig: fsub2.64 v:in:f64 973 acc: inout:f64 974 format: [op_v_8] 975 description: Check 'fsub2.64' with uninitialized register and accumulator. 976 tags: ['verifier'] 977 runner-options: ['verifier-failure', 'verifier-config'] 978 code-template: | 979 # 980 %s 981 *s 982 fsub2.64 %s 983 check-type: exit-positive 984 template-cases: 985 - values: 986 - '' 987 - v0 988 - values: 989 - fmovi.64 v0, 0 990 - v0 991 exclude: [init] 992 - values: 993 - '' 994 - v7 995 - values: 996 - '' 997 - v15 998 - values: 999 - fmovi.64 v15, 0 1000 - v15 1001 exclude: [init] 1002 - values: 1003 - '' 1004 - v128 1005 - values: 1006 - fmovi.64 v128, 0 1007 - v128 1008 exclude: [init] 1009 - values: 1010 - '' 1011 - v255 1012 - values: 1013 - fmovi.64 v255, 0 1014 - v255 1015 exclude: [init] 1016 cases: 1017 - values: 1018 - '' 1019 - values: 1020 - fldai.64 0 1021 id: init 1022