summaryrefslogtreecommitdiffstats
path: root/recipes-core
diff options
context:
space:
mode:
authorHenning Heinold <heinold@inf.fu-berlin.de>2013-04-06 06:13:05 +0000
committerHenning Heinold <heinold@inf.fu-berlin.de>2013-04-14 18:15:23 +0200
commit300e9994968c2956656f71b54f453d741ee806fd (patch)
treeeaef74bc1f5c19df4d2fb207507270ddaeb8f776 /recipes-core
parent7fb9465e5c2db618eedb59de5e5e013fd86cc06d (diff)
downloadmeta-java-300e9994968c2956656f71b54f453d741ee806fd.tar.gz
openjdk-6: add arm thumb2 fix for version 1.12.4
* bump PR Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
Diffstat (limited to 'recipes-core')
-rw-r--r--recipes-core/openjdk/openjdk-6-6b27/arm-thumb2-fix.patch95
-rw-r--r--recipes-core/openjdk/openjdk-6_6b27-1.12.4.bb4
2 files changed, 98 insertions, 1 deletions
diff --git a/recipes-core/openjdk/openjdk-6-6b27/arm-thumb2-fix.patch b/recipes-core/openjdk/openjdk-6-6b27/arm-thumb2-fix.patch
new file mode 100644
index 0000000..54b8b7b
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6-6b27/arm-thumb2-fix.patch
@@ -0,0 +1,95 @@
1
2# HG changeset patch
3# User chrisphi
4# Date 1365166908 14400
5# Node ID 623621d29d04d87dc17f376b3917464e59026248
6# Parent 12f5fe9e85d373261c29be3bbd37ffc364678978
7Bug 1362: Fedora 19 / rawhide FTBFS SIGILL
8Summary: Fix reg alloc problem in thumb2.cpp compiler.
9
10diff -r 12f5fe9e85d3 -r 623621d29d04 arm_port/hotspot/src/cpu/zero/vm/thumb2.cpp
11--- a/arm_port/hotspot/src/cpu/zero/vm/thumb2.cpp Wed Mar 20 11:00:45 2013 +0000
12+++ b/arm_port/hotspot/src/cpu/zero/vm/thumb2.cpp Fri Apr 05 09:01:48 2013 -0400
13@@ -1,5 +1,6 @@
14 /*
15 * Copyright 2009, 2010 Edward Nevill
16+ * Copyright 2013 Red Hat
17 *
18 * This code is free software; you can redistribute it and/or modify it
19 * under the terms of the GNU General Public License version 2 only, as
20@@ -399,6 +400,8 @@
21
22 static jmp_buf compiler_error_env;
23
24+#define J_BogusImplementation() longjmp(compiler_error_env, COMPILER_RESULT_FAILED)
25+
26 #ifdef PRODUCT
27
28 #define JASSERT(cond, msg) 0
29@@ -3505,8 +3508,6 @@
30 #define TOSM2(jstack) ((jstack)->stack[(jstack)->depth-3])
31 #define TOSM3(jstack) ((jstack)->stack[(jstack)->depth-4])
32
33-#define POP(jstack) ((jstack)->stack[--(jstack)->depth])
34-#define PUSH(jstack, r) ((jstack)->stack[(jstack)->depth++] = (r))
35 #define SWAP(jstack) do { \
36 Reg r = (jstack)->stack[(jstack)->depth-1]; \
37 (jstack)->stack[(jstack)->depth-1] = (jstack)->stack[(jstack)->depth-2]; \
38@@ -3516,6 +3517,17 @@
39 #define JSTACK_REG(jstack) jstack_reg(jstack)
40 #define JSTACK_PREFER(jstack, prefer) jstack_prefer(jstack, prefer)
41
42+int PUSH(Thumb2_Stack *jstack, unsigned reg) {
43+ jstack->stack[jstack->depth] = reg;
44+ jstack->depth++;
45+ return reg;
46+}
47+
48+int POP(Thumb2_Stack *jstack) {
49+ jstack->depth--;
50+ return jstack->stack[jstack->depth];
51+}
52+
53 static const unsigned last_clear_bit[] = {
54 3, // 0000
55 3, // 0001
56@@ -3532,11 +3544,13 @@
57 1, // 1100
58 1, // 1101
59 0, // 1110
60- 0, // 1111
61+ 0, // 1111 // No registers available...
62 };
63
64 #define LAST_CLEAR_BIT(mask) last_clear_bit[mask]
65
66+unsigned long thumb2_register_allocation_failures = 0;
67+
68 unsigned jstack_reg(Thumb2_Stack *jstack)
69 {
70 unsigned *stack = jstack->stack;
71@@ -3547,7 +3561,10 @@
72
73 for (i = 0; i < depth; i++) mask |= 1 << stack[i];
74 mask &= (1 << STACK_REGS) - 1;
75- JASSERT(mask != (1 << STACK_REGS) - 1, "No free reg in push");
76+ if (mask >= (1 << STACK_REGS) - 1) { // No free registers
77+ thumb2_register_allocation_failures++;
78+ J_BogusImplementation();
79+ }
80 r = LAST_CLEAR_BIT(mask);
81 return r;
82 }
83@@ -3563,7 +3580,10 @@
84 for (i = 0; i < depth; i++) mask |= 1 << stack[i];
85 mask &= (1 << STACK_REGS) - 1;
86 if ((prefer & ~mask) & 0x0f) mask |= (~prefer & ((1 << STACK_REGS) - 1));
87- JASSERT(mask != (1 << STACK_REGS) - 1, "No free reg in push");
88+ if (mask >= (1 << STACK_REGS) - 1) { // No free registers
89+ thumb2_register_allocation_failures++;
90+ J_BogusImplementation();
91+ }
92 r = LAST_CLEAR_BIT(mask);
93 return r;
94 }
95
diff --git a/recipes-core/openjdk/openjdk-6_6b27-1.12.4.bb b/recipes-core/openjdk/openjdk-6_6b27-1.12.4.bb
index da36da5..d368abe 100644
--- a/recipes-core/openjdk/openjdk-6_6b27-1.12.4.bb
+++ b/recipes-core/openjdk/openjdk-6_6b27-1.12.4.bb
@@ -1,10 +1,12 @@
1require openjdk-6-release-6b27.inc 1require openjdk-6-release-6b27.inc
2 2
3PR = "${INC_PR}.0" 3PR = "${INC_PR}.1"
4 4
5SRC_URI[iced.md5sum] = "85bfc656c20fb762b72b71d3492a326c" 5SRC_URI[iced.md5sum] = "85bfc656c20fb762b72b71d3492a326c"
6SRC_URI[iced.sha256sum] = "eb326c6ae0147ca4abe4bd79e52c1edc2ef08e5e008230e24bee3abb39e14dda" 6SRC_URI[iced.sha256sum] = "eb326c6ae0147ca4abe4bd79e52c1edc2ef08e5e008230e24bee3abb39e14dda"
7 7
8OEPATCHES += "file://arm-thumb2-fix.patch"
9
8ICEDTEAPATCHES += "file://icedtea-jdk-rmi-crosscompile.patch;apply=no" 10ICEDTEAPATCHES += "file://icedtea-jdk-rmi-crosscompile.patch;apply=no"
9 11
10DISTRIBUTION_PATCHES += "patches/icedtea-jdk-rmi-crosscompile.patch" 12DISTRIBUTION_PATCHES += "patches/icedtea-jdk-rmi-crosscompile.patch"