Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
eb7b778e
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看板
提交
eb7b778e
编写于
2月 14, 2011
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7018378: JSR 292: _bound_int_mh produces wrong result on 64-bit SPARC
Reviewed-by: kvn
上级
858445c2
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
63 addition
and
48 deletion
+63
-48
src/cpu/sparc/vm/assembler_sparc.cpp
src/cpu/sparc/vm/assembler_sparc.cpp
+16
-7
src/cpu/sparc/vm/assembler_sparc.hpp
src/cpu/sparc/vm/assembler_sparc.hpp
+3
-2
src/cpu/sparc/vm/methodHandles_sparc.cpp
src/cpu/sparc/vm/methodHandles_sparc.cpp
+6
-15
src/cpu/x86/vm/assembler_x86.cpp
src/cpu/x86/vm/assembler_x86.cpp
+29
-10
src/cpu/x86/vm/assembler_x86.hpp
src/cpu/x86/vm/assembler_x86.hpp
+3
-2
src/cpu/x86/vm/methodHandles_x86.cpp
src/cpu/x86/vm/methodHandles_x86.cpp
+6
-12
未找到文件。
src/cpu/sparc/vm/assembler_sparc.cpp
浏览文件 @
eb7b778e
...
...
@@ -2407,14 +2407,23 @@ void MacroAssembler::lcmp( Register Ra, Register Rb, Register Rresult) {
#endif
void
MacroAssembler
::
load_sized_value
(
Address
src
,
Register
dst
,
size_t
size_in_bytes
,
bool
is_signed
)
{
void
MacroAssembler
::
load_sized_value
(
Address
src
,
Register
dst
,
size_t
size_in_bytes
,
bool
is_signed
)
{
switch
(
size_in_bytes
)
{
case
8
:
ldx
(
src
,
dst
);
break
;
case
4
:
ld
(
src
,
dst
);
break
;
case
2
:
is_signed
?
ldsh
(
src
,
dst
)
:
lduh
(
src
,
dst
);
break
;
case
1
:
is_signed
?
ldsb
(
src
,
dst
)
:
ldub
(
src
,
dst
);
break
;
default:
ShouldNotReachHere
();
case
8
:
ld_long
(
src
,
dst
);
break
;
case
4
:
ld
(
src
,
dst
);
break
;
case
2
:
is_signed
?
ldsh
(
src
,
dst
)
:
lduh
(
src
,
dst
);
break
;
case
1
:
is_signed
?
ldsb
(
src
,
dst
)
:
ldub
(
src
,
dst
);
break
;
default:
ShouldNotReachHere
();
}
}
void
MacroAssembler
::
store_sized_value
(
Register
src
,
Address
dst
,
size_t
size_in_bytes
)
{
switch
(
size_in_bytes
)
{
case
8
:
st_long
(
src
,
dst
);
break
;
case
4
:
st
(
src
,
dst
);
break
;
case
2
:
sth
(
src
,
dst
);
break
;
case
1
:
stb
(
src
,
dst
);
break
;
default:
ShouldNotReachHere
();
}
}
...
...
src/cpu/sparc/vm/assembler_sparc.hpp
浏览文件 @
eb7b778e
...
...
@@ -2330,8 +2330,9 @@ public:
void
lcmp
(
Register
Ra
,
Register
Rb
,
Register
Rresult
);
#endif
// Loading values by size and signed-ness
void
load_sized_value
(
Address
src
,
Register
dst
,
size_t
size_in_bytes
,
bool
is_signed
);
// Load and store values by size and signed-ness
void
load_sized_value
(
Address
src
,
Register
dst
,
size_t
size_in_bytes
,
bool
is_signed
);
void
store_sized_value
(
Register
src
,
Address
dst
,
size_t
size_in_bytes
);
void
float_cmp
(
bool
is_float
,
int
unordered_result
,
FloatRegister
Fa
,
FloatRegister
Fb
,
...
...
src/cpu/sparc/vm/methodHandles_sparc.cpp
浏览文件 @
eb7b778e
...
...
@@ -596,16 +596,9 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan
__
st_ptr
(
O1_scratch
,
Address
(
O0_argslot
,
0
));
}
else
{
Address
prim_value_addr
(
O1_scratch
,
java_lang_boxing_object
::
value_offset_in_bytes
(
arg_type
));
__
load_sized_value
(
prim_value_addr
,
O2_scratch
,
type2aelembytes
(
arg_type
),
is_signed_subword_type
(
arg_type
));
if
(
arg_slots
==
2
)
{
__
unimplemented
(
"not yet tested"
);
#ifndef _LP64
__
signx
(
O2_scratch
,
O3_scratch
);
// Sign extend
#endif
__
st_long
(
O2_scratch
,
Address
(
O0_argslot
,
0
));
// Uses O2/O3 on !_LP64
}
else
{
__
st_ptr
(
O2_scratch
,
Address
(
O0_argslot
,
0
));
}
const
int
arg_size
=
type2aelembytes
(
arg_type
);
__
load_sized_value
(
prim_value_addr
,
O2_scratch
,
arg_size
,
is_signed_subword_type
(
arg_type
));
__
store_sized_value
(
O2_scratch
,
Address
(
O0_argslot
,
0
),
arg_size
);
// long store uses O2/O3 on !_LP64
}
if
(
direct_to_method
)
{
...
...
@@ -784,11 +777,9 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan
switch
(
ek
)
{
case
_adapter_opt_i2l
:
{
__
ldsw
(
arg_lsw
,
O2_scratch
);
// Load LSW
#ifndef _LP64
__
signx
(
O2_scratch
,
O3_scratch
);
// Sign extend
#endif
__
st_long
(
O2_scratch
,
arg_msw
);
// Uses O2/O3 on !_LP64
__
ldsw
(
arg_lsw
,
O2_scratch
);
// Load LSW
NOT_LP64
(
__
srlx
(
O2_scratch
,
BitsPerInt
,
O3_scratch
));
// Move high bits to lower bits for std
__
st_long
(
O2_scratch
,
arg_msw
);
// Uses O2/O3 on !_LP64
}
break
;
case
_adapter_opt_unboxl
:
...
...
src/cpu/x86/vm/assembler_x86.cpp
浏览文件 @
eb7b778e
...
...
@@ -6528,20 +6528,39 @@ int MacroAssembler::load_unsigned_short(Register dst, Address src) {
return
off
;
}
void
MacroAssembler
::
load_sized_value
(
Register
dst
,
Address
src
,
size_t
size_in_bytes
,
bool
is_signed
)
{
void
MacroAssembler
::
load_sized_value
(
Register
dst
,
Address
src
,
size_t
size_in_bytes
,
bool
is_signed
,
Register
dst2
)
{
switch
(
size_in_bytes
)
{
#ifndef _LP64
// For case 8, caller is responsible for manually loading
// the second word into another register.
case
8
:
movl
(
dst
,
src
);
break
;
case
8
:
assert
(
dst2
!=
noreg
,
"second dest register required"
);
movl
(
dst
,
src
);
movl
(
dst2
,
src
.
plus_disp
(
BytesPerInt
));
break
;
#else
case
8
:
movq
(
dst
,
src
);
break
;
#endif
case
4
:
movl
(
dst
,
src
);
break
;
case
2
:
is_signed
?
load_signed_short
(
dst
,
src
)
:
load_unsigned_short
(
dst
,
src
);
break
;
case
1
:
is_signed
?
load_signed_byte
(
dst
,
src
)
:
load_unsigned_byte
(
dst
,
src
);
break
;
default:
ShouldNotReachHere
();
}
}
void
MacroAssembler
::
store_sized_value
(
Address
dst
,
Register
src
,
size_t
size_in_bytes
,
Register
src2
)
{
switch
(
size_in_bytes
)
{
#ifndef _LP64
case
8
:
assert
(
src2
!=
noreg
,
"second source register required"
);
movl
(
dst
,
src
);
movl
(
dst
.
plus_disp
(
BytesPerInt
),
src2
);
break
;
#else
case
8
:
movq
(
dst
,
src
);
break
;
case
8
:
movq
(
dst
,
src
);
break
;
#endif
case
4
:
movl
(
dst
,
src
);
break
;
case
2
:
is_signed
?
load_signed_short
(
dst
,
src
)
:
load_unsigned_short
(
dst
,
src
);
break
;
case
1
:
is_signed
?
load_signed_byte
(
dst
,
src
)
:
load_unsigned_byte
(
dst
,
src
);
break
;
default:
ShouldNotReachHere
();
case
4
:
movl
(
dst
,
src
);
break
;
case
2
:
movw
(
dst
,
src
);
break
;
case
1
:
movb
(
dst
,
src
);
break
;
default:
ShouldNotReachHere
();
}
}
...
...
src/cpu/x86/vm/assembler_x86.hpp
浏览文件 @
eb7b778e
...
...
@@ -1522,8 +1522,9 @@ class MacroAssembler: public Assembler {
// Support for sign-extension (hi:lo = extend_sign(lo))
void
extend_sign
(
Register
hi
,
Register
lo
);
// Loading values by size and signed-ness
void
load_sized_value
(
Register
dst
,
Address
src
,
size_t
size_in_bytes
,
bool
is_signed
);
// Load and store values by size and signed-ness
void
load_sized_value
(
Register
dst
,
Address
src
,
size_t
size_in_bytes
,
bool
is_signed
,
Register
dst2
=
noreg
);
void
store_sized_value
(
Address
dst
,
Register
src
,
size_t
size_in_bytes
,
Register
src2
=
noreg
);
// Support for inc/dec with optimal instruction selection depending on value
...
...
src/cpu/x86/vm/methodHandles_x86.cpp
浏览文件 @
eb7b778e
...
...
@@ -602,24 +602,18 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan
// make room for the new argument:
__
movl
(
rax_argslot
,
rcx_bmh_vmargslot
);
__
lea
(
rax_argslot
,
__
argument_address
(
rax_argslot
));
insert_arg_slots
(
_masm
,
arg_slots
*
stack_move_unit
(),
arg_mask
,
rax_argslot
,
rbx_temp
,
rdx_temp
);
insert_arg_slots
(
_masm
,
arg_slots
*
stack_move_unit
(),
arg_mask
,
rax_argslot
,
rbx_temp
,
rdx_temp
);
// store bound argument into the new stack slot:
__
load_heap_oop
(
rbx_temp
,
rcx_bmh_argument
);
Address
prim_value_addr
(
rbx_temp
,
java_lang_boxing_object
::
value_offset_in_bytes
(
arg_type
));
if
(
arg_type
==
T_OBJECT
)
{
__
movptr
(
Address
(
rax_argslot
,
0
),
rbx_temp
);
}
else
{
__
load_sized_value
(
rdx_temp
,
prim_value_addr
,
type2aelembytes
(
arg_type
),
is_signed_subword_type
(
arg_type
));
__
movptr
(
Address
(
rax_argslot
,
0
),
rdx_temp
);
#ifndef _LP64
if
(
arg_slots
==
2
)
{
__
movl
(
rdx_temp
,
prim_value_addr
.
plus_disp
(
wordSize
));
__
movl
(
Address
(
rax_argslot
,
Interpreter
::
stackElementSize
),
rdx_temp
);
}
#endif //_LP64
Address
prim_value_addr
(
rbx_temp
,
java_lang_boxing_object
::
value_offset_in_bytes
(
arg_type
));
const
int
arg_size
=
type2aelembytes
(
arg_type
);
__
load_sized_value
(
rdx_temp
,
prim_value_addr
,
arg_size
,
is_signed_subword_type
(
arg_type
),
rbx_temp
);
__
store_sized_value
(
Address
(
rax_argslot
,
0
),
rdx_temp
,
arg_size
,
rbx_temp
);
}
if
(
direct_to_method
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录