| 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 8bc7deb35b21ff944052ffbea976e6aee5a484f4..e2ecec8999da866edba8fb804e13c9dd71cbe37b 100644
|
| --- a/src/compiler/mips64/code-generator-mips64.cc
|
| +++ b/src/compiler/mips64/code-generator-mips64.cc
|
| @@ -768,10 +768,22 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
| i.InputInt8(2));
|
| }
|
| break;
|
| - case kMips64Dext:
|
| - __ Dext(i.OutputRegister(), i.InputRegister(0), i.InputInt8(1),
|
| - i.InputInt8(2));
|
| + 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));
|
| + }
|
| break;
|
| + }
|
| case kMips64Dins:
|
| if (instr->InputAt(1)->IsImmediate() && i.InputInt8(1) == 0) {
|
| __ Dins(i.OutputRegister(), zero_reg, i.InputInt8(1), i.InputInt8(2));
|
|
|