Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
99b4cc2b
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看板
提交
99b4cc2b
编写于
5月 25, 2010
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6934104: JSR 292 needs to support SPARC C2
Summary: C2 for SPARC needs to support JSR 292. Reviewed-by: kvn, never
上级
c25c4ce4
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
45 addition
and
12 deletion
+45
-12
src/cpu/sparc/vm/runtime_sparc.cpp
src/cpu/sparc/vm/runtime_sparc.cpp
+6
-1
src/cpu/sparc/vm/sparc.ad
src/cpu/sparc/vm/sparc.ad
+30
-2
src/cpu/x86/vm/runtime_x86_32.cpp
src/cpu/x86/vm/runtime_x86_32.cpp
+2
-2
src/cpu/x86/vm/sharedRuntime_x86_64.cpp
src/cpu/x86/vm/sharedRuntime_x86_64.cpp
+1
-1
src/cpu/x86/vm/x86_32.ad
src/cpu/x86/vm/x86_32.ad
+3
-3
src/cpu/x86/vm/x86_64.ad
src/cpu/x86/vm/x86_64.ad
+3
-3
未找到文件。
src/cpu/sparc/vm/runtime_sparc.cpp
浏览文件 @
99b4cc2b
/*
/*
* Copyright 1998-20
09
Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1998-20
10
Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -116,6 +116,11 @@ void OptoRuntime::generate_exception_blob() {
...
@@ -116,6 +116,11 @@ void OptoRuntime::generate_exception_blob() {
__
mov
(
O0
,
G3_scratch
);
// Move handler address to temp
__
mov
(
O0
,
G3_scratch
);
// Move handler address to temp
__
restore
();
__
restore
();
// Restore SP from L7 if the exception PC is a MethodHandle call site.
__
lduw
(
Address
(
G2_thread
,
JavaThread
::
is_method_handle_return_offset
()),
O7
);
__
tst
(
O7
);
__
movcc
(
Assembler
::
notZero
,
false
,
Assembler
::
icc
,
L7_mh_SP_save
,
SP
);
// G3_scratch contains handler address
// G3_scratch contains handler address
// Since this may be the deopt blob we must set O7 to look like we returned
// Since this may be the deopt blob we must set O7 to look like we returned
// from the original pc that threw the exception
// from the original pc that threw the exception
...
...
src/cpu/sparc/vm/sparc.ad
浏览文件 @
99b4cc2b
...
@@ -534,7 +534,10 @@ bool can_branch_register( Node *bol, Node *cmp ) {
...
@@ -534,7 +534,10 @@ bool can_branch_register( Node *bol, Node *cmp ) {
// The "return address" is the address of the call instruction, plus 8.
// The "return address" is the address of the call instruction, plus 8.
int MachCallStaticJavaNode::ret_addr_offset() {
int MachCallStaticJavaNode::ret_addr_offset() {
return NativeCall::instruction_size; // call; delay slot
int offset = NativeCall::instruction_size; // call; delay slot
if (_method_handle_invoke)
offset += 4; // restore SP
return offset;
}
}
int MachCallDynamicJavaNode::ret_addr_offset() {
int MachCallDynamicJavaNode::ret_addr_offset() {
...
@@ -1858,7 +1861,7 @@ RegMask Matcher::modL_proj_mask() {
...
@@ -1858,7 +1861,7 @@ RegMask Matcher::modL_proj_mask() {
}
}
const RegMask Matcher::method_handle_invoke_SP_save_mask() {
const RegMask Matcher::method_handle_invoke_SP_save_mask() {
return
RegMask()
;
return
L7_REGP_mask
;
}
}
%}
%}
...
@@ -2441,6 +2444,16 @@ encode %{
...
@@ -2441,6 +2444,16 @@ encode %{
/*preserve_g2=*/true, /*force far call*/true);
/*preserve_g2=*/true, /*force far call*/true);
%}
%}
enc_class preserve_SP %{
MacroAssembler _masm(&cbuf);
__ mov(SP, L7_mh_SP_save);
%}
enc_class restore_SP %{
MacroAssembler _masm(&cbuf);
__ mov(L7_mh_SP_save, SP);
%}
enc_class Java_Static_Call (method meth) %{ // JAVA STATIC CALL
enc_class Java_Static_Call (method meth) %{ // JAVA STATIC CALL
// CALL to fixup routine. Fixup routine uses ScopeDesc info to determine
// CALL to fixup routine. Fixup routine uses ScopeDesc info to determine
// who we intended to call.
// who we intended to call.
...
@@ -9213,6 +9226,7 @@ instruct safePoint_poll(iRegP poll) %{
...
@@ -9213,6 +9226,7 @@ instruct safePoint_poll(iRegP poll) %{
// Call Java Static Instruction
// Call Java Static Instruction
instruct CallStaticJavaDirect( method meth ) %{
instruct CallStaticJavaDirect( method meth ) %{
match(CallStaticJava);
match(CallStaticJava);
predicate(! ((CallStaticJavaNode*)n)->is_method_handle_invoke());
effect(USE meth);
effect(USE meth);
size(8);
size(8);
...
@@ -9223,6 +9237,20 @@ instruct CallStaticJavaDirect( method meth ) %{
...
@@ -9223,6 +9237,20 @@ instruct CallStaticJavaDirect( method meth ) %{
ins_pipe(simple_call);
ins_pipe(simple_call);
%}
%}
// Call Java Static Instruction (method handle version)
instruct CallStaticJavaHandle(method meth, l7RegP l7_mh_SP_save) %{
match(CallStaticJava);
predicate(((CallStaticJavaNode*)n)->is_method_handle_invoke());
effect(USE meth, KILL l7_mh_SP_save);
size(8);
ins_cost(CALL_COST);
format %{ "CALL,static/MethodHandle" %}
ins_encode(preserve_SP, Java_Static_Call(meth), restore_SP, call_epilog);
ins_pc_relative(1);
ins_pipe(simple_call);
%}
// Call Java Dynamic Instruction
// Call Java Dynamic Instruction
instruct CallDynamicJavaDirect( method meth ) %{
instruct CallDynamicJavaDirect( method meth ) %{
match(CallDynamicJava);
match(CallDynamicJava);
...
...
src/cpu/x86/vm/runtime_x86_32.cpp
浏览文件 @
99b4cc2b
/*
/*
* Copyright 1998-20
09
Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1998-20
10
Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -117,7 +117,7 @@ void OptoRuntime::generate_exception_blob() {
...
@@ -117,7 +117,7 @@ void OptoRuntime::generate_exception_blob() {
// Restore SP from BP if the exception PC is a MethodHandle call site.
// Restore SP from BP if the exception PC is a MethodHandle call site.
__
cmpl
(
Address
(
rcx
,
JavaThread
::
is_method_handle_return_offset
()),
0
);
__
cmpl
(
Address
(
rcx
,
JavaThread
::
is_method_handle_return_offset
()),
0
);
__
cmovptr
(
Assembler
::
notEqual
,
rsp
,
rbp
);
__
cmovptr
(
Assembler
::
notEqual
,
rsp
,
rbp
_mh_SP_save
);
// We have a handler in rax, (could be deopt blob)
// We have a handler in rax, (could be deopt blob)
// rdx - throwing pc, deopt blob will need it.
// rdx - throwing pc, deopt blob will need it.
...
...
src/cpu/x86/vm/sharedRuntime_x86_64.cpp
浏览文件 @
99b4cc2b
...
@@ -3305,7 +3305,7 @@ void OptoRuntime::generate_exception_blob() {
...
@@ -3305,7 +3305,7 @@ void OptoRuntime::generate_exception_blob() {
// Restore SP from BP if the exception PC is a MethodHandle call site.
// Restore SP from BP if the exception PC is a MethodHandle call site.
__
cmpl
(
Address
(
r15_thread
,
JavaThread
::
is_method_handle_return_offset
()),
0
);
__
cmpl
(
Address
(
r15_thread
,
JavaThread
::
is_method_handle_return_offset
()),
0
);
__
cmovptr
(
Assembler
::
notEqual
,
rsp
,
rbp
);
__
cmovptr
(
Assembler
::
notEqual
,
rsp
,
rbp
_mh_SP_save
);
// We have a handler in rax (could be deopt blob).
// We have a handler in rax (could be deopt blob).
__
mov
(
r8
,
rax
);
__
mov
(
r8
,
rax
);
...
...
src/cpu/x86/vm/x86_32.ad
浏览文件 @
99b4cc2b
...
@@ -1841,14 +1841,14 @@ encode %{
...
@@ -1841,14 +1841,14 @@ encode %{
MacroAssembler _masm(&cbuf);
MacroAssembler _masm(&cbuf);
// RBP is preserved across all calls, even compiled calls.
// RBP is preserved across all calls, even compiled calls.
// Use it to preserve RSP in places where the callee might change the SP.
// Use it to preserve RSP in places where the callee might change the SP.
__ movptr(rbp, rsp);
__ movptr(rbp
_mh_SP_save
, rsp);
debug_only(int off1 = cbuf.code_size());
debug_only(int off1 = cbuf.code_size());
assert(off1 - off0 == preserve_SP_size(), "correct size prediction");
assert(off1 - off0 == preserve_SP_size(), "correct size prediction");
%}
%}
enc_class restore_SP %{
enc_class restore_SP %{
MacroAssembler _masm(&cbuf);
MacroAssembler _masm(&cbuf);
__ movptr(rsp, rbp);
__ movptr(rsp, rbp
_mh_SP_save
);
%}
%}
enc_class Java_Static_Call (method meth) %{ // JAVA STATIC CALL
enc_class Java_Static_Call (method meth) %{ // JAVA STATIC CALL
...
@@ -13570,7 +13570,7 @@ instruct CallStaticJavaDirect(method meth) %{
...
@@ -13570,7 +13570,7 @@ instruct CallStaticJavaDirect(method meth) %{
// Call Java Static Instruction (method handle version)
// Call Java Static Instruction (method handle version)
// Note: If this code changes, the corresponding ret_addr_offset() and
// Note: If this code changes, the corresponding ret_addr_offset() and
// compute_padding() functions will have to be adjusted.
// compute_padding() functions will have to be adjusted.
instruct CallStaticJavaHandle(method meth, eBPRegP ebp) %{
instruct CallStaticJavaHandle(method meth, eBPRegP ebp
_mh_SP_save
) %{
match(CallStaticJava);
match(CallStaticJava);
predicate(((CallStaticJavaNode*)n)->is_method_handle_invoke());
predicate(((CallStaticJavaNode*)n)->is_method_handle_invoke());
effect(USE meth);
effect(USE meth);
...
...
src/cpu/x86/vm/x86_64.ad
浏览文件 @
99b4cc2b
...
@@ -2635,14 +2635,14 @@ encode %{
...
@@ -2635,14 +2635,14 @@ encode %{
MacroAssembler _masm(&cbuf);
MacroAssembler _masm(&cbuf);
// RBP is preserved across all calls, even compiled calls.
// RBP is preserved across all calls, even compiled calls.
// Use it to preserve RSP in places where the callee might change the SP.
// Use it to preserve RSP in places where the callee might change the SP.
__ movptr(rbp, rsp);
__ movptr(rbp
_mh_SP_save
, rsp);
debug_only(int off1 = cbuf.code_size());
debug_only(int off1 = cbuf.code_size());
assert(off1 - off0 == preserve_SP_size(), "correct size prediction");
assert(off1 - off0 == preserve_SP_size(), "correct size prediction");
%}
%}
enc_class restore_SP %{
enc_class restore_SP %{
MacroAssembler _masm(&cbuf);
MacroAssembler _masm(&cbuf);
__ movptr(rsp, rbp);
__ movptr(rsp, rbp
_mh_SP_save
);
%}
%}
enc_class Java_Static_Call(method meth)
enc_class Java_Static_Call(method meth)
...
@@ -12604,7 +12604,7 @@ instruct CallStaticJavaDirect(method meth) %{
...
@@ -12604,7 +12604,7 @@ instruct CallStaticJavaDirect(method meth) %{
// Call Java Static Instruction (method handle version)
// Call Java Static Instruction (method handle version)
// Note: If this code changes, the corresponding ret_addr_offset() and
// Note: If this code changes, the corresponding ret_addr_offset() and
// compute_padding() functions will have to be adjusted.
// compute_padding() functions will have to be adjusted.
instruct CallStaticJavaHandle(method meth, rbp_RegP rbp) %{
instruct CallStaticJavaHandle(method meth, rbp_RegP rbp
_mh_SP_save
) %{
match(CallStaticJava);
match(CallStaticJava);
predicate(((CallStaticJavaNode*) n)->is_method_handle_invoke());
predicate(((CallStaticJavaNode*) n)->is_method_handle_invoke());
effect(USE meth);
effect(USE meth);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录