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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 indexRegister = rx; | 274 indexRegister = rx; |
275 offset_ = offset; | 275 offset_ = offset; |
276 } | 276 } |
277 | 277 |
278 // ----------------------------------------------------------------------------- | 278 // ----------------------------------------------------------------------------- |
279 // Specific instructions, constants, and masks. | 279 // Specific instructions, constants, and masks. |
280 | 280 |
281 Assembler::Assembler(Isolate* isolate, void* buffer, int buffer_size) | 281 Assembler::Assembler(Isolate* isolate, void* buffer, int buffer_size) |
282 : AssemblerBase(isolate, buffer, buffer_size), | 282 : AssemblerBase(isolate, buffer, buffer_size), |
283 recorded_ast_id_(TypeFeedbackId::None()), | 283 recorded_ast_id_(TypeFeedbackId::None()), |
284 code_targets_(100), | 284 code_targets_(100) { |
285 positions_recorder_(this) { | |
286 reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_); | 285 reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_); |
287 | 286 |
288 last_bound_pos_ = 0; | 287 last_bound_pos_ = 0; |
289 ClearRecordedAstId(); | 288 ClearRecordedAstId(); |
290 relocations_.reserve(128); | 289 relocations_.reserve(128); |
291 } | 290 } |
292 | 291 |
293 void Assembler::GetCode(CodeDesc* desc) { | 292 void Assembler::GetCode(CodeDesc* desc) { |
294 EmitRelocations(); | 293 EmitRelocations(); |
295 | 294 |
(...skipping 2776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3072 Memory::Address_at(pc) = buffer_ + pos; | 3071 Memory::Address_at(pc) = buffer_ + pos; |
3073 } else if (RelocInfo::IsInternalReferenceEncoded(rmode)) { | 3072 } else if (RelocInfo::IsInternalReferenceEncoded(rmode)) { |
3074 // mov sequence | 3073 // mov sequence |
3075 intptr_t pos = reinterpret_cast<intptr_t>(target_address_at(pc, code)); | 3074 intptr_t pos = reinterpret_cast<intptr_t>(target_address_at(pc, code)); |
3076 set_target_address_at(isolate(), pc, code, buffer_ + pos, | 3075 set_target_address_at(isolate(), pc, code, buffer_ + pos, |
3077 SKIP_ICACHE_FLUSH); | 3076 SKIP_ICACHE_FLUSH); |
3078 } | 3077 } |
3079 | 3078 |
3080 reloc_info_writer.Write(&rinfo); | 3079 reloc_info_writer.Write(&rinfo); |
3081 } | 3080 } |
3082 | |
3083 reloc_info_writer.Finish(); | |
3084 } | 3081 } |
3085 | 3082 |
3086 } // namespace internal | 3083 } // namespace internal |
3087 } // namespace v8 | 3084 } // namespace v8 |
3088 #endif // V8_TARGET_ARCH_S390 | 3085 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |