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

Side by Side Diff: src/ia32/assembler-ia32-inl.h

Issue 54823002: Make snapshots reproducible. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Introduced Code::WipeOutHeader. 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 | Annotate | Revision Log
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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 242 }
243 243
244 244
245 Object** RelocInfo::call_object_address() { 245 Object** RelocInfo::call_object_address() {
246 ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) || 246 ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) ||
247 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); 247 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()));
248 return reinterpret_cast<Object**>(pc_ + 1); 248 return reinterpret_cast<Object**>(pc_ + 1);
249 } 249 }
250 250
251 251
252 void RelocInfo::WipeOut() {
253 if (IsEmbeddedObject(rmode_) || IsExternalReference(rmode_)) {
254 Memory::Address_at(pc_) = NULL;
255 } else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) {
256 Assembler::set_target_address_at(pc_, pc_ + sizeof(int32_t));
Erik Corry 2013/11/04 12:41:14 Why add sizeof(int32_t) here?
Sven Panne 2013/11/04 13:03:19 Because our Intel assemblers subtract this, but it
257 } else {
258 UNREACHABLE();
259 }
260 }
261
262
252 bool RelocInfo::IsPatchedReturnSequence() { 263 bool RelocInfo::IsPatchedReturnSequence() {
253 return *pc_ == kCallOpcode; 264 return *pc_ == kCallOpcode;
254 } 265 }
255 266
256 267
257 bool RelocInfo::IsPatchedDebugBreakSlotSequence() { 268 bool RelocInfo::IsPatchedDebugBreakSlotSequence() {
258 return !Assembler::IsNop(pc()); 269 return !Assembler::IsNop(pc());
259 } 270 }
260 271
261 272
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 535
525 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { 536 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) {
526 // [disp/r] 537 // [disp/r]
527 set_modrm(0, ebp); 538 set_modrm(0, ebp);
528 set_dispr(disp, rmode); 539 set_dispr(disp, rmode);
529 } 540 }
530 541
531 } } // namespace v8::internal 542 } } // namespace v8::internal
532 543
533 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ 544 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/mips/assembler-mips-inl.h » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698