OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 return mode == DEBUG_BREAK_SLOT; | 368 return mode == DEBUG_BREAK_SLOT; |
369 } | 369 } |
370 static inline bool IsNone(Mode mode) { | 370 static inline bool IsNone(Mode mode) { |
371 return mode == NONE32 || mode == NONE64; | 371 return mode == NONE32 || mode == NONE64; |
372 } | 372 } |
373 static inline bool IsCodeAgeSequence(Mode mode) { | 373 static inline bool IsCodeAgeSequence(Mode mode) { |
374 return mode == CODE_AGE_SEQUENCE; | 374 return mode == CODE_AGE_SEQUENCE; |
375 } | 375 } |
376 static inline int ModeMask(Mode mode) { return 1 << mode; } | 376 static inline int ModeMask(Mode mode) { return 1 << mode; } |
377 | 377 |
| 378 // Returns true if the first RelocInfo has the same mode and raw data as the |
| 379 // second one. |
| 380 static inline bool IsEqual(RelocInfo first, RelocInfo second) { |
| 381 return first.rmode() == second.rmode() && |
| 382 (first.rmode() == RelocInfo::NONE64 ? |
| 383 first.raw_data64() == second.raw_data64() : |
| 384 first.data() == second.data()); |
| 385 } |
| 386 |
378 // Accessors | 387 // Accessors |
379 byte* pc() const { return pc_; } | 388 byte* pc() const { return pc_; } |
380 void set_pc(byte* pc) { pc_ = pc; } | 389 void set_pc(byte* pc) { pc_ = pc; } |
381 Mode rmode() const { return rmode_; } | 390 Mode rmode() const { return rmode_; } |
382 intptr_t data() const { return data_; } | 391 intptr_t data() const { return data_; } |
383 double data64() const { return data64_; } | 392 double data64() const { return data64_; } |
384 uint64_t raw_data64() { | 393 uint64_t raw_data64() { |
385 return BitCast<uint64_t>(data64_); | 394 return BitCast<uint64_t>(data64_); |
386 } | 395 } |
387 Code* host() const { return host_; } | 396 Code* host() const { return host_; } |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 | 1077 |
1069 private: | 1078 private: |
1070 int32_t multiplier_; | 1079 int32_t multiplier_; |
1071 int32_t shift_; | 1080 int32_t shift_; |
1072 }; | 1081 }; |
1073 | 1082 |
1074 | 1083 |
1075 } } // namespace v8::internal | 1084 } } // namespace v8::internal |
1076 | 1085 |
1077 #endif // V8_ASSEMBLER_H_ | 1086 #endif // V8_ASSEMBLER_H_ |
OLD | NEW |