Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index b821177882a3b49dcc90c4ba3554b41c396b4f87..a5e2972620ad4f147bcc6c80e53b98f748f9c2dc 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -5020,15 +5020,33 @@ void MacroAssembler::CallCFunction(Register function, int num_arguments) { |
} |
-bool AreAliased(Register r1, Register r2, Register r3, Register r4) { |
- if (r1.is(r2)) return true; |
- if (r1.is(r3)) return true; |
- if (r1.is(r4)) return true; |
- if (r2.is(r3)) return true; |
- if (r2.is(r4)) return true; |
- if (r3.is(r4)) return true; |
- return false; |
+#ifdef DEBUG |
+bool AreAliased(Register reg1, |
+ Register reg2, |
+ Register reg3, |
+ Register reg4, |
+ Register reg5, |
+ Register reg6, |
+ Register reg7, |
+ Register reg8) { |
+ int n_of_valid_regs = reg1.is_valid() + reg2.is_valid() + |
+ reg3.is_valid() + reg4.is_valid() + reg5.is_valid() + reg6.is_valid() + |
+ reg7.is_valid() + reg8.is_valid(); |
+ |
+ RegList regs = 0; |
+ if (reg1.is_valid()) regs |= reg1.bit(); |
+ if (reg2.is_valid()) regs |= reg2.bit(); |
+ if (reg3.is_valid()) regs |= reg3.bit(); |
+ if (reg4.is_valid()) regs |= reg4.bit(); |
+ if (reg5.is_valid()) regs |= reg5.bit(); |
+ if (reg6.is_valid()) regs |= reg6.bit(); |
+ if (reg7.is_valid()) regs |= reg7.bit(); |
+ if (reg8.is_valid()) regs |= reg8.bit(); |
+ int n_of_non_aliasing_regs = NumRegs(regs); |
+ |
+ return n_of_valid_regs != n_of_non_aliasing_regs; |
} |
+#endif |
CodePatcher::CodePatcher(byte* address, int size) |