OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 return FUNCTION_CAST<UnaryMathFunction>(buffer); | 88 return FUNCTION_CAST<UnaryMathFunction>(buffer); |
89 #else | 89 #else |
90 fast_exp_mips_machine_code = buffer; | 90 fast_exp_mips_machine_code = buffer; |
91 return &fast_exp_simulator; | 91 return &fast_exp_simulator; |
92 #endif | 92 #endif |
93 } | 93 } |
94 | 94 |
95 | 95 |
96 #if defined(V8_HOST_ARCH_MIPS) | 96 #if defined(V8_HOST_ARCH_MIPS) |
97 OS::MemCopyUint8Function CreateMemCopyUint8Function( | 97 OS::MemCopyUint8Function CreateMemCopyUint8Function( |
98 OS::MemCopyUint8Function stub) { | 98 bool serializer_enabled, |
| 99 OS::MemCopyUint8Function stub) { |
99 #if defined(USE_SIMULATOR) | 100 #if defined(USE_SIMULATOR) |
100 return stub; | 101 return stub; |
101 #else | 102 #else |
102 if (Serializer::enabled()) { | 103 if (serializer_enabled) return stub; |
103 return stub; | |
104 } | |
105 | 104 |
106 size_t actual_size; | 105 size_t actual_size; |
107 byte* buffer = static_cast<byte*>(OS::Allocate(3 * KB, &actual_size, true)); | 106 byte* buffer = static_cast<byte*>(OS::Allocate(3 * KB, &actual_size, true)); |
108 if (buffer == NULL) return stub; | 107 if (buffer == NULL) return stub; |
109 | 108 |
110 // This code assumes that cache lines are 32 bytes and if the cache line is | 109 // This code assumes that cache lines are 32 bytes and if the cache line is |
111 // larger it will not work correctly. | 110 // larger it will not work correctly. |
112 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); | 111 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); |
113 | 112 |
114 { | 113 { |
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 patcher.masm()->nop(); // Pad the empty space. | 1221 patcher.masm()->nop(); // Pad the empty space. |
1223 } | 1222 } |
1224 } | 1223 } |
1225 | 1224 |
1226 | 1225 |
1227 #undef __ | 1226 #undef __ |
1228 | 1227 |
1229 } } // namespace v8::internal | 1228 } } // namespace v8::internal |
1230 | 1229 |
1231 #endif // V8_TARGET_ARCH_MIPS | 1230 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |