Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
38482a77
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看板
提交
38482a77
编写于
5月 10, 2009
作者:
B
Blue Swirl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Convert logical operations and umul/smul
Signed-off-by:
N
Blue Swirl
<
blauwirbel@gmail.com
>
上级
789c91ef
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
43 addition
and
24 deletion
+43
-24
target-sparc/op_helper.c
target-sparc/op_helper.c
+19
-0
target-sparc/translate.c
target-sparc/translate.c
+24
-24
未找到文件。
target-sparc/op_helper.c
浏览文件 @
38482a77
...
...
@@ -902,6 +902,23 @@ static uint32_t compute_C_addx_xcc(void)
}
#endif
static
uint32_t
compute_all_logic
(
void
)
{
return
get_NZ_icc
(
CC_DST
);
}
static
uint32_t
compute_C_logic
(
void
)
{
return
0
;
}
#ifdef TARGET_SPARC64
static
uint32_t
compute_all_logic_xcc
(
void
)
{
return
get_NZ_xcc
(
CC_DST
);
}
#endif
typedef
struct
CCTable
{
uint32_t
(
*
compute_all
)(
void
);
/* return all the flags */
uint32_t
(
*
compute_c
)(
void
);
/* return the C flag */
...
...
@@ -912,6 +929,7 @@ static const CCTable icc_table[CC_OP_NB] = {
[
CC_OP_FLAGS
]
=
{
compute_all_flags
,
compute_C_flags
},
[
CC_OP_ADD
]
=
{
compute_all_add
,
compute_C_add
},
[
CC_OP_ADDX
]
=
{
compute_all_addx
,
compute_C_addx
},
[
CC_OP_LOGIC
]
=
{
compute_all_logic
,
compute_C_logic
},
};
#ifdef TARGET_SPARC64
...
...
@@ -920,6 +938,7 @@ static const CCTable xcc_table[CC_OP_NB] = {
[
CC_OP_FLAGS
]
=
{
compute_all_flags_xcc
,
compute_C_flags_xcc
},
[
CC_OP_ADD
]
=
{
compute_all_add_xcc
,
compute_C_add_xcc
},
[
CC_OP_ADDX
]
=
{
compute_all_addx_xcc
,
compute_C_addx_xcc
},
[
CC_OP_LOGIC
]
=
{
compute_all_logic_xcc
,
compute_C_logic
},
};
#endif
...
...
target-sparc/translate.c
浏览文件 @
38482a77
...
...
@@ -3136,9 +3136,9 @@ static void disas_sparc_insn(DisasContext * dc)
tcg_gen_and_tl
(
cpu_dst
,
cpu_src1
,
cpu_src2
);
}
if
(
xop
&
0x10
)
{
gen_op_logic_cc
(
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
FLAGS
);
dc
->
cc_op
=
CC_OP_
FLAGS
;
tcg_gen_mov_tl
(
cpu_cc_dst
,
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
LOGIC
);
dc
->
cc_op
=
CC_OP_
LOGIC
;
}
break
;
case
0x2
:
/* or */
...
...
@@ -3149,9 +3149,9 @@ static void disas_sparc_insn(DisasContext * dc)
tcg_gen_or_tl
(
cpu_dst
,
cpu_src1
,
cpu_src2
);
}
if
(
xop
&
0x10
)
{
gen_op_logic_cc
(
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
FLAGS
);
dc
->
cc_op
=
CC_OP_
FLAGS
;
tcg_gen_mov_tl
(
cpu_cc_dst
,
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
LOGIC
);
dc
->
cc_op
=
CC_OP_
LOGIC
;
}
break
;
case
0x3
:
/* xor */
...
...
@@ -3162,9 +3162,9 @@ static void disas_sparc_insn(DisasContext * dc)
tcg_gen_xor_tl
(
cpu_dst
,
cpu_src1
,
cpu_src2
);
}
if
(
xop
&
0x10
)
{
gen_op_logic_cc
(
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
FLAGS
);
dc
->
cc_op
=
CC_OP_
FLAGS
;
tcg_gen_mov_tl
(
cpu_cc_dst
,
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
LOGIC
);
dc
->
cc_op
=
CC_OP_
LOGIC
;
}
break
;
case
0x4
:
/* sub */
...
...
@@ -3195,9 +3195,9 @@ static void disas_sparc_insn(DisasContext * dc)
tcg_gen_andc_tl
(
cpu_dst
,
cpu_src1
,
cpu_src2
);
}
if
(
xop
&
0x10
)
{
gen_op_logic_cc
(
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
FLAGS
);
dc
->
cc_op
=
CC_OP_
FLAGS
;
tcg_gen_mov_tl
(
cpu_cc_dst
,
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
LOGIC
);
dc
->
cc_op
=
CC_OP_
LOGIC
;
}
break
;
case
0x6
:
/* orn */
...
...
@@ -3208,9 +3208,9 @@ static void disas_sparc_insn(DisasContext * dc)
tcg_gen_orc_tl
(
cpu_dst
,
cpu_src1
,
cpu_src2
);
}
if
(
xop
&
0x10
)
{
gen_op_logic_cc
(
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
FLAGS
);
dc
->
cc_op
=
CC_OP_
FLAGS
;
tcg_gen_mov_tl
(
cpu_cc_dst
,
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
LOGIC
);
dc
->
cc_op
=
CC_OP_
LOGIC
;
}
break
;
case
0x7
:
/* xorn */
...
...
@@ -3222,9 +3222,9 @@ static void disas_sparc_insn(DisasContext * dc)
tcg_gen_xor_tl
(
cpu_dst
,
cpu_src1
,
cpu_tmp0
);
}
if
(
xop
&
0x10
)
{
gen_op_logic_cc
(
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
FLAGS
);
dc
->
cc_op
=
CC_OP_
FLAGS
;
tcg_gen_mov_tl
(
cpu_cc_dst
,
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
LOGIC
);
dc
->
cc_op
=
CC_OP_
LOGIC
;
}
break
;
case
0x8
:
/* addx, V9 addc */
...
...
@@ -3269,18 +3269,18 @@ static void disas_sparc_insn(DisasContext * dc)
CHECK_IU_FEATURE
(
dc
,
MUL
);
gen_op_umul
(
cpu_dst
,
cpu_src1
,
cpu_src2
);
if
(
xop
&
0x10
)
{
gen_op_logic_cc
(
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
FLAGS
);
dc
->
cc_op
=
CC_OP_
FLAGS
;
tcg_gen_mov_tl
(
cpu_cc_dst
,
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
LOGIC
);
dc
->
cc_op
=
CC_OP_
LOGIC
;
}
break
;
case
0xb
:
/* smul */
CHECK_IU_FEATURE
(
dc
,
MUL
);
gen_op_smul
(
cpu_dst
,
cpu_src1
,
cpu_src2
);
if
(
xop
&
0x10
)
{
gen_op_logic_cc
(
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
FLAGS
);
dc
->
cc_op
=
CC_OP_
FLAGS
;
tcg_gen_mov_tl
(
cpu_cc_dst
,
cpu_dst
);
tcg_gen_movi_i32
(
cpu_cc_op
,
CC_OP_
LOGIC
);
dc
->
cc_op
=
CC_OP_
LOGIC
;
}
break
;
case
0xc
:
/* subx, V9 subc */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录