all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 251b2f271c256e0168c92f150dd85e67a218704b 7564 bytes (raw)
name: gnu/packages/patches/webkitgtk-2.28.0-fix-bug-197192.patch 	 # note: path name is non-authoritative(*)

  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
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
 
There was a bug in older Cortex-A53, however in newer versions of Cortex-A53,
webkit fails to build.  The code is removed for newer versions of Cortex-A53.   
See https://bugs.webkit.org/show_bug.cgi?id=197192

From: Brian Woodcox <bw@InSkyData.com>
Date: March 18, 2020

--- a/Source/JavaScriptCore/assembler/ARM64Assembler.h
+++ a/Source/JavaScriptCore/assembler/ARM64Assembler.h
@@ -740,7 +740,6 @@
     {
         ASSERT(!(offset & 0xfff));
         insn(pcRelative(true, offset >> 12, rd));
-        nopCortexA53Fix843419();
     }
 
     template<int datasize, SetFlags setFlags = DontSetFlags>
@@ -1390,7 +1389,6 @@
     ALWAYS_INLINE void madd(RegisterID rd, RegisterID rn, RegisterID rm, RegisterID ra)
     {
         CHECK_DATASIZE();
-        nopCortexA53Fix835769<datasize>();
         insn(dataProcessing3Source(DATASIZE, DataOp_MADD, rm, ra, rn, rd));
     }
 
@@ -1443,7 +1441,6 @@
     ALWAYS_INLINE void msub(RegisterID rd, RegisterID rn, RegisterID rm, RegisterID ra)
     {
         CHECK_DATASIZE();
-        nopCortexA53Fix835769<datasize>();
         insn(dataProcessing3Source(DATASIZE, DataOp_MSUB, rm, ra, rn, rd));
     }
 
@@ -1691,7 +1688,6 @@
 
     ALWAYS_INLINE void smaddl(RegisterID rd, RegisterID rn, RegisterID rm, RegisterID ra)
     {
-        nopCortexA53Fix835769<64>();
         insn(dataProcessing3Source(Datasize_64, DataOp_SMADDL, rm, ra, rn, rd));
     }
 
@@ -1702,7 +1698,6 @@
 
     ALWAYS_INLINE void smsubl(RegisterID rd, RegisterID rn, RegisterID rm, RegisterID ra)
     {
-        nopCortexA53Fix835769<64>();
         insn(dataProcessing3Source(Datasize_64, DataOp_SMSUBL, rm, ra, rn, rd));
     }
 
@@ -1960,7 +1955,6 @@
 
     ALWAYS_INLINE void umaddl(RegisterID rd, RegisterID rn, RegisterID rm, RegisterID ra)
     {
-        nopCortexA53Fix835769<64>();
         insn(dataProcessing3Source(Datasize_64, DataOp_UMADDL, rm, ra, rn, rd));
     }
 
@@ -1971,7 +1965,6 @@
 
     ALWAYS_INLINE void umsubl(RegisterID rd, RegisterID rn, RegisterID rm, RegisterID ra)
     {
-        nopCortexA53Fix835769<64>();
         insn(dataProcessing3Source(Datasize_64, DataOp_UMSUBL, rm, ra, rn, rd));
     }
 
@@ -3691,37 +3684,6 @@
         return 0x1e7e0000 | (dn << 5) | rd;
     }
 
-    // Workaround for Cortex-A53 erratum (835769). Emit an extra nop if the
-    // last instruction in the buffer is a load, store or prefetch. Needed
-    // before 64-bit multiply-accumulate instructions.
-    template<int datasize>
-    ALWAYS_INLINE void nopCortexA53Fix835769()
-    {
-#if CPU(ARM64_CORTEXA53)
-        CHECK_DATASIZE();
-        if (datasize == 64) {
-            if (LIKELY(m_buffer.codeSize() >= sizeof(int32_t))) {
-                // From ARMv8 Reference Manual, Section C4.1: the encoding of the
-                // instructions in the Loads and stores instruction group is:
-                // ---- 1-0- ---- ---- ---- ---- ---- ----
-                if (UNLIKELY((*reinterpret_cast_ptr<int32_t*>(reinterpret_cast_ptr<char*>(m_buffer.data()) + m_buffer.codeSize() - sizeof(int32_t)) & 0x0a000000) == 0x08000000))
-                    nop();
-            }
-        }
-#endif
-    }
-
-    // Workaround for Cortex-A53 erratum (843419). Emit extra nops to avoid
-    // wrong address access after ADRP instruction.
-    ALWAYS_INLINE void nopCortexA53Fix843419()
-    {
-#if CPU(ARM64_CORTEXA53)
-        nop();
-        nop();
-        nop();
-#endif
-    }
-
     Vector<LinkRecord, 0, UnsafeVectorOverflow> m_jumpsToLink;
     int m_indexOfLastWatchpoint;
     int m_indexOfTailOfLastWatchpoint;
--- a/Source/JavaScriptCore/offlineasm/arm64.rb
+++ a/Source/JavaScriptCore/offlineasm/arm64.rb
@@ -351,33 +351,6 @@
     newList
 end
 
-# Workaround for Cortex-A53 erratum (835769)
-def arm64CortexA53Fix835769(list)
-    newList = []
-    lastOpcodeUnsafe = false
-
-    list.each {
-        | node |
-        if node.is_a? Instruction
-            case node.opcode
-            when /^store/, /^load/
-                # List all macro instructions that can be lowered to a load, store or prefetch ARM64 assembly instruction
-                lastOpcodeUnsafe = true
-            when  "muli", "mulp", "mulq", "smulli"
-                # List all macro instructions that can be lowered to a 64-bit multiply-accumulate ARM64 assembly instruction
-                # (defined as one of MADD, MSUB, SMADDL, SMSUBL, UMADDL or UMSUBL).
-                if lastOpcodeUnsafe
-                    newList << Instruction.new(node.codeOrigin, "nopCortexA53Fix835769", [])
-                end
-                lastOpcodeUnsafe = false
-            else
-                lastOpcodeUnsafe = false
-            end
-        end
-        newList << node
-    }
-    newList
-end
 
 class Sequence
     def getModifiedListARM64(result = @list)
@@ -470,7 +443,6 @@
         result = arm64FixSpecialRegisterArithmeticMode(result)
         result = assignRegistersToTemporaries(result, :gpr, ARM64_EXTRA_GPRS)
         result = assignRegistersToTemporaries(result, :fpr, ARM64_EXTRA_FPRS)
-        result = arm64CortexA53Fix835769(result)
         return result
     end
 end
@@ -1115,10 +1087,6 @@
             $asm.puts "bfi #{operands[3].arm64Operand(:quad)}, #{operands[0].arm64Operand(:quad)}, #{operands[1].value}, #{operands[2].value}"
         when "pcrtoaddr"
             $asm.puts "adr #{operands[1].arm64Operand(:quad)}, #{operands[0].value}"
-        when "nopCortexA53Fix835769"
-            $asm.putStr("#if CPU(ARM64_CORTEXA53)")
-            $asm.puts "nop"
-            $asm.putStr("#endif")
         when "globaladdr"
             uid = $asm.newUID
 
--- a/Source/JavaScriptCore/offlineasm/instructions.rb
+++ a/Source/JavaScriptCore/offlineasm/instructions.rb
@@ -354,7 +354,6 @@
     [
      "bfiq", # Bit field insert <source reg> <last bit written> <width immediate> <dest reg>
      "pcrtoaddr",   # Address from PC relative offset - adr instruction
-     "nopFixCortexA53Err835769", # nop on Cortex-A53 (nothing otherwise)
      "globaladdr",
      "divi",
      "divis",
--- a/Source/cmake/OptionsCommon.cmake
+++ a/Source/cmake/OptionsCommon.cmake
@@ -19,32 +19,6 @@
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 define_property(TARGET PROPERTY FOLDER INHERITED BRIEF_DOCS "folder" FULL_DOCS "IDE folder name")
 
-# Detect Cortex-A53 core if CPU is ARM64 and OS is Linux.
-# Query /proc/cpuinfo for each available core and check reported CPU part number: 0xd03 signals Cortex-A53.
-# (see Main ID Register in ARM Cortex-A53 MPCore Processor Technical Reference Manual)
-set(WTF_CPU_ARM64_CORTEXA53_INITIALVALUE OFF)
-if (WTF_CPU_ARM64 AND (${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
-    execute_process(COMMAND nproc OUTPUT_VARIABLE PROC_COUNT)
-    math(EXPR PROC_MAX ${PROC_COUNT}-1)
-    foreach (PROC_ID RANGE ${PROC_MAX})
-        execute_process(COMMAND taskset -c ${PROC_ID} grep "^CPU part" /proc/cpuinfo OUTPUT_VARIABLE PROC_PART)
-        if (PROC_PART MATCHES "0xd03")
-            set(WTF_CPU_ARM64_CORTEXA53_INITIALVALUE ON)
-            break ()
-        endif ()
-    endforeach ()
-endif ()
-option(WTF_CPU_ARM64_CORTEXA53 "Enable Cortex-A53-specific code paths" ${WTF_CPU_ARM64_CORTEXA53_INITIALVALUE})
-
-if (WTF_CPU_ARM64_CORTEXA53)
-    if (NOT WTF_CPU_ARM64)
-        message(FATAL_ERROR "WTF_CPU_ARM64_CORTEXA53 set without WTF_CPU_ARM64")
-    endif ()
-    WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-mfix-cortex-a53-835769)
-endif ()
-
-EXPOSE_VARIABLE_TO_BUILD(WTF_CPU_ARM64_CORTEXA53)
-
 set(ARM_TRADITIONAL_DETECTED FALSE)
 if (WTF_CPU_ARM)
     set(ARM_THUMB2_TEST_SOURCE

debug log:

solving 251b2f271c ...
found 251b2f271c in https://yhetil.org/guix/54EFA16B-27F2-40F4-8FF0-F59BC65BF8AB@inskydata.com/

applying [1/1] https://yhetil.org/guix/54EFA16B-27F2-40F4-8FF0-F59BC65BF8AB@inskydata.com/
diff --git a/gnu/packages/patches/webkitgtk-2.28.0-fix-bug-197192.patch b/gnu/packages/patches/webkitgtk-2.28.0-fix-bug-197192.patch
new file mode 100644
index 0000000000..251b2f271c

1:8: trailing whitespace.
webkit fails to build.  The code is removed for newer versions of Cortex-A53.   
1:22: trailing whitespace.
 
1:31: trailing whitespace.
 
1:39: trailing whitespace.
 
1:41: trailing whitespace.
 
Checking patch gnu/packages/patches/webkitgtk-2.28.0-fix-bug-197192.patch...
Applied patch gnu/packages/patches/webkitgtk-2.28.0-fix-bug-197192.patch cleanly.
warning: squelched 12 whitespace errors
warning: 17 lines add whitespace errors.

index at:
100644 251b2f271c256e0168c92f150dd85e67a218704b	gnu/packages/patches/webkitgtk-2.28.0-fix-bug-197192.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.