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

Side by Side Diff: src/arm/assembler-arm.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/api.cc ('k') | src/arm/codegen-arm.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 2307 matching lines...) Expand 10 before | Expand all | Expand 10 after
2318 int sd, d; 2318 int sd, d;
2319 first.split_code(&sd, &d); 2319 first.split_code(&sd, &d);
2320 int count = last.code() - first.code() + 1; 2320 int count = last.code() - first.code() + 1;
2321 emit(cond | B27 | B26 | am | d*B22 | base.code()*B16 | sd*B12 | 2321 emit(cond | B27 | B26 | am | d*B22 | base.code()*B16 | sd*B12 |
2322 0xA*B8 | count); 2322 0xA*B8 | count);
2323 } 2323 }
2324 2324
2325 2325
2326 static void DoubleAsTwoUInt32(double d, uint32_t* lo, uint32_t* hi) { 2326 static void DoubleAsTwoUInt32(double d, uint32_t* lo, uint32_t* hi) {
2327 uint64_t i; 2327 uint64_t i;
2328 OS::MemCopy(&i, &d, 8); 2328 MemCopy(&i, &d, 8);
2329 2329
2330 *lo = i & 0xffffffff; 2330 *lo = i & 0xffffffff;
2331 *hi = i >> 32; 2331 *hi = i >> 32;
2332 } 2332 }
2333 2333
2334 2334
2335 // Only works for little endian floating point formats. 2335 // Only works for little endian floating point formats.
2336 // We don't support VFP on the mixed endian floating point platform. 2336 // We don't support VFP on the mixed endian floating point platform.
2337 static bool FitsVMOVDoubleImmediate(double d, uint32_t *encoding) { 2337 static bool FitsVMOVDoubleImmediate(double d, uint32_t *encoding) {
2338 ASSERT(CpuFeatures::IsSupported(VFP3)); 2338 ASSERT(CpuFeatures::IsSupported(VFP3));
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
3107 3107
3108 // Set up new buffer. 3108 // Set up new buffer.
3109 desc.buffer = NewArray<byte>(desc.buffer_size); 3109 desc.buffer = NewArray<byte>(desc.buffer_size);
3110 3110
3111 desc.instr_size = pc_offset(); 3111 desc.instr_size = pc_offset();
3112 desc.reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); 3112 desc.reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos();
3113 3113
3114 // Copy the data. 3114 // Copy the data.
3115 int pc_delta = desc.buffer - buffer_; 3115 int pc_delta = desc.buffer - buffer_;
3116 int rc_delta = (desc.buffer + desc.buffer_size) - (buffer_ + buffer_size_); 3116 int rc_delta = (desc.buffer + desc.buffer_size) - (buffer_ + buffer_size_);
3117 OS::MemMove(desc.buffer, buffer_, desc.instr_size); 3117 MemMove(desc.buffer, buffer_, desc.instr_size);
3118 OS::MemMove(reloc_info_writer.pos() + rc_delta, 3118 MemMove(reloc_info_writer.pos() + rc_delta, reloc_info_writer.pos(),
3119 reloc_info_writer.pos(), desc.reloc_size); 3119 desc.reloc_size);
3120 3120
3121 // Switch buffers. 3121 // Switch buffers.
3122 DeleteArray(buffer_); 3122 DeleteArray(buffer_);
3123 buffer_ = desc.buffer; 3123 buffer_ = desc.buffer;
3124 buffer_size_ = desc.buffer_size; 3124 buffer_size_ = desc.buffer_size;
3125 pc_ += pc_delta; 3125 pc_ += pc_delta;
3126 reloc_info_writer.Reposition(reloc_info_writer.pos() + rc_delta, 3126 reloc_info_writer.Reposition(reloc_info_writer.pos() + rc_delta,
3127 reloc_info_writer.last_pc() + pc_delta); 3127 reloc_info_writer.last_pc() + pc_delta);
3128 3128
3129 // None of our relocation types are pc relative pointing outside the code 3129 // None of our relocation types are pc relative pointing outside the code
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
3653 ASSERT((index_64bit == count_of_64bit_) && 3653 ASSERT((index_64bit == count_of_64bit_) &&
3654 (index_code_ptr == (index_64bit + count_of_code_ptr_)) && 3654 (index_code_ptr == (index_64bit + count_of_code_ptr_)) &&
3655 (index_heap_ptr == (index_code_ptr + count_of_heap_ptr_)) && 3655 (index_heap_ptr == (index_code_ptr + count_of_heap_ptr_)) &&
3656 (index_32bit == (index_heap_ptr + count_of_32bit_))); 3656 (index_32bit == (index_heap_ptr + count_of_32bit_)));
3657 } 3657 }
3658 3658
3659 3659
3660 } } // namespace v8::internal 3660 } } // namespace v8::internal
3661 3661
3662 #endif // V8_TARGET_ARCH_ARM 3662 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/arm/codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698