mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-17 21:26:13 -07:00
tcg/riscv: Introduce OPC_NOP
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
79ffece444
commit
9ae958e4d7
1 changed files with 2 additions and 1 deletions
|
|
@ -267,6 +267,7 @@ typedef enum {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
OPC_FENCE = 0x0000000f,
|
OPC_FENCE = 0x0000000f,
|
||||||
|
OPC_NOP = OPC_ADDI, /* nop = addi r0,r0,0 */
|
||||||
} RISCVInsn;
|
} RISCVInsn;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -403,7 +404,7 @@ static void tcg_out_nop_fill(tcg_insn_unit *p, int count)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < count; ++i) {
|
for (i = 0; i < count; ++i) {
|
||||||
p[i] = encode_i(OPC_ADDI, TCG_REG_ZERO, TCG_REG_ZERO, 0);
|
p[i] = OPC_NOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue