Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: src/globals.h

Issue 11087047: Allow unaligned accesses for ARMv7. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/flag-definitions.h ('k') | src/regexp-macro-assembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // the use of a simulated environment. 129 // the use of a simulated environment.
130 #if !defined(USE_SIMULATOR) 130 #if !defined(USE_SIMULATOR)
131 #if (defined(V8_TARGET_ARCH_ARM) && !defined(V8_HOST_ARCH_ARM)) 131 #if (defined(V8_TARGET_ARCH_ARM) && !defined(V8_HOST_ARCH_ARM))
132 #define USE_SIMULATOR 1 132 #define USE_SIMULATOR 1
133 #endif 133 #endif
134 #if (defined(V8_TARGET_ARCH_MIPS) && !defined(V8_HOST_ARCH_MIPS)) 134 #if (defined(V8_TARGET_ARCH_MIPS) && !defined(V8_HOST_ARCH_MIPS))
135 #define USE_SIMULATOR 1 135 #define USE_SIMULATOR 1
136 #endif 136 #endif
137 #endif 137 #endif
138 138
139 // Define unaligned read for the target architectures supporting it.
140 #if defined(V8_TARGET_ARCH_X64) || defined(V8_TARGET_ARCH_IA32)
141 #define V8_TARGET_CAN_READ_UNALIGNED 1
142 #elif V8_TARGET_ARCH_ARM
143 // Some CPU-OS combinations allow unaligned access on ARM. We assume
144 // that unaligned accesses are not allowed unless the build system
145 // defines the CAN_USE_UNALIGNED_ACCESSES macro to be non-zero.
146 #if CAN_USE_UNALIGNED_ACCESSES
147 #define V8_TARGET_CAN_READ_UNALIGNED 1
148 #endif
149 #elif V8_TARGET_ARCH_MIPS
150 #else
151 #error Target architecture is not supported by v8
152 #endif
153
154 // Support for alternative bool type. This is only enabled if the code is 139 // Support for alternative bool type. This is only enabled if the code is
155 // compiled with USE_MYBOOL defined. This catches some nasty type bugs. 140 // compiled with USE_MYBOOL defined. This catches some nasty type bugs.
156 // For instance, 'bool b = "false";' results in b == true! This is a hidden 141 // For instance, 'bool b = "false";' results in b == true! This is a hidden
157 // source of bugs. 142 // source of bugs.
158 // However, redefining the bool type does have some negative impact on some 143 // However, redefining the bool type does have some negative impact on some
159 // platforms. It gives rise to compiler warnings (i.e. with 144 // platforms. It gives rise to compiler warnings (i.e. with
160 // MSVC) in the API header files when mixing code that uses the standard 145 // MSVC) in the API header files when mixing code that uses the standard
161 // bool with code that uses the redefined version. 146 // bool with code that uses the redefined version.
162 // This does not actually belong in the platform code, but needs to be 147 // This does not actually belong in the platform code, but needs to be
163 // defined here because the platform code uses bool, and platform.h is 148 // defined here because the platform code uses bool, and platform.h is
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 // the backend, so both modes are represented by the kStrictMode value. 396 // the backend, so both modes are represented by the kStrictMode value.
412 enum StrictModeFlag { 397 enum StrictModeFlag {
413 kNonStrictMode, 398 kNonStrictMode,
414 kStrictMode 399 kStrictMode
415 }; 400 };
416 401
417 402
418 } } // namespace v8::internal 403 } } // namespace v8::internal
419 404
420 #endif // V8_GLOBALS_H_ 405 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/regexp-macro-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698