1%default { "is_object":"0", "helper":"artGet32StaticFromCode" }
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    movzwl  2(rPC), %eax
11    movl    %eax, OUT_ARG0(%esp)            # field ref CCCC
12    movl    OFF_FP_METHOD(rFP), %eax
13    movl    %eax, OUT_ARG1(%esp)            # referrer
14    movl    rSELF, %ecx
15    movl    %ecx, OUT_ARG2(%esp)            # self
16    call    SYMBOL($helper)
17    movl    rSELF, %ecx
18    RESTORE_IBASE_FROM_SELF %ecx
19    cmpl    $$0, THREAD_EXCEPTION_OFFSET(%ecx)
20    jnz     MterpException
21    .if $is_object
22    SET_VREG_OBJECT %eax, rINST             # fp[A] <- value
23    .else
24    SET_VREG %eax, rINST                    # fp[A] <- value
25    .endif
26    ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
27