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

Side by Side Diff: src/a64/lithium-codegen-a64.cc

Issue 132373010: A64: Fix DoUint32ToSmi. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5420 matching lines...) Expand 10 before | Expand all | Expand 10 after
5431 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { 5431 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) {
5432 __ Ucvtf(ToDoubleRegister(instr->result()), ToRegister32(instr->value())); 5432 __ Ucvtf(ToDoubleRegister(instr->result()), ToRegister32(instr->value()));
5433 } 5433 }
5434 5434
5435 5435
5436 void LCodeGen::DoUint32ToSmi(LUint32ToSmi* instr) { 5436 void LCodeGen::DoUint32ToSmi(LUint32ToSmi* instr) {
5437 Register value = ToRegister(instr->value()); 5437 Register value = ToRegister(instr->value());
5438 Register result = ToRegister(instr->result()); 5438 Register result = ToRegister(instr->result());
5439 5439
5440 if (!instr->hydrogen()->value()->HasRange() || 5440 if (!instr->hydrogen()->value()->HasRange() ||
5441 !instr->hydrogen()->value()->range()->IsInSmiRange()) { 5441 !instr->hydrogen()->value()->range()->IsInSmiRange() ||
5442 instr->hydrogen()->value()->range()->upper() == kMaxInt) {
5443 // The Range class can't express upper bounds in the (kMaxInt, kMaxUint32]
5444 // interval, so we treat kMaxInt as a sentinel for this entire interval.
5442 DeoptimizeIfNegative(value.W(), instr->environment()); 5445 DeoptimizeIfNegative(value.W(), instr->environment());
5443 } 5446 }
5444 __ SmiTag(result, value); 5447 __ SmiTag(result, value);
5445 } 5448 }
5446 5449
5447 5450
5448 void LCodeGen::DoValueOf(LValueOf* instr) { 5451 void LCodeGen::DoValueOf(LValueOf* instr) {
5449 Register input = ToRegister(instr->value()); 5452 Register input = ToRegister(instr->value());
5450 Register result = ToRegister(instr->result()); 5453 Register result = ToRegister(instr->result());
5451 Register scratch = ToRegister(instr->temp()); 5454 Register scratch = ToRegister(instr->temp());
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
5547 __ Bind(&out_of_object); 5550 __ Bind(&out_of_object);
5548 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5551 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5549 // Index is equal to negated out of object property index plus 1. 5552 // Index is equal to negated out of object property index plus 1.
5550 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5553 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5551 __ Ldr(result, FieldMemOperand(result, 5554 __ Ldr(result, FieldMemOperand(result,
5552 FixedArray::kHeaderSize - kPointerSize)); 5555 FixedArray::kHeaderSize - kPointerSize));
5553 __ Bind(&done); 5556 __ Bind(&done);
5554 } 5557 }
5555 5558
5556 } } // namespace v8::internal 5559 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698