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

Side by Side Diff: src/x87/assembler-x87.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/x87/assembler-x87.h ('k') | no next file » | 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 1880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 1891
1892 void Assembler::setcc(Condition cc, Register reg) { 1892 void Assembler::setcc(Condition cc, Register reg) {
1893 DCHECK(reg.is_byte_register()); 1893 DCHECK(reg.is_byte_register());
1894 EnsureSpace ensure_space(this); 1894 EnsureSpace ensure_space(this);
1895 EMIT(0x0F); 1895 EMIT(0x0F);
1896 EMIT(0x90 | cc); 1896 EMIT(0x90 | cc);
1897 EMIT(0xC0 | reg.code()); 1897 EMIT(0xC0 | reg.code());
1898 } 1898 }
1899 1899
1900 1900
1901 void Assembler::RecordJSReturn() {
1902 positions_recorder()->WriteRecordedPositions();
1903 EnsureSpace ensure_space(this);
1904 RecordRelocInfo(RelocInfo::JS_RETURN);
1905 }
1906
1907
1908 void Assembler::RecordDebugBreakSlot() {
1909 positions_recorder()->WriteRecordedPositions();
1910 EnsureSpace ensure_space(this);
1911 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT);
1912 }
1913
1914
1915 void Assembler::RecordComment(const char* msg, bool force) {
1916 if (FLAG_code_comments || force) {
1917 EnsureSpace ensure_space(this);
1918 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg));
1919 }
1920 }
1921
1922
1923 void Assembler::RecordDeoptReason(const int reason, const int raw_position) {
1924 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling()) {
1925 EnsureSpace ensure_space(this);
1926 RecordRelocInfo(RelocInfo::POSITION, raw_position);
1927 RecordRelocInfo(RelocInfo::DEOPT_REASON, reason);
1928 }
1929 }
1930
1931
1932 void Assembler::GrowBuffer() { 1901 void Assembler::GrowBuffer() {
1933 DCHECK(buffer_overflow()); 1902 DCHECK(buffer_overflow());
1934 if (!own_buffer_) FATAL("external code buffer is too small"); 1903 if (!own_buffer_) FATAL("external code buffer is too small");
1935 1904
1936 // Compute new buffer size. 1905 // Compute new buffer size.
1937 CodeDesc desc; // the new buffer 1906 CodeDesc desc; // the new buffer
1938 desc.buffer_size = 2 * buffer_size_; 1907 desc.buffer_size = 2 * buffer_size_;
1939 1908
1940 // Some internal data structures overflow for very large buffers, 1909 // Some internal data structures overflow for very large buffers,
1941 // they must ensure that kMaximalBufferSize is not too large. 1910 // they must ensure that kMaximalBufferSize is not too large.
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
2099 fprintf(coverage_log, "%s\n", file_line); 2068 fprintf(coverage_log, "%s\n", file_line);
2100 fflush(coverage_log); 2069 fflush(coverage_log);
2101 } 2070 }
2102 } 2071 }
2103 2072
2104 #endif 2073 #endif
2105 2074
2106 } } // namespace v8::internal 2075 } } // namespace v8::internal
2107 2076
2108 #endif // V8_TARGET_ARCH_X87 2077 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/assembler-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698