1%def op_check_cast(): 2 jmp NterpCheckCast 3 4%def op_iget_boolean(): 5 jmp NterpGetBooleanInstanceField 6 7%def op_iget_boolean_quick(): 8% op_iget_quick(load="movsbl") 9 10%def op_iget_byte(): 11 jmp NterpGetByteInstanceField 12 13%def op_iget_byte_quick(): 14% op_iget_quick(load="movsbl") 15 16%def op_iget_char(): 17 jmp NterpGetCharInstanceField 18 19%def op_iget_char_quick(): 20% op_iget_quick(load="movzwl") 21 22%def op_iget_object(): 23 jmp NterpGetObjectInstanceField 24 25%def op_iget_object_quick(): 26 movzwq 2(rPC), %rax # eax <- field byte offset 27 movl rINST, %ecx # rcx <- BA 28 sarl $$4, %ecx # ecx <- B 29 GET_VREG %ecx, %rcx # vB (object we're operating on) 30 testl %ecx, %ecx # is object null? 31 je common_errNullObject 32 testb $$READ_BARRIER_TEST_VALUE, GRAY_BYTE_OFFSET(%ecx) 33 movl (%rcx,%rax,1), %eax 34 jnz 2f 351: 36 andb $$0xf,rINSTbl # rINST <- A 37 SET_VREG_OBJECT %eax, rINSTq # fp[A] <- value 38 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2 392: 40 // reg00 is eax 41 call art_quick_read_barrier_mark_reg00 42 jmp 1b 43 44%def op_iget_quick(load="movl", wide="0"): 45 /* For: iget-quick, iget-boolean-quick, iget-byte-quick, iget-char-quick, iget-short-quick, iget-wide-quick */ 46 /* op vA, vB, offset@CCCC */ 47 movl rINST, %ecx # rcx <- BA 48 sarl $$4, %ecx # ecx <- B 49 GET_VREG %ecx, %rcx # vB (object we're operating on) 50 movzwq 2(rPC), %rax # eax <- field byte offset 51 testl %ecx, %ecx # is object null? 52 je common_errNullObject 53 andb $$0xf,rINSTbl # rINST <- A 54 .if $wide 55 movq (%rcx,%rax,1), %rax 56 SET_WIDE_VREG %rax, rINSTq # fp[A] <- value 57 .else 58 ${load} (%rcx,%rax,1), %eax 59 SET_VREG %eax, rINSTq # fp[A] <- value 60 .endif 61 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2 62 63%def op_iget_short(): 64 jmp NterpGetShortInstanceField 65 66%def op_iget_short_quick(): 67% op_iget_quick(load="movswl") 68 69%def op_iget_wide(): 70 jmp NterpGetWideInstanceField 71 72%def op_iget_wide_quick(): 73% op_iget_quick(load="movq", wide="1") 74 75%def op_instance_of(): 76 jmp NterpInstanceOf 77 78%def op_iget(): 79 jmp NterpGetInstanceField 80 81%def op_iput(): 82 jmp NterpPutInstanceField 83 84%def op_iput_boolean(): 85 jmp NterpPutBooleanInstanceField 86 87%def op_iput_boolean_quick(): 88% op_iput_quick(reg="rINSTbl", store="movb") 89 90%def op_iput_byte(): 91 jmp NterpPutByteInstanceField 92 93%def op_iput_byte_quick(): 94% op_iput_quick(reg="rINSTbl", store="movb") 95 96%def op_iput_char(): 97 jmp NterpPutCharInstanceField 98 99%def op_iput_char_quick(): 100% op_iput_quick(reg="rINSTw", store="movw") 101 102%def op_iput_object(): 103 jmp NterpPutObjectInstanceField 104 105%def op_iput_object_quick(): 106 movzwq 2(rPC), %rax # eax <- field byte offset 107 movzbq rINSTbl, %rcx # rcx <- BA 108 sarl $$4, %ecx # ecx <- B 109 GET_VREG %ecx, %rcx # vB (object we're operating on) 110 testl %ecx, %ecx # is object null? 111 je common_errNullObject 112 andb $$0xf, rINSTbl # rINST <- A 113 GET_VREG rINST, rINSTq # rINST <- v[A] 114 movl rINST, (%rcx,%rax,1) 115 testl rINST, rINST 116 je 1f 117 movq rSELF:THREAD_CARD_TABLE_OFFSET, %rax 118 shrq $$CARD_TABLE_CARD_SHIFT, %rcx 119 movb %al, (%rcx, %rax, 1) 1201: 121 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2 122 123%def op_iput_quick(reg="rINST", store="movl"): 124 /* For: iput-quick, iput-object-quick */ 125 /* op vA, vB, offset@CCCC */ 126 movzbq rINSTbl, %rcx # rcx <- BA 127 sarl $$4, %ecx # ecx <- B 128 GET_VREG %ecx, %rcx # vB (object we're operating on) 129 testl %ecx, %ecx # is object null? 130 je common_errNullObject 131 andb $$0xf, rINSTbl # rINST <- A 132 GET_VREG rINST, rINSTq # rINST <- v[A] 133 movzwq 2(rPC), %rax # rax <- field byte offset 134 ${store} ${reg}, (%rcx,%rax,1) 135 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2 136 137%def op_iput_short(): 138 jmp NterpPutShortInstanceField 139 140%def op_iput_short_quick(): 141% op_iput_quick(reg="rINSTw", store="movw") 142 143%def op_iput_wide(): 144 jmp NterpPutWideInstanceField 145 146%def op_iput_wide_quick(): 147 /* iput-wide-quick vA, vB, offset@CCCC */ 148 movzbq rINSTbl, %rcx # rcx<- BA 149 sarl $$4, %ecx # ecx<- B 150 GET_VREG %ecx, %rcx # vB (object we're operating on) 151 testl %ecx, %ecx # is object null? 152 je common_errNullObject 153 movzwq 2(rPC), %rax # rax<- field byte offset 154 leaq (%rcx,%rax,1), %rcx # ecx<- Address of 64-bit target 155 andb $$0xf, rINSTbl # rINST<- A 156 GET_WIDE_VREG %rax, rINSTq # rax<- fp[A]/fp[A+1] 157 movq %rax, (%rcx) # obj.field<- r0/r1 158 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2 159 160%def op_sget(load="movl", wide="0"): 161 jmp NterpGetIntStaticField 162 163%def op_sget_boolean(): 164 jmp NterpGetBooleanStaticField 165 166%def op_sget_byte(): 167 jmp NterpGetByteStaticField 168 169%def op_sget_char(): 170 jmp NterpGetCharStaticField 171 172%def op_sget_object(): 173 jmp NterpGetObjectStaticField 174 175%def op_sget_short(): 176 jmp NterpGetShortStaticField 177 178%def op_sget_wide(): 179 jmp NterpGetWideStaticField 180 181%def op_sput(): 182 jmp NterpPutStaticField 183 184%def op_sput_boolean(): 185 jmp NterpPutBooleanStaticField 186 187%def op_sput_byte(): 188 jmp NterpPutByteStaticField 189 190%def op_sput_char(): 191 jmp NterpPutCharStaticField 192 193%def op_sput_object(): 194 jmp NterpPutObjectStaticField 195 196%def op_sput_short(): 197 jmp NterpPutShortStaticField 198 199%def op_sput_wide(): 200 jmp NterpPutWideStaticField 201 202%def op_new_instance(): 203 // The routine is too big to fit in a handler, so jump to it. 204 jmp NterpNewInstance 205