Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
4edf9014
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看板
提交
4edf9014
编写于
11月 04, 2010
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6997459: JSR 292 after 6994093 getting: on return to interpreted call, restored SP is corrupted
Reviewed-by: kvn, jrose, never
上级
ad708362
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
18 deletion
+17
-18
src/cpu/sparc/vm/methodHandles_sparc.cpp
src/cpu/sparc/vm/methodHandles_sparc.cpp
+17
-18
未找到文件。
src/cpu/sparc/vm/methodHandles_sparc.cpp
浏览文件 @
4edf9014
...
...
@@ -70,17 +70,17 @@ MethodHandleEntry* MethodHandleEntry::finish_compiled_entry(MacroAssembler* _mas
// Code generation
address
MethodHandles
::
generate_method_handle_interpreter_entry
(
MacroAssembler
*
_masm
)
{
// I5_savedSP: sender SP (must preserve)
// I5_savedSP
/O5_savedSP
: sender SP (must preserve)
// G4 (Gargs): incoming argument list (must preserve)
// G5_method: invoke methodOop
; becomes method type.
// G5_method: invoke methodOop
// G3_method_handle: receiver method handle (must load from sp[MethodTypeForm.vmslots])
// O0, O1: garbage temps, blown away
Register
O0_
argslot
=
O0
;
// O0, O1
, O2, O3, O4
: garbage temps, blown away
Register
O0_
mtype
=
O0
;
Register
O1_scratch
=
O1
;
Register
O2_scratch
=
O2
;
Register
O3_scratch
=
O3
;
Register
O4_argslot
=
O4
;
Register
O4_argbase
=
O4
;
Register
O5_mtype
=
O5
;
// emit WrongMethodType path first, to enable back-branch from main path
Label
wrong_method_type
;
...
...
@@ -91,7 +91,7 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
__
cmp
(
O1_scratch
,
(
int
)
vmIntrinsics
::
_invokeExact
);
__
brx
(
Assembler
::
notEqual
,
false
,
Assembler
::
pt
,
invoke_generic_slow_path
);
__
delayed
()
->
nop
();
__
mov
(
O
5
_mtype
,
G5_method_type
);
// required by throw_WrongMethodType
__
mov
(
O
0
_mtype
,
G5_method_type
);
// required by throw_WrongMethodType
// mov(G3_method_handle, G3_method_handle); // already in this register
__
jump_to
(
AddressLiteral
(
Interpreter
::
throw_WrongMethodType_entry
()),
O1_scratch
);
__
delayed
()
->
nop
();
...
...
@@ -104,21 +104,21 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
{
Register
tem
=
G5_method
;
for
(
jint
*
pchase
=
methodOopDesc
::
method_type_offsets_chain
();
(
*
pchase
)
!=
-
1
;
pchase
++
)
{
__
ld_ptr
(
Address
(
tem
,
*
pchase
),
O
5
_mtype
);
tem
=
O
5
_mtype
;
// in case there is another indirection
__
ld_ptr
(
Address
(
tem
,
*
pchase
),
O
0
_mtype
);
tem
=
O
0
_mtype
;
// in case there is another indirection
}
}
// given the MethodType, find out where the MH argument is buried
__
load_heap_oop
(
Address
(
O
5_mtype
,
__
delayed_value
(
java_dyn_MethodType
::
form_offset_in_bytes
,
O1_scratch
)),
O0
_argslot
);
__
ldsw
(
Address
(
O0_argslot
,
__
delayed_value
(
java_dyn_MethodTypeForm
::
vmslots_offset_in_bytes
,
O1_scratch
)),
O0
_argslot
);
__
add
(
Gargs
,
__
argument_offset
(
O
0
_argslot
,
1
),
O4_argbase
);
__
load_heap_oop
(
Address
(
O
0_mtype
,
__
delayed_value
(
java_dyn_MethodType
::
form_offset_in_bytes
,
O1_scratch
)),
O4
_argslot
);
__
ldsw
(
Address
(
O4_argslot
,
__
delayed_value
(
java_dyn_MethodTypeForm
::
vmslots_offset_in_bytes
,
O1_scratch
)),
O4
_argslot
);
__
add
(
Gargs
,
__
argument_offset
(
O
4
_argslot
,
1
),
O4_argbase
);
// Note: argument_address uses its input as a scratch register!
__
ld_ptr
(
Address
(
O4_argbase
,
-
Interpreter
::
stackElementSize
),
G3_method_handle
);
trace_method_handle
(
_masm
,
"invokeExact"
);
__
check_method_handle_type
(
O
5
_mtype
,
G3_method_handle
,
O1_scratch
,
wrong_method_type
);
__
check_method_handle_type
(
O
0
_mtype
,
G3_method_handle
,
O1_scratch
,
wrong_method_type
);
__
jump_to_method_handle_entry
(
G3_method_handle
,
O1_scratch
);
// for invokeGeneric (only), apply argument and result conversions on the fly
...
...
@@ -135,15 +135,14 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
#endif //ASSERT
// make room on the stack for another pointer:
insert_arg_slots
(
_masm
,
2
*
stack_move_unit
(),
_INSERT_REF_MASK
,
O4_argbase
,
O1_scratch
,
O2_scratch
,
O3_scratch
);
insert_arg_slots
(
_masm
,
2
*
stack_move_unit
(),
_INSERT_REF_MASK
,
O4_argbase
,
O1_scratch
,
O2_scratch
,
O3_scratch
);
// load up an adapter from the calling type (Java weaves this)
Register
O2_form
=
O2_scratch
;
Register
O3_adapter
=
O3_scratch
;
__
load_heap_oop
(
Address
(
O
5_mtype
,
__
delayed_value
(
java_dyn_MethodType
::
form_offset_in_bytes
,
O1_scratch
)),
O2_form
);
__
load_heap_oop
(
Address
(
O
0_mtype
,
__
delayed_value
(
java_dyn_MethodType
::
form_offset_in_bytes
,
O1_scratch
)),
O2_form
);
// load_heap_oop(Address(O2_form, __ delayed_value(java_dyn_MethodTypeForm::genericInvoker_offset_in_bytes, O1_scratch)), O3_adapter);
// deal with old JDK versions:
__
add
(
Address
(
O2_form
,
__
delayed_value
(
java_dyn_MethodTypeForm
::
genericInvoker_offset_in_bytes
,
O1_scratch
)),
O3_adapter
);
__
add
(
Address
(
O2_form
,
__
delayed_value
(
java_dyn_MethodTypeForm
::
genericInvoker_offset_in_bytes
,
O1_scratch
)),
O3_adapter
);
__
cmp
(
O3_adapter
,
O2_form
);
Label
sorry_no_invoke_generic
;
__
brx
(
Assembler
::
lessUnsigned
,
false
,
Assembler
::
pn
,
sorry_no_invoke_generic
);
...
...
@@ -157,14 +156,14 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
// As a trusted first argument, pass the type being called, so the adapter knows
// the actual types of the arguments and return values.
// (Generic invokers are shared among form-families of method-type.)
__
st_ptr
(
O
5
_mtype
,
Address
(
O4_argbase
,
0
*
Interpreter
::
stackElementSize
));
__
st_ptr
(
O
0
_mtype
,
Address
(
O4_argbase
,
0
*
Interpreter
::
stackElementSize
));
// FIXME: assert that O3_adapter is of the right method-type.
__
mov
(
O3_adapter
,
G3_method_handle
);
trace_method_handle
(
_masm
,
"invokeGeneric"
);
__
jump_to_method_handle_entry
(
G3_method_handle
,
O1_scratch
);
__
bind
(
sorry_no_invoke_generic
);
// no invokeGeneric implementation available!
__
mov
(
O
5
_mtype
,
G5_method_type
);
// required by throw_WrongMethodType
__
mov
(
O
0
_mtype
,
G5_method_type
);
// required by throw_WrongMethodType
// mov(G3_method_handle, G3_method_handle); // already in this register
__
jump_to
(
AddressLiteral
(
Interpreter
::
throw_WrongMethodType_entry
()),
O1_scratch
);
__
delayed
()
->
nop
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录