Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
2eb26991
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2eb26991
编写于
2月 06, 2019
作者:
R
roland
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8214206: Fix for JDK-8213419 is broken on 32-bit
Reviewed-by: mdoerr, shade
上级
e4baf3d5
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
29 addition
and
25 deletion
+29
-25
src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
+1
-1
src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp
src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp
+2
-2
src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
+2
-2
src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
+2
-2
src/share/vm/opto/divnode.cpp
src/share/vm/opto/divnode.cpp
+1
-1
src/share/vm/opto/mulnode.cpp
src/share/vm/opto/mulnode.cpp
+5
-5
src/share/vm/runtime/advancedThresholdPolicy.cpp
src/share/vm/runtime/advancedThresholdPolicy.cpp
+2
-2
src/share/vm/runtime/compilationPolicy.cpp
src/share/vm/runtime/compilationPolicy.cpp
+1
-1
src/share/vm/runtime/os.cpp
src/share/vm/runtime/os.cpp
+1
-1
src/share/vm/runtime/simpleThresholdPolicy.cpp
src/share/vm/runtime/simpleThresholdPolicy.cpp
+1
-1
src/share/vm/utilities/globalDefinitions.hpp
src/share/vm/utilities/globalDefinitions.hpp
+10
-6
src/share/vm/utilities/hashtable.cpp
src/share/vm/utilities/hashtable.cpp
+1
-1
未找到文件。
src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
浏览文件 @
2eb26991
...
...
@@ -579,7 +579,7 @@ void LIR_Assembler::emit_op3(LIR_Op3* op) {
__
and3
(
Rscratch
,
divisor
-
1
,
Rscratch
);
}
__
add
(
Rdividend
,
Rscratch
,
Rscratch
);
__
sra
(
Rscratch
,
log2_int
ptr
(
divisor
),
Rresult
);
__
sra
(
Rscratch
,
log2_int
(
divisor
),
Rresult
);
return
;
}
else
{
if
(
divisor
==
2
)
{
...
...
src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp
浏览文件 @
2eb26991
...
...
@@ -294,11 +294,11 @@ void LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr bas
bool
LIRGenerator
::
strength_reduce_multiply
(
LIR_Opr
left
,
int
c
,
LIR_Opr
result
,
LIR_Opr
tmp
)
{
assert
(
left
!=
result
,
"should be different registers"
);
if
(
is_power_of_2
(
c
+
1
))
{
__
shift_left
(
left
,
log2_int
ptr
(
c
+
1
),
result
);
__
shift_left
(
left
,
log2_int
(
c
+
1
),
result
);
__
sub
(
result
,
left
,
result
);
return
true
;
}
else
if
(
is_power_of_2
(
c
-
1
))
{
__
shift_left
(
left
,
log2_int
ptr
(
c
-
1
),
result
);
__
shift_left
(
left
,
log2_int
(
c
-
1
),
result
);
__
add
(
result
,
left
,
result
);
return
true
;
}
...
...
src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
浏览文件 @
2eb26991
...
...
@@ -2650,7 +2650,7 @@ void LIR_Assembler::arithmetic_idiv(LIR_Code code, LIR_Opr left, LIR_Opr right,
Register
dreg
=
result
->
as_register
();
if
(
right
->
is_constant
())
{
int
divisor
=
right
->
as_constant_ptr
()
->
as_jint
();
j
int
divisor
=
right
->
as_constant_ptr
()
->
as_jint
();
assert
(
divisor
>
0
&&
is_power_of_2
(
divisor
),
"must be"
);
if
(
code
==
lir_idiv
)
{
assert
(
lreg
==
rax
,
"must be rax,"
);
...
...
@@ -2662,7 +2662,7 @@ void LIR_Assembler::arithmetic_idiv(LIR_Code code, LIR_Opr left, LIR_Opr right,
__
andl
(
rdx
,
divisor
-
1
);
__
addl
(
lreg
,
rdx
);
}
__
sarl
(
lreg
,
log2_
intptr
(
divisor
));
__
sarl
(
lreg
,
log2_
jint
(
divisor
));
move_regs
(
lreg
,
dreg
);
}
else
if
(
code
==
lir_irem
)
{
Label
done
;
...
...
src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
浏览文件 @
2eb26991
...
...
@@ -237,12 +237,12 @@ bool LIRGenerator::strength_reduce_multiply(LIR_Opr left, int c, LIR_Opr result,
if
(
tmp
->
is_valid
())
{
if
(
is_power_of_2
(
c
+
1
))
{
__
move
(
left
,
tmp
);
__
shift_left
(
left
,
log2_
intptr
(
c
+
1
),
left
);
__
shift_left
(
left
,
log2_
jint
(
c
+
1
),
left
);
__
sub
(
left
,
tmp
,
result
);
return
true
;
}
else
if
(
is_power_of_2
(
c
-
1
))
{
__
move
(
left
,
tmp
);
__
shift_left
(
left
,
log2_
intptr
(
c
-
1
),
left
);
__
shift_left
(
left
,
log2_
jint
(
c
-
1
),
left
);
__
add
(
left
,
tmp
,
result
);
return
true
;
}
...
...
src/share/vm/opto/divnode.cpp
浏览文件 @
2eb26991
...
...
@@ -131,7 +131,7 @@ static Node *transform_int_divide( PhaseGVN *phase, Node *dividend, jint divisor
}
// Add rounding to the shift to handle the sign bit
int
l
=
log2_
intptr
(
d
-
1
)
+
1
;
int
l
=
log2_
jint
(
d
-
1
)
+
1
;
if
(
needs_rounding
)
{
// Divide-by-power-of-2 can be made into a shift, but you have to do
// more math for the rounding. You need to add 0 for positive
...
...
src/share/vm/opto/mulnode.cpp
浏览文件 @
2eb26991
...
...
@@ -198,21 +198,21 @@ Node *MulINode::Ideal(PhaseGVN *phase, bool can_reshape) {
Node
*
res
=
NULL
;
unsigned
int
bit1
=
abs_con
&
(
0
-
abs_con
);
// Extract low bit
if
(
bit1
==
abs_con
)
{
// Found a power of 2?
res
=
new
(
phase
->
C
)
LShiftINode
(
in
(
1
),
phase
->
intcon
(
log2_
intptr
(
bit1
)));
res
=
new
(
phase
->
C
)
LShiftINode
(
in
(
1
),
phase
->
intcon
(
log2_
uint
(
bit1
)));
}
else
{
// Check for constant with 2 bits set
unsigned
int
bit2
=
abs_con
-
bit1
;
bit2
=
bit2
&
(
0
-
bit2
);
// Extract 2nd bit
if
(
bit2
+
bit1
==
abs_con
)
{
// Found all bits in con?
Node
*
n1
=
phase
->
transform
(
new
(
phase
->
C
)
LShiftINode
(
in
(
1
),
phase
->
intcon
(
log2_
intptr
(
bit1
))));
Node
*
n2
=
phase
->
transform
(
new
(
phase
->
C
)
LShiftINode
(
in
(
1
),
phase
->
intcon
(
log2_
intptr
(
bit2
))));
Node
*
n1
=
phase
->
transform
(
new
(
phase
->
C
)
LShiftINode
(
in
(
1
),
phase
->
intcon
(
log2_
uint
(
bit1
))));
Node
*
n2
=
phase
->
transform
(
new
(
phase
->
C
)
LShiftINode
(
in
(
1
),
phase
->
intcon
(
log2_
uint
(
bit2
))));
res
=
new
(
phase
->
C
)
AddINode
(
n2
,
n1
);
}
else
if
(
is_power_of_2
(
abs_con
+
1
))
{
// Sleezy: power-of-2 -1. Next time be generic.
unsigned
int
temp
=
abs_con
+
1
;
Node
*
n1
=
phase
->
transform
(
new
(
phase
->
C
)
LShiftINode
(
in
(
1
),
phase
->
intcon
(
log2_
intptr
(
temp
))));
Node
*
n1
=
phase
->
transform
(
new
(
phase
->
C
)
LShiftINode
(
in
(
1
),
phase
->
intcon
(
log2_
uint
(
temp
))));
res
=
new
(
phase
->
C
)
SubINode
(
n1
,
in
(
1
));
}
else
{
return
MulNode
::
Ideal
(
phase
,
can_reshape
);
...
...
@@ -444,7 +444,7 @@ Node *AndINode::Identity( PhaseTransform *phase ) {
// Masking off high bits which are always zero is useless.
const
TypeInt
*
t1
=
phase
->
type
(
in
(
1
)
)
->
isa_int
();
if
(
t1
!=
NULL
&&
t1
->
_lo
>=
0
)
{
jint
t1_support
=
right_n_bits
(
1
+
log2_
intptr
(
t1
->
_hi
));
jint
t1_support
=
right_n_bits
(
1
+
log2_
jint
(
t1
->
_hi
));
if
((
t1_support
&
con
)
==
t1_support
)
return
in1
;
}
...
...
src/share/vm/runtime/advancedThresholdPolicy.cpp
浏览文件 @
2eb26991
...
...
@@ -47,8 +47,8 @@ void AdvancedThresholdPolicy::initialize() {
int
count
=
CICompilerCount
;
if
(
CICompilerCountPerCPU
)
{
// Simple log n seems to grow too slowly for tiered, try something faster: log n * log log n
int
log_cpu
=
log2_int
ptr
(
os
::
active_processor_count
());
int
loglog_cpu
=
log2_int
ptr
(
MAX2
(
log_cpu
,
1
));
int
log_cpu
=
log2_int
(
os
::
active_processor_count
());
int
loglog_cpu
=
log2_int
(
MAX2
(
log_cpu
,
1
));
count
=
MAX2
(
log_cpu
*
loglog_cpu
,
1
)
*
3
/
2
;
}
...
...
src/share/vm/runtime/compilationPolicy.cpp
浏览文件 @
2eb26991
...
...
@@ -181,7 +181,7 @@ void NonTieredCompPolicy::initialize() {
// Example: if CICompilerCountPerCPU is true, then we get
// max(log2(8)-1,1) = 2 compiler threads on an 8-way machine.
// May help big-app startup time.
_compiler_count
=
MAX2
(
log2_int
ptr
(
os
::
active_processor_count
())
-
1
,
1
);
_compiler_count
=
MAX2
(
log2_int
(
os
::
active_processor_count
())
-
1
,
1
);
FLAG_SET_ERGO
(
intx
,
CICompilerCount
,
_compiler_count
);
}
else
{
_compiler_count
=
CICompilerCount
;
...
...
src/share/vm/runtime/os.cpp
浏览文件 @
2eb26991
...
...
@@ -1284,7 +1284,7 @@ char** os::split_path(const char* path, int* n) {
}
void
os
::
set_memory_serialize_page
(
address
page
)
{
int
count
=
log2_intptr
(
sizeof
(
class
JavaThread
))
-
log2_int
ptr
(
64
);
int
count
=
log2_intptr
(
sizeof
(
class
JavaThread
))
-
log2_int
(
64
);
_mem_serialize_page
=
(
volatile
int32_t
*
)
page
;
// We initialize the serialization page shift count here
// We assume a cache line size of 64 bytes
...
...
src/share/vm/runtime/simpleThresholdPolicy.cpp
浏览文件 @
2eb26991
...
...
@@ -139,7 +139,7 @@ void SimpleThresholdPolicy::initialize() {
}
int
count
=
CICompilerCount
;
if
(
CICompilerCountPerCPU
)
{
count
=
MAX2
(
log2_int
ptr
(
os
::
active_processor_count
()),
1
)
*
3
/
2
;
count
=
MAX2
(
log2_int
(
os
::
active_processor_count
()),
1
)
*
3
/
2
;
}
set_c1_count
(
MAX2
(
count
/
3
,
1
));
set_c2_count
(
MAX2
(
count
-
c1_count
(),
1
));
...
...
src/share/vm/utilities/globalDefinitions.hpp
浏览文件 @
2eb26991
...
...
@@ -1149,8 +1149,7 @@ inline int log2_intptr(uintptr_t x) {
}
//* largest i such that 2^i <= x
// A negative value of 'x' will return '63'
inline
int
log2_long
(
unsigned
long
x
)
{
inline
int
log2_long
(
julong
x
)
{
int
i
=
-
1
;
julong
p
=
1
;
while
(
p
!=
0
&&
p
<=
x
)
{
...
...
@@ -1166,16 +1165,21 @@ inline int log2_intptr(intptr_t x) {
return
log2_intptr
((
uintptr_t
)
x
);
}
inline
int
log2_int
ptr
(
int
x
)
{
inline
int
log2_int
(
int
x
)
{
return
log2_intptr
((
uintptr_t
)
x
);
}
inline
int
log2_
intptr
(
u
int
x
)
{
inline
int
log2_
jint
(
j
int
x
)
{
return
log2_intptr
((
uintptr_t
)
x
);
}
inline
int
log2_long
(
jlong
x
)
{
return
log2_long
((
unsigned
long
)
x
);
inline
int
log2_uint
(
uint
x
)
{
return
log2_intptr
((
uintptr_t
)
x
);
}
// A negative value of 'x' will return '63'
inline
int
log2_jlong
(
jlong
x
)
{
return
log2_long
((
julong
)
x
);
}
//* the argument must be exactly a power of 2
...
...
src/share/vm/utilities/hashtable.cpp
浏览文件 @
2eb26991
...
...
@@ -55,7 +55,7 @@ template <MEMFLAGS F> BasicHashtableEntry<F>* BasicHashtable<F>::new_entry(unsig
if
(
_first_free_entry
+
_entry_size
>=
_end_block
)
{
int
block_size
=
MIN2
(
512
,
MAX2
((
int
)
_table_size
/
2
,
(
int
)
_number_of_entries
));
int
len
=
_entry_size
*
block_size
;
len
=
1
<<
log2_int
ptr
(
len
);
// round down to power of 2
len
=
1
<<
log2_int
(
len
);
// round down to power of 2
assert
(
len
>=
_entry_size
,
""
);
_first_free_entry
=
NEW_C_HEAP_ARRAY2
(
char
,
len
,
F
,
CURRENT_PC
);
_end_block
=
_first_free_entry
+
len
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录