blob: 924685df0e43163bfbc68eb3771858ff83b128f3 [file] [log] [blame]
Serguei Katkov99229c72015-12-31 13:05:31 +06001%default {"result":"%eax"}
2/*
3 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
4 * that specifies an instruction that performs "result = eax op ecx".
5 * This could be an x86 instruction or a function call. (If the result
6 * comes back in a register other than r0, you can override "result".)
7 *
8 * For: add-int/lit8, rsub-int/lit8
9 * and-int/lit8, or-int/lit8, xor-int/lit8,
10 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
11 */
12 /* binop/lit8 vAA, vBB, #+CC */
13 movzbl 2(rPC), %eax # eax <- BB
14 movsbl 3(rPC), %ecx # ecx <- ssssssCC
15 GET_VREG %eax %eax # eax <- rBB
16 $instr # ex: addl %ecx,%eax
17 SET_VREG $result rINST
18 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2