Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
4f23f9fc
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看板
提交
4f23f9fc
编写于
1月 29, 2010
作者:
N
never
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6916644: C2 compiler crash on x86
Reviewed-by: kvn, twisti
上级
360cba23
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
72 addition
and
19 deletion
+72
-19
src/share/vm/adlc/output_c.cpp
src/share/vm/adlc/output_c.cpp
+16
-13
src/share/vm/adlc/output_h.cpp
src/share/vm/adlc/output_h.cpp
+2
-2
src/share/vm/opto/machnode.hpp
src/share/vm/opto/machnode.hpp
+2
-2
src/share/vm/opto/matcher.cpp
src/share/vm/opto/matcher.cpp
+2
-2
test/compiler/6916644/Test6916644.java
test/compiler/6916644/Test6916644.java
+50
-0
未找到文件。
src/share/vm/adlc/output_c.cpp
浏览文件 @
4f23f9fc
/*
/*
* 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
...
@@ -1496,7 +1496,7 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
...
@@ -1496,7 +1496,7 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
unsigned
i
;
unsigned
i
;
// Generate Expand function header
// Generate Expand function header
fprintf
(
fp
,
"MachNode *%sNode::Expand(State *state, Node_List &proj_list) {
\n
"
,
node
->
_ident
);
fprintf
(
fp
,
"MachNode *%sNode::Expand(State *state, Node_List &proj_list
, Node* mem
) {
\n
"
,
node
->
_ident
);
fprintf
(
fp
,
"Compile* C = Compile::current();
\n
"
);
fprintf
(
fp
,
"Compile* C = Compile::current();
\n
"
);
// Generate expand code
// Generate expand code
if
(
node
->
expands
()
)
{
if
(
node
->
expands
()
)
{
...
@@ -1546,15 +1546,16 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
...
@@ -1546,15 +1546,16 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
// Build a mapping from operand index to input edges
// Build a mapping from operand index to input edges
fprintf
(
fp
,
" unsigned idx0 = oper_input_base();
\n
"
);
fprintf
(
fp
,
" unsigned idx0 = oper_input_base();
\n
"
);
// The order in which
inputs are
added to a node is very
// The order in which
the memory input is
added to a node is very
// strange. Store nodes get a memory input before Expand is
// strange. Store nodes get a memory input before Expand is
// called and all other nodes get it afterwards so
// called and other nodes get it afterwards or before depending on
// oper_input_base is wrong during expansion. This code adjusts
// match order so oper_input_base is wrong during expansion. This
// is so that expansion will work correctly.
// code adjusts it so that expansion will work correctly.
bool
missing_memory_edge
=
node
->
_matrule
->
needs_ideal_memory_edge
(
_globalNames
)
&&
int
has_memory_edge
=
node
->
_matrule
->
needs_ideal_memory_edge
(
_globalNames
);
node
->
is_ideal_store
()
==
Form
::
none
;
if
(
has_memory_edge
)
{
if
(
missing_memory_edge
)
{
fprintf
(
fp
,
" if (mem == (Node*)1) {
\n
"
);
fprintf
(
fp
,
" idx0--; // Adjust base because memory edge hasn't been inserted yet
\n
"
);
fprintf
(
fp
,
" idx0--; // Adjust base because memory edge hasn't been inserted yet
\n
"
);
fprintf
(
fp
,
" }
\n
"
);
}
}
for
(
i
=
0
;
i
<
node
->
num_opnds
();
i
++
)
{
for
(
i
=
0
;
i
<
node
->
num_opnds
();
i
++
)
{
...
@@ -1611,9 +1612,11 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
...
@@ -1611,9 +1612,11 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
int
node_mem_op
=
node
->
memory_operand
(
_globalNames
);
int
node_mem_op
=
node
->
memory_operand
(
_globalNames
);
assert
(
node_mem_op
!=
InstructForm
::
NO_MEMORY_OPERAND
,
assert
(
node_mem_op
!=
InstructForm
::
NO_MEMORY_OPERAND
,
"expand rule member needs memory but top-level inst doesn't have any"
);
"expand rule member needs memory but top-level inst doesn't have any"
);
if
(
!
missing
_memory_edge
)
{
if
(
has
_memory_edge
)
{
// Copy memory edge
// Copy memory edge
fprintf
(
fp
,
" n%d->add_req(_in[1]);
\t
// Add memory edge
\n
"
,
cnt
);
fprintf
(
fp
,
" if (mem != (Node*)1) {
\n
"
);
fprintf
(
fp
,
" n%d->add_req(_in[1]);
\t
// Add memory edge
\n
"
,
cnt
);
fprintf
(
fp
,
" }
\n
"
);
}
}
}
}
...
@@ -1689,7 +1692,7 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
...
@@ -1689,7 +1692,7 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
}
// done iterating over a new instruction's operands
}
// done iterating over a new instruction's operands
// Invoke Expand() for the newly created instruction.
// Invoke Expand() for the newly created instruction.
fprintf
(
fp
,
" result = n%d->Expand( state, proj_list );
\n
"
,
cnt
);
fprintf
(
fp
,
" result = n%d->Expand( state, proj_list
, mem
);
\n
"
,
cnt
);
assert
(
!
new_inst
->
expands
(),
"Do not have complete support for recursive expansion"
);
assert
(
!
new_inst
->
expands
(),
"Do not have complete support for recursive expansion"
);
}
// done iterating over new instructions
}
// done iterating over new instructions
fprintf
(
fp
,
"
\n
"
);
fprintf
(
fp
,
"
\n
"
);
...
...
src/share/vm/adlc/output_h.cpp
浏览文件 @
4f23f9fc
/*
/*
* 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
...
@@ -1754,7 +1754,7 @@ void ArchDesc::declareClasses(FILE *fp) {
...
@@ -1754,7 +1754,7 @@ void ArchDesc::declareClasses(FILE *fp) {
instr
->
has_temps
()
||
instr
->
has_temps
()
||
instr
->
_matrule
!=
NULL
&&
instr
->
_matrule
!=
NULL
&&
instr
->
num_opnds
()
!=
instr
->
num_unique_opnds
()
)
{
instr
->
num_opnds
()
!=
instr
->
num_unique_opnds
()
)
{
fprintf
(
fp
,
" virtual MachNode *Expand(State *state, Node_List &proj_list);
\n
"
);
fprintf
(
fp
,
" virtual MachNode *Expand(State *state, Node_List &proj_list
, Node* mem
);
\n
"
);
}
}
if
(
instr
->
is_pinned
(
_globalNames
))
{
if
(
instr
->
is_pinned
(
_globalNames
))
{
...
...
src/share/vm/opto/machnode.hpp
浏览文件 @
4f23f9fc
/*
/*
* Copyright 1997-20
07
Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1997-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
...
@@ -232,7 +232,7 @@ public:
...
@@ -232,7 +232,7 @@ public:
// Expand method for MachNode, replaces nodes representing pseudo
// Expand method for MachNode, replaces nodes representing pseudo
// instructions with a set of nodes which represent real machine
// instructions with a set of nodes which represent real machine
// instructions and compute the same value.
// instructions and compute the same value.
virtual
MachNode
*
Expand
(
State
*
,
Node_List
&
proj_list
)
{
return
this
;
}
virtual
MachNode
*
Expand
(
State
*
,
Node_List
&
proj_list
,
Node
*
mem
)
{
return
this
;
}
// Bottom_type call; value comes from operand0
// Bottom_type call; value comes from operand0
virtual
const
class
Type
*
bottom_type
()
const
{
return
_opnds
[
0
]
->
type
();
}
virtual
const
class
Type
*
bottom_type
()
const
{
return
_opnds
[
0
]
->
type
();
}
...
...
src/share/vm/opto/matcher.cpp
浏览文件 @
4f23f9fc
/*
/*
* Copyright 1997-20
09
Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1997-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
...
@@ -1580,7 +1580,7 @@ MachNode *Matcher::ReduceInst( State *s, int rule, Node *&mem ) {
...
@@ -1580,7 +1580,7 @@ MachNode *Matcher::ReduceInst( State *s, int rule, Node *&mem ) {
uint
num_proj
=
_proj_list
.
size
();
uint
num_proj
=
_proj_list
.
size
();
// Perform any 1-to-many expansions required
// Perform any 1-to-many expansions required
MachNode
*
ex
=
mach
->
Expand
(
s
,
_proj_list
);
MachNode
*
ex
=
mach
->
Expand
(
s
,
_proj_list
,
mem
);
if
(
ex
!=
mach
)
{
if
(
ex
!=
mach
)
{
assert
(
ex
->
ideal_reg
()
==
mach
->
ideal_reg
(),
"ideal types should match"
);
assert
(
ex
->
ideal_reg
()
==
mach
->
ideal_reg
(),
"ideal types should match"
);
if
(
ex
->
in
(
1
)
->
is_Con
()
)
if
(
ex
->
in
(
1
)
->
is_Con
()
)
...
...
test/compiler/6916644/Test6916644.java
0 → 100644
浏览文件 @
4f23f9fc
/*
* Copyright 2010 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 6916644
* @summary C2 compiler crash on x86
*
* @run main/othervm -Xcomp -XX:CompileOnly=Test6916644.test Test6916644
*/
public
class
Test6916644
{
static
int
result
;
static
int
i1
;
static
int
i2
;
static
public
void
test
(
double
d
)
{
result
=
(
d
<=
0.0
D
)
?
i1
:
i2
;
}
public
static
void
main
(
String
[]
args
)
{
for
(
int
i
=
0
;
i
<
100000
;
i
++)
{
// use an alternating value so the test doesn't always go
// the same direction. Otherwise we won't transform it
// into a cmove.
test
(
i
&
1
);
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录