| 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 static const int kMaxCallSize = 6; | 341 static const int kMaxCallSize = 6; |
| 342 | 342 |
| 343 // The maximum pc delta that will use the short encoding. | 343 // The maximum pc delta that will use the short encoding. |
| 344 static const int kMaxSmallPCDelta; | 344 static const int kMaxSmallPCDelta; |
| 345 | 345 |
| 346 enum Mode { | 346 enum Mode { |
| 347 // Please note the order is important (see IsCodeTarget, IsGCRelocMode). | 347 // Please note the order is important (see IsCodeTarget, IsGCRelocMode). |
| 348 CODE_TARGET, | 348 CODE_TARGET, |
| 349 CODE_TARGET_WITH_ID, | 349 CODE_TARGET_WITH_ID, |
| 350 EMBEDDED_OBJECT, | 350 EMBEDDED_OBJECT, |
| 351 // To relocate pointers into the wasm memory embedded in wasm code | 351 // Wasm entries are to relocate pointers into the wasm memory embedded in |
| 352 // wasm code. Everything after WASM_MEMORY_REFERENCE (inclusive) is not |
| 353 // GC'ed. |
| 352 WASM_MEMORY_REFERENCE, | 354 WASM_MEMORY_REFERENCE, |
| 353 WASM_GLOBAL_REFERENCE, | 355 WASM_GLOBAL_REFERENCE, |
| 354 WASM_MEMORY_SIZE_REFERENCE, | 356 WASM_MEMORY_SIZE_REFERENCE, |
| 355 WASM_FUNCTION_TABLE_SIZE_REFERENCE, | 357 WASM_FUNCTION_TABLE_SIZE_REFERENCE, |
| 356 WASM_PROTECTED_INSTRUCTION_LANDING, | 358 WASM_PROTECTED_INSTRUCTION_LANDING, |
| 357 CELL, | 359 CELL, |
| 358 | 360 |
| 359 // Everything after runtime_entry (inclusive) is not GC'ed. | |
| 360 RUNTIME_ENTRY, | 361 RUNTIME_ENTRY, |
| 361 COMMENT, | 362 COMMENT, |
| 362 | 363 |
| 363 // Additional code inserted for debug break slot. | 364 // Additional code inserted for debug break slot. |
| 364 DEBUG_BREAK_SLOT_AT_POSITION, | 365 DEBUG_BREAK_SLOT_AT_POSITION, |
| 365 DEBUG_BREAK_SLOT_AT_RETURN, | 366 DEBUG_BREAK_SLOT_AT_RETURN, |
| 366 DEBUG_BREAK_SLOT_AT_CALL, | 367 DEBUG_BREAK_SLOT_AT_CALL, |
| 367 DEBUG_BREAK_SLOT_AT_TAIL_CALL, | 368 DEBUG_BREAK_SLOT_AT_TAIL_CALL, |
| 368 | 369 |
| 369 EXTERNAL_REFERENCE, // The address of an external C++ function. | 370 EXTERNAL_REFERENCE, // The address of an external C++ function. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 389 // Pseudo-types | 390 // Pseudo-types |
| 390 NUMBER_OF_MODES, | 391 NUMBER_OF_MODES, |
| 391 NONE32, // never recorded 32-bit value | 392 NONE32, // never recorded 32-bit value |
| 392 NONE64, // never recorded 64-bit value | 393 NONE64, // never recorded 64-bit value |
| 393 CODE_AGE_SEQUENCE, // Not stored in RelocInfo array, used explictly by | 394 CODE_AGE_SEQUENCE, // Not stored in RelocInfo array, used explictly by |
| 394 // code aging. | 395 // code aging. |
| 395 | 396 |
| 396 FIRST_REAL_RELOC_MODE = CODE_TARGET, | 397 FIRST_REAL_RELOC_MODE = CODE_TARGET, |
| 397 LAST_REAL_RELOC_MODE = VENEER_POOL, | 398 LAST_REAL_RELOC_MODE = VENEER_POOL, |
| 398 LAST_CODE_ENUM = CODE_TARGET_WITH_ID, | 399 LAST_CODE_ENUM = CODE_TARGET_WITH_ID, |
| 399 LAST_GCED_ENUM = WASM_FUNCTION_TABLE_SIZE_REFERENCE, | 400 LAST_GCED_ENUM = EMBEDDED_OBJECT, |
| 400 FIRST_SHAREABLE_RELOC_MODE = CELL, | 401 FIRST_SHAREABLE_RELOC_MODE = CELL, |
| 401 }; | 402 }; |
| 402 | 403 |
| 403 STATIC_ASSERT(NUMBER_OF_MODES <= kBitsPerInt); | 404 STATIC_ASSERT(NUMBER_OF_MODES <= kBitsPerInt); |
| 404 | 405 |
| 405 RelocInfo() = default; | 406 RelocInfo() = default; |
| 406 | 407 |
| 407 RelocInfo(byte* pc, Mode rmode, intptr_t data, Code* host) | 408 RelocInfo(byte* pc, Mode rmode, intptr_t data, Code* host) |
| 408 : pc_(pc), rmode_(rmode), data_(data), host_(host) {} | 409 : pc_(pc), rmode_(rmode), data_(data), host_(host) {} |
| 409 | 410 |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 std::vector<ConstantPoolEntry> shared_entries; | 1290 std::vector<ConstantPoolEntry> shared_entries; |
| 1290 }; | 1291 }; |
| 1291 | 1292 |
| 1292 Label emitted_label_; // Records pc_offset of emitted pool | 1293 Label emitted_label_; // Records pc_offset of emitted pool |
| 1293 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES]; | 1294 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES]; |
| 1294 }; | 1295 }; |
| 1295 | 1296 |
| 1296 } // namespace internal | 1297 } // namespace internal |
| 1297 } // namespace v8 | 1298 } // namespace v8 |
| 1298 #endif // V8_ASSEMBLER_H_ | 1299 #endif // V8_ASSEMBLER_H_ |
| OLD | NEW |