blob: db09fc04879ff7b670a943f1c2c004d28a728107 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
  | 
%default {"instr":""}
/*
 * Generic 32-bit unary operation.  Provide an "instr" line that
 * specifies an instruction that performs "result = op eax".
 */
    /* unop vA, vB */
    movzbl  rINSTbl,%ecx                    # ecx <- A+
    sarl    $$4,rINST                       # rINST <- B
    GET_VREG %eax, rINST                    # eax <- vB
    andb    $$0xf,%cl                       # ecx <- A
    $instr
    SET_VREG %eax, %ecx
    ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
 
  |