From patchwork Fri Apr 30 01:15:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 429725 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2102938jao; Thu, 29 Apr 2021 18:18:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWhY11mgR8BdA4zsB25LYjv3Hy159EmSjX+JUSAaFDIkuNP2YQIlqhXEW7nBpqL6yzghh5 X-Received: by 2002:a6b:d60e:: with SMTP id w14mr1691080ioa.187.1619745484636; Thu, 29 Apr 2021 18:18:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619745484; cv=none; d=google.com; s=arc-20160816; b=TdEm0EB3gR3o57QKF8XDTCD5IBVimICtTyk6e7vqp4nwaJDYpTn3y+jE3N3gXmxcPw 9O0PYRZpWyj698aAbgktbVBnF2vE+L+I/KM/XjaE7xGXXAdK1G8xcjjun9DBjqp0fL8d qIgpo296JUaxUZPWr4yB+EVUWtmv6pKZF2CmQGQp2kDO+oNbuA3ksG61uEx6KOK96gyQ MtUJTKbpzF1hrd6QL4VSGVX/GQonJn5eNaxLeWcm5cn9rAPxLpIadjGUXPqmVlnG3vFE XDj+QpbegN7iGQSlZctbIxQXDhH20jP5F5CAVFXbKrW+sekJmREMLkV8nPg6W9fRD90y qWdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=hkrMHzJK4SVIKgtdf6kvvk43VF91B4o41R73Fwa1Qt8=; b=djI/8d/M3yAssRyDpAHOKElZK/H3LYnc3zUGdAIdM9lcb9OxvsYl62w9fQx81wUZW6 g3lEg9TUpl1chkEQnYduTeIG/7RIdoayW3iE7rGNVPG1LBUURBGCjCjpxBzOk38NW1Tl xKdZPaDxPlpFA3P/1pqDX5zFbQtvp57AFBMn5sde1ZdcmkBYdz96tyFpYmdRs/RiGc43 s8VvREN8mx/73f+taUu+BV8OGL972A9echxn+1vA52ovYCsw2QDbJ313WhQjwOZ+f7bc co70NZuBWoyYm5zqAXuiVxjFRzW6sEDgPezQ/z5bbKcfP2JUa3XsErjAGSpVcZuNwuNT PYQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X59sB5PM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y1si358080ilm.134.2021.04.29.18.18.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Apr 2021 18:18:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X59sB5PM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcHnA-0003y2-2i for patch@linaro.org; Thu, 29 Apr 2021 21:18:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcHlH-0002wY-Ie for qemu-devel@nongnu.org; Thu, 29 Apr 2021 21:16:07 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:45747) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcHl3-0007Xq-Vu for qemu-devel@nongnu.org; Thu, 29 Apr 2021 21:16:07 -0400 Received: by mail-pl1-x631.google.com with SMTP id p17so9834096plf.12 for ; Thu, 29 Apr 2021 18:15:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hkrMHzJK4SVIKgtdf6kvvk43VF91B4o41R73Fwa1Qt8=; b=X59sB5PMrEzb1bus/gQ7jkZTMKicuHOscoMOFHIC5VkLkIFSPb7zF0y9ONdmh7sKa4 RF2e9Kx4V0l47lJZfsm6UJVNMorVYNA6/IrZ/1JfV1rWE1gyyiLQGow2rUrsKkTNVva8 0BS4ohQ6tqXigWSMEgxl0TzrKRXbNeoKEwQeXJB0hu9O3e4p8dzlOIOoVjCIs5LzeFPl XPWrNk1ywu1/KD4oSupENF4kQaBFhkYjvqbrKeoMpJlp/9RR+eN/TlfaprWBm1MSzjFy TuY4OJ1bM3Mp3+/27L8JAtyH5JbmIHEYYWpmfiFqH5Ty35rRqUJ9f+lkDNPLYlE+lhtf 9C8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hkrMHzJK4SVIKgtdf6kvvk43VF91B4o41R73Fwa1Qt8=; b=gZxLYCWFpvXLAQZgxsl7GAGGb3ANtZjPqaeX/8BAgbjIrH5TsorXw8EjL6xfEV+CvT GegbGwNuXGj4zoI8BvXx/6aBiEBKBZ4aWb7yiXyTELawqJ+Mam+kRPCu9zTNE2OXAIC3 cxQM1cbf77WDtiaJczau9cOdOd5l+vDbRng8aPT/fwwnEd8PDm+aiyFrP3mJwnJ0W6Ry sbmbLCj/L4I57YwzKNDj65HInoTIdO5u2FhGeqOOk+P2gxN3iMgefRo34K0YJdBe+b+J YxD75JgSsp1AiETI2jlHbItaoRMQjkn7BRkb9rI9kAKbfFlbtaEawafYrTQH3CrrZMBk uQTA== X-Gm-Message-State: AOAM533N2K28RCpMLHi16LQZjo5PvHV9XL9KSqZg4VTfC4X2ONhRYK6+ 0/MXblx/Oea55QaBUHiuvKe56zxoos3IVg== X-Received: by 2002:a17:902:e802:b029:ec:f326:8e1c with SMTP id u2-20020a170902e802b02900ecf3268e1cmr2491570plg.73.1619745352619; Thu, 29 Apr 2021 18:15:52 -0700 (PDT) Received: from localhost.localdomain ([71.212.144.24]) by smtp.gmail.com with ESMTPSA id 1sm161277pjx.46.2021.04.29.18.15.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 18:15:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 12/30] target/ppc: Replace POWERPC_EXCP_SYNC with DISAS_EXIT Date: Thu, 29 Apr 2021 18:15:25 -0700 Message-Id: <20210430011543.1017113-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210430011543.1017113-1-richard.henderson@linaro.org> References: <20210430011543.1017113-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: f4bug@amsat.org, luis.pires@eldorado.org.br, qemu-ppc@nongnu.org, lagarcia@br.ibm.com, bruno.larsen@eldorado.org.br, matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Remove the synthetic "exception" after no more uses. Signed-off-by: Richard Henderson --- target/ppc/cpu.h | 1 - target/ppc/translate.c | 27 +++++++++------------------ 2 files changed, 9 insertions(+), 19 deletions(-) -- 2.25.1 diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index e73416da68..cf10117065 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -135,7 +135,6 @@ enum { POWERPC_EXCP_STOP = 0x200, /* stop translation */ POWERPC_EXCP_BRANCH = 0x201, /* branch instruction */ /* QEMU exceptions: special cases we want to stop translation */ - POWERPC_EXCP_SYNC = 0x202, /* context synchronizing instruction */ POWERPC_EXCP_SYSCALL_USER = 0x203, /* System call in user mode only */ }; diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 7dbdf3d047..d22d6e5b85 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -360,14 +360,6 @@ static inline void gen_stop_exception(DisasContext *ctx) ctx->exception = POWERPC_EXCP_STOP; } -#ifndef CONFIG_USER_ONLY -/* No need to update nip here, as execution flow will change */ -static inline void gen_sync_exception(DisasContext *ctx) -{ - ctx->exception = POWERPC_EXCP_SYNC; -} -#endif - #define GEN_HANDLER(name, opc1, opc2, opc3, inval, type) \ GEN_OPCODE(name, opc1, opc2, opc3, inval, type, PPC_NONE) @@ -4008,7 +4000,7 @@ static void gen_rfi(DisasContext *ctx) } gen_update_cfar(ctx, ctx->cia); gen_helper_rfi(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif } @@ -4025,7 +4017,7 @@ static void gen_rfid(DisasContext *ctx) } gen_update_cfar(ctx, ctx->cia); gen_helper_rfid(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif } @@ -4042,7 +4034,7 @@ static void gen_rfscv(DisasContext *ctx) } gen_update_cfar(ctx, ctx->cia); gen_helper_rfscv(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif } #endif @@ -4055,7 +4047,7 @@ static void gen_hrfid(DisasContext *ctx) /* Restore CPU state */ CHK_HV; gen_helper_hrfid(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif } #endif @@ -5941,7 +5933,7 @@ static void gen_rfsvc(DisasContext *ctx) CHK_SV; gen_helper_rfsvc(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif /* defined(CONFIG_USER_ONLY) */ } @@ -6321,7 +6313,7 @@ static void gen_rfci_40x(DisasContext *ctx) CHK_SV; /* Restore CPU state */ gen_helper_40x_rfci(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif /* defined(CONFIG_USER_ONLY) */ } @@ -6333,7 +6325,7 @@ static void gen_rfci(DisasContext *ctx) CHK_SV; /* Restore CPU state */ gen_helper_rfci(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif /* defined(CONFIG_USER_ONLY) */ } @@ -6348,7 +6340,7 @@ static void gen_rfdi(DisasContext *ctx) CHK_SV; /* Restore CPU state */ gen_helper_rfdi(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif /* defined(CONFIG_USER_ONLY) */ } @@ -6361,7 +6353,7 @@ static void gen_rfmci(DisasContext *ctx) CHK_SV; /* Restore CPU state */ gen_helper_rfmci(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif /* defined(CONFIG_USER_ONLY) */ } @@ -8092,7 +8084,6 @@ static void ppc_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs) case POWERPC_EXCP_BRANCH: ctx->base.is_jmp = DISAS_NORETURN; break; - case POWERPC_EXCP_SYNC: case POWERPC_EXCP_STOP: ctx->base.is_jmp = DISAS_EXIT; break;