Index: src/compiler/mips/instruction-selector-mips.cc |
diff --git a/src/compiler/mips/instruction-selector-mips.cc b/src/compiler/mips/instruction-selector-mips.cc |
index 3c4b378553e69a9e66060fcff69dfaafb2971062..7745717ecbd7316027bf070f51a2c6ab4fe6c512 100644 |
--- a/src/compiler/mips/instruction-selector-mips.cc |
+++ b/src/compiler/mips/instruction-selector-mips.cc |
@@ -44,11 +44,10 @@ class MipsOperandGenerator final : public OperandGenerator { |
return is_uint16(value); |
case kMipsLdc1: |
case kMipsSdc1: |
- case kCheckedLoadFloat32: |
case kCheckedLoadFloat64: |
paul.l...
2015/10/12 03:53:45
Why do you remove the kCheckedLoadFloat32/kChecked
dusan.milosavljevic
2015/10/12 14:41:52
Yes, the requirement for kCheckedLoadFloat32/kChec
|
- case kCheckedStoreFloat32: |
case kCheckedStoreFloat64: |
- return is_int16(value + kIntSize); |
+ return std::numeric_limits<int16_t>::min() <= (value + kIntSize) && |
+ std::numeric_limits<int16_t>::max() >= (value + kIntSize); |
paul.l...
2015/10/12 03:53:45
Can you explain why this is better than is_int16(v
dusan.milosavljevic
2015/10/12 14:41:52
Old check does not handle minimum offset edge cas
|
default: |
return is_int16(value); |
} |
@@ -826,6 +825,16 @@ void VisitWordCompare(InstructionSelector* selector, Node* node, |
// Match immediates on left or right side of comparison. |
if (g.CanBeImmediate(right, opcode)) { |
switch (cont->condition()) { |
+ case kEqual: |
+ case kNotEqual: |
+ if (cont->IsSet()) { |
+ VisitCompare(selector, opcode, g.UseRegister(left), |
+ g.UseImmediate(right), cont); |
+ } else { |
+ VisitCompare(selector, opcode, g.UseRegister(left), |
+ g.UseRegister(right), cont); |
+ } |
+ break; |
case kSignedLessThan: |
case kSignedGreaterThanOrEqual: |
case kUnsignedLessThan: |
@@ -840,6 +849,16 @@ void VisitWordCompare(InstructionSelector* selector, Node* node, |
} else if (g.CanBeImmediate(left, opcode)) { |
if (!commutative) cont->Commute(); |
switch (cont->condition()) { |
+ case kEqual: |
+ case kNotEqual: |
+ if (cont->IsSet()) { |
+ VisitCompare(selector, opcode, g.UseRegister(right), |
+ g.UseImmediate(left), cont); |
+ } else { |
+ VisitCompare(selector, opcode, g.UseRegister(right), |
+ g.UseRegister(left), cont); |
+ } |
+ break; |
case kSignedLessThan: |
case kSignedGreaterThanOrEqual: |
case kUnsignedLessThan: |