Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: src/mips64/disasm-mips64.cc

Issue 1880953002: MIPS64: Fix rotate instructions in simulator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments and add tests Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/mips64/simulator-mips64.cc » ('j') | src/mips64/simulator-mips64.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/disasm-mips64.cc
diff --git a/src/mips64/disasm-mips64.cc b/src/mips64/disasm-mips64.cc
index 3d0e10c20a586372e4fb6b2b147ab6ae56e8b8a5..a0b57ced481382c51e20479fe12475cc2cffec37 100644
--- a/src/mips64/disasm-mips64.cc
+++ b/src/mips64/disasm-mips64.cc
@@ -1162,26 +1162,22 @@ void Decoder::DecodeTypeRegisterSPECIAL(Instruction* instr) {
if (instr->RsValue() == 0) {
Format(instr, "srl 'rd, 'rt, 'sa");
} else {
- if (kArchVariant == kMips64r2) {
- Format(instr, "rotr 'rd, 'rt, 'sa");
- } else {
- Unknown(instr);
- }
+ Format(instr, "rotr 'rd, 'rt, 'sa");
}
break;
case DSRL:
if (instr->RsValue() == 0) {
Format(instr, "dsrl 'rd, 'rt, 'sa");
} else {
- if (kArchVariant == kMips64r2) {
- Format(instr, "drotr 'rd, 'rt, 'sa");
- } else {
- Unknown(instr);
- }
+ Format(instr, "drotr 'rd, 'rt, 'sa");
}
break;
case DSRL32:
- Format(instr, "dsrl32 'rd, 'rt, 'sa");
+ if (instr->RsValue() == 0) {
+ Format(instr, "dsrl32 'rd, 'rt, 'sa");
+ } else {
+ Format(instr, "drotr32 'rd, 'rt, 'sa");
+ }
break;
case SRA:
Format(instr, "sra 'rd, 'rt, 'sa");
@@ -1202,22 +1198,14 @@ void Decoder::DecodeTypeRegisterSPECIAL(Instruction* instr) {
if (instr->SaValue() == 0) {
Format(instr, "srlv 'rd, 'rt, 'rs");
} else {
- if (kArchVariant == kMips64r2) {
- Format(instr, "rotrv 'rd, 'rt, 'rs");
- } else {
- Unknown(instr);
- }
+ Format(instr, "rotrv 'rd, 'rt, 'rs");
}
break;
case DSRLV:
if (instr->SaValue() == 0) {
Format(instr, "dsrlv 'rd, 'rt, 'rs");
} else {
- if (kArchVariant == kMips64r2) {
- Format(instr, "drotrv 'rd, 'rt, 'rs");
- } else {
- Unknown(instr);
- }
+ Format(instr, "drotrv 'rd, 'rt, 'rs");
}
break;
case SRAV:
« no previous file with comments | « no previous file | src/mips64/simulator-mips64.cc » ('j') | src/mips64/simulator-mips64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698