1%default {}
2    /*
3     * Specialised 64-bit floating point operation.
4     *
5     * Note: The result will be returned in d2.
6     *
7     * For: long-to-double
8     */
9    mov     r3, rINST, lsr #12          @ r3<- B
10    ubfx    r9, rINST, #8, #4           @ r9<- A
11    VREG_INDEX_TO_ADDR r3, r3           @ r3<- &fp[B]
12    VREG_INDEX_TO_ADDR r9, r9           @ r9<- &fp[A]
13    vldr    d0, [r3]                    @ d0<- vAA
14    FETCH_ADVANCE_INST 1                @ advance rPC, load rINST
15
16    vcvt.f64.s32    d1, s1              @ d1<- (double)(vAAh)
17    vcvt.f64.u32    d2, s0              @ d2<- (double)(vAAl)
18    vldr            d3, constval$opcode
19    vmla.f64        d2, d1, d3          @ d2<- vAAh*2^32 + vAAl
20
21    GET_INST_OPCODE ip                  @ extract opcode from rINST
22    vstr.64 d2, [r9]                    @ vAA<- d2
23    GOTO_OPCODE ip                      @ jump to next instruction
24
25    /* literal pool helper */
26constval${opcode}:
27    .8byte          0x41f0000000000000
28