• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1    /*
2     * Generic 64-bit floating point "/2addr" binary operation.  Provide
3     * an "instr" line that specifies an instruction that performs
4     * "d2 = d0 op d1".
5     *
6     * For: add-double/2addr, sub-double/2addr, mul-double/2addr,
7     *      div-double/2addr
8     */
9    /* binop/2addr vA, vB */
10    mov     r3, rINST, lsr #12          @ r3<- B
11    ubfx    r9, rINST, #8, #4           @ r9<- A
12    VREG_INDEX_TO_ADDR r3, r3           @ r3<- &vB
13    CLEAR_SHADOW_PAIR r9, ip, r0        @ Zero out shadow regs
14    fldd    d1, [r3]                    @ d1<- vB
15    VREG_INDEX_TO_ADDR r9, r9           @ r9<- &vA
16    FETCH_ADVANCE_INST 1                @ advance rPC, load rINST
17    fldd    d0, [r9]                    @ d0<- vA
18    $instr                              @ d2<- op
19    GET_INST_OPCODE ip                  @ extract opcode from rINST
20    fstd    d2, [r9]                    @ vAA<- d2
21    GOTO_OPCODE ip                      @ jump to next instruction
22