Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
86548bbe
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看板
提交
86548bbe
编写于
9月 14, 2010
作者:
N
never
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6982370: SIGBUS in jbyte_fill
Reviewed-by: kvn
上级
a55f6f35
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
190 addition
and
7 deletion
+190
-7
src/cpu/sparc/vm/stubGenerator_sparc.cpp
src/cpu/sparc/vm/stubGenerator_sparc.cpp
+51
-7
test/compiler/6982370/Test6982370.java
test/compiler/6982370/Test6982370.java
+139
-0
未找到文件。
src/cpu/sparc/vm/stubGenerator_sparc.cpp
浏览文件 @
86548bbe
...
@@ -1609,7 +1609,7 @@ class StubGenerator: public StubCodeGenerator {
...
@@ -1609,7 +1609,7 @@ class StubGenerator: public StubCodeGenerator {
assert_clean_int
(
count
,
O3
);
// Make sure 'count' is clean int.
assert_clean_int
(
count
,
O3
);
// Make sure 'count' is clean int.
Label
L_exit
,
L_skip_align1
,
L_skip_align2
,
L_fill_byte
;
Label
L_exit
,
L_skip_align1
,
L_skip_align2
,
L_fill_byte
;
Label
L_fill_2_bytes
,
L_fill_
4_byte
s
,
L_fill_32_bytes
;
Label
L_fill_2_bytes
,
L_fill_
element
s
,
L_fill_32_bytes
;
int
shift
=
-
1
;
int
shift
=
-
1
;
switch
(
t
)
{
switch
(
t
)
{
...
@@ -1635,8 +1635,8 @@ class StubGenerator: public StubCodeGenerator {
...
@@ -1635,8 +1635,8 @@ class StubGenerator: public StubCodeGenerator {
}
}
if
(
t
==
T_SHORT
)
{
if
(
t
==
T_SHORT
)
{
// Zero extend value
// Zero extend value
__
s
ethi
(
0xffff0000
,
O3
);
__
s
llx
(
value
,
48
,
value
);
__
andn
(
value
,
O3
,
value
);
__
srlx
(
value
,
48
,
value
);
}
}
if
(
t
==
T_BYTE
||
t
==
T_SHORT
)
{
if
(
t
==
T_BYTE
||
t
==
T_SHORT
)
{
__
sllx
(
value
,
16
,
O3
);
__
sllx
(
value
,
16
,
O3
);
...
@@ -1644,8 +1644,8 @@ class StubGenerator: public StubCodeGenerator {
...
@@ -1644,8 +1644,8 @@ class StubGenerator: public StubCodeGenerator {
}
}
__
cmp
(
count
,
2
<<
shift
);
// Short arrays (< 8 bytes) fill by element
__
cmp
(
count
,
2
<<
shift
);
// Short arrays (< 8 bytes) fill by element
__
brx
(
Assembler
::
lessUnsigned
,
false
,
Assembler
::
pn
,
L_fill_
4_byte
s
);
// use unsigned cmp
__
brx
(
Assembler
::
lessUnsigned
,
false
,
Assembler
::
pn
,
L_fill_
element
s
);
// use unsigned cmp
__
delayed
()
->
andcc
(
count
,
1
<<
shift
,
G0
);
__
delayed
()
->
andcc
(
count
,
1
,
G0
);
if
(
!
aligned
&&
(
t
==
T_BYTE
||
t
==
T_SHORT
))
{
if
(
!
aligned
&&
(
t
==
T_BYTE
||
t
==
T_SHORT
))
{
// align source address at 4 bytes address boundary
// align source address at 4 bytes address boundary
...
@@ -1698,7 +1698,7 @@ class StubGenerator: public StubCodeGenerator {
...
@@ -1698,7 +1698,7 @@ class StubGenerator: public StubCodeGenerator {
__
brx
(
Assembler
::
less
,
false
,
Assembler
::
pt
,
L_check_fill_8_bytes
);
__
brx
(
Assembler
::
less
,
false
,
Assembler
::
pt
,
L_check_fill_8_bytes
);
__
delayed
()
->
nop
();
__
delayed
()
->
nop
();
Label
L_fill_32_bytes_loop
;
Label
L_fill_32_bytes_loop
,
L_fill_4_bytes
;
__
align
(
16
);
__
align
(
16
);
__
BIND
(
L_fill_32_bytes_loop
);
__
BIND
(
L_fill_32_bytes_loop
);
...
@@ -1730,6 +1730,9 @@ class StubGenerator: public StubCodeGenerator {
...
@@ -1730,6 +1730,9 @@ class StubGenerator: public StubCodeGenerator {
// fill trailing 4 bytes
// fill trailing 4 bytes
__
andcc
(
count
,
1
<<
shift
,
G0
);
// in delay slot of branches
__
andcc
(
count
,
1
<<
shift
,
G0
);
// in delay slot of branches
if
(
t
==
T_INT
)
{
__
BIND
(
L_fill_elements
);
}
__
BIND
(
L_fill_4_bytes
);
__
BIND
(
L_fill_4_bytes
);
__
brx
(
Assembler
::
zero
,
false
,
Assembler
::
pt
,
L_fill_2_bytes
);
__
brx
(
Assembler
::
zero
,
false
,
Assembler
::
pt
,
L_fill_2_bytes
);
if
(
t
==
T_BYTE
||
t
==
T_SHORT
)
{
if
(
t
==
T_BYTE
||
t
==
T_SHORT
)
{
...
@@ -1762,7 +1765,48 @@ class StubGenerator: public StubCodeGenerator {
...
@@ -1762,7 +1765,48 @@ class StubGenerator: public StubCodeGenerator {
}
}
__
BIND
(
L_exit
);
__
BIND
(
L_exit
);
__
retl
();
__
retl
();
__
delayed
()
->
mov
(
G0
,
O0
);
// return 0
__
delayed
()
->
nop
();
// Handle copies less than 8 bytes. Int is handled elsewhere.
if
(
t
==
T_BYTE
)
{
__
BIND
(
L_fill_elements
);
Label
L_fill_2
,
L_fill_4
;
// in delay slot __ andcc(count, 1, G0);
__
brx
(
Assembler
::
zero
,
false
,
Assembler
::
pt
,
L_fill_2
);
__
delayed
()
->
andcc
(
count
,
2
,
G0
);
__
stb
(
value
,
to
,
0
);
__
inc
(
to
,
1
);
__
BIND
(
L_fill_2
);
__
brx
(
Assembler
::
zero
,
false
,
Assembler
::
pt
,
L_fill_4
);
__
delayed
()
->
andcc
(
count
,
4
,
G0
);
__
stb
(
value
,
to
,
0
);
__
stb
(
value
,
to
,
1
);
__
inc
(
to
,
2
);
__
BIND
(
L_fill_4
);
__
brx
(
Assembler
::
zero
,
false
,
Assembler
::
pt
,
L_exit
);
__
delayed
()
->
nop
();
__
stb
(
value
,
to
,
0
);
__
stb
(
value
,
to
,
1
);
__
stb
(
value
,
to
,
2
);
__
retl
();
__
delayed
()
->
stb
(
value
,
to
,
3
);
}
if
(
t
==
T_SHORT
)
{
Label
L_fill_2
;
__
BIND
(
L_fill_elements
);
// in delay slot __ andcc(count, 1, G0);
__
brx
(
Assembler
::
zero
,
false
,
Assembler
::
pt
,
L_fill_2
);
__
delayed
()
->
andcc
(
count
,
2
,
G0
);
__
sth
(
value
,
to
,
0
);
__
inc
(
to
,
2
);
__
BIND
(
L_fill_2
);
__
brx
(
Assembler
::
zero
,
false
,
Assembler
::
pt
,
L_exit
);
__
delayed
()
->
nop
();
__
sth
(
value
,
to
,
0
);
__
retl
();
__
delayed
()
->
sth
(
value
,
to
,
2
);
}
return
start
;
return
start
;
}
}
...
...
test/compiler/6982370/Test6982370.java
0 → 100644
浏览文件 @
86548bbe
/*
* Copyright (c) 2010, Oracle and/or its affiliates. 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
/**
* @test
* @bug 6982370
* @summary SIGBUS in jbyte_fill
*
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+OptimizeFill -Xbatch Test6982370
*/
import
java.util.Arrays
;
/**
* Exercise the fill routine for various short alignments and sizes
*/
public
class
Test6982370
{
public
static
void
main
(
String
[]
args
)
{
test_byte
();
test_char
();
test_short
();
test_int
();
test_float
();
}
public
static
void
test_int
()
{
int
[]
a
=
new
int
[
16
];
for
(
int
i
=
0
;
i
<
200000
;
i
++)
{
int
start
=
i
&
7
;
int
end
=
start
+
((
i
>>
4
)
&
7
);
int
value
=
i
;
if
((
i
&
1
)
==
1
)
value
=
-
value
;
Arrays
.
fill
(
a
,
start
,
end
,
value
);
boolean
error
=
false
;
for
(
int
j
=
start
;
j
<
end
;
j
++)
{
if
(
a
[
j
]
!=
value
)
{
System
.
err
.
println
(
"a["
+
j
+
"] = "
+
a
[
j
]
+
" != "
+
value
+
" for "
+
a
.
length
);
error
=
true
;
}
}
if
(
error
)
throw
new
InternalError
();
}
}
public
static
void
test_float
()
{
float
[]
a
=
new
float
[
16
];
for
(
int
i
=
0
;
i
<
200000
;
i
++)
{
int
start
=
i
&
7
;
int
end
=
start
+
((
i
>>
4
)
&
7
);
float
value
=
(
float
)
i
;
if
((
i
&
1
)
==
1
)
value
=
-
value
;
Arrays
.
fill
(
a
,
start
,
end
,
value
);
boolean
error
=
false
;
for
(
int
j
=
start
;
j
<
end
;
j
++)
{
if
(
a
[
j
]
!=
value
)
{
System
.
err
.
println
(
"a["
+
j
+
"] = "
+
a
[
j
]
+
" != "
+
value
+
" for "
+
a
.
length
);
error
=
true
;
}
}
if
(
error
)
throw
new
InternalError
();
}
}
public
static
void
test_char
()
{
char
[]
a
=
new
char
[
16
];
for
(
int
i
=
0
;
i
<
200000
;
i
++)
{
int
start
=
i
&
7
;
int
end
=
start
+
((
i
>>
4
)
&
7
);
char
value
=
(
char
)
i
;
Arrays
.
fill
(
a
,
start
,
end
,
value
);
boolean
error
=
false
;
for
(
int
j
=
start
;
j
<
end
;
j
++)
{
if
(
a
[
j
]
!=
value
)
{
System
.
err
.
println
(
"a["
+
j
+
"] = "
+
a
[
j
]
+
" != "
+
value
+
" for "
+
a
.
length
);
error
=
true
;
}
}
if
(
error
)
throw
new
InternalError
();
}
}
public
static
void
test_short
()
{
short
[]
a
=
new
short
[
16
];
for
(
int
i
=
0
;
i
<
200000
;
i
++)
{
int
start
=
i
&
7
;
int
end
=
start
+
((
i
>>
4
)
&
7
);
short
value
=
(
short
)
i
;
if
((
i
&
1
)
==
1
)
value
=
(
short
)-
value
;
Arrays
.
fill
(
a
,
start
,
end
,
value
);
boolean
error
=
false
;
for
(
int
j
=
start
;
j
<
end
;
j
++)
{
if
(
a
[
j
]
!=
value
)
{
System
.
err
.
println
(
"a["
+
j
+
"] = "
+
a
[
j
]
+
" != "
+
value
+
" for "
+
a
.
length
);
error
=
true
;
}
}
if
(
error
)
throw
new
InternalError
();
}
}
public
static
void
test_byte
()
{
for
(
int
i
=
0
;
i
<
200000
;
i
++)
{
byte
[]
a
=
new
byte
[
16
];
int
start
=
i
&
7
;
int
end
=
start
+
((
i
>>
4
)
&
7
);
byte
value
=
(
byte
)
i
;
if
((
i
&
1
)
==
1
)
value
=
(
byte
)-
value
;
Arrays
.
fill
(
a
,
start
,
end
,
value
);
boolean
error
=
false
;
for
(
int
j
=
start
;
j
<
end
;
j
++)
{
if
(
a
[
j
]
!=
value
)
{
System
.
err
.
println
(
"a["
+
j
+
"] = "
+
a
[
j
]
+
" != "
+
value
+
" for "
+
a
.
length
);
error
=
true
;
}
}
if
(
error
)
throw
new
InternalError
();
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录