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 | 5 // modification, are permitted provided that the following conditions |
6 // are met: | 6 // are 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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 return false; | 1072 return false; |
1073 } | 1073 } |
1074 | 1074 |
1075 | 1075 |
1076 // We have to use the temporary register for things that can be relocated even | 1076 // We have to use the temporary register for things that can be relocated even |
1077 // if they can be encoded in the ARM's 12 bits of immediate-offset instruction | 1077 // if they can be encoded in the ARM's 12 bits of immediate-offset instruction |
1078 // space. There is no guarantee that the relocated location can be similarly | 1078 // space. There is no guarantee that the relocated location can be similarly |
1079 // encoded. | 1079 // encoded. |
1080 bool Operand::must_output_reloc_info(const Assembler* assembler) const { | 1080 bool Operand::must_output_reloc_info(const Assembler* assembler) const { |
1081 if (rmode_ == RelocInfo::EXTERNAL_REFERENCE) { | 1081 if (rmode_ == RelocInfo::EXTERNAL_REFERENCE) { |
1082 #ifdef DEBUG | |
1083 if (!Serializer::enabled()) { | |
1084 Serializer::TooLateToEnableNow(); | |
1085 } | |
1086 #endif // def DEBUG | |
1087 if (assembler != NULL && assembler->predictable_code_size()) return true; | 1082 if (assembler != NULL && assembler->predictable_code_size()) return true; |
1088 return Serializer::enabled(); | 1083 return Serializer::enabled(); |
1089 } else if (RelocInfo::IsNone(rmode_)) { | 1084 } else if (RelocInfo::IsNone(rmode_)) { |
1090 return false; | 1085 return false; |
1091 } | 1086 } |
1092 return true; | 1087 return true; |
1093 } | 1088 } |
1094 | 1089 |
1095 | 1090 |
1096 static bool use_mov_immediate_load(const Operand& x, | 1091 static bool use_mov_immediate_load(const Operand& x, |
(...skipping 2163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3260 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { | 3255 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { |
3261 RelocInfo rinfo(pc_, rmode, data, NULL); | 3256 RelocInfo rinfo(pc_, rmode, data, NULL); |
3262 RecordRelocInfo(rinfo); | 3257 RecordRelocInfo(rinfo); |
3263 } | 3258 } |
3264 | 3259 |
3265 | 3260 |
3266 void Assembler::RecordRelocInfo(const RelocInfo& rinfo) { | 3261 void Assembler::RecordRelocInfo(const RelocInfo& rinfo) { |
3267 if (!RelocInfo::IsNone(rinfo.rmode())) { | 3262 if (!RelocInfo::IsNone(rinfo.rmode())) { |
3268 // Don't record external references unless the heap will be serialized. | 3263 // Don't record external references unless the heap will be serialized. |
3269 if (rinfo.rmode() == RelocInfo::EXTERNAL_REFERENCE) { | 3264 if (rinfo.rmode() == RelocInfo::EXTERNAL_REFERENCE) { |
3270 #ifdef DEBUG | |
3271 if (!Serializer::enabled()) { | |
3272 Serializer::TooLateToEnableNow(); | |
3273 } | |
3274 #endif | |
3275 if (!Serializer::enabled() && !emit_debug_code()) { | 3265 if (!Serializer::enabled() && !emit_debug_code()) { |
3276 return; | 3266 return; |
3277 } | 3267 } |
3278 } | 3268 } |
3279 ASSERT(buffer_space() >= kMaxRelocSize); // too late to grow buffer here | 3269 ASSERT(buffer_space() >= kMaxRelocSize); // too late to grow buffer here |
3280 if (rinfo.rmode() == RelocInfo::CODE_TARGET_WITH_ID) { | 3270 if (rinfo.rmode() == RelocInfo::CODE_TARGET_WITH_ID) { |
3281 RelocInfo reloc_info_with_ast_id(rinfo.pc(), | 3271 RelocInfo reloc_info_with_ast_id(rinfo.pc(), |
3282 rinfo.rmode(), | 3272 rinfo.rmode(), |
3283 RecordedAstId().ToInt(), | 3273 RecordedAstId().ToInt(), |
3284 NULL); | 3274 NULL); |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3733 ASSERT((index_64bit == count_of_64bit_) && | 3723 ASSERT((index_64bit == count_of_64bit_) && |
3734 (index_code_ptr == (index_64bit + count_of_code_ptr_)) && | 3724 (index_code_ptr == (index_64bit + count_of_code_ptr_)) && |
3735 (index_heap_ptr == (index_code_ptr + count_of_heap_ptr_)) && | 3725 (index_heap_ptr == (index_code_ptr + count_of_heap_ptr_)) && |
3736 (index_32bit == (index_heap_ptr + count_of_32bit_))); | 3726 (index_32bit == (index_heap_ptr + count_of_32bit_))); |
3737 } | 3727 } |
3738 | 3728 |
3739 | 3729 |
3740 } } // namespace v8::internal | 3730 } } // namespace v8::internal |
3741 | 3731 |
3742 #endif // V8_TARGET_ARCH_ARM | 3732 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |