| 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 15 matching lines...) Expand all Loading... |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 // CPU specific code for arm independent of OS goes here. | 28 // CPU specific code for arm independent of OS goes here. |
| 29 #if defined(__arm__) | 29 #if defined(__arm__) |
| 30 #include <sys/syscall.h> // for cache flushing. | 30 #include <sys/syscall.h> // for cache flushing. |
| 31 #endif | 31 #endif |
| 32 | 32 |
| 33 #include "v8.h" | 33 #include "v8.h" |
| 34 | 34 |
| 35 #include "cpu.h" | 35 #include "cpu.h" |
| 36 #include "macro-assembler.h" |
| 36 | 37 |
| 37 namespace v8 { | 38 namespace v8 { |
| 38 namespace internal { | 39 namespace internal { |
| 39 | 40 |
| 40 void CPU::Setup() { | 41 void CPU::Setup() { |
| 41 // Nothing to do. | 42 CpuFeatures::Probe(); |
| 42 } | 43 } |
| 43 | 44 |
| 44 | 45 |
| 45 void CPU::FlushICache(void* start, size_t size) { | 46 void CPU::FlushICache(void* start, size_t size) { |
| 46 #if !defined (__arm__) | 47 #if !defined (__arm__) |
| 47 // Not generating ARM instructions for C-code. This means that we are | 48 // Not generating ARM instructions for C-code. This means that we are |
| 48 // building an ARM emulator based target. No I$ flushes are necessary. | 49 // building an ARM emulator based target. No I$ flushes are necessary. |
| 49 // None of this code ends up in the snapshot so there are no issues | 50 // None of this code ends up in the snapshot so there are no issues |
| 50 // around whether or not to generate the code when building snapshots. | 51 // around whether or not to generate the code when building snapshots. |
| 51 #else | 52 #else |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 119 |
| 119 void CPU::DebugBreak() { | 120 void CPU::DebugBreak() { |
| 120 #if !defined (__arm__) | 121 #if !defined (__arm__) |
| 121 UNIMPLEMENTED(); // when building ARM emulator target | 122 UNIMPLEMENTED(); // when building ARM emulator target |
| 122 #else | 123 #else |
| 123 asm volatile("bkpt 0"); | 124 asm volatile("bkpt 0"); |
| 124 #endif | 125 #endif |
| 125 } | 126 } |
| 126 | 127 |
| 127 } } // namespace v8::internal | 128 } } // namespace v8::internal |
| OLD | NEW |