| Index: src/mips64/disasm-mips64.cc
|
| diff --git a/src/mips64/disasm-mips64.cc b/src/mips64/disasm-mips64.cc
|
| index a8fd48e6a204767eddfd2fc344d12ed1861d79ba..aa49deb648c0adc6a67e1bf6fe65ce0b6d872843 100644
|
| --- a/src/mips64/disasm-mips64.cc
|
| +++ b/src/mips64/disasm-mips64.cc
|
| @@ -67,6 +67,7 @@ class Decoder {
|
| // Printing of common values.
|
| void PrintRegister(int reg);
|
| void PrintFPURegister(int freg);
|
| + void PrintFPUStatusRegister(int freg);
|
| void PrintRs(Instruction* instr);
|
| void PrintRt(Instruction* instr);
|
| void PrintRd(Instruction* instr);
|
| @@ -190,6 +191,17 @@ void Decoder::PrintFPURegister(int freg) {
|
| }
|
|
|
|
|
| +void Decoder::PrintFPUStatusRegister(int freg) {
|
| + switch (freg) {
|
| + case kFCSRRegister:
|
| + Print("FCSR");
|
| + break;
|
| + default:
|
| + Print(converter_.NameOfXMMRegister(freg));
|
| + }
|
| +}
|
| +
|
| +
|
| void Decoder::PrintFs(Instruction* instr) {
|
| int freg = instr->RsValue();
|
| PrintFPURegister(freg);
|
| @@ -481,22 +493,42 @@ int Decoder::FormatRegister(Instruction* instr, const char* format) {
|
| // complexity of FormatOption.
|
| int Decoder::FormatFPURegister(Instruction* instr, const char* format) {
|
| DCHECK(format[0] == 'f');
|
| - if (format[1] == 's') { // 'fs: fs register.
|
| - int reg = instr->FsValue();
|
| - PrintFPURegister(reg);
|
| - return 2;
|
| - } else if (format[1] == 't') { // 'ft: ft register.
|
| - int reg = instr->FtValue();
|
| - PrintFPURegister(reg);
|
| - return 2;
|
| - } else if (format[1] == 'd') { // 'fd: fd register.
|
| - int reg = instr->FdValue();
|
| - PrintFPURegister(reg);
|
| - return 2;
|
| - } else if (format[1] == 'r') { // 'fr: fr register.
|
| - int reg = instr->FrValue();
|
| - PrintFPURegister(reg);
|
| - return 2;
|
| + if ((CTC1 == instr->RsFieldRaw()) || (CFC1 == instr->RsFieldRaw())) {
|
| + if (format[1] == 's') { // 'fs: fs register.
|
| + int reg = instr->FsValue();
|
| + PrintFPUStatusRegister(reg);
|
| + return 2;
|
| + } else if (format[1] == 't') { // 'ft: ft register.
|
| + int reg = instr->FtValue();
|
| + PrintFPUStatusRegister(reg);
|
| + return 2;
|
| + } else if (format[1] == 'd') { // 'fd: fd register.
|
| + int reg = instr->FdValue();
|
| + PrintFPUStatusRegister(reg);
|
| + return 2;
|
| + } else if (format[1] == 'r') { // 'fr: fr register.
|
| + int reg = instr->FrValue();
|
| + PrintFPUStatusRegister(reg);
|
| + return 2;
|
| + }
|
| + } else {
|
| + if (format[1] == 's') { // 'fs: fs register.
|
| + int reg = instr->FsValue();
|
| + PrintFPURegister(reg);
|
| + return 2;
|
| + } else if (format[1] == 't') { // 'ft: ft register.
|
| + int reg = instr->FtValue();
|
| + PrintFPURegister(reg);
|
| + return 2;
|
| + } else if (format[1] == 'd') { // 'fd: fd register.
|
| + int reg = instr->FdValue();
|
| + PrintFPURegister(reg);
|
| + return 2;
|
| + } else if (format[1] == 'r') { // 'fr: fr register.
|
| + int reg = instr->FrValue();
|
| + PrintFPURegister(reg);
|
| + return 2;
|
| + }
|
| }
|
| UNREACHABLE();
|
| return -1;
|
|
|