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

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

Issue 1413463009: Implemented the Word64Clz TurboFan operator for x64, arm64, and mips64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed a typing problem, and added mips64. Created 5 years, 1 month 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 | « src/mips64/constants-mips64.h ('k') | src/mips64/simulator-mips64.cc » ('j') | no next file with comments »
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 ffab261cd11f07c05cb280a95613ae816cd43228..a8fd48e6a204767eddfd2fc344d12ed1861d79ba 100644
--- a/src/mips64/disasm-mips64.cc
+++ b/src/mips64/disasm-mips64.cc
@@ -1179,7 +1179,16 @@ void Decoder::DecodeTypeRegisterSPECIAL(Instruction* instr) {
}
break;
case MFLO:
- Format(instr, "mflo 'rd");
+ if (instr->Bits(25, 16) == 0) {
+ Format(instr, "mflo 'rd");
+ } else {
+ if ((instr->FunctionFieldRaw() == DCLZ_R6) && (instr->FdValue() == 1)) {
+ Format(instr, "dclz 'rd, 'rs");
+ } else if ((instr->FunctionFieldRaw() == DCLO_R6) &&
+ (instr->FdValue() == 1)) {
+ Format(instr, "dclo 'rd, 'rs");
+ }
+ }
break;
case D_MUL_MUH_U: // Equals to DMULTU.
if (kArchVariant != kMips64r6) {
@@ -1360,6 +1369,11 @@ void Decoder::DecodeTypeRegisterSPECIAL2(Instruction* instr) {
Format(instr, "clz 'rd, 'rs");
}
break;
+ case DCLZ:
+ if (kArchVariant != kMips64r6) {
+ Format(instr, "dclz 'rd, 'rs");
+ }
+ break;
default:
UNREACHABLE();
}
« no previous file with comments | « src/mips64/constants-mips64.h ('k') | src/mips64/simulator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698