1%default {"result":"%eax"}
2/*
3 * Generic 32-bit binary operation.  Provide an "instr" line that
4 * specifies an instruction that performs "result = eax op (rFP,%ecx,4)".
5 * This could be an x86 instruction or a function call.  (If the result
6 * comes back in a register other than eax, you can override "result".)
7 *
8 * For: add-int, sub-int, and-int, or-int,
9 *      xor-int, shl-int, shr-int, ushr-int
10 */
11    /* binop vAA, vBB, vCC */
12    movzbl  2(rPC), %eax                    # eax <- BB
13    movzbl  3(rPC), %ecx                    # ecx <- CC
14    GET_VREG %eax, %eax                     # eax <- vBB
15    $instr                                  # ex: addl    (rFP,%ecx,4),%eax
16    SET_VREG $result, rINST
17    ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
18