Revision: 21677
Author: [email protected]
Date: Wed Jun 4 14:57:51 2014 UTC
Log: Rename ReverseCondition to CommuteCondition, a more standard term.
[email protected], dcarney
BUG=
Review URL: https://codereview.chromium.org/313083006
http://code.google.com/p/v8/source/detail?r=21677
Modified:
/branches/bleeding_edge/src/arm/constants-arm.h
/branches/bleeding_edge/src/arm/lithium-codegen-arm.cc
/branches/bleeding_edge/src/arm64/constants-arm64.h
/branches/bleeding_edge/src/arm64/lithium-codegen-arm64.cc
/branches/bleeding_edge/src/ia32/assembler-ia32.h
/branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc
/branches/bleeding_edge/src/mips/constants-mips.h
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/x64/assembler-x64.h
/branches/bleeding_edge/src/x64/lithium-codegen-x64.cc
/branches/bleeding_edge/src/x87/assembler-x87.h
/branches/bleeding_edge/src/x87/lithium-codegen-x87.cc
=======================================
--- /branches/bleeding_edge/src/arm/constants-arm.h Fri May 9 12:59:24
2014 UTC
+++ /branches/bleeding_edge/src/arm/constants-arm.h Wed Jun 4 14:57:51
2014 UTC
@@ -89,8 +89,8 @@
}
-// Corresponds to transposing the operands of a comparison.
-inline Condition ReverseCondition(Condition cond) {
+// Commute a condition such that a cond b == b cond' b.
+inline Condition CommuteCondition(Condition cond) {
switch (cond) {
case lo:
return hi;
=======================================
--- /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Tue Jun 3
10:59:11 2014 UTC
+++ /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Wed Jun 4
14:57:51 2014 UTC
@@ -2404,8 +2404,8 @@
} else {
__ cmp(ToRegister(right), Operand(value));
}
- // We transposed the operands. Reverse the condition.
- cond = ReverseCondition(cond);
+ // We commuted the operands, so commute the condition.
+ cond = CommuteCondition(cond);
} else {
__ cmp(ToRegister(left), ToRegister(right));
}
@@ -4148,7 +4148,7 @@
Operand index = ToOperand(instr->index());
Register length = ToRegister(instr->length());
__ cmp(length, index);
- cc = ReverseCondition(cc);
+ cc = CommuteCondition(cc);
} else {
Register index = ToRegister(instr->index());
Operand length = ToOperand(instr->length());
=======================================
--- /branches/bleeding_edge/src/arm64/constants-arm64.h Wed Jun 4 13:40:52
2014 UTC
+++ /branches/bleeding_edge/src/arm64/constants-arm64.h Wed Jun 4 14:57:51
2014 UTC
@@ -265,8 +265,8 @@
return static_cast<Condition>(cond ^ 1);
}
-// Corresponds to transposing the operands of a comparison.
-inline Condition ReverseCondition(Condition cond) {
+// Commute a condition such that a cond b == b cond' b.
+inline Condition CommuteCondition(Condition cond) {
switch (cond) {
case lo:
return hi;
=======================================
--- /branches/bleeding_edge/src/arm64/lithium-codegen-arm64.cc Wed Jun 4
13:40:52 2014 UTC
+++ /branches/bleeding_edge/src/arm64/lithium-codegen-arm64.cc Wed Jun 4
14:57:51 2014 UTC
@@ -1848,7 +1848,7 @@
Operand index = ToOperand32I(instr->index());
Register length = ToRegister32(instr->length());
__ Cmp(length, index);
- cond = ReverseCondition(cond);
+ cond = CommuteCondition(cond);
} else {
Register index = ToRegister32(instr->index());
Operand length = ToOperand32I(instr->length());
@@ -2486,10 +2486,10 @@
__ Fcmp(ToDoubleRegister(left),
ToDouble(LConstantOperand::cast(right)));
} else if (left->IsConstantOperand()) {
- // Transpose the operands and reverse the condition.
+ // Commute the operands and the condition.
__ Fcmp(ToDoubleRegister(right),
ToDouble(LConstantOperand::cast(left)));
- cond = ReverseCondition(cond);
+ cond = CommuteCondition(cond);
} else {
__ Fcmp(ToDoubleRegister(left), ToDoubleRegister(right));
}
@@ -2506,9 +2506,9 @@
ToRegister32(left),
ToOperand32I(right));
} else {
- // Transpose the operands and reverse the condition.
+ // Commute the operands and the condition.
EmitCompareAndBranch(instr,
- ReverseCondition(cond),
+ CommuteCondition(cond),
ToRegister32(right),
ToOperand32I(left));
}
@@ -2521,10 +2521,10 @@
ToRegister(left),
Operand(Smi::FromInt(value)));
} else if (left->IsConstantOperand()) {
- // Transpose the operands and reverse the condition.
+ // Commute the operands and the condition.
int32_t value = ToInteger32(LConstantOperand::cast(left));
EmitCompareAndBranch(instr,
- ReverseCondition(cond),
+ CommuteCondition(cond),
ToRegister(right),
Operand(Smi::FromInt(value)));
} else {
=======================================
--- /branches/bleeding_edge/src/ia32/assembler-ia32.h Tue Jun 3 08:12:43
2014 UTC
+++ /branches/bleeding_edge/src/ia32/assembler-ia32.h Wed Jun 4 14:57:51
2014 UTC
@@ -246,8 +246,8 @@
}
-// Corresponds to transposing the operands of a comparison.
-inline Condition ReverseCondition(Condition cc) {
+// Commute a condition such that a cond b == b cond' b.
+inline Condition CommuteCondition(Condition cc) {
switch (cc) {
case below:
return above;
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Tue Jun 3
10:59:11 2014 UTC
+++ /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Wed Jun 4
14:57:51 2014 UTC
@@ -2270,8 +2270,8 @@
} else if (left->IsConstantOperand()) {
__ cmp(ToOperand(right),
ToImmediate(left, instr->hydrogen()->representation()));
- // We transposed the operands. Reverse the condition.
- cc = ReverseCondition(cc);
+ // We commuted the operands, so commute the condition.
+ cc = CommuteCondition(cc);
} else {
__ cmp(ToRegister(left), ToOperand(right));
}
@@ -4064,7 +4064,7 @@
__ cmp(ToOperand(instr->length()),
ToImmediate(LConstantOperand::cast(instr->index()),
instr->hydrogen()->length()->representation()));
- cc = ReverseCondition(cc);
+ cc = CommuteCondition(cc);
} else if (instr->length()->IsConstantOperand()) {
__ cmp(ToOperand(instr->index()),
ToImmediate(LConstantOperand::cast(instr->length()),
=======================================
--- /branches/bleeding_edge/src/mips/constants-mips.h Fri May 9 12:59:24
2014 UTC
+++ /branches/bleeding_edge/src/mips/constants-mips.h Wed Jun 4 14:57:51
2014 UTC
@@ -504,7 +504,8 @@
}
-inline Condition ReverseCondition(Condition cc) {
+// Commute a condition such that a cond b == b cond' b.
+inline Condition CommuteCondition(Condition cc) {
switch (cc) {
case Uless:
return Ugreater;
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue Jun 3
19:23:10 2014 UTC
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Wed Jun 4
14:57:51 2014 UTC
@@ -2324,8 +2324,8 @@
cmp_left = ToRegister(right);
cmp_right = Operand(value);
}
- // We transposed the operands. Reverse the condition.
- cond = ReverseCondition(cond);
+ // We commuted the operands, so commute the condition.
+ cond = CommuteCondition(cond);
} else {
cmp_left = ToRegister(left);
cmp_right = Operand(ToRegister(right));
@@ -4142,7 +4142,7 @@
if (instr->index()->IsConstantOperand()) {
operand = ToOperand(instr->index());
reg = ToRegister(instr->length());
- cc = ReverseCondition(cc);
+ cc = CommuteCondition(cc);
} else {
reg = ToRegister(instr->index());
operand = ToOperand(instr->length());
=======================================
--- /branches/bleeding_edge/src/x64/assembler-x64.h Tue Jun 3 08:12:43
2014 UTC
+++ /branches/bleeding_edge/src/x64/assembler-x64.h Wed Jun 4 14:57:51
2014 UTC
@@ -326,8 +326,8 @@
}
-// Corresponds to transposing the operands of a comparison.
-inline Condition ReverseCondition(Condition cc) {
+// Commute a condition such that a cond b == b cond' b.
+inline Condition CommuteCondition(Condition cc) {
switch (cc) {
case below:
return above;
=======================================
--- /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Tue Jun 3
10:59:11 2014 UTC
+++ /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Wed Jun 4
14:57:51 2014 UTC
@@ -2276,8 +2276,8 @@
} else {
__ cmpl(ToOperand(right), Immediate(value));
}
- // We transposed the operands. Reverse the condition.
- cc = ReverseCondition(cc);
+ // We commuted the operands, so commute the condition.
+ cc = CommuteCondition(cc);
} else if (instr->hydrogen_value()->representation().IsSmi()) {
if (right->IsRegister()) {
__ cmpp(ToRegister(left), ToRegister(right));
@@ -4118,7 +4118,7 @@
} else {
__ cmpl(index, Immediate(length));
}
- cc = ReverseCondition(cc);
+ cc = CommuteCondition(cc);
} else if (instr->index()->IsConstantOperand()) {
int32_t index = ToInteger32(LConstantOperand::cast(instr->index()));
if (instr->length()->IsRegister()) {
=======================================
--- /branches/bleeding_edge/src/x87/assembler-x87.h Tue Jun 3 08:12:43
2014 UTC
+++ /branches/bleeding_edge/src/x87/assembler-x87.h Wed Jun 4 14:57:51
2014 UTC
@@ -238,8 +238,8 @@
}
-// Corresponds to transposing the operands of a comparison.
-inline Condition ReverseCondition(Condition cc) {
+// Commute a condition such that a cond b == b cond' b.
+inline Condition CommuteCondition(Condition cc) {
switch (cc) {
case below:
return above;
=======================================
--- /branches/bleeding_edge/src/x87/lithium-codegen-x87.cc Wed Jun 4
09:27:16 2014 UTC
+++ /branches/bleeding_edge/src/x87/lithium-codegen-x87.cc Wed Jun 4
14:57:51 2014 UTC
@@ -2404,8 +2404,8 @@
} else if (left->IsConstantOperand()) {
__ cmp(ToOperand(right),
ToImmediate(left, instr->hydrogen()->representation()));
- // We transposed the operands. Reverse the condition.
- cc = ReverseCondition(cc);
+ // We commuted the operands, so commute the condition.
+ cc = CommuteCondition(cc);
} else {
__ cmp(ToRegister(left), ToOperand(right));
}
@@ -3974,7 +3974,7 @@
__ cmp(ToOperand(instr->length()),
ToImmediate(LConstantOperand::cast(instr->index()),
instr->hydrogen()->length()->representation()));
- cc = ReverseCondition(cc);
+ cc = CommuteCondition(cc);
} else if (instr->length()->IsConstantOperand()) {
__ cmp(ToOperand(instr->index()),
ToImmediate(LConstantOperand::cast(instr->length()),
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.