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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 #if !defined(USE_SIMULATOR) | 72 #if !defined(USE_SIMULATOR) |
73 return FUNCTION_CAST<UnaryMathFunction>(buffer); | 73 return FUNCTION_CAST<UnaryMathFunction>(buffer); |
74 #else | 74 #else |
75 fast_exp_arm_machine_code = buffer; | 75 fast_exp_arm_machine_code = buffer; |
76 return &fast_exp_simulator; | 76 return &fast_exp_simulator; |
77 #endif | 77 #endif |
78 } | 78 } |
79 | 79 |
80 #if defined(V8_HOST_ARCH_ARM) | 80 #if defined(V8_HOST_ARCH_ARM) |
81 OS::MemCopyUint8Function CreateMemCopyUint8Function( | 81 OS::MemCopyUint8Function CreateMemCopyUint8Function( |
82 OS::MemCopyUint8Function stub) { | 82 bool serializer_enabled, |
| 83 OS::MemCopyUint8Function stub) { |
83 #if defined(USE_SIMULATOR) | 84 #if defined(USE_SIMULATOR) |
84 return stub; | 85 return stub; |
85 #else | 86 #else |
86 if (Serializer::enabled() || !CpuFeatures::IsSupported(UNALIGNED_ACCESSES)) { | 87 if (serializer_enabled || !CpuFeatures::IsSupported(UNALIGNED_ACCESSES)) { |
87 return stub; | 88 return stub; |
88 } | 89 } |
89 size_t actual_size; | 90 size_t actual_size; |
90 byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true)); | 91 byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true)); |
91 if (buffer == NULL) return stub; | 92 if (buffer == NULL) return stub; |
92 | 93 |
93 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); | 94 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); |
94 | 95 |
95 Register dest = r0; | 96 Register dest = r0; |
96 Register src = r1; | 97 Register src = r1; |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 patcher.masm()->add(r0, pc, Operand(-8)); | 889 patcher.masm()->add(r0, pc, Operand(-8)); |
889 patcher.masm()->ldr(pc, MemOperand(pc, -4)); | 890 patcher.masm()->ldr(pc, MemOperand(pc, -4)); |
890 patcher.masm()->emit_code_stub_address(stub); | 891 patcher.masm()->emit_code_stub_address(stub); |
891 } | 892 } |
892 } | 893 } |
893 | 894 |
894 | 895 |
895 } } // namespace v8::internal | 896 } } // namespace v8::internal |
896 | 897 |
897 #endif // V8_TARGET_ARCH_ARM | 898 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |