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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 } else if (rmode == RelocInfo::DEOPT_REASON) { | 470 } else if (rmode == RelocInfo::DEOPT_REASON) { |
471 DCHECK(rinfo->data() < (1 << kShortDataBits)); | 471 DCHECK(rinfo->data() < (1 << kShortDataBits)); |
472 WriteShortTaggedPC(pc_delta, kLocatableTag); | 472 WriteShortTaggedPC(pc_delta, kLocatableTag); |
473 WriteShortTaggedData(rinfo->data(), kDeoptReasonTag); | 473 WriteShortTaggedData(rinfo->data(), kDeoptReasonTag); |
474 } else { | 474 } else { |
475 WriteModeAndPC(pc_delta, rmode); | 475 WriteModeAndPC(pc_delta, rmode); |
476 if (RelocInfo::IsComment(rmode)) { | 476 if (RelocInfo::IsComment(rmode)) { |
477 WriteData(rinfo->data()); | 477 WriteData(rinfo->data()); |
478 } else if (RelocInfo::IsConstPool(rmode) || | 478 } else if (RelocInfo::IsConstPool(rmode) || |
479 RelocInfo::IsVeneerPool(rmode) || RelocInfo::IsDeoptId(rmode) || | 479 RelocInfo::IsVeneerPool(rmode) || RelocInfo::IsDeoptId(rmode) || |
480 RelocInfo::IsDeoptPosition(rmode)) { | 480 RelocInfo::IsDeoptPosition(rmode) || |
| 481 RelocInfo::IsWasmProtectedLanding(rmode)) { |
481 WriteIntData(static_cast<int>(rinfo->data())); | 482 WriteIntData(static_cast<int>(rinfo->data())); |
482 } | 483 } |
483 } | 484 } |
484 last_pc_ = rinfo->pc(); | 485 last_pc_ = rinfo->pc(); |
485 last_mode_ = rmode; | 486 last_mode_ = rmode; |
486 #ifdef DEBUG | 487 #ifdef DEBUG |
487 DCHECK(begin_pos - pos_ <= kMaxSize); | 488 DCHECK(begin_pos - pos_ <= kMaxSize); |
488 #endif | 489 #endif |
489 } | 490 } |
490 | 491 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 Advance(kIntSize); | 620 Advance(kIntSize); |
620 } else if (RelocInfo::IsComment(rmode)) { | 621 } else if (RelocInfo::IsComment(rmode)) { |
621 if (SetMode(rmode)) { | 622 if (SetMode(rmode)) { |
622 AdvanceReadData(); | 623 AdvanceReadData(); |
623 return; | 624 return; |
624 } | 625 } |
625 Advance(kIntptrSize); | 626 Advance(kIntptrSize); |
626 } else if (RelocInfo::IsConstPool(rmode) || | 627 } else if (RelocInfo::IsConstPool(rmode) || |
627 RelocInfo::IsVeneerPool(rmode) || | 628 RelocInfo::IsVeneerPool(rmode) || |
628 RelocInfo::IsDeoptId(rmode) || | 629 RelocInfo::IsDeoptId(rmode) || |
629 RelocInfo::IsDeoptPosition(rmode)) { | 630 RelocInfo::IsDeoptPosition(rmode) || |
| 631 RelocInfo::IsWasmProtectedLanding(rmode)) { |
630 if (SetMode(rmode)) { | 632 if (SetMode(rmode)) { |
631 AdvanceReadInt(); | 633 AdvanceReadInt(); |
632 return; | 634 return; |
633 } | 635 } |
634 Advance(kIntSize); | 636 Advance(kIntSize); |
635 } else if (SetMode(static_cast<RelocInfo::Mode>(rmode))) { | 637 } else if (SetMode(static_cast<RelocInfo::Mode>(rmode))) { |
636 return; | 638 return; |
637 } | 639 } |
638 } | 640 } |
639 } | 641 } |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 case CODE_AGE_SEQUENCE: | 766 case CODE_AGE_SEQUENCE: |
765 return "code age sequence"; | 767 return "code age sequence"; |
766 case WASM_MEMORY_REFERENCE: | 768 case WASM_MEMORY_REFERENCE: |
767 return "wasm memory reference"; | 769 return "wasm memory reference"; |
768 case WASM_MEMORY_SIZE_REFERENCE: | 770 case WASM_MEMORY_SIZE_REFERENCE: |
769 return "wasm memory size reference"; | 771 return "wasm memory size reference"; |
770 case WASM_GLOBAL_REFERENCE: | 772 case WASM_GLOBAL_REFERENCE: |
771 return "wasm global value reference"; | 773 return "wasm global value reference"; |
772 case WASM_FUNCTION_TABLE_SIZE_REFERENCE: | 774 case WASM_FUNCTION_TABLE_SIZE_REFERENCE: |
773 return "wasm function table size reference"; | 775 return "wasm function table size reference"; |
| 776 case WASM_PROTECTED_INSTRUCTION_LANDING: |
| 777 return "wasm protected instruction landing"; |
774 case NUMBER_OF_MODES: | 778 case NUMBER_OF_MODES: |
775 case PC_JUMP: | 779 case PC_JUMP: |
776 UNREACHABLE(); | 780 UNREACHABLE(); |
777 return "number_of_modes"; | 781 return "number_of_modes"; |
778 } | 782 } |
779 return "unknown relocation type"; | 783 return "unknown relocation type"; |
780 } | 784 } |
781 | 785 |
782 | 786 |
783 void RelocInfo::Print(Isolate* isolate, std::ostream& os) { // NOLINT | 787 void RelocInfo::Print(Isolate* isolate, std::ostream& os) { // NOLINT |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 case CONST_POOL: | 866 case CONST_POOL: |
863 case VENEER_POOL: | 867 case VENEER_POOL: |
864 case DEBUG_BREAK_SLOT_AT_POSITION: | 868 case DEBUG_BREAK_SLOT_AT_POSITION: |
865 case DEBUG_BREAK_SLOT_AT_RETURN: | 869 case DEBUG_BREAK_SLOT_AT_RETURN: |
866 case DEBUG_BREAK_SLOT_AT_CALL: | 870 case DEBUG_BREAK_SLOT_AT_CALL: |
867 case DEBUG_BREAK_SLOT_AT_TAIL_CALL: | 871 case DEBUG_BREAK_SLOT_AT_TAIL_CALL: |
868 case WASM_MEMORY_REFERENCE: | 872 case WASM_MEMORY_REFERENCE: |
869 case WASM_MEMORY_SIZE_REFERENCE: | 873 case WASM_MEMORY_SIZE_REFERENCE: |
870 case WASM_GLOBAL_REFERENCE: | 874 case WASM_GLOBAL_REFERENCE: |
871 case WASM_FUNCTION_TABLE_SIZE_REFERENCE: | 875 case WASM_FUNCTION_TABLE_SIZE_REFERENCE: |
| 876 case WASM_PROTECTED_INSTRUCTION_LANDING: |
| 877 // TODO(eholk): make sure the protected instruction is in range. |
872 case NONE32: | 878 case NONE32: |
873 case NONE64: | 879 case NONE64: |
874 break; | 880 break; |
875 case NUMBER_OF_MODES: | 881 case NUMBER_OF_MODES: |
876 case PC_JUMP: | 882 case PC_JUMP: |
877 UNREACHABLE(); | 883 UNREACHABLE(); |
878 break; | 884 break; |
879 case CODE_AGE_SEQUENCE: | 885 case CODE_AGE_SEQUENCE: |
880 DCHECK(Code::IsYoungSequence(isolate, pc_) || code_age_stub()->IsCode()); | 886 DCHECK(Code::IsYoungSequence(isolate, pc_) || code_age_stub()->IsCode()); |
881 break; | 887 break; |
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1925 | 1931 |
1926 | 1932 |
1927 void Assembler::DataAlign(int m) { | 1933 void Assembler::DataAlign(int m) { |
1928 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 1934 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
1929 while ((pc_offset() & (m - 1)) != 0) { | 1935 while ((pc_offset() & (m - 1)) != 0) { |
1930 db(0); | 1936 db(0); |
1931 } | 1937 } |
1932 } | 1938 } |
1933 } // namespace internal | 1939 } // namespace internal |
1934 } // namespace v8 | 1940 } // namespace v8 |
OLD | NEW |