Home | History | Annotate | Download | only in arm
      1     /*
      2      * Signed 64-bit integer multiply, "/2addr" version.
      3      *
      4      * See op_mul_long for an explanation.
      5      *
      6      * We get a little tight on registers, so to avoid looking up &fp[A]
      7      * again we stuff it into rINST.
      8      */
      9     /* mul-long/2addr vA, vB */
     10     mov     r1, rINST, lsr #12          @ r1<- B
     11     ubfx    r9, rINST, #8, #4           @ r9<- A
     12     VREG_INDEX_TO_ADDR r1, r1           @ r1<- &fp[B]
     13     VREG_INDEX_TO_ADDR rINST, r9        @ rINST<- &fp[A]
     14     ldmia   r1, {r2-r3}                 @ r2/r3<- vBB/vBB+1
     15     ldmia   rINST, {r0-r1}              @ r0/r1<- vAA/vAA+1
     16     mul     ip, r2, r1                  @ ip<- ZxW
     17     umull   r1, lr, r2, r0              @ r1/lr <- ZxX
     18     mla     r2, r0, r3, ip              @ r2<- YxX + (ZxW)
     19     mov     r0, rINST                   @ r0<- &fp[A] (free up rINST)
     20     FETCH_ADVANCE_INST 1                @ advance rPC, load rINST
     21     add     r2, r2, lr                  @ r2<- r2 + low(ZxW + (YxX))
     22     GET_INST_OPCODE ip                  @ extract opcode from rINST
     23     stmia   r0, {r1-r2}                 @ vAA/vAA+1<- r1/r2
     24     GOTO_OPCODE ip                      @ jump to next instruction
     25