Home | History | Annotate | Download | only in mips
      1 %default {"preinstr":"", "result0":"a0", "result1":"a1"}
      2     /*
      3      * Generic 64-bit unary operation.  Provide an "instr" line that
      4      * specifies an instruction that performs "result = op a0/a1".
      5      * This could be MIPS instruction or a function call.
      6      *
      7      * For: neg-long, not-long, neg-double, long-to-double, double-to-long
      8      */
      9     /* unop vA, vB */
     10     GET_OPA4(t1)                           #  t1 <- A+
     11     GET_OPB(a3)                            #  a3 <- B
     12     EAS2(a3, rFP, a3)                      #  a3 <- &fp[B]
     13     EAS2(rOBJ, rFP, t1)                    #  rOBJ <- &fp[A]
     14     LOAD64(a0, a1, a3)                     #  a0/a1 <- vAA
     15     FETCH_ADVANCE_INST(1)                  #  advance rPC, load rINST
     16     $preinstr                              #  optional op
     17     $instr                                 #  a0/a1 <- op, a2-a3 changed
     18     GET_INST_OPCODE(t0)                    #  extract opcode from rINST
     19     STORE64($result0, $result1, rOBJ)      #  vAA <- a0/a1
     20     GOTO_OPCODE(t0)                        #  jump to next instruction
     21     /* 12-13 instructions */
     22 
     23