| 979 | void DIVU( std::string& output ) { _sap("divu\t%s, %s") GPR_REG[DECODE_RS], GPR_REG[DECODE_RT]); } |
| 980 | |
| 981 | void disAddAddu( std::string& output, const char* name ) |
| 982 | { |
| 983 | int rd = DECODE_RD; |
| 984 | int rs = DECODE_RS; |
| 985 | int rt = DECODE_RT; |
| 986 | |
| 987 | if (disSimplify && rs == 0) |
| 988 | ssappendf(output,"move\t%s, %s",GPR_REG[rd],GPR_REG[rt]); |
| 989 | else if (disSimplify && rt == 0) |
| 990 | ssappendf(output,"move\t%s, %s",GPR_REG[rd],GPR_REG[rs]); |
| 991 | else if (disSimplify && rd == rs) |
| 992 | ssappendf(output, "%s\t%s, %s",name,GPR_REG[rd],GPR_REG[rt]); |
| 993 | else if (disSimplify && rd == rt) |
| 994 | ssappendf(output, "%s\t%s, %s",name,GPR_REG[rd],GPR_REG[rs]); |
| 995 | else |
| 996 | ssappendf(output, "%s\t%s, %s, %s",name,GPR_REG[rd], GPR_REG[rs], GPR_REG[rt]); |
| 997 | } |
| 998 | |
| 999 | void ADD( std::string& output ) { disAddAddu(output,"add"); } |
| 1000 | void ADDU( std::string& output ) { disAddAddu(output,"addu"); } |