Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
da20be0b
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
da20be0b
编写于
9月 13, 2016
作者:
C
cjplummer
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
a037aa92
82168847
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
151 addition
and
3 deletion
+151
-3
hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp
hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp
+2
-1
hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp
hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp
+1
-1
hotspot/src/cpu/x86/vm/interp_masm_x86.cpp
hotspot/src/cpu/x86/vm/interp_masm_x86.cpp
+2
-1
hotspot/test/runtime/LocalLong/LocalLongHelper.java
hotspot/test/runtime/LocalLong/LocalLongHelper.java
+99
-0
hotspot/test/runtime/LocalLong/LocalLongTest.java
hotspot/test/runtime/LocalLong/LocalLongTest.java
+47
-0
未找到文件。
hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp
浏览文件 @
da20be0b
...
...
@@ -326,7 +326,8 @@ void InterpreterMacroAssembler::push_i(Register r) {
}
void
InterpreterMacroAssembler
::
push_l
(
Register
r
)
{
str
(
r
,
pre
(
esp
,
2
*
-
wordSize
));
str
(
zr
,
pre
(
esp
,
-
wordSize
));
str
(
r
,
pre
(
esp
,
-
wordsize
));
}
void
InterpreterMacroAssembler
::
pop_f
(
FloatRegister
r
)
{
...
...
hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp
浏览文件 @
da20be0b
...
...
@@ -359,7 +359,7 @@ void InterpreterMacroAssembler::store_unaligned_long(Register l, Register r1, in
#ifdef _LP64
stx
(
l
,
r1
,
offset
);
// store something more useful here
debug_only
(
stx
(
G0
,
r1
,
offset
+
Interpreter
::
stackElementSize
);)
stx
(
G0
,
r1
,
offset
+
Interpreter
::
stackElementSize
);
#else
st
(
l
,
r1
,
offset
);
st
(
l
->
successor
(),
r1
,
offset
+
Interpreter
::
stackElementSize
);
...
...
hotspot/src/cpu/x86/vm/interp_masm_x86.cpp
浏览文件 @
da20be0b
...
...
@@ -611,7 +611,8 @@ void InterpreterMacroAssembler::pop_l(Register r) {
void
InterpreterMacroAssembler
::
push_l
(
Register
r
)
{
subptr
(
rsp
,
2
*
wordSize
);
movq
(
Address
(
rsp
,
0
),
r
);
movptr
(
Address
(
rsp
,
Interpreter
::
expr_offset_in_bytes
(
0
)),
r
);
movptr
(
Address
(
rsp
,
Interpreter
::
expr_offset_in_bytes
(
1
)),
NULL_WORD
);
}
void
InterpreterMacroAssembler
::
pop
(
TosState
state
)
{
...
...
hotspot/test/runtime/LocalLong/LocalLongHelper.java
0 → 100644
浏览文件 @
da20be0b
/*
* Copyright (c) 2016, 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.
*/
import
java.lang.reflect.Field
;
import
java.lang.reflect.Method
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.lang.StackWalker.StackFrame
;
public
class
LocalLongHelper
{
static
StackWalker
sw
;
static
Method
intValue
;
static
Method
getLocals
;
static
Class
<?>
primitiveValueClass
;
static
Method
primitiveType
;
static
Method
getMethodType
;
static
Field
memberName
;
static
Field
offset
;
public
static
void
main
(
String
[]
args
)
throws
Throwable
{
setupReflectionStatics
();
new
LocalLongHelper
().
longArg
(
0xC0FFEE
,
0x1234567890ABCDEF
L
);
}
// locals[2] contains the high byte of the long argument.
public
long
longArg
(
int
i
,
long
l
)
throws
Throwable
{
List
<
StackFrame
>
frames
=
sw
.
walk
(
s
->
s
.
collect
(
Collectors
.
toList
()));
Object
[]
locals
=
(
Object
[])
getLocals
.
invoke
(
frames
.
get
(
0
));
int
locals_2
=
(
int
)
intValue
.
invoke
(
locals
[
2
]);
if
(
locals_2
!=
0
){
throw
new
RuntimeException
(
"Expected locals_2 == 0"
);
}
return
l
;
// Don't want l to become a dead var
}
private
static
void
setupReflectionStatics
()
throws
Throwable
{
Class
<?>
liveStackFrameClass
=
Class
.
forName
(
"java.lang.LiveStackFrame"
);
primitiveValueClass
=
Class
.
forName
(
"java.lang.LiveStackFrame$PrimitiveValue"
);
getLocals
=
liveStackFrameClass
.
getDeclaredMethod
(
"getLocals"
);
getLocals
.
setAccessible
(
true
);
intValue
=
primitiveValueClass
.
getDeclaredMethod
(
"intValue"
);
intValue
.
setAccessible
(
true
);
Class
<?>
stackFrameInfoClass
=
Class
.
forName
(
"java.lang.StackFrameInfo"
);
memberName
=
stackFrameInfoClass
.
getDeclaredField
(
"memberName"
);
memberName
.
setAccessible
(
true
);
offset
=
stackFrameInfoClass
.
getDeclaredField
(
"bci"
);
offset
.
setAccessible
(
true
);
getMethodType
=
Class
.
forName
(
"java.lang.invoke.MemberName"
).
getDeclaredMethod
(
"getMethodType"
);
getMethodType
.
setAccessible
(
true
);
Class
<?>
extendedOptionClass
=
Class
.
forName
(
"java.lang.StackWalker$ExtendedOption"
);
Method
ewsNI
=
StackWalker
.
class
.
getDeclaredMethod
(
"newInstance"
,
Set
.
class
,
extendedOptionClass
);
ewsNI
.
setAccessible
(
true
);
Field
f
=
extendedOptionClass
.
getDeclaredField
(
"LOCALS_AND_OPERANDS"
);
f
.
setAccessible
(
true
);
Object
localsAndOperandsOption
=
f
.
get
(
null
);
primitiveType
=
primitiveValueClass
.
getDeclaredMethod
(
"type"
);
primitiveType
.
setAccessible
(
true
);
sw
=
(
StackWalker
)
ewsNI
.
invoke
(
null
,
java
.
util
.
Collections
.
emptySet
(),
localsAndOperandsOption
);
}
private
static
String
type
(
Object
o
)
throws
Throwable
{
if
(
primitiveValueClass
.
isInstance
(
o
))
{
final
char
c
=
(
char
)
primitiveType
.
invoke
(
o
);
return
String
.
valueOf
(
c
);
}
else
if
(
o
!=
null
)
{
return
o
.
getClass
().
getName
();
}
else
{
return
"null"
;
}
}
}
hotspot/test/runtime/LocalLong/LocalLongTest.java
0 → 100644
浏览文件 @
da20be0b
/*
* Copyright (c) 2016, 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 LocalLongTest
* @bug 8163014
* @modules java.base/jdk.internal.misc
* @library /test/lib
* @compile LocalLongHelper.java
* @run driver LocalLongTest
*/
import
jdk.test.lib.Platform
;
import
jdk.test.lib.process.ProcessTools
;
import
jdk.test.lib.process.OutputAnalyzer
;
public
class
LocalLongTest
{
public
static
void
main
(
String
...
args
)
throws
Exception
{
if
(
Platform
.
is64bit
())
{
ProcessBuilder
pb
=
ProcessTools
.
createJavaProcessBuilder
(
"-Xint"
,
"LocalLongHelper"
);
OutputAnalyzer
o
=
new
OutputAnalyzer
(
pb
.
start
());
o
.
shouldHaveExitValue
(
0
);
}
};
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录