Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
8909df25
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看板
提交
8909df25
编写于
3月 20, 2014
作者:
G
goetz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8037915: PPC64/AIX: Several smaller fixes
Reviewed-by: kvn
上级
7ecc26e9
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
105 addition
and
84 deletion
+105
-84
src/cpu/ppc/vm/assembler_ppc.cpp
src/cpu/ppc/vm/assembler_ppc.cpp
+9
-8
src/cpu/ppc/vm/assembler_ppc.inline.hpp
src/cpu/ppc/vm/assembler_ppc.inline.hpp
+17
-9
src/cpu/ppc/vm/c2_globals_ppc.hpp
src/cpu/ppc/vm/c2_globals_ppc.hpp
+2
-2
src/cpu/ppc/vm/macroAssembler_ppc.cpp
src/cpu/ppc/vm/macroAssembler_ppc.cpp
+15
-14
src/cpu/ppc/vm/macroAssembler_ppc.hpp
src/cpu/ppc/vm/macroAssembler_ppc.hpp
+2
-2
src/cpu/ppc/vm/methodHandles_ppc.cpp
src/cpu/ppc/vm/methodHandles_ppc.cpp
+16
-1
src/cpu/ppc/vm/ppc.ad
src/cpu/ppc/vm/ppc.ad
+2
-2
src/cpu/ppc/vm/stubRoutines_ppc_64.cpp
src/cpu/ppc/vm/stubRoutines_ppc_64.cpp
+1
-12
src/cpu/ppc/vm/vm_version_ppc.cpp
src/cpu/ppc/vm/vm_version_ppc.cpp
+15
-9
src/cpu/ppc/vm/vm_version_ppc.hpp
src/cpu/ppc/vm/vm_version_ppc.hpp
+4
-1
src/cpu/ppc/vm/vtableStubs_ppc_64.cpp
src/cpu/ppc/vm/vtableStubs_ppc_64.cpp
+4
-6
src/os/aix/vm/mutex_aix.inline.hpp
src/os/aix/vm/mutex_aix.inline.hpp
+2
-2
src/os/aix/vm/os_aix.cpp
src/os/aix/vm/os_aix.cpp
+2
-2
src/os/aix/vm/threadCritical_aix.cpp
src/os/aix/vm/threadCritical_aix.cpp
+2
-2
src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp
src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp
+2
-2
src/os_cpu/aix_ppc/vm/threadLS_aix_ppc.cpp
src/os_cpu/aix_ppc/vm/threadLS_aix_ppc.cpp
+4
-4
src/os_cpu/aix_ppc/vm/thread_aix_ppc.cpp
src/os_cpu/aix_ppc/vm/thread_aix_ppc.cpp
+3
-3
src/os_cpu/linux_ppc/vm/thread_linux_ppc.cpp
src/os_cpu/linux_ppc/vm/thread_linux_ppc.cpp
+3
-3
未找到文件。
src/cpu/ppc/vm/assembler_ppc.cpp
浏览文件 @
8909df25
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -24,7 +24,6 @@
*/
#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "gc_interface/collectedHeap.inline.hpp"
#include "interpreter/interpreter.hpp"
...
...
@@ -37,6 +36,7 @@
#include "runtime/os.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
...
...
@@ -384,10 +384,10 @@ int Assembler::load_const_optimized(Register d, long x, Register tmp, bool retur
bool
load_xa
=
(
xa
!=
0
)
||
(
xb
<
0
);
bool
return_xd
=
false
;
if
(
load_xa
)
lis
(
tmp
,
xa
);
if
(
xc
)
lis
(
d
,
xc
);
if
(
load_xa
)
{
lis
(
tmp
,
xa
);
}
if
(
xc
)
{
lis
(
d
,
xc
);
}
if
(
load_xa
)
{
if
(
xb
)
ori
(
tmp
,
tmp
,
xb
);
// No addi, we support tmp == R0.
if
(
xb
)
{
ori
(
tmp
,
tmp
,
(
unsigned
short
)
xb
);
}
// No addi, we support tmp == R0.
}
else
{
li
(
tmp
,
xb
);
// non-negative
}
...
...
@@ -409,18 +409,18 @@ int Assembler::load_const_optimized(Register d, long x, Register tmp, bool retur
// opt 4: avoid adding 0
if
(
xa
)
{
// Highest 16-bit needed?
lis
(
d
,
xa
);
if
(
xb
)
addi
(
d
,
d
,
xb
);
if
(
xb
)
{
addi
(
d
,
d
,
xb
);
}
}
else
{
li
(
d
,
xb
);
}
sldi
(
d
,
d
,
32
);
if
(
xc
)
addis
(
d
,
d
,
xc
);
if
(
xc
)
{
addis
(
d
,
d
,
xc
);
}
}
// opt 5: Return offset to be inserted into following instruction.
if
(
return_simm16_rest
)
return
xd
;
if
(
xd
)
addi
(
d
,
d
,
xd
);
if
(
xd
)
{
addi
(
d
,
d
,
xd
);
}
return
0
;
}
...
...
@@ -696,4 +696,5 @@ void Assembler::test_asm() {
tty
->
print_cr
(
"
\n
test_asm disassembly (0x%lx 0x%lx):"
,
code
()
->
insts_begin
(),
code
()
->
insts_end
());
code
()
->
decode
();
}
#endif // !PRODUCT
src/cpu/ppc/vm/assembler_ppc.inline.hpp
浏览文件 @
8909df25
/*
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -139,7 +139,8 @@ inline void Assembler::cmpldi(ConditionRegister crx, Register a, int ui16) { A
inline
void
Assembler
::
cmplw
(
ConditionRegister
crx
,
Register
a
,
Register
b
)
{
Assembler
::
cmpl
(
crx
,
0
,
a
,
b
);
}
inline
void
Assembler
::
cmpld
(
ConditionRegister
crx
,
Register
a
,
Register
b
)
{
Assembler
::
cmpl
(
crx
,
1
,
a
,
b
);
}
inline
void
Assembler
::
isel
(
Register
d
,
Register
a
,
Register
b
,
int
c
)
{
emit_int32
(
ISEL_OPCODE
|
rt
(
d
)
|
ra
(
a
)
|
rb
(
b
)
|
bc
(
c
));
}
inline
void
Assembler
::
isel
(
Register
d
,
Register
a
,
Register
b
,
int
c
)
{
guarantee
(
VM_Version
::
has_isel
(),
"opcode not supported on this hardware"
);
emit_int32
(
ISEL_OPCODE
|
rt
(
d
)
|
ra
(
a
)
|
rb
(
b
)
|
bc
(
c
));
}
// PPC 1, section 3.3.11, Fixed-Point Logical Instructions
inline
void
Assembler
::
andi_
(
Register
a
,
Register
s
,
int
ui16
)
{
emit_int32
(
ANDI_OPCODE
|
rta
(
a
)
|
rs
(
s
)
|
uimm
(
ui16
,
16
));
}
...
...
@@ -531,9 +532,12 @@ inline void Assembler::fmr_(FloatRegister d, FloatRegister b) { emit_int32( FMR_
//inline void Assembler::mffgpr( FloatRegister d, Register b) { emit_int32( MFFGPR_OPCODE | frt(d) | rb(b) | rc(0)); }
//inline void Assembler::mftgpr( Register d, FloatRegister b) { emit_int32( MFTGPR_OPCODE | rt(d) | frb(b) | rc(0)); }
// add cmpb and popcntb to detect ppc power version.
inline
void
Assembler
::
cmpb
(
Register
a
,
Register
s
,
Register
b
)
{
emit_int32
(
CMPB_OPCODE
|
rta
(
a
)
|
rs
(
s
)
|
rb
(
b
)
|
rc
(
0
));
}
inline
void
Assembler
::
popcntb
(
Register
a
,
Register
s
)
{
emit_int32
(
POPCNTB_OPCODE
|
rta
(
a
)
|
rs
(
s
));
};
inline
void
Assembler
::
popcntw
(
Register
a
,
Register
s
)
{
emit_int32
(
POPCNTW_OPCODE
|
rta
(
a
)
|
rs
(
s
));
};
inline
void
Assembler
::
cmpb
(
Register
a
,
Register
s
,
Register
b
)
{
guarantee
(
VM_Version
::
has_cmpb
(),
"opcode not supported on this hardware"
);
emit_int32
(
CMPB_OPCODE
|
rta
(
a
)
|
rs
(
s
)
|
rb
(
b
)
|
rc
(
0
));
}
inline
void
Assembler
::
popcntb
(
Register
a
,
Register
s
)
{
guarantee
(
VM_Version
::
has_popcntb
(),
"opcode not supported on this hardware"
);
emit_int32
(
POPCNTB_OPCODE
|
rta
(
a
)
|
rs
(
s
));
};
inline
void
Assembler
::
popcntw
(
Register
a
,
Register
s
)
{
guarantee
(
VM_Version
::
has_popcntw
(),
"opcode not supported on this hardware"
);
emit_int32
(
POPCNTW_OPCODE
|
rta
(
a
)
|
rs
(
s
));
};
inline
void
Assembler
::
popcntd
(
Register
a
,
Register
s
)
{
emit_int32
(
POPCNTD_OPCODE
|
rta
(
a
)
|
rs
(
s
));
};
inline
void
Assembler
::
fneg
(
FloatRegister
d
,
FloatRegister
b
)
{
emit_int32
(
FNEG_OPCODE
|
frt
(
d
)
|
frb
(
b
)
|
rc
(
0
));
}
...
...
@@ -568,14 +572,17 @@ inline void Assembler::fctidz(FloatRegister d, FloatRegister b) { emit_int32( FC
inline
void
Assembler
::
fctiw
(
FloatRegister
d
,
FloatRegister
b
)
{
emit_int32
(
FCTIW_OPCODE
|
frt
(
d
)
|
frb
(
b
)
|
rc
(
0
));
}
inline
void
Assembler
::
fctiwz
(
FloatRegister
d
,
FloatRegister
b
)
{
emit_int32
(
FCTIWZ_OPCODE
|
frt
(
d
)
|
frb
(
b
)
|
rc
(
0
));
}
inline
void
Assembler
::
fcfid
(
FloatRegister
d
,
FloatRegister
b
)
{
emit_int32
(
FCFID_OPCODE
|
frt
(
d
)
|
frb
(
b
)
|
rc
(
0
));
}
inline
void
Assembler
::
fcfids
(
FloatRegister
d
,
FloatRegister
b
)
{
emit_int32
(
FCFIDS_OPCODE
|
frt
(
d
)
|
frb
(
b
)
|
rc
(
0
));
}
inline
void
Assembler
::
fcfids
(
FloatRegister
d
,
FloatRegister
b
)
{
guarantee
(
VM_Version
::
has_fcfids
(),
"opcode not supported on this hardware"
);
emit_int32
(
FCFIDS_OPCODE
|
frt
(
d
)
|
frb
(
b
)
|
rc
(
0
));
}
// PPC 1, section 4.6.7 Floating-Point Compare Instructions
inline
void
Assembler
::
fcmpu
(
ConditionRegister
crx
,
FloatRegister
a
,
FloatRegister
b
)
{
emit_int32
(
FCMPU_OPCODE
|
bf
(
crx
)
|
fra
(
a
)
|
frb
(
b
));
}
// PPC 1, section 5.2.1 Floating-Point Arithmetic Instructions
inline
void
Assembler
::
fsqrt
(
FloatRegister
d
,
FloatRegister
b
)
{
emit_int32
(
FSQRT_OPCODE
|
frt
(
d
)
|
frb
(
b
)
|
rc
(
0
));
}
inline
void
Assembler
::
fsqrts
(
FloatRegister
d
,
FloatRegister
b
)
{
emit_int32
(
FSQRTS_OPCODE
|
frt
(
d
)
|
frb
(
b
)
|
rc
(
0
));
}
inline
void
Assembler
::
fsqrt
(
FloatRegister
d
,
FloatRegister
b
)
{
guarantee
(
VM_Version
::
has_fsqrt
(),
"opcode not supported on this hardware"
);
emit_int32
(
FSQRT_OPCODE
|
frt
(
d
)
|
frb
(
b
)
|
rc
(
0
));
}
inline
void
Assembler
::
fsqrts
(
FloatRegister
d
,
FloatRegister
b
)
{
guarantee
(
VM_Version
::
has_fsqrts
(),
"opcode not supported on this hardware"
);
emit_int32
(
FSQRTS_OPCODE
|
frt
(
d
)
|
frb
(
b
)
|
rc
(
0
));
}
// Vector instructions for >= Power6.
inline
void
Assembler
::
lvebx
(
VectorRegister
d
,
Register
s1
,
Register
s2
)
{
emit_int32
(
LVEBX_OPCODE
|
vrt
(
d
)
|
ra0mem
(
s1
)
|
rb
(
s2
));
}
...
...
@@ -703,7 +710,8 @@ inline void Assembler::vcmpgtsw_(VectorRegister d,VectorRegister a, VectorRegist
inline
void
Assembler
::
vcmpgtub_
(
VectorRegister
d
,
VectorRegister
a
,
VectorRegister
b
)
{
emit_int32
(
VCMPGTUB_OPCODE
|
vrt
(
d
)
|
vra
(
a
)
|
vrb
(
b
)
|
vcmp_rc
(
1
));
}
inline
void
Assembler
::
vcmpgtuh_
(
VectorRegister
d
,
VectorRegister
a
,
VectorRegister
b
)
{
emit_int32
(
VCMPGTUH_OPCODE
|
vrt
(
d
)
|
vra
(
a
)
|
vrb
(
b
)
|
vcmp_rc
(
1
));
}
inline
void
Assembler
::
vcmpgtuw_
(
VectorRegister
d
,
VectorRegister
a
,
VectorRegister
b
)
{
emit_int32
(
VCMPGTUW_OPCODE
|
vrt
(
d
)
|
vra
(
a
)
|
vrb
(
b
)
|
vcmp_rc
(
1
));
}
inline
void
Assembler
::
vand
(
VectorRegister
d
,
VectorRegister
a
,
VectorRegister
b
)
{
emit_int32
(
VAND_OPCODE
|
vrt
(
d
)
|
vra
(
a
)
|
vrb
(
b
));
}
inline
void
Assembler
::
vand
(
VectorRegister
d
,
VectorRegister
a
,
VectorRegister
b
)
{
guarantee
(
VM_Version
::
has_vand
(),
"opcode not supported on this hardware"
);
emit_int32
(
VAND_OPCODE
|
vrt
(
d
)
|
vra
(
a
)
|
vrb
(
b
));
}
inline
void
Assembler
::
vandc
(
VectorRegister
d
,
VectorRegister
a
,
VectorRegister
b
)
{
emit_int32
(
VANDC_OPCODE
|
vrt
(
d
)
|
vra
(
a
)
|
vrb
(
b
));
}
inline
void
Assembler
::
vnor
(
VectorRegister
d
,
VectorRegister
a
,
VectorRegister
b
)
{
emit_int32
(
VNOR_OPCODE
|
vrt
(
d
)
|
vra
(
a
)
|
vrb
(
b
));
}
inline
void
Assembler
::
vor
(
VectorRegister
d
,
VectorRegister
a
,
VectorRegister
b
)
{
emit_int32
(
VOR_OPCODE
|
vrt
(
d
)
|
vra
(
a
)
|
vrb
(
b
));
}
...
...
src/cpu/ppc/vm/c2_globals_ppc.hpp
浏览文件 @
8909df25
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -87,7 +87,7 @@ define_pd_global(uint64_t,MaxRAM, 4ULL*G);
define_pd_global
(
uintx
,
CodeCacheMinBlockLength
,
4
);
define_pd_global
(
uintx
,
CodeCacheMinimumUseSpace
,
400
*
K
);
define_pd_global
(
bool
,
TrapBasedRangeChecks
,
fals
e
);
define_pd_global
(
bool
,
TrapBasedRangeChecks
,
tru
e
);
// Heap related flags
define_pd_global
(
uintx
,
MetaspaceSize
,
ScaleForWordSize
(
16
*
M
));
...
...
src/cpu/ppc/vm/macroAssembler_ppc.cpp
浏览文件 @
8909df25
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -24,8 +24,6 @@
*/
#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "compiler/disassembler.hpp"
#include "gc_interface/collectedHeap.inline.hpp"
...
...
@@ -1120,7 +1118,7 @@ address MacroAssembler::call_c_using_toc(const FunctionDescriptor* fd,
}
return
_last_calls_return_pc
;
}
#endif
#endif
// ABI_ELFv2
void
MacroAssembler
::
call_VM_base
(
Register
oop_result
,
Register
last_java_sp
,
...
...
@@ -1794,7 +1792,7 @@ void MacroAssembler::biased_locking_enter(ConditionRegister cr_reg, Register obj
cmpwi
(
cr_reg
,
temp_reg
,
markOopDesc
::
biased_lock_pattern
);
bne
(
cr_reg
,
cas_label
);
load_klass
_with_trap_null_check
(
temp_reg
,
obj_reg
);
load_klass
(
temp_reg
,
obj_reg
);
load_const_optimized
(
temp2_reg
,
~
((
int
)
markOopDesc
::
age_mask_in_place
));
ld
(
temp_reg
,
in_bytes
(
Klass
::
prototype_header_offset
()),
temp_reg
);
...
...
@@ -1891,7 +1889,7 @@ void MacroAssembler::biased_locking_enter(ConditionRegister cr_reg, Register obj
// the bias from one thread to another directly in this situation.
andi
(
temp_reg
,
mark_reg
,
markOopDesc
::
age_mask_in_place
);
orr
(
temp_reg
,
R16_thread
,
temp_reg
);
load_klass
_with_trap_null_check
(
temp2_reg
,
obj_reg
);
load_klass
(
temp2_reg
,
obj_reg
);
ld
(
temp2_reg
,
in_bytes
(
Klass
::
prototype_header_offset
()),
temp2_reg
);
orr
(
temp_reg
,
temp_reg
,
temp2_reg
);
...
...
@@ -1927,7 +1925,7 @@ void MacroAssembler::biased_locking_enter(ConditionRegister cr_reg, Register obj
// that another thread raced us for the privilege of revoking the
// bias of this particular object, so it's okay to continue in the
// normal locking code.
load_klass
_with_trap_null_check
(
temp_reg
,
obj_reg
);
load_klass
(
temp_reg
,
obj_reg
);
ld
(
temp_reg
,
in_bytes
(
Klass
::
prototype_header_offset
()),
temp_reg
);
andi
(
temp2_reg
,
mark_reg
,
markOopDesc
::
age_mask_in_place
);
orr
(
temp_reg
,
temp_reg
,
temp2_reg
);
...
...
@@ -2213,8 +2211,7 @@ void MacroAssembler::card_table_write(jbyte* byte_map_base, Register Rtmp, Regis
stbx
(
R0
,
Rtmp
,
Robj
);
}
#ifndef SERIALGC
#if INCLUDE_ALL_GCS
// General G1 pre-barrier generator.
// Goal: record the previous value if it is not null.
void
MacroAssembler
::
g1_write_barrier_pre
(
Register
Robj
,
RegisterOrConstant
offset
,
Register
Rpre_val
,
...
...
@@ -2328,14 +2325,17 @@ void MacroAssembler::g1_write_barrier_post(Register Rstore_addr, Register Rnew_v
// Get the address of the card.
lbzx
(
/*card value*/
Rtmp3
,
Rbase
,
Rcard_addr
);
cmpwi
(
CCR0
,
Rtmp3
,
(
int
)
G1SATBCardTableModRefBS
::
g1_young_card_val
());
beq
(
CCR0
,
filtered
);
assert
(
CardTableModRefBS
::
dirty_card_val
()
==
0
,
"otherwise check this code"
);
cmpwi
(
CCR0
,
Rtmp3
/* card value */
,
0
);
membar
(
Assembler
::
StoreLoad
);
lbzx
(
/*card value*/
Rtmp3
,
Rbase
,
Rcard_addr
);
// Reload after membar.
cmpwi
(
CCR0
,
Rtmp3
/* card value */
,
CardTableModRefBS
::
dirty_card_val
());
beq
(
CCR0
,
filtered
);
// Storing a region crossing, non-NULL oop, card is clean.
// Dirty card and log.
li
(
Rtmp3
,
0
);
// dirty
li
(
Rtmp3
,
CardTableModRefBS
::
dirty_card_val
());
//release(); // G1: oops are allowed to get visible after dirty marking.
stbx
(
Rtmp3
,
Rbase
,
Rcard_addr
);
...
...
@@ -2362,7 +2362,7 @@ void MacroAssembler::g1_write_barrier_post(Register Rstore_addr, Register Rnew_v
bind
(
filtered_int
);
}
#endif //
SERIALGC
#endif //
INCLUDE_ALL_GCS
// Values for last_Java_pc, and last_Java_sp must comply to the rules
// in frame_ppc64.hpp.
...
...
@@ -2453,7 +2453,8 @@ void MacroAssembler::get_vm_result_2(Register metadata_result) {
void
MacroAssembler
::
encode_klass_not_null
(
Register
dst
,
Register
src
)
{
Register
current
=
(
src
!=
noreg
)
?
src
:
dst
;
// Klass is in dst if no src provided.
if
(
Universe
::
narrow_klass_base
()
!=
0
)
{
load_const
(
R0
,
Universe
::
narrow_klass_base
(),
(
dst
!=
current
)
?
dst
:
noreg
);
// Use dst as temp if it is free.
// Use dst as temp if it is free.
load_const
(
R0
,
Universe
::
narrow_klass_base
(),
(
dst
!=
current
&&
dst
!=
R0
)
?
dst
:
noreg
);
sub
(
dst
,
current
,
R0
);
current
=
dst
;
}
...
...
src/cpu/ppc/vm/macroAssembler_ppc.hpp
浏览文件 @
8909df25
...
...
@@ -514,14 +514,14 @@ class MacroAssembler: public Assembler {
void
card_write_barrier_post
(
Register
Rstore_addr
,
Register
Rnew_val
,
Register
Rtmp
);
void
card_table_write
(
jbyte
*
byte_map_base
,
Register
Rtmp
,
Register
Robj
);
#if
ndef SERIALGC
#if
INCLUDE_ALL_GCS
// General G1 pre-barrier generator.
void
g1_write_barrier_pre
(
Register
Robj
,
RegisterOrConstant
offset
,
Register
Rpre_val
,
Register
Rtmp1
,
Register
Rtmp2
,
bool
needs_frame
=
false
);
// General G1 post-barrier generator
void
g1_write_barrier_post
(
Register
Rstore_addr
,
Register
Rnew_val
,
Register
Rtmp1
,
Register
Rtmp2
,
Register
Rtmp3
,
Label
*
filtered_ext
=
NULL
);
#endif
// SERIALGC
#endif
// Support for managing the JavaThread pointer (i.e.; the reference to
// thread-local information).
...
...
src/cpu/ppc/vm/methodHandles_ppc.cpp
浏览文件 @
8909df25
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -119,6 +119,7 @@ void MethodHandles::verify_ref_kind(MacroAssembler* _masm, int ref_kind, Registe
void
MethodHandles
::
jump_from_method_handle
(
MacroAssembler
*
_masm
,
Register
method
,
Register
target
,
Register
temp
,
bool
for_compiler_entry
)
{
Label
L_no_such_method
;
assert
(
method
==
R19_method
,
"interpreter calling convention"
);
assert_different_registers
(
method
,
target
,
temp
);
...
...
@@ -131,17 +132,31 @@ void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register meth
__
lwz
(
temp
,
in_bytes
(
JavaThread
::
interp_only_mode_offset
()),
R16_thread
);
__
cmplwi
(
CCR0
,
temp
,
0
);
__
beq
(
CCR0
,
run_compiled_code
);
// Null method test is replicated below in compiled case,
// it might be able to address across the verify_thread()
__
cmplwi
(
CCR0
,
R19_method
,
0
);
__
beq
(
CCR0
,
L_no_such_method
);
__
ld
(
target
,
in_bytes
(
Method
::
interpreter_entry_offset
()),
R19_method
);
__
mtctr
(
target
);
__
bctr
();
__
BIND
(
run_compiled_code
);
}
// Compiled case, either static or fall-through from runtime conditional
__
cmplwi
(
CCR0
,
R19_method
,
0
);
__
beq
(
CCR0
,
L_no_such_method
);
const
ByteSize
entry_offset
=
for_compiler_entry
?
Method
::
from_compiled_offset
()
:
Method
::
from_interpreted_offset
();
__
ld
(
target
,
in_bytes
(
entry_offset
),
R19_method
);
__
mtctr
(
target
);
__
bctr
();
__
bind
(
L_no_such_method
);
assert
(
StubRoutines
::
throw_AbstractMethodError_entry
()
!=
NULL
,
"not yet generated!"
);
__
load_const_optimized
(
target
,
StubRoutines
::
throw_AbstractMethodError_entry
());
__
mtctr
(
target
);
__
bctr
();
}
...
...
src/cpu/ppc/vm/ppc.ad
浏览文件 @
8909df25
...
...
@@ -8777,6 +8777,7 @@ instruct sqrtD_reg(regD dst, regD src) %{
// Single-precision sqrt.
instruct sqrtF_reg(regF dst, regF src) %{
match(Set dst (ConvD2F (SqrtD (ConvF2D src))));
predicate(VM_Version::has_fsqrts());
ins_cost(DEFAULT_COST);
format %{ "FSQRTS $dst, $src" %}
...
...
@@ -11572,8 +11573,7 @@ instruct safePoint_poll_conPollAddr(rscratch2RegP poll) %{
// effect no longer needs to be mentioned, since r0 is not contained
// in a reg_class.
format %{ "LD R12, addr of polling page\n\t"
"LD R0, #0, R12 \t// Safepoint poll for GC" %}
format %{ "LD R0, #0, R12 \t// Safepoint poll for GC" %}
ins_encode( enc_poll(0x0, poll) );
ins_pipe(pipe_class_default);
%}
...
...
src/cpu/ppc/vm/stubRoutines_ppc_64.cpp
浏览文件 @
8909df25
/*
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -23,17 +23,6 @@
*
*/
#include "precompiled.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/stubRoutines.hpp"
#ifdef TARGET_OS_FAMILY_aix
# include "thread_aix.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
// Implementation of the platform-specific part of StubRoutines - for
// a description of how to extend it, see the stubRoutines.hpp file.
...
...
src/cpu/ppc/vm/vm_version_ppc.cpp
浏览文件 @
8909df25
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -402,6 +402,9 @@ void VM_Version::determine_features() {
CodeBuffer
cb
(
"detect_cpu_features"
,
code_size
,
0
);
MacroAssembler
*
a
=
new
MacroAssembler
(
&
cb
);
// Must be set to true so we can generate the test code.
_features
=
VM_Version
::
all_features_m
;
// Emit code.
void
(
*
test
)(
address
addr
,
uint64_t
offset
)
=
(
void
(
*
)(
address
addr
,
uint64_t
offset
))(
void
*
)
a
->
function_entry
();
uint32_t
*
code
=
(
uint32_t
*
)
a
->
pc
();
...
...
@@ -409,14 +412,15 @@ void VM_Version::determine_features() {
// Keep R3_ARG1 unmodified, it contains &field (see below).
// Keep R4_ARG2 unmodified, it contains offset = 0 (see below).
a
->
fsqrt
(
F3
,
F4
);
// code[0] -> fsqrt_m
a
->
isel
(
R7
,
R5
,
R6
,
0
);
// code[1] -> isel_m
a
->
ldarx_unchecked
(
R7
,
R3_ARG1
,
R4_ARG2
,
1
);
// code[2] -> lxarx_m
a
->
cmpb
(
R7
,
R5
,
R6
);
// code[3] -> bcmp
//a->mftgpr(R7, F3); // code[4] -> mftgpr
a
->
popcntb
(
R7
,
R5
);
// code[5] -> popcntb
a
->
popcntw
(
R7
,
R5
);
// code[6] -> popcntw
a
->
fcfids
(
F3
,
F4
);
// code[7] -> fcfids
a
->
vand
(
VR0
,
VR0
,
VR0
);
// code[8] -> vand
a
->
fsqrts
(
F3
,
F4
);
// code[1] -> fsqrts_m
a
->
isel
(
R7
,
R5
,
R6
,
0
);
// code[2] -> isel_m
a
->
ldarx_unchecked
(
R7
,
R3_ARG1
,
R4_ARG2
,
1
);
// code[3] -> lxarx_m
a
->
cmpb
(
R7
,
R5
,
R6
);
// code[4] -> bcmp
//a->mftgpr(R7, F3); // code[5] -> mftgpr
a
->
popcntb
(
R7
,
R5
);
// code[6] -> popcntb
a
->
popcntw
(
R7
,
R5
);
// code[7] -> popcntw
a
->
fcfids
(
F3
,
F4
);
// code[8] -> fcfids
a
->
vand
(
VR0
,
VR0
,
VR0
);
// code[9] -> vand
a
->
blr
();
// Emit function to set one cache line to zero. Emit function descriptor and get pointer to it.
...
...
@@ -426,6 +430,7 @@ void VM_Version::determine_features() {
uint32_t
*
code_end
=
(
uint32_t
*
)
a
->
pc
();
a
->
flush
();
_features
=
VM_Version
::
unknown_m
;
// Print the detection code.
if
(
PrintAssembly
)
{
...
...
@@ -450,6 +455,7 @@ void VM_Version::determine_features() {
// determine which instructions are legal.
int
feature_cntr
=
0
;
if
(
code
[
feature_cntr
++
])
features
|=
fsqrt_m
;
if
(
code
[
feature_cntr
++
])
features
|=
fsqrts_m
;
if
(
code
[
feature_cntr
++
])
features
|=
isel_m
;
if
(
code
[
feature_cntr
++
])
features
|=
lxarxeh_m
;
if
(
code
[
feature_cntr
++
])
features
|=
cmpb_m
;
...
...
src/cpu/ppc/vm/vm_version_ppc.hpp
浏览文件 @
8909df25
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -33,6 +33,7 @@ class VM_Version: public Abstract_VM_Version {
protected:
enum
Feature_Flag
{
fsqrt
,
fsqrts
,
isel
,
lxarxeh
,
cmpb
,
...
...
@@ -46,6 +47,7 @@ protected:
enum
Feature_Flag_Set
{
unknown_m
=
0
,
fsqrt_m
=
(
1
<<
fsqrt
),
fsqrts_m
=
(
1
<<
fsqrts
),
isel_m
=
(
1
<<
isel
),
lxarxeh_m
=
(
1
<<
lxarxeh
),
cmpb_m
=
(
1
<<
cmpb
),
...
...
@@ -72,6 +74,7 @@ public:
static
bool
is_determine_features_test_running
()
{
return
_is_determine_features_test_running
;
}
// CPU instruction support
static
bool
has_fsqrt
()
{
return
(
_features
&
fsqrt_m
)
!=
0
;
}
static
bool
has_fsqrts
()
{
return
(
_features
&
fsqrts_m
)
!=
0
;
}
static
bool
has_isel
()
{
return
(
_features
&
isel_m
)
!=
0
;
}
static
bool
has_lxarxeh
()
{
return
(
_features
&
lxarxeh_m
)
!=
0
;
}
static
bool
has_cmpb
()
{
return
(
_features
&
cmpb_m
)
!=
0
;
}
...
...
src/cpu/ppc/vm/vtableStubs_ppc_64.cpp
浏览文件 @
8909df25
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -79,7 +79,7 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
address
npe_addr
=
__
pc
();
// npe = null pointer exception
__
load_klass_with_trap_null_check
(
rcvr_klass
,
R3
);
// Set method
Oop
(in case of interpreted method), and destination address.
// Set method (in case of interpreted method), and destination address.
int
entry_offset
=
InstanceKlass
::
vtable_start_offset
()
+
vtable_index
*
vtableEntry
::
size
();
#ifndef PRODUCT
...
...
@@ -161,8 +161,6 @@ VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
address
npe_addr
=
__
pc
();
// npe = null pointer exception
__
load_klass_with_trap_null_check
(
rcvr_klass
,
R3_ARG1
);
//__ ld(rcvr_klass, oopDesc::klass_offset_in_bytes(), R3_ARG1);
BLOCK_COMMENT
(
"Load start of itable entries into itable_entry."
);
__
lwz
(
vtable_len
,
InstanceKlass
::
vtable_length_offset
()
*
wordSize
,
rcvr_klass
);
__
slwi
(
vtable_len
,
vtable_len
,
exact_log2
(
vtableEntry
::
size
()
*
wordSize
));
...
...
@@ -199,7 +197,7 @@ VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
itable_offset_search_inc
;
__
lwz
(
vtable_offset
,
vtable_offset_offset
,
itable_entry_addr
);
// Compute itableMethodEntry and get method
Oop
and entry point for compiler.
// Compute itableMethodEntry and get method and entry point for compiler.
const
int
method_offset
=
(
itableMethodEntry
::
size
()
*
wordSize
*
vtable_index
)
+
itableMethodEntry
::
method_offset_in_bytes
();
...
...
@@ -211,7 +209,7 @@ VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
Label
ok
;
__
cmpd
(
CCR0
,
R19_method
,
0
);
__
bne
(
CCR0
,
ok
);
__
stop
(
"method
Oop
is null"
,
103
);
__
stop
(
"method is null"
,
103
);
__
bind
(
ok
);
}
#endif
...
...
src/os/aix/vm/mutex_aix.inline.hpp
浏览文件 @
8909df25
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -28,6 +28,6 @@
#include "os_aix.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "
thread_aix
.inline.hpp"
#include "
runtime/thread
.inline.hpp"
#endif // OS_AIX_VM_MUTEX_AIX_INLINE_HPP
src/os/aix/vm/os_aix.cpp
浏览文件 @
8909df25
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -61,10 +61,10 @@
#include "runtime/statSampler.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/threadCritical.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/timer.hpp"
#include "services/attachListener.hpp"
#include "services/runtimeService.hpp"
#include "thread_aix.inline.hpp"
#include "utilities/decoder.hpp"
#include "utilities/defaultStream.hpp"
#include "utilities/events.hpp"
...
...
src/os/aix/vm/threadCritical_aix.cpp
浏览文件 @
8909df25
/*
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -25,7 +25,7 @@
#include "precompiled.hpp"
#include "runtime/threadCritical.hpp"
#include "
thread_aix
.inline.hpp"
#include "
runtime/thread
.inline.hpp"
// put OS-includes here
# include <pthread.h>
...
...
src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp
浏览文件 @
8909df25
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -49,8 +49,8 @@
#include "runtime/osThread.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/timer.hpp"
#include "thread_aix.inline.hpp"
#include "utilities/events.hpp"
#include "utilities/vmError.hpp"
#ifdef COMPILER1
...
...
src/os_cpu/aix_ppc/vm/threadLS_aix_ppc.cpp
浏览文件 @
8909df25
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -25,14 +25,14 @@
#include "precompiled.hpp"
#include "runtime/threadLocalStorage.hpp"
#include "
thread_aix.inline
.hpp"
#include "
runtime/thread
.hpp"
void
ThreadLocalStorage
::
generate_code_for_get_thread
()
{
// nothing we can do here for user-level thread
// Nothing we can do here for user-level thread.
}
void
ThreadLocalStorage
::
pd_init
()
{
// Nothing to do
// Nothing to do
.
}
void
ThreadLocalStorage
::
pd_set_thread
(
Thread
*
thread
)
{
...
...
src/os_cpu/aix_ppc/vm/thread_aix_ppc.cpp
浏览文件 @
8909df25
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -24,8 +24,8 @@
*/
#include "precompiled.hpp"
#include "runtime/frame.
inline.
hpp"
#include "
thread_aix.inline
.hpp"
#include "runtime/frame.hpp"
#include "
runtime/thread
.hpp"
// Forte Analyzer AsyncGetCallTrace profiling support is not implemented on Aix/PPC.
bool
JavaThread
::
pd_get_top_frame_for_signal_handler
(
frame
*
fr_addr
,
void
*
ucontext
,
bool
isInJava
)
{
...
...
src/os_cpu/linux_ppc/vm/thread_linux_ppc.cpp
浏览文件 @
8909df25
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 201
3
SAP AG. All rights reserved.
* Copyright 2012, 201
4
SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -24,8 +24,8 @@
*/
#include "precompiled.hpp"
#include "runtime/frame.
inline.
hpp"
#include "
thread_linux.inline
.hpp"
#include "runtime/frame.hpp"
#include "
runtime/thread
.hpp"
// Forte Analyzer AsyncGetCallTrace profiling support is not implemented on Linux/PPC.
bool
JavaThread
::
pd_get_top_frame_for_signal_handler
(
frame
*
fr_addr
,
void
*
ucontext
,
bool
isInJava
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录