From patchwork Fri Aug 16 07:23:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 819729 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c8:0:b0:367:895a:4699 with SMTP id m8csp161968wrb; Fri, 16 Aug 2024 00:24:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVxxyBgrFUD9leluMtOn8MCEhklTLev0pXCEKUVDrtAPxrY3U8mPT5G/MHK8vAnddTe8Vej9mC+YI4IKFyAQW2e X-Google-Smtp-Source: AGHT+IFWx9hKh0rUkkQG0iy/47yg4xtb2R44rCA/Yu2Lt9m0L/vC1cKLZVqTKDeQ2CeTAgz6Vo79 X-Received: by 2002:a05:620a:4116:b0:79f:8a2:c33 with SMTP id af79cd13be357-7a5068f29edmr289257985a.8.1723793070491; Fri, 16 Aug 2024 00:24:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723793070; cv=none; d=google.com; s=arc-20160816; b=MANoh/3u+yhd3+Namp3Nbf12iZTzkW/amkH4UCXIspI34tfqckUm74bHYp5xJhNCBR vV/WcKUuitUok/28xmMW/TmXCkBdr8riOY4a28yJEcHXKwJQAgjn64ch207qI7zlrYdg hIKbteXZp8WMJzTfDKO6cjxlzMRjdGYQ7V+SAPXplkra2pJ+ysjLTrVHAvbDkTJ6Fsez hcSYZURJvwbjwyNaqEsNN4k3gWJ+SRoTSqfNb64dSQEVt6Ln26NhkkhFE+PIIGc8P2+L dTLt+C+yjig/QySMoUSRQr6H/MCkVIGTyMXMTeJ/CxM7oBde9zs+gD5AUFCmjTJ1Qx38 wHug== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=7o74z2jYqMnAGW52/hRgkdhTpNI67oRRMh60yVxM2GM=; fh=p/+L0Odm18RRMlFO3Np611soLgx+p9X23e419/JuZ6o=; b=0Xlt2ErVSkadDYaQFQI+pNoqs7eILTy0D8ikPQhfSH+s67j0eatEH0RF/9tIsV4xzg hWuaq4Y7Po8GUijjiQYA4ElzjmigK4djtJAeCS4GlkGS+425mCFkoyQKT/0OEgbu1NhX 4/N92px8JKIHQOc3xCpjSLJEakSle6F1LDM5yiX5ecmgyZvFc8B2ItJwBEB81gt9D9JO 9lDh8pmbe1JVlNxDc4raej6lPPPra8p8Jb2ztXQ5NtdJmg6p+Wu+I5BSbzo2eq27yiNd 9c2Qj1nE2zuMEMjj9og3FH7KU0d+DXfSjwumVJunpRKJF5CVOyeJrY0K4RshClk0E9Bg lfhg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yd8zNlF9; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a4ff0e55d1si374033385a.384.2024.08.16.00.24.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Aug 2024 00:24:30 -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=Yd8zNlF9; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1serIx-0006gX-3U; Fri, 16 Aug 2024 03:23:23 -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 1serIv-0006Wl-CL for qemu-devel@nongnu.org; Fri, 16 Aug 2024 03:23:21 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1serIt-00041O-8h for qemu-devel@nongnu.org; Fri, 16 Aug 2024 03:23:21 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1fd9e70b592so17717265ad.3 for ; Fri, 16 Aug 2024 00:23:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723792997; x=1724397797; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7o74z2jYqMnAGW52/hRgkdhTpNI67oRRMh60yVxM2GM=; b=Yd8zNlF9ZWNfxFZltf2O+BoBuNNi7HmVLZWYBPEJ1TTDtjLB5+w5B54BimiHg44kMf iDZVn6t2gm6izKFPoKdgqRdQfDLBfoXSGROorvd2H+cm8terrFVWHoHDK+mQbIYn1lRF c6r9cw/p5Wmf3qrgUCbtF6ScHehrRVyvJeM5RBiM1WXG6lWw2ez/bHc0l7dK/jaZk+P+ Rjh7rl86+/1IoBBfCVkR82EvMeAhryZqg9Pwzlcped0mf/qogPap1zGvhuZXU3zZI2tb XTR2SaImKWdpFGEihHCsyi2lZkUkLr7yBsuab9mfeFKP2lVJcPXa5Ow07QYghahenMOT jOPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723792997; x=1724397797; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7o74z2jYqMnAGW52/hRgkdhTpNI67oRRMh60yVxM2GM=; b=OkqkdvczKqZTtsvodcZ7dA3SBx2kVVqJMXp+nRIOFLeT/43OHWTFNrt/o4UTJuLcIw NGz3GnKId7QufwSOjRVy5WPezh9HMsCWI1NdV8HlJ+jEDfvwl6kSts5mg6Q6OGWWFz+i aMz0ubGikNZaCJfbe0cZjqDRwQVaGzXq1IR+E/80nHd3FgAPW/z085LLRT8IER+GtDwo 8M/fy4Hk2IHtoQWds5ESbBSgBAFHYNI0q3mD1mUB0rsAETFD5rizgmd1CIKuxfAPXCSu 5iLoUts95GU8/MgJEv3sjZGEKs9YTyof6yuecI9CN6pPFV/5Ewv7AVsXJZRCGc77Gyvu 6bQg== X-Gm-Message-State: AOJu0YynuKgxvKWG5mm85HjoqhFF+09gZnzmEsqee/uH75RgL6j/sxdj zCwlUvqgg/GhBBGIrMs3MEcc3CCB00XcBppNptTZ08KMpfnpJ+oRwPGZ3v9dT/0nnmVA8FTdgiI 4K8I= X-Received: by 2002:a17:902:ea0e:b0:1fc:86cc:4254 with SMTP id d9443c01a7336-20203ec5f75mr28991285ad.33.1723792997278; Fri, 16 Aug 2024 00:23:17 -0700 (PDT) Received: from stoup.. (2403-580a-f89b-0-1b6b-8c7b-90f9-144f.ip6.aussiebb.net. [2403:580a:f89b:0:1b6b:8c7b:90f9:144f]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-201f037588esm20195525ad.171.2024.08.16.00.23.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 00:23:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: chauser@pullman.com Subject: [PATCH for-9.2 v3 0/6] target/sparc: emulate floating point queue when raising fp traps Date: Fri, 16 Aug 2024 17:23:05 +1000 Message-ID: <20240816072311.353234-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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 Hi Carl, While digging through the manual to figure out if we were really doing the right thing raising the fp exception, I found the fpu exception state machine. I'm not sure it's worth emulating the fp_exception_pending state, but it's certainly easy enough to emulate the fp_executing/fp_exception states. In addition, this simplifies the implementation of STDFQ, restricts FQ to sparc32 system mode, and handles migration. Would you please double-check this against your Solaris images? r~ Carl Hauser (2): target/sparc: Add FQ and FSR.QNE target/sparc: Populate sparc32 FQ when raising fp exception Richard Henderson (4): target/sparc: Restrict STQF to sparcv9 target/sparc: Add FSR_QNE to tb_flags target/sparc: Implement STDFQ target/sparc: Add gen_trap_if_nofpu_fpexception target/sparc/cpu.h | 30 ++++++++- target/sparc/fop_helper.c | 4 ++ target/sparc/int32_helper.c | 32 ++++----- target/sparc/machine.c | 25 +++++++ target/sparc/translate.c | 126 ++++++++++++++++++++++++++---------- target/sparc/insns.decode | 4 +- 6 files changed, 169 insertions(+), 52 deletions(-)