Index: src/compiler/instruction.h |
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h |
index 7acb3450f42ea0fdabf0fc8d2dbdfc0cbd407907..8a6a0ae92a9481f513dec2fff10cc84c08b6c060 100644 |
--- a/src/compiler/instruction.h |
+++ b/src/compiler/instruction.h |
@@ -64,6 +64,7 @@ class InstructionOperand { |
INSTRUCTION_OPERAND_PREDICATE(Allocated, ALLOCATED) |
#undef INSTRUCTION_OPERAND_PREDICATE |
+ inline bool IsAnyRegister() const; |
inline bool IsRegister() const; |
inline bool IsDoubleRegister() const; |
inline bool IsStackSlot() const; |
@@ -504,17 +505,20 @@ class AllocatedOperand : public LocationOperand { |
#undef INSTRUCTION_OPERAND_CASTS |
-bool InstructionOperand::IsRegister() const { |
+bool InstructionOperand::IsAnyRegister() const { |
return (IsAllocated() || IsExplicit()) && |
LocationOperand::cast(this)->location_kind() == |
- LocationOperand::REGISTER && |
+ LocationOperand::REGISTER; |
+} |
+ |
+ |
+bool InstructionOperand::IsRegister() const { |
+ return IsAnyRegister() && |
!IsFloatingPoint(LocationOperand::cast(this)->representation()); |
} |
bool InstructionOperand::IsDoubleRegister() const { |
- return (IsAllocated() || IsExplicit()) && |
- LocationOperand::cast(this)->location_kind() == |
- LocationOperand::REGISTER && |
+ return IsAnyRegister() && |
IsFloatingPoint(LocationOperand::cast(this)->representation()); |
} |