| OLD | NEW |
| 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_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include "codegen.h" | 9 #include "codegen.h" |
| 10 #include "macro-assembler.h" | 10 #include "macro-assembler.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 | 231 |
| 232 CPU::FlushICache(buffer, actual_size); | 232 CPU::FlushICache(buffer, actual_size); |
| 233 OS::ProtectCode(buffer, actual_size); | 233 OS::ProtectCode(buffer, actual_size); |
| 234 return FUNCTION_CAST<OS::MemCopyUint8Function>(buffer); | 234 return FUNCTION_CAST<OS::MemCopyUint8Function>(buffer); |
| 235 #endif | 235 #endif |
| 236 } | 236 } |
| 237 | 237 |
| 238 | 238 |
| 239 // Convert 8 to 16. The number of character to copy must be at least 8. | 239 // Convert 8 to 16. The number of character to copy must be at least 8. |
| 240 OS::MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function( | 240 OS::MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function( |
| 241 OS::MemCopyUint16Uint8Function stub) { | 241 bool serializer_enabled, |
| 242 OS::MemCopyUint16Uint8Function stub) { |
| 242 #if defined(USE_SIMULATOR) | 243 #if defined(USE_SIMULATOR) |
| 243 return stub; | 244 return stub; |
| 244 #else | 245 #else |
| 245 if (Serializer::enabled() || !CpuFeatures::IsSupported(UNALIGNED_ACCESSES)) { | 246 if (serializer_enabled || !CpuFeatures::IsSupported(UNALIGNED_ACCESSES)) { |
| 246 return stub; | 247 return stub; |
| 247 } | 248 } |
| 248 size_t actual_size; | 249 size_t actual_size; |
| 249 byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true)); | 250 byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true)); |
| 250 if (buffer == NULL) return stub; | 251 if (buffer == NULL) return stub; |
| 251 | 252 |
| 252 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); | 253 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); |
| 253 | 254 |
| 254 Register dest = r0; | 255 Register dest = r0; |
| 255 Register src = r1; | 256 Register src = r1; |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 patcher.masm()->add(r0, pc, Operand(-8)); | 890 patcher.masm()->add(r0, pc, Operand(-8)); |
| 890 patcher.masm()->ldr(pc, MemOperand(pc, -4)); | 891 patcher.masm()->ldr(pc, MemOperand(pc, -4)); |
| 891 patcher.masm()->emit_code_stub_address(stub); | 892 patcher.masm()->emit_code_stub_address(stub); |
| 892 } | 893 } |
| 893 } | 894 } |
| 894 | 895 |
| 895 | 896 |
| 896 } } // namespace v8::internal | 897 } } // namespace v8::internal |
| 897 | 898 |
| 898 #endif // V8_TARGET_ARCH_ARM | 899 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |