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

Unified Diff: src/compiler/mips64/code-generator-mips64.cc

Issue 2871663002: MIPS64: Add/fix bit insertion/extraction instrs. (Closed)
Patch Set: Remove pps variable use Created 3 years, 7 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/assembler-mips64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/mips64/code-generator-mips64.cc
diff --git a/src/compiler/mips64/code-generator-mips64.cc b/src/compiler/mips64/code-generator-mips64.cc
index 916bcbcaea253245dbf4a046b0b1e6b631fe19e5..5c666837c00e9ab783236b3c03bc4cf6aebd8287 100644
--- a/src/compiler/mips64/code-generator-mips64.cc
+++ b/src/compiler/mips64/code-generator-mips64.cc
@@ -1216,19 +1216,8 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
}
break;
case kMips64Dext: {
- int16_t pos = i.InputInt8(1);
- int16_t size = i.InputInt8(2);
- if (size > 0 && size <= 32 && pos >= 0 && pos < 32) {
- __ Dext(i.OutputRegister(), i.InputRegister(0), i.InputInt8(1),
- i.InputInt8(2));
- } else if (size > 32 && size <= 64 && pos >= 0 && pos < 32) {
- __ Dextm(i.OutputRegister(), i.InputRegister(0), i.InputInt8(1),
- i.InputInt8(2));
- } else {
- DCHECK(size > 0 && size <= 32 && pos >= 32 && pos < 64);
- __ Dextu(i.OutputRegister(), i.InputRegister(0), i.InputInt8(1),
- i.InputInt8(2));
- }
+ __ Dext(i.OutputRegister(), i.InputRegister(0), i.InputInt8(1),
+ i.InputInt8(2));
break;
}
case kMips64Dins:
@@ -2415,7 +2404,7 @@ void CodeGenerator::AssembleArchBoolean(Instruction* instr,
base::bits::IsPowerOfTwo64(i.InputOperand(1).immediate())) {
uint16_t pos =
base::bits::CountTrailingZeros64(i.InputOperand(1).immediate());
- __ ExtractBits(result, i.InputRegister(0), pos, 1);
+ __ Dext(result, i.InputRegister(0), pos, 1);
} else {
__ And(kScratchReg, i.InputRegister(0), i.InputOperand(1));
__ Sltu(result, zero_reg, kScratchReg);
« no previous file with comments | « no previous file | src/mips64/assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698