summaryrefslogtreecommitdiffstats
path: root/target/ppc/translate
diff options
context:
space:
mode:
authorMatheus Ferst2022-07-01 15:34:58 +0200
committerDaniel Henrique Barboza2022-07-18 18:59:43 +0200
commitfc34e81acd5163ea39eee191ec8846c299ca2662 (patch)
tree7455f7f104bdf330a3b3bc5ad6e5a30ef5b997b2 /target/ppc/translate
parenttarget/ppc: receive DisasContext explicitly in GEN_PRIV (diff)
downloadqemu-fc34e81acd5163ea39eee191ec8846c299ca2662.tar.gz
qemu-fc34e81acd5163ea39eee191ec8846c299ca2662.tar.xz
qemu-fc34e81acd5163ea39eee191ec8846c299ca2662.zip
target/ppc: add macros to check privilege level
Equivalent to CHK_SV and CHK_HV, but can be used in decodetree methods. Reviewed-by: Leandro Lupori <leandro.lupori@eldorado.org.br> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br> Signed-off-by: Lucas Coutinho <lucas.coutinho@eldorado.org.br> Message-Id: <20220701133507.740619-3-lucas.coutinho@eldorado.org.br> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Diffstat (limited to 'target/ppc/translate')
-rw-r--r--target/ppc/translate/fixedpoint-impl.c.inc7
1 files changed, 2 insertions, 5 deletions
diff --git a/target/ppc/translate/fixedpoint-impl.c.inc b/target/ppc/translate/fixedpoint-impl.c.inc
index cb0097bedb..db14d3bebc 100644
--- a/target/ppc/translate/fixedpoint-impl.c.inc
+++ b/target/ppc/translate/fixedpoint-impl.c.inc
@@ -79,11 +79,8 @@ static bool do_ldst_quad(DisasContext *ctx, arg_D *a, bool store, bool prefixed)
REQUIRE_INSNS_FLAGS(ctx, 64BX);
if (!prefixed && !(ctx->insns_flags2 & PPC2_LSQ_ISA207)) {
- if (ctx->pr) {
- /* lq and stq were privileged prior to V. 2.07 */
- gen_priv_exception(ctx, POWERPC_EXCP_PRIV_OPC);
- return true;
- }
+ /* lq and stq were privileged prior to V. 2.07 */
+ REQUIRE_SV(ctx);
if (ctx->le_mode) {
gen_align_no_le(ctx);