qt5_arm.patch

From: Christian Prochaska <christian.prochaska@genode-labs.com>


---
 qtjsbackend/src/3rdparty/v8/src/arm/cpu-arm.cc     |    6 ++++++
 .../Source/JavaScriptCore/assembler/ARMAssembler.h |    7 +++++++
 .../JavaScriptCore/assembler/MacroAssemblerARM.cpp |    3 ++-
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/qtjsbackend/src/3rdparty/v8/src/arm/cpu-arm.cc b/qtjsbackend/src/3rdparty/v8/src/arm/cpu-arm.cc
index bed9503..286d7be 100644
--- a/qtjsbackend/src/3rdparty/v8/src/arm/cpu-arm.cc
+++ b/qtjsbackend/src/3rdparty/v8/src/arm/cpu-arm.cc
@@ -27,6 +27,10 @@
 
 // CPU specific code for arm independent of OS goes here.
 
+#ifdef __GENODE__
+#include <cpu/cache.h>
+#endif
+
 #include "v8.h"
 
 #if defined(__arm__) && !defined(_WIN32_WCE)
@@ -78,6 +82,8 @@ void CPU::FlushICache(void* start, size_t size) {
   // __ARM_NR_cacheflush. As well as Windows CE does not support to flush a
   // region, so we need to flush the whole process.
   FlushInstructionCache(GetCurrentProcess(), NULL, NULL);
+#elif defined(__GENODE__)
+  Genode::cache_coherent((Genode::addr_t)start, size);
 #else
   // Ideally, we would call
   //   syscall(__ARM_NR_cacheflush, start,
diff --git a/qtwebkit/Source/JavaScriptCore/assembler/ARMAssembler.h b/qtwebkit/Source/JavaScriptCore/assembler/ARMAssembler.h
index 18b1017..7b0e2ea 100644
--- a/qtwebkit/Source/JavaScriptCore/assembler/ARMAssembler.h
+++ b/qtwebkit/Source/JavaScriptCore/assembler/ARMAssembler.h
@@ -29,9 +29,14 @@
 
 #if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
 
+#if OS(GENODE)
+#include <cpu/cache.h>
+#endif
+
 #include "AssemblerBufferWithConstantPool.h"
 #include "JITCompilationEffort.h"
 #include <wtf/Assertions.h>
+
 namespace JSC {
 
     typedef uint32_t ARMWord;
@@ -1052,6 +1057,8 @@ namespace JSC {
             UNUSED_PARAM(size);
 #elif OS(QNX)
             msync(code, size, MS_INVALIDATE_ICACHE);
+#elif OS(GENODE)
+            Genode::cache_coherent((Genode::addr_t)code, size);
 #else
 #error "The cacheFlush support is missing on this platform."
 #endif
diff --git a/qtwebkit/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp b/qtwebkit/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp
index 98dc3e9..e26df76 100644
--- a/qtwebkit/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp
+++ b/qtwebkit/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp
@@ -57,7 +57,8 @@ static bool isVFPPresent()
     }
 #endif
 
-#if (COMPILER(RVCT) && defined(__TARGET_FPU_VFP)) || (COMPILER(GCC) && defined(__VFP_FP__))
+#if (COMPILER(RVCT) && defined(__TARGET_FPU_VFP)) || \
+    (COMPILER(GCC) && defined(__VFP_FP__) && !defined(__SOFTFP__))
     return true;
 #else
     return false;
