summaryrefslogtreecommitdiff
path: root/user/qt5-qtwebkit/armv6.patch
blob: d2911d6d71730d2586fc3a5b3ae9221b67a28dcd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
From 7cc86ebe881f36bfef18d8eeee666d2a55eae892 Mon Sep 17 00:00:00 2001
From: Guilherme Iscaro <iscaro@profusion.mobi>
Date: Fri, 31 Mar 2017 10:31:49 -0300
Subject: [PATCH] Fix build on ARMv6.

The ARMv6 and older architures does not support the movw and movl
instructions, thus causing a build break.
This patch fix the problem by creating a new offlineasm instruction,
which will use the ldr instruction to load a immediate into a register.

https://bugs.webkit.org/show_bug.cgi?id=141288

Reviewed by NOBODY (OOPS!).

* llint/LowLevelInterpreter.asm:
* offlineasm/arm.rb:
* offlineasm/instructions.rb:
---
 Source/JavaScriptCore/llint/LowLevelInterpreter.asm | 8 +++++++-
 Source/JavaScriptCore/offlineasm/arm.rb             | 2 ++
 Source/JavaScriptCore/offlineasm/instructions.rb    | 3 ++-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git Source/JavaScriptCore/llint/LowLevelInterpreter.asm Source/JavaScriptCore/llint/LowLevelInterpreter.asm
index ab3c0c8e771..6c32eef8852 100644
--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
@@ -1167,7 +1167,13 @@ macro setEntryAddress(index, label)
         move index, t4
         storep t1, [a0, t4, 8]
     elsif ARM or ARMv7 or ARMv7_TRADITIONAL
-        mvlbl (label - _relativePCBase), t4
+        if ARM
+           ldrlbl t4, label
+           ldrlbl t3, _relativePCBase
+           subp t4, t3, t4
+        else
+           mvlbl (label - _relativePCBase), t4
+        end
         addp t4, t1, t4
         move index, t3
         storep t4, [a0, t3, 4]
diff --git Source/JavaScriptCore/offlineasm/arm.rb Source/JavaScriptCore/offlineasm/arm.rb
index c8064a59196..a9c40c8995c 100644
--- a/Source/JavaScriptCore/offlineasm/arm.rb
+++ b/Source/JavaScriptCore/offlineasm/arm.rb
@@ -504,6 +504,8 @@ class Instruction
         when "mvlbl"
                 $asm.puts "movw #{operands[1].armOperand}, \#:lower16:#{operands[0].value}"
                 $asm.puts "movt #{operands[1].armOperand}, \#:upper16:#{operands[0].value}"
+        when "ldrlbl"
+            $asm.puts "ldr #{operands[0].armOperand}, =#{operands[1].value}"
         when "nop"
             $asm.puts "nop"
         when "bieq", "bpeq", "bbeq"
diff --git Source/JavaScriptCore/offlineasm/instructions.rb Source/JavaScriptCore/offlineasm/instructions.rb
index bbfce7193b3..8cc1cb961ce 100644
--- a/Source/JavaScriptCore/offlineasm/instructions.rb
+++ b/Source/JavaScriptCore/offlineasm/instructions.rb
@@ -261,7 +261,8 @@ X86_INSTRUCTIONS =
 ARM_INSTRUCTIONS =
     [
      "clrbp",
-     "mvlbl"
+     "mvlbl",
+     "ldrlbl"
     ]
 
 ARM64_INSTRUCTIONS =
-- 
2.12.1