Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
3daa602c
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3daa602c
编写于
1月 06, 2009
作者:
N
never
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
4aed555e
6c1e579b
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
107 addition
and
46 deletion
+107
-46
src/os/linux/vm/os_linux.cpp
src/os/linux/vm/os_linux.cpp
+4
-0
src/share/vm/runtime/sharedRuntime.cpp
src/share/vm/runtime/sharedRuntime.cpp
+28
-46
test/compiler/6778657/Test.java
test/compiler/6778657/Test.java
+75
-0
未找到文件。
src/os/linux/vm/os_linux.cpp
浏览文件 @
3daa602c
...
...
@@ -279,7 +279,11 @@ void os::init_system_properties_values() {
* ...
* 7: The default directories, normally /lib and /usr/lib.
*/
#if defined(AMD64) || defined(_LP64) && (defined(SPARC) || defined(PPC) || defined(S390))
#define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
#else
#define DEFAULT_LIBPATH "/lib:/usr/lib"
#endif
#define EXTENSIONS_DIR "/lib/ext"
#define ENDORSED_DIR "/lib/endorsed"
...
...
src/share/vm/runtime/sharedRuntime.cpp
浏览文件 @
3daa602c
...
...
@@ -192,64 +192,46 @@ JRT_END
JRT_LEAF
(
jint
,
SharedRuntime
::
f2i
(
jfloat
x
))
if
(
g_isnan
(
x
))
{
return
0
;}
jlong
lltmp
=
(
jlong
)
x
;
jint
ltmp
=
(
jint
)
lltmp
;
if
(
ltmp
==
lltmp
)
{
return
ltmp
;
}
else
{
if
(
x
<
0
)
{
return
min_jint
;
}
else
{
if
(
g_isnan
(
x
))
return
0
;
if
(
x
>=
(
jfloat
)
max_jint
)
return
max_jint
;
}
}
if
(
x
<=
(
jfloat
)
min_jint
)
return
min_jint
;
return
(
jint
)
x
;
JRT_END
JRT_LEAF
(
jlong
,
SharedRuntime
::
f2l
(
jfloat
x
))
if
(
g_isnan
(
x
))
{
return
0
;}
jlong
lltmp
=
(
jlong
)
x
;
if
(
lltmp
!=
min_jlong
)
{
return
lltmp
;
}
else
{
if
(
x
<
0
)
{
return
min_jlong
;
}
else
{
if
(
g_isnan
(
x
))
return
0
;
if
(
x
>=
(
jfloat
)
max_jlong
)
return
max_jlong
;
}
}
if
(
x
<=
(
jfloat
)
min_jlong
)
return
min_jlong
;
return
(
jlong
)
x
;
JRT_END
JRT_LEAF
(
jint
,
SharedRuntime
::
d2i
(
jdouble
x
))
if
(
g_isnan
(
x
))
{
return
0
;}
jlong
lltmp
=
(
jlong
)
x
;
jint
ltmp
=
(
jint
)
lltmp
;
if
(
ltmp
==
lltmp
)
{
return
ltmp
;
}
else
{
if
(
x
<
0
)
{
return
min_jint
;
}
else
{
if
(
g_isnan
(
x
))
return
0
;
if
(
x
>=
(
jdouble
)
max_jint
)
return
max_jint
;
}
}
if
(
x
<=
(
jdouble
)
min_jint
)
return
min_jint
;
return
(
jint
)
x
;
JRT_END
JRT_LEAF
(
jlong
,
SharedRuntime
::
d2l
(
jdouble
x
))
if
(
g_isnan
(
x
))
{
return
0
;}
jlong
lltmp
=
(
jlong
)
x
;
if
(
lltmp
!=
min_jlong
)
{
return
lltmp
;
}
else
{
if
(
x
<
0
)
{
return
min_jlong
;
}
else
{
if
(
g_isnan
(
x
))
return
0
;
if
(
x
>=
(
jdouble
)
max_jlong
)
return
max_jlong
;
}
}
if
(
x
<=
(
jdouble
)
min_jlong
)
return
min_jlong
;
return
(
jlong
)
x
;
JRT_END
...
...
test/compiler/6778657/Test.java
0 → 100644
浏览文件 @
3daa602c
/*
* Copyright 2008 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
/*
* @test
* @bug 6778657
* @summary Casts in SharedRuntime::f2i, f2l, d2i and d2l rely on undefined C++ behaviour
*/
public
class
Test
{
public
static
void
check_f2i
(
int
expect
)
{
float
check
=
expect
;
check
*=
2
;
int
actual
=
(
int
)
check
;
if
(
actual
!=
expect
)
throw
new
RuntimeException
(
"expecting "
+
expect
+
", got "
+
actual
);
}
public
static
void
check_f2l
(
long
expect
)
{
float
check
=
expect
;
check
*=
2
;
long
actual
=
(
long
)
check
;
if
(
actual
!=
expect
)
throw
new
RuntimeException
(
"expecting "
+
expect
+
", got "
+
actual
);
}
public
static
void
check_d2i
(
int
expect
)
{
double
check
=
expect
;
check
*=
2
;
int
actual
=
(
int
)
check
;
if
(
actual
!=
expect
)
throw
new
RuntimeException
(
"expecting "
+
expect
+
", got "
+
actual
);
}
public
static
void
check_d2l
(
long
expect
)
{
double
check
=
expect
;
check
*=
2
;
long
actual
=
(
long
)
check
;
if
(
actual
!=
expect
)
throw
new
RuntimeException
(
"expecting "
+
expect
+
", got "
+
actual
);
}
public
static
void
main
(
String
[]
args
)
{
check_f2i
(
Integer
.
MAX_VALUE
);
check_f2i
(
Integer
.
MIN_VALUE
);
check_f2l
(
Long
.
MAX_VALUE
);
check_f2l
(
Long
.
MIN_VALUE
);
check_d2i
(
Integer
.
MAX_VALUE
);
check_d2i
(
Integer
.
MIN_VALUE
);
check_d2l
(
Long
.
MAX_VALUE
);
check_d2l
(
Long
.
MIN_VALUE
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录