~ubuntu-branches/ubuntu/wily/qtdeclarative-opensource-src/wily-proposed

« back to all changes in this revision

Viewing changes to debian/patches/V4-JIT-save-restore-ebx-GOT-ptr-on-linux-x86.patch

  • Committer: Package Import Robot
  • Author(s): Ricardo Salveti de Araujo, Ricardo Salveti de Araujo, Timo Jyrinki
  • Date: 2014-06-19 02:39:21 UTC
  • mfrom: (0.1.18 experimental)
  • Revision ID: package-import@ubuntu.com-20140619023921-yb2oasnuetz9b0fc
Tags: 5.3.0-3ubuntu4
[ Ricardo Salveti de Araujo ]
* debian/control:
  - Updating dependencies as we now also have libqt5quickwidgets5-gles
* libqt5quickwidgets5.symbols: updating to allow gles variant

[ Timo Jyrinki ]
* Update libqt5quickparticles5.symbols from build logs

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From e42e6a8d432270a5393f7451f63074af0811dddf Mon Sep 17 00:00:00 2001
2
 
From: Erik Verbruggen <erik.verbruggen@digia.com>
3
 
Date: Mon, 27 Jan 2014 13:00:20 +0100
4
 
Subject: [PATCH] V4 JIT: save/restore ebx (GOT ptr) on linux/x86.
5
 
 
6
 
On linux/x86, ebx is used to store the global offset table. When using
7
 
this register for temporary values, we have to save it at the entry of
8
 
a generated function, and restore it before doing calls and at the end.
9
 
 
10
 
Task-number: QTBUG-36289
11
 
Change-Id: I30194be3ce44f58b793ee52f6201906bcb68d46a
12
 
---
13
 
 src/qml/compiler/qv4isel_masm.cpp | 2 +-
14
 
 src/qml/compiler/qv4isel_masm_p.h | 4 ++++
15
 
 2 files changed, 5 insertions(+), 1 deletion(-)
16
 
 
17
 
diff --git a/src/qml/compiler/qv4isel_masm.cpp b/src/qml/compiler/qv4isel_masm.cpp
18
 
index 0cfb684..0fcd770 100644
19
 
--- a/src/qml/compiler/qv4isel_masm.cpp
20
 
+++ b/src/qml/compiler/qv4isel_masm.cpp
21
 
@@ -122,7 +122,7 @@ static const Assembler::RegisterID calleeSavedRegisters[] = {
22
 
 
23
 
 #if CPU(X86)
24
 
 static const Assembler::RegisterID calleeSavedRegisters[] = {
25
 
-    // Not used: JSC::X86Registers::ebx,
26
 
+    JSC::X86Registers::ebx, // temporary register
27
 
     JSC::X86Registers::esi, // ContextRegister
28
 
     JSC::X86Registers::edi  // LocalsRegister
29
 
 };
30
 
diff --git a/src/qml/compiler/qv4isel_masm_p.h b/src/qml/compiler/qv4isel_masm_p.h
31
 
index a146220..7dfe6a8 100644
32
 
--- a/src/qml/compiler/qv4isel_masm_p.h
33
 
+++ b/src/qml/compiler/qv4isel_masm_p.h
34
 
@@ -981,6 +981,10 @@ public:
35
 
         prepareRelativeCall(function, this);
36
 
         loadArgumentOnStackOrRegister<0>(arg1);
37
 
 
38
 
+#if OS(LINUX) && CPU(X86) && (defined(__PIC__) || defined(__PIE__))
39
 
+        load32(Address(StackFrameRegister, -sizeof(void*)), JSC::X86Registers::ebx); // restore the GOT ptr
40
 
+#endif
41
 
+
42
 
         callAbsolute(functionName, function);
43
 
 
44
 
         if (stackSpaceNeeded)
45
 
1.9.0
46