summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator_mips.cc
diff options
context:
space:
mode:
authorRoland Levillain <rpl@google.com>2016-03-23 17:10:31 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-03-23 17:10:31 +0000
commit541261e66273857c638677424215de91f3d65a6f (patch)
tree8e2dd00e442612e22ba1473a49597a2ae2735e81 /compiler/optimizing/code_generator_mips.cc
parentf8a3dea642fe638f54d181b7ca280b79ee519398 (diff)
parent5b5b9319ff970979ed47d41a41283e4faeffb602 (diff)
Merge "Fix and improve shift and rotate operations."
Diffstat (limited to 'compiler/optimizing/code_generator_mips.cc')
-rw-r--r--compiler/optimizing/code_generator_mips.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/optimizing/code_generator_mips.cc b/compiler/optimizing/code_generator_mips.cc
index 4c9206320f..684d89f574 100644
--- a/compiler/optimizing/code_generator_mips.cc
+++ b/compiler/optimizing/code_generator_mips.cc
@@ -1455,9 +1455,8 @@ void InstructionCodeGeneratorMIPS::HandleShift(HBinaryOperation* instr) {
bool use_imm = rhs_location.IsConstant();
Register rhs_reg = use_imm ? ZERO : rhs_location.AsRegister<Register>();
int64_t rhs_imm = use_imm ? CodeGenerator::GetInt64ValueOf(rhs_location.GetConstant()) : 0;
- const uint32_t shift_mask = (type == Primitive::kPrimInt)
- ? kMaxIntShiftValue
- : kMaxLongShiftValue;
+ const uint32_t shift_mask =
+ (type == Primitive::kPrimInt) ? kMaxIntShiftDistance : kMaxLongShiftDistance;
const uint32_t shift_value = rhs_imm & shift_mask;
// Are the INS (Insert Bit Field) and ROTR instructions supported?
bool has_ins_rotr = codegen_->GetInstructionSetFeatures().IsMipsIsaRevGreaterThanEqual2();