Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
0374f508
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看板
提交
0374f508
编写于
3月 04, 2014
作者:
R
Richard Henderson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tcg-ia64: Convert to new ldst opcodes
Signed-off-by:
N
Richard Henderson
<
rth@twiddle.net
>
上级
3bf16cb3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
35 addition
and
67 deletion
+35
-67
tcg/ia64/tcg-target.c
tcg/ia64/tcg-target.c
+34
-66
tcg/ia64/tcg-target.h
tcg/ia64/tcg-target.h
+1
-1
未找到文件。
tcg/ia64/tcg-target.c
浏览文件 @
0374f508
...
...
@@ -1723,20 +1723,20 @@ static void tcg_out_tb_finalize(TCGContext *s)
}
}
static
inline
void
tcg_out_qemu_ld
(
TCGContext
*
s
,
const
TCGArg
*
args
,
TCGMemOp
opc
)
static
inline
void
tcg_out_qemu_ld
(
TCGContext
*
s
,
const
TCGArg
*
args
)
{
static
const
uint64_t
opc_ld_m1
[
4
]
=
{
OPC_LD1_M1
,
OPC_LD2_M1
,
OPC_LD4_M1
,
OPC_LD8_M1
};
int
addr_reg
,
data_reg
,
mem_index
;
TCGMemOp
s_bits
;
TCGMemOp
opc
,
s_bits
;
uint64_t
fin1
,
fin2
;
uint8_t
*
label_ptr
;
data_reg
=
*
args
++
;
addr_reg
=
*
args
++
;
mem_index
=
*
args
;
data_reg
=
args
[
0
];
addr_reg
=
args
[
1
];
opc
=
args
[
2
];
mem_index
=
args
[
3
];
s_bits
=
opc
&
MO_SIZE
;
/* Read the TLB entry */
...
...
@@ -1783,8 +1783,7 @@ static inline void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args,
fin2
?
fin2
:
INSN_NOP_I
);
}
static
inline
void
tcg_out_qemu_st
(
TCGContext
*
s
,
const
TCGArg
*
args
,
TCGMemOp
opc
)
static
inline
void
tcg_out_qemu_st
(
TCGContext
*
s
,
const
TCGArg
*
args
)
{
static
const
uint64_t
opc_st_m4
[
4
]
=
{
OPC_ST1_M4
,
OPC_ST2_M4
,
OPC_ST4_M4
,
OPC_ST8_M4
...
...
@@ -1792,12 +1791,13 @@ static inline void tcg_out_qemu_st(TCGContext *s, const TCGArg *args,
TCGReg
addr_reg
,
data_reg
;
int
mem_index
;
uint64_t
pre1
,
pre2
;
TCGMemOp
s_bits
;
TCGMemOp
opc
,
s_bits
;
uint8_t
*
label_ptr
;
data_reg
=
*
args
++
;
addr_reg
=
*
args
++
;
mem_index
=
*
args
;
data_reg
=
args
[
0
];
addr_reg
=
args
[
1
];
opc
=
args
[
2
];
mem_index
=
args
[
3
];
s_bits
=
opc
&
MO_SIZE
;
/* Note that we always use LE helper functions, so the bswap insns
...
...
@@ -1841,17 +1841,17 @@ static inline void tcg_out_qemu_st(TCGContext *s, const TCGArg *args,
#else
/* !CONFIG_SOFTMMU */
# include "tcg-be-null.h"
static
inline
void
tcg_out_qemu_ld
(
TCGContext
*
s
,
const
TCGArg
*
args
,
TCGMemOp
opc
)
static
inline
void
tcg_out_qemu_ld
(
TCGContext
*
s
,
const
TCGArg
*
args
)
{
static
uint64_t
const
opc_ld_m1
[
4
]
=
{
OPC_LD1_M1
,
OPC_LD2_M1
,
OPC_LD4_M1
,
OPC_LD8_M1
};
int
addr_reg
,
data_reg
;
TCGMemOp
s_bits
,
bswap
;
TCGMemOp
opc
,
s_bits
,
bswap
;
data_reg
=
*
args
++
;
addr_reg
=
*
args
++
;
data_reg
=
args
[
0
];
addr_reg
=
args
[
1
];
opc
=
args
[
2
];
s_bits
=
opc
&
MO_SIZE
;
bswap
=
opc
&
MO_BSWAP
;
...
...
@@ -1962,8 +1962,7 @@ static inline void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args,
#endif
}
static
inline
void
tcg_out_qemu_st
(
TCGContext
*
s
,
const
TCGArg
*
args
,
TCGMemOp
opc
)
static
inline
void
tcg_out_qemu_st
(
TCGContext
*
s
,
const
TCGArg
*
args
)
{
static
uint64_t
const
opc_st_m4
[
4
]
=
{
OPC_ST1_M4
,
OPC_ST2_M4
,
OPC_ST4_M4
,
OPC_ST8_M4
...
...
@@ -1972,10 +1971,11 @@ static inline void tcg_out_qemu_st(TCGContext *s, const TCGArg *args,
#if TARGET_LONG_BITS == 64
uint64_t
add_guest_base
;
#endif
TCGMemOp
s_bits
,
bswap
;
TCGMemOp
opc
,
s_bits
,
bswap
;
data_reg
=
*
args
++
;
addr_reg
=
*
args
++
;
data_reg
=
args
[
0
];
addr_reg
=
args
[
1
];
opc
=
args
[
2
];
s_bits
=
opc
&
MO_SIZE
;
bswap
=
opc
&
MO_BSWAP
;
...
...
@@ -2299,40 +2299,17 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode opc,
args
[
3
],
const_args
[
3
],
args
[
4
],
const_args
[
4
],
0
);
break
;
case
INDEX_op_qemu_ld
8u
:
tcg_out_qemu_ld
(
s
,
args
,
MO_UB
);
case
INDEX_op_qemu_ld
_i32
:
tcg_out_qemu_ld
(
s
,
args
);
break
;
case
INDEX_op_qemu_ld
8s
:
tcg_out_qemu_ld
(
s
,
args
,
MO_SB
);
case
INDEX_op_qemu_ld
_i64
:
tcg_out_qemu_ld
(
s
,
args
);
break
;
case
INDEX_op_qemu_
ld16u
:
tcg_out_qemu_
ld
(
s
,
args
,
MO_TEUW
);
case
INDEX_op_qemu_
st_i32
:
tcg_out_qemu_
st
(
s
,
args
);
break
;
case
INDEX_op_qemu_ld16s
:
tcg_out_qemu_ld
(
s
,
args
,
MO_TESW
);
break
;
case
INDEX_op_qemu_ld32
:
case
INDEX_op_qemu_ld32u
:
tcg_out_qemu_ld
(
s
,
args
,
MO_TEUL
);
break
;
case
INDEX_op_qemu_ld32s
:
tcg_out_qemu_ld
(
s
,
args
,
MO_TESL
);
break
;
case
INDEX_op_qemu_ld64
:
tcg_out_qemu_ld
(
s
,
args
,
MO_TEQ
);
break
;
case
INDEX_op_qemu_st8
:
tcg_out_qemu_st
(
s
,
args
,
MO_UB
);
break
;
case
INDEX_op_qemu_st16
:
tcg_out_qemu_st
(
s
,
args
,
MO_TEUW
);
break
;
case
INDEX_op_qemu_st32
:
tcg_out_qemu_st
(
s
,
args
,
MO_TEUL
);
break
;
case
INDEX_op_qemu_st64
:
tcg_out_qemu_st
(
s
,
args
,
MO_TEQ
);
case
INDEX_op_qemu_st_i64
:
tcg_out_qemu_st
(
s
,
args
);
break
;
default:
...
...
@@ -2443,19 +2420,10 @@ static const TCGTargetOpDef ia64_op_defs[] = {
{
INDEX_op_deposit_i32
,
{
"r"
,
"rZ"
,
"ri"
}
},
{
INDEX_op_deposit_i64
,
{
"r"
,
"rZ"
,
"ri"
}
},
{
INDEX_op_qemu_ld8u
,
{
"r"
,
"r"
}
},
{
INDEX_op_qemu_ld8s
,
{
"r"
,
"r"
}
},
{
INDEX_op_qemu_ld16u
,
{
"r"
,
"r"
}
},
{
INDEX_op_qemu_ld16s
,
{
"r"
,
"r"
}
},
{
INDEX_op_qemu_ld32
,
{
"r"
,
"r"
}
},
{
INDEX_op_qemu_ld32u
,
{
"r"
,
"r"
}
},
{
INDEX_op_qemu_ld32s
,
{
"r"
,
"r"
}
},
{
INDEX_op_qemu_ld64
,
{
"r"
,
"r"
}
},
{
INDEX_op_qemu_st8
,
{
"SZ"
,
"r"
}
},
{
INDEX_op_qemu_st16
,
{
"SZ"
,
"r"
}
},
{
INDEX_op_qemu_st32
,
{
"SZ"
,
"r"
}
},
{
INDEX_op_qemu_st64
,
{
"SZ"
,
"r"
}
},
{
INDEX_op_qemu_ld_i32
,
{
"r"
,
"r"
}
},
{
INDEX_op_qemu_ld_i64
,
{
"r"
,
"r"
}
},
{
INDEX_op_qemu_st_i32
,
{
"SZ"
,
"r"
}
},
{
INDEX_op_qemu_st_i64
,
{
"SZ"
,
"r"
}
},
{
-
1
},
};
...
...
tcg/ia64/tcg-target.h
浏览文件 @
0374f508
...
...
@@ -153,7 +153,7 @@ typedef enum {
#define TCG_TARGET_HAS_mulsh_i32 0
#define TCG_TARGET_HAS_mulsh_i64 0
#define TCG_TARGET_HAS_new_ldst
0
#define TCG_TARGET_HAS_new_ldst
1
#define TCG_TARGET_deposit_i32_valid(ofs, len) ((len) <= 16)
#define TCG_TARGET_deposit_i64_valid(ofs, len) ((len) <= 16)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录