Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
648f034c
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,发现更多精彩内容 >>
提交
648f034c
编写于
9月 01, 2013
作者:
A
Andreas Färber
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
translate-all: Change tb_gen_code() argument to CPUState
Signed-off-by:
N
Andreas Färber
<
afaerber@suse.de
>
上级
90b40a69
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
10 addition
and
9 deletion
+10
-9
cpu-exec.c
cpu-exec.c
+2
-2
exec.c
exec.c
+1
-1
hw/i386/kvmvapic.c
hw/i386/kvmvapic.c
+1
-1
include/exec/exec-all.h
include/exec/exec-all.h
+1
-1
translate-all.c
translate-all.c
+5
-4
未找到文件。
cpu-exec.c
浏览文件 @
648f034c
...
...
@@ -103,7 +103,7 @@ static void cpu_exec_nocache(CPUArchState *env, int max_cycles,
if
(
max_cycles
>
CF_COUNT_MASK
)
max_cycles
=
CF_COUNT_MASK
;
tb
=
tb_gen_code
(
env
,
orig_tb
->
pc
,
orig_tb
->
cs_base
,
orig_tb
->
flags
,
tb
=
tb_gen_code
(
cpu
,
orig_tb
->
pc
,
orig_tb
->
cs_base
,
orig_tb
->
flags
,
max_cycles
);
cpu
->
current_tb
=
tb
;
/* execute the generated code */
...
...
@@ -156,7 +156,7 @@ static TranslationBlock *tb_find_slow(CPUArchState *env,
}
not_found:
/* if no translated code available, then translate it now */
tb
=
tb_gen_code
(
env
,
pc
,
cs_base
,
flags
,
0
);
tb
=
tb_gen_code
(
cpu
,
pc
,
cs_base
,
flags
,
0
);
found:
/* Move the last found TB to the head of the list */
...
...
exec.c
浏览文件 @
648f034c
...
...
@@ -1611,7 +1611,7 @@ static void check_watchpoint(int offset, int len_mask, int flags)
cpu_loop_exit
(
cpu
);
}
else
{
cpu_get_tb_cpu_state
(
env
,
&
pc
,
&
cs_base
,
&
cpu_flags
);
tb_gen_code
(
env
,
pc
,
cs_base
,
cpu_flags
,
1
);
tb_gen_code
(
cpu
,
pc
,
cs_base
,
cpu_flags
,
1
);
cpu_resume_from_signal
(
env
,
NULL
);
}
}
...
...
hw/i386/kvmvapic.c
浏览文件 @
648f034c
...
...
@@ -448,7 +448,7 @@ static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip)
if
(
!
kvm_enabled
())
{
cs
->
current_tb
=
NULL
;
tb_gen_code
(
env
,
current_pc
,
current_cs_base
,
current_flags
,
1
);
tb_gen_code
(
cs
,
current_pc
,
current_cs_base
,
current_flags
,
1
);
cpu_resume_from_signal
(
env
,
NULL
);
}
}
...
...
include/exec/exec-all.h
浏览文件 @
648f034c
...
...
@@ -85,7 +85,7 @@ void page_size_init(void);
void
QEMU_NORETURN
cpu_resume_from_signal
(
CPUArchState
*
env1
,
void
*
puc
);
void
QEMU_NORETURN
cpu_io_recompile
(
CPUState
*
cpu
,
uintptr_t
retaddr
);
TranslationBlock
*
tb_gen_code
(
CPU
ArchState
*
env
,
TranslationBlock
*
tb_gen_code
(
CPU
State
*
cpu
,
target_ulong
pc
,
target_ulong
cs_base
,
int
flags
,
int
cflags
);
void
cpu_exec_init
(
CPUArchState
*
env
);
...
...
translate-all.c
浏览文件 @
648f034c
...
...
@@ -938,10 +938,11 @@ static void build_page_bitmap(PageDesc *p)
}
}
TranslationBlock
*
tb_gen_code
(
CPU
ArchState
*
env
,
TranslationBlock
*
tb_gen_code
(
CPU
State
*
cpu
,
target_ulong
pc
,
target_ulong
cs_base
,
int
flags
,
int
cflags
)
{
CPUArchState
*
env
=
cpu
->
env_ptr
;
TranslationBlock
*
tb
;
uint8_t
*
tc_ptr
;
tb_page_addr_t
phys_pc
,
phys_page2
;
...
...
@@ -1111,7 +1112,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
modifying the memory. It will ensure that it cannot modify
itself */
cpu
->
current_tb
=
NULL
;
tb_gen_code
(
env
,
current_pc
,
current_cs_base
,
current_flags
,
1
);
tb_gen_code
(
cpu
,
current_pc
,
current_cs_base
,
current_flags
,
1
);
cpu_resume_from_signal
(
env
,
NULL
);
}
#endif
...
...
@@ -1208,7 +1209,7 @@ static void tb_invalidate_phys_page(tb_page_addr_t addr,
modifying the memory. It will ensure that it cannot modify
itself */
cpu
->
current_tb
=
NULL
;
tb_gen_code
(
env
,
current_pc
,
current_cs_base
,
current_flags
,
1
);
tb_gen_code
(
cpu
,
current_pc
,
current_cs_base
,
current_flags
,
1
);
if
(
locked
)
{
mmap_unlock
();
}
...
...
@@ -1469,7 +1470,7 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr)
tb_phys_invalidate
(
tb
,
-
1
);
/* FIXME: In theory this could raise an exception. In practice
we have already translated the block once so it's probably ok. */
tb_gen_code
(
env
,
pc
,
cs_base
,
flags
,
cflags
);
tb_gen_code
(
cpu
,
pc
,
cs_base
,
flags
,
cflags
);
/* TODO: If env->pc != tb->pc (i.e. the faulting instruction was not
the first in the TB) then we end up generating a whole new TB and
repeating the fault, which is horribly inefficient.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录