OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 18 matching lines...) Expand all Loading... |
29 // the code less dependent on differences between different processor | 29 // the code less dependent on differences between different processor |
30 // architecture. | 30 // architecture. |
31 // The classes have the same definition for all architectures. The | 31 // The classes have the same definition for all architectures. The |
32 // implementation for a particular architecture is put in cpu_<arch>.cc. | 32 // implementation for a particular architecture is put in cpu_<arch>.cc. |
33 // The build system then uses the implementation for the target architecture. | 33 // The build system then uses the implementation for the target architecture. |
34 // | 34 // |
35 | 35 |
36 #ifndef V8_CPU_H_ | 36 #ifndef V8_CPU_H_ |
37 #define V8_CPU_H_ | 37 #define V8_CPU_H_ |
38 | 38 |
39 namespace v8 { namespace internal { | 39 namespace v8 { |
| 40 namespace internal { |
40 | 41 |
41 // ---------------------------------------------------------------------------- | 42 // ---------------------------------------------------------------------------- |
42 // CPU | 43 // CPU |
43 // | 44 // |
44 // This class has static methods for the architecture specific functions. Add | 45 // This class has static methods for the architecture specific functions. Add |
45 // methods here to cope with differences between the supported architectures. | 46 // methods here to cope with differences between the supported architectures. |
46 // | 47 // |
47 // For each architecture the file cpu_<arch>.cc contains the implementation of | 48 // For each architecture the file cpu_<arch>.cc contains the implementation of |
48 // these functions. | 49 // these functions. |
49 | 50 |
50 class CPU : public AllStatic { | 51 class CPU : public AllStatic { |
51 public: | 52 public: |
52 // Initializes the cpu architecture support. Called once at VM startup. | 53 // Initializes the cpu architecture support. Called once at VM startup. |
53 static void Setup(); | 54 static void Setup(); |
54 | 55 |
55 // Flush instruction cache. | 56 // Flush instruction cache. |
56 static void FlushICache(void* start, size_t size); | 57 static void FlushICache(void* start, size_t size); |
57 | 58 |
58 // Try to activate a system level debugger. | 59 // Try to activate a system level debugger. |
59 static void DebugBreak(); | 60 static void DebugBreak(); |
60 }; | 61 }; |
61 | 62 |
62 } } // namespace v8::internal | 63 } } // namespace v8::internal |
63 | 64 |
64 #endif // V8_CPU_H_ | 65 #endif // V8_CPU_H_ |
OLD | NEW |