• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1%default {"preinstr":""}
2    /*
3     * Generic 32-bit unary operation.  Provide an "instr" line that
4     * specifies an instruction that performs "result = op a0".
5     * This could be a MIPS instruction or a function call.
6     *
7     * for: int-to-float, float-to-int
8     *
9     * On entry:
10     *     a0 = target dalvik register address
11     *     a1 = src dalvik register address
12     *
13     * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
14     *
15     */
16    move rOBJ, a0                       # save a0
17#ifdef SOFT_FLOAT
18    LOAD(a0, a1)                        # a0<- vBB
19    $preinstr                           # optional op
20    $instr                              # v0<- op, a0-a3 changed
21.L${opcode}_set_vreg:
22    STORE(v0, rOBJ)                     # vAA<- v0
23#else
24    LOAD_F(fa0, a1)                     # fa0<- vBB
25    $preinstr                           # optional op
26    $instr_f                            # fv0 = result
27.L${opcode}_set_vreg_f:
28    STORE_F(fv0, rOBJ)                  # vAA <- fv0
29#endif
30    RETURN
31