Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
39718eb1
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看板
提交
39718eb1
编写于
3月 29, 2011
作者:
I
iveresov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6741940: Nonvolatile XMM registers not preserved across JNI calls
Summary: Save xmm6-xmm15 in call stub on win64 Reviewed-by: kvn, never
上级
bcadf8a6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
7 deletion
+28
-7
src/cpu/x86/vm/frame_x86.hpp
src/cpu/x86/vm/frame_x86.hpp
+2
-2
src/cpu/x86/vm/stubGenerator_x86_64.cpp
src/cpu/x86/vm/stubGenerator_x86_64.cpp
+26
-5
未找到文件。
src/cpu/x86/vm/frame_x86.hpp
浏览文件 @
39718eb1
/*
/*
* Copyright (c) 1997, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
1
, Oracle and/or its affiliates. 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
...
@@ -125,7 +125,7 @@
...
@@ -125,7 +125,7 @@
// Entry frames
// Entry frames
#ifdef AMD64
#ifdef AMD64
#ifdef _WIN64
#ifdef _WIN64
entry_frame_after_call_words
=
8
,
entry_frame_after_call_words
=
2
8
,
entry_frame_call_wrapper_offset
=
2
,
entry_frame_call_wrapper_offset
=
2
,
arg_reg_save_area_bytes
=
32
,
// Register argument save area
arg_reg_save_area_bytes
=
32
,
// Register argument save area
...
...
src/cpu/x86/vm/stubGenerator_x86_64.cpp
浏览文件 @
39718eb1
...
@@ -144,8 +144,11 @@ class StubGenerator: public StubCodeGenerator {
...
@@ -144,8 +144,11 @@ class StubGenerator: public StubCodeGenerator {
// [ return_from_Java ] <--- rsp
// [ return_from_Java ] <--- rsp
// [ argument word n ]
// [ argument word n ]
// ...
// ...
// -8 [ argument word 1 ]
// -28 [ argument word 1 ]
// -7 [ saved r15 ] <--- rsp_after_call
// -27 [ saved xmm15 ] <--- rsp_after_call
// [ saved xmm7-xmm14 ]
// -9 [ saved xmm6 ] (each xmm register takes 2 slots)
// -7 [ saved r15 ]
// -6 [ saved r14 ]
// -6 [ saved r14 ]
// -5 [ saved r13 ]
// -5 [ saved r13 ]
// -4 [ saved r12 ]
// -4 [ saved r12 ]
...
@@ -169,8 +172,11 @@ class StubGenerator: public StubCodeGenerator {
...
@@ -169,8 +172,11 @@ class StubGenerator: public StubCodeGenerator {
// Call stub stack layout word offsets from rbp
// Call stub stack layout word offsets from rbp
enum
call_stub_layout
{
enum
call_stub_layout
{
#ifdef _WIN64
#ifdef _WIN64
rsp_after_call_off
=
-
7
,
xmm_save_first
=
6
,
// save from xmm6
r15_off
=
rsp_after_call_off
,
xmm_save_last
=
15
,
// to xmm15
xmm_save_base
=
-
9
,
rsp_after_call_off
=
xmm_save_base
-
2
*
(
xmm_save_last
-
xmm_save_first
),
// -27
r15_off
=
-
7
,
r14_off
=
-
6
,
r14_off
=
-
6
,
r13_off
=
-
5
,
r13_off
=
-
5
,
r12_off
=
-
4
,
r12_off
=
-
4
,
...
@@ -208,6 +214,13 @@ class StubGenerator: public StubCodeGenerator {
...
@@ -208,6 +214,13 @@ class StubGenerator: public StubCodeGenerator {
#endif
#endif
};
};
#ifdef _WIN64
Address
xmm_save
(
int
reg
)
{
assert
(
reg
>=
xmm_save_first
&&
reg
<=
xmm_save_last
,
"XMM register number out of range"
);
return
Address
(
rbp
,
(
xmm_save_base
-
(
reg
-
xmm_save_first
)
*
2
)
*
wordSize
);
}
#endif
address
generate_call_stub
(
address
&
return_address
)
{
address
generate_call_stub
(
address
&
return_address
)
{
assert
((
int
)
frame
::
entry_frame_after_call_words
==
-
(
int
)
rsp_after_call_off
+
1
&&
assert
((
int
)
frame
::
entry_frame_after_call_words
==
-
(
int
)
rsp_after_call_off
+
1
&&
(
int
)
frame
::
entry_frame_call_wrapper_offset
==
(
int
)
call_wrapper_off
,
(
int
)
frame
::
entry_frame_call_wrapper_offset
==
(
int
)
call_wrapper_off
,
...
@@ -256,8 +269,11 @@ class StubGenerator: public StubCodeGenerator {
...
@@ -256,8 +269,11 @@ class StubGenerator: public StubCodeGenerator {
__
movptr
(
r13_save
,
r13
);
__
movptr
(
r13_save
,
r13
);
__
movptr
(
r14_save
,
r14
);
__
movptr
(
r14_save
,
r14
);
__
movptr
(
r15_save
,
r15
);
__
movptr
(
r15_save
,
r15
);
#ifdef _WIN64
#ifdef _WIN64
for
(
int
i
=
6
;
i
<=
15
;
i
++
)
{
__
movdqu
(
xmm_save
(
i
),
as_XMMRegister
(
i
));
}
const
Address
rdi_save
(
rbp
,
rdi_off
*
wordSize
);
const
Address
rdi_save
(
rbp
,
rdi_off
*
wordSize
);
const
Address
rsi_save
(
rbp
,
rsi_off
*
wordSize
);
const
Address
rsi_save
(
rbp
,
rsi_off
*
wordSize
);
...
@@ -360,6 +376,11 @@ class StubGenerator: public StubCodeGenerator {
...
@@ -360,6 +376,11 @@ class StubGenerator: public StubCodeGenerator {
#endif
#endif
// restore regs belonging to calling function
// restore regs belonging to calling function
#ifdef _WIN64
for
(
int
i
=
15
;
i
>=
6
;
i
--
)
{
__
movdqu
(
as_XMMRegister
(
i
),
xmm_save
(
i
));
}
#endif
__
movptr
(
r15
,
r15_save
);
__
movptr
(
r15
,
r15_save
);
__
movptr
(
r14
,
r14_save
);
__
movptr
(
r14
,
r14_save
);
__
movptr
(
r13
,
r13_save
);
__
movptr
(
r13
,
r13_save
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录