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

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

Issue 2178093003: [snapshot] do not embed string addresses in code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: . Created 4 years, 4 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/mips/simulator-mips.cc ('k') | src/mips64/disasm-mips64.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 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 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2218 void Assembler::stop(const char* msg, uint32_t code) { 2218 void Assembler::stop(const char* msg, uint32_t code) {
2219 DCHECK(code > kMaxWatchpointCode); 2219 DCHECK(code > kMaxWatchpointCode);
2220 DCHECK(code <= kMaxStopCode); 2220 DCHECK(code <= kMaxStopCode);
2221 #if defined(V8_HOST_ARCH_MIPS) || defined(V8_HOST_ARCH_MIPS64) 2221 #if defined(V8_HOST_ARCH_MIPS) || defined(V8_HOST_ARCH_MIPS64)
2222 break_(0x54321); 2222 break_(0x54321);
2223 #else // V8_HOST_ARCH_MIPS 2223 #else // V8_HOST_ARCH_MIPS
2224 BlockTrampolinePoolFor(3); 2224 BlockTrampolinePoolFor(3);
2225 // The Simulator will handle the stop instruction and get the message address. 2225 // The Simulator will handle the stop instruction and get the message address.
2226 // On MIPS stop() is just a special kind of break_(). 2226 // On MIPS stop() is just a special kind of break_().
2227 break_(code, true); 2227 break_(code, true);
2228 emit(reinterpret_cast<uint64_t>(msg)); 2228 // Do not embed the message string address! We used to do this, but that
2229 // made snapshots created from position-independent executable builds
2230 // non-deterministic.
2231 // TODO(yangguo): remove this field entirely.
2232 nop();
2229 #endif 2233 #endif
2230 } 2234 }
2231 2235
2232 2236
2233 void Assembler::tge(Register rs, Register rt, uint16_t code) { 2237 void Assembler::tge(Register rs, Register rt, uint16_t code) {
2234 DCHECK(is_uint10(code)); 2238 DCHECK(is_uint10(code));
2235 Instr instr = SPECIAL | TGE | rs.code() << kRsShift 2239 Instr instr = SPECIAL | TGE | rs.code() << kRsShift
2236 | rt.code() << kRtShift | code << 6; 2240 | rt.code() << kRtShift | code << 6;
2237 emit(instr); 2241 emit(instr);
2238 } 2242 }
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
3441 3445
3442 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { 3446 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
3443 Assembler::FlushICache(isolate, pc, 4 * Assembler::kInstrSize); 3447 Assembler::FlushICache(isolate, pc, 4 * Assembler::kInstrSize);
3444 } 3448 }
3445 } 3449 }
3446 3450
3447 } // namespace internal 3451 } // namespace internal
3448 } // namespace v8 3452 } // namespace v8
3449 3453
3450 #endif // V8_TARGET_ARCH_MIPS64 3454 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/simulator-mips.cc ('k') | src/mips64/disasm-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698