mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
Hexagon (target/hexagon) put writes to USR into temp until commit
Change SET_USR_FIELD to write to hex_new_value[HEX_REG_USR] instead of hex_gpr[HEX_REG_USR]. Then, we need code to mark the instructions that can set implicitly set USR - Macros added to hex_common.py - A_FPOP added in translate.c Test case added in tests/tcg/hexagon/overflow.c Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
This commit is contained in:
parent
f448397a51
commit
b9dd6ff91d
6 changed files with 120 additions and 2 deletions
|
@ -204,7 +204,12 @@ static void mark_implicit_reg_write(DisasContext *ctx, Insn *insn,
|
|||
int attrib, int rnum)
|
||||
{
|
||||
if (GET_ATTRIB(insn->opcode, attrib)) {
|
||||
bool is_predicated = GET_ATTRIB(insn->opcode, A_CONDEXEC);
|
||||
/*
|
||||
* USR is used to set overflow and FP exceptions,
|
||||
* so treat it as conditional
|
||||
*/
|
||||
bool is_predicated = GET_ATTRIB(insn->opcode, A_CONDEXEC) ||
|
||||
rnum == HEX_REG_USR;
|
||||
if (is_predicated && !is_preloaded(ctx, rnum)) {
|
||||
tcg_gen_mov_tl(hex_new_value[rnum], hex_gpr[rnum]);
|
||||
}
|
||||
|
@ -230,6 +235,8 @@ static void mark_implicit_reg_writes(DisasContext *ctx, Insn *insn)
|
|||
mark_implicit_reg_write(ctx, insn, A_IMPLICIT_WRITES_SA0, HEX_REG_SA0);
|
||||
mark_implicit_reg_write(ctx, insn, A_IMPLICIT_WRITES_LC1, HEX_REG_LC1);
|
||||
mark_implicit_reg_write(ctx, insn, A_IMPLICIT_WRITES_SA1, HEX_REG_SA1);
|
||||
mark_implicit_reg_write(ctx, insn, A_IMPLICIT_WRITES_USR, HEX_REG_USR);
|
||||
mark_implicit_reg_write(ctx, insn, A_FPOP, HEX_REG_USR);
|
||||
}
|
||||
|
||||
static void mark_implicit_pred_writes(DisasContext *ctx, Insn *insn)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue