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

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

Issue 306473004: Reland 21502 - "Move OS::MemCopy and OS::MemMove out of platform to utils" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/v8.cc ('k') | src/x87/assembler-x87.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "macro-assembler.h" 9 #include "macro-assembler.h"
10 #include "serialize.h" 10 #include "serialize.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 // Clear the buffer in debug mode. Use 'int3' instructions to make 354 // Clear the buffer in debug mode. Use 'int3' instructions to make
355 // sure to get into problems if we ever run uninitialized code. 355 // sure to get into problems if we ever run uninitialized code.
356 #ifdef DEBUG 356 #ifdef DEBUG
357 memset(desc.buffer, 0xCC, desc.buffer_size); 357 memset(desc.buffer, 0xCC, desc.buffer_size);
358 #endif 358 #endif
359 359
360 // Copy the data. 360 // Copy the data.
361 intptr_t pc_delta = desc.buffer - buffer_; 361 intptr_t pc_delta = desc.buffer - buffer_;
362 intptr_t rc_delta = (desc.buffer + desc.buffer_size) - 362 intptr_t rc_delta = (desc.buffer + desc.buffer_size) -
363 (buffer_ + buffer_size_); 363 (buffer_ + buffer_size_);
364 OS::MemMove(desc.buffer, buffer_, desc.instr_size); 364 MemMove(desc.buffer, buffer_, desc.instr_size);
365 OS::MemMove(rc_delta + reloc_info_writer.pos(), 365 MemMove(rc_delta + reloc_info_writer.pos(), reloc_info_writer.pos(),
366 reloc_info_writer.pos(), desc.reloc_size); 366 desc.reloc_size);
367 367
368 // Switch buffers. 368 // Switch buffers.
369 if (isolate() != NULL && 369 if (isolate() != NULL &&
370 isolate()->assembler_spare_buffer() == NULL && 370 isolate()->assembler_spare_buffer() == NULL &&
371 buffer_size_ == kMinimalBufferSize) { 371 buffer_size_ == kMinimalBufferSize) {
372 isolate()->set_assembler_spare_buffer(buffer_); 372 isolate()->set_assembler_spare_buffer(buffer_);
373 } else { 373 } else {
374 DeleteArray(buffer_); 374 DeleteArray(buffer_);
375 } 375 }
376 buffer_ = desc.buffer; 376 buffer_ = desc.buffer;
(...skipping 2593 matching lines...) Expand 10 before | Expand all | Expand 10 after
2970 2970
2971 2971
2972 bool RelocInfo::IsInConstantPool() { 2972 bool RelocInfo::IsInConstantPool() {
2973 return false; 2973 return false;
2974 } 2974 }
2975 2975
2976 2976
2977 } } // namespace v8::internal 2977 } } // namespace v8::internal
2978 2978
2979 #endif // V8_TARGET_ARCH_X64 2979 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/v8.cc ('k') | src/x87/assembler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698