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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/ia32/lithium-codegen-ia32.h" 9 #include "src/ia32/lithium-codegen-ia32.h"
10 #include "src/ic.h" 10 #include "src/ic.h"
(...skipping 2252 matching lines...) Expand 10 before | Expand all | Expand 10 after
2263 // Don't base result on EFLAGS when a NaN is involved. Instead 2263 // Don't base result on EFLAGS when a NaN is involved. Instead
2264 // jump to the false block. 2264 // jump to the false block.
2265 __ j(parity_even, instr->FalseLabel(chunk_)); 2265 __ j(parity_even, instr->FalseLabel(chunk_));
2266 } else { 2266 } else {
2267 if (right->IsConstantOperand()) { 2267 if (right->IsConstantOperand()) {
2268 __ cmp(ToOperand(left), 2268 __ cmp(ToOperand(left),
2269 ToImmediate(right, instr->hydrogen()->representation())); 2269 ToImmediate(right, instr->hydrogen()->representation()));
2270 } else if (left->IsConstantOperand()) { 2270 } else if (left->IsConstantOperand()) {
2271 __ cmp(ToOperand(right), 2271 __ cmp(ToOperand(right),
2272 ToImmediate(left, instr->hydrogen()->representation())); 2272 ToImmediate(left, instr->hydrogen()->representation()));
2273 // We transposed the operands. Reverse the condition. 2273 // We commuted the operands, so commute the condition.
2274 cc = ReverseCondition(cc); 2274 cc = CommuteCondition(cc);
2275 } else { 2275 } else {
2276 __ cmp(ToRegister(left), ToOperand(right)); 2276 __ cmp(ToRegister(left), ToOperand(right));
2277 } 2277 }
2278 } 2278 }
2279 EmitBranch(instr, cc); 2279 EmitBranch(instr, cc);
2280 } 2280 }
2281 } 2281 }
2282 2282
2283 2283
2284 void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) { 2284 void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) {
(...skipping 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after
4057 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4057 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4058 } 4058 }
4059 4059
4060 4060
4061 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 4061 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
4062 Condition cc = instr->hydrogen()->allow_equality() ? above : above_equal; 4062 Condition cc = instr->hydrogen()->allow_equality() ? above : above_equal;
4063 if (instr->index()->IsConstantOperand()) { 4063 if (instr->index()->IsConstantOperand()) {
4064 __ cmp(ToOperand(instr->length()), 4064 __ cmp(ToOperand(instr->length()),
4065 ToImmediate(LConstantOperand::cast(instr->index()), 4065 ToImmediate(LConstantOperand::cast(instr->index()),
4066 instr->hydrogen()->length()->representation())); 4066 instr->hydrogen()->length()->representation()));
4067 cc = ReverseCondition(cc); 4067 cc = CommuteCondition(cc);
4068 } else if (instr->length()->IsConstantOperand()) { 4068 } else if (instr->length()->IsConstantOperand()) {
4069 __ cmp(ToOperand(instr->index()), 4069 __ cmp(ToOperand(instr->index()),
4070 ToImmediate(LConstantOperand::cast(instr->length()), 4070 ToImmediate(LConstantOperand::cast(instr->length()),
4071 instr->hydrogen()->index()->representation())); 4071 instr->hydrogen()->index()->representation()));
4072 } else { 4072 } else {
4073 __ cmp(ToRegister(instr->index()), ToOperand(instr->length())); 4073 __ cmp(ToRegister(instr->index()), ToOperand(instr->length()));
4074 } 4074 }
4075 if (FLAG_debug_code && instr->hydrogen()->skip_check()) { 4075 if (FLAG_debug_code && instr->hydrogen()->skip_check()) {
4076 Label done; 4076 Label done;
4077 __ j(NegateCondition(cc), &done, Label::kNear); 4077 __ j(NegateCondition(cc), &done, Label::kNear);
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
5642 __ bind(deferred->exit()); 5642 __ bind(deferred->exit());
5643 __ bind(&done); 5643 __ bind(&done);
5644 } 5644 }
5645 5645
5646 5646
5647 #undef __ 5647 #undef __
5648 5648
5649 } } // namespace v8::internal 5649 } } // namespace v8::internal
5650 5650
5651 #endif // V8_TARGET_ARCH_IA32 5651 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698