Home | History | Annotate | Download | only in mips
      1     /*
      2      * Long integer shift, 2addr version.  vA is 64-bit value/result, vB is
      3      * 32-bit shift distance.
      4      */
      5     /* shr-long/2addr vA, vB */
      6     GET_OPA4(t2)                           #  t2 <- A+
      7     GET_OPB(a3)                            #  a3 <- B
      8     GET_VREG(a2, a3)                       #  a2 <- vB
      9     EAS2(t0, rFP, t2)                      #  t0 <- &fp[A]
     10     LOAD64(a0, a1, t0)                     #  a0/a1 <- vAA/vAA+1
     11     FETCH_ADVANCE_INST(1)                  #  advance rPC, load rINST
     12     GET_INST_OPCODE(t0)                    #  extract opcode from rINST
     13 
     14     andi    v0, a2, 0x20                   #  shift & 0x20
     15     sra     v1, a1, a2                     #  rhi<- ahi >> (shift&31)
     16     bnez    v0, .L${opcode}_finish
     17     srl     v0, a0, a2                     #  rlo<- alo >> (shift&31)
     18     not     a0, a2                         #  alo<- 31-shift (shift is 5b)
     19     sll     a1, 1
     20     sll     a1, a0                         #  ahi<- ahi << (32-(shift&31))
     21     or      v0, a1                         #  rlo<- rlo | ahi
     22     SET_VREG64_GOTO(v0, v1, t2, t0)        #  vAA/vAA+1 <- a0/a1
     23 %break
     24 
     25 .L${opcode}_finish:
     26     sra     a3, a1, 31                     #  a3<- sign(ah)
     27     SET_VREG64_GOTO(v1, a3, t2, t0)        #  vAA/vAA+1 <- rlo/rhi
     28