| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 #if defined(V8_TARGET_ARCH_X64) | 36 #if defined(V8_TARGET_ARCH_X64) |
| 37 | 37 |
| 38 #include "cpu.h" | 38 #include "cpu.h" |
| 39 #include "macro-assembler.h" | 39 #include "macro-assembler.h" |
| 40 | 40 |
| 41 namespace v8 { | 41 namespace v8 { |
| 42 namespace internal { | 42 namespace internal { |
| 43 | 43 |
| 44 void CPU::Setup() { | 44 void CPU::Setup() { |
| 45 CpuFeatures::Probe(true); | 45 Isolate::Current()->cpu_features()->Probe(true); |
| 46 if (Serializer::enabled()) { | 46 if (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 // No need to flush the instruction cache on Intel. On Intel instruction | 53 // No need to flush the instruction cache on Intel. On Intel instruction |
| 54 // cache flushing is only necessary when multiple cores running the same | 54 // cache flushing is only necessary when multiple cores running the same |
| 55 // code simultaneously. V8 (and JavaScript) is single threaded and when code | 55 // code simultaneously. V8 (and JavaScript) is single threaded and when code |
| (...skipping 21 matching lines...) Expand all Loading... |
| 77 // __asm { int 3 } | 77 // __asm { int 3 } |
| 78 __debugbreak(); | 78 __debugbreak(); |
| 79 #else | 79 #else |
| 80 asm("int $3"); | 80 asm("int $3"); |
| 81 #endif | 81 #endif |
| 82 } | 82 } |
| 83 | 83 |
| 84 } } // namespace v8::internal | 84 } } // namespace v8::internal |
| 85 | 85 |
| 86 #endif // V8_TARGET_ARCH_X64 | 86 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |