-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathjdk12_new.patch
104 lines (102 loc) · 4.6 KB
/
jdk12_new.patch
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
diff --git a/make/autoconf/hotspot.m4 b/make/autoconf/hotspot.m4
index ce9bab692..08263eb86 100644
--- a/make/autoconf/hotspot.m4
+++ b/make/autoconf/hotspot.m4
@@ -299,6 +299,11 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
HOTSPOT_TARGET_CPU_DEFINE="ARM32"
fi
+ if test "x$OPENJDK_BUILD_CPU" = xarm; then
+ HOTSPOT_BUILD_CPU=arm_32
+ HOTSPOT_BUILD_CPU_DEFINE="ARM32"
+ fi
+
# Verify that dependencies are met for explicitly set features.
if HOTSPOT_CHECK_JVM_FEATURE(jvmti) && ! HOTSPOT_CHECK_JVM_FEATURE(services); then
AC_MSG_ERROR([Specified JVM feature 'jvmti' requires feature 'services'])
diff --git a/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp b/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp
index 871944852..1a93874ae 100644
--- a/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp
+++ b/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp
@@ -774,7 +774,7 @@ LIR_Opr LIRGenerator::atomic_xchg(BasicType type, LIR_Opr addr, LIRItem& value)
bool is_oop = type == T_OBJECT || type == T_ARRAY;
LIR_Opr result = new_register(type);
value.load_item();
- assert(type == T_INT || is_oop LP64_ONLY( || type == T_LONG ), "unexpected type");
+ assert(type == T_INT || is_oop || type == T_LONG, "unexpected type");
LIR_Opr tmp = (UseCompressedOops && is_oop) ? new_pointer_register() : LIR_OprFact::illegalOpr;
__ xchg(addr, value.result(), result, tmp);
return result;
@@ -783,7 +783,7 @@ LIR_Opr LIRGenerator::atomic_xchg(BasicType type, LIR_Opr addr, LIRItem& value)
LIR_Opr LIRGenerator::atomic_add(BasicType type, LIR_Opr addr, LIRItem& value) {
LIR_Opr result = new_register(type);
value.load_item();
- assert(type == T_INT LP64_ONLY( || type == T_LONG), "unexpected type");
+ assert(type == T_INT || type == T_LONG, "unexpected type");
LIR_Opr tmp = new_register(type);
__ xadd(addr, value.result(), result, tmp);
return result;
@@ -1310,9 +1310,14 @@ void LIRGenerator::volatile_field_store(LIR_Opr value, LIR_Address* address,
CodeEmitInfo* info) {
if (value->is_double_cpu()) {
assert(address->index()->is_illegal(), "should have a constant displacement");
- LIR_Opr tmp = new_pointer_register();
- add_large_constant(address->base(), address->disp(), tmp);
- __ volatile_store_mem_reg(value, new LIR_Address(tmp, (intx)0, address->type()), info);
+ LIR_Opr src;
+ if (address->disp() == 0) {
+ src = address->base();
+ } else {
+ src = new_pointer_register();
+ add_large_constant(address->base(), address->disp(), src);
+ }
+ __ volatile_store_mem_reg(value, new LIR_Address(src, (intx)0, address->type()), info);
return;
}
__ store(value, address, info, lir_patch_none);
@@ -1322,9 +1327,14 @@ void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result,
CodeEmitInfo* info) {
if (result->is_double_cpu()) {
assert(address->index()->is_illegal(), "should have a constant displacement");
- LIR_Opr tmp = new_pointer_register();
- add_large_constant(address->base(), address->disp(), tmp);
- __ volatile_load_mem_reg(new LIR_Address(tmp, (intx)0, address->type()), result, info);
+ LIR_Opr src;
+ if (address->disp() == 0) {
+ src = address->base();
+ } else {
+ src = new_pointer_register();
+ add_large_constant(address->base(), address->disp(), src);
+ }
+ __ volatile_load_mem_reg(new LIR_Address(src, (intx)0, address->type()), result, info);
return;
}
__ load(address, result, info, lir_patch_none);
diff --git a/src/hotspot/share/memory/metaspaceShared.cpp b/src/hotspot/share/memory/metaspaceShared.cpp
index 1a998998d..bed831d7a 100644
--- a/src/hotspot/share/memory/metaspaceShared.cpp
+++ b/src/hotspot/share/memory/metaspaceShared.cpp
@@ -66,6 +66,7 @@
#include "utilities/bitMap.hpp"
#include "utilities/defaultStream.hpp"
#include "utilities/hashtable.inline.hpp"
+#include "gc/shared/softRefPolicy.hpp"
#if INCLUDE_G1GC
#include "gc/g1/g1CollectedHeap.hpp"
#endif
diff --git a/src/hotspot/share/oops/constantPool.cpp b/src/hotspot/share/oops/constantPool.cpp
index bb88c7147..3230c7096 100644
--- a/src/hotspot/share/oops/constantPool.cpp
+++ b/src/hotspot/share/oops/constantPool.cpp
@@ -406,8 +406,12 @@ void ConstantPool::remove_unshareable_info() {
}
int ConstantPool::cp_to_object_index(int cp_index) {
+ Array<u2> *map = reference_map();
+ if (map == 0)
+ return _no_index_sentinel;
+
// this is harder don't do this so much.
- int i = reference_map()->find(cp_index);
+ int i = map->find(cp_index);
// We might not find the index for jsr292 call.
return (i < 0) ? _no_index_sentinel : i;
}