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

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

Issue 13932006: Replace OS::MemCopy with OS::MemMove (just as fast but more flexible). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 8 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/ia32/assembler-ia32.h ('k') | src/ia32/codegen-ia32.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 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are 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 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after
2549 2549
2550 // Clear the buffer in debug mode. Use 'int3' instructions to make 2550 // Clear the buffer in debug mode. Use 'int3' instructions to make
2551 // sure to get into problems if we ever run uninitialized code. 2551 // sure to get into problems if we ever run uninitialized code.
2552 #ifdef DEBUG 2552 #ifdef DEBUG
2553 memset(desc.buffer, 0xCC, desc.buffer_size); 2553 memset(desc.buffer, 0xCC, desc.buffer_size);
2554 #endif 2554 #endif
2555 2555
2556 // Copy the data. 2556 // Copy the data.
2557 int pc_delta = desc.buffer - buffer_; 2557 int pc_delta = desc.buffer - buffer_;
2558 int rc_delta = (desc.buffer + desc.buffer_size) - (buffer_ + buffer_size_); 2558 int rc_delta = (desc.buffer + desc.buffer_size) - (buffer_ + buffer_size_);
2559 memmove(desc.buffer, buffer_, desc.instr_size); 2559 OS::MemMove(desc.buffer, buffer_, desc.instr_size);
2560 memmove(rc_delta + reloc_info_writer.pos(), 2560 OS::MemMove(rc_delta + reloc_info_writer.pos(),
2561 reloc_info_writer.pos(), desc.reloc_size); 2561 reloc_info_writer.pos(), desc.reloc_size);
2562 2562
2563 // Switch buffers. 2563 // Switch buffers.
2564 if (isolate()->assembler_spare_buffer() == NULL && 2564 if (isolate()->assembler_spare_buffer() == NULL &&
2565 buffer_size_ == kMinimalBufferSize) { 2565 buffer_size_ == kMinimalBufferSize) {
2566 isolate()->set_assembler_spare_buffer(buffer_); 2566 isolate()->set_assembler_spare_buffer(buffer_);
2567 } else { 2567 } else {
2568 DeleteArray(buffer_); 2568 DeleteArray(buffer_);
2569 } 2569 }
2570 buffer_ = desc.buffer; 2570 buffer_ = desc.buffer;
2571 buffer_size_ = desc.buffer_size; 2571 buffer_size_ = desc.buffer_size;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2695 fprintf(coverage_log, "%s\n", file_line); 2695 fprintf(coverage_log, "%s\n", file_line);
2696 fflush(coverage_log); 2696 fflush(coverage_log);
2697 } 2697 }
2698 } 2698 }
2699 2699
2700 #endif 2700 #endif
2701 2701
2702 } } // namespace v8::internal 2702 } } // namespace v8::internal
2703 2703
2704 #endif // V8_TARGET_ARCH_IA32 2704 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698