| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 void CPU::Setup() { | 44 void CPU::Setup() { |
| 45 CpuFeatures::Probe(true); | 45 CpuFeatures::Probe(true); |
| 46 if (!CpuFeatures::IsSupported(VFP3) || Serializer::enabled()) { | 46 if (!CpuFeatures::IsSupported(VFP3) || Serializer::enabled()) { |
| 47 V8::DisableCrankshaft(); | 47 V8::DisableCrankshaft(); |
| 48 } | 48 } |
| 49 } | 49 } |
| 50 | 50 |
| 51 | 51 |
| 52 void CPU::FlushICache(void* start, size_t size) { | 52 void CPU::FlushICache(void* start, size_t size) { |
| 53 // Nothing to do flushing no instructions. |
| 54 if (size == 0) { |
| 55 return; |
| 56 } |
| 57 |
| 53 #if defined (USE_SIMULATOR) | 58 #if defined (USE_SIMULATOR) |
| 54 // Not generating ARM instructions for C-code. This means that we are | 59 // Not generating ARM instructions for C-code. This means that we are |
| 55 // building an ARM emulator based target. We should notify the simulator | 60 // building an ARM emulator based target. We should notify the simulator |
| 56 // that the Icache was flushed. | 61 // that the Icache was flushed. |
| 57 // None of this code ends up in the snapshot so there are no issues | 62 // None of this code ends up in the snapshot so there are no issues |
| 58 // around whether or not to generate the code when building snapshots. | 63 // around whether or not to generate the code when building snapshots. |
| 59 Simulator::FlushICache(start, size); | 64 Simulator::FlushICache(start, size); |
| 60 #else | 65 #else |
| 61 // Ideally, we would call | 66 // Ideally, we would call |
| 62 // syscall(__ARM_NR_cacheflush, start, | 67 // syscall(__ARM_NR_cacheflush, start, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 #if !defined (__arm__) || !defined(CAN_USE_ARMV5_INSTRUCTIONS) | 138 #if !defined (__arm__) || !defined(CAN_USE_ARMV5_INSTRUCTIONS) |
| 134 UNIMPLEMENTED(); // when building ARM emulator target | 139 UNIMPLEMENTED(); // when building ARM emulator target |
| 135 #else | 140 #else |
| 136 asm volatile("bkpt 0"); | 141 asm volatile("bkpt 0"); |
| 137 #endif | 142 #endif |
| 138 } | 143 } |
| 139 | 144 |
| 140 } } // namespace v8::internal | 145 } } // namespace v8::internal |
| 141 | 146 |
| 142 #endif // V8_TARGET_ARCH_ARM | 147 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |