| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index 9dca6b3e20a4fccd4f006cf20c110784eb44d538..483d537568bf533f6ade68c75532fbad5c18d5de 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -4479,6 +4479,22 @@ void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) {
|
| }
|
|
|
|
|
| +void LCodeGen::DoUint32ToSmi(LUint32ToSmi* instr) {
|
| + LOperand* input = instr->value();
|
| + ASSERT(input->IsRegister());
|
| + LOperand* output = instr->result();
|
| + if (!instr->hydrogen()->value()->HasRange() ||
|
| + !instr->hydrogen()->value()->range()->IsInSmiRange() ||
|
| + instr->hydrogen()->value()->range()->upper() == kMaxInt) {
|
| + // The Range class can't express upper bounds in the (kMaxInt, kMaxUint32]
|
| + // interval, so we treat kMaxInt as a sentinel for this entire interval.
|
| + __ testl(ToRegister(input), Immediate(0x80000000));
|
| + DeoptimizeIf(not_zero, instr->environment());
|
| + }
|
| + __ Integer32ToSmi(ToRegister(output), ToRegister(input));
|
| +}
|
| +
|
| +
|
| void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
|
| LOperand* input = instr->value();
|
| ASSERT(input->IsRegister() && input->Equals(instr->result()));
|
|
|