Chromium Code Reviews| Index: src/a64/lithium-codegen-a64.cc |
| diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc |
| index 1ae2e1235fe5331555adaea22ebc7795054f03a3..a891fdf6d25f180ea991061874608d6dd9469176 100644 |
| --- a/src/a64/lithium-codegen-a64.cc |
| +++ b/src/a64/lithium-codegen-a64.cc |
| @@ -4154,10 +4154,12 @@ void LCodeGen::DoModI(LModI* instr) { |
| void LCodeGen::DoMulConstI(LMulConstI* instr) { |
|
jbramley
2014/02/03 15:46:32
Since it now handles smis, could you rename it to
|
| - // TODO(jbramley): Support smi operations (or make a separate DoMulConstS). |
| - |
| - Register result = ToRegister32(instr->result()); |
| - Register left = ToRegister32(instr->left()); |
| + ASSERT(instr->hydrogen()->representation().IsSmiOrInteger32()); |
| + bool is_smi = instr->hydrogen()->representation().IsSmi(); |
| + Register result = |
| + is_smi ? ToRegister(instr->result()) : ToRegister32(instr->result()); |
| + Register left = |
| + is_smi ? ToRegister(instr->left()) : ToRegister32(instr->left()) ; |
| int32_t right = ToInteger32(instr->right()); |
| bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow); |