From patchwork Wed Jun 21 18:06:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 694776 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp996400wrm; Wed, 21 Jun 2023 11:07:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7hYE0NKmyoQcEyCowLt9dLZzcmE87HIuNrem1j/ZzkWbGsvObFgV93A+QmiGbk9SfD5uUV X-Received: by 2002:ac8:7dd1:0:b0:3fd:db4e:7d05 with SMTP id c17-20020ac87dd1000000b003fddb4e7d05mr10240200qte.35.1687370863882; Wed, 21 Jun 2023 11:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687370863; cv=none; d=google.com; s=arc-20160816; b=kcrpJ2ze+7jj2bk/qSiiADR0DwSLTsIt2l5ap47uNR4/fGWlsHN5mjxj2tFxqpwxWo z7EXiWL8fIiJna/e4/N78jgMrBI+c1JjGCny3dUHatGWRztn9Vhoiam+WlMmycYuHUjn GYEXBWbjGT+aSruFYLXmQyMYimf4UvsZHtE+bMkIeYryzjAkSG7d+g+lRjrs1QZQFuWL CeDVlozuxg9qIEWJFXzUQA6zYXkg93qsJzZ2L4OzFVoq+75Xs8N8LRiJWBzHWKzxYgJE cyo42mGVDGzZKy9zDZ1H/Wind2LJYx7CnMPuawjFKIeS5rHvnhAQyPO+42fZGJ6YV5sy vd6A== 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=RzQxtvCYu0WA3x6PRPKK8xlDLVLtN3Yi/AsYMLXAiqY=; b=HLpPu3fMsPCWmKJuZmo8QFjANbZEwF/1pMmAeeYtGEYcAwkOzONzWdYJ9nQCplCFgz aryPNDL/fxzXr5ARy/o0YzuMggW73Bdf1LpiTr17r8W7tl/QN5LRE9BJIF0wtzPS63yj dxbGzEgYJqz1wKpqlUEDzdiw52B4ija1TdSqB6Eqvj+PRUvF1Q4XfhV6n9+liqV18Aw8 ICdnqKKOcdbeUaqXE7RYJQw2I7MtEwrycCPu6dYQryPZf7wH45m3oBa+jyYPeeRpFwJx cipuokU/rmIeXJ9Xrs5pambXZg2UYrBfCJtC+wSGvDzqyXwS2qfsizb14P0Hb1eClx4A +pVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IcKGbeDV; 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 d4-20020a05622a100400b003f86c1b624asi1927947qte.684.2023.06.21.11.07.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Jun 2023 11:07:43 -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=IcKGbeDV; 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 1qC2Dh-0000GC-Pj; Wed, 21 Jun 2023 14:06:17 -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 1qC2Df-0000F2-BZ for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:15 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qC2Dc-0006uZ-NG for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:15 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-51bdd6f187fso1425487a12.1 for ; Wed, 21 Jun 2023 11:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687370771; x=1689962771; 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=RzQxtvCYu0WA3x6PRPKK8xlDLVLtN3Yi/AsYMLXAiqY=; b=IcKGbeDVFoTR0CWdVKMimaaIKf/wQV772tD+ve4JXyxmUDsWqSjxnTP06WuCayhBes tfofCPe8YUzFPLukr3XOIafNxvQz2QwF5faXmPug4cJTUJ2fO3AOstv6ap2alI6U//md zn+gerE+hERP7w2Y0UAUz0KXo1YC+HOR/aw1r3Uvukg8pDeXfrBxocoygYNGn6iLSnpk 1YT5wCyRNRAJcK9hbTIgnsqqMwUYHHfQfgaZhcry30PKWZUhGdwb32sXPcihoP3CUAzK dm/RrZZ3osU2N7jPfj8ac9n2we5GeCTFmxlUlSbo5vBWOteBPXXCr5S16Fo58eu2DR2t pEGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687370771; x=1689962771; 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=RzQxtvCYu0WA3x6PRPKK8xlDLVLtN3Yi/AsYMLXAiqY=; b=Pby9Go72/8zmWFyQhYhi3SJzfZTJvKGH8LKQpeFSR6eyHekkjTmbgApXvndBwjnFFa 7NYwyMxAM893jVwZCY9Xjk3p3isPknMFxHZH+vqDOWpqSjdQMl+MjT4qzOGJkMESv6eI D2e3e2Du5OXwghwIQSah4yOFQ5quRxvsxIEc7Wsgt/AewAvHYBIkOa/abe3Oau3u/+eX RBsX3hhbXulCCVpwCOMkZMsS25bZU4MpWk+DIZCI3Co8CrE0dS8/abhRkBjCOG9lcY48 acbU5z43p2JpFvBG+giGZPwX21zVftVnrutsxG3bm8BftjMhuIc3k9rh7OVmLCPJgNU8 uuDg== X-Gm-Message-State: AC+VfDxq3+uMlGbBAjV+07ehkn1ick2FtrUNIhQjXvpr3To5eIExvDlw WW2VWDvY+RdHinB2gegMoSV6Km9i7sAtjvlbfA7WiAvM X-Received: by 2002:aa7:da90:0:b0:51b:de6f:2182 with SMTP id q16-20020aa7da90000000b0051bde6f2182mr2154343eds.8.1687370771092; Wed, 21 Jun 2023 11:06:11 -0700 (PDT) Received: from stoup.lan ([176.176.128.70]) by smtp.gmail.com with ESMTPSA id g9-20020aa7d1c9000000b0051495ce23absm2910944edp.10.2023.06.21.11.06.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 11:06:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 1/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr in gen_goto_tb Date: Wed, 21 Jun 2023 20:06:00 +0200 Message-Id: <20230621180607.1516336-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230621180607.1516336-1-richard.henderson@linaro.org> References: <20230621180607.1516336-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=richard.henderson@linaro.org; helo=mail-ed1-x52d.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 Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/sparc/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index bad2ec90a0..28d4cdb8b4 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -318,10 +318,10 @@ static void gen_goto_tb(DisasContext *s, int tb_num, tcg_gen_movi_tl(cpu_npc, npc); tcg_gen_exit_tb(s->base.tb, tb_num); } else { - /* jump to another page: currently not optimized */ + /* jump to another page: we can use an indirect jump */ tcg_gen_movi_tl(cpu_pc, pc); tcg_gen_movi_tl(cpu_npc, npc); - tcg_gen_exit_tb(NULL, 0); + tcg_gen_lookup_and_goto_ptr(); } } From patchwork Wed Jun 21 18:06:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 694772 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp996153wrm; Wed, 21 Jun 2023 11:07:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ655jVtutI7AxVj78C4qZD5jyV9wMEAJ4cgfco57zam6le3TdUpnBFML+F9MEoSEiAd774a X-Received: by 2002:a05:620a:6a18:b0:762:4268:a7bc with SMTP id uc24-20020a05620a6a1800b007624268a7bcmr11676322qkn.15.1687370837948; Wed, 21 Jun 2023 11:07:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687370837; cv=none; d=google.com; s=arc-20160816; b=EWr3RT1VoD/s0Wy17kZ5/ThAqLr4G3uMAWPOq7rm2RBGuBQm4pXmqEKB1Esk04OjlQ fyhoanE5wvzCxrvwo94lVJOoHF36drUlHyosIcUTXbup2Hrd14xC9plpo9KDYwrtqoTf 4YXbI12JDiZiNSYqlV3sPs+0Qo8AVzQAV/nSe0NRipD52PJzHEBu9zmSK7ULcUmnmsqW 94Bq+jspL7LK06y6Ts3dKSiUffGi9IThCvAxHXu88iQ0c8cp1df3eEFMPJQDt61Wibi8 0rydYr8c0eTXE/1WB0GBtk1DlcDLwDhBxraB66CITDC3NqfTyjQJYqmJZrgfMEM5ijGo 3iUQ== 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=AtiGMpM+dMDBs2toBdU5kukvz6RBLqrZkBucsSJ4j+Y=; b=ZxToZ2bICUijwBUpqy2WBP8f6F815hms9E+i/a9A54J/Nv2VHmrEAwXIeGmo+nhKiw ZF11R37n9iJwe89woibqG97xBa26TmxGCBMtSk0LXSZF6rixFBp1trDhgnCJ2jg03gFx 5nXUvSX8mPRX5bW0nGUPQjF3y0+HKZVJ0yJNOPzXq9K5EP4AIL7Hds3G3HDOTfyqZe7O MI8189MTq6QUyqYdgnI3VUrSm8WAThAbZhPBGqNSq/woxnDszGLBFaZjavBkSGluoLjA FRflXWGMhHJZq/rpQl7wbsN0i9uNKNyUyEjo0TEmU++QoA4qzm21xOxFdjtSiAwh3SMi SrxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F2HsNNFV; 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 qq4-20020a05620a38c400b0075d59dec7desi1965534qkn.456.2023.06.21.11.07.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Jun 2023 11:07:17 -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=F2HsNNFV; 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 1qC2Dl-0000IW-Pj; Wed, 21 Jun 2023 14:06:21 -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 1qC2Dg-0000FN-CV for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:16 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qC2Dd-0006xG-JF for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:16 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4f8735ac3e3so5235129e87.2 for ; Wed, 21 Jun 2023 11:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687370772; x=1689962772; 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=AtiGMpM+dMDBs2toBdU5kukvz6RBLqrZkBucsSJ4j+Y=; b=F2HsNNFVzCMB95nBQ/N2fIAqQelnze1+sYQwGPDcMg2D6m2rCeAwTJhtlu1wdruNSS NZ965BPwB4L9m8UsnP5Iuv09yN4WVZzDSp3OGpnnI2LixZqjg8zIGTprNkfUikl7Vaaf ukImBXPfiptiW7ifgrAICgmt6GfYo+7CL26K0y2MeT61icQJpr44HA8ccF6p8ySFHKVE DPC0JqG8h7gZIykaw1uEYNyXj/l/OHcwic2L/2JWarfWuo7hiJrFOXgs6C0tVFXaNqqo QGqM4wr3OXKGayH7MA2zgWdOuhNiaq8a+Eei8ujTaj34r2zBOqhD2GT+WLO+nWpMlNtU Xqag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687370772; x=1689962772; 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=AtiGMpM+dMDBs2toBdU5kukvz6RBLqrZkBucsSJ4j+Y=; b=GuxZTTRO0wqnqwpkT2IbwfS6gsJldNy3b7DkcyWMg539C2w8kXVzTBMzmxdpHtI2T/ 7iMyN7tW7GtBCTbuoJZCxxC5k2G2RMvh0FB4ty77CSWZ/Tk7ze0J/EIcKGvEg/apoLHr KzygDsJFnBWzW5+G+Y7OwjPaA82rVL1lPfBBXqsyYXA83FEhSl3PfDdFl3Sf+g+E8A3S N0riycLek/iYgTIi3pocc6YvjVI2xeI8/qJJM7ca8JHil9P7x8eDr2sLpcqEYSiOdHcb psC4BBciCNgGNdbbqLloBSWBTk/9H+KruA0FeXRz6dJNTGdPUdKGLmdIR6ilSUtz+WLS 1CQw== X-Gm-Message-State: AC+VfDwv4GEbiWARbvrZhyQ1zJ9U7nEcN55znw9ieN6zz1ujUfVHiO32 cRA1oN4JwPtVNeosIpLzcNrxftCiW3POyA0C19C6WPMF X-Received: by 2002:a19:4f46:0:b0:4f8:767d:9b98 with SMTP id a6-20020a194f46000000b004f8767d9b98mr4705691lfk.37.1687370771896; Wed, 21 Jun 2023 11:06:11 -0700 (PDT) Received: from stoup.lan ([176.176.128.70]) by smtp.gmail.com with ESMTPSA id g9-20020aa7d1c9000000b0051495ce23absm2910944edp.10.2023.06.21.11.06.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 11:06:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 2/8] target/sparc: Fix npc comparison in sparc_tr_insn_start Date: Wed, 21 Jun 2023 20:06:01 +0200 Message-Id: <20230621180607.1516336-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230621180607.1516336-1-richard.henderson@linaro.org> References: <20230621180607.1516336-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=richard.henderson@linaro.org; helo=mail-lf1-x12e.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 During translation, npc == address, DYNAMIC_PC, or JUMP_PC. It is only the encoding between here and sparc_restore_state_to_opc that considers JUMP_PC to be a bit within a larger value. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/sparc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 28d4cdb8b4..eec6f9ca67 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -5594,7 +5594,7 @@ static void sparc_tr_insn_start(DisasContextBase *dcbase, CPUState *cs) { DisasContext *dc = container_of(dcbase, DisasContext, base); - if (dc->npc & JUMP_PC) { + if (dc->npc == JUMP_PC) { assert(dc->jump_pc[1] == dc->pc + 4); tcg_gen_insn_start(dc->pc, dc->jump_pc[0] | JUMP_PC); } else { From patchwork Wed Jun 21 18:06: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: 694777 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp996554wrm; Wed, 21 Jun 2023 11:08:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4XigjfVIgtMN+MHnj2+jUoSKHiH3v+kmH/uOMHIr9ld6yR3FqeyoitL9qywZab3/Xg+r0t X-Received: by 2002:a05:620a:7e7:b0:762:883a:f5ac with SMTP id k7-20020a05620a07e700b00762883af5acmr9742778qkk.54.1687370879936; Wed, 21 Jun 2023 11:07:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687370879; cv=none; d=google.com; s=arc-20160816; b=Q/7z/A/5X6h2ojB61UUSwQMXA4csRV/JSXYF+s2e5pRjZx1q4vRaVvywyGgGahg7rx 2EpEb1j4a5daQpJDA2ueKQ1C0lT0j9WO1V56ticdBf86Gp4otj8Z/g3sZOuR/jmbZSjy vZhovithAagmbbzUdTFWAoITield+Qs091m1ldsyQ+Ww+L+CgtPt2l6j2weNOktul/eH 1XTwLxMvYwB20EdcfqIx45M2JdCKSc+HE2O+s4bqXQdFg/pDfj9sRbzdLA937MMJUDcy zDx1WdAbhuIuga9AVFKQliO5ZjHmjlmAJMHkk89jjyOEIyUPUO/fs8cuZmLZCTTbxBui UaKg== 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=1tNwPNes+M/wcgcgs8Vjxmu9VasCs9HzRxyrqcVP1xU=; b=qe1SXm7EC/TgSWWtbqTf51BdL3VN/B1EwIO8ijMPksg4Sq/mSawJQcEFzKfApmUDiE 1zJm7vnhvldDYeZNngmVx7nFyWTi07Vi3PpMGydVjJSCUw3ihu8CXqila64iZxcMSBhL /6gLlmWGDbBSuiAXvdEgK3sp8tSWweA+Rb09PD1Myx33V1x7yEAelpUWwIq+R8KwS8IP waq1vDdku5R8lCruQrzPTDks5cA+XGbu406RN6Z6jVZohdf9CPNo/VCXsxUUUJ7/9xwH Zxn/2MUDGMsGnwcxnRdkcAnxt3B1MtWYYHp2vmgLecvdIGzrIp5ybjLAOuSVxk09fQ/Q djBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="iNauOgP/"; 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 j9-20020a05620a0a4900b0075776da0eedsi1886522qka.388.2023.06.21.11.07.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Jun 2023 11:07:59 -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="iNauOgP/"; 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 1qC2Dk-0000HW-EH; Wed, 21 Jun 2023 14:06:20 -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 1qC2Di-0000GF-85 for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:18 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qC2De-00070k-Jt for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:17 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-5149aafef44so7375621a12.0 for ; Wed, 21 Jun 2023 11:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687370773; x=1689962773; 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=1tNwPNes+M/wcgcgs8Vjxmu9VasCs9HzRxyrqcVP1xU=; b=iNauOgP/qEpNmwYOc8omQrSdhMENq+ZhKntBDOUGRcPmKIiz1NPHpKEQ+kUWT9xmmM NoXHcv2RNvGovH9M1ILeTOL4HOuLZJ8lEZ8UBachCFBm8bIn5l/Gw70NBfdCF2AHWsbk qqHNi2ESaTt+3Ha0HUjUGVORZvvtcLoww3NWkjyVaPLk7m13CWLvCeQgsc1b3yhDDDYO RJF4pGhMseZVus6mjuxerE104o5cP3xmg5VsL4NhxM2fBDDl+7GgHZwEVymNlZvSoS/6 8IFcPGQrHXboa2gz/5+GD6257Hql4tvAG/brXUl5F4O1R6RzkkYOiav/T9tXd7f85q3n +WQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687370773; x=1689962773; 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=1tNwPNes+M/wcgcgs8Vjxmu9VasCs9HzRxyrqcVP1xU=; b=kLjjV7WoSD0QoofzYBsLQNoH5jGLqF2vmXUxf+YIA7k74i0XofkjjC+CHYS1NPNYmF z4omK7omlti5oo2VQYLADDnLDC8ZXmFcZiIryV6c6CUhAOQwpl4mWCsvyi31TmkvwTY2 V7fnVcoDEt7asvSZH+hMIVabWbduwFJp1mw+nooIfZMrtNwHqM3l0i2wvnQemguEpDSM OrBDJP4fRtJobNeukpw0ZXUEfQvnWgB4f2Zv02wHkA1g3yh4SagPmME9iZWbCBrz4pf7 JB9ObQaA58kcRg8OucuJ8W9BzIjn4vZMnF5iWH1gys+/eulYXL0S2+0Bq7mbZfnuVNTW 7V0w== X-Gm-Message-State: AC+VfDywyqKwEJT69196vC+XeP0vGbryc94nuhIEk++WO71TMLWOmqeE E3exbJKon0xR9Hff3aKrhegSKawIUUDo8azDM+5MNm/z X-Received: by 2002:a05:6402:782:b0:51a:2d2c:75ee with SMTP id d2-20020a056402078200b0051a2d2c75eemr10007313edy.25.1687370773114; Wed, 21 Jun 2023 11:06:13 -0700 (PDT) Received: from stoup.lan ([176.176.128.70]) by smtp.gmail.com with ESMTPSA id g9-20020aa7d1c9000000b0051495ce23absm2910944edp.10.2023.06.21.11.06.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 11:06:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 3/8] target/sparc: Drop inline markers from translate.c Date: Wed, 21 Jun 2023 20:06:02 +0200 Message-Id: <20230621180607.1516336-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230621180607.1516336-1-richard.henderson@linaro.org> References: <20230621180607.1516336-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=richard.henderson@linaro.org; helo=mail-ed1-x534.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 Let the compiler decide about inlining. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/sparc/translate.c | 237 ++++++++++++++++++--------------------- 1 file changed, 111 insertions(+), 126 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index eec6f9ca67..1312c3e94d 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -125,7 +125,7 @@ static int sign_extend(int x, int len) #define IS_IMM (insn & (1<<13)) -static inline void gen_update_fprs_dirty(DisasContext *dc, int rd) +static void gen_update_fprs_dirty(DisasContext *dc, int rd) { #if defined(TARGET_SPARC64) int bit = (rd < 32) ? 1 : 2; @@ -264,7 +264,7 @@ static void gen_move_Q(DisasContext *dc, unsigned int rd, unsigned int rs) #endif #endif -static inline void gen_address_mask(DisasContext *dc, TCGv addr) +static void gen_address_mask(DisasContext *dc, TCGv addr) { #ifdef TARGET_SPARC64 if (AM_CHECK(dc)) @@ -272,7 +272,7 @@ static inline void gen_address_mask(DisasContext *dc, TCGv addr) #endif } -static inline TCGv gen_load_gpr(DisasContext *dc, int reg) +static TCGv gen_load_gpr(DisasContext *dc, int reg) { if (reg > 0) { assert(reg < 32); @@ -284,7 +284,7 @@ static inline TCGv gen_load_gpr(DisasContext *dc, int reg) } } -static inline void gen_store_gpr(DisasContext *dc, int reg, TCGv v) +static void gen_store_gpr(DisasContext *dc, int reg, TCGv v) { if (reg > 0) { assert(reg < 32); @@ -292,7 +292,7 @@ static inline void gen_store_gpr(DisasContext *dc, int reg, TCGv v) } } -static inline TCGv gen_dest_gpr(DisasContext *dc, int reg) +static TCGv gen_dest_gpr(DisasContext *dc, int reg) { if (reg > 0) { assert(reg < 32); @@ -326,31 +326,31 @@ static void gen_goto_tb(DisasContext *s, int tb_num, } // XXX suboptimal -static inline void gen_mov_reg_N(TCGv reg, TCGv_i32 src) +static void gen_mov_reg_N(TCGv reg, TCGv_i32 src) { tcg_gen_extu_i32_tl(reg, src); tcg_gen_extract_tl(reg, reg, PSR_NEG_SHIFT, 1); } -static inline void gen_mov_reg_Z(TCGv reg, TCGv_i32 src) +static void gen_mov_reg_Z(TCGv reg, TCGv_i32 src) { tcg_gen_extu_i32_tl(reg, src); tcg_gen_extract_tl(reg, reg, PSR_ZERO_SHIFT, 1); } -static inline void gen_mov_reg_V(TCGv reg, TCGv_i32 src) +static void gen_mov_reg_V(TCGv reg, TCGv_i32 src) { tcg_gen_extu_i32_tl(reg, src); tcg_gen_extract_tl(reg, reg, PSR_OVF_SHIFT, 1); } -static inline void gen_mov_reg_C(TCGv reg, TCGv_i32 src) +static void gen_mov_reg_C(TCGv reg, TCGv_i32 src) { tcg_gen_extu_i32_tl(reg, src); tcg_gen_extract_tl(reg, reg, PSR_CARRY_SHIFT, 1); } -static inline void gen_op_add_cc(TCGv dst, TCGv src1, TCGv src2) +static void gen_op_add_cc(TCGv dst, TCGv src1, TCGv src2) { tcg_gen_mov_tl(cpu_cc_src, src1); tcg_gen_mov_tl(cpu_cc_src2, src2); @@ -465,7 +465,7 @@ static void gen_op_addx_int(DisasContext *dc, TCGv dst, TCGv src1, } } -static inline void gen_op_sub_cc(TCGv dst, TCGv src1, TCGv src2) +static void gen_op_sub_cc(TCGv dst, TCGv src1, TCGv src2) { tcg_gen_mov_tl(cpu_cc_src, src1); tcg_gen_mov_tl(cpu_cc_src2, src2); @@ -538,7 +538,7 @@ static void gen_op_subx_int(DisasContext *dc, TCGv dst, TCGv src1, } } -static inline void gen_op_mulscc(TCGv dst, TCGv src1, TCGv src2) +static void gen_op_mulscc(TCGv dst, TCGv src1, TCGv src2) { TCGv r_temp, zero, t0; @@ -577,7 +577,7 @@ static inline void gen_op_mulscc(TCGv dst, TCGv src1, TCGv src2) tcg_gen_mov_tl(dst, cpu_cc_dst); } -static inline void gen_op_multiply(TCGv dst, TCGv src1, TCGv src2, int sign_ext) +static void gen_op_multiply(TCGv dst, TCGv src1, TCGv src2, int sign_ext) { #if TARGET_LONG_BITS == 32 if (sign_ext) { @@ -602,32 +602,32 @@ static inline void gen_op_multiply(TCGv dst, TCGv src1, TCGv src2, int sign_ext) #endif } -static inline void gen_op_umul(TCGv dst, TCGv src1, TCGv src2) +static void gen_op_umul(TCGv dst, TCGv src1, TCGv src2) { /* zero-extend truncated operands before multiplication */ gen_op_multiply(dst, src1, src2, 0); } -static inline void gen_op_smul(TCGv dst, TCGv src1, TCGv src2) +static void gen_op_smul(TCGv dst, TCGv src1, TCGv src2) { /* sign-extend truncated operands before multiplication */ gen_op_multiply(dst, src1, src2, 1); } // 1 -static inline void gen_op_eval_ba(TCGv dst) +static void gen_op_eval_ba(TCGv dst) { tcg_gen_movi_tl(dst, 1); } // Z -static inline void gen_op_eval_be(TCGv dst, TCGv_i32 src) +static void gen_op_eval_be(TCGv dst, TCGv_i32 src) { gen_mov_reg_Z(dst, src); } // Z | (N ^ V) -static inline void gen_op_eval_ble(TCGv dst, TCGv_i32 src) +static void gen_op_eval_ble(TCGv dst, TCGv_i32 src) { TCGv t0 = tcg_temp_new(); gen_mov_reg_N(t0, src); @@ -638,7 +638,7 @@ static inline void gen_op_eval_ble(TCGv dst, TCGv_i32 src) } // N ^ V -static inline void gen_op_eval_bl(TCGv dst, TCGv_i32 src) +static void gen_op_eval_bl(TCGv dst, TCGv_i32 src) { TCGv t0 = tcg_temp_new(); gen_mov_reg_V(t0, src); @@ -647,7 +647,7 @@ static inline void gen_op_eval_bl(TCGv dst, TCGv_i32 src) } // C | Z -static inline void gen_op_eval_bleu(TCGv dst, TCGv_i32 src) +static void gen_op_eval_bleu(TCGv dst, TCGv_i32 src) { TCGv t0 = tcg_temp_new(); gen_mov_reg_Z(t0, src); @@ -656,73 +656,73 @@ static inline void gen_op_eval_bleu(TCGv dst, TCGv_i32 src) } // C -static inline void gen_op_eval_bcs(TCGv dst, TCGv_i32 src) +static void gen_op_eval_bcs(TCGv dst, TCGv_i32 src) { gen_mov_reg_C(dst, src); } // V -static inline void gen_op_eval_bvs(TCGv dst, TCGv_i32 src) +static void gen_op_eval_bvs(TCGv dst, TCGv_i32 src) { gen_mov_reg_V(dst, src); } // 0 -static inline void gen_op_eval_bn(TCGv dst) +static void gen_op_eval_bn(TCGv dst) { tcg_gen_movi_tl(dst, 0); } // N -static inline void gen_op_eval_bneg(TCGv dst, TCGv_i32 src) +static void gen_op_eval_bneg(TCGv dst, TCGv_i32 src) { gen_mov_reg_N(dst, src); } // !Z -static inline void gen_op_eval_bne(TCGv dst, TCGv_i32 src) +static void gen_op_eval_bne(TCGv dst, TCGv_i32 src) { gen_mov_reg_Z(dst, src); tcg_gen_xori_tl(dst, dst, 0x1); } // !(Z | (N ^ V)) -static inline void gen_op_eval_bg(TCGv dst, TCGv_i32 src) +static void gen_op_eval_bg(TCGv dst, TCGv_i32 src) { gen_op_eval_ble(dst, src); tcg_gen_xori_tl(dst, dst, 0x1); } // !(N ^ V) -static inline void gen_op_eval_bge(TCGv dst, TCGv_i32 src) +static void gen_op_eval_bge(TCGv dst, TCGv_i32 src) { gen_op_eval_bl(dst, src); tcg_gen_xori_tl(dst, dst, 0x1); } // !(C | Z) -static inline void gen_op_eval_bgu(TCGv dst, TCGv_i32 src) +static void gen_op_eval_bgu(TCGv dst, TCGv_i32 src) { gen_op_eval_bleu(dst, src); tcg_gen_xori_tl(dst, dst, 0x1); } // !C -static inline void gen_op_eval_bcc(TCGv dst, TCGv_i32 src) +static void gen_op_eval_bcc(TCGv dst, TCGv_i32 src) { gen_mov_reg_C(dst, src); tcg_gen_xori_tl(dst, dst, 0x1); } // !N -static inline void gen_op_eval_bpos(TCGv dst, TCGv_i32 src) +static void gen_op_eval_bpos(TCGv dst, TCGv_i32 src) { gen_mov_reg_N(dst, src); tcg_gen_xori_tl(dst, dst, 0x1); } // !V -static inline void gen_op_eval_bvc(TCGv dst, TCGv_i32 src) +static void gen_op_eval_bvc(TCGv dst, TCGv_i32 src) { gen_mov_reg_V(dst, src); tcg_gen_xori_tl(dst, dst, 0x1); @@ -735,23 +735,21 @@ static inline void gen_op_eval_bvc(TCGv dst, TCGv_i32 src) 2 > 3 unordered */ -static inline void gen_mov_reg_FCC0(TCGv reg, TCGv src, +static void gen_mov_reg_FCC0(TCGv reg, TCGv src, unsigned int fcc_offset) { tcg_gen_shri_tl(reg, src, FSR_FCC0_SHIFT + fcc_offset); tcg_gen_andi_tl(reg, reg, 0x1); } -static inline void gen_mov_reg_FCC1(TCGv reg, TCGv src, - unsigned int fcc_offset) +static void gen_mov_reg_FCC1(TCGv reg, TCGv src, unsigned int fcc_offset) { tcg_gen_shri_tl(reg, src, FSR_FCC1_SHIFT + fcc_offset); tcg_gen_andi_tl(reg, reg, 0x1); } // !0: FCC0 | FCC1 -static inline void gen_op_eval_fbne(TCGv dst, TCGv src, - unsigned int fcc_offset) +static void gen_op_eval_fbne(TCGv dst, TCGv src, unsigned int fcc_offset) { TCGv t0 = tcg_temp_new(); gen_mov_reg_FCC0(dst, src, fcc_offset); @@ -760,8 +758,7 @@ static inline void gen_op_eval_fbne(TCGv dst, TCGv src, } // 1 or 2: FCC0 ^ FCC1 -static inline void gen_op_eval_fblg(TCGv dst, TCGv src, - unsigned int fcc_offset) +static void gen_op_eval_fblg(TCGv dst, TCGv src, unsigned int fcc_offset) { TCGv t0 = tcg_temp_new(); gen_mov_reg_FCC0(dst, src, fcc_offset); @@ -770,15 +767,13 @@ static inline void gen_op_eval_fblg(TCGv dst, TCGv src, } // 1 or 3: FCC0 -static inline void gen_op_eval_fbul(TCGv dst, TCGv src, - unsigned int fcc_offset) +static void gen_op_eval_fbul(TCGv dst, TCGv src, unsigned int fcc_offset) { gen_mov_reg_FCC0(dst, src, fcc_offset); } // 1: FCC0 & !FCC1 -static inline void gen_op_eval_fbl(TCGv dst, TCGv src, - unsigned int fcc_offset) +static void gen_op_eval_fbl(TCGv dst, TCGv src, unsigned int fcc_offset) { TCGv t0 = tcg_temp_new(); gen_mov_reg_FCC0(dst, src, fcc_offset); @@ -787,15 +782,13 @@ static inline void gen_op_eval_fbl(TCGv dst, TCGv src, } // 2 or 3: FCC1 -static inline void gen_op_eval_fbug(TCGv dst, TCGv src, - unsigned int fcc_offset) +static void gen_op_eval_fbug(TCGv dst, TCGv src, unsigned int fcc_offset) { gen_mov_reg_FCC1(dst, src, fcc_offset); } // 2: !FCC0 & FCC1 -static inline void gen_op_eval_fbg(TCGv dst, TCGv src, - unsigned int fcc_offset) +static void gen_op_eval_fbg(TCGv dst, TCGv src, unsigned int fcc_offset) { TCGv t0 = tcg_temp_new(); gen_mov_reg_FCC0(dst, src, fcc_offset); @@ -804,8 +797,7 @@ static inline void gen_op_eval_fbg(TCGv dst, TCGv src, } // 3: FCC0 & FCC1 -static inline void gen_op_eval_fbu(TCGv dst, TCGv src, - unsigned int fcc_offset) +static void gen_op_eval_fbu(TCGv dst, TCGv src, unsigned int fcc_offset) { TCGv t0 = tcg_temp_new(); gen_mov_reg_FCC0(dst, src, fcc_offset); @@ -814,8 +806,7 @@ static inline void gen_op_eval_fbu(TCGv dst, TCGv src, } // 0: !(FCC0 | FCC1) -static inline void gen_op_eval_fbe(TCGv dst, TCGv src, - unsigned int fcc_offset) +static void gen_op_eval_fbe(TCGv dst, TCGv src, unsigned int fcc_offset) { TCGv t0 = tcg_temp_new(); gen_mov_reg_FCC0(dst, src, fcc_offset); @@ -825,8 +816,7 @@ static inline void gen_op_eval_fbe(TCGv dst, TCGv src, } // 0 or 3: !(FCC0 ^ FCC1) -static inline void gen_op_eval_fbue(TCGv dst, TCGv src, - unsigned int fcc_offset) +static void gen_op_eval_fbue(TCGv dst, TCGv src, unsigned int fcc_offset) { TCGv t0 = tcg_temp_new(); gen_mov_reg_FCC0(dst, src, fcc_offset); @@ -836,16 +826,14 @@ static inline void gen_op_eval_fbue(TCGv dst, TCGv src, } // 0 or 2: !FCC0 -static inline void gen_op_eval_fbge(TCGv dst, TCGv src, - unsigned int fcc_offset) +static void gen_op_eval_fbge(TCGv dst, TCGv src, unsigned int fcc_offset) { gen_mov_reg_FCC0(dst, src, fcc_offset); tcg_gen_xori_tl(dst, dst, 0x1); } // !1: !(FCC0 & !FCC1) -static inline void gen_op_eval_fbuge(TCGv dst, TCGv src, - unsigned int fcc_offset) +static void gen_op_eval_fbuge(TCGv dst, TCGv src, unsigned int fcc_offset) { TCGv t0 = tcg_temp_new(); gen_mov_reg_FCC0(dst, src, fcc_offset); @@ -855,16 +843,14 @@ static inline void gen_op_eval_fbuge(TCGv dst, TCGv src, } // 0 or 1: !FCC1 -static inline void gen_op_eval_fble(TCGv dst, TCGv src, - unsigned int fcc_offset) +static void gen_op_eval_fble(TCGv dst, TCGv src, unsigned int fcc_offset) { gen_mov_reg_FCC1(dst, src, fcc_offset); tcg_gen_xori_tl(dst, dst, 0x1); } // !2: !(!FCC0 & FCC1) -static inline void gen_op_eval_fbule(TCGv dst, TCGv src, - unsigned int fcc_offset) +static void gen_op_eval_fbule(TCGv dst, TCGv src, unsigned int fcc_offset) { TCGv t0 = tcg_temp_new(); gen_mov_reg_FCC0(dst, src, fcc_offset); @@ -874,8 +860,7 @@ static inline void gen_op_eval_fbule(TCGv dst, TCGv src, } // !3: !(FCC0 & FCC1) -static inline void gen_op_eval_fbo(TCGv dst, TCGv src, - unsigned int fcc_offset) +static void gen_op_eval_fbo(TCGv dst, TCGv src, unsigned int fcc_offset) { TCGv t0 = tcg_temp_new(); gen_mov_reg_FCC0(dst, src, fcc_offset); @@ -884,8 +869,8 @@ static inline void gen_op_eval_fbo(TCGv dst, TCGv src, tcg_gen_xori_tl(dst, dst, 0x1); } -static inline void gen_branch2(DisasContext *dc, target_ulong pc1, - target_ulong pc2, TCGv r_cond) +static void gen_branch2(DisasContext *dc, target_ulong pc1, + target_ulong pc2, TCGv r_cond) { TCGLabel *l1 = gen_new_label(); @@ -935,7 +920,7 @@ static void gen_branch_n(DisasContext *dc, target_ulong pc1) } } -static inline void gen_generic_branch(DisasContext *dc) +static void gen_generic_branch(DisasContext *dc) { TCGv npc0 = tcg_constant_tl(dc->jump_pc[0]); TCGv npc1 = tcg_constant_tl(dc->jump_pc[1]); @@ -946,7 +931,7 @@ static inline void gen_generic_branch(DisasContext *dc) /* call this function before using the condition register as it may have been set for a jump */ -static inline void flush_cond(DisasContext *dc) +static void flush_cond(DisasContext *dc) { if (dc->npc == JUMP_PC) { gen_generic_branch(dc); @@ -954,7 +939,7 @@ static inline void flush_cond(DisasContext *dc) } } -static inline void save_npc(DisasContext *dc) +static void save_npc(DisasContext *dc) { if (dc->npc == JUMP_PC) { gen_generic_branch(dc); @@ -964,7 +949,7 @@ static inline void save_npc(DisasContext *dc) } } -static inline void update_psr(DisasContext *dc) +static void update_psr(DisasContext *dc) { if (dc->cc_op != CC_OP_FLAGS) { dc->cc_op = CC_OP_FLAGS; @@ -972,7 +957,7 @@ static inline void update_psr(DisasContext *dc) } } -static inline void save_state(DisasContext *dc) +static void save_state(DisasContext *dc) { tcg_gen_movi_tl(cpu_pc, dc->pc); save_npc(dc); @@ -990,7 +975,7 @@ static void gen_check_align(TCGv addr, int mask) gen_helper_check_align(cpu_env, addr, tcg_constant_i32(mask)); } -static inline void gen_mov_pc_npc(DisasContext *dc) +static void gen_mov_pc_npc(DisasContext *dc) { if (dc->npc == JUMP_PC) { gen_generic_branch(dc); @@ -1004,7 +989,7 @@ static inline void gen_mov_pc_npc(DisasContext *dc) } } -static inline void gen_op_next_insn(void) +static void gen_op_next_insn(void) { tcg_gen_mov_tl(cpu_pc, cpu_npc); tcg_gen_addi_tl(cpu_npc, cpu_npc, 4); @@ -1305,7 +1290,7 @@ static void gen_compare_reg(DisasCompare *cmp, int cond, TCGv r_src) cmp->c2 = tcg_constant_tl(0); } -static inline void gen_cond_reg(TCGv r_dst, int cond, TCGv r_src) +static void gen_cond_reg(TCGv r_dst, int cond, TCGv r_src) { DisasCompare cmp; gen_compare_reg(&cmp, cond, r_src); @@ -1414,7 +1399,7 @@ static void do_branch_reg(DisasContext *dc, int32_t offset, uint32_t insn, } } -static inline void gen_op_fcmps(int fccno, TCGv_i32 r_rs1, TCGv_i32 r_rs2) +static void gen_op_fcmps(int fccno, TCGv_i32 r_rs1, TCGv_i32 r_rs2) { switch (fccno) { case 0: @@ -1432,7 +1417,7 @@ static inline void gen_op_fcmps(int fccno, TCGv_i32 r_rs1, TCGv_i32 r_rs2) } } -static inline void gen_op_fcmpd(int fccno, TCGv_i64 r_rs1, TCGv_i64 r_rs2) +static void gen_op_fcmpd(int fccno, TCGv_i64 r_rs1, TCGv_i64 r_rs2) { switch (fccno) { case 0: @@ -1450,7 +1435,7 @@ static inline void gen_op_fcmpd(int fccno, TCGv_i64 r_rs1, TCGv_i64 r_rs2) } } -static inline void gen_op_fcmpq(int fccno) +static void gen_op_fcmpq(int fccno) { switch (fccno) { case 0: @@ -1468,7 +1453,7 @@ static inline void gen_op_fcmpq(int fccno) } } -static inline void gen_op_fcmpes(int fccno, TCGv_i32 r_rs1, TCGv_i32 r_rs2) +static void gen_op_fcmpes(int fccno, TCGv_i32 r_rs1, TCGv_i32 r_rs2) { switch (fccno) { case 0: @@ -1486,7 +1471,7 @@ static inline void gen_op_fcmpes(int fccno, TCGv_i32 r_rs1, TCGv_i32 r_rs2) } } -static inline void gen_op_fcmped(int fccno, TCGv_i64 r_rs1, TCGv_i64 r_rs2) +static void gen_op_fcmped(int fccno, TCGv_i64 r_rs1, TCGv_i64 r_rs2) { switch (fccno) { case 0: @@ -1504,7 +1489,7 @@ static inline void gen_op_fcmped(int fccno, TCGv_i64 r_rs1, TCGv_i64 r_rs2) } } -static inline void gen_op_fcmpeq(int fccno) +static void gen_op_fcmpeq(int fccno) { switch (fccno) { case 0: @@ -1524,32 +1509,32 @@ static inline void gen_op_fcmpeq(int fccno) #else -static inline void gen_op_fcmps(int fccno, TCGv r_rs1, TCGv r_rs2) +static void gen_op_fcmps(int fccno, TCGv r_rs1, TCGv r_rs2) { gen_helper_fcmps(cpu_fsr, cpu_env, r_rs1, r_rs2); } -static inline void gen_op_fcmpd(int fccno, TCGv_i64 r_rs1, TCGv_i64 r_rs2) +static void gen_op_fcmpd(int fccno, TCGv_i64 r_rs1, TCGv_i64 r_rs2) { gen_helper_fcmpd(cpu_fsr, cpu_env, r_rs1, r_rs2); } -static inline void gen_op_fcmpq(int fccno) +static void gen_op_fcmpq(int fccno) { gen_helper_fcmpq(cpu_fsr, cpu_env); } -static inline void gen_op_fcmpes(int fccno, TCGv r_rs1, TCGv r_rs2) +static void gen_op_fcmpes(int fccno, TCGv r_rs1, TCGv r_rs2) { gen_helper_fcmpes(cpu_fsr, cpu_env, r_rs1, r_rs2); } -static inline void gen_op_fcmped(int fccno, TCGv_i64 r_rs1, TCGv_i64 r_rs2) +static void gen_op_fcmped(int fccno, TCGv_i64 r_rs1, TCGv_i64 r_rs2) { gen_helper_fcmped(cpu_fsr, cpu_env, r_rs1, r_rs2); } -static inline void gen_op_fcmpeq(int fccno) +static void gen_op_fcmpeq(int fccno) { gen_helper_fcmpeq(cpu_fsr, cpu_env); } @@ -1573,12 +1558,12 @@ static int gen_trap_ifnofpu(DisasContext *dc) return 0; } -static inline void gen_op_clear_ieee_excp_and_FTT(void) +static void gen_op_clear_ieee_excp_and_FTT(void) { tcg_gen_andi_tl(cpu_fsr, cpu_fsr, FSR_FTT_CEXC_NMASK); } -static inline void gen_fop_FF(DisasContext *dc, int rd, int rs, +static void gen_fop_FF(DisasContext *dc, int rd, int rs, void (*gen)(TCGv_i32, TCGv_ptr, TCGv_i32)) { TCGv_i32 dst, src; @@ -1592,8 +1577,8 @@ static inline void gen_fop_FF(DisasContext *dc, int rd, int rs, gen_store_fpr_F(dc, rd, dst); } -static inline void gen_ne_fop_FF(DisasContext *dc, int rd, int rs, - void (*gen)(TCGv_i32, TCGv_i32)) +static void gen_ne_fop_FF(DisasContext *dc, int rd, int rs, + void (*gen)(TCGv_i32, TCGv_i32)) { TCGv_i32 dst, src; @@ -1605,7 +1590,7 @@ static inline void gen_ne_fop_FF(DisasContext *dc, int rd, int rs, gen_store_fpr_F(dc, rd, dst); } -static inline void gen_fop_FFF(DisasContext *dc, int rd, int rs1, int rs2, +static void gen_fop_FFF(DisasContext *dc, int rd, int rs1, int rs2, void (*gen)(TCGv_i32, TCGv_ptr, TCGv_i32, TCGv_i32)) { TCGv_i32 dst, src1, src2; @@ -1621,8 +1606,8 @@ static inline void gen_fop_FFF(DisasContext *dc, int rd, int rs1, int rs2, } #ifdef TARGET_SPARC64 -static inline void gen_ne_fop_FFF(DisasContext *dc, int rd, int rs1, int rs2, - void (*gen)(TCGv_i32, TCGv_i32, TCGv_i32)) +static void gen_ne_fop_FFF(DisasContext *dc, int rd, int rs1, int rs2, + void (*gen)(TCGv_i32, TCGv_i32, TCGv_i32)) { TCGv_i32 dst, src1, src2; @@ -1636,8 +1621,8 @@ static inline void gen_ne_fop_FFF(DisasContext *dc, int rd, int rs1, int rs2, } #endif -static inline void gen_fop_DD(DisasContext *dc, int rd, int rs, - void (*gen)(TCGv_i64, TCGv_ptr, TCGv_i64)) +static void gen_fop_DD(DisasContext *dc, int rd, int rs, + void (*gen)(TCGv_i64, TCGv_ptr, TCGv_i64)) { TCGv_i64 dst, src; @@ -1651,8 +1636,8 @@ static inline void gen_fop_DD(DisasContext *dc, int rd, int rs, } #ifdef TARGET_SPARC64 -static inline void gen_ne_fop_DD(DisasContext *dc, int rd, int rs, - void (*gen)(TCGv_i64, TCGv_i64)) +static void gen_ne_fop_DD(DisasContext *dc, int rd, int rs, + void (*gen)(TCGv_i64, TCGv_i64)) { TCGv_i64 dst, src; @@ -1665,7 +1650,7 @@ static inline void gen_ne_fop_DD(DisasContext *dc, int rd, int rs, } #endif -static inline void gen_fop_DDD(DisasContext *dc, int rd, int rs1, int rs2, +static void gen_fop_DDD(DisasContext *dc, int rd, int rs1, int rs2, void (*gen)(TCGv_i64, TCGv_ptr, TCGv_i64, TCGv_i64)) { TCGv_i64 dst, src1, src2; @@ -1681,8 +1666,8 @@ static inline void gen_fop_DDD(DisasContext *dc, int rd, int rs1, int rs2, } #ifdef TARGET_SPARC64 -static inline void gen_ne_fop_DDD(DisasContext *dc, int rd, int rs1, int rs2, - void (*gen)(TCGv_i64, TCGv_i64, TCGv_i64)) +static void gen_ne_fop_DDD(DisasContext *dc, int rd, int rs1, int rs2, + void (*gen)(TCGv_i64, TCGv_i64, TCGv_i64)) { TCGv_i64 dst, src1, src2; @@ -1695,8 +1680,8 @@ static inline void gen_ne_fop_DDD(DisasContext *dc, int rd, int rs1, int rs2, gen_store_fpr_D(dc, rd, dst); } -static inline void gen_gsr_fop_DDD(DisasContext *dc, int rd, int rs1, int rs2, - void (*gen)(TCGv_i64, TCGv_i64, TCGv_i64, TCGv_i64)) +static void gen_gsr_fop_DDD(DisasContext *dc, int rd, int rs1, int rs2, + void (*gen)(TCGv_i64, TCGv_i64, TCGv_i64, TCGv_i64)) { TCGv_i64 dst, src1, src2; @@ -1709,8 +1694,8 @@ static inline void gen_gsr_fop_DDD(DisasContext *dc, int rd, int rs1, int rs2, gen_store_fpr_D(dc, rd, dst); } -static inline void gen_ne_fop_DDDD(DisasContext *dc, int rd, int rs1, int rs2, - void (*gen)(TCGv_i64, TCGv_i64, TCGv_i64, TCGv_i64)) +static void gen_ne_fop_DDDD(DisasContext *dc, int rd, int rs1, int rs2, + void (*gen)(TCGv_i64, TCGv_i64, TCGv_i64, TCGv_i64)) { TCGv_i64 dst, src0, src1, src2; @@ -1725,8 +1710,8 @@ static inline void gen_ne_fop_DDDD(DisasContext *dc, int rd, int rs1, int rs2, } #endif -static inline void gen_fop_QQ(DisasContext *dc, int rd, int rs, - void (*gen)(TCGv_ptr)) +static void gen_fop_QQ(DisasContext *dc, int rd, int rs, + void (*gen)(TCGv_ptr)) { gen_op_load_fpr_QT1(QFPREG(rs)); @@ -1738,8 +1723,8 @@ static inline void gen_fop_QQ(DisasContext *dc, int rd, int rs, } #ifdef TARGET_SPARC64 -static inline void gen_ne_fop_QQ(DisasContext *dc, int rd, int rs, - void (*gen)(TCGv_ptr)) +static void gen_ne_fop_QQ(DisasContext *dc, int rd, int rs, + void (*gen)(TCGv_ptr)) { gen_op_load_fpr_QT1(QFPREG(rs)); @@ -1750,8 +1735,8 @@ static inline void gen_ne_fop_QQ(DisasContext *dc, int rd, int rs, } #endif -static inline void gen_fop_QQQ(DisasContext *dc, int rd, int rs1, int rs2, - void (*gen)(TCGv_ptr)) +static void gen_fop_QQQ(DisasContext *dc, int rd, int rs1, int rs2, + void (*gen)(TCGv_ptr)) { gen_op_load_fpr_QT0(QFPREG(rs1)); gen_op_load_fpr_QT1(QFPREG(rs2)); @@ -1763,7 +1748,7 @@ static inline void gen_fop_QQQ(DisasContext *dc, int rd, int rs1, int rs2, gen_update_fprs_dirty(dc, QFPREG(rd)); } -static inline void gen_fop_DFF(DisasContext *dc, int rd, int rs1, int rs2, +static void gen_fop_DFF(DisasContext *dc, int rd, int rs1, int rs2, void (*gen)(TCGv_i64, TCGv_ptr, TCGv_i32, TCGv_i32)) { TCGv_i64 dst; @@ -1779,8 +1764,8 @@ static inline void gen_fop_DFF(DisasContext *dc, int rd, int rs1, int rs2, gen_store_fpr_D(dc, rd, dst); } -static inline void gen_fop_QDD(DisasContext *dc, int rd, int rs1, int rs2, - void (*gen)(TCGv_ptr, TCGv_i64, TCGv_i64)) +static void gen_fop_QDD(DisasContext *dc, int rd, int rs1, int rs2, + void (*gen)(TCGv_ptr, TCGv_i64, TCGv_i64)) { TCGv_i64 src1, src2; @@ -1795,8 +1780,8 @@ static inline void gen_fop_QDD(DisasContext *dc, int rd, int rs1, int rs2, } #ifdef TARGET_SPARC64 -static inline void gen_fop_DF(DisasContext *dc, int rd, int rs, - void (*gen)(TCGv_i64, TCGv_ptr, TCGv_i32)) +static void gen_fop_DF(DisasContext *dc, int rd, int rs, + void (*gen)(TCGv_i64, TCGv_ptr, TCGv_i32)) { TCGv_i64 dst; TCGv_i32 src; @@ -1811,8 +1796,8 @@ static inline void gen_fop_DF(DisasContext *dc, int rd, int rs, } #endif -static inline void gen_ne_fop_DF(DisasContext *dc, int rd, int rs, - void (*gen)(TCGv_i64, TCGv_ptr, TCGv_i32)) +static void gen_ne_fop_DF(DisasContext *dc, int rd, int rs, + void (*gen)(TCGv_i64, TCGv_ptr, TCGv_i32)) { TCGv_i64 dst; TCGv_i32 src; @@ -1825,8 +1810,8 @@ static inline void gen_ne_fop_DF(DisasContext *dc, int rd, int rs, gen_store_fpr_D(dc, rd, dst); } -static inline void gen_fop_FD(DisasContext *dc, int rd, int rs, - void (*gen)(TCGv_i32, TCGv_ptr, TCGv_i64)) +static void gen_fop_FD(DisasContext *dc, int rd, int rs, + void (*gen)(TCGv_i32, TCGv_ptr, TCGv_i64)) { TCGv_i32 dst; TCGv_i64 src; @@ -1840,8 +1825,8 @@ static inline void gen_fop_FD(DisasContext *dc, int rd, int rs, gen_store_fpr_F(dc, rd, dst); } -static inline void gen_fop_FQ(DisasContext *dc, int rd, int rs, - void (*gen)(TCGv_i32, TCGv_ptr)) +static void gen_fop_FQ(DisasContext *dc, int rd, int rs, + void (*gen)(TCGv_i32, TCGv_ptr)) { TCGv_i32 dst; @@ -1854,8 +1839,8 @@ static inline void gen_fop_FQ(DisasContext *dc, int rd, int rs, gen_store_fpr_F(dc, rd, dst); } -static inline void gen_fop_DQ(DisasContext *dc, int rd, int rs, - void (*gen)(TCGv_i64, TCGv_ptr)) +static void gen_fop_DQ(DisasContext *dc, int rd, int rs, + void (*gen)(TCGv_i64, TCGv_ptr)) { TCGv_i64 dst; @@ -1868,8 +1853,8 @@ static inline void gen_fop_DQ(DisasContext *dc, int rd, int rs, gen_store_fpr_D(dc, rd, dst); } -static inline void gen_ne_fop_QF(DisasContext *dc, int rd, int rs, - void (*gen)(TCGv_ptr, TCGv_i32)) +static void gen_ne_fop_QF(DisasContext *dc, int rd, int rs, + void (*gen)(TCGv_ptr, TCGv_i32)) { TCGv_i32 src; @@ -1881,8 +1866,8 @@ static inline void gen_ne_fop_QF(DisasContext *dc, int rd, int rs, gen_update_fprs_dirty(dc, QFPREG(rd)); } -static inline void gen_ne_fop_QD(DisasContext *dc, int rd, int rs, - void (*gen)(TCGv_ptr, TCGv_i64)) +static void gen_ne_fop_QD(DisasContext *dc, int rd, int rs, + void (*gen)(TCGv_ptr, TCGv_i64)) { TCGv_i64 src; @@ -2813,7 +2798,7 @@ static void gen_fmovq(DisasContext *dc, DisasCompare *cmp, int rd, int rs) } #ifndef CONFIG_USER_ONLY -static inline void gen_load_trap_state_at_tl(TCGv_ptr r_tsptr, TCGv_env cpu_env) +static void gen_load_trap_state_at_tl(TCGv_ptr r_tsptr, TCGv_env cpu_env) { TCGv_i32 r_tl = tcg_temp_new_i32(); From patchwork Wed Jun 21 18:06:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 694774 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp996241wrm; Wed, 21 Jun 2023 11:07:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ77JuZMKj+Sz6efa1s7EBHUBa1c70QaASpFIWBbrSmemEpE2RghkHiejdEZQXQhJfxgIT2o X-Received: by 2002:ac8:5e4e:0:b0:3fd:e97f:862b with SMTP id i14-20020ac85e4e000000b003fde97f862bmr14807480qtx.28.1687370847468; Wed, 21 Jun 2023 11:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687370847; cv=none; d=google.com; s=arc-20160816; b=pBsg9umRlUGdLXai/vkSQ5aktKkGhf/+6WpSLQ8YsHe9j43rwBUpSF+EsI8MwFkbkH XecBjso1Vicj21cLCMk0ocsIzKFzI1FX8hlpFFzQyVJi3BJ3Y1ONBhkgdWep1ULeFDcR PF5U3nXtRX0V/YmhuiauXnpLkY9qtp3InVqYCeFvD+n3wcdaMV3YrDuPKnfWuYwgnxjH 8X6YlvMJ7qZU+3IBT6hS3j/y4liKgY2KiI0CbYLZkCNVOZ+yAY0ms67S/+h+gk/iSi8a OQs9eJ/xahjAnwX23dgwmMQDHFUe9sdEleJyMUZ70dN82+lfkbLPBkgj9+BcVMXkvCGK gxLw== 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=bVRvzQ8FxqPvpZ1jAAFokBmJb9ilv9ZlzYsLqweXES0=; b=t/FaN47gSPGq4gGio+UKmBdHvvl8sVge/7yxrt4F5Q4mwA7w+dT7LHgcEpo5ogks0E 7qv6dcLtxQ9vgB3NLYlhKfSE8Nz7Lmik0CX5LlJXHk0eGvmCB/oxBQV7yyowlfAnaxDC KTPLtknYZlfs4sk7cue8PVUqQwLCKqIX/efNlvZ1ATsjMs+S8IHG53d4/UlFnD7G2fzK JuczlLdikV8z1p3zR06oh3kMtaDwCD1rqXQDnuPBHAOpkqdWtCHZNBsyZjJqGUmZ2lQ+ wkTz5+ooujUeEnnmHNIyPwMxx8bEQx6I/2EimqtqTUa8k/d3ceNZ8nEkTptLS76/J97M 82Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TS+3b0hs; 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 f7-20020ac859c7000000b003ff23c48cadsi1950820qtf.702.2023.06.21.11.07.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Jun 2023 11:07:27 -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=TS+3b0hs; 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 1qC2Dj-0000GY-7Z; Wed, 21 Jun 2023 14:06:19 -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 1qC2Dh-0000G3-Cc for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:17 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qC2Df-00071o-IG for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:17 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-510d6b939bfso8335734a12.0 for ; Wed, 21 Jun 2023 11:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687370774; x=1689962774; 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=bVRvzQ8FxqPvpZ1jAAFokBmJb9ilv9ZlzYsLqweXES0=; b=TS+3b0hshZqVm5z29OEgCuuZAEXoD8L/fENCNejzmb6GcDt6/wZMLYAGfRzM/V9Qwe 4hwu0AeKf/H3YCqRh1VZYkG6uEI6RDnSGKbHtpck3EqyP0B/ozY8ppubovepIFN1393x YJEKv/156CVDgkQ5PoxWlq+2SJMoip/lzdZkDIexd/jCTY2Mg5q1nM55iKWM63C6UAYI LghHuPRN+XAi8l21+WbUjw/dKZlY85FC9V8WVPwzniuIjfBA8wcQcX4MqKAKb941IFJp a/weeA2LDNB3Z3EhhttEH0FCg6CeE94PgiaU7nlPX9+iBIb9dTdgW264soJmlhA/uM4G 3Gkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687370774; x=1689962774; 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=bVRvzQ8FxqPvpZ1jAAFokBmJb9ilv9ZlzYsLqweXES0=; b=i6B1MYV8pq8WriGwpHlJAd5iJeD7srwOd7A/SAmky/55iFiHUN1dkgmTnITIfwIaP8 uafTRludTkqv8OcMsWrGSyXxwznb6GHPbzpVEuF3KBacnbsWxk7IVKZkIQ9sHhvUwIWe pDHFpS+oPhUb00k1MRCgU6NhxGZhqed9X0fQCqZiMEirUq6p37uY2TeAs5iW9lSUEBQq b7mXQTXw69y0R80qg+gMubpFHN66W3T6XTxqg//0yXK7R4P23FGCeAkgQ4fNK0kJqJha QDVMWG6m4INHwjiNFjdXMteK5r0IAunqJ9rhftk0JRwmFNryTUbmyZT9smkHDQ3wrBLY lUdQ== X-Gm-Message-State: AC+VfDzt0T606edrBxREWd/mnzbvPnNEdwUQ/fU/yBYYeScgT/4vEuWN TgEOwKXITXY3zf1a5WwIeNGZ0bTtS+x3xkOSEy6KpqIF X-Received: by 2002:aa7:d404:0:b0:51b:dcb7:9b45 with SMTP id z4-20020aa7d404000000b0051bdcb79b45mr1842519edq.10.1687370774106; Wed, 21 Jun 2023 11:06:14 -0700 (PDT) Received: from stoup.lan ([176.176.128.70]) by smtp.gmail.com with ESMTPSA id g9-20020aa7d1c9000000b0051495ce23absm2910944edp.10.2023.06.21.11.06.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 11:06:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 4/8] target/sparc: Introduce DYNAMIC_PC_LOOKUP Date: Wed, 21 Jun 2023 20:06:03 +0200 Message-Id: <20230621180607.1516336-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230621180607.1516336-1-richard.henderson@linaro.org> References: <20230621180607.1516336-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=richard.henderson@linaro.org; helo=mail-ed1-x534.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 Create a new artificial "next pc" which also indicates that nothing has changed within the cpu state which requires returning to the main loop. Pipe this new value though all pc/npc checks. Do not produce this new value yet. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 155 ++++++++++++++++++++++++++++----------- 1 file changed, 111 insertions(+), 44 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 1312c3e94d..d12f2ac423 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -37,9 +37,12 @@ #include "exec/helper-info.c.inc" #undef HELPER_H -#define DYNAMIC_PC 1 /* dynamic pc value */ -#define JUMP_PC 2 /* dynamic pc value which takes only two values - according to jump_pc[T2] */ +/* Dynamic PC, must exit to main loop. */ +#define DYNAMIC_PC 1 +/* Dynamic PC, one of two values according to jump_pc[T2]. */ +#define JUMP_PC 2 +/* Dynamic PC, may lookup next TB. */ +#define DYNAMIC_PC_LOOKUP 3 #define DISAS_EXIT DISAS_TARGET_0 @@ -901,22 +904,25 @@ static void gen_branch_n(DisasContext *dc, target_ulong pc1) { target_ulong npc = dc->npc; - if (likely(npc != DYNAMIC_PC)) { + if (npc & 3) { + switch (npc) { + case DYNAMIC_PC: + case DYNAMIC_PC_LOOKUP: + tcg_gen_mov_tl(cpu_pc, cpu_npc); + tcg_gen_addi_tl(cpu_npc, cpu_npc, 4); + tcg_gen_movcond_tl(TCG_COND_NE, cpu_npc, + cpu_cond, tcg_constant_tl(0), + tcg_constant_tl(pc1), cpu_npc); + dc->pc = npc; + break; + default: + g_assert_not_reached(); + } + } else { dc->pc = npc; dc->jump_pc[0] = pc1; dc->jump_pc[1] = npc + 4; dc->npc = JUMP_PC; - } else { - TCGv t, z; - - tcg_gen_mov_tl(cpu_pc, cpu_npc); - - tcg_gen_addi_tl(cpu_npc, cpu_npc, 4); - t = tcg_constant_tl(pc1); - z = tcg_constant_tl(0); - tcg_gen_movcond_tl(TCG_COND_NE, cpu_npc, cpu_cond, z, t, cpu_npc); - - dc->pc = DYNAMIC_PC; } } @@ -941,10 +947,19 @@ static void flush_cond(DisasContext *dc) static void save_npc(DisasContext *dc) { - if (dc->npc == JUMP_PC) { - gen_generic_branch(dc); - dc->npc = DYNAMIC_PC; - } else if (dc->npc != DYNAMIC_PC) { + if (dc->npc & 3) { + switch (dc->npc) { + case JUMP_PC: + gen_generic_branch(dc); + dc->npc = DYNAMIC_PC; + break; + case DYNAMIC_PC: + case DYNAMIC_PC_LOOKUP: + break; + default: + g_assert_not_reached(); + } + } else { tcg_gen_movi_tl(cpu_npc, dc->npc); } } @@ -977,13 +992,21 @@ static void gen_check_align(TCGv addr, int mask) static void gen_mov_pc_npc(DisasContext *dc) { - if (dc->npc == JUMP_PC) { - gen_generic_branch(dc); - tcg_gen_mov_tl(cpu_pc, cpu_npc); - dc->pc = DYNAMIC_PC; - } else if (dc->npc == DYNAMIC_PC) { - tcg_gen_mov_tl(cpu_pc, cpu_npc); - dc->pc = DYNAMIC_PC; + if (dc->npc & 3) { + switch (dc->npc) { + case JUMP_PC: + gen_generic_branch(dc); + tcg_gen_mov_tl(cpu_pc, cpu_npc); + dc->pc = DYNAMIC_PC; + break; + case DYNAMIC_PC: + case DYNAMIC_PC_LOOKUP: + tcg_gen_mov_tl(cpu_pc, cpu_npc); + dc->pc = dc->npc; + break; + default: + g_assert_not_reached(); + } } else { dc->pc = dc->npc; } @@ -5501,13 +5524,21 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn) break; } /* default case for non jump instructions */ - if (dc->npc == DYNAMIC_PC) { - dc->pc = DYNAMIC_PC; - gen_op_next_insn(); - } else if (dc->npc == JUMP_PC) { - /* we can do a static jump */ - gen_branch2(dc, dc->jump_pc[0], dc->jump_pc[1], cpu_cond); - dc->base.is_jmp = DISAS_NORETURN; + if (dc->npc & 3) { + switch (dc->npc) { + case DYNAMIC_PC: + case DYNAMIC_PC_LOOKUP: + dc->pc = dc->npc; + gen_op_next_insn(); + break; + case JUMP_PC: + /* we can do a static jump */ + gen_branch2(dc, dc->jump_pc[0], dc->jump_pc[1], cpu_cond); + dc->base.is_jmp = DISAS_NORETURN; + break; + default: + g_assert_not_reached(); + } } else { dc->pc = dc->npc; dc->npc = dc->npc + 4; @@ -5578,13 +5609,23 @@ static void sparc_tr_tb_start(DisasContextBase *db, CPUState *cs) static void sparc_tr_insn_start(DisasContextBase *dcbase, CPUState *cs) { DisasContext *dc = container_of(dcbase, DisasContext, base); + target_ulong npc = dc->npc; - if (dc->npc == JUMP_PC) { - assert(dc->jump_pc[1] == dc->pc + 4); - tcg_gen_insn_start(dc->pc, dc->jump_pc[0] | JUMP_PC); - } else { - tcg_gen_insn_start(dc->pc, dc->npc); + if (npc & 3) { + switch (npc) { + case JUMP_PC: + assert(dc->jump_pc[1] == dc->pc + 4); + npc = dc->jump_pc[0] | JUMP_PC; + break; + case DYNAMIC_PC: + case DYNAMIC_PC_LOOKUP: + npc = DYNAMIC_PC; + break; + default: + g_assert_not_reached(); + } } + tcg_gen_insn_start(dc->pc, npc); } static void sparc_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs) @@ -5608,20 +5649,46 @@ static void sparc_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs) static void sparc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) { DisasContext *dc = container_of(dcbase, DisasContext, base); + bool may_lookup; switch (dc->base.is_jmp) { case DISAS_NEXT: case DISAS_TOO_MANY: - if (dc->pc != DYNAMIC_PC && - (dc->npc != DYNAMIC_PC && dc->npc != JUMP_PC)) { + if (((dc->pc | dc->npc) & 3) == 0) { /* static PC and NPC: we can use direct chaining */ gen_goto_tb(dc, 0, dc->pc, dc->npc); - } else { - if (dc->pc != DYNAMIC_PC) { - tcg_gen_movi_tl(cpu_pc, dc->pc); + break; + } + + if (dc->pc & 3) { + switch (dc->pc) { + case DYNAMIC_PC_LOOKUP: + may_lookup = true; + break; + case DYNAMIC_PC: + may_lookup = false; + break; + default: + g_assert_not_reached(); } - save_npc(dc); + } else { + tcg_gen_movi_tl(cpu_pc, dc->pc); + may_lookup = true; + } + + save_npc(dc); + switch (dc->npc) { + case DYNAMIC_PC_LOOKUP: + if (may_lookup) { + tcg_gen_lookup_and_goto_ptr(); + break; + } + /* fall through */ + case DYNAMIC_PC: tcg_gen_exit_tb(NULL, 0); + break; + default: + g_assert_not_reached(); } break; From patchwork Wed Jun 21 18:06:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 694771 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp995957wrm; Wed, 21 Jun 2023 11:06:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ66GmC7EzLIkbD5e9iC7sC7OlZ3325DZedL5HY7csRuejVGXjingyfxcsnHGhJU/hW6bCp6 X-Received: by 2002:a05:622a:14a:b0:3ff:29b2:da4f with SMTP id v10-20020a05622a014a00b003ff29b2da4fmr8921584qtw.59.1687370813578; Wed, 21 Jun 2023 11:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687370813; cv=none; d=google.com; s=arc-20160816; b=hpXygbcUhNTlY/dAg8nftURAFguFGHZx2uJWCZGjtyR1pwMiRGomoBSC74Ido/o5xj hX0WU91MMJ1WcHg6Fsspo8srZubAfqoeUQ7dEnzxf6GjyxMM5yq85pQCtKDCcvYkzZi1 4/hDFMjGEr1RX8VM+hkOfNcKoNQwjK81uO8RRQtRYZ+jOn0uaHhmMJ1+9txtZHcd7/Js 0VU/TworW9KQO0m8TEjHAkmL1jjPtz0FnRd9+McsgR1AKBMHlZlKuBw0jthm6gqZl1QN 4y65Gjr3THggvIW/i2jepxFi1IGKLF5TVUQgBaJUA1ttxW9OUFNWAx2xOLuMIkYifaXv ns2Q== 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=rxKhbZzO27iRv90xsDO7HRmmIvaved/QI7IBjhZqhgU=; b=LqtWQGq2qGUo6KIOxqT1CjJlL0CtNZIM1z+3S+9Zx76iqeV6NhiW+t6HI1Ds00n/pr atXubNyxM8eu/1YbtdC/bGBYBexz97fsJ7gVMeFCtjKfPjUUfhZDdAP25DYDCpOAfOtk PWDFUyXWtueEM46vFeEqlVAttRnlc0FUOh6cQTOgW+F4f9uaiu7b+iucpUWYREFNVQNO /MvvHmn9bRwmrHVK9zmdWRUF5zOitFROo22atg2SEqtlD37460YFlyZVLzkKhgX0JlyQ 69pOeox4C/QUOSy4NhNPa9y7IkwRcvVQT0Q58kd3ZR+2IsD4pKZEW9AemYxOcmVZ2Tz9 xm9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mDf1cev2; 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 p16-20020a05622a13d000b003fded4b0469si1933136qtk.620.2023.06.21.11.06.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Jun 2023 11:06:53 -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=mDf1cev2; 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 1qC2Dj-0000Gj-PZ; Wed, 21 Jun 2023 14:06:19 -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 1qC2Di-0000GD-3f for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:18 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qC2Dg-00072O-GV for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:17 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-51bde6a8c20so907138a12.0 for ; Wed, 21 Jun 2023 11:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687370775; x=1689962775; 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=rxKhbZzO27iRv90xsDO7HRmmIvaved/QI7IBjhZqhgU=; b=mDf1cev2a4coigy+eTpykUWVclHo++zC3AAf+lJ79m+I5X1pmEy4pzz9fGM7yiyhQo X8MZii/RClKo4lu5RMz/Ft7UZ/I6TQJRckpSPLWQnjQsO8jBz2ciQI6jX/NAe3cCLMXi 74rXgyu76VWoQz9QzMHERK2l2wYM7BeCRbCY9VZ/mP0QMY0ReJp2ZiyOesalzPhRJhX6 16Z9q3T9e4H2N/Q0yccYW5l8b85ZwLsTQ2qhKBMR6dxHiL205puwl4VgtHyTx0p5NkD1 1sIiOKLXnHQKf7J6lVOjlhJN2cQH02qUSBQ5yL16ZNImTHEtDoLXEzW7fN4H02fhuA0z 9bgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687370775; x=1689962775; 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=rxKhbZzO27iRv90xsDO7HRmmIvaved/QI7IBjhZqhgU=; b=Dh9CEUtB8c3/hxLYDl9zmL84B4DzkinreETo/UCeGSH3A+EFYyNiCiIBuxHFVxhIg1 u3XLKWPQzY4k4AEVWEIjM41St79r0XLZLpqkbfObmBkRJr//vUJqrx3PPTDfBynJY8YJ 9d8DBk4UPqtsAzen/yWmsdqDP/kfzxOQUkMxrndf9PDNBUh05UWDPxbrosTjwD6IPEsG hGDvW5iTVk3VboBlOFlSLv38bjlbswyV1mov/0uvLsuBFmL2CA06h5P6IHkDq8xjIbA2 3lkvU1Bc88SsX/y4/65EjZ8a7oPwlSxtEoQadPgXLYenu0xFg/grj9HOURTxombshuEf 46nA== X-Gm-Message-State: AC+VfDwsD9K/ID6Kj2oAkvFpcG9bQfZmEpk1UJPAqYd/ZRySXj8Wr3Yw wDsV80o6KRMVzsWwmeTgvdDUnckQd0zfhLsAjAq8V4ON X-Received: by 2002:aa7:cb0c:0:b0:514:8fdd:fc41 with SMTP id s12-20020aa7cb0c000000b005148fddfc41mr10117425edt.15.1687370775206; Wed, 21 Jun 2023 11:06:15 -0700 (PDT) Received: from stoup.lan ([176.176.128.70]) by smtp.gmail.com with ESMTPSA id g9-20020aa7d1c9000000b0051495ce23absm2910944edp.10.2023.06.21.11.06.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 11:06:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 5/8] target/sparc: Use DYNAMIC_PC_LOOKUP for conditional branches Date: Wed, 21 Jun 2023 20:06:04 +0200 Message-Id: <20230621180607.1516336-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230621180607.1516336-1-richard.henderson@linaro.org> References: <20230621180607.1516336-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=richard.henderson@linaro.org; helo=mail-ed1-x52a.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 When resolving JUMP_PC, we know this is for a plain branch with no other side effects. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/sparc/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index d12f2ac423..bd3feed72e 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -941,7 +941,7 @@ static void flush_cond(DisasContext *dc) { if (dc->npc == JUMP_PC) { gen_generic_branch(dc); - dc->npc = DYNAMIC_PC; + dc->npc = DYNAMIC_PC_LOOKUP; } } @@ -951,7 +951,7 @@ static void save_npc(DisasContext *dc) switch (dc->npc) { case JUMP_PC: gen_generic_branch(dc); - dc->npc = DYNAMIC_PC; + dc->npc = DYNAMIC_PC_LOOKUP; break; case DYNAMIC_PC: case DYNAMIC_PC_LOOKUP: @@ -997,7 +997,7 @@ static void gen_mov_pc_npc(DisasContext *dc) case JUMP_PC: gen_generic_branch(dc); tcg_gen_mov_tl(cpu_pc, cpu_npc); - dc->pc = DYNAMIC_PC; + dc->pc = DYNAMIC_PC_LOOKUP; break; case DYNAMIC_PC: case DYNAMIC_PC_LOOKUP: From patchwork Wed Jun 21 18:06:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 694778 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp996571wrm; Wed, 21 Jun 2023 11:08:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4de6CmuUwH4ELCKkUt+A0LFlkQE2ibeh9Ato2WwsKvmuXS9X+oJ1XASHVc04eUpaq6SxOd X-Received: by 2002:a05:6102:51b:b0:440:9952:5c03 with SMTP id l27-20020a056102051b00b0044099525c03mr8327380vsa.20.1687370882362; Wed, 21 Jun 2023 11:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687370882; cv=none; d=google.com; s=arc-20160816; b=qsH+HlUQtHj5a7euJqkO1CfAPmxn24oSVfwQCQlYb0fwJ0amjIw4XXzhxSRlyXSyMY QWgs/uqRjx/uKt7vt1rWopEKjDmHFkIyXYziJ5//Yd01rG8cINyXdE0ALA29vPyiRHQW w7QuqU+Evl2q+qc0y3nw9RfzwKH372KA6qgyg1rqSmiUC+keYJGHFxl5Y8D4+UuAhlGf Hwetjy+q7AqbfEzk3uk20gg6xaw3sWmqO7t0LR908UK7LQzGHIdlG3zgOJ1Jsjj4Axv3 CvMkcq2i6mM0OAqI9IO4xUlCIrSlThmoiMk+vYjkuUbrRfWQFhAZ0eStR3MwxUnAdcwT rZZA== 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=UrvWGBwgWeQ4TSd2RLxu4vOp8kCc/g/B3m61WE/+p70=; b=JhZVosvwH/qaiaEEF+e5DIYyqx2unZj9dr1grO0iefsCPuvNGpNtxl2t8b4SV8so4u 3xVeOb4qReEkH7Hkmk8+P8RlWugXYeslsI0nPI5bY/SwU31xaqiCLhoxrQ+AFpWr+T0y SMGn3CJq59I0jv3iu2DHyWh5xneLdHokEEuZ/ads5taS2spy9uylbd6rvVnpjDx5MSyM SZUtNf8/+dH6WosXzr47t7epOqvI2BZJQgMYuAZUVNqOr7p5zgM3BF8giwQcUoTcgJXO mljUMkC7k7cVpWG2E1zw9tTB0IDoQlk8r8cfw0xRzOBXXx5SFmuQDZHFeFGlpkQ8I57z ZpCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dn+XzVK3; 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 c33-20020a05620a26a100b0075b016ec925si1980139qkp.336.2023.06.21.11.08.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Jun 2023 11:08:02 -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=Dn+XzVK3; 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 1qC2Dl-0000I0-4u; Wed, 21 Jun 2023 14:06:21 -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 1qC2Di-0000GU-Ud for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:18 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qC2Dh-00072c-Fh for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:18 -0400 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5187aa18410so6692656a12.0 for ; Wed, 21 Jun 2023 11:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687370776; x=1689962776; 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=UrvWGBwgWeQ4TSd2RLxu4vOp8kCc/g/B3m61WE/+p70=; b=Dn+XzVK3lHKIvAo15QhC2NjK4eYfHJaxYQ72bq2BUfb+Sh8mElcjXweiX1JNB2A8uv 48U+jI7l9DThdUF0yNmLZJMbaYbwrmnlU38nv15OCFV9dElov9ak1OExP1AxoqaVNbNu gvUWQ6C8zxzptRObVNoE7GKdOd3FXe5kRwIUCNQr8PtLWVZBJRtLk2wcP7EAO6ogunm1 U9UdhCKG7NSXObeWolp8s/Fglm4GPtzQ0BknvpN05N/poyw12rtr7frl46nwAMg5dOJ4 DC03ZsFfMSfvxRT3cnn2lupgclt7riHcTe6WHLADmpiDugZmgFLOFdz/uFoNdzxxXl3A zV4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687370776; x=1689962776; 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=UrvWGBwgWeQ4TSd2RLxu4vOp8kCc/g/B3m61WE/+p70=; b=JtkekqgyM31+yi1iDa4lK+SefLKD3bfkbnV22WNVxpTzX3MXFI9h4Ut8c0ZzUkUwNY fXqPrWe45zUtyvC131XHwSEY36r7QBWt7UchH2eEfdTlYpaL9p/A9eO8dazx1vXmMPC0 NWuFZFKAdh/jfsg8WTsXaTD0MszuibRe07DOmEP4pfsbWQWWuRD9c+GVaJncr1tFf3rE zstVfeZPoCVO/sqoutTIY/GRhaLoIPHlQmjfsQkNCHDDQcJoif+aV+iyAc3GyOYEodAH 4cXus4gLS4nb+vf9Q+TtjnBj32SMROH4Q1zTLi9AKAKTpA96PpB8bm8mDaJPLxRDMuiB m7Xw== X-Gm-Message-State: AC+VfDxdsd1DFlv7Zps7rnrETISN9O9Ae8hipjfxblAVAOtiG8mkUrU2 s8NlCeS8h82J9vUpB5jCe1Vegju6QQj9a4FJYS1npI0e X-Received: by 2002:a05:6402:4c9:b0:51a:327d:f065 with SMTP id n9-20020a05640204c900b0051a327df065mr11076476edw.13.1687370775920; Wed, 21 Jun 2023 11:06:15 -0700 (PDT) Received: from stoup.lan ([176.176.128.70]) by smtp.gmail.com with ESMTPSA id g9-20020aa7d1c9000000b0051495ce23absm2910944edp.10.2023.06.21.11.06.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 11:06:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 6/8] target/sparc: Use DYNAMIC_PC_LOOKUP for JMPL Date: Wed, 21 Jun 2023 20:06:05 +0200 Message-Id: <20230621180607.1516336-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230621180607.1516336-1-richard.henderson@linaro.org> References: <20230621180607.1516336-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=richard.henderson@linaro.org; helo=mail-ed1-x533.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 This is for a plain indirect branch with no other side effects. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/sparc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index bd3feed72e..9ed235d26d 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -5058,7 +5058,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn) gen_check_align(cpu_tmp0, 3); gen_address_mask(dc, cpu_tmp0); tcg_gen_mov_tl(cpu_npc, cpu_tmp0); - dc->npc = DYNAMIC_PC; + dc->npc = DYNAMIC_PC_LOOKUP; } goto jmp_insn; #if !defined(CONFIG_USER_ONLY) && !defined(TARGET_SPARC64) From patchwork Wed Jun 21 18:06:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 694775 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp996292wrm; Wed, 21 Jun 2023 11:07:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ56Be4mRpsLxacO6ms7xccb30St0aC97jxBzs9ZgarlU8ja/+bhSgZofABvj2pAI54DkTD0 X-Received: by 2002:a05:6214:e4b:b0:631:f06b:823e with SMTP id o11-20020a0562140e4b00b00631f06b823emr8114262qvc.65.1687370853137; Wed, 21 Jun 2023 11:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687370853; cv=none; d=google.com; s=arc-20160816; b=qcKyDqVfq/tJd2fjS9pbCXFF+CeIBCGVImFjpuhglENxnYOmJhgxRcVRDaFni9cUCP eCi6m23HDbbNLDVVjTflu6CL0nkigNOvrfaISQqCmFna7eWMpETerRl/8UGFeXfF716L z/63wChiktHewIEZnIBVINwqsz1gDwRoyCyRIZQI5jHKPhWLVsO4/SJ0PQsUvsQeK73j GF92PES8V5RqrDD8HCigjmrsfKeEXxAXE7TPPvMQeEiHaAPNoNmwr0FF5gqrAfGKXWyS I8ZZYzK2zSYYDXFpyv7sAEr2hTJ8BZ4TVj8d+U/xOVI+GKmIKWlCEb7bsIoyMWyDTUbI uPdg== 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=yrouPtyhJiYuyIvkzLvAJvXI56s/AHokLRqYC3TVm+0=; b=IMiDpIBfDJ1VV+h9xDLuMdacS+hdLjmCWZYTWH3KYMTiWuGqww3P1tBz6eFBFZE8+h sIJ2suwyDFEKUJGFQxsp5LcBOKI/dPThEEkSeZKXn5fA7VTF1I6suaA25/vtwwRkv/5s 53276OQavetkb4vGA0TLd9Bd9X9Bp2gvTpwwFigG2l0eH2d5olC4IOYepuZyirNoaUdl scjdY3H290tnHDQobWxasSUJcL+k1GfqZ+47RKe4Z+D8B3OkBiudYJRckn1LgEl4G3CX NLzOYtCU5ICTzOzYsG1YQn0sO9w7QdMxKh4ZJNTPXqLUkWgAYyN8yYBFBSg20FT2VCLq EhTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C+mHtpmA; 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-20020ad4576d000000b005e5afad9fa1si1962400qvx.484.2023.06.21.11.07.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Jun 2023 11:07:33 -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=C+mHtpmA; 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 1qC2Dm-0000Io-OT; Wed, 21 Jun 2023 14:06:22 -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 1qC2Dk-0000Hj-Jm for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:20 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qC2Di-00075T-Tx for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:20 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4f883420152so3704792e87.1 for ; Wed, 21 Jun 2023 11:06:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687370777; x=1689962777; 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=yrouPtyhJiYuyIvkzLvAJvXI56s/AHokLRqYC3TVm+0=; b=C+mHtpmA9owjLQW/pJMoiRnC9XF2BgAmurPVC9cidxIYSnKAJw5lgFwzYqLZRi8s3E gS0mj0JjteTjZtoSPj3f2EXXslxbUNgFsnadiMZuimYKWq3JJ3SsF5u5QfovVvrjMwRm wOlN39CZmQ8mLw/rC4FN9jJsJZRdmJW8FaycZTCHUm+h+Va0eCZxkzBgMfg1iOupO7UL bSv7cPSk1ig23y0gZjTkbI649L75h2DHj0afnCepKiQXqEoLWU9B4qytt3xhAPJ0wHZm GWjg7TzfXA38AXO7RwdCaBtpNHdRJhVw4Y246cdiRYRciwJJTYOiqiWq/dd5J5N7Vz01 T2Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687370777; x=1689962777; 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=yrouPtyhJiYuyIvkzLvAJvXI56s/AHokLRqYC3TVm+0=; b=GKwbsFdXnF/ZwE+sKksKkC4SjAXvR9XV3OZ8p6UIiQCzBOdmLMGoe8KlefwRXojYD1 W74NaZPgjtO6TVWEOqLx/qCC1KO7MZNrS3aUaHEfclJ4Y6iLnh8UxTrPq5sIi+d8rbuM Qv2dDUu2S3ORa3EGV5wRpQ6OhyTgs7X8b9WCAEaAWRUabxzftkVDqE1lo07JwinDqWQz HYOjgey8E+6xVcY3apnRGY8M9Pm8fBDbwYCsYYzzsnqxnPt5ycIM/26xN50pGk41aF6E 7VsWp4Xi6xkYqvR1XaY845TWrs5H9vLIHZUPWBbZkC/OksoxK9TDRL5YhQu+vVyRpVTU 7y8w== X-Gm-Message-State: AC+VfDzI1UtMil1oU9NUNg/78bCQr1+1yB47WkSDxUOz6scB5SkrPIOc 129Mn9Ni7TJKRjgWs5mSQFwOGCVAFgnArbqwebxQyUJ2 X-Received: by 2002:a19:6547:0:b0:4f8:7807:a612 with SMTP id c7-20020a196547000000b004f87807a612mr4167223lfj.61.1687370777007; Wed, 21 Jun 2023 11:06:17 -0700 (PDT) Received: from stoup.lan ([176.176.128.70]) by smtp.gmail.com with ESMTPSA id g9-20020aa7d1c9000000b0051495ce23absm2910944edp.10.2023.06.21.11.06.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 11:06:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 7/8] target/sparc: Use DYNAMIC_PC_LOOKUP for v9 RETURN Date: Wed, 21 Jun 2023 20:06:06 +0200 Message-Id: <20230621180607.1516336-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230621180607.1516336-1-richard.henderson@linaro.org> References: <20230621180607.1516336-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=richard.henderson@linaro.org; helo=mail-lf1-x135.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 After the register window unwind, this is for a plain indirect branch with no further side effects. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/sparc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 9ed235d26d..ab7054d4eb 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -5029,7 +5029,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn) gen_mov_pc_npc(dc); gen_check_align(cpu_tmp0, 3); tcg_gen_mov_tl(cpu_npc, cpu_tmp0); - dc->npc = DYNAMIC_PC; + dc->npc = DYNAMIC_PC_LOOKUP; goto jmp_insn; #endif } else { From patchwork Wed Jun 21 18:06:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 694779 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp996673wrm; Wed, 21 Jun 2023 11:08:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4v5jnxxio32ml6BktYmgIwuHVFqtCWqRjDl15iKRkZzBDP06dIEkr9ZukVYCUAJoR+ZMe7 X-Received: by 2002:ac8:5896:0:b0:3fd:dab5:9430 with SMTP id t22-20020ac85896000000b003fddab59430mr20601165qta.16.1687370892807; Wed, 21 Jun 2023 11:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687370892; cv=none; d=google.com; s=arc-20160816; b=DW/6lPUo2sPt9kGjElUOny81UvNUk5jiBu4GHqtBjeBM3DZPmL7lWwhqgpwcVAGIBl XK69Z9ul+XeUcPSyNABQNqVfe2jIQ+CTXq63UqxA5nztdejyfSqlRS/R06lT9jm/9glt 8z/jgrATb5xg0ZwzLrfWeVshP/n0DhPRfL4b3rn0FVLCli4q/CTzHsBDLF+ERdSotLvQ 01wy/2Ac461/pjaj5uk7NBbErmhZ/ZqOqxQscUSLL1qB8/wEhVlFDasC55m6Z5sBj2Le H/CaQ6l4t+tYZEY95lvKz/xiIA9ZUS7yLwpiY9bJU9tAytuv+zdYe2fO/6OsE9xdppOo StsA== 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=BIcLXVZ1P4eESfDPnK8hdQxHboll0WqA+NOgMyREFDE=; b=XTucx8To+zhTtvhlbm90rd7Ug89rBNUQEC2uP+U4H50pVsnlzPyYlNlYvjJPtipa7T 59sD3WAYmYI4RmTAtGufGmzroySG/wupwQmXNkHzKzyk6rHXk9eH+EyUGygviEB48c9+ jMchN1fp44KtfnGzhf06FMowU7wfak6NOlS4h9UbJCBrytLVfLc7ZDG1xQajlChwkrCo RDVPxH1iaPBkqA6ezPmaKLfB9sCLVHKFe9+mZj3bAtqrPZlq8mzmnyku1ArA24GvF8C0 o15O+KHOhIdQVMTOn1OK+oXnx2NKrxTegmv8+qjCU7OnuOp3GM+UCI/+lQ/fOd0gdJjK jhrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MQxifKFs; 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 13-20020ac8594d000000b003fde892e6ddsi1981577qtz.292.2023.06.21.11.08.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Jun 2023 11:08:12 -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=MQxifKFs; 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 1qC2Dm-0000If-G2; Wed, 21 Jun 2023 14:06:22 -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 1qC2Dk-0000Hk-Lq for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:20 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qC2Dj-000763-4T for qemu-devel@nongnu.org; Wed, 21 Jun 2023 14:06:20 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-51a426e4f4bso7438591a12.1 for ; Wed, 21 Jun 2023 11:06:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687370778; x=1689962778; 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=BIcLXVZ1P4eESfDPnK8hdQxHboll0WqA+NOgMyREFDE=; b=MQxifKFsRidFX5VzOFd6bl/r8fvNcAn7m2u+zgqtkCU9Xzu1GnIezqqSR+E9x/K1G9 pEILnq4Diq6XWkc9cocGXvRGIk1BBAn1YoCkivboDZ9kB9QTAQk0bA6l76/0t6wtGtsM k3ltu+VZWDP4Gj56NgrjI27uyTUbTvXq0lmb6hxzw1NwACRQkQm6rVFQrQ138HSfkWA4 XDt0JRbFQbc9AKUWHCfj0bGoLeaLmoDJvVuXcL/Bf4wG8NTROODN8UdvY2TsPSPVwVBb bkwJ9pirw/PLPLuAt5uU11lP21Y0k3jlLlLw+CVcy7LG42bp7rCnS/RVCwR7SLw4i5FG KMrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687370778; x=1689962778; 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=BIcLXVZ1P4eESfDPnK8hdQxHboll0WqA+NOgMyREFDE=; b=JJhfcOofNQyW79zvJhJ15KFaep3gdMoaIS4szCpTeQ7x0cOQIDUhFAjcjlA9bH9rig yDgTXlDvXJNLfeyCSkZ0T3DexzIEz6VkvjLQNJ4g0KyF74B/N/mslKvZarrQJdH1ahUi NxYpMvKHE02xctP94r/LKI3kAxYgSP+YLNBAziVzpa+ZzWC1cSkY3dPkZ4pM94SO8b++ 4G3RKMNdXIAgKDFhydF2rR8kFiK1pJnz33A+hfq6HLpeiDdlkP2cqBVGE9qbw3dhMxjb K7mmIGinEcOlqR2EgsQykbpeANt9DonUuacgfAilSViojj4l03n0puq+VcegD9+1hvnW eA/w== X-Gm-Message-State: AC+VfDyEkhSgNKq+mYYfbM5CBmaI4lVKehtkJ6FK7MnaJoROx3dq3hOl DWQlacGb++vL1BLydDnz0XTyFvEnKPvoLnjAY2KOYJh9 X-Received: by 2002:aa7:d743:0:b0:51a:532a:a81 with SMTP id a3-20020aa7d743000000b0051a532a0a81mr7168418eds.21.1687370777862; Wed, 21 Jun 2023 11:06:17 -0700 (PDT) Received: from stoup.lan ([176.176.128.70]) by smtp.gmail.com with ESMTPSA id g9-20020aa7d1c9000000b0051495ce23absm2910944edp.10.2023.06.21.11.06.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 11:06:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 8/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr for v9 WRASI Date: Wed, 21 Jun 2023 20:06:07 +0200 Message-Id: <20230621180607.1516336-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230621180607.1516336-1-richard.henderson@linaro.org> References: <20230621180607.1516336-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=richard.henderson@linaro.org; helo=mail-ed1-x52a.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. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- 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 ab7054d4eb..fcc1054943 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 */