• 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:
15  - name: PandaAssembly
16    template: |
17      .language PandaAssembly
18  - name: aoobe_p
19    template: |
20      .record panda.ArrayIndexOutOfBoundsException <external>
21      .record R {}
22  - name: aoobe_j
23    template: |
24      .record panda.ArrayIndexOutOfBoundsException <external>
25      .record panda.String <external>
26      .record R {}
27  - name: npe_p
28    template: |
29      .record panda.NullPointerException <external>
30  - name: npe_j
31    template: |
32      .record panda.NullPointerException <external>
33tests:
34  - file-name: "ldarr.obj"
35    isa:
36      title: Load from array
37      description: >
38        Load an element from array using accumulator as an index and puts it into accumulator.
39      instructions:
40        - sig: ldarr.obj v:in:ref[]
41          acc: inout:i32->ref
42          format: [op_v_8]
43
44    commands:
45      - file-name: "reg_number"
46        isa:
47          description: >
48            Load an element from array using accumulator as an index and puts it into accumulator.
49        runner-options: [compile-only]
50        description: Check 'ldarr.obj' instruction with different register numbers.
51        header-template: []
52        code-template: |
53          #
54          .function i32 main() {
55              ldarr.obj %s
56        check-type: exit-positive
57        cases:
58          - values: [v0]
59          - values: [v16]
60          - values: [v128]
61          - values: [v255]
62          - values: [v256]
63            runner-options: [compile-failure]
64          - values: [v65535]
65            runner-options: [compile-failure]
66          - case-template: |
67              #
68              .function void f1(i32 a0) {
69                  ldarr.obj a0 # valid name of register
70                  return.void
71              }
72
73              .function i32 main() {
74                  movi v0, 0
75                  call.short f1, v0
76          - case-template: |
77              #
78              .function void f1(i32 a0) {
79                  ldarr.obj a1 # invalid name of register
80                  return.void
81              }
82
83              .function i32 main() {
84                  movi v0, 0
85                  call.short f1, v0
86            runner-options: [compile-failure]
87          - values: [a0]
88            runner-options: [compile-failure]
89          - values: [a255]
90            runner-options: [compile-failure]
91          - values: ['null']
92            runner-options: [compile-failure]
93          - values: [0]
94            runner-options: [compile-failure]
95          - values: [1.1]
96            runner-options: [compile-failure]
97          - values: ['2.2']
98            runner-options: [compile-failure]
99
100      - file-name: uninitialized_acc
101        isa:
102          verification:
103            - acc_i32
104        description: Check 'ldarr.obj' with uninitialized accumulator
105        tags: ['verifier']
106        runner-options: ['verifier-failure', 'verifier-config']
107        header-template: []
108        code-template: |
109            #
110            .record R {}
111            .function void f1(R[] a0) {
112                ldarr.obj a0
113                return.void
114            }
115            .function i32 main() {
116                movi v1, 100
117                newarr v1, v1, R[]
118                call.short f1, v1
119        check-type: exit-positive
120
121      - file-name: uninitialized_reg
122        isa:
123          verification:
124            - v1_array_type
125        description: Check 'ldarr.obj' with uninitialized register
126        tags: ['verifier']
127        runner-options: ['verifier-failure', 'verifier-config']
128        header-template: []
129        code-template: |
130            #
131            .function i32 main() {
132                ldai 0
133                ldarr.obj v2
134        check-type: exit-positive
135
136      - file-name: uninitialized_acc_and_reg
137        isa:
138          verification:
139            - v1_array_type
140            - acc_i32
141        description: Check 'ldarr.obj' with uninitialized register and accumulator
142        tags: ['verifier']
143        runner-options: ['verifier-failure', 'verifier-config']
144        header-template: []
145        code-template: |
146            #
147            .function i32 main() {
148                ldarr.obj v2
149        check-type: exit-positive
150
151      - file-name: null_pointer_p
152        isa:
153          exceptions:
154            - x_null
155        description: Check 'ldarr.obj' behavior when array is null reference.
156        tags: ['irtoc_ignore']
157        header-template: [npe_p]
158        bugid: ['3228']
159        code-template: |
160          .record R {}
161          .function R[] get_null() {
162              lda.null
163              return.obj
164          }
165          .function i32 main() {
166              call.short get_null
167              sta.obj v0
168              ldai %s
169          begin:
170              ldarr.obj v0
171          end:
172              ldai 1 # Should not reach this line
173              return
174
175          catch_NPE:
176              ldai 0 # Expected panda.NullPointerException
177              return
178
179          catch_all:
180              ldai 2 # Unexpected exception, test failed
181              return
182
183          .catch panda.NullPointerException, begin, end, catch_NPE
184          .catchall begin, end, catch_all
185        check-type: none
186        cases:
187          - values: [0]
188            tags: ['tsan']
189          - values: [1]
190          - values: [10]
191          - values: [128]
192          - values: [255]
193          - values: [65535]
194            tags: ['tsan']
195          - values: [0x7FFFFFFF]
196          - values: [0xFFFFFFFF]
197          - values: [0x80000000]
198
199      - file-name: null_pointer_j
200        isa:
201          exceptions:
202            - x_null
203        description: Check 'ldarr.obj' behavior when array is null reference.
204        tags: ['irtoc_ignore']
205        header-template: [PandaAssembly, npe_j]
206        runner-options: [use-pa]
207        bugid: ['3047', '3228']
208        code-template: |
209          .record R {}
210          .function R[] get_null() {
211              lda.null
212              return.obj
213          }
214          .function i32 main() {
215              call.short get_null
216              sta.obj v0
217              ldai %s
218          begin:
219              ldarr.obj v0
220          end:
221              ldai 1 # Should not reach this line
222              return
223
224          catch_NPE:
225              ldai 0 # Expected panda.NullPointerException
226              return
227
228          catch_all:
229              ldai 2 # Unexpected exception, test failed
230              return
231
232          .catch panda.NullPointerException, begin, end, catch_NPE
233          .catchall begin, end, catch_all
234        check-type: none
235        cases:
236          - values: [0]
237            tags: ['tsan']
238          - values: [1]
239          - values: [10]
240          - values: [128]
241          - values: [255]
242          - values: [65535]
243            tags: ['tsan']
244          - values: [0x7FFFFFFF]
245          - values: [0xFFFFFFFF]
246          - values: [0x80000000]
247
248      - file-name: array_out_of_bound_exception_p
249        isa:
250          exceptions:
251            - x_bounds
252        description: Check 'ldarr.obj' behavior when index is out of array bounds.
253        header-template: [aoobe_p, main]
254        tags: ['irtoc_ignore']
255        code-template: |
256          #
257              movi v0, *s
258              newarr v0, v0, %s
259              ldai *s
260          begin:
261              ldarr.obj v0
262          end:
263              ldai 1 # Should not reach this line
264              return
265
266          catch_AOOBE:
267              ldai 0 # Expected panda.ArrayIndexOutOfBoundsException
268              return
269
270          catch_all:
271              ldai 2 # Unexpected exception, test failed
272              return
273
274          .catch panda.ArrayIndexOutOfBoundsException, begin, end, catch_AOOBE
275          .catchall begin, end, catch_all
276        check-type: none
277        template-cases:
278            - values: ['R[]']
279            - values: ['R[][][]']
280        cases:
281          - values: [0, 0]
282            tags: ['tsan']
283          - values: [0, 1]
284          - values: [10, -10]
285          - values: [10, 128]
286          - values: [255, 255]
287          - values: [254, 255]
288          - values: [65535, 65535]
289            tags: ['tsan']
290          - values: [65535, 65536]
291          - values: [10, 0xFFFFFFFF]
292          - values: [256, 0xFFFFFFFE]
293          - values: [65536, 0xFFFFFFFD]
294            tags: ['tsan']
295          - values: [0x100000, 0xFFFFFFFC]
296          - values: [10, 0x80000000]
297          - values: [256, 0x80000001]
298          - values: [65536, 0x80000002]
299            tags: ['tsan']
300          - values: [0x100000, 0x80000003]
301
302      - file-name: array_out_of_bound_exception_j
303        isa:
304          exceptions:
305            - x_bounds
306        description: Check 'ldarr.obj' behavior when index is out of array bounds.
307        runner-options: [use-pa]
308        tags: ['irtoc_ignore']
309        header-template: [PandaAssembly, aoobe_j, main]
310        bugid: ['3227']
311        code-template: |
312          #
313              movi v0, *s
314              newarr v0, v0, %s
315              ldai *s
316          begin:
317              ldarr.obj v0
318          end:
319              ldai 1 # Should not reach this line
320              return
321
322          catch_AOOBE:
323              ldai 0 # Expected panda.ArrayIndexOutOfBoundsException
324              return
325
326          catch_all:
327              ldai 2 # Unexpected exception, test failed
328              return
329
330          .catch panda.ArrayIndexOutOfBoundsException, begin, end, catch_AOOBE
331          .catchall begin, end, catch_all
332        check-type: none
333        template-cases:
334            - values: ['R[]']
335            - values: ['panda.String[][][]']
336        cases:
337          - values: [0, 0]
338            tags: ['tsan']
339          - values: [0, 1]
340          - values: [10, -10]
341          - values: [10, 128]
342          - values: [255, 255]
343          - values: [254, 255]
344          - values: [65535, 65535]
345            tags: ['tsan']
346          - values: [65535, 65536]
347          - values: [10, 0xFFFFFFFF]
348          - values: [256, 0xFFFFFFFE]
349          - values: [65536, 0xFFFFFFFD]
350            tags: ['tsan']
351          - values: [0x100000, 0xFFFFFFFC]
352          - values: [10, 0x80000000]
353          - values: [256, 0x80000001]
354          - values: [65536, 0x80000002]
355            tags: ['tsan']
356          - values: [0x100000, 0x80000003]
357
358      - file-name: "rejectable_primitive_types_p"
359        isa:
360          verification:
361            - v1_array_type
362        description: Check rejectable array of primitive types for ldarr.obj instruction in Panda Assembly context.
363        code-template: |
364          #
365              movi v0, 1
366              newarr v0, v0, %s
367              ldai 0
368              ldarr.obj v0
369        check-type: exit-positive
370        tags: ['verifier']
371        runner-options: ['verifier-failure', 'verifier-config']
372        cases:
373          - values: ['u1[]']
374          - values: ['i8[]']
375          - values: ['u8[]']
376          - values: ['i16[]']
377          - values: ['u16[]']
378          - values: ['i32[]']
379          - values: ['u32[]']
380          - values: ['i64[]']
381          - values: ['u64[]']
382          - values: ['f32[]']
383          - values: ['f64[]']
384
385      - file-name: "rejectable_primitive_types_j"
386        isa:
387          verification:
388            - v1_array_type
389        description: Check rejectable array of primitive types for ldarr.obj instruction in PandaAssembly context.
390        header-template: [PandaAssembly, main]
391        code-template: |
392          #
393              movi v0, 1
394              newarr v0, v0, %s
395              ldai 0
396              ldarr.obj v0
397        check-type: exit-positive
398        tags: [verifier, pa-verifier]
399        bugid: ['3293', '5271']
400        runner-options: [verifier-failure, use-pa, verifier-config]
401        cases:
402          - values: ['u1[]']
403          - values: ['i8[]']
404          - values: ['u8[]']
405          - values: ['i16[]']
406          - values: ['u16[]']
407          - values: ['i32[]']
408          - values: ['u32[]']
409          - values: ['i64[]']
410          - values: ['u64[]']
411          - values: ['f32[]']
412          - values: ['f64[]']
413
414      - file-name: "acceptable_types_p"
415        isa:
416          verification:
417            - v1_array_type
418        description: Check acceptable array types for ldarr.obj instruction in Panda Assembly context.
419        header-template: []
420        code-template: |
421          .record R {}
422          .record panda.Object <external>
423          .record panda.String <external>
424          .record panda.Class <external>
425          .function i32 main() {
426              movi v0, 1
427              newarr v0, v0, %s
428              ldai 0
429              ldarr.obj v0
430        check-type: exit-positive
431        tags: ['verifier']
432        runner-options: ['verifier-only', 'verifier-config']
433        cases:
434          - values: ['panda.Object[]']
435          - values: ['panda.String[]']
436          - values: ['panda.Class[]']
437          - values: ['R[]']
438          - values: ['panda.Object[][]']
439          - values: ['panda.String[][]']
440          - values: ['panda.Class[][]']
441          - values: ['R[][]']
442          - values: ['u1[][]']
443          - values: ['u32[][]']
444          - values: ['u64[][]']
445
446      - file-name: "acceptable_types_j"
447        isa:
448          verification:
449            - v1_array_type
450        description: Check acceptable array types for ldarr.obj instruction in PandaAssembly context.
451        header-template: [PandaAssembly]
452        bugid: ['3227']
453        code-template: |
454          .record R {}
455          .record I <panda.interface> {}
456          .record Q <panda.implements=I> {}
457          .record E <panda.extends=Q> {}
458          .record A <panda.annotation, panda.annotation.type=runtime> {}
459          .record panda.Object <external>
460          .record panda.String <external>
461          .record panda.Class <external>
462          .function i32 main() {
463              movi v0, 1
464              newarr v0, v0, %s
465              ldai 0
466              ldarr.obj v0
467        check-type: exit-positive
468        tags: [verifier, pa-verifier]
469        runner-options: [verifier-only, use-pa, verifier-config]
470        cases:
471          - values: ['R[]']
472          - values: ['I[]']
473          - values: ['Q[]']
474          - values: ['E[]']
475          - values: ['A[]']
476          - values: ['panda.Object[]']
477          - values: ['panda.String[]']
478          - values: ['panda.Class[]']
479          - values: ['R[][]']
480          - values: ['I[][]']
481          - values: ['Q[][]']
482          - values: ['E[][]']
483          - values: ['A[][]']
484          - values: ['panda.Object[][]']
485          - values: ['panda.String[][]']
486          - values: ['panda.Class[][]']
487          - values: ['i8[][]']
488          - values: ['i32[][]']
489          - values: ['f64[][]']
490
491      - file-name: "arr_type"
492        isa:
493          verification:
494            - v1_array_type
495        tags: ['verifier']
496        runner-options: ['verifier-failure', 'verifier-config']
497        header-template: []
498        code-template: |
499          #
500          .record A {}
501          .record panda.String <external>
502          .record panda.Object <external>
503          .function void panda.Object.ctor(panda.Object a0) <external,ctor>
504          .function i32 main() {
505              %s
506              ldai 0
507              ldarr.obj v0
508        check-type: exit-positive
509        description: Check 'ldarr.obj' with incorrect array type.
510        cases:
511          - values:
512              - movi v0, 0
513          - values:
514              - movi.64 v0, 0
515          - values:
516              - fmovi v0, 0
517          - values:
518              - fmovi.64 v0, 0
519          - values:
520              - |
521                #
522                    lda.type A
523                    sta.obj v0
524          - values:
525              - |
526                #
527                    lda.type A[]
528                    sta.obj v0
529          - values:
530              - |
531                #
532                    lda.type panda.String
533                    sta.obj v0
534          - values:
535              - |
536                #
537                    lda.type panda.String[]
538                    sta.obj v0
539          - values:
540              - |
541                #
542                    lda.type panda.Object
543                    sta.obj v0
544          - values:
545              - |
546                #
547                    lda.type panda.Object[]
548                    sta.obj v0
549          - values:
550              - |
551                #
552                    lda.str "string"
553                    sta.obj v0
554          - values:
555              - |
556                #
557                    initobj panda.Object.ctor
558                    sta.obj v0
559
560      - file-name: "acc_type"
561        isa:
562          verification:
563            - acc_i32
564        tags: ['verifier']
565        runner-options: ['verifier-failure', 'verifier-config']
566        header-template: []
567        code-template: |
568          #
569          .record A {}
570          .record panda.String <external>
571          .record panda.Object <external>
572          .function void panda.Object.ctor(panda.Object a0) <external,ctor>
573          .function i32 main() {
574              movi v0, 1
575              newarr v0, v0, A[]
576              %s
577              ldarr.obj v0
578        check-type: exit-positive
579        description: Check 'ldarr.obj' with incorrect index type.
580        cases:
581          - values:
582              - lda.null
583          - values:
584              - ldai.64 0
585          - values:
586              - fldai 0
587          - values:
588              - fldai.64 0
589          - values:
590              - lda.type A
591          - values:
592              - lda.type A[]
593          - values:
594              - lda.type panda.String
595          - values:
596              - lda.type panda.String[]
597          - values:
598              - lda.type panda.Object
599          - values:
600              - lda.type panda.Object[]
601          - values:
602              - lda.str "string"
603          - values:
604              - |
605                #
606                    movi v1, 1
607                    newarr v1, v1, panda.Object[]
608                    lda.obj v1
609          - values:
610              - |
611                #
612                    movi v1, 1
613                    newarr v1, v1, panda.String[]
614                    lda.obj v1
615          - values:
616              - initobj panda.Object.ctor
617
618      - file-name: "arr_acc_type"
619        isa:
620          verification:
621            - v1_array_type
622            - acc_i32
623        tags: ['verifier']
624        runner-options: ['verifier-failure', 'verifier-config']
625        header-template: []
626        code-template: |
627          #
628          .record A {}
629          .record panda.String <external>
630          .record panda.Object <external>
631          .function void panda.Object.ctor(panda.Object a0) <external,ctor>
632          .function i32 main() {
633              %s
634              *s
635              ldarr.obj v0
636        check-type: exit-positive
637        description: Check 'ldarr.obj' with incorrect register and accumulator types.
638        template-cases:
639          - values:
640              - movi v0, 0
641          - values:
642              - movi.64 v0, 0
643          - values:
644              - fmovi v0, 0
645          - values:
646              - fmovi.64 v0, 0
647          - values:
648              - |
649                #
650                    lda.type A
651                    sta.obj v0
652          - values:
653              - |
654                #
655                    lda.type A[]
656                    sta.obj v0
657          - values:
658              - |
659                #
660                    lda.type panda.String
661                    sta.obj v0
662          - values:
663              - |
664                #
665                    lda.type panda.String[]
666                    sta.obj v0
667          - values:
668              - |
669                #
670                    lda.type panda.Object
671                    sta.obj v0
672          - values:
673              - |
674                #
675                    lda.type panda.Object[]
676                    sta.obj v0
677          - values:
678              - |
679                #
680                    lda.str "string"
681                    sta.obj v0
682          - values:
683              - |
684                #
685                    movi v0, 1
686                    newarr v0, v0, panda.Object[]
687          - values:
688              - |
689                #
690                    movi v0, 1
691                    newarr v0, v0, panda.String[]
692          - values:
693              - |
694                #
695                    initobj panda.Object.ctor
696                    sta.obj v0
697        cases:
698          - values:
699              - lda.null
700          - values:
701              - ldai.64 0
702          - values:
703              - fldai 0
704          - values:
705              - fldai.64 0
706          - values:
707              - lda.type A
708          - values:
709              - lda.type A[]
710          - values:
711              - lda.type panda.String
712          - values:
713              - lda.type panda.String[]
714          - values:
715              - lda.type panda.Object
716          - values:
717              - lda.type panda.Object[]
718          - values:
719              - lda.str "string"
720          - values:
721              - |
722                #
723                    movi v1, 1
724                    newarr v1, v1, panda.Object[]
725                    lda.obj v1
726          - values:
727              - |
728                #
729                    movi v1, 1
730                    newarr v1, v1, panda.String[]
731                    lda.obj v1
732          - values:
733              - initobj panda.Object.ctor
734
735      - file-name: "read_all_values"
736        isa:
737          description: >
738            Load an element from array using accumulator as an index and puts it into accumulator.
739        description: Check ldarr.obj reads correct items from array of objects.
740        tags: ['irtoc_ignore']
741        header-template: []
742        check-type: exit-positive
743        code-template: |
744            %s
745            .function i32 main() {
746                movi v1, 0          # v1 - index
747                movi v0, *s
748                                    # v0 is array size
749                mov v2, v0          # v2 is size too
750                newarr v0, v0, A[]          # v0 - testable array
751            fill_array:
752                lda v1
753                initobj A.ctor, v1
754                starr.obj v0, v1    # v0[v1] = acc
755                inci v1, 1          # v1 = v1 + 1
756                lda v1
757                jne v2, fill_array
758
759                movi v1, 0          # index
760            check_array:
761                lda v1
762                ldarr.obj v0        # acc = v0[acc]
763                sta.obj v3          # v3 = acc
764                call.virt.short A.cmp, v3, v1
765                jeqz ok
766                ldai 1
767                return
768            ok:
769                inci v1, 1
770                lda v1
771                jne v2, check_array
772        template-cases:
773          - values:
774            - |
775              #
776              .record A {
777                  i32 fi32
778              }
779              .function void A.ctor(A a0, i32 a1) <ctor> {
780                  lda a1
781                  stobj a0, A.fi32
782                  return.void
783              }
784              .function i32 A.cmp(A a0, i32 a1) {
785                  ldobj a0, A.fi32
786                  jne a1, exit_failure
787                  ldai 0
788                  return
789              exit_failure:
790                  ldai 1
791                  return
792              }
793            tags: ['tsan']
794          - values:
795            - |
796              #
797              .record A {
798                  A fA
799              }
800              .function void A.ctor(A a0, i32 a1) <ctor> {
801                  lda.obj a0
802                  stobj.obj a0, A.fA
803                  return.void
804              }
805              .function i32 A.cmp(A a0, i32 a1) {
806                  ldobj.obj a0, A.fA
807                  jeq.obj a0, ret0
808                  ldai 1
809                  return
810              ret0:
811                  ldai 0
812                  return
813              }
814        cases:
815          - values:
816            - 10000
817
818      - file-name: "read_different_type_values_p"
819        isa:
820          description: >
821            Load an element from array using accumulator as an index and puts it into accumulator.
822        description: Check ldarr.obj reads correct items with various types from array of objects.
823        header-template: []
824        check-type: exit-positive
825        code-template: |
826            %s
827            .function i32 main() {
828                movi v1, 1
829                newarr v0, v1, %s          # v0 - testable array
830                movi v1, 0          # v1 - index = 0
831
832            check_null:
833                lda v1
834                ldarr.obj v0        # acc = v0[acc]
835                jeqz.obj fill_array
836                ldai 1
837                return
838
839            fill_array:
840                %s
841                sta.obj v10         # v10 - saved object ref
842                starr.obj v0, v1    # v0[v1] = acc
843
844            check_ref:
845                lda v1
846                ldarr.obj v0        # acc = v0[acc]
847                jeq.obj v10, ok
848                ldai 2
849                return
850            ok:
851        cases:
852          - values:
853            - .record A {}
854            - A[]
855            - lda.null
856          - values:
857            - |
858                  .record A {}
859                  .function void A.ctor(A a0) <ctor> {
860                    return.void
861                  }
862            - A[]
863            - initobj A.ctor
864            tags: ['tsan']
865          - values:
866            - |
867                  .record panda.Class <external>
868                  .record A {}
869            - panda.Class[]
870            - lda.type A
871            bugid: ['3219']
872          - values:
873            - .record panda.String <external>
874            - panda.String[]
875            - lda.str "test string"
876          - values:
877            - |
878                  .record panda.Object <external>
879                  .record A {}
880                  .function void A.ctor(A a0) <ctor> {
881                    return.void
882                  }
883            - panda.Object[]
884            - initobj A.ctor
885            tags: ['tsan']
886          - values:
887            - .record A {}
888            - A[][]
889            - |
890              #
891                  movi v4, 10
892                  newarr v4, v4, A[]
893                  lda.obj v4
894
895      - file-name: "read_different_type_values_j"
896        isa:
897          description: >
898            Load an element from array using accumulator as an index and puts it into accumulator.
899        description: Check ldarr.obj reads correct items with various types from array of objects.
900        header-template: [PandaAssembly]
901        runner-options: [use-pa]
902        check-type: exit-positive
903        code-template: |
904            %s
905            .function i32 main() {
906                movi v1, 1
907                newarr v0, v1, %s          # v0 - testable array
908                movi v1, 0          # v1 - index = 0
909
910            check_null:
911                lda v1
912                ldarr.obj v0        # acc = v0[acc]
913                jeqz.obj fill_array
914                ldai 1
915                return
916
917            fill_array:
918                %s
919                sta.obj v10         # v10 - saved object ref
920                starr.obj v0, v1    # v0[v1] = acc
921
922            check_ref:
923                lda v1
924                ldarr.obj v0        # acc = v0[acc]
925                jeq.obj v10, ok
926                ldai 2
927                return
928            ok:
929        cases:
930          - values:
931            - .record panda.Object <external>
932            - panda.Object[]
933            - lda.null
934          - values:
935            - |
936                  .record panda.Long <external>
937                  .function void panda.Long.ctor(panda.Long a0, i64 a1) <external,ctor>
938            - panda.Long[]
939            - |
940              #
941                  movi.64 v7, 0x7FFFFFFFFFFFFFFF
942                  initobj panda.Long.ctor, v7
943            tags: ['tsan']
944          - values:
945            - .record panda.Class <external>
946            - panda.Class[]
947            - lda.type panda.Class
948          - values:
949            - .record panda.Object <external>
950            - panda.Object[]
951            - lda.str "test string"
952            tags: ['tsan']
953          - values:
954            - .record panda.String <external>
955            - panda.String[][]
956            - |
957              #
958                  movi v4, 10
959                  newarr v4, v4, panda.String[]
960                  lda.obj v4
961            bugid: ['3227']
962