From patchwork Wed Jun 28 07:12:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 697221 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp4194838wrm; Wed, 28 Jun 2023 00:13:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4vWZUoKvzzsWBbOgQoYVd2RHs3CgOcp873Vhv2bbJMIZLnj4uR4/BXb7X9/9ctK6UgqUYv X-Received: by 2002:a05:620a:2a6b:b0:765:a6a1:94b3 with SMTP id q43-20020a05620a2a6b00b00765a6a194b3mr10338919qkp.73.1687936400950; Wed, 28 Jun 2023 00:13:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687936400; cv=none; d=google.com; s=arc-20160816; b=aRXAtssw53ONHHAFCNrvZVJARi2afOFl4MlCpZrCvJn0LfwYw9a7A6hq4cIdskXxnc YWv0YL8H/AT6XLu3Eqk0QdXFUaIGlPWDryMgh6Fl2YvTsr5UnoKZ6xvblfpLLsKExpml MCRjuxJ4BD1Su/TU07VfyRUIDUeVDRGTuamU6jQVY2lGjbgqlpu5DFqb8bCS7Rk/Yp0f ZdA8MMVvAYuCEBZlsRLSI5lf7O1yH0QgeeRZBH7P+Y609BL9Laz54ZGgkXDzLm8W1Kal Kkz36jHe9VLzDD3/3k+fLToytP8h0hAsvpsKrjhqljegLZm5WX5mXee6dOY9EiudhB1N NxIg== 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=L3UT1KaeZvhJccSr3A8+yE+k4cSqwLvN8sfpwbOlRn8=; fh=GkmytpQ/aBK+SnhsUxtqa1dYh9qnVue5D4c8ejqHfb0=; b=VVsZcmpU020yfLQrb3JxXAci7Lv6sZgXsG6aBSUkNd/Lso/Cp9Ywyl3a4Dc8bwtVH7 Wa5oZm+DR+9I5GHi1ZHcedy8nnH1HUqDPSnVvhSP+1Y7TOEguDVwQODHndxzexonyQ66 Q+lF96tEegO4yQhtmjq93g+rCcZE+GbPr6nAlaUcapXyFj6D4g+ZhBeXCKGfWsL8bg+Q rz4Rt1hXc1u834iq0HEOs/oa5+qv+Zm58SYBbpQgRP44PgOTzC4mvDFSuqddxBvtV9uP QkLyHvD/8TaqvWdJ6jMjrhLloETDDHxPiniEI0mPIy6xT2vavX8ryz1SA7y7XPX67P0+ 55YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YwUa5Dvg; 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 ot13-20020a05620a818d00b00765a58a72adsi3029338qkn.308.2023.06.28.00.13.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jun 2023 00:13:20 -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=YwUa5Dvg; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEPLs-0003MB-8i; Wed, 28 Jun 2023 03:12:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEPLc-00035J-BO for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:24 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEPLZ-0005K4-CB for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:16 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-313e68e99c7so5089766f8f.1 for ; Wed, 28 Jun 2023 00:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687936331; x=1690528331; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=L3UT1KaeZvhJccSr3A8+yE+k4cSqwLvN8sfpwbOlRn8=; b=YwUa5DvgSOhPUaagZhoANWETkLoeK+cZoHztLzJa2o045xxmiTvGQ7SC7LNmaaND6D nQQisFNh5tDl1VTL7rouEladkYCxQKS77Qqhsnok9bw+Saote1Z1jUvB/gdaw518ZwSs h33gUQbYhCsYkP4mappyxZ3E1ymJ8tfW43JNX5yhT73js1q6YCK+56MUwuR5NetiYPtH pSEWwo+5ZN+AqapG0P9RcfqTCCdMuOuUgx0GPX3V1YsarVz0NBoOCgAz6ZzC00QtEpAP OBWgn2QwfZRx8Idr6g39zlq/UQV/ZaPk3iUem1R39MOrtnSg2EDt0g8a9QfOsD0s9NYb KKRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687936331; x=1690528331; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L3UT1KaeZvhJccSr3A8+yE+k4cSqwLvN8sfpwbOlRn8=; b=MpxPSx0VmLAT42XBJesGwZVbk3mpNvgxu0GtEQou8MxtTpJs9bAscWU7EutREJwzAq p95oTWv6P4afgKDSQ/6pMsTW1s/4W6BCD+UdjkW2b1cTunJmbwJzryGbHDmObuKvAQB9 wksC7uz33Xu5i/mCRJCJzLP+rGivc8QS8AlYwdrKQ+gPXc9hdgwIFsRFHVrulQ7y5Qq3 SxFWbLP/0tL+tsgLM83Ojm3gl2TlXVQ9+ExW8RpMuU8xDkL/9lzUQ1E7uQGomdYtSGF4 dh8K23FN8/xcgtgcUwOU//zOmBKxOX98LucMU8EzLiL5VdGKbIJo5WNGIIm7LPSMKU8l NBDw== X-Gm-Message-State: AC+VfDyRrjUy5mdEGSHTSSSBqcrTaHN0EW/9AfNfNtN2uQIQ1Vlto4Wf LJtMo/RX/kGpDZVRjvW4K5y4FwrfBRORGcr7RZuF5kQp X-Received: by 2002:a5d:58f1:0:b0:313:df4b:4156 with SMTP id f17-20020a5d58f1000000b00313df4b4156mr9814741wrd.34.1687936330777; Wed, 28 Jun 2023 00:12:10 -0700 (PDT) Received: from localhost.localdomain ([139.47.41.103]) by smtp.gmail.com with ESMTPSA id a5-20020a5d5705000000b00313f9a0c521sm4908667wrv.107.2023.06.28.00.12.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 00:12:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 8/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr for v9 WRASI Date: Wed, 28 Jun 2023 09:12:02 +0200 Message-Id: <20230628071202.230991-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230628071202.230991-1-richard.henderson@linaro.org> References: <20230628071202.230991-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x42a.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=ham 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-bounces+patch=linaro.org@nongnu.org We incorporate %asi into tb->flags so that we may generate inline code for the many ASIs for which it is easy to do so. Setting %asi is common for e.g. memcpy and memset performing block copy and clear, so it is worth noticing this case. We must end the TB but do not need to return to the main loop. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/sparc/translate.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 9148e33283..bd877a5e4a 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -4147,10 +4147,14 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn) tcg_gen_andi_tl(cpu_tmp0, cpu_tmp0, 0xff); tcg_gen_st32_tl(cpu_tmp0, cpu_env, offsetof(CPUSPARCState, asi)); - /* End TB to notice changed ASI. */ + /* + * End TB to notice changed ASI. + * TODO: Could notice src1 = %g0 and IS_IMM, + * update DisasContext and not exit the TB. + */ save_state(dc); gen_op_next_insn(); - tcg_gen_exit_tb(NULL, 0); + tcg_gen_lookup_and_goto_ptr(); dc->base.is_jmp = DISAS_NORETURN; break; case 0x6: /* V9 wrfprs */