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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 // fixup_pos. | 773 // fixup_pos. |
774 Instr instr = instr_at(fixup_pos); | 774 Instr instr = instr_at(fixup_pos); |
775 if (is_internal) { | 775 if (is_internal) { |
776 target_at_put(fixup_pos, pos, is_internal); | 776 target_at_put(fixup_pos, pos, is_internal); |
777 } else if (IsBranch(instr)) { | 777 } else if (IsBranch(instr)) { |
778 if (dist > kMaxBranchOffset) { | 778 if (dist > kMaxBranchOffset) { |
779 if (trampoline_pos == kInvalidSlotPos) { | 779 if (trampoline_pos == kInvalidSlotPos) { |
780 trampoline_pos = get_trampoline_entry(fixup_pos); | 780 trampoline_pos = get_trampoline_entry(fixup_pos); |
781 CHECK(trampoline_pos != kInvalidSlotPos); | 781 CHECK(trampoline_pos != kInvalidSlotPos); |
782 } | 782 } |
783 DCHECK((trampoline_pos - fixup_pos) <= kMaxBranchOffset); | 783 CHECK((trampoline_pos - fixup_pos) <= kMaxBranchOffset); |
784 target_at_put(fixup_pos, trampoline_pos, false); | 784 target_at_put(fixup_pos, trampoline_pos, false); |
785 fixup_pos = trampoline_pos; | 785 fixup_pos = trampoline_pos; |
786 dist = pos - fixup_pos; | 786 dist = pos - fixup_pos; |
787 } | 787 } |
788 target_at_put(fixup_pos, pos, false); | 788 target_at_put(fixup_pos, pos, false); |
789 } else { | 789 } else { |
790 DCHECK(IsJ(instr) || IsLui(instr) || IsEmittedConstant(instr)); | 790 DCHECK(IsJ(instr) || IsLui(instr) || IsEmittedConstant(instr)); |
791 target_at_put(fixup_pos, pos, false); | 791 target_at_put(fixup_pos, pos, false); |
792 } | 792 } |
793 } | 793 } |
(...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2803 ClearRecordedAstId(); | 2803 ClearRecordedAstId(); |
2804 reloc_info_writer.Write(&reloc_info_with_ast_id); | 2804 reloc_info_writer.Write(&reloc_info_with_ast_id); |
2805 } else { | 2805 } else { |
2806 reloc_info_writer.Write(&rinfo); | 2806 reloc_info_writer.Write(&rinfo); |
2807 } | 2807 } |
2808 } | 2808 } |
2809 } | 2809 } |
2810 | 2810 |
2811 | 2811 |
2812 void Assembler::BlockTrampolinePoolFor(int instructions) { | 2812 void Assembler::BlockTrampolinePoolFor(int instructions) { |
| 2813 CheckTrampolinePoolQuick(instructions); |
2813 BlockTrampolinePoolBefore(pc_offset() + instructions * kInstrSize); | 2814 BlockTrampolinePoolBefore(pc_offset() + instructions * kInstrSize); |
2814 } | 2815 } |
2815 | 2816 |
2816 | 2817 |
2817 void Assembler::CheckTrampolinePool() { | 2818 void Assembler::CheckTrampolinePool() { |
2818 // Some small sequences of instructions must not be broken up by the | 2819 // Some small sequences of instructions must not be broken up by the |
2819 // insertion of a trampoline pool; such sequences are protected by setting | 2820 // insertion of a trampoline pool; such sequences are protected by setting |
2820 // either trampoline_pool_blocked_nesting_ or no_trampoline_pool_before_, | 2821 // either trampoline_pool_blocked_nesting_ or no_trampoline_pool_before_, |
2821 // which are both checked here. Also, recursive calls to CheckTrampolinePool | 2822 // which are both checked here. Also, recursive calls to CheckTrampolinePool |
2822 // are blocked by trampoline_pool_blocked_nesting_. | 2823 // are blocked by trampoline_pool_blocked_nesting_. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2972 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { | 2973 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { |
2973 // No out-of-line constant pool support. | 2974 // No out-of-line constant pool support. |
2974 DCHECK(!FLAG_enable_ool_constant_pool); | 2975 DCHECK(!FLAG_enable_ool_constant_pool); |
2975 return; | 2976 return; |
2976 } | 2977 } |
2977 | 2978 |
2978 | 2979 |
2979 } } // namespace v8::internal | 2980 } } // namespace v8::internal |
2980 | 2981 |
2981 #endif // V8_TARGET_ARCH_MIPS64 | 2982 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |