Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
2112bf1b
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2112bf1b
编写于
9月 01, 2012
作者:
R
Richard Henderson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
target-s390: Implement CONVERT FROM LOGICAL
Signed-off-by:
N
Richard Henderson
<
rth@twiddle.net
>
上级
6ac1b45f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
66 addition
and
0 deletion
+66
-0
target-s390x/fpu_helper.c
target-s390x/fpu_helper.c
+31
-0
target-s390x/helper.h
target-s390x/helper.h
+3
-0
target-s390x/insn-data.def
target-s390x/insn-data.def
+7
-0
target-s390x/translate.c
target-s390x/translate.c
+25
-0
未找到文件。
target-s390x/fpu_helper.c
浏览文件 @
2112bf1b
...
...
@@ -395,6 +395,37 @@ uint64_t HELPER(cxgb)(CPUS390XState *env, int64_t v2, uint32_t m3)
return
RET128
(
ret
);
}
/* convert 64-bit uint to 32-bit float */
uint64_t
HELPER
(
celgb
)(
CPUS390XState
*
env
,
uint64_t
v2
,
uint32_t
m3
)
{
int
hold
=
swap_round_mode
(
env
,
m3
);
float32
ret
=
uint64_to_float32
(
v2
,
&
env
->
fpu_status
);
set_float_rounding_mode
(
hold
,
&
env
->
fpu_status
);
handle_exceptions
(
env
,
GETPC
());
return
ret
;
}
/* convert 64-bit uint to 64-bit float */
uint64_t
HELPER
(
cdlgb
)(
CPUS390XState
*
env
,
uint64_t
v2
,
uint32_t
m3
)
{
int
hold
=
swap_round_mode
(
env
,
m3
);
float64
ret
=
uint64_to_float64
(
v2
,
&
env
->
fpu_status
);
set_float_rounding_mode
(
hold
,
&
env
->
fpu_status
);
handle_exceptions
(
env
,
GETPC
());
return
ret
;
}
/* convert 64-bit uint to 128-bit float */
uint64_t
HELPER
(
cxlgb
)(
CPUS390XState
*
env
,
uint64_t
v2
,
uint32_t
m3
)
{
int
hold
=
swap_round_mode
(
env
,
m3
);
/* ??? Not 50% correct. */
float128
ret
=
int64_to_float128
(
v2
,
&
env
->
fpu_status
);
set_float_rounding_mode
(
hold
,
&
env
->
fpu_status
);
handle_exceptions
(
env
,
GETPC
());
return
RET128
(
ret
);
}
/* convert 32-bit float to 64-bit int */
uint64_t
HELPER
(
cgeb
)(
CPUS390XState
*
env
,
uint64_t
v2
,
uint32_t
m3
)
{
...
...
target-s390x/helper.h
浏览文件 @
2112bf1b
...
...
@@ -32,6 +32,9 @@ DEF_HELPER_4(clcle, i32, env, i32, i64, i32)
DEF_HELPER_3
(
cegb
,
i64
,
env
,
s64
,
i32
)
DEF_HELPER_3
(
cdgb
,
i64
,
env
,
s64
,
i32
)
DEF_HELPER_3
(
cxgb
,
i64
,
env
,
s64
,
i32
)
DEF_HELPER_3
(
celgb
,
i64
,
env
,
i64
,
i32
)
DEF_HELPER_3
(
cdlgb
,
i64
,
env
,
i64
,
i32
)
DEF_HELPER_3
(
cxlgb
,
i64
,
env
,
i64
,
i32
)
DEF_HELPER_3
(
aeb
,
i64
,
env
,
i64
,
i64
)
DEF_HELPER_3
(
adb
,
i64
,
env
,
i64
,
i64
)
DEF_HELPER_5
(
axb
,
i64
,
env
,
i64
,
i64
,
i64
,
i64
)
...
...
target-s390x/insn-data.def
浏览文件 @
2112bf1b
...
...
@@ -233,6 +233,13 @@
C(0xb3ac, CLGEBR, RRF_e, FPE, 0, e2, r1, 0, clgeb, 0)
C(0xb3ad, CLGDBR, RRF_e, FPE, 0, f2_o, r1, 0, clgdb, 0)
C(0xb3ae, CLGXBR, RRF_e, FPE, 0, x2_o, r1, 0, clgxb, 0)
/* CONVERT FROM LOGICAL */
C(0xb390, CELFBR, RRF_e, FPE, 0, r2_32u, new, e1, celgb, 0)
C(0xb391, CDLFBR, RRF_e, FPE, 0, r2_32u, f1, 0, cdlgb, 0)
C(0xb392, CXLFBR, RRF_e, FPE, 0, r2_32u, x1, 0, cxlgb, 0)
C(0xb3a0, CELGBR, RRF_e, FPE, 0, r2_o, new, e1, celgb, 0)
C(0xb3a1, CDLGBR, RRF_e, FPE, 0, r2_o, f1, 0, cdlgb, 0)
C(0xb3a2, CXLGBR, RRF_e, FPE, 0, r2_o, x1, 0, cxlgb, 0)
/* DIVIDE */
C(0x1d00, DR, RR_a, Z, r1_D32, r2_32s, new_P, r1_P32, divs32, 0)
...
...
target-s390x/translate.c
浏览文件 @
2112bf1b
...
...
@@ -1609,6 +1609,31 @@ static ExitStatus op_cxgb(DisasContext *s, DisasOps *o)
return
NO_EXIT
;
}
static
ExitStatus
op_celgb
(
DisasContext
*
s
,
DisasOps
*
o
)
{
TCGv_i32
m3
=
tcg_const_i32
(
get_field
(
s
->
fields
,
m3
));
gen_helper_celgb
(
o
->
out
,
cpu_env
,
o
->
in2
,
m3
);
tcg_temp_free_i32
(
m3
);
return
NO_EXIT
;
}
static
ExitStatus
op_cdlgb
(
DisasContext
*
s
,
DisasOps
*
o
)
{
TCGv_i32
m3
=
tcg_const_i32
(
get_field
(
s
->
fields
,
m3
));
gen_helper_cdlgb
(
o
->
out
,
cpu_env
,
o
->
in2
,
m3
);
tcg_temp_free_i32
(
m3
);
return
NO_EXIT
;
}
static
ExitStatus
op_cxlgb
(
DisasContext
*
s
,
DisasOps
*
o
)
{
TCGv_i32
m3
=
tcg_const_i32
(
get_field
(
s
->
fields
,
m3
));
gen_helper_cxlgb
(
o
->
out
,
cpu_env
,
o
->
in2
,
m3
);
tcg_temp_free_i32
(
m3
);
return_low128
(
o
->
out2
);
return
NO_EXIT
;
}
static
ExitStatus
op_cksm
(
DisasContext
*
s
,
DisasOps
*
o
)
{
int
r2
=
get_field
(
s
->
fields
,
r2
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录