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

Unified Diff: src/sh4/cpu-sh4.cc

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/constants-sh4.cc ('k') | src/sh4/debug-sh4.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sh4/cpu-sh4.cc
diff --git a/src/ia32/frames-ia32.cc b/src/sh4/cpu-sh4.cc
similarity index 74%
copy from src/ia32/frames-ia32.cc
copy to src/sh4/cpu-sh4.cc
index dd44f0ee5ff12dc7de0df1a33a544e6c19723934..b0708ec002b3dd52b485f4c4b80dfd1e66de4d9b 100644
--- a/src/ia32/frames-ia32.cc
+++ b/src/sh4/cpu-sh4.cc
@@ -1,4 +1,4 @@
-// Copyright 2006-2008 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,21 +25,40 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#include <unistd.h>
+#include <sys/syscall.h>
+#include <asm/cachectl.h>
+
#include "v8.h"
-#if defined(V8_TARGET_ARCH_IA32)
+#if defined(V8_TARGET_ARCH_SH4)
-#include "frames-inl.h"
+#include "cpu.h"
+#include "macro-assembler.h"
namespace v8 {
namespace internal {
+void CPU::SetUp() {
+ CpuFeatures::Probe();
+}
+
+
+bool CPU::SupportsCrankshaft() {
+ return false;
+}
+
-Address ExitFrame::ComputeStackPointer(Address fp) {
- return Memory::Address_at(fp + ExitFrameConstants::kSPOffset);
+void CPU::FlushICache(void* start, size_t size) {
+ // Invalidate the instruction and the data cache
+ syscall(__NR_cacheflush, start, size, CACHEFLUSH_D_WB | CACHEFLUSH_I);
}
+void CPU::DebugBreak() {
+ asm("ldtlb");
+}
+
} } // namespace v8::internal
-#endif // V8_TARGET_ARCH_IA32
+#endif // V8_TARGET_ARCH_SH4
« no previous file with comments | « src/sh4/constants-sh4.cc ('k') | src/sh4/debug-sh4.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698