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

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

Issue 313083006: Rename ReverseCondition to CommuteCondition, a more standard term. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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
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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/x64/lithium-codegen-x64.h" 9 #include "src/x64/lithium-codegen-x64.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after
2269 if (right->IsRegister()) { 2269 if (right->IsRegister()) {
2270 __ Cmp(ToRegister(right), Smi::FromInt(value)); 2270 __ Cmp(ToRegister(right), Smi::FromInt(value));
2271 } else { 2271 } else {
2272 __ Cmp(ToOperand(right), Smi::FromInt(value)); 2272 __ Cmp(ToOperand(right), Smi::FromInt(value));
2273 } 2273 }
2274 } else if (right->IsRegister()) { 2274 } else if (right->IsRegister()) {
2275 __ cmpl(ToRegister(right), Immediate(value)); 2275 __ cmpl(ToRegister(right), Immediate(value));
2276 } else { 2276 } else {
2277 __ cmpl(ToOperand(right), Immediate(value)); 2277 __ cmpl(ToOperand(right), Immediate(value));
2278 } 2278 }
2279 // We transposed the operands. Reverse the condition. 2279 // We commuted the operands, so commute the condition.
2280 cc = ReverseCondition(cc); 2280 cc = CommuteCondition(cc);
2281 } else if (instr->hydrogen_value()->representation().IsSmi()) { 2281 } else if (instr->hydrogen_value()->representation().IsSmi()) {
2282 if (right->IsRegister()) { 2282 if (right->IsRegister()) {
2283 __ cmpp(ToRegister(left), ToRegister(right)); 2283 __ cmpp(ToRegister(left), ToRegister(right));
2284 } else { 2284 } else {
2285 __ cmpp(ToRegister(left), ToOperand(right)); 2285 __ cmpp(ToRegister(left), ToOperand(right));
2286 } 2286 }
2287 } else { 2287 } else {
2288 if (right->IsRegister()) { 2288 if (right->IsRegister()) {
2289 __ cmpl(ToRegister(left), ToRegister(right)); 2289 __ cmpl(ToRegister(left), ToRegister(right));
2290 } else { 2290 } else {
(...skipping 1820 matching lines...) Expand 10 before | Expand all | Expand 10 after
4111 4111
4112 Condition cc = instr->hydrogen()->allow_equality() ? below : below_equal; 4112 Condition cc = instr->hydrogen()->allow_equality() ? below : below_equal;
4113 if (instr->length()->IsConstantOperand()) { 4113 if (instr->length()->IsConstantOperand()) {
4114 int32_t length = ToInteger32(LConstantOperand::cast(instr->length())); 4114 int32_t length = ToInteger32(LConstantOperand::cast(instr->length()));
4115 Register index = ToRegister(instr->index()); 4115 Register index = ToRegister(instr->index());
4116 if (representation.IsSmi()) { 4116 if (representation.IsSmi()) {
4117 __ Cmp(index, Smi::FromInt(length)); 4117 __ Cmp(index, Smi::FromInt(length));
4118 } else { 4118 } else {
4119 __ cmpl(index, Immediate(length)); 4119 __ cmpl(index, Immediate(length));
4120 } 4120 }
4121 cc = ReverseCondition(cc); 4121 cc = CommuteCondition(cc);
4122 } else if (instr->index()->IsConstantOperand()) { 4122 } else if (instr->index()->IsConstantOperand()) {
4123 int32_t index = ToInteger32(LConstantOperand::cast(instr->index())); 4123 int32_t index = ToInteger32(LConstantOperand::cast(instr->index()));
4124 if (instr->length()->IsRegister()) { 4124 if (instr->length()->IsRegister()) {
4125 Register length = ToRegister(instr->length()); 4125 Register length = ToRegister(instr->length());
4126 if (representation.IsSmi()) { 4126 if (representation.IsSmi()) {
4127 __ Cmp(length, Smi::FromInt(index)); 4127 __ Cmp(length, Smi::FromInt(index));
4128 } else { 4128 } else {
4129 __ cmpl(length, Immediate(index)); 4129 __ cmpl(length, Immediate(index));
4130 } 4130 }
4131 } else { 4131 } else {
(...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after
5683 __ bind(deferred->exit()); 5683 __ bind(deferred->exit());
5684 __ bind(&done); 5684 __ bind(&done);
5685 } 5685 }
5686 5686
5687 5687
5688 #undef __ 5688 #undef __
5689 5689
5690 } } // namespace v8::internal 5690 } } // namespace v8::internal
5691 5691
5692 #endif // V8_TARGET_ARCH_X64 5692 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/arm/constants-arm.h ('K') | « src/x64/assembler-x64.h ('k') | src/x87/assembler-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698