1%default { "is_object":"0", "helper":"MterpGet32Static", "extend":"" }
2    /*
3     * General SGET handler wrapper.
4     *
5     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
6     */
7    /* op vAA, field//BBBB */
8    .extern $helper
9    EXPORT_PC
10    lhu     a0, 2(rPC)                  # a0 <- field ref BBBB
11    ld      a1, OFF_FP_METHOD(rFP)
12    move    a2, rSELF
13    jal     $helper
14    ld      a3, THREAD_EXCEPTION_OFFSET(rSELF)
15    srl     a2, rINST, 8                # a2 <- AA
16    $extend
17    PREFETCH_INST 2
18    bnez    a3, MterpException          # bail out
19    .if $is_object
20    SET_VREG_OBJECT v0, a2              # fp[AA] <- v0
21    .else
22    SET_VREG v0, a2                     # fp[AA] <- v0
23    .endif
24    ADVANCE 2
25    GET_INST_OPCODE v0                  # extract opcode from rINST
26    GOTO_OPCODE v0
27