| 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 2550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2561 | 2561 |
| 2562 void Assembler::RecordComment(const char* msg, bool force) { | 2562 void Assembler::RecordComment(const char* msg, bool force) { |
| 2563 if (FLAG_code_comments || force) { | 2563 if (FLAG_code_comments || force) { |
| 2564 EnsureSpace ensure_space(this); | 2564 EnsureSpace ensure_space(this); |
| 2565 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg)); | 2565 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg)); |
| 2566 } | 2566 } |
| 2567 } | 2567 } |
| 2568 | 2568 |
| 2569 | 2569 |
| 2570 void Assembler::GrowBuffer() { | 2570 void Assembler::GrowBuffer() { |
| 2571 ASSERT(overflow()); | 2571 ASSERT(buffer_overflow()); |
| 2572 if (!own_buffer_) FATAL("external code buffer is too small"); | 2572 if (!own_buffer_) FATAL("external code buffer is too small"); |
| 2573 | 2573 |
| 2574 // Compute new buffer size. | 2574 // Compute new buffer size. |
| 2575 CodeDesc desc; // the new buffer | 2575 CodeDesc desc; // the new buffer |
| 2576 if (buffer_size_ < 4*KB) { | 2576 if (buffer_size_ < 4*KB) { |
| 2577 desc.buffer_size = 4*KB; | 2577 desc.buffer_size = 4*KB; |
| 2578 } else { | 2578 } else { |
| 2579 desc.buffer_size = 2*buffer_size_; | 2579 desc.buffer_size = 2*buffer_size_; |
| 2580 } | 2580 } |
| 2581 // Some internal data structures overflow for very large buffers, | 2581 // Some internal data structures overflow for very large buffers, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2620 for (RelocIterator it(desc); !it.done(); it.next()) { | 2620 for (RelocIterator it(desc); !it.done(); it.next()) { |
| 2621 RelocInfo::Mode rmode = it.rinfo()->rmode(); | 2621 RelocInfo::Mode rmode = it.rinfo()->rmode(); |
| 2622 if (rmode == RelocInfo::INTERNAL_REFERENCE) { | 2622 if (rmode == RelocInfo::INTERNAL_REFERENCE) { |
| 2623 int32_t* p = reinterpret_cast<int32_t*>(it.rinfo()->pc()); | 2623 int32_t* p = reinterpret_cast<int32_t*>(it.rinfo()->pc()); |
| 2624 if (*p != 0) { // 0 means uninitialized. | 2624 if (*p != 0) { // 0 means uninitialized. |
| 2625 *p += pc_delta; | 2625 *p += pc_delta; |
| 2626 } | 2626 } |
| 2627 } | 2627 } |
| 2628 } | 2628 } |
| 2629 | 2629 |
| 2630 ASSERT(!overflow()); | 2630 ASSERT(!buffer_overflow()); |
| 2631 } | 2631 } |
| 2632 | 2632 |
| 2633 | 2633 |
| 2634 void Assembler::emit_arith_b(int op1, int op2, Register dst, int imm8) { | 2634 void Assembler::emit_arith_b(int op1, int op2, Register dst, int imm8) { |
| 2635 ASSERT(is_uint8(op1) && is_uint8(op2)); // wrong opcode | 2635 ASSERT(is_uint8(op1) && is_uint8(op2)); // wrong opcode |
| 2636 ASSERT(is_uint8(imm8)); | 2636 ASSERT(is_uint8(imm8)); |
| 2637 ASSERT((op1 & 0x01) == 0); // should be 8bit operation | 2637 ASSERT((op1 & 0x01) == 0); // should be 8bit operation |
| 2638 EMIT(op1); | 2638 EMIT(op1); |
| 2639 EMIT(op2 | dst.code()); | 2639 EMIT(op2 | dst.code()); |
| 2640 EMIT(imm8); | 2640 EMIT(imm8); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2738 fprintf(coverage_log, "%s\n", file_line); | 2738 fprintf(coverage_log, "%s\n", file_line); |
| 2739 fflush(coverage_log); | 2739 fflush(coverage_log); |
| 2740 } | 2740 } |
| 2741 } | 2741 } |
| 2742 | 2742 |
| 2743 #endif | 2743 #endif |
| 2744 | 2744 |
| 2745 } } // namespace v8::internal | 2745 } } // namespace v8::internal |
| 2746 | 2746 |
| 2747 #endif // V8_TARGET_ARCH_IA32 | 2747 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |