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

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

Issue 288383002: Allow comparison in UINT32 mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-uint32-analysis.cc » ('j') | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "arm64/lithium-codegen-arm64.h" 7 #include "arm64/lithium-codegen-arm64.h"
8 #include "arm64/lithium-gap-resolver-arm64.h" 8 #include "arm64/lithium-gap-resolver-arm64.h"
9 #include "code-stubs.h" 9 #include "code-stubs.h"
10 #include "stub-cache.h" 10 #include "stub-cache.h"
(...skipping 2411 matching lines...) Expand 10 before | Expand all | Expand 10 after
2422 __ Ldr(scratch, FieldMemOperand(value, HeapNumber::kValueOffset)); 2422 __ Ldr(scratch, FieldMemOperand(value, HeapNumber::kValueOffset));
2423 __ JumpIfMinusZero(scratch, instr->TrueLabel(chunk())); 2423 __ JumpIfMinusZero(scratch, instr->TrueLabel(chunk()));
2424 } 2424 }
2425 EmitGoto(instr->FalseDestination(chunk())); 2425 EmitGoto(instr->FalseDestination(chunk()));
2426 } 2426 }
2427 2427
2428 2428
2429 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { 2429 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) {
2430 LOperand* left = instr->left(); 2430 LOperand* left = instr->left();
2431 LOperand* right = instr->right(); 2431 LOperand* right = instr->right();
2432 Condition cond = TokenToCondition(instr->op(), false); 2432 bool is_unsigned = instr->hydrogen()->CheckFlag(HInstruction::kUint32);
2433 Condition cond = TokenToCondition(instr->op(), is_unsigned);
2433 2434
2434 if (left->IsConstantOperand() && right->IsConstantOperand()) { 2435 if (left->IsConstantOperand() && right->IsConstantOperand()) {
2435 // We can statically evaluate the comparison. 2436 // We can statically evaluate the comparison.
2436 double left_val = ToDouble(LConstantOperand::cast(left)); 2437 double left_val = ToDouble(LConstantOperand::cast(left));
2437 double right_val = ToDouble(LConstantOperand::cast(right)); 2438 double right_val = ToDouble(LConstantOperand::cast(right));
2438 int next_block = EvalComparison(instr->op(), left_val, right_val) ? 2439 int next_block = EvalComparison(instr->op(), left_val, right_val) ?
2439 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); 2440 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_);
2440 EmitGoto(next_block); 2441 EmitGoto(next_block);
2441 } else { 2442 } else {
2442 if (instr->is_double()) { 2443 if (instr->is_double()) {
(...skipping 3568 matching lines...) Expand 10 before | Expand all | Expand 10 after
6011 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 6012 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
6012 // Index is equal to negated out of object property index plus 1. 6013 // Index is equal to negated out of object property index plus 1.
6013 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 6014 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
6014 __ Ldr(result, FieldMemOperand(result, 6015 __ Ldr(result, FieldMemOperand(result,
6015 FixedArray::kHeaderSize - kPointerSize)); 6016 FixedArray::kHeaderSize - kPointerSize));
6016 __ Bind(deferred->exit()); 6017 __ Bind(deferred->exit());
6017 __ Bind(&done); 6018 __ Bind(&done);
6018 } 6019 }
6019 6020
6020 } } // namespace v8::internal 6021 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-uint32-analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698