Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
21412720
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看板
提交
21412720
编写于
2月 09, 2013
作者:
D
drchase
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8007402: Code cleanup to remove Parfait false positive
Summary: add array access range check Reviewed-by: kvn
上级
33e46a70
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
16 deletion
+17
-16
src/share/vm/opto/regmask.cpp
src/share/vm/opto/regmask.cpp
+11
-10
src/share/vm/opto/regmask.hpp
src/share/vm/opto/regmask.hpp
+6
-6
未找到文件。
src/share/vm/opto/regmask.cpp
浏览文件 @
21412720
/*
* Copyright (c) 1997, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
3
, 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
...
...
@@ -241,7 +241,8 @@ int RegMask::is_bound_pair() const {
}
else
{
// Else its a split-pair case
if
(
bit
!=
_A
[
i
]
)
return
false
;
// Found many bits, so fail
i
++
;
// Skip iteration forward
if
(
_A
[
i
]
!=
1
)
return
false
;
// Require 1 lo bit in next word
if
(
i
>=
RM_SIZE
||
_A
[
i
]
!=
1
)
return
false
;
// Require 1 lo bit in next word
}
}
}
...
...
@@ -254,7 +255,7 @@ static int low_bits[3] = { 0x55555555, 0x11111111, 0x01010101 };
// Find the lowest-numbered register set in the mask. Return the
// HIGHEST register number in the set, or BAD if no sets.
// Works also for size 1.
OptoReg
::
Name
RegMask
::
find_first_set
(
int
size
)
const
{
OptoReg
::
Name
RegMask
::
find_first_set
(
const
int
size
)
const
{
verify_sets
(
size
);
for
(
int
i
=
0
;
i
<
RM_SIZE
;
i
++
)
{
if
(
_A
[
i
])
{
// Found some bits
...
...
@@ -268,7 +269,7 @@ OptoReg::Name RegMask::find_first_set(int size) const {
//------------------------------clear_to_sets----------------------------------
// Clear out partial bits; leave only aligned adjacent bit pairs
void
RegMask
::
clear_to_sets
(
int
size
)
{
void
RegMask
::
clear_to_sets
(
const
int
size
)
{
if
(
size
==
1
)
return
;
assert
(
2
<=
size
&&
size
<=
8
,
"update low bits table"
);
assert
(
is_power_of_2
(
size
),
"sanity"
);
...
...
@@ -293,7 +294,7 @@ void RegMask::clear_to_sets(int size) {
//------------------------------smear_to_sets----------------------------------
// Smear out partial bits to aligned adjacent bit sets
void
RegMask
::
smear_to_sets
(
int
size
)
{
void
RegMask
::
smear_to_sets
(
const
int
size
)
{
if
(
size
==
1
)
return
;
assert
(
2
<=
size
&&
size
<=
8
,
"update low bits table"
);
assert
(
is_power_of_2
(
size
),
"sanity"
);
...
...
@@ -318,7 +319,7 @@ void RegMask::smear_to_sets(int size) {
}
//------------------------------is_aligned_set--------------------------------
bool
RegMask
::
is_aligned_sets
(
int
size
)
const
{
bool
RegMask
::
is_aligned_sets
(
const
int
size
)
const
{
if
(
size
==
1
)
return
true
;
assert
(
2
<=
size
&&
size
<=
8
,
"update low bits table"
);
assert
(
is_power_of_2
(
size
),
"sanity"
);
...
...
@@ -344,7 +345,7 @@ bool RegMask::is_aligned_sets(int size) const {
//------------------------------is_bound_set-----------------------------------
// Return TRUE if the mask contains one adjacent set of bits and no other bits.
// Works also for size 1.
int
RegMask
::
is_bound_set
(
int
size
)
const
{
int
RegMask
::
is_bound_set
(
const
int
size
)
const
{
if
(
is_AllStack
()
)
return
false
;
assert
(
1
<=
size
&&
size
<=
8
,
"update low bits table"
);
int
bit
=
-
1
;
// Set to hold the one bit allowed
...
...
@@ -352,7 +353,7 @@ int RegMask::is_bound_set(int size) const {
if
(
_A
[
i
]
)
{
// Found some bits
if
(
bit
!=
-
1
)
return
false
;
// Already had bits, so fail
bit
=
_A
[
i
]
&
-
_A
[
i
];
// Extract
1
bit from mask
bit
=
_A
[
i
]
&
-
_A
[
i
];
// Extract
low
bit from mask
int
hi_bit
=
bit
<<
(
size
-
1
);
// high bit
if
(
hi_bit
!=
0
)
{
// Bit set stays in same word?
int
set
=
hi_bit
+
((
hi_bit
-
1
)
&
~
(
bit
-
1
));
...
...
@@ -362,12 +363,12 @@ int RegMask::is_bound_set(int size) const {
if
(((
-
1
)
&
~
(
bit
-
1
))
!=
_A
[
i
])
return
false
;
// Found many bits, so fail
i
++
;
// Skip iteration forward and check high part
assert
(
size
<=
8
,
"update next code"
);
// The lower 24 bits should be 0 since it is split case and size <= 8.
int
set
=
bit
>>
24
;
set
=
set
&
-
set
;
// Remove sign extension.
set
=
(((
set
<<
size
)
-
1
)
>>
8
);
if
(
_A
[
i
]
!=
set
)
return
false
;
// Require 1 lo bit in next word
if
(
i
>=
RM_SIZE
||
_A
[
i
]
!=
set
)
return
false
;
// Require expected low bits in next word
}
}
}
...
...
src/share/vm/opto/regmask.hpp
浏览文件 @
21412720
/*
* Copyright (c) 1997, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
3
, 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
...
...
@@ -225,22 +225,22 @@ public:
// Find the lowest-numbered register set in the mask. Return the
// HIGHEST register number in the set, or BAD if no sets.
// Assert that the mask contains only bit sets.
OptoReg
::
Name
find_first_set
(
int
size
)
const
;
OptoReg
::
Name
find_first_set
(
const
int
size
)
const
;
// Clear out partial bits; leave only aligned adjacent bit sets of size.
void
clear_to_sets
(
int
size
);
void
clear_to_sets
(
const
int
size
);
// Smear out partial bits to aligned adjacent bit sets.
void
smear_to_sets
(
int
size
);
void
smear_to_sets
(
const
int
size
);
// Verify that the mask contains only aligned adjacent bit sets
void
verify_sets
(
int
size
)
const
{
assert
(
is_aligned_sets
(
size
),
"mask is not aligned, adjacent sets"
);
}
// Test that the mask contains only aligned adjacent bit sets
bool
is_aligned_sets
(
int
size
)
const
;
bool
is_aligned_sets
(
const
int
size
)
const
;
// mask is a set of misaligned registers
bool
is_misaligned_set
(
int
size
)
const
{
return
(
int
)
Size
()
==
size
&&
!
is_aligned_sets
(
size
);}
// Test for a single adjacent set
int
is_bound_set
(
int
size
)
const
;
int
is_bound_set
(
const
int
size
)
const
;
static
bool
is_vector
(
uint
ireg
);
static
int
num_registers
(
uint
ireg
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录