blob: 411396b290f23b6b84a480ca20f8e4d13e6fa6c8 [file] [log] [blame]
Bill Buzbee3b0b4b92016-02-02 13:45:36 +00001%default {"srcreg":"s0", "tgtreg":"d0"}
2 /*
3 * Generic 64bit-to-32bit floating point unary operation. Provide an
4 * "instr" line that specifies an instruction that performs "$tgtreg = op $srcreg".
5 *
6 * For: int-to-double, float-to-double, float-to-long
7 */
8 /* unop vA, vB */
9 lsr w3, wINST, #12 // w3<- B
10 lsr w4, wINST, #8 // w4<- A+
11 GET_VREG_WIDE $srcreg, w3
12 FETCH_ADVANCE_INST 1 // advance rPC, load wINST
13 and w4, w4, #15 // w4<- A
14 $instr // d0<- op
15 GET_INST_OPCODE ip // extract opcode from wINST
16 SET_VREG $tgtreg, w4 // vA<- d0
17 GOTO_OPCODE ip // jump to next instruction