• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1    /*
2     * Generic 32-bit binary float operation.
3     *
4     * For: add-fp, sub-fp, mul-fp, div-fp, rem-fp
5     */
6
7    /* binop vAA, vBB, vCC */
8    FETCH(a0, 1)                           #  a0 <- CCBB
9    GET_OPA(rOBJ)                          #  s5 <- AA
10    srl       a3, a0, 8                    #  a3 <- CC
11    and       a2, a0, 255                  #  a2 <- BB
12    GET_VREG_F(fa1, a3)                    #  a1 <- vCC
13    GET_VREG_F(fa0, a2)                    #  a0 <- vBB
14
15    FETCH_ADVANCE_INST(2)                  #  advance rPC, load rINST
16    $instr                                 #  f0 = result
17    SET_VREG_F(fv0, rOBJ)                  #  vAA <- fv0
18    GET_INST_OPCODE(t0)                    #  extract opcode from rINST
19    GOTO_OPCODE(t0)                        #  jump to next instruction
20