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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 195061: Control profiling/debugger support from build script (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | tools/v8.xcodeproj/project.pbxproj » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after
2080 and_(object, Immediate(~kHeapObjectTagMask)); 2080 and_(object, Immediate(~kHeapObjectTagMask));
2081 movq(kScratchRegister, new_space_allocation_top); 2081 movq(kScratchRegister, new_space_allocation_top);
2082 #ifdef DEBUG 2082 #ifdef DEBUG
2083 cmpq(object, Operand(kScratchRegister, 0)); 2083 cmpq(object, Operand(kScratchRegister, 0));
2084 Check(below, "Undo allocation of non allocated memory"); 2084 Check(below, "Undo allocation of non allocated memory");
2085 #endif 2085 #endif
2086 movq(Operand(kScratchRegister, 0), object); 2086 movq(Operand(kScratchRegister, 0), object);
2087 } 2087 }
2088 2088
2089 2089
2090 #ifdef ENABLE_DEBUGGER_SUPPORT
2091 CodePatcher::CodePatcher(byte* address, int size) 2090 CodePatcher::CodePatcher(byte* address, int size)
2092 : address_(address), size_(size), masm_(address, size + Assembler::kGap) { 2091 : address_(address), size_(size), masm_(address, size + Assembler::kGap) {
2093 // Create a new macro assembler pointing to the address of the code to patch. 2092 // Create a new macro assembler pointing to the address of the code to patch.
2094 // The size is adjusted with kGap on order for the assembler to generate size 2093 // The size is adjusted with kGap on order for the assembler to generate size
2095 // bytes of instructions without failing with buffer size constraints. 2094 // bytes of instructions without failing with buffer size constraints.
2096 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2095 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2097 } 2096 }
2098 2097
2099 2098
2100 CodePatcher::~CodePatcher() { 2099 CodePatcher::~CodePatcher() {
2101 // Indicate that code has changed. 2100 // Indicate that code has changed.
2102 CPU::FlushICache(address_, size_); 2101 CPU::FlushICache(address_, size_);
2103 2102
2104 // Check that the code was patched as expected. 2103 // Check that the code was patched as expected.
2105 ASSERT(masm_.pc_ == address_ + size_); 2104 ASSERT(masm_.pc_ == address_ + size_);
2106 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2105 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2107 } 2106 }
2108 #endif // ENABLE_DEBUGGER_SUPPORT
2109 2107
2110 2108
2111 } } // namespace v8::internal 2109 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | tools/v8.xcodeproj/project.pbxproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698