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

Unified Diff: src/sh4/simulator-sh4.h

Issue 11275184: First draft of the sh4 port Base URL: http://github.com/v8/v8.git@master
Patch Set: Use GYP and fixe some typos 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
« no previous file with comments | « src/sh4/regexp-macro-assembler-sh4.cc ('k') | src/sh4/stub-cache-sh4.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sh4/simulator-sh4.h
diff --git a/src/ia32/simulator-ia32.h b/src/sh4/simulator-sh4.h
similarity index 72%
copy from src/ia32/simulator-ia32.h
copy to src/sh4/simulator-sh4.h
index 478d4ce5cb309b0a27575b8741ead47c3fb7675a..51ee215cf4dcc6ca1d04eb4189198ee6e7dabaee 100644
--- a/src/ia32/simulator-ia32.h
+++ b/src/sh4/simulator-sh4.h
@@ -1,4 +1,4 @@
-// Copyright 2012 the V8 project authors. All rights reserved.
+// Copyright 2011-2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,38 +25,39 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef V8_IA32_SIMULATOR_IA32_H_
-#define V8_IA32_SIMULATOR_IA32_H_
+#ifndef V8_SH4_SIMULATOR_SH4_H_
+#define V8_SH4_SIMULATOR_SH4_H_
#include "allocation.h"
namespace v8 {
namespace internal {
-// Since there is no simulator for the ia32 architecture the only thing we can
-// do is to call the entry directly.
+// When running without a simulator we call the entry directly.
#define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \
(entry(p0, p1, p2, p3, p4))
+typedef int (*sh4_regexp_matcher)(String*, int, const byte*, const byte*,
+ void*, int*, int, Address, int, Isolate*);
-typedef int (*regexp_matcher)(String*, int, const byte*,
- const byte*, int*, int, Address, int, Isolate*);
-// Call the generated regexp code directly. The code at the entry address should
-// expect eight int/pointer sized arguments and return an int.
+// Call the generated regexp code directly. The code at the entry address
+// should act as a function matching the type arm_regexp_matcher.
+// The fifth argument is a dummy that reserves the space used for
+// the return address added by the ExitFrame in native calls.
#define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7, p8) \
- (FUNCTION_CAST<regexp_matcher>(entry)(p0, p1, p2, p3, p4, p5, p6, p7, p8))
-
+ (FUNCTION_CAST<sh4_regexp_matcher>(entry)( \
+ p0, p1, p2, p3, NULL, p4, p5, p6, p7, p8))
#define TRY_CATCH_FROM_ADDRESS(try_catch_address) \
- (reinterpret_cast<TryCatch*>(try_catch_address))
+ reinterpret_cast<TryCatch*>(try_catch_address)
// The stack limit beyond which we will throw stack overflow errors in
-// generated code. Because generated code on ia32 uses the C stack, we
+// generated code. Because generated code on sh4 uses the C stack, we
// just use the C stack limit.
class SimulatorStack : public v8::internal::AllStatic {
public:
- static inline uintptr_t JsLimitFromCLimit(Isolate* isolate,
+ static inline uintptr_t JsLimitFromCLimit(v8::internal::Isolate* isolate,
uintptr_t c_limit) {
USE(isolate);
return c_limit;
@@ -71,4 +72,4 @@ class SimulatorStack : public v8::internal::AllStatic {
} } // namespace v8::internal
-#endif // V8_IA32_SIMULATOR_IA32_H_
+#endif // V8_SH4_SIMULATOR_SH4_H_
« no previous file with comments | « src/sh4/regexp-macro-assembler-sh4.cc ('k') | src/sh4/stub-cache-sh4.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698