Fix ARM build
authorSimon Hausmann <simon.hausmann@digia.com>
Mon, 19 Aug 2013 10:14:05 +0000 (12:14 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 19 Aug 2013 10:35:18 +0000 (12:35 +0200)
Re-add variable only needed for ARM build and replace references
to removed codeRef variables from QV4::Function.

Change-Id: Id47fe57be2aa653bd8f81996463d970f27427f37
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/compiler/qv4isel_masm.cpp
src/qml/jsruntime/qv4unwindhelper_p-arm.h

index 3b1c5d5..a64c9ce 100644 (file)
@@ -567,6 +567,7 @@ void Assembler::recordLineNumber(int lineNumber)
 JSC::MacroAssemblerCodeRef Assembler::link()
 {
 #if defined(Q_PROCESSOR_ARM) && !defined(Q_OS_IOS)
+    Label endOfCode = label();
     // Let the ARM exception table follow right after that
     for (int i = 0, nops = UnwindHelper::unwindInfoSize() / 2; i < nops; ++i)
         nop();
index dd1f1e4..8f5febc 100644 (file)
@@ -79,7 +79,7 @@ static Function *lookupFunction(void *pc)
     if (it == allFunctions.end())
         return 0;
 
-    quintptr codeStart = reinterpret_cast<quintptr>(removeThumbBit((*it)->codeRef.code().executableAddress()));
+    quintptr codeStart = reinterpret_cast<quintptr>(removeThumbBit((void*)(*it)->code));
     if (key < codeStart || key >= codeStart + (*it)->codeSize)
         return 0;
     return *it;
@@ -217,7 +217,7 @@ extern "C" Q_DECL_EXPORT void *__gnu_Unwind_Find_exidx(void *pc, int *entryCount
         QV4::Function *function = QT_PREPEND_NAMESPACE(QV4::lookupFunction(pc));
         if (function) {
             *entryCount = 1;
-            void * codeStart = QT_PREPEND_NAMESPACE(QV4::removeThumbBit(function->codeRef.code().executableAddress()));
+            void * codeStart = QT_PREPEND_NAMESPACE(QV4::removeThumbBit((void*)function->code));
             // At the end of the function we store our synthetic exception table entry.
             return (char *)codeStart + function->codeSize;
         }