| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 runtime_entry, | 155 runtime_entry, |
| 156 js_return, // Marks start of the ExitJSFrame code. | 156 js_return, // Marks start of the ExitJSFrame code. |
| 157 comment, | 157 comment, |
| 158 position, // See comment for kNoPosition above. | 158 position, // See comment for kNoPosition above. |
| 159 statement_position, // See comment for kNoPosition above. | 159 statement_position, // See comment for kNoPosition above. |
| 160 external_reference, // The address of an external C++ function. | 160 external_reference, // The address of an external C++ function. |
| 161 internal_reference, // An address inside the same function. | 161 internal_reference, // An address inside the same function. |
| 162 | 162 |
| 163 // add more as needed | 163 // add more as needed |
| 164 // Pseudo-types | 164 // Pseudo-types |
| 165 reloc_mode_count, // Must be no greater than 14. See RelocInfoWriter. | 165 reloc_mode_count, // must be no greater than 14 - see RelocInfoWriter |
| 166 no_reloc, // never recorded | 166 no_reloc, // never recorded |
| 167 last_code_enum = code_target, | 167 last_code_enum = code_target, |
| 168 last_gced_enum = embedded_string | 168 last_gced_enum = embedded_string |
| 169 }; | 169 }; |
| 170 | 170 |
| 171 | 171 |
| 172 inline int RelocMask(RelocMode mode) { | 172 inline int RelocMask(RelocMode mode) { |
| 173 return 1 << mode; | 173 return 1 << mode; |
| 174 } | 174 } |
| 175 | 175 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 207 |
| 208 inline bool is_position(RelocMode mode) { | 208 inline bool is_position(RelocMode mode) { |
| 209 return mode == position || mode == statement_position; | 209 return mode == position || mode == statement_position; |
| 210 } | 210 } |
| 211 | 211 |
| 212 | 212 |
| 213 inline bool is_statement_position(RelocMode mode) { | 213 inline bool is_statement_position(RelocMode mode) { |
| 214 return mode == statement_position; | 214 return mode == statement_position; |
| 215 } | 215 } |
| 216 | 216 |
| 217 |
| 217 inline bool is_external_reference(RelocMode mode) { | 218 inline bool is_external_reference(RelocMode mode) { |
| 218 return mode == external_reference; | 219 return mode == external_reference; |
| 219 } | 220 } |
| 220 | 221 |
| 221 inline bool is_internal_reference(RelocMode mode) { | 222 |
| 223 inline bool is_internal_reference(RelocMode mode) { |
| 222 return mode == internal_reference; | 224 return mode == internal_reference; |
| 223 } | 225 } |
| 224 | 226 |
| 227 |
| 225 // Relocation information consists of the address (pc) of the datum | 228 // Relocation information consists of the address (pc) of the datum |
| 226 // to which the relocation information applies, the relocation mode | 229 // to which the relocation information applies, the relocation mode |
| 227 // (rmode), and an optional data field. The relocation mode may be | 230 // (rmode), and an optional data field. The relocation mode may be |
| 228 // "descriptive" and not indicate a need for relocation, but simply | 231 // "descriptive" and not indicate a need for relocation, but simply |
| 229 // describe a property of the datum. Such rmodes are useful for GC | 232 // describe a property of the datum. Such rmodes are useful for GC |
| 230 // and nice disassembly output. | 233 // and nice disassembly output. |
| 231 | 234 |
| 232 class RelocInfo BASE_EMBEDDED { | 235 class RelocInfo BASE_EMBEDDED { |
| 233 public: | 236 public: |
| 234 RelocInfo() {} | 237 RelocInfo() {} |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 static inline bool is_uint4(int x) { return is_uintn(x, 4); } | 487 static inline bool is_uint4(int x) { return is_uintn(x, 4); } |
| 485 static inline bool is_uint5(int x) { return is_uintn(x, 5); } | 488 static inline bool is_uint5(int x) { return is_uintn(x, 5); } |
| 486 static inline bool is_uint8(int x) { return is_uintn(x, 8); } | 489 static inline bool is_uint8(int x) { return is_uintn(x, 8); } |
| 487 static inline bool is_uint12(int x) { return is_uintn(x, 12); } | 490 static inline bool is_uint12(int x) { return is_uintn(x, 12); } |
| 488 static inline bool is_uint16(int x) { return is_uintn(x, 16); } | 491 static inline bool is_uint16(int x) { return is_uintn(x, 16); } |
| 489 static inline bool is_uint24(int x) { return is_uintn(x, 24); } | 492 static inline bool is_uint24(int x) { return is_uintn(x, 24); } |
| 490 | 493 |
| 491 } } // namespace v8::internal | 494 } } // namespace v8::internal |
| 492 | 495 |
| 493 #endif // V8_ASSEMBLER_H_ | 496 #endif // V8_ASSEMBLER_H_ |
| OLD | NEW |