Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
eed14219
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
eed14219
编写于
1月 24, 2018
作者:
R
Richard Henderson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
target/hppa: Implement PROBE for system mode
Signed-off-by:
N
Richard Henderson
<
richard.henderson@linaro.org
>
上级
fe0a69cc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
40 addition
and
17 deletion
+40
-17
target/hppa/helper.h
target/hppa/helper.h
+1
-2
target/hppa/op_helper.c
target/hppa/op_helper.c
+23
-11
target/hppa/translate.c
target/hppa/translate.c
+16
-4
未找到文件。
target/hppa/helper.h
浏览文件 @
eed14219
...
...
@@ -17,8 +17,7 @@ DEF_HELPER_FLAGS_3(stby_b_parallel, TCG_CALL_NO_WG, void, env, tl, tr)
DEF_HELPER_FLAGS_3
(
stby_e
,
TCG_CALL_NO_WG
,
void
,
env
,
tl
,
tr
)
DEF_HELPER_FLAGS_3
(
stby_e_parallel
,
TCG_CALL_NO_WG
,
void
,
env
,
tl
,
tr
)
DEF_HELPER_FLAGS_1
(
probe_r
,
TCG_CALL_NO_RWG_SE
,
tr
,
tl
)
DEF_HELPER_FLAGS_1
(
probe_w
,
TCG_CALL_NO_RWG_SE
,
tr
,
tl
)
DEF_HELPER_FLAGS_4
(
probe
,
TCG_CALL_NO_WG
,
tr
,
env
,
tl
,
i32
,
i32
)
DEF_HELPER_FLAGS_1
(
loaded_fr0
,
TCG_CALL_NO_RWG
,
void
,
env
)
...
...
target/hppa/op_helper.c
浏览文件 @
eed14219
...
...
@@ -160,21 +160,33 @@ void HELPER(stby_e_parallel)(CPUHPPAState *env, target_ulong addr,
do_stby_e
(
env
,
addr
,
val
,
true
);
}
target_ureg
HELPER
(
probe_r
)(
target_ulong
addr
)
target_ureg
HELPER
(
probe
)(
CPUHPPAState
*
env
,
target_ulong
addr
,
uint32_t
level
,
uint32_t
want
)
{
#ifdef CONFIG_USER_ONLY
return
page_check_range
(
addr
,
1
,
PAGE_READ
);
return
page_check_range
(
addr
,
1
,
want
);
#else
return
1
;
/* FIXME */
#endif
}
int
prot
,
excp
;
hwaddr
phys
;
target_ureg
HELPER
(
probe_w
)(
target_ulong
addr
)
{
#ifdef CONFIG_USER_ONLY
return
page_check_range
(
addr
,
1
,
PAGE_WRITE
);
#else
return
1
;
/* FIXME */
/* Fail if the requested privilege level is higher than current. */
if
(
level
<
(
env
->
iaoq_f
&
3
))
{
return
0
;
}
excp
=
hppa_get_physical_address
(
env
,
addr
,
level
,
0
,
&
phys
,
&
prot
);
if
(
excp
>=
0
)
{
if
(
env
->
psw
&
PSW_Q
)
{
/* ??? Needs tweaking for hppa64. */
env
->
cr
[
CR_IOR
]
=
addr
;
env
->
cr
[
CR_ISR
]
=
addr
>>
32
;
}
if
(
excp
==
EXCP_DTLB_MISS
)
{
excp
=
EXCP_NA_DTLB_MISS
;
}
hppa_dynamic_excp
(
env
,
excp
,
GETPC
());
}
return
(
want
&
prot
)
!=
0
;
#endif
}
...
...
target/hppa/translate.c
浏览文件 @
eed14219
...
...
@@ -2380,21 +2380,33 @@ static DisasJumpType trans_probe(DisasContext *ctx, uint32_t insn,
{
unsigned
rt
=
extract32
(
insn
,
0
,
5
);
unsigned
sp
=
extract32
(
insn
,
14
,
2
);
unsigned
rr
=
extract32
(
insn
,
16
,
5
);
unsigned
rb
=
extract32
(
insn
,
21
,
5
);
unsigned
is_write
=
extract32
(
insn
,
6
,
1
);
unsigned
is_imm
=
extract32
(
insn
,
13
,
1
);
TCGv_reg
dest
,
ofs
;
TCGv_i32
level
,
want
;
TCGv_tl
addr
;
nullify_over
(
ctx
);
/* ??? Do something with priv level operand. */
dest
=
dest_gpr
(
ctx
,
rt
);
form_gva
(
ctx
,
&
addr
,
&
ofs
,
rb
,
0
,
0
,
0
,
sp
,
0
,
false
);
if
(
is_write
)
{
gen_helper_probe_w
(
dest
,
addr
);
if
(
is_imm
)
{
level
=
tcg_const_i32
(
extract32
(
insn
,
16
,
2
));
}
else
{
gen_helper_probe_r
(
dest
,
addr
);
level
=
tcg_temp_new_i32
();
tcg_gen_trunc_reg_i32
(
level
,
load_gpr
(
ctx
,
rr
));
tcg_gen_andi_i32
(
level
,
level
,
3
);
}
want
=
tcg_const_i32
(
is_write
?
PAGE_WRITE
:
PAGE_READ
);
gen_helper_probe
(
dest
,
cpu_env
,
addr
,
level
,
want
);
tcg_temp_free_i32
(
want
);
tcg_temp_free_i32
(
level
);
save_gpr
(
ctx
,
rt
,
dest
);
return
nullify_end
(
ctx
,
DISAS_NEXT
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录