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/x87/lithium-codegen-x87.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
« src/arm/constants-arm.h ('K') | « src/x87/assembler-x87.h ('k') | 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 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_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/x87/lithium-codegen-x87.h" 9 #include "src/x87/lithium-codegen-x87.h"
10 #include "src/ic.h" 10 #include "src/ic.h"
(...skipping 2386 matching lines...) Expand 10 before | Expand all | Expand 10 after
2397 // Don't base result on EFLAGS when a NaN is involved. Instead 2397 // Don't base result on EFLAGS when a NaN is involved. Instead
2398 // jump to the false block. 2398 // jump to the false block.
2399 __ j(parity_even, instr->FalseLabel(chunk_)); 2399 __ j(parity_even, instr->FalseLabel(chunk_));
2400 } else { 2400 } else {
2401 if (right->IsConstantOperand()) { 2401 if (right->IsConstantOperand()) {
2402 __ cmp(ToOperand(left), 2402 __ cmp(ToOperand(left),
2403 ToImmediate(right, instr->hydrogen()->representation())); 2403 ToImmediate(right, instr->hydrogen()->representation()));
2404 } else if (left->IsConstantOperand()) { 2404 } else if (left->IsConstantOperand()) {
2405 __ cmp(ToOperand(right), 2405 __ cmp(ToOperand(right),
2406 ToImmediate(left, instr->hydrogen()->representation())); 2406 ToImmediate(left, instr->hydrogen()->representation()));
2407 // We transposed the operands. Reverse the condition. 2407 // We commuted the operands, so commute the condition.
2408 cc = ReverseCondition(cc); 2408 cc = CommuteCondition(cc);
2409 } else { 2409 } else {
2410 __ cmp(ToRegister(left), ToOperand(right)); 2410 __ cmp(ToRegister(left), ToOperand(right));
2411 } 2411 }
2412 } 2412 }
2413 EmitBranch(instr, cc); 2413 EmitBranch(instr, cc);
2414 } 2414 }
2415 } 2415 }
2416 2416
2417 2417
2418 void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) { 2418 void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) {
(...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after
3967 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3967 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3968 } 3968 }
3969 3969
3970 3970
3971 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 3971 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
3972 Condition cc = instr->hydrogen()->allow_equality() ? above : above_equal; 3972 Condition cc = instr->hydrogen()->allow_equality() ? above : above_equal;
3973 if (instr->index()->IsConstantOperand()) { 3973 if (instr->index()->IsConstantOperand()) {
3974 __ cmp(ToOperand(instr->length()), 3974 __ cmp(ToOperand(instr->length()),
3975 ToImmediate(LConstantOperand::cast(instr->index()), 3975 ToImmediate(LConstantOperand::cast(instr->index()),
3976 instr->hydrogen()->length()->representation())); 3976 instr->hydrogen()->length()->representation()));
3977 cc = ReverseCondition(cc); 3977 cc = CommuteCondition(cc);
3978 } else if (instr->length()->IsConstantOperand()) { 3978 } else if (instr->length()->IsConstantOperand()) {
3979 __ cmp(ToOperand(instr->index()), 3979 __ cmp(ToOperand(instr->index()),
3980 ToImmediate(LConstantOperand::cast(instr->length()), 3980 ToImmediate(LConstantOperand::cast(instr->length()),
3981 instr->hydrogen()->index()->representation())); 3981 instr->hydrogen()->index()->representation()));
3982 } else { 3982 } else {
3983 __ cmp(ToRegister(instr->index()), ToOperand(instr->length())); 3983 __ cmp(ToRegister(instr->index()), ToOperand(instr->length()));
3984 } 3984 }
3985 if (FLAG_debug_code && instr->hydrogen()->skip_check()) { 3985 if (FLAG_debug_code && instr->hydrogen()->skip_check()) {
3986 Label done; 3986 Label done;
3987 __ j(NegateCondition(cc), &done, Label::kNear); 3987 __ j(NegateCondition(cc), &done, Label::kNear);
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
5678 __ bind(deferred->exit()); 5678 __ bind(deferred->exit());
5679 __ bind(&done); 5679 __ bind(&done);
5680 } 5680 }
5681 5681
5682 5682
5683 #undef __ 5683 #undef __
5684 5684
5685 } } // namespace v8::internal 5685 } } // namespace v8::internal
5686 5686
5687 #endif // V8_TARGET_ARCH_X87 5687 #endif // V8_TARGET_ARCH_X87
OLDNEW
« src/arm/constants-arm.h ('K') | « src/x87/assembler-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698