1%default { "is_object":"0", "helper":"artGet32StaticFromCode", "wide":"0" }
2/*
3 * General SGET handler wrapper.
4 *
5 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short, sget-wide
6 */
7    /* op vAA, field@BBBB */
8    .extern $helper
9    EXPORT_PC
10    movzwq  2(rPC), OUT_ARG0                # field ref CCCC
11    movq    OFF_FP_METHOD(rFP), OUT_ARG1    # referrer
12    movq    rSELF, OUT_ARG2                 # self
13    call    SYMBOL($helper)
14    movq    rSELF, %rcx
15    cmpl    $$0, THREAD_EXCEPTION_OFFSET(%rcx)
16    jnz     MterpException
17    .if $is_object
18    SET_VREG_OBJECT %eax, rINSTq            # fp[A] <- value
19    .else
20    .if $wide
21    SET_WIDE_VREG %rax, rINSTq              # fp[A] <- value
22    .else
23    SET_VREG %eax, rINSTq                   # fp[A] <- value
24    .endif
25    .endif
26    ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
27