Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: src/ia32/assembler-ia32.cc

Issue 922153002: Move identical code from platform specific assemblers to assembler.cc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/mips/assembler-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2611 matching lines...) Expand 10 before | Expand all | Expand 10 after
2622 EMIT(0xc4); 2622 EMIT(0xc4);
2623 EMIT(0xc0 | mm); 2623 EMIT(0xc0 | mm);
2624 EMIT(w | ((~vreg.code() & 0xf) << 3) | l | pp); 2624 EMIT(w | ((~vreg.code() & 0xf) << 3) | l | pp);
2625 } else { 2625 } else {
2626 EMIT(0xc5); 2626 EMIT(0xc5);
2627 EMIT(((~vreg.code()) << 3) | l | pp); 2627 EMIT(((~vreg.code()) << 3) | l | pp);
2628 } 2628 }
2629 } 2629 }
2630 2630
2631 2631
2632 void Assembler::RecordJSReturn() {
2633 positions_recorder()->WriteRecordedPositions();
2634 EnsureSpace ensure_space(this);
2635 RecordRelocInfo(RelocInfo::JS_RETURN);
2636 }
2637
2638
2639 void Assembler::RecordDebugBreakSlot() {
2640 positions_recorder()->WriteRecordedPositions();
2641 EnsureSpace ensure_space(this);
2642 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT);
2643 }
2644
2645
2646 void Assembler::RecordComment(const char* msg, bool force) {
2647 if (FLAG_code_comments || force) {
2648 EnsureSpace ensure_space(this);
2649 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg));
2650 }
2651 }
2652
2653
2654 void Assembler::RecordDeoptReason(const int reason, const int raw_position) {
2655 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling()) {
2656 EnsureSpace ensure_space(this);
2657 RecordRelocInfo(RelocInfo::POSITION, raw_position);
2658 RecordRelocInfo(RelocInfo::DEOPT_REASON, reason);
2659 }
2660 }
2661
2662
2663 void Assembler::GrowBuffer() { 2632 void Assembler::GrowBuffer() {
2664 DCHECK(buffer_overflow()); 2633 DCHECK(buffer_overflow());
2665 if (!own_buffer_) FATAL("external code buffer is too small"); 2634 if (!own_buffer_) FATAL("external code buffer is too small");
2666 2635
2667 // Compute new buffer size. 2636 // Compute new buffer size.
2668 CodeDesc desc; // the new buffer 2637 CodeDesc desc; // the new buffer
2669 desc.buffer_size = 2 * buffer_size_; 2638 desc.buffer_size = 2 * buffer_size_;
2670 2639
2671 // Some internal data structures overflow for very large buffers, 2640 // Some internal data structures overflow for very large buffers,
2672 // they must ensure that kMaximalBufferSize is not too large. 2641 // they must ensure that kMaximalBufferSize is not too large.
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
2847 fprintf(coverage_log, "%s\n", file_line); 2816 fprintf(coverage_log, "%s\n", file_line);
2848 fflush(coverage_log); 2817 fflush(coverage_log);
2849 } 2818 }
2850 } 2819 }
2851 2820
2852 #endif 2821 #endif
2853 2822
2854 } } // namespace v8::internal 2823 } } // namespace v8::internal
2855 2824
2856 #endif // V8_TARGET_ARCH_IA32 2825 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/mips/assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698