• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1%default {"instr1":"","instr2":"","instr3":""}
2    /*
3     * Generic 64-bit unary operation.
4     * Operand in %ecx:%eax
5     *
6     * For: neg-long, not-long
7     */
8    /* unop vA, vB */
9    movzbl    rINST_HI,%ecx            # ecx<- BA
10    sarl      $$4,%ecx                 # ecx<- B
11    movzbl    rINST_HI,rINST_FULL      # ecx<- BA
12    andb      $$0xf,rINST_LO           # rINST_FULL<- A
13    GET_VREG_WORD(%eax,%ecx,0)         # eax<- v[B+0]
14    GET_VREG_WORD(%ecx,%ecx,1)         # ecx<- v[B+1]
15    $instr1   # ex: negl %eax
16    $instr2   # ex: adcl $$0,%ecx
17    $instr3   # ex: negl %ecx
18    SET_VREG_WORD(%eax,rINST_FULL,0)   # v[A+0] <- eax
19    SET_VREG_WORD(%ecx,rINST_FULL,1)   # v[A+1] <- ecx
20    GET_INST_WORD(1)
21    ADVANCE_PC(1)
22    GOTO_NEXT
23