1%def op_check_cast():
2   b NterpCheckCast
3
4%def op_iget_boolean():
5   b NterpGetBooleanInstanceField
6
7%def op_iget_boolean_quick():
8%  op_iget_quick(load="ldrb")
9
10%def op_iget_byte():
11   b NterpGetByteInstanceField
12
13%def op_iget_byte_quick():
14%  op_iget_quick(load="ldrsb")
15
16%def op_iget_char():
17   b NterpGetCharInstanceField
18
19%def op_iget_char_quick():
20%  op_iget_quick(load="ldrh")
21
22%def op_iget_object():
23   b NterpGetObjectInstanceField
24
25%def op_iget_object_quick():
26   /* For: iget-object-quick */
27   /* op vA, vB, offset//CCCC */
28   lsr     w2, wINST, #12              // w2<- B
29   FETCH w1, 1                         // w1<- field byte offset
30   GET_VREG w0, w2                     // w0<- object we're operating on
31   cbz     x0, common_errNullObject    // bail if null object.
32   ldr     w0, [x0, x1]
33   cbnz wMR, 2f
341:
35   ubfx    w2, wINST, #8, #4           // w2<- A
36   PREFETCH_INST 2
37   SET_VREG_OBJECT w0, w2              // fp[A]<- w0
38   ADVANCE 2                           // advance rPC
39   GET_INST_OPCODE ip                  // extract opcode from wINST
40   GOTO_OPCODE ip                      // jump to next instruction
412:
42   bl art_quick_read_barrier_mark_reg00
43   b 1b
44
45%def op_iget_quick(load="ldr", wide="0"):
46   /* For: iget-quick, iget-boolean-quick, iget-byte-quick, iget-char-quick, iget-short-quick, iget-wide-quick */
47   /* op vA, vB, offset@CCCC */
48   lsr     w2, wINST, #12              // w2<- B
49   FETCH w1, 1                         // w1<- field byte offset
50   GET_VREG w0, w2                     // w0<- object we're operating on
51   cbz     x0, common_errNullObject    // bail if null object.
52   ubfx    w2, wINST, #8, #4           // w2<- A
53   PREFETCH_INST 2
54   .if $wide
55   ${load} x0, [x0, x1]
56   SET_VREG_WIDE x0, w2                // fp[A]<- x0
57   .else
58   ${load} w0, [x0, x1]
59   SET_VREG w0, w2                     // fp[A]<- w0
60   .endif
61   ADVANCE 2                           // advance rPC
62   GET_INST_OPCODE ip                  // extract opcode from wINST
63   GOTO_OPCODE ip                      // jump to next instruction
64
65%def op_iget_short():
66   b NterpGetShortInstanceField
67
68%def op_iget_short_quick():
69%  op_iget_quick(load="ldrsh")
70
71%def op_iget_wide():
72   b NterpGetWideInstanceField
73
74%def op_iget_wide_quick():
75%  op_iget_quick(load="ldr", wide="1")
76
77%def op_instance_of():
78   b NterpInstanceOf
79
80%def op_iget():
81   b NterpGetInstanceField
82
83%def op_iput():
84   b NterpPutInstanceField
85
86%def op_iput_boolean():
87   b NterpPutBooleanInstanceField
88
89%def op_iput_boolean_quick():
90%  op_iput_quick(store="strb")
91
92%def op_iput_byte():
93   b NterpPutByteInstanceField
94
95%def op_iput_byte_quick():
96%  op_iput_quick(store="strb")
97
98%def op_iput_char():
99   b NterpPutCharInstanceField
100
101%def op_iput_char_quick():
102%  op_iput_quick(store="strh")
103
104%def op_iput_object():
105    b NterpPutObjectInstanceField
106
107%def op_iput_quick(store="str", wide="0", is_object="0"):
108   /* op vA, vB, offset@CCCC */
109   lsr     w2, wINST, #12              // w2<- B
110   FETCH w1, 1                         // w1<- field byte offset
111   GET_VREG w3, w2                     // w3<- fp[B], the object pointer
112   ubfx    w2, wINST, #8, #4           // w2<- A
113   cbz     w3, common_errNullObject    // object was null
114   .if $wide
115   GET_VREG_WIDE x0, w2                // x0<- fp[A]
116   FETCH_ADVANCE_INST 2                // advance rPC, load rINST
117   $store     x0, [x3, x1]             // obj.field<- x0
118   .else
119   GET_VREG w0, w2                     // w0<- fp[A]
120   FETCH_ADVANCE_INST 2                // advance rPC, load rINST
121   $store     w0, [x3, x1]             // obj.field<- w0
122   .endif
123   .if $is_object
124   cbz w0, 1f
125   ldr x1, [xSELF, #THREAD_CARD_TABLE_OFFSET]
126   lsr w2, w3, #CARD_TABLE_CARD_SHIFT
127   strb w1, [x1, x2]
1281:
129   .endif
130   GET_INST_OPCODE ip                  // extract opcode from rINST
131   GOTO_OPCODE ip                      // jump to next instruction
132
133%def op_iput_object_quick():
134%  op_iput_quick(store="str", wide="0", is_object="1")
135
136%def op_iput_short():
137   b NterpPutShortInstanceField
138
139%def op_iput_short_quick():
140%  op_iput_quick(store="strh")
141
142%def op_iput_wide():
143   b NterpPutWideInstanceField
144
145%def op_iput_wide_quick():
146%  op_iput_quick(store="str", wide="1", is_object="0")
147
148%def op_sget(load="ldr", wide="0"):
149   b NterpGetIntStaticField
150
151%def op_sget_boolean():
152   b NterpGetBooleanStaticField
153
154%def op_sget_byte():
155   b NterpGetByteStaticField
156
157%def op_sget_char():
158   b NterpGetCharStaticField
159
160%def op_sget_object():
161   b NterpGetObjectStaticField
162
163%def op_sget_short():
164   b NterpGetShortStaticField
165
166%def op_sget_wide():
167   b NterpGetWideStaticField
168
169%def op_sput():
170   b NterpPutStaticField
171
172%def op_sput_boolean():
173   b NterpPutBooleanStaticField
174
175%def op_sput_byte():
176   b NterpPutByteStaticField
177
178%def op_sput_char():
179   b NterpPutCharStaticField
180
181%def op_sput_object():
182   b NterpPutObjectStaticField
183
184%def op_sput_short():
185   b NterpPutShortStaticField
186
187%def op_sput_wide():
188   b NterpPutWideStaticField
189
190%def op_new_instance():
191   // The routine is too big to fit in a handler, so jump to it.
192   b NterpNewInstance
193