From patchwork Tue Jun 7 02:47:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 579311 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5806:0:0:0:0 with SMTP id j6csp4675816max; Mon, 6 Jun 2022 20:11:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3iGC1krOwJp7zFSLc85hgNfngu+qkg88INc+vVFFb444RQGrzEtbnS1X4UNAYmTdwURig X-Received: by 2002:a05:620a:2907:b0:6a5:723a:e291 with SMTP id m7-20020a05620a290700b006a5723ae291mr17830834qkp.36.1654571479235; Mon, 06 Jun 2022 20:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654571479; cv=none; d=google.com; s=arc-20160816; b=UbFLLn0+O5Ln7Fv6kZkp4f9D9bKmC6M3GP4a4ImDn4OSzJRQhVFY7UoOc0k4bUzgmc SOkawm9jmixr4MsGub1yk9JXRc3waKJq67GO0RrtQK01ynZDn2vJE5AkLypYmtH4O7mZ oKGzIP2H33VAPgJAE3LOA1yP7g8Hp2MoLzu0TH8oFpcQqydhv/knaX8s5EKNNiQoAgsm gX5pV+aj7RjBAi0/csMEhWbUtj+6bXSlm1+gGyESAU9e5wdiDQFBXxUO6YaMjogLriBu RctIB+AXISrYPtcSRcwHUElzO2x/dxLO2wufy86lU6wy/kbjhCGiZjT7wM2DJXRgIuwW xHqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=sDCwZBt9IIzx83ZkNxq+1Z/y6VvrCzl9tcBCjhjfsAo=; b=e6pz08X3UDZL8onZumaW37JW5Kz8ndHEXznrLQ4+AGmGCELQ8Ll7aLksBMUXs6zAyQ N+cVBU9HlUOtnpfBYHTjXobdC/d3IFt4vpePB8blGjZJCPBT/fa+PqYyibqAvGtMMQ58 mcjcB9NeRR9bYF7rx0ja0B09vh1W6UL7P0VaRxAtWv2vPBxuWrOAxpfrXBKhcNEqpjtL r6c/tGyLl+rXVrceP/6ZdalLJQQxHkqpgIh85b5PP/DtZVi7sIC7WmexGEbRb1sO9wXq MEqnwBdb9oekmC6UWdMBATonOygBk1828i3arrrLELtyh6tTwEoNBKme6bjcNnKBBHjt Tg0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WRptN6pd; 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=pass (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 r13-20020a056214212d00b00464642d4a61si9522256qvc.24.2022.06.06.20.11.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Jun 2022 20:11:19 -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=pass header.i=@linaro.org header.s=google header.b=WRptN6pd; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyPck-0000DD-Od for patch@linaro.org; Mon, 06 Jun 2022 23:11:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyPG7-0007Fy-US for qemu-devel@nongnu.org; Mon, 06 Jun 2022 22:47:55 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:50905) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyPG4-0000Gg-V4 for qemu-devel@nongnu.org; Mon, 06 Jun 2022 22:47:55 -0400 Received: by mail-pj1-x102c.google.com with SMTP id e24so14463894pjt.0 for ; Mon, 06 Jun 2022 19:47:52 -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=sDCwZBt9IIzx83ZkNxq+1Z/y6VvrCzl9tcBCjhjfsAo=; b=WRptN6pdTcIqEG69kgAFDqkXvMIbJZ33WHWHTPNUw9pIffdD478XoYTdH5J9idTIkK cXNDs1VrN1Az3s4ygsP5DGtcBWGkA4yfxr+8tymw/HLxJoxyz//T6j2b2p5jfMGHGaP7 6iGBazHKelbZ8JngzmdhfempcJoWc5BC4zyyArIncurSW6xHHNgGdrc9rMSSMZ/6T1Z/ vsrdi2joPC6WVJM3YVEY2sMiOtQzpMmGi2+ZgrndG7BoDhetcwUv/2iHi1mUjZse0rEI 7Gi6muKPLgKIQSuEd7ucL1Oe3vuWy+Rl2bGjIuWWGE4mFm2DFllY8gbJCHOyNme80Bw9 ObZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sDCwZBt9IIzx83ZkNxq+1Z/y6VvrCzl9tcBCjhjfsAo=; b=KJF7a7aeLQgrcMQGHeVFQrVoiSIwuJyE1qEk0v57WtUD4FQvAhVgjNmgDyiPgc3qz2 0JQwJ/0x26koyx/8Qh73jiPRsegtBNcUoTILSS+tGMI4voAE4yOgT0k/uQHWsjpxWoTd 8QGtieuMjMOFBXD5zbLmK5RV0kSka2yJ+PWjT1yYy+DxWuRAY6NTlBNq6PntppbLwwap klN4jPTvvOfXJ/S2K7jAWqegjSbtIDAmQC/JBwqPdEyn4fZKK4poDGsNXMRGHVK4USTS aGZVEXmzyoFv9awZ6mWgiz/XsYpyUv/29nOnprkkU6aO0gdEPgY3FyqN3lv92ZP4Z9KN wvOg== X-Gm-Message-State: AOAM533QsUzwnoXn0K36VUas/6PEN1E87TuS3gEztarzQgkJbiu6lD7A MWSv2/SF4QYITu4fcwgBm/4BH2PhIZfwUA== X-Received: by 2002:a17:90b:1c92:b0:1dd:10ff:8f13 with SMTP id oo18-20020a17090b1c9200b001dd10ff8f13mr63985762pjb.54.1654570072102; Mon, 06 Jun 2022 19:47:52 -0700 (PDT) Received: from stoup.. ([2602:ae:1547:e101:d3db:cca:e5c9:6531]) by smtp.gmail.com with ESMTPSA id y26-20020aa7805a000000b0051876d83714sm7476904pfm.196.2022.06.06.19.47.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 19:47:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH v2 19/25] target/arm: Introduce gen_exception_el_v Date: Mon, 6 Jun 2022 19:47:28 -0700 Message-Id: <20220607024734.541321-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220607024734.541321-1-richard.henderson@linaro.org> References: <20220607024734.541321-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Split out a common helper function for gen_exception_el and gen_exception_insn_el_v. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 5a48937ede..fcb6ee648b 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -1086,11 +1086,15 @@ static void gen_exception_internal_insn(DisasContext *s, uint32_t pc, int excp) s->base.is_jmp = DISAS_NORETURN; } -static void gen_exception_el(int excp, uint32_t syndrome, uint32_t target_el) +static void gen_exception_el_v(int excp, uint32_t syndrome, TCGv_i32 tcg_el) { gen_helper_exception_with_syndrome_el(cpu_env, tcg_constant_i32(excp), - tcg_constant_i32(syndrome), - tcg_constant_i32(target_el)); + tcg_constant_i32(syndrome), tcg_el); +} + +static void gen_exception_el(int excp, uint32_t syndrome, uint32_t target_el) +{ + gen_exception_el_v(excp, syndrome, tcg_constant_i32(target_el)); } static void gen_exception(DisasContext *s, int excp, uint32_t syndrome) @@ -1107,8 +1111,7 @@ static void gen_exception_insn_el_v(DisasContext *s, uint64_t pc, int excp, gen_set_condexec(s); gen_set_pc_im(s, pc); } - gen_helper_exception_with_syndrome_el(cpu_env, tcg_constant_i32(excp), - tcg_constant_i32(syn), tcg_el); + gen_exception_el_v(excp, syn, tcg_el); s->base.is_jmp = DISAS_NORETURN; }