blob: d7a0859cdcce7329477829a3ed3c18fa8528af05 [file] [log] [blame]
buzbee1452bee2015-03-06 14:43:04 -08001 /*
2 * Generic 32-bit unary floating-point operation. Provide an "instr"
3 * line that specifies an instruction that performs "s1 = op s0".
4 *
5 * for: int-to-float, float-to-int
6 */
7 /* unop vA, vB */
8 mov r3, rINST, lsr #12 @ r3<- B
9 mov r9, rINST, lsr #8 @ r9<- A+
10 VREG_INDEX_TO_ADDR r3, r3 @ r3<- &vB
11 flds s0, [r3] @ s0<- vB
12 FETCH_ADVANCE_INST 1 @ advance rPC, load rINST
13 and r9, r9, #15 @ r9<- A
14 $instr @ s1<- op
15 GET_INST_OPCODE ip @ extract opcode from rINST
16 VREG_INDEX_TO_ADDR r9, r9 @ r9<- &vA
17 fsts s1, [r9] @ vA<- s1
18 GOTO_OPCODE ip @ jump to next instruction