aboutsummaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-11-27 01:07:25 -0800
committerRichard Henderson <richard.henderson@linaro.org>2023-01-17 10:44:23 -1000
commit9ae958e4d7504f87c2ecd5915d8c3ede7007f2e2 (patch)
tree0fc21df22a690dfe1fe92b43e21f7cc1e530cb33 /tcg
parent79ffece44472975b582f009b803d454527d43892 (diff)
downloadqemu-9ae958e4d7504f87c2ecd5915d8c3ede7007f2e2.zip
qemu-9ae958e4d7504f87c2ecd5915d8c3ede7007f2e2.tar.gz
qemu-9ae958e4d7504f87c2ecd5915d8c3ede7007f2e2.tar.bz2
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>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/riscv/tcg-target.c.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc
index 136fe54..82ca864 100644
--- a/tcg/riscv/tcg-target.c.inc
+++ b/tcg/riscv/tcg-target.c.inc
@@ -267,6 +267,7 @@ typedef enum {
#endif
OPC_FENCE = 0x0000000f,
+ OPC_NOP = OPC_ADDI, /* nop = addi r0,r0,0 */
} RISCVInsn;
/*
@@ -403,7 +404,7 @@ static void tcg_out_nop_fill(tcg_insn_unit *p, int count)
{
int i;
for (i = 0; i < count; ++i) {
- p[i] = encode_i(OPC_ADDI, TCG_REG_ZERO, TCG_REG_ZERO, 0);
+ p[i] = OPC_NOP;
}
}