[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 39/41] target/sparc: Implement MWAIT
From: |
Richard Henderson |
Subject: |
[PATCH 39/41] target/sparc: Implement MWAIT |
Date: |
Fri, 1 Mar 2024 19:15:59 -1000 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sparc/translate.c | 11 +++++++++++
target/sparc/insns.decode | 1 +
2 files changed, 12 insertions(+)
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index 4775e39240..5694420a93 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -3316,6 +3316,17 @@ static void do_wrpowerdown(DisasContext *dc, TCGv src)
TRANS(WRPOWERDOWN, POWERDOWN, do_wr_special, a, supervisor(dc), do_wrpowerdown)
+static void do_wrmwait(DisasContext *dc, TCGv src)
+{
+ /*
+ * TODO: This is a stub version of mwait, which merely recognizes
+ * interrupts immediately and does not wait.
+ */
+ dc->base.is_jmp = DISAS_EXIT;
+}
+
+TRANS(WRMWAIT, VIS4, do_wr_special, a, true, do_wrmwait)
+
static void do_wrpsr(DisasContext *dc, TCGv src)
{
gen_helper_wrpsr(tcg_env, src);
diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode
index 1f9e07e526..2927116031 100644
--- a/target/sparc/insns.decode
+++ b/target/sparc/insns.decode
@@ -124,6 +124,7 @@ CALL 01 i:s30
WRTICK_CMPR 10 10111 110000 ..... . ............. @n_r_ri
WRSTICK 10 11000 110000 ..... . ............. @n_r_ri
WRSTICK_CMPR 10 11001 110000 ..... . ............. @n_r_ri
+ WRMWAIT 10 11100 110000 ..... . ............. @n_r_ri
]
# Before v8, rs1==0 was WRY, and the rest executed as nop.
[
--
2.34.1
- [PATCH 28/41] target/sparc: Implement PDISTN, (continued)
- [PATCH 28/41] target/sparc: Implement PDISTN, Richard Henderson, 2024/03/02
- [PATCH 29/41] target/sparc: Implement UMULXHI, Richard Henderson, 2024/03/02
- [PATCH 31/41] target/sparc: Enable VIS3 feature bit, Richard Henderson, 2024/03/02
- [PATCH 30/41] target/sparc: Implement XMULX, Richard Henderson, 2024/03/02
- [PATCH 33/41] target/sparc: Add feature bit for VIS4, Richard Henderson, 2024/03/02
- [PATCH 35/41] target/sparc: Implement 8-bit FPADD, FPADDS, and FPADDUS, Richard Henderson, 2024/03/02
- [PATCH 36/41] target/sparc: Implement VIS4 comparisons, Richard Henderson, 2024/03/02
- [PATCH 34/41] target/sparc: Implement FALIGNDATAi, Richard Henderson, 2024/03/02
- [PATCH 37/41] target/sparc: Implement FPMIN, FPMAX, Richard Henderson, 2024/03/02
- [PATCH 38/41] target/sparc: Implement SUBXC, SUBXCcc, Richard Henderson, 2024/03/02
- [PATCH 39/41] target/sparc: Implement MWAIT,
Richard Henderson <=
- [PATCH 32/41] target/sparc: Implement IMA extension, Richard Henderson, 2024/03/02
- [PATCH 40/41] target/sparc: Implement monitor asis, Richard Henderson, 2024/03/02
- [PATCH 41/41] target/sparc: Enable VIS4 feature bit, Richard Henderson, 2024/03/02
- Re: [PATCH 00/41] target/sparc: Implement VIS4, Mark Cave-Ayland, 2024/03/05