From patchwork Wed Jun 28 07:11:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 697223 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp4194918wrm; Wed, 28 Jun 2023 00:13:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5yI8Edl3/2E8kVLcLEBjjt2iIsTWyQ86IIq/bWBnROpt7QXE3zQ9pf1EigbKLnAZMqjCBQ X-Received: by 2002:a05:622a:153:b0:400:819a:8f5a with SMTP id v19-20020a05622a015300b00400819a8f5amr20971714qtw.42.1687936414090; Wed, 28 Jun 2023 00:13:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687936414; cv=none; d=google.com; s=arc-20160816; b=LWsO+sToKN6k0uH7ZrI2a1GZkuibP1/4jCNPKujqMHlbmzsVl82KbirlLV75FNrpfp erL1rZYEZ/7he/etO8e97/rlskl6L2zUwtlq4vEGkDK4Cg0eKVoLmc4n8PUMEdd1OEpQ /q6HYvObNd90CRrpKmWaXu7hc9SHAUXFU8gq0RjRlGdAWr50X/A57p54z2Rvw8amoPwB 9xioVxwI3olAXbQT77KCJtwGQMz3lRWYMBej2O8/4YcrJQRcCYXdgY5lOXp3/Igg+DMl m7URmdCXiF6P9y9Jg9qnUSBAHpN/K7vDDzR1RYp1N1vh6sAt3h74DHItsvynK6bF11Kr vUzQ== 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=6MLLwhPBjVmEi0+udNp6FGHceQgbPjwj+i6jIV9NGNI=; fh=GkmytpQ/aBK+SnhsUxtqa1dYh9qnVue5D4c8ejqHfb0=; b=Il9tbZH9LYKgh7NSl6Eh+798hjsnoaBtSFu0ggeQdU0zxvVTHe8bQLskqqUZqCrF43 KHFYVoBgxBPnD9y4E3ExPccdMxPALOJ2yJgGfuenCXZM281Zy/aQVdXnFPx5xLgmUMG8 eIdxW7OzvK0iN7frTCoekaI+SmbnI5xHzoVnL0ffHpAEdxOkxaJzR6kHeenFLOSugVFP 9IMvh3syvwBvvydenKAMguDXMSxDT+OHtIzAf8eritd5FhQeWkwewbRlaRyJh0/mcJEJ Tnxlfy12YJuzK3bggI+tVkh+Epqrhi7xI87l2IughCqd4jK7ZrvF5mhzSSCspCdvjBkU 7t5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TpEckxW4; 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 8-20020ac85948000000b003f38e534f83si4120678qtz.694.2023.06.28.00.13.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jun 2023 00:13:34 -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=TpEckxW4; 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-0003Op-Vc; Wed, 28 Jun 2023 03:12:33 -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 1qEPLV-00033m-3e for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:10 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEPLT-0005Ig-Gn for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:08 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-313f04ff978so3015026f8f.3 for ; Wed, 28 Jun 2023 00:12:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687936326; x=1690528326; 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=6MLLwhPBjVmEi0+udNp6FGHceQgbPjwj+i6jIV9NGNI=; b=TpEckxW4V7K+Ttlc8rgCqcwSYgbLo/21tit1oAjnyQlNTbCjoc6rf3/D4R1nWNUHiU 7jI5acuwYSh1aXVik3PLhgZpidWBbtrx0za4TqFYWquDvHYdTf0J2dOudMPbFv3cdW15 /nFUdK3RkHaEr7BkxPb0cdxiBh/7+Bf1PDyoSzBf0J/IqtKazbny3x/jHrTVnFhtdQ5i biwf6UnKOyNnelcF8PuTMIc/Hg0NqZkEsaGg3mEAaBttvtQ77LHG77kMcAQ/Pxo12DO6 xjUIibTaHlwM+omFel98No8DywWjHaEkDDqbLkk79pBUtAAxBmSi88KBIasGnK5sVYw6 Ow3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687936326; x=1690528326; 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=6MLLwhPBjVmEi0+udNp6FGHceQgbPjwj+i6jIV9NGNI=; b=i3gsZwI0Cad6V0MAshVu+olt8QRmBBK6E3hISOf6kcbFNJHpVGATxY1THlJOp1i2+8 410v7nZqBVku/nr6kF9kG4CS6IRrab81fOnSX32IOBXubOzhgB/cHI6fH0yXcdFv4e7v rL/4z+lngf+wx8VTb3Jw/lRRNOM6COAGrYk69tsL2q/3I+hZk1pp8AHlZ42RrqGhZ/IU RTRMWapj8d2v+OIg7v2VPDBWlLCiuxCQQELPCxjT9D5EqlFx+5eiuDU2E/nQzsaut8Ks uRpsv/cpj1v5MYR2vlrH9NQGH+HP8r94wIth3XUEy6NQyfcfd0yTpy4sVIMQC1VMvWlw bLMA== X-Gm-Message-State: AC+VfDxAc5n8wVEQ9T900Mf+OWMd4izjcNL2LlHgwQ4UAZDP3Rm2CwqR rbCwLLX+4S1qE4Fzn0RdjVpRUDmIJKUdjm/7egW93PMI X-Received: by 2002:a05:6000:1818:b0:313:fe77:a825 with SMTP id m24-20020a056000181800b00313fe77a825mr3467340wrh.13.1687936325753; Wed, 28 Jun 2023 00:12:05 -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.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 00:12:05 -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 1/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr in gen_goto_tb Date: Wed, 28 Jun 2023 09:11:55 +0200 Message-Id: <20230628071202.230991-2-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::431; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x431.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 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- 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 28 07:11:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 697219 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp4194618wrm; Wed, 28 Jun 2023 00:12:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Gag7szxe0ioLIIMJVrmmStSnMxX1cLDB2/OrY9ch6RI51MrKnSaYPZWFVzXMzYcWg2dW+ X-Received: by 2002:a05:6214:2a8b:b0:62d:df48:baf0 with SMTP id jr11-20020a0562142a8b00b0062ddf48baf0mr39332814qvb.61.1687936365368; Wed, 28 Jun 2023 00:12:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687936365; cv=none; d=google.com; s=arc-20160816; b=uUDfQiiZntQ0+Fr2YK8eW1q1VurD8rcWOsIZTre2Kxa/RP9+DiKWBCcwoBDk/THYoK ATUEFHv8MjVaz+yi/juiG7ue6MqGNCxkN6IvipfLhSNr/fHCeCgpdfylq+mIqDPkb+nn 9F/TK305wI7ZtVk880MtZ3WfKfA6ylXvgfqakokT7MrF8TKYC2/RVkS0wdCjN7FthEHb iHRQZjSBsXLdP2S6MOkAQczNgkf0Tq1ClhxQuuOlt9hD6K+2JyVpUc1xGukRlCeVTCjz hD5xcIZyB5yUQG+RFIRREtYwuIzBYOU2EwRV/IS3L1zgtTNDSJffQyx5sgWkSuAyIc5h h/kg== 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=8ncyD172GcxUgyS12v0sorDhSDpPgAN4YePMDW3gzv8=; fh=GkmytpQ/aBK+SnhsUxtqa1dYh9qnVue5D4c8ejqHfb0=; b=x6V5c98ulndyAExUL+GNyaS6qjrgNDoXrqGUAzOhl9BoWyErG0o2atKCSyHadVj1w2 lc5i+1zbrnEaJjKHk/22l1/e7XVnIAdgPtuCC3huRIY3/h8rpCoUMD+njNyTwwZX7y07 n9cdwHTeeZc2pQRwBKBJJtIobBdEPrhR5gQw9kGIvgYcBmHfEeiVPH/Y4P4XzNDsi98r HAil5u8ceZf9olbB0PT4CSR7AZwtDyF7t/m9ME7VcA46VmTjPJ9SnMInAErwC0i/hWg5 CZR8HximKZvQEn7t33teE1jaPEc2pfSYIHburjxqYfeA5LEYDwje49VIXNXhZ8vf0qFB 7yBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FGL9ienE; 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 gh6-20020a05621429c600b00621189a53c0si4357966qvb.218.2023.06.28.00.12.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jun 2023 00:12:45 -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=FGL9ienE; 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 1qEPLp-0003Db-QR; Wed, 28 Jun 2023 03:12:29 -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 1qEPLW-00034E-Fa for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:10 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEPLT-0005Ip-Oq for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:10 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-313e12db357so5870271f8f.0 for ; Wed, 28 Jun 2023 00:12:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687936326; x=1690528326; 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=8ncyD172GcxUgyS12v0sorDhSDpPgAN4YePMDW3gzv8=; b=FGL9ienE7tA0/tgrcYeGeUcqlnozQ0fz2ZoNibDCQ4mA9gMYsFtC0IVUlDPSQy53Xt lE3IuwL+RePKsBxGhorJD/nJtpQ4L7stJ5bRtEgvuyFSKCGWyKdc5wScUEHihteNN73F vc2EDGL5zfe2xKYD5vSVlo6TffQO5XWLJUxULWd/T9eeygr6lCczYvfeIwzaVCayYZY/ 2UgpZljuJy9wUmmlLdMliYhugX46y6seMRmEm8lpk8aUouO9Xmb143w6GoMPYb9b7DpV WhsxcEoWv/M4YXK3r9CDUF+Fyd5tI5F0KQboUEK2MeYLw3Jtk/sf7AFyeBlYRFH9k8JJ ISLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687936326; x=1690528326; 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=8ncyD172GcxUgyS12v0sorDhSDpPgAN4YePMDW3gzv8=; b=DtlOkdsMGZrd66JTvUGNLrOupkTyMCMgD7j0Xsja9sQ2H48XNSRIOkPnc1+zD4SeP/ GdddXwzSPPKzeNFTxGx2U9gxKvM4fnEQHqfb8t+1d9b00QADkkuPa3nmKyKBomPUnjb0 aCccdX+itTi1egTvzeR4XKSsKBCZK1dzwXYNJPsdn7kWNz5+mTDVa2e5RPZ6TizIs0rq DQ0e8pBDbIrGSW7y7nAmUEnrSNNO77hHBQNOIXWJAJ6mOs0iN2BCGxZ/E/0TDcQFJgW5 dwDJqwHdKw8DcVMnS9AlLK7s/K/XuUS6iLvAJJ2aqZVNZRMWxeFYjdKOhWYn0DVqRJlT jsjg== X-Gm-Message-State: AC+VfDxANrHwuKNED2Eico0ftGIb6blP2EpcwjM7G6tY7uG6wP+HNJP9 SVNMgSdUsy7AdoMhqGsrtu018r59EoEUGwOcD0oePUrQ X-Received: by 2002:a05:6000:104f:b0:311:110d:5573 with SMTP id c15-20020a056000104f00b00311110d5573mr37070810wrx.64.1687936326335; Wed, 28 Jun 2023 00:12:06 -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.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 00:12:06 -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 2/8] target/sparc: Fix npc comparison in sparc_tr_insn_start Date: Wed, 28 Jun 2023 09:11:56 +0200 Message-Id: <20230628071202.230991-3-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::431; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x431.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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- 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 28 07:11:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 697224 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp4194953wrm; Wed, 28 Jun 2023 00:13:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4y3+ruHSe0yREQKau9Qm5TDd9LGrM83lEmhsPczqaFPMKO0sY16/W2W054DeoQbpY/LX3U X-Received: by 2002:ac8:5907:0:b0:3ff:2a6b:5a79 with SMTP id 7-20020ac85907000000b003ff2a6b5a79mr26578761qty.5.1687936418641; Wed, 28 Jun 2023 00:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687936418; cv=none; d=google.com; s=arc-20160816; b=eQG24JNPdMEmGNchVOP01X00P008RbhFSWQ5nWeB7Yi9xejG5iGomLNarfRIRcwC8y 2YcRXD7c8nGL0uPrLP3MT66V4dnkMPUelq9az1DRx1Okx5k6x9wNwTQ9F50ymsNCedMY 2OpFLyO/D73iTh8a8NaYdhb5qJfSkoeASuC0JyHH591nv13sA6SvbHFkCSTejbX69x9L hBDQz4iWQNBx27hgLnxNFu+FxbGHley1mw2LSKRUlIuep+ARbKq5yt+EKMK7nQZPjii6 uxIY6P5p5GukNrnSHT5raUxiw/o8SkwEfRD2YGaBt2MrWukiroIh5CeyZdgcVHaGX3Fz shLw== 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=/lWSLXbyzvQFGG7IkwEY3DkpHGgyYGl/3qJZkVWOTp4=; fh=GkmytpQ/aBK+SnhsUxtqa1dYh9qnVue5D4c8ejqHfb0=; b=mDndVpa4W04nS1IAhk35EYdqdI3pUUWEEdti1EHxr2CCLBch8+pOQbncHRRhTNyKT1 K10aj5JLlRySKJDNaKdpxnuJ7qO4uuHznln1zVVMEKI2Ub8O63cMuh7n3D7yS/aSU+WV 5ZdFp8RIxmoph5VO8uroq0MnUwgdYsOu/94QrrxeN5lvYfdmNgl491znZDHZasuKZ5FU 7jOyNCpymJF5DtAdCGsTQte/GydvXpfrX5/colSmLnMLan8VryWhq9maCSEEfV4KP8Q8 Nz2VLVs4+TKL6RMW03X9xWstnsi7nRDqIhZWnc6G054omcQ2g2o0nXQbwTHrPqVrDs14 D2CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hay+uXOS; 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 v29-20020a05622a189d00b00400a696ce21si3266800qtc.412.2023.06.28.00.13.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jun 2023 00:13:38 -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=Hay+uXOS; 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 1qEPLr-0003IZ-B4; Wed, 28 Jun 2023 03:12:31 -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 1qEPLZ-000357-Js for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:18 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEPLU-0005Iy-Rq for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:12 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3fa96fd79feso35963495e9.2 for ; Wed, 28 Jun 2023 00:12:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687936327; x=1690528327; 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=/lWSLXbyzvQFGG7IkwEY3DkpHGgyYGl/3qJZkVWOTp4=; b=Hay+uXOS9REkp+BHSP8xZlfFECJjTziEjNQkkE3/8Hr3Q2cGybwe9CGm5wZmvUyGmG 9f1Nw8snLboSxSKhvagbzDav4JvQCCDzPnsNHWLRwOR/44acncT3//+dZRQsW8CYA5P7 TRttoAohRqFH54BSE/8xA8P9vmyGa6i9iue8kTmpEXnMyibd4GEQSYSvBDQ2mWPt09Lr dMj+yhCuE3MaAwkR+gLjf3wMpjxFETyEA9NmacnbBW0kRQJvHb6mX3NdMa0XObO6W6kE CGAOKgibTTVGGNN+RYAT9ZDPZUkrKsDPVeJKXmX2Rh4Ax96c6Ysm3LkKB7SU/rkQnWzO z9lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687936327; x=1690528327; 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=/lWSLXbyzvQFGG7IkwEY3DkpHGgyYGl/3qJZkVWOTp4=; b=jzP8YcIMyVCcz4U2rEapH4Ax2SjOAXXCTtK3dOOr8Sa1OgT1p/C+8ide0r69qhqGYZ qOpCiiNleJw4to5ADF6AZZRMm06fnin2fcEzibCPwio7nLbwnP+EylG7+ANyqwzZqN+M tcDAsKV3t4iYJOtns13QflmH/7rHYetPRPSQaWs30bB2/S+mjQvKm5abnq62WNXj/QbJ X3A6zu6QnbiywLHD6PiFBiXpIyrE5Uwoax5OznEIsnV5I7ZaEuZvvg6ljAVX7RLeGM71 aLjzfPM4F/HLXD7TAdn3QZpw31WrPFSh06xEIhQ6z94PjTIrjhryfET2aU/t06Vs3CVr LZeQ== X-Gm-Message-State: ABy/qLaEP8PkPr1arn/CYlFoJ1naSk3MzfuwB7XDJGm3eknS3XcA+gWh otUCXudDXrmi6A51drhCu0PSN23CKRzjzjtpyvu+azKt X-Received: by 2002:a5d:490a:0:b0:314:ff1:e714 with SMTP id x10-20020a5d490a000000b003140ff1e714mr172078wrq.5.1687936327244; Wed, 28 Jun 2023 00:12:07 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 00:12:06 -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 3/8] target/sparc: Drop inline markers from translate.c Date: Wed, 28 Jun 2023 09:11:57 +0200 Message-Id: <20230628071202.230991-4-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::32a; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x32a.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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- 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 28 07:11:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 697225 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp4194962wrm; Wed, 28 Jun 2023 00:13:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6206jfgkW9NdetfPIm6/lrxYxvkZfROFhtj8RmW4MAlGgEf8MpqWA1BcHeX407P/0PAoqu X-Received: by 2002:ac8:580a:0:b0:3ff:28e7:b42f with SMTP id g10-20020ac8580a000000b003ff28e7b42fmr529518qtg.17.1687936420862; Wed, 28 Jun 2023 00:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687936420; cv=none; d=google.com; s=arc-20160816; b=I5owAeKDacqw88mu9xiLHrzE/x4uewdq2Qg8G0VTtFl3FhHcidKCj0oRfqENTa7iIm T+7mYDpYXTAi6Hw44hjuhI/vmE09Mhmg81euy+Dxfr7LxHqfoJCjv0S09HFewe3HPjV3 yMxr4Fg/xNIbzzmy/NY36SC0KLuxAUgrBvu0KdMBb2i4tRXf0+yBijUQc1xyIGfLOJX1 kdGz98oNkKHhdQ1dyLBVNQRr/B++XSfEVrOMoK4TwTSRvs2bdU80Ze2ANymrTgzI0ryc hHw8zrBDZYq6Ie5pK2iMRYHCp3xHwJpp1yFta95+d6fvMyWJUVgXMxuVXZI4zjxX1r9P RCMQ== 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=slq0RmbTf282ywfgNZrhCdz2QdRjAp+22Nb7dnlea+w=; fh=TYrED6TOMxGX0VC4GtjviASLbYyJe19+7/tKWjN44KQ=; b=oWlWnrzqyUn7/Wl/atUP6oIXp3tO4FH+Mthk6IsRu2ss3C+fuAK5due+tDuj8f/L1p rOF6nOlf7tfWOPaBSTgIwxMXvaFOwrdlRdcJXXAeIk/45BFR2XVJKKxZuDhkHw7/m3DH NvtD7O9WvVuG17geOyru33gcE0EaQZX+OYJjpfrHjAo+UtoOaGgK5la+DFUc1376RXQo CjM69tk2ukWfMeKmovjuVKpf2638fnPXWXUJc4OmPeiS6frxjZLk8mPGoD7VZQvnUqDb Z1nVLDf+Os7NUMAR+PaHoG4Fu2VijnNXQPsj6V527XS4fuIgUQ/e6hjj9xlTCze+flhF 2Bew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SHR3nVu2; 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 u2-20020a05622a010200b0040079335675si3284876qtw.206.2023.06.28.00.13.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jun 2023 00:13:40 -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=SHR3nVu2; 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 1qEPLt-0003Pk-QG; Wed, 28 Jun 2023 03:12:33 -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 1qEPLX-00034j-Mg for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:12 -0400 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEPLV-0005J3-EH for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:11 -0400 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-4f865f0e16cso7655548e87.3 for ; Wed, 28 Jun 2023 00:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687936328; x=1690528328; 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=slq0RmbTf282ywfgNZrhCdz2QdRjAp+22Nb7dnlea+w=; b=SHR3nVu2VAhAxcGl2bI8O1zdcd+idGOtdnGhT69D9JpcCukaS0WVKp4kJ4PPzR5lFB ZVygvuAGGkHCf/Qjbk1ipZKK5cUPzCK5o4ur3K8nCBsLnWn8zNNFNeeNGEZQKFprtJrp gulHt34hgSP+JNSI8OFreUsYhnbgLMoxgg4scPYOM1I6rZr0pC30OrM/yXBBh28Ljc6m sGh+NXot+bllgEwV19PXgVxuWf6omWNAlG0mKa0PfN/On3fTH/Q+XCLq8BkN0pGbCtC5 d/bGX7TU+fRRMap5bJ41t64ggLP8qulSxkESOH//04xqRZOe1ysLGa7r+ZMgKdolIHvV CAeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687936328; x=1690528328; 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=slq0RmbTf282ywfgNZrhCdz2QdRjAp+22Nb7dnlea+w=; b=gGoS+SiMVwf4tkeWB8PPqQYZ2QJin7QOsiKTueeBI4S/Rgjd7MwKm8pNJUc4ao6KFe Dx45ENapduy7G0SKho8id2KGuUOCtZdEPw6YYxZnoPfnxaqKXKWfZw2EMke476qe8YJJ Y3Y7WMnRH3GFftGcnfFgfFEVcfXYp6KptbCJDjt8urk5x+h+gYhdIcGlFQKMVfplczVj o+OYD6h+Ts7TEM0X5YAvA4B6lxXwenT2EfMnwE/OOhkfxMi5GtsKkrU4fMk0gvLMq1LS MdWU3yMEeTkcGR1psFmXlyHqJfmPnpKmXgbeEc9ro1ASxMPj+hRtkIjq0fPJ8rhgk5BC 0Lpw== X-Gm-Message-State: AC+VfDwGnhsw4+flhXLEft/MJWb9cX8EYWYBj3afRddgp78PyMO7GDVF /1lWnOXMCdAvk9EfVOVQh5rbJnK+HmbNVoGkKuMkmAYf X-Received: by 2002:a19:c206:0:b0:4fa:3a0:2257 with SMTP id l6-20020a19c206000000b004fa03a02257mr6154271lfc.5.1687936327870; Wed, 28 Jun 2023 00:12:07 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 00:12:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v3 4/8] target/sparc: Introduce DYNAMIC_PC_LOOKUP Date: Wed, 28 Jun 2023 09:11:58 +0200 Message-Id: <20230628071202.230991-5-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::134; envelope-from=richard.henderson@linaro.org; helo=mail-lf1-x134.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 Reviewed-by: Philippe Mathieu-Daudé --- target/sparc/translate.c | 147 +++++++++++++++++++++++++++------------ 1 file changed, 103 insertions(+), 44 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 1312c3e94d..75aa1a138e 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,19 +5649,37 @@ 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); + if (may_lookup) { + tcg_gen_lookup_and_goto_ptr(); + } else { tcg_gen_exit_tb(NULL, 0); } break; From patchwork Wed Jun 28 07:11:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 697218 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp4194619wrm; Wed, 28 Jun 2023 00:12:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4udoO0fkfPhCbXZAxBUF41xGeabifE8EP1IXfUoLDhowYzdQ29oX3tsEcJRNqqbBJa+WKO X-Received: by 2002:a05:6214:19c2:b0:635:c247:312a with SMTP id j2-20020a05621419c200b00635c247312amr11796031qvc.53.1687936365386; Wed, 28 Jun 2023 00:12:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687936365; cv=none; d=google.com; s=arc-20160816; b=T6F2tHxQwqbWeAVzdZFQHkNLRrqiSRb723SSw/7+bfctX4K4h7ma29xZM/SA4/8Z7c QLKaPKEAwUGHXMJljoBZ1Ip3cCgNwiKXFlwpDyrCzsctI79KO1yhSUePIXBYj+v9BYnb DsTDb3HyvhHJbql2uGTh+O7pvWZE3Wimsjiz8ssoYu5p5I4b4Nb9fhgXwyqcIwZ11MQS fUH9Fk/TKJp/T+PFLjtscpyftnGBVy8qQBto7KuwJr4Uc9QF+bRJK+4Emvq/I/39GcUD ypUq4/MU3uMYx0ymMcrWxP8IDPNPXc6tO90y79o7ajwfQilBI9KjIEM1gIRLF7ipYqab Hjow== 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=06/nfmzpqd2IPJxz2rAclG7vHC61gjlvdFyJU1ybC5w=; fh=GkmytpQ/aBK+SnhsUxtqa1dYh9qnVue5D4c8ejqHfb0=; b=Z9L6Wlg5hMFfkmb1AODfeW2ySV98dA4895Zw9ghoH7nKcyv+5UjT1TSWe59rwzsq5T YSUCJHrowqX3QI6ruzrOgYge6bMz6MGhbp1mg1jjisAdob8ZUOA+Ixx8r/m8RPGL+bLT xxqMF5y3aviwuXVeyQLhuVLD553UFBDXPkTkCgYd3Ykr4RmbC96KO8IhdoRjsgJAPSHm oqEVaLlIDoCb/dN/qUQTEGPw++SQZK+OmmAj5/azOrF5C/IZH+35Ca3dZi6/QTlzosoA rBioayYP1D4QoxAE7GXkYpBx0E6TTm6+5/sLxc4Kim+20x8y834zwmFupEz9T3oKCYd7 w1nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ktVNqF8V; 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 gc13-20020a056214230d00b006263f946463si4436664qvb.155.2023.06.28.00.12.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jun 2023 00:12:45 -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=ktVNqF8V; 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 1qEPLq-0003EH-1W; Wed, 28 Jun 2023 03:12:30 -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 1qEPLZ-000356-JF for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:16 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEPLW-0005JK-A4 for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:11 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3fa99742bd1so29472425e9.3 for ; Wed, 28 Jun 2023 00:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687936328; x=1690528328; 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=06/nfmzpqd2IPJxz2rAclG7vHC61gjlvdFyJU1ybC5w=; b=ktVNqF8VQ4MWRKF8UkgYecYKGJh50m21cgzD6gX5vIW1w/xGjbTB84VGFLu+KDAWTU gJnyEED1XfMMgmpAXclQqX4YEITjjBJubXbJ33QeBYzkyYj+bto6gO6iB0QgnQEVELhP kn9v206DB1qu3KNF7H59cF+DBUa+pxcL82Q/r3YqMxEAfsAgQhcc2IECUo2Xl+WTa/Ip yeEvKIT4S9uIcYoCbKrMJUWLSX2cusS8lYgl0LyI5ooK1iLQZdqyNeiUta7DgbwGPb2l 857XXkP9wNaDzOVEBqWoqhROANEYXeLWbB7eKnA3w1h/yF1sGhWuzSkKXZQ4x5VmJqIC KeBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687936328; x=1690528328; 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=06/nfmzpqd2IPJxz2rAclG7vHC61gjlvdFyJU1ybC5w=; b=ZQOt6FZZRp4L2F49lcYRkwSIdok7/Gqa9VaYbm5Y0A7P2DC29ewwFD5IXmUv35o9yN ALmKbDoA0+NQ4Vqq4Glx+FZw4/KSg0qYBWrDqo5XjkOeMuJP1CK6wK+ErxSusjXucVHF UvOdh3lQ3oH3tmrosWK5fbpdSZn0VkU8KOkzG+9Cg2jaMLXkJdsOwwUsmhg3aIeonyLQ JvWGxJrC9y4FwLmNEqK02EcYmPcYH9hv+74H6eF0a07q+kDtT33l3DhZ5yANDlQezsbU qt4DMPBBMs6H4zNAb0P0BqKT0UEhD3Spgve//FfW/lQ+lj/IK5uQUJH02ZnVlHaifucn SWCQ== X-Gm-Message-State: AC+VfDynfRMFj2NaTkb7/8hFVmnVL62wONgHUoGwlqdEJR2BAuJ+I/JO 1nDMZ6gdWrA1kkgOgEwomi6xoUuVEGJIW2dHFwkSWdpy X-Received: by 2002:adf:dc8c:0:b0:313:f86f:2858 with SMTP id r12-20020adfdc8c000000b00313f86f2858mr4563178wrj.2.1687936328527; Wed, 28 Jun 2023 00:12:08 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 00:12:08 -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 5/8] target/sparc: Use DYNAMIC_PC_LOOKUP for conditional branches Date: Wed, 28 Jun 2023 09:11:59 +0200 Message-Id: <20230628071202.230991-6-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::32c; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x32c.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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- 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 75aa1a138e..d7b569d910 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 28 07:12: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: 697220 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp4194663wrm; Wed, 28 Jun 2023 00:12:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7fmyBi7rSW8cBa/Zb8gFfFnH53Z3komcsP79o/bL/Eepai/hgkoi/YWeqV2+czGYPczdwG X-Received: by 2002:ac8:7fce:0:b0:3f5:483b:7690 with SMTP id b14-20020ac87fce000000b003f5483b7690mr41774069qtk.61.1687936372552; Wed, 28 Jun 2023 00:12:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687936372; cv=none; d=google.com; s=arc-20160816; b=lLF4MbDmJxc068531BmM+9v1AAxCHIxnnRo4QttWjCVbMv39EwOwIsoLBKd8Z8aYya D47fiI8hUG3T2ZiHWaAUVXhTvJHjZCNidwiAQtAwkkgF2MyeIXqPhlONigVbNlJMY4J+ qb9vE8gScUksbeJ4AeP4g44QHEf71nXTGYyEap2JTeHInNp7JEkr/IA/XO2TARF5At3C d4QM/0c9psnYIt+RqvIzn1PxHiTntOAWHRalojAIImJc/evs5zCa2qB+pTprLKBkCPte VRQfshjlraJ21C2iKlTmPLw0Jxrv6gm2fTYQrxxxADAVxsMvYtv+Gt4S5hwIfi5P3wPD N8ig== 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=n+S50E060p2wRKa6d7oX/BgtDJRjqc9miMeLpdV3uig=; fh=GkmytpQ/aBK+SnhsUxtqa1dYh9qnVue5D4c8ejqHfb0=; b=owLsurfKUgEqtPppDt2brahJxD3wV/uUbIayVQRRoJL/rzgYLN9wgBOoQVHZfD/mbr 34JlK5svxPEC0I1uC0TgwiwzhwVkLnEtSBdfuywKNhUDEn4heoAESfIVCq5mnbUn1nsV JElKsAtr0mjwfDwVVLTpANZS6ufK8DG/ysxpiriBp0ip4J4nrQS1zV2cY9W0q2NVOrwa CrrTf4h8wzcKJt9RcOxeCftejmrPGQ1pix5B/8EEQOW1dxV0gNBVbuqAhST3jNM7pVhm XJgb9pTrYzMzmAgQ/lf0SIjE0Wy99RFJo2dG3f3k1RVHLM5O72WTQRNOTd72mCdVaSl8 PP5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zkmsGb0X; 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 s15-20020a05622a018f00b003ff22859f9csi2658294qtw.381.2023.06.28.00.12.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jun 2023 00:12:52 -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=zkmsGb0X; 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 1qEPLq-0003H4-T3; Wed, 28 Jun 2023 03:12:30 -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 1qEPLZ-000358-Jg for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:18 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEPLW-0005JZ-P1 for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:12 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3fba64d9296so16738555e9.3 for ; Wed, 28 Jun 2023 00:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687936329; x=1690528329; 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=n+S50E060p2wRKa6d7oX/BgtDJRjqc9miMeLpdV3uig=; b=zkmsGb0X7l0Dj8Fhgc6CO4g56Rf4e/fdUIv5q1QgVGdaBq+zSWYnrT2Fx6go6+w+K/ TNDVFxdzOnXPWTzPDBvCA2kge6aHWXjeO4RzIrxY0Vl7dU3NHBIYVK/wdfpqaoRsAVXV mSkBsFoJlmTUDu0HkAm6TJWw5IKFwp7eHJ4xEtccbOzaxPBB926whPQGdHzVac7NvajT AbmHB9+iUbo9UHqqTBt4eIrR/ge2XLnTkhoFZyOLlKPx/4XEcYN32gnqb8z6xQ8OvMTO hesuaZ/vgiONoUaFL1eYHhM45qPTx8BIyVT54CEDPF3S90bd5kfjsy48l3tT7HnXdrDu axdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687936329; x=1690528329; 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=n+S50E060p2wRKa6d7oX/BgtDJRjqc9miMeLpdV3uig=; b=In2h0EC3gae4ERg47GRLxDwS+0aA3qGvhRjY3FOHspY1KKIHdCvBB/yVwN2+31r97r bZb4Pmxh/KhB7vRFE50UiMx/DHg7auT01R5VM08p6ACtPia5/eQ/kvD2AOlcGWJ/TVKf GmS0nK308pn48wP+LwVel3PEbuXiros1cBPnL/UDrqXNGRYVPyrWg/Qv1NcVKw1HcEut uT/nmrNDVjRJTry6gVox0VMT5fUBMNy0ISnosRTT7mlZns1eshHLAe14qyytaLhcLCoq jzjr0Ph7IHqcxxWeEwPF3MYEHQwOz50P0lFDBIM9v4Ms9ObZT5bbXgH7NaIhyABzCYAr 0SCg== X-Gm-Message-State: AC+VfDwRQ9LKQkD/0kGUu8+yfCFEmBnYIVFfzAsX6HHFDQoCCB4kBdlL TXztroMdmsYyP0a+i9AQOxvPG+pJwBuSsWEkyLjEcnu1 X-Received: by 2002:a05:6000:50a:b0:313:eeb3:c57a with SMTP id a10-20020a056000050a00b00313eeb3c57amr6839341wrf.15.1687936329416; Wed, 28 Jun 2023 00:12:09 -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.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 00:12:09 -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 6/8] target/sparc: Use DYNAMIC_PC_LOOKUP for JMPL Date: Wed, 28 Jun 2023 09:12:00 +0200 Message-Id: <20230628071202.230991-7-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::32f; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x32f.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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- 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 d7b569d910..17afe98523 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 28 07:12: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: 697222 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp4194860wrm; Wed, 28 Jun 2023 00:13:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6V7Sjg3JeJcUF0rdM7cCcWDQeXVIGo4UBc76pyQK3LxYGxl/y8FzmxYy46ZihslVU5qiLm X-Received: by 2002:a05:6214:e49:b0:623:9ac1:a4be with SMTP id o9-20020a0562140e4900b006239ac1a4bemr39880804qvc.12.1687936403705; Wed, 28 Jun 2023 00:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687936403; cv=none; d=google.com; s=arc-20160816; b=bgaj8YPTqj7OrgBdCPPkZCZKzLLpTykOIhPpWnz5Gum3R1snM7liTBczLsBueRflA2 KTMc4UnxLRhVgEznRRj+7Sjph3sUWs9qUUZWBj+fQtOY//d1pFg9fHZKQ/3xAAcZNkAa xcZisKvrxdMoCTpfAyqHFqDtiqPwrIhUAAqVC+3uEph2RnvypUYqPF8qutyWahzNSn9X WJjwwteP8UgfLqhtvxGxoNch+C3vXhMQzuMInuMx5667kNA5SDRNFJBcwvo22DlEQA3D qPayrf0zuDHLuPZIM8mQh0TSPMIvFqqsR0lHjBx6aFzJhHIRC7NbYgsZBmX7iZj+nwc6 1W+g== 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=lVxMdYHFaukC6RxhKHYCpwZeKGUEXTZS4jUfSlEXDBo=; fh=GkmytpQ/aBK+SnhsUxtqa1dYh9qnVue5D4c8ejqHfb0=; b=tLK5yr+jAxUwxeaTkUqN4AUwbixOccI9WufbN0nUU1POzOefM2Jc1OOJ8iKRXlwxn7 tFNL3hYceZ9Y3asTIqU2oPObBceGyRoUYja4TyMrpjVAuzfArNUqGPWU1fQ5XlXGlndt SNyBa7Jkui2iOgtP9IITmqWY2nDyOTtNj6MtIrpOQ7gcn122tS9gVUVrkA1A/stTrb3b i8vN7B/4rpy4DkG0kv2+JlWXKt7Wx/tiVMTm0XNYIY0EIaq8yNVx6dUtzBzr8scLxdZB su5KVartCVQnnAQlkbnpiuOJV6lDfCd/eFD62EDfTBaCB3bw6oPIYAmGEl6PTF5t7ld7 EtFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QdVDjh9T; 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 ey7-20020a0562140b6700b005eef65c2850si4678947qvb.25.2023.06.28.00.13.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jun 2023 00:13:23 -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=QdVDjh9T; 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 1qEPLr-0003KF-SZ; Wed, 28 Jun 2023 03:12:31 -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 1qEPLb-00035D-1u for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:21 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEPLZ-0005Jv-B7 for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:12:14 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-313e34ab99fso4601131f8f.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=1687936330; x=1690528330; 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=lVxMdYHFaukC6RxhKHYCpwZeKGUEXTZS4jUfSlEXDBo=; b=QdVDjh9TDhi2MATF9uknK2hMEq1oIATiyryU3c02MV1WTUK2Tf5lPNA10MkoEb8Tgj 78do2pgqkechdUlLzrE5EKO59tpG8SqSGpP0axEY+QGDSAaDY04JzLPR/L/4jIcwjL3B wceExmfQoErQyr+TD/EdehZVIKe8Ea+otvoUVswpDSyshUSb/WyzaZBn9HQnus0if+co rg92niiztLv7cVe0KD/uADayT8jcsmGJQm4pxdkxRLmPIhnTkIgMZ8KUjQoiAgtyNZGU 8iRDQIVNzLg0AZ9UICEcAGTv5HVRXAzBMqRa7SjRh8MoJSJTHosp++E/o9Ah+gtCOlCW yqZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687936330; x=1690528330; 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=lVxMdYHFaukC6RxhKHYCpwZeKGUEXTZS4jUfSlEXDBo=; b=bR2DHxCJcDE1amZnwRCslA7R1YmWxYInzL7fCh1uBUuJ78s/Ptt5kcU+o5elbjs8mM 2tUWB5ImGvT5QHaiKpqfDCp6dkjuC08ShWpyI7nR/KKoW+ZoE+kkhgS6rCOJoAFboVBy 78sTrBbIx/di17dXYkFFZeysdnpHJN7ZD2Xy5ddPVkgwrc145NLTSt8LRNWSfPewi4yb YLCnBkOj0edRI3w+K4TncynB2zJMrRrWl+FDKbqk2t3SWrXDAmF+ijwYaF3VCJIfAJVZ kd5Ze08mtZt9VOjUALvPxRHnzaNB301jj4XHfPnWP0dtX6lUtArfN/xniCTy41fGwyhz XIFw== X-Gm-Message-State: AC+VfDxgkECDk3iyjyqwMzs8i0HXUq2BseGqFNPcc4vNH+TybiLMcMfr kgmGCSRg2gCX4zHdFNthaEo5lpXT+zAM7b2BkcwjLNVV X-Received: by 2002:a5d:6785:0:b0:313:f990:c631 with SMTP id v5-20020a5d6785000000b00313f990c631mr3741094wru.44.1687936330083; 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.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 00:12:09 -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 7/8] target/sparc: Use DYNAMIC_PC_LOOKUP for v9 RETURN Date: Wed, 28 Jun 2023 09:12:01 +0200 Message-Id: <20230628071202.230991-8-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::435; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x435.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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- 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 17afe98523..9148e33283 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 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 */