/* Basic floating-point 3-address register format: * mnemonic %fs1,%fs2,%fd */ static void flop_12d(std::ostream &stream, char *mnemonic, uint32_t pc, uint32_t insn) { char newname[256]; const char *const suffix[4] = { "ss", "sd", "ds", "dd" }; const char *prefix_d, *prefix_p; prefix_p = (insn & 0x400) ? "p" : ""; prefix_d = (insn & 0x200) ? "d." : ""; /* Special case: pf[m]am and pf[m]sm families are always pipelined, so they do not have a prefix. Also, for the pfmam and pfmsm families, replace any 'a' in the mnemonic with 'm' and prepend an 'm'. */ if ((insn & 0x7f) < 0x20) { int is_pfam = insn & 0x400; if (!is_pfam) { char *op = mnemonic; char *np = newname + 1; newname[0] = 'm'; while (*op) { if (*op == 'a') *np = 'm'; else *np = *op; np++; op++; } *np = 0; mnemonic = newname; } prefix_p = ""; } /* Special case: pfgt/pfle-- R-bit distinguishes the two. */ if ((insn & 0x7f) == 0x34) { const char *const mn[2] = { "fgt.", "fle." }; int r = (insn & 0x080) >> 7; int s = (insn & 0x100) ? 3 : 0; util::stream_format(stream, "%s%s%s%s\t%%f%d,%%f%d,%%f%d", prefix_d, prefix_p, mn[r], suffix[s], get_fsrc1 (insn), get_fsrc2 (insn), get_fdest (insn)); } else {
/* Integer (mixed) 2-address isrc1ni,fdest. */ static void int_1d(std::ostream &stream, char *mnemonic, uint32_t pc, uint32_t insn) { util::stream_format(stream, "%s\t%%r%d,%%f%d", mnemonic, get_isrc1 (insn), get_fdest (insn)); }
} /* Special case: pfgt/pfle-- R-bit distinguishes the two. */ if ((insn & 0x7f) == 0x34) { const char *const mn[2] = { "fgt.", "fle." }; int r = (insn & 0x080) >> 7; int s = (insn & 0x100) ? 3 : 0; util::stream_format(stream, "%s%s%s%s\t%%f%d,%%f%d,%%f%d", prefix_d, prefix_p, mn[r], suffix[s], get_fsrc1 (insn), get_fsrc2 (insn), get_fdest (insn)); } else { int s = (insn & 0x180) >> 7; util::stream_format(stream, "%s%s%s%s\t%%f%d,%%f%d,%%f%d", prefix_d, prefix_p, mnemonic, suffix[s], get_fsrc1 (insn), get_fsrc2 (insn), get_fdest (insn)); } } /* Floating-point 2-address register format: * mnemonic %fs1,%fd */ static void flop_1d(std::ostream &stream, char *mnemonic, uint32_t pc, uint32_t insn) { const char *const suffix[4] = { "ss", "sd", "ds", "dd" }; const char *prefix_d, *prefix_p; int s = (insn & 0x180) >> 7; prefix_p = (insn & 0x400) ? "p" : ""; prefix_d = (insn & 0x200) ? "d." : ""; util::stream_format(stream, "%s%s%s%s\t%%f%d,%%f%d", prefix_d, prefix_p, mnemonic, suffix[s], get_fsrc1 (insn), get_fdest (insn));
/* Integer (mixed) 2-address isrc1ni,fdest. */ static void int_1d(char *buf, char *mnemonic, UINT32 pc, UINT32 insn) { sprintf(buf, "%s\t%%r%d,%%f%d", mnemonic, get_isrc1 (insn), get_fdest (insn)); }