Index: src/assembler.h |
diff --git a/src/assembler.h b/src/assembler.h |
index dd20919fcb3d558c4438596ee5f33a18578456d0..231e893a0a566d205d196e95b6723d2985de889a 100644 |
--- a/src/assembler.h |
+++ b/src/assembler.h |
@@ -365,6 +365,15 @@ class RelocInfo BASE_EMBEDDED { |
} |
static inline int ModeMask(Mode mode) { return 1 << mode; } |
+ // Returns true if the first RelocInfo has the same mode and raw data as the |
+ // second one. |
+ static inline bool IsEqual(RelocInfo first, RelocInfo second) { |
+ return first.rmode() == second.rmode() && |
+ (first.rmode() == RelocInfo::NONE64 ? |
+ first.raw_data64() == second.raw_data64() : |
+ first.data() == second.data()); |
+ } |
+ |
// Accessors |
byte* pc() const { return pc_; } |
void set_pc(byte* pc) { pc_ = pc; } |