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

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

Issue 60793002: MIPS: Avoid using dd() in Prologue when --optimize-for-size. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 years, 1 month 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
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 are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // 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 2013 matching lines...) Expand 10 before | Expand all | Expand 10 after
2024 } 2024 }
2025 2025
2026 2026
2027 void Assembler::dd(uint32_t data) { 2027 void Assembler::dd(uint32_t data) {
2028 CheckBuffer(); 2028 CheckBuffer();
2029 *reinterpret_cast<uint32_t*>(pc_) = data; 2029 *reinterpret_cast<uint32_t*>(pc_) = data;
2030 pc_ += sizeof(uint32_t); 2030 pc_ += sizeof(uint32_t);
2031 } 2031 }
2032 2032
2033 2033
2034 void Assembler::emit_code_stub_address(Code* stub) {
2035 CheckBuffer();
2036 *reinterpret_cast<uint32_t*>(pc_) =
2037 reinterpret_cast<uint32_t>(stub->instruction_start());
2038 pc_ += sizeof(uint32_t);
2039 }
2040
2041
2034 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { 2042 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
2035 // We do not try to reuse pool constants. 2043 // We do not try to reuse pool constants.
2036 RelocInfo rinfo(pc_, rmode, data, NULL); 2044 RelocInfo rinfo(pc_, rmode, data, NULL);
2037 if (rmode >= RelocInfo::JS_RETURN && rmode <= RelocInfo::DEBUG_BREAK_SLOT) { 2045 if (rmode >= RelocInfo::JS_RETURN && rmode <= RelocInfo::DEBUG_BREAK_SLOT) {
2038 // Adjust code for new modes. 2046 // Adjust code for new modes.
2039 ASSERT(RelocInfo::IsDebugBreakSlot(rmode) 2047 ASSERT(RelocInfo::IsDebugBreakSlot(rmode)
2040 || RelocInfo::IsJSReturn(rmode) 2048 || RelocInfo::IsJSReturn(rmode)
2041 || RelocInfo::IsComment(rmode) 2049 || RelocInfo::IsComment(rmode)
2042 || RelocInfo::IsPosition(rmode)); 2050 || RelocInfo::IsPosition(rmode));
2043 // These modes do not need an entry in the constant pool. 2051 // These modes do not need an entry in the constant pool.
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
2293 } 2301 }
2294 2302
2295 if (patched) { 2303 if (patched) {
2296 CPU::FlushICache(pc+2, sizeof(Address)); 2304 CPU::FlushICache(pc+2, sizeof(Address));
2297 } 2305 }
2298 } 2306 }
2299 2307
2300 } } // namespace v8::internal 2308 } } // namespace v8::internal
2301 2309
2302 #endif // V8_TARGET_ARCH_MIPS 2310 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698