From patchwork Fri Mar 10 22:09:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 661659 Delivered-To: patch@linaro.org Received: by 2002:a05:6504:1b90:b0:222:2e2e:b2c3 with SMTP id e16csp15411lty; Fri, 10 Mar 2023 14:13:03 -0800 (PST) X-Google-Smtp-Source: AK7set9JvhJ3fygxCFAHwxEaKvPlmDoPGOr/Am3xYk66PsdxH8Muhu3hsId6D6mPj49TJP3RM2BH X-Received: by 2002:ac8:7e83:0:b0:3b8:2e36:9d24 with SMTP id w3-20020ac87e83000000b003b82e369d24mr45378067qtj.50.1678486382956; Fri, 10 Mar 2023 14:13:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678486382; cv=none; d=google.com; s=arc-20160816; b=eG9akX3am191POEMqIDbreGYhFNheYtB0MUmZztAxjS2tQvcCay11t+MqurLt4vVd5 X4hRki8HzP/Db6ok5fQX53NYZab1OqHaQ1apfjDggLcpzfgLKxX6gMtK4Y79IwDW3Si5 YxP76Ef4QTS4UHqt7puCFl9EIzPCJV+SbR3zY21DyVZe8rZGoL0fCtSbbm/EtDhDlPnG rYoJQ/0xidyiFzTTUsIyOIHp8rhIHIrkTfOHqC13EFx/tHQ0ROanScT989CNND0F8QcV 478rQL/s9Z70DUp4swEkAdmbGy9A0rQSKbZXS2reAQrZHT8BkbyLf0PcHenkUgfTit4w ifZQ== 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:ui-outboundreport :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=/TwS21vA/Xfyf3OlH3g4+rHZQdV5DKG8eQomNRsWoYc=; b=VHiTdcHspxhUZAELYbMjtRt83OGydF+ElV3QCSvndkzVkYiIC1BzNQ2d4RPGyGfqOR r32D2RKM98jzhZMDoLR6F4p9pCqai0EBlDmB7DFot+/jLuicKG9F5D8zDQ2kPm3Or+PW gTk8iJ/mO97wt70Mxw62x2iiwj7rEh9+OOTaDrywARN3zI8+uq1fv1ZQSxf5Qh/UKepr QSGUH4QdEZyAuquZLyxXhMNk4pdxYs8QUaaHWaGozohADxysrCMUBBEoEyGwjZ29jd2m 3iTJ66q8JreUebXmmct5PgZf/vpNbAPJAhlXns6XOYYUOfTKwYvuqrbbsvKEOmcmx58m KBVw== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id de28-20020a05620a371c00b00728ac20497esi730416qkb.623.2023.03.10.14.13.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Mar 2023 14:13:02 -0800 (PST) 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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pakvs-0008J2-Gm; Fri, 10 Mar 2023 17:09:48 -0500 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 1pakvk-0008Cj-3C for qemu-devel@nongnu.org; Fri, 10 Mar 2023 17:09:40 -0500 Received: from mout.kundenserver.de ([217.72.192.75]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pakvi-00031r-EC for qemu-devel@nongnu.org; Fri, 10 Mar 2023 17:09:39 -0500 Received: from quad ([82.64.211.94]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N1PLB-1qXDKd1EBH-012oL2; Fri, 10 Mar 2023 23:09:36 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Cc: Laurent Vivier , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PULL 16/28] linux-user/sparc: Use TT_TRAP for flush windows Date: Fri, 10 Mar 2023 23:09:15 +0100 Message-Id: <20230310220927.326606-17-laurent@vivier.eu> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310220927.326606-1-laurent@vivier.eu> References: <20230310220927.326606-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:3osgtKUSUE42GHakZ8Boh8BAVEX/rtvPKEe1eY0917jIuWA4uHj R65dZrqQR/7c7w66SR0utsCOPurnt2TQh4bUVDecxuQDAxR1wxXLDBGIgeqkXKNrReRtBPM qbMtL0g3TAx/ZrR8ovxNwXQM8ZOfoEkrOmabhbVkkgdQejUWZbITkO4IALqwkUIXTsUjBCx ZGkE+nGyRnc7ZO51msdCg== UI-OutboundReport: notjunk:1;M01:P0:3bvzu7Ljdl4=;DeIoEthcNAO7UbFpNjB7U730qEn H7MR6iNdmASDXuGVEaT4pHWlZ+gdZibCdtF6CVQ6vtpRfhyhfkMKMpwD8bP80MWtXGkEjZQl3 wNRHCjvm7Zt7QNp54g5SLoajlX3PEzrXhPMZt+I7Cb0vz8+PFPLxpC6rC98ihDq7y4vLTZ40J vRI8Yrc5/JsSci8Tmc9QR2Odf0ZVCHy5iWrWCWWbepE5SzA1GIwNur2+EeDEwfTDEctzEKbOM 5FyP0iZ/R0b9kaXRJIUHAeF1LilAE2t3ThhTBmeUZKYneWJh16Ptv4xzVx/VFwQPEX32nz10B /RDeviqdRBMmN+BNKcqKsv8zMjSrd3VcvirpKSD49DzePneiCcXRB5qtY+c99Qj0PnnHXBj6B QiQf505DWccPV5tTsvaOn1fG/mxJUEcMvr/TZZj55NdPpxUtwasbkFZtHDlLJl9xxBzFNkIuL kObx2vgWIpEEk9ZhlcP55yE/639dBQ2SlU/xtlwDEPnvOiz0BvXF8Ij6ljwiD3RLZ7laHDIzr jIBdS9H+OhFyavz7hZE14sV/sNNB4/FuuW1CHxsqq8NdMiON42RpWT/3of2zwxyF9OduXD3bM 5rxYo4uG9mLqaBeGC+Jn36lzDOWxeikf2f1eYZI2BRkBHNKLAKI6gPs2/RnjUtV2UWYUYtxyF bTzbf8V3dHMSJTPcEdxz/5F52WkaaVal+JvzXmjZqg== Received-SPF: none client-ip=217.72.192.75; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 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 From: Richard Henderson The v9 and pre-v9 code can be unified with this macro. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230216054516.1267305-5-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/sparc/cpu_loop.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index 051a292ce520..e1d08ff2045c 100644 --- a/linux-user/sparc/cpu_loop.c +++ b/linux-user/sparc/cpu_loop.c @@ -196,15 +196,14 @@ void cpu_loop (CPUSPARCState *env) env->pc = env->npc; env->npc = env->npc + 4; break; - case 0x83: /* flush windows */ -#ifdef TARGET_ABI32 - case 0x103: -#endif + + case TT_TRAP + 0x03: /* flush windows */ flush_windows(env); /* next instruction */ env->pc = env->npc; env->npc = env->npc + 4; break; + #ifndef TARGET_SPARC64 case TT_WIN_OVF: /* window overflow */ save_window(env);