• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: "fadd2.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: fadd2.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          # Sum of any value and NaN is NaN
39              fadd2.64 v0
40        description: >
41          Check fadd2.64 results in NaN when acc or v0 is NaN
42        template-cases:
43          - values:
44              # NaN
45              - "0x7ff8000000000000"
46          - values:
47              # NaN representation
48              - "0xFFFFFFFFFFFFFFFF"
49          - values:
50              # Positive zero
51              # +0.0d
52              - "0"
53            exclude: [hasval]
54          - values:
55              # Negative zero
56              # -0.0d
57              - "0x8000000000000000"
58            exclude: [hasval]
59          - values:
60              # 1d
61              - "0x3ff0000000000000"
62            exclude: [hasval]
63          - values:
64              # -1d
65              - "0xbff0000000000000"
66            exclude: [hasval]
67          - values:
68              # +Inf
69              - "0x7ff0000000000000"
70            exclude: [hasval]
71          - values:
72              # -Inf
73              - "0xfff0000000000000"
74            exclude: [hasval]
75          - values:
76              # +max
77              - "0x7fefffffffffffff"
78            exclude: [hasval]
79          - values:
80              # -max
81              - "0xffefffffffffffff"
82            exclude: [hasval]
83          - values:
84              # +min
85              - "0x0000000000000001"
86            exclude: [hasval]
87          - values:
88              # -min
89              - "0x8000000000000001"
90            exclude: [hasval]
91          - values:
92              # Some FP value
93              - "9.9e-300"
94            exclude: [hasval]
95          - values:
96              # Some FP value
97              - "-0.00000000000000001"
98            exclude: [hasval]
99        cases:
100          - values:
101              # NaN
102              - "0x7ff8000000000000"
103          - values:
104              # NaN representation
105              - "0xFFFFFFFFFFFFFFFF"
106          - values:
107              # Positive zero
108              # +0.0d
109              - "0"
110            id: hasval
111          - values:
112              # Negative zero
113              # -0.0d
114              - "0x8000000000000000"
115            id: hasval
116          - values:
117              # 1d
118              - "0x3ff0000000000000"
119            id: hasval
120          - values:
121              # -1d
122              - "0xbff0000000000000"
123            id: hasval
124          - values:
125              # +Inf
126              - "0x7ff0000000000000"
127            id: hasval
128          - values:
129              # -Inf
130              - "0xfff0000000000000"
131            id: hasval
132          - values:
133              # +max
134              - "0x7fefffffffffffff"
135            id: hasval
136          - values:
137              # -max
138              - "0xffefffffffffffff"
139            id: hasval
140          - values:
141              # +min
142              - "0x0000000000000001"
143            id: hasval
144          - values:
145              # -min
146              - "0x8000000000000001"
147            id: hasval
148          - values:
149              # Some FP value
150              - "9.9e-300"
151            id: hasval
152          - values:
153              # Some FP value
154              - "-0.00000000000000001"
155            id: hasval
156
157      - file-name: "op_vs_8_pinf"
158        isa:
159          instructions:
160            - sig: fadd2.64 v:in:f64
161              acc: inout:f64
162              format: [op_v_8]
163          description: >
164            The sum of two infinities of the same sign or the difference of two infinities of opposite sign is infinity.
165            The sign of result matches the sign of accumulator value.
166            The sum or the difference of infinity and any finite value is infinity.
167            The sign of result matches the sign of infinity.
168        tags: ['irtoc_ignore']
169        check-type: check-positive
170        code-template: |
171            #
172                fldai.64 0x7ff0000000000000 # +Inf
173                fmovi.64 v0, %s
174            # Sum of +Inf and value
175                fadd2.64 v0
176                fmovi.64 v1, %s
177                fcmpg.64 v1
178        description: Check fadd2.64 with positive Inf and various values (Inf, min, max, numbers).
179        cases:
180          - values:
181              # +0.0d
182              - "0"
183              - "0x7ff0000000000000"
184          - values:
185              # -0.0d
186              - "0x8000000000000000"
187              - "0x7ff0000000000000"
188          - values:
189              # 1d
190              - "0x3ff0000000000000"
191              - "0x7ff0000000000000"
192          - values:
193              # -1d
194              - "0xbff0000000000000"
195              - "0x7ff0000000000000"
196          - values:
197              # +Inf
198              - "0x7ff0000000000000"
199              - "0x7ff0000000000000"
200          - values:
201              # +max
202              - "0x7fefffffffffffff"
203              - "0x7ff0000000000000"
204          - values:
205              # -max
206              - "0xffefffffffffffff"
207              - "0x7ff0000000000000"
208          - values:
209              # +min
210              - "0x0000000000000001"
211              - "0x7ff0000000000000"
212          - values:
213              # -min
214              - "0x8000000000000001"
215              - "0x7ff0000000000000"
216          - values:
217              # Some FP value, 3.14159265358979323846
218              - "0x400921fb54442d18"
219              - "0x7ff0000000000000"
220          - values:
221              - "1234567890987654321"
222              - "0x7ff0000000000000"
223
224      - file-name: "op_vs_8_ninf"
225        isa:
226          instructions:
227            - sig: fadd2.64 v:in:f64
228              acc: inout:f64
229              format: [op_v_8]
230          description: >
231            The sum of two infinities of the same sign or the difference of two infinities of opposite sign is infinity.
232            The sign of result matches the sign of accumulator value.
233            The sum or the difference of infinity and any finite value is infinity.
234            The sign of result matches the sign of infinity.
235        check-type: check-positive
236        tags: ['irtoc_ignore']
237        # TODO update template to use Hexadecimal value for -Inf
238        code-template: |
239            #
240                fldai.64 0xfff0000000000000 # -Inf
241                fmovi.64 v0, %s
242            # Sum of -Inf and value
243                fadd2.64 v0
244                fmovi.64 v1, %s
245                fcmpg.64 v1
246        description: Check fadd2.64 with negative Inf and various values (Inf, min, max, numbers).
247        cases:
248            - values:
249                # +0.0d
250                - "0"
251                # -Inf
252                - "0xfff0000000000000"
253            - values:
254                # -0.0d
255                - "0x8000000000000000"
256                # -Inf
257                - "0xfff0000000000000"
258            - values:
259                # 1d
260                - "0x3ff0000000000000"
261                # -Inf
262                - "0xfff0000000000000"
263            - values:
264                # -1d
265                - "0xbff0000000000000"
266                # -Inf
267                - "0xfff0000000000000"
268            - values:
269                # -Inf
270                - "0xfff0000000000000"
271                # -Inf
272                - "0xfff0000000000000"
273            - values:
274                # +max
275                - "0x7fefffffffffffff"
276                # -Inf
277                - "0xfff0000000000000"
278            - values:
279                # -max
280                - "0xffefffffffffffff"
281                # -Inf
282                - "0xfff0000000000000"
283            - values:
284                # +min
285                - "0x0000000000000001"
286                # -Inf
287                - "0xfff0000000000000"
288            - values:
289                # -min
290                - "0x8000000000000001"
291                # -Inf
292                - "0xfff0000000000000"
293            - values:
294                # Some FP value, 3.14159265358979323846
295                - "0x400921fb54442d18"
296                # -Inf
297                - "0xfff0000000000000"
298            - values:
299                - "1234567890987654321"
300                # -Inf
301                - "0xfff0000000000000"
302
303      - file-name: "op_vs_8_inf_nan"
304        isa:
305          instructions:
306            - sig: fadd2.64 v:in:f64
307              acc: inout:f64
308              format: [op_v_8]
309          description: >
310            The sum of opposite infinities or the difference of the same sign infinities is NaN.
311        check-type: check-acc-nan-f64
312        tags: ['irtoc_ignore']
313        code-template: |
314            #
315                fldai.64 %s
316                fmovi.64 v0, %s
317            # Sum of opposite Inf-s
318                fadd2.64 v0
319        description: Check fadd2.64 with +Inf and -Inf is NaN.
320        cases:
321          - values:
322              - "0x7ff0000000000000"
323              - "0xfff0000000000000"
324          - values:
325              - "0xfff0000000000000"
326              - "0x7ff0000000000000"
327
328      - file-name: "op_vs_8_pzero"
329        isa:
330          instructions:
331            - sig: fadd2.64 v:in:f64
332              acc: inout:f64
333              format: [op_v_8]
334          description: >
335              The sum or the difference of infinity and any finite value is infinity.
336              The sign of result matches the sign of infinity.
337              The sum or the difference of zeros is zero.
338              Exceptions are the sum of two negative zeros and the difference of negative and positive zero - the result is negative zero.
339        check-type: check-positive
340        tags: ['irtoc_ignore']
341        description: Check fadd2.64 with positive zero and various values (Inf, min, max, numbers).
342        code-template: |
343            #
344                fldai.64 0.0 #
345                fmovi.64 v0, %s
346                mov.64 v1, v0
347            # Sum of +0.0 and value
348                fadd2.64 v0
349                fcmpg.64 v1
350        cases:
351            - values:
352                # +0.0d
353                - "0"
354            - values:
355                # -0.0d
356                - "0x8000000000000000"
357            - values:
358                # 1d
359                - "1"
360            - values:
361                # -1d
362                - "-1"
363            - values:
364                # +Inf
365                - "0x7ff0000000000000"
366            - values:
367                # -Inf
368                - "0xfff0000000000000"
369            - values:
370                # +max
371                - "0x7fefffffffffffff"
372            - values:
373                # -max
374                - "0xffefffffffffffff"
375            - values:
376                # +min
377                - "0x0000000000000001"
378
379            - values:
380                # -min
381                - "0x8000000000000001"
382            - values:
383                - "3.14159265358979323846"
384            - values:
385                - "1234567890987654321"
386
387      - file-name: "op_vs_8_nzero"
388        isa:
389          instructions:
390            - sig: fadd2.64 v:in:f64
391              acc: inout:f64
392              format: [op_v_8]
393          description: >
394              The sum or the difference of infinity and any finite value is infinity.
395              The sign of result matches the sign of infinity.
396              The sum or the difference of zeros is zero.
397              Exceptions are the sum of two negative zeros and the difference of negative and positive zero - the result is negative zero.
398        check-type: check-positive
399        tags: ['irtoc_ignore']
400        description: Check fadd2.64 with negative zero and various values (Inf, min, max, numbers).
401        code-template: |
402            #
403                fldai.64 -0.0 #
404                fmovi.64 v0, %s
405                mov.64 v1, v0
406            # Sum of -0.0 and value
407                fadd2.64 v0
408                fcmpg.64 v1
409        cases:
410          # Comment this case, since it is incorrect.
411          # It seems the better way to compare -0.0 and -0.0 is to convert it to -Inf
412          # - case-template: |
413          #     #
414          #         fldai.64 -0.0 #
415          #         fmovi.64 v0, -0.0
416          #     # Sum of -0.0 and -0.0 should be -0.0
417          #         fadd2.64 v0
418          #         fmovi.64 v1, -0.0
419          #         cmp.64 v1 # compare as binary values, due to +0.0 == -0.0, but 0x8000000000000000 != 0x0000000000000000
420          - values:
421              # 1d
422              - "1"
423          - values:
424              - "-1"
425          - values:
426              # +Inf
427              - "0x7ff0000000000000"
428          - values:
429              # -Inf
430              - "0xfff0000000000000"
431          - values:
432              # +max
433              - "0x7fefffffffffffff"
434          - values:
435              # -max
436              - "0xffefffffffffffff"
437          - values:
438              # +min
439              - "0x0000000000000001"
440          - values:
441              # -min
442              - "0x8000000000000001"
443          - values:
444              - "3.14159265358979323846"
445          - values:
446              - "1234567890987654321"
447
448      - file-name: "op_vs_8_pone"
449        isa:
450          instructions:
451            - sig: fadd2.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        tags: ['irtoc_ignore']
458        check-type: check-positive
459        description: Check fadd2.64 with +1 and various values (Inf, min, max, numbers).
460        code-template: |
461            #
462                fldai.64 1.0 #
463                fmovi.64 v0, %s
464            # Sum of 1.0 and value
465                fadd2.64 v0
466                fmovi.64 v1, %s
467                fcmpg.64 v1
468        cases:
469          - values:
470              # +0.0d
471              - "0"
472              - "1.0"
473          - values:
474              # -0.0d
475              - "0x8000000000000000"
476              - "1.0"
477          - values:
478              - "1.0"
479              - "2.0"
480          - values:
481              - "-1.0"
482              - "0"
483          - values:
484              # +Inf
485              - "0x7ff0000000000000"
486              - "0x7ff0000000000000"
487          - values:
488              # -Inf
489              - "0xfff0000000000000"
490              # -Inf
491              - "0xfff0000000000000"
492          - values:
493              # +max
494              - "0x7fefffffffffffff"
495              - "0x7fefffffffffffff"
496          - values:
497              # -max
498              - "0xffefffffffffffff"
499              # -max
500              - "0xffefffffffffffff"
501          - values:
502              # +min
503              - "0x0000000000000001"
504              - "1.0"
505          - values:
506              # -min
507              - "0x8000000000000001"
508              - "1.0"
509          - values:
510              # Some FP value, 3.14159265358979323846
511              - "3.14159265358979323846"
512              - "4.14159265358979323846"
513          - values:
514              # Some FP value
515              - "1234567890.987654321"
516              - "1234567891.987654321"
517
518      - file-name: "op_vs_8_none"
519        isa:
520          instructions:
521            - sig: fadd2.64 v:in:f64
522              acc: inout:f64
523              format: [op_v_8]
524          description: >
525            The sum or the difference of infinity and any finite value is infinity.
526            The sign of result matches the sign of infinity.
527        tags: ['irtoc_ignore']
528        check-type: check-positive
529        description: Check fadd2.64 with -1 and various values (Inf, min, max, numbers).
530        code-template: |
531            #
532                fldai.64 -1.0 #
533                fmovi.64 v0, %s
534            # Sum of -1.0 and value
535                fadd2.64 v0
536                fmovi.64 v1, %s
537                fcmpg.64 v1
538        cases:
539          - values:
540              # +0.0d
541              - "0"
542              - "-1"
543          - values:
544              # -0.0d
545              - "0x8000000000000000"
546              - "-1"
547          - values:
548              # 1d
549              - "1"
550              - "0"
551          - values:
552              # -1d
553              - "-1"
554              - "-2"
555          - values:
556              # +Inf
557              - "0x7ff0000000000000"
558              - "0x7ff0000000000000"
559          - values:
560              # -Inf
561              - "0xfff0000000000000"
562              # -Inf
563              - "0xfff0000000000000"
564          - values:
565              # +max
566              - "0x7fefffffffffffff"
567              - "0x7fefffffffffffff"
568          - values:
569              # -max
570              - "0xffefffffffffffff"
571              # -max
572              - "0xffefffffffffffff"
573          - values:
574              # +min
575              - "0x0000000000000001"
576              # -1d
577              - "-1"
578          - values:
579              # -min
580              - "0x8000000000000001"
581              # -1d
582              - "-1"
583          - values:
584              # Some FP value, 3.14159265358979323846
585              - "3.14159265358979323846"
586              - "2.14159265358979323846"
587          - values:
588              # Some FP value
589              - "1234567890.987654321"
590              - "1234567889.987654321"
591
592      - file-name: "op_vs_8"
593        isa:
594          instructions:
595            - sig: fadd2.64 v:in:f64
596              acc: inout:f64
597              format: [op_v_8]
598          description: >
599              The sum or the difference of zeros is zero.
600              Exceptions are the sum of two negative zeros and the difference of negative and positive zero - the result is negative zero.
601        check-type: check-positive
602        tags: ['irtoc_ignore']
603        description: Check fadd2.64 with various values.
604        code-template: |
605            #
606                fldai.64 %s #
607                fmovi.64 v0, %s
608            # Sum of -1.0 and value
609                fadd2.64 v0
610                fmovi.64 v1, %s
611                fcmpg.64 v1
612        cases:
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                - "-0.0"
623                - "0.0"
624                - "0.0"
625            - values:
626                - "-0.0"
627                - "-0.0"
628                - "0.0"
629            - values:
630                - "1.0"
631                - "-1.0"
632                - "0.0"
633            - values:
634                - "-1.0"
635                - "1.0"
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                - "2.0e-100"
645            - values:
646                - "1.0e+100"
647                - "1.0e-100"
648                - "1.0e+100"
649            - values:
650                - "-1.0e100"
651                - "-1.0e100"
652                - "-2.0e100"
653            - values:
654                - "-1.0e-100"
655                - "-1.0e-100"
656                - "-2.0e-100"
657            - values:
658                - "-1.0e+100"
659                - "-1.0e-100"
660                - "-1.0e+100"
661            - values:
662                - "3.14159265358979323846"
663                - "3.14159265358979323846"
664                - "6.283185307179586"
665            - values:
666                - "3.14159265358979323846e200"
667                - "3.14159265358979323846e200"
668                - "6.283185307179587e200"
669#            - values:
670#              # TODO add test cases for maximal and minimal FP value in decimal scientific literal
671
672      - file-name: "op_vs_8_max"
673        isa:
674          instructions:
675            - sig: fadd2.64 v:in:f64
676              acc: inout:f64
677              format: [op_v_8]
678        check-type: check-positive
679        tags: ['irtoc_ignore']
680        code-template: |
681            #
682                fldai.64 %s
683                fmovi.64 v0, %s
684            # Sum of two values
685                fadd2.64 v0
686                fmovi.64 v1, %s
687                fcmpg.64 v1
688        description: Check fadd2.64 with various max values.
689        cases:
690          - values:
691              # +max
692              - "0x7fefffffffffffff"
693              # +max
694              - "0x7fefffffffffffff"
695              # +Inf
696              - "0x7ff0000000000000"
697          - values:
698              # -max
699              - "0xffefffffffffffff"
700              # -max
701              - "0xffefffffffffffff"
702              # -Inf
703              - "0xfff0000000000000"
704          - values:
705              # +max
706              - "0x7fefffffffffffff"
707              # -max
708              - "0xffefffffffffffff"
709              - "0"
710          - values:
711              # +max
712              - "0x7fefffffffffffff"
713              # 1d
714              - "0x3ff0000000000000"
715              # +max
716              - "0x7fefffffffffffff"
717          - values:
718              # +max
719              - "0x7fefffffffffffff"
720              - "-1.0"
721              # +max
722              - "0x7fefffffffffffff"
723          - values:
724              # -max
725              - "0xffefffffffffffff"
726              - "1"
727              # -max
728              - "0xffefffffffffffff"
729          - values:
730              # -max
731              - "0xffefffffffffffff"
732              - "-1.0"
733              # -max
734              - "0xffefffffffffffff"
735
736      - file-name: "incorrect_reg"
737        isa:
738          instructions:
739            - sig: fadd2.64 v:in:f64
740              acc: inout:f64
741              format: [op_v_8]
742        check-type: none
743        runner-options: [compile-failure]
744        description: Check fadd2.64 with incorrect register numbers.
745        code-template: |
746          #
747              fadd2.64 %s
748        cases:
749          - values: [v256]
750          - values: [v65535]
751          - values: [a0]
752          - values: [a255]
753          - values: ['null']
754          - values: [0]
755          - values: [1.1]
756          - values: ['2.2']
757
758      - file-name: "reg_number"
759        isa:
760          instructions:
761            - sig: fadd2.64 v:in:f64
762              acc: inout:f64
763              format: [op_v_8]
764        check-type: none
765        runner-options: [compile-only]
766        description: Check fadd2.64 with correct register numbers.
767        code-template: |
768          #
769              fadd2.64 %s
770        cases:
771          - values: [v0]
772          - values: [v16]
773          - values: [v128]
774          - values: [v255]
775
776      - file-name: "calc"
777        isa:
778            instructions:
779              - sig: fadd2.64 v:in:f64
780                acc: inout:f64
781                format: [op_v_8]
782        check-type: check-positive
783        description: Check fadd2.64 with various values.
784        tags: ['tsan', 'irtoc_ignore']
785        code-template: |
786            #
787                fldai.64 %s
788                fmovi.64 v0, %s
789                fadd2.64 v0
790                fmovi.64 v1, %s
791                fcmpg.64 v1
792        cases:
793            - values:
794                - "-0.15050802400115393"
795                - "0.18996780455830886"
796                - "0.03945978055715493"
797            - values:
798                - "0.09951566402242995"
799                - "0.03719425811598742"
800                - "0.13670992213841737"
801            - values:
802                - "0.038831767543099804"
803                - "-0.4662699308635513"
804                - "-0.4274381633204515"
805            - values:
806                - "-0.11785869458726261"
807                - "-0.4106442634971579"
808                - "-0.5285029580844205"
809            - values:
810                - "0.23325136409810066"
811                - "0.09303562554819389"
812                - "0.32628698964629455"
813            - values:
814                - "-0.36306915632091574"
815                - "-0.18813247402656463"
816                - "-0.5512016303474804"
817            - values:
818                - "0.10035211145856304"
819                - "0.23596899663966542"
820                - "0.33632110809822846"
821            - values:
822                - "-0.22312737471673505"
823                - "-0.2184161670683794"
824                - "-0.44154354178511446"
825            - values:
826                - "0.18529020487227765"
827                - "0.48416743127187434"
828                - "0.669457636144152"
829            - values:
830                - "-0.47541772073735256"
831                - "0.08233614669530886"
832                - "-0.3930815740420437"
833            - values:
834                - "2.7599109874619587e-36"
835                - "-1.9447187242297282e-36"
836                - "8.151922632322304e-37"
837            - values:
838                - "9.760636456557758e-74"
839                - "4.224280075394366e-73"
840                - "5.200343721050142e-73"
841            - values:
842                - "2.5148540784952656e14"
843                - "1.9183146899927395e15"
844                - "2.169800097842266e15"
845            - values:
846                - "-9.871449173048974e19"
847                - "4.913647830291874e20"
848                - "3.926502912986976e20"
849            - values:
850                - "3.9192234567792673e-47"
851                - "2.2575355997689083e-47"
852                - "6.176759056548176e-47"
853            - values:
854                - "1.8994371294860455e98"
855                - "1.127391615608706e98"
856                - "3.0268287450947515e98"
857            - values:
858                - "4.0229987819504645e-32"
859                - "-2.500939436262524e-32"
860                - "1.5220593456879406e-32"
861            - values:
862                - "-4.16291703977667e72"
863                - "-4.0235643039421143e73"
864                - "-4.4398560079197816e73"
865            - values:
866                - "4.6361619555237306e-8"
867                - "-6.780934771200086e-9"
868                - "3.958068478403722e-8"
869            - values:
870                - "-2.5549708954660045e19"
871                - "4.064694433264309e19"
872                - "1.5097235377983046e19"
873
874      - file-name: "type"
875        isa:
876            instructions:
877              - sig: fadd2.64 v:in:f64
878                acc: inout:f64
879                format: [op_v_8]
880            verification:
881              - acc_type
882              - v1_type
883        tags: ['verifier']
884        runner-options: ['verifier-failure', 'verifier-config']
885        header-template: []
886        code-template: |
887          #
888          .record A {}
889          .record B {}
890          .record panda.String <external>
891          .record panda.Object <external>
892          .function i32 main() {
893              %s
894              *s
895              fadd2.64 v0
896        check-type: exit-positive
897        description: Check 'fadd2.64' with incorrect register and accumulator type.
898        template-cases:
899          - values:
900              - movi v0, 0
901          - values:
902              - movi.64 v0, 0
903          - values:
904              - fmovi v0, 0
905            bugid: ['7315']
906          - values:
907              - fmovi.64 v0, 0
908            exclude: [val]
909          - values:
910              - |
911                #
912                    lda.type B
913                    sta.obj v0
914          - values:
915              - |
916                #
917                    lda.type B[]
918                    sta.obj v0
919          - values:
920              - |
921                #
922                    lda.type panda.String
923                    sta.obj v0
924          - values:
925              - |
926                #
927                    lda.str "string"
928                    sta.obj v0
929          - values:
930              - |
931                #
932                    movi v0, 10
933                    newarr v0, v0, i32[]
934          - values:
935              - mov.null v0
936
937        cases:
938          - values:
939              - ldai 0
940          - values:
941              - ldai.64 0
942          - values:
943              - fldai 0
944            bugid: ['7315']
945          - values:
946              - fldai.64 0
947            id: val
948          - values:
949              - |
950                #
951                    lda.type A
952          - values:
953              - |
954                #
955                    lda.type A[]
956          - values:
957              - |
958                #
959                    lda.type panda.String
960          - values:
961              - |
962                #
963                    lda.str "string"
964          - values:
965              - |
966                #
967                    movi v1, 10
968                    newarr v1, v1, f64[]
969                    lda.obj v1
970          - values:
971              - lda.null
972
973      - file-name: uninitialized_regs
974        isa:
975          instructions:
976            - sig: fadd2.64 v:in:f64
977              acc: inout:f64
978              format: [op_v_8]
979        description: Check 'fadd2.64' with uninitialized register and accumulator.
980        tags: ['verifier']
981        runner-options: ['verifier-failure', 'verifier-config']
982        code-template: |
983            #
984                %s
985                *s
986                fadd2.64 %s
987        check-type: exit-positive
988        template-cases:
989          - values:
990              - ''
991              - v0
992          - values:
993              - fmovi.64 v0, 0
994              - v0
995            exclude: [init]
996          - values:
997              - ''
998              - v7
999          - values:
1000              - ''
1001              - v15
1002          - values:
1003              - fmovi.64 v15, 0
1004              - v15
1005            exclude: [init]
1006          - values:
1007              - ''
1008              - v128
1009          - values:
1010              - fmovi.64 v128, 0
1011              - v128
1012            exclude: [init]
1013          - values:
1014              - ''
1015              - v255
1016          - values:
1017              - fmovi.64 v255, 0
1018              - v255
1019            exclude: [init]
1020        cases:
1021          - values:
1022              - ''
1023          - values:
1024              - fldai.64 0
1025            id: init
1026