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

Unified Diff: src/globals.h

Issue 11275184: First draft of the sh4 port Base URL: http://github.com/v8/v8.git@master
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: src/globals.h
diff --git a/src/globals.h b/src/globals.h
index babffbf659882cab9c928dfe2f62116a9b376894..cb71ef2fc6881efdb135772efae8dfe07302e1fb 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -86,6 +86,9 @@ namespace internal {
#elif defined(__MIPSEL__)
#define V8_HOST_ARCH_MIPS 1
#define V8_HOST_ARCH_32_BIT 1
+#elif defined(__SH4__)
+#define V8_HOST_ARCH_SH4 1
+#define V8_HOST_ARCH_32_BIT 1
#else
#error Host architecture was not detected as supported by v8
#endif
@@ -94,7 +97,8 @@ namespace internal {
// in the same way as the host architecture, that is, target the native
// environment as presented by the compiler.
#if !defined(V8_TARGET_ARCH_X64) && !defined(V8_TARGET_ARCH_IA32) && \
- !defined(V8_TARGET_ARCH_ARM) && !defined(V8_TARGET_ARCH_MIPS)
+ !defined(V8_TARGET_ARCH_ARM) && !defined(V8_TARGET_ARCH_MIPS) && \
+ !defined(V8_TARGET_ARCH_SH4)
#if defined(_M_X64) || defined(__x86_64__)
#define V8_TARGET_ARCH_X64 1
#elif defined(_M_IX86) || defined(__i386__)
@@ -103,6 +107,8 @@ namespace internal {
#define V8_TARGET_ARCH_ARM 1
#elif defined(__MIPSEL__)
#define V8_TARGET_ARCH_MIPS 1
+#elif defined(__SH4__)
+#define V8_TARGET_ARCH_SH4 1
#else
#error Target architecture was not detected as supported by v8
#endif
@@ -123,6 +129,10 @@ namespace internal {
!(defined(V8_HOST_ARCH_IA32) || defined(V8_HOST_ARCH_MIPS)))
#error Target architecture mips is only supported on mips and ia32 host
#endif
+#if defined(V8_TARGET_ARCH_SH4) && !defined(V8_HOST_ARCH_SH4)
+#error Target architecture sh4 is only supported on sh4 host
Jakob Kummerow 2012/11/07 11:18:24 How about adding a simulator to allow development/
remi.duraffort 2012/11/07 11:59:26 This is not planned as we use Qemu user mode along
+#endif
+
// Determine whether we are running in a simulated environment.
// Setting USE_SIMULATOR explicitly from the build script will force

Powered by Google App Engine
This is Rietveld 408576698