blob: 64ece1e1c843b6a64bd8eb7ee24b906528b1fbe5 [file] [log] [blame]
Douglas Leung200f0402016-02-25 20:05:47 -08001%default { "is_object":"0", "helper":"artGet32StaticFromCode" }
2 /*
3 * General SGET handler.
4 *
5 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
6 */
Alexey Frunze84603bf2016-10-21 19:54:43 -07007 /* op vAA, field@BBBB */
Douglas Leung200f0402016-02-25 20:05:47 -08008 .extern $helper
9 EXPORT_PC()
10 FETCH(a0, 1) # a0 <- field ref BBBB
11 lw a1, OFF_FP_METHOD(rFP) # a1 <- method
12 move a2, rSELF # a2 <- self
13 JAL($helper)
14 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
15 GET_OPA(a2) # a2 <- AA
16 PREFETCH_INST(2)
17 bnez a3, MterpException # bail out
Douglas Leung200f0402016-02-25 20:05:47 -080018 ADVANCE(2)
19 GET_INST_OPCODE(t0) # extract opcode from rINST
Alexey Frunze84603bf2016-10-21 19:54:43 -070020.if $is_object
21 SET_VREG_OBJECT_GOTO(v0, a2, t0) # fp[AA] <- v0
22.else
23 SET_VREG_GOTO(v0, a2, t0) # fp[AA] <- v0
24.endif