Revision: 5620
Author: [email protected]
Date: Thu Oct 14 04:39:48 2010
Log: Added USE_SIMULATOR macro that explicitly indicates that we wish to
use the simulator as the execution engine. For example, this allows us to
run with the ARM simulator on ARM.
Patch by Mark Lam <[email protected]> from Hewlett-Packard Development
Company, LP
Review URL: http://codereview.chromium.org/3825001
http://code.google.com/p/v8/source/detail?r=5620
Modified:
/branches/bleeding_edge/AUTHORS
/branches/bleeding_edge/SConstruct
/branches/bleeding_edge/src/arm/simulator-arm.cc
/branches/bleeding_edge/src/arm/simulator-arm.h
/branches/bleeding_edge/src/debug.cc
/branches/bleeding_edge/src/mips/simulator-mips.cc
/branches/bleeding_edge/src/mips/simulator-mips.h
/branches/bleeding_edge/src/v8.cc
=======================================
--- /branches/bleeding_edge/AUTHORS Wed Sep 15 03:22:55 2010
+++ /branches/bleeding_edge/AUTHORS Thu Oct 14 04:39:48 2010
@@ -6,6 +6,7 @@
Google Inc.
Sigma Designs Inc.
ARM Ltd.
+Hewlett-Packard Development Company, LP
Alexander Botero-Lowry <[email protected]>
Alexandre Vassalotti <[email protected]>
=======================================
--- /branches/bleeding_edge/SConstruct Mon Aug 16 10:14:34 2010
+++ /branches/bleeding_edge/SConstruct Thu Oct 14 04:39:48 2010
@@ -206,7 +206,8 @@
},
'simulator:arm': {
'CCFLAGS': ['-m32'],
- 'LINKFLAGS': ['-m32']
+ 'LINKFLAGS': ['-m32'],
+ 'CPPDEFINES': ['USE_SIMULATOR']
},
'arch:mips': {
'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'],
@@ -217,7 +218,8 @@
},
'simulator:mips': {
'CCFLAGS': ['-m32'],
- 'LINKFLAGS': ['-m32']
+ 'LINKFLAGS': ['-m32'],
+ 'CPPDEFINES': ['USE_SIMULATOR']
},
'arch:x64': {
'CPPDEFINES': ['V8_TARGET_ARCH_X64'],
=======================================
--- /branches/bleeding_edge/src/arm/simulator-arm.cc Thu Sep 30 00:22:53
2010
+++ /branches/bleeding_edge/src/arm/simulator-arm.cc Thu Oct 14 04:39:48
2010
@@ -37,7 +37,7 @@
#include "arm/constants-arm.h"
#include "arm/simulator-arm.h"
-#if !defined(__arm__)
+#if !defined(__arm__) || defined(USE_SIMULATOR)
// Only build the simulator if not compiling for real ARM hardware.
namespace assembler {
@@ -2840,6 +2840,6 @@
} } // namespace assembler::arm
-#endif // __arm__
+#endif // !__arm__ || USE_SIMULATOR
#endif // V8_TARGET_ARCH_ARM
=======================================
--- /branches/bleeding_edge/src/arm/simulator-arm.h Wed Jul 21 00:42:51 2010
+++ /branches/bleeding_edge/src/arm/simulator-arm.h Thu Oct 14 04:39:48 2010
@@ -38,7 +38,7 @@
#include "allocation.h"
-#if defined(__arm__)
+#if defined(__arm__) && !defined(USE_SIMULATOR)
// When running without a simulator we call the entry directly.
#define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \
@@ -70,7 +70,7 @@
reinterpret_cast<TryCatch*>(try_catch_address)
-#else // defined(__arm__)
+#else // !defined(__arm__) || defined(USE_SIMULATOR)
// When running with the simulator transition into simulated execution at
this
// point.
@@ -356,6 +356,6 @@
};
-#endif // defined(__arm__)
+#endif // !defined(__arm__) || defined(USE_SIMULATOR)
#endif // V8_ARM_SIMULATOR_ARM_H_
=======================================
--- /branches/bleeding_edge/src/debug.cc Mon Sep 27 03:29:25 2010
+++ /branches/bleeding_edge/src/debug.cc Thu Oct 14 04:39:48 2010
@@ -2712,6 +2712,7 @@
static void StubMessageHandler2(const v8::Debug::Message& message) {
+ PrintF("XXX\n");
// Simply ignore message.
}
=======================================
--- /branches/bleeding_edge/src/mips/simulator-mips.cc Wed Aug 11 03:52:34
2010
+++ /branches/bleeding_edge/src/mips/simulator-mips.cc Thu Oct 14 04:39:48
2010
@@ -39,7 +39,7 @@
namespace v8i = v8::internal;
-#if !defined(__mips)
+#if !defined(__mips) || defined(USE_SIMULATOR)
// Only build the simulator if not compiling for real MIPS hardware.
namespace assembler {
@@ -1645,6 +1645,6 @@
} } // namespace assembler::mips
-#endif // __mips
+#endif // !__mips || USE_SIMULATOR
#endif // V8_TARGET_ARCH_MIPS
=======================================
--- /branches/bleeding_edge/src/mips/simulator-mips.h Thu Feb 4 12:36:58
2010
+++ /branches/bleeding_edge/src/mips/simulator-mips.h Thu Oct 14 04:39:48
2010
@@ -38,7 +38,7 @@
#include "allocation.h"
-#if defined(__mips)
+#if defined(__mips) && !defined(USE_SIMULATOR)
// When running without a simulator we call the entry directly.
#define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \
@@ -79,7 +79,7 @@
reinterpret_cast<TryCatch*>(try_catch_address)
-#else // #if defined(__mips)
+#else // #if !defined(__mips) || defined(USE_SIMULATOR)
// When running with the simulator transition into simulated execution at
this
// point.
@@ -305,7 +305,7 @@
}
};
-#endif // defined(__mips)
+#endif // !defined(__mips) || defined(USE_SIMULATOR)
#endif // V8_MIPS_SIMULATOR_MIPS_H_
=======================================
--- /branches/bleeding_edge/src/v8.cc Tue Jun 15 04:44:07 2010
+++ /branches/bleeding_edge/src/v8.cc Thu Oct 14 04:39:48 2010
@@ -68,7 +68,7 @@
OS::Setup();
// Initialize other runtime facilities
-#if !V8_HOST_ARCH_ARM && V8_TARGET_ARCH_ARM
+#if (defined(USE_SIMULATOR) || !V8_HOST_ARCH_ARM) && V8_TARGET_ARCH_ARM
::assembler::arm::Simulator::Initialize();
#endif
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev