Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
f167dc37
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,发现更多精彩内容 >>
提交
f167dc37
编写于
3月 23, 2014
作者:
R
Richard Henderson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tcg-s390: Implement tcg_register_jit
Signed-off-by:
N
Richard Henderson
<
rth@twiddle.net
>
上级
547ec121
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
55 addition
and
7 deletion
+55
-7
tcg/s390/tcg-target.c
tcg/s390/tcg-target.c
+55
-7
未找到文件。
tcg/s390/tcg-target.c
浏览文件 @
f167dc37
...
...
@@ -2181,18 +2181,17 @@ static void tcg_target_init(TCGContext *s)
tcg_add_target_add_op_defs
(
s390_op_defs
);
}
#define FRAME_SIZE ((int)(TCG_TARGET_CALL_STACK_OFFSET \
+ TCG_STATIC_CALL_ARGS_SIZE \
+ CPU_TEMP_BUF_NLONGS * sizeof(long)))
static
void
tcg_target_qemu_prologue
(
TCGContext
*
s
)
{
tcg_target_long
frame_size
;
/* stmg %r6,%r15,48(%r15) (save registers) */
tcg_out_insn
(
s
,
RXY
,
STMG
,
TCG_REG_R6
,
TCG_REG_R15
,
TCG_REG_R15
,
48
);
/* aghi %r15,-frame_size */
frame_size
=
TCG_TARGET_CALL_STACK_OFFSET
;
frame_size
+=
TCG_STATIC_CALL_ARGS_SIZE
;
frame_size
+=
CPU_TEMP_BUF_NLONGS
*
sizeof
(
long
);
tcg_out_insn
(
s
,
RI
,
AGHI
,
TCG_REG_R15
,
-
frame_size
);
tcg_out_insn
(
s
,
RI
,
AGHI
,
TCG_REG_R15
,
-
FRAME_SIZE
);
tcg_set_frame
(
s
,
TCG_REG_CALL_STACK
,
TCG_STATIC_CALL_ARGS_SIZE
+
TCG_TARGET_CALL_STACK_OFFSET
,
...
...
@@ -2211,8 +2210,57 @@ static void tcg_target_qemu_prologue(TCGContext *s)
/* lmg %r6,%r15,fs+48(%r15) (restore registers) */
tcg_out_insn
(
s
,
RXY
,
LMG
,
TCG_REG_R6
,
TCG_REG_R15
,
TCG_REG_R15
,
frame_size
+
48
);
FRAME_SIZE
+
48
);
/* br %r14 (return) */
tcg_out_insn
(
s
,
RR
,
BCR
,
S390_CC_ALWAYS
,
TCG_REG_R14
);
}
typedef
struct
{
DebugFrameCIE
cie
;
DebugFrameFDEHeader
fde
;
uint8_t
fde_def_cfa
[
4
];
uint8_t
fde_reg_ofs
[
18
];
}
DebugFrame
;
/* We're expecting a 2 byte uleb128 encoded value. */
QEMU_BUILD_BUG_ON
(
FRAME_SIZE
>=
(
1
<<
14
));
#define ELF_HOST_MACHINE EM_S390
static
DebugFrame
debug_frame
=
{
.
cie
.
len
=
sizeof
(
DebugFrameCIE
)
-
4
,
/* length after .len member */
.
cie
.
id
=
-
1
,
.
cie
.
version
=
1
,
.
cie
.
code_align
=
1
,
.
cie
.
data_align
=
8
,
/* sleb128 8 */
.
cie
.
return_column
=
TCG_REG_R14
,
/* Total FDE size does not include the "len" member. */
.
fde
.
len
=
sizeof
(
DebugFrame
)
-
offsetof
(
DebugFrame
,
fde
.
cie_offset
),
.
fde_def_cfa
=
{
12
,
TCG_REG_CALL_STACK
,
/* DW_CFA_def_cfa %r15, ... */
(
FRAME_SIZE
&
0x7f
)
|
0x80
,
/* ... uleb128 FRAME_SIZE */
(
FRAME_SIZE
>>
7
)
},
.
fde_reg_ofs
=
{
0x86
,
6
,
/* DW_CFA_offset, %r6, 48 */
0x87
,
7
,
/* DW_CFA_offset, %r7, 56 */
0x88
,
8
,
/* DW_CFA_offset, %r8, 64 */
0x89
,
9
,
/* DW_CFA_offset, %r92, 72 */
0x8a
,
10
,
/* DW_CFA_offset, %r10, 80 */
0x8b
,
11
,
/* DW_CFA_offset, %r11, 88 */
0x8c
,
12
,
/* DW_CFA_offset, %r12, 96 */
0x8d
,
13
,
/* DW_CFA_offset, %r13, 104 */
0x8e
,
14
,
/* DW_CFA_offset, %r14, 112 */
}
};
void
tcg_register_jit
(
void
*
buf
,
size_t
buf_size
)
{
debug_frame
.
fde
.
func_start
=
(
uintptr_t
)
buf
;
debug_frame
.
fde
.
func_len
=
buf_size
;
tcg_register_jit_int
(
buf
,
buf_size
,
&
debug_frame
,
sizeof
(
debug_frame
));
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录