Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
39acc647
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,发现更多精彩内容 >>
提交
39acc647
编写于
3月 28, 2014
作者:
R
Richard Henderson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
target-alpha: Tidy alpha_translate_init
Signed-off-by:
N
Richard Henderson
<
rth@twiddle.net
>
上级
e566be04
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
43 addition
and
35 deletion
+43
-35
target-alpha/translate.c
target-alpha/translate.c
+43
-35
未找到文件。
target-alpha/translate.c
浏览文件 @
39acc647
...
...
@@ -95,59 +95,67 @@ static TCGv cpu_sysval;
static
TCGv
cpu_usp
;
#endif
/* register names */
static
char
cpu_reg_names
[
10
*
4
+
21
*
5
+
10
*
5
+
21
*
6
];
#include "exec/gen-icount.h"
void
alpha_translate_init
(
void
)
{
#define DEF_VAR(V) { &cpu_##V, #V, offsetof(CPUAlphaState, V) }
typedef
struct
{
TCGv
*
var
;
const
char
*
name
;
int
ofs
;
}
GlobalVar
;
static
const
GlobalVar
vars
[]
=
{
DEF_VAR
(
pc
),
DEF_VAR
(
lock_addr
),
DEF_VAR
(
lock_st_addr
),
DEF_VAR
(
lock_value
),
DEF_VAR
(
unique
),
#ifndef CONFIG_USER_ONLY
DEF_VAR
(
sysval
),
DEF_VAR
(
usp
),
#endif
};
#undef DEF_VAR
/* Use the symbolic register names that match the disassembler. */
static
const
char
greg_names
[
31
][
4
]
=
{
"v0"
,
"t0"
,
"t1"
,
"t2"
,
"t3"
,
"t4"
,
"t5"
,
"t6"
,
"t7"
,
"s0"
,
"s1"
,
"s2"
,
"s3"
,
"s4"
,
"s5"
,
"fp"
,
"a0"
,
"a1"
,
"a2"
,
"a3"
,
"a4"
,
"a5"
,
"t8"
,
"t9"
,
"t10"
,
"t11"
,
"ra"
,
"t12"
,
"at"
,
"gp"
,
"sp"
};
static
const
char
freg_names
[
31
][
4
]
=
{
"f0"
,
"f1"
,
"f2"
,
"f3"
,
"f4"
,
"f5"
,
"f6"
,
"f7"
,
"f8"
,
"f9"
,
"f10"
,
"f11"
,
"f12"
,
"f13"
,
"f14"
,
"f15"
,
"f16"
,
"f17"
,
"f18"
,
"f19"
,
"f20"
,
"f21"
,
"f22"
,
"f23"
,
"f24"
,
"f25"
,
"f26"
,
"f27"
,
"f28"
,
"f29"
,
"f30"
};
static
bool
done_init
=
0
;
int
i
;
char
*
p
;
static
int
done_init
=
0
;
if
(
done_init
)
{
return
;
}
done_init
=
1
;
cpu_env
=
tcg_global_reg_new_ptr
(
TCG_AREG0
,
"env"
);
p
=
cpu_reg_names
;
for
(
i
=
0
;
i
<
31
;
i
++
)
{
sprintf
(
p
,
"ir%d"
,
i
);
cpu_ir
[
i
]
=
tcg_global_mem_new_i64
(
TCG_AREG0
,
offsetof
(
CPUAlphaState
,
ir
[
i
]),
p
);
p
+=
(
i
<
10
)
?
4
:
5
;
offsetof
(
CPUAlphaState
,
ir
[
i
]),
greg_names
[
i
]);
}
sprintf
(
p
,
"fir%d"
,
i
);
for
(
i
=
0
;
i
<
31
;
i
++
)
{
cpu_fir
[
i
]
=
tcg_global_mem_new_i64
(
TCG_AREG0
,
offsetof
(
CPUAlphaState
,
fir
[
i
]),
p
);
p
+=
(
i
<
10
)
?
5
:
6
;
offsetof
(
CPUAlphaState
,
fir
[
i
]),
freg_names
[
i
])
;
}
cpu_pc
=
tcg_global_mem_new_i64
(
TCG_AREG0
,
offsetof
(
CPUAlphaState
,
pc
),
"pc"
);
cpu_lock_addr
=
tcg_global_mem_new_i64
(
TCG_AREG0
,
offsetof
(
CPUAlphaState
,
lock_addr
),
"lock_addr"
);
cpu_lock_st_addr
=
tcg_global_mem_new_i64
(
TCG_AREG0
,
offsetof
(
CPUAlphaState
,
lock_st_addr
),
"lock_st_addr"
);
cpu_lock_value
=
tcg_global_mem_new_i64
(
TCG_AREG0
,
offsetof
(
CPUAlphaState
,
lock_value
),
"lock_value"
);
cpu_unique
=
tcg_global_mem_new_i64
(
TCG_AREG0
,
offsetof
(
CPUAlphaState
,
unique
),
"unique"
);
#ifndef CONFIG_USER_ONLY
cpu_sysval
=
tcg_global_mem_new_i64
(
TCG_AREG0
,
offsetof
(
CPUAlphaState
,
sysval
),
"sysval"
);
cpu_usp
=
tcg_global_mem_new_i64
(
TCG_AREG0
,
offsetof
(
CPUAlphaState
,
usp
),
"usp"
);
#endif
done_init
=
1
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
vars
);
++
i
)
{
const
GlobalVar
*
v
=
&
vars
[
i
];
*
v
->
var
=
tcg_global_mem_new_i64
(
TCG_AREG0
,
v
->
ofs
,
v
->
name
);
}
}
static
TCGv
load_zero
(
DisasContext
*
ctx
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录