Follow-up to previous commit about forcing thumb builds:
authorSimon Hausmann <simon.hausmann@digia.com>
Fri, 5 Jul 2013 08:44:55 +0000 (10:44 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 5 Jul 2013 18:03:35 +0000 (20:03 +0200)
Disable the checks of the thumb bit in code pointers when building for Android,
because we want to allow for intermixing of thumb (what the JIT generates) and
arm code (what the compiler generates for run-time functions we call, in debug
builds)

Change-Id: I0bcce4015d18db4e38244a1d1ad89413b3f17152
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/3rdparty/masm/assembler/ARMv7Assembler.h
src/3rdparty/masm/assembler/MacroAssemblerCodeRef.h

index 99a0e82..3a0a435 100644 (file)
@@ -30,6 +30,7 @@
 #if ENABLE(ASSEMBLER) && CPU(ARM_THUMB2)
 
 #include "AssemblerBuffer.h"
+#include "MacroAssemblerCodeRef.h"
 #include <wtf/Assertions.h>
 #include <wtf/Vector.h>
 #include <stdint.h>
@@ -2111,7 +2112,7 @@ public:
     {
         ASSERT(!(reinterpret_cast<intptr_t>(code) & 1));
         ASSERT(from.isSet());
-        ASSERT(reinterpret_cast<intptr_t>(to) & 1);
+        ASSERT_VALID_CODE_POINTER(to);
 
         setPointer(reinterpret_cast<uint16_t*>(reinterpret_cast<intptr_t>(code) + from.m_offset) - 1, to, false);
     }
index 89cffb1..b699316 100644 (file)
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
 #include <wtf/UnusedParam.h>
+#include <qglobal.h>
 
 // ASSERT_VALID_CODE_POINTER checks that ptr is a non-null pointer, and that it is a valid
 // instruction address on the platform (for example, check any alignment requirements).
-#if CPU(ARM_THUMB2)
+// (Disabled checks on Android/ARM because we want to intermix thumb and arm)
+#if CPU(ARM_THUMB2) && !defined(Q_OS_ANDROID)
 // ARM/thumb instructions must be 16-bit aligned, but all code pointers to be loaded
 // into the processor are decorated with the bottom bit set, indicating that this is
 // thumb code (as oposed to 32-bit traditional ARM).  The first test checks for both