From patchwork Fri Oct 25 14:12:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 838363 Delivered-To: patch@linaro.org Received: by 2002:adf:e287:0:b0:37d:45d0:187 with SMTP id v7csp309258wri; Fri, 25 Oct 2024 07:18:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV2hkPL9Mg/TrFMgEMQ3QYM4mrlGS/I08YPqD4Pv0CQkO4URpCK0o94/aGTV5jyXlhdI75t7w==@linaro.org X-Google-Smtp-Source: AGHT+IGLkjVsRu+5876sUfluoiymoe6Ku37HSTpr+VyfgW+RwPyRlU6nev7fYraB09kGKRAC0V84 X-Received: by 2002:a05:620a:4413:b0:7b1:4940:e9f5 with SMTP id af79cd13be357-7b186bb2a9bmr741215585a.18.1729865926736; Fri, 25 Oct 2024 07:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729865926; cv=none; d=google.com; s=arc-20240605; b=Wu9BpZ5RFuHH8Y9/CFS/jRwP9Ln9KaupYJGXiuV/jloIBCimqlFXMM2QZj9WkKiaX1 tkqvCwQs+dtn7B6XLZFFhQFFPcGWyYyqQJeMv2OlgLJWGEfTNpIg+vqP+y4hpgvQh/Az afvm3B0EaeoLruC0Whso1NZOpQZFN7NM9ZjB5zKWo10V7MQpV/SevtnvwMViqBr868mn gu40oCAIM3CzZ5whR9NEvhByO4Cy09EJkL33bULvn0u4pJL35SxYmyt4kzUMmaFduG2D 2uMcSChB7P2sr0+u8mcGjj7XrEtDPlnTSSgPJUZtNGBl6xp7NY8rF42eeRDhkUD9nunr wnKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=ID1X5YPOP+wvOiim/+MbdA0+ojv9rI9zYRkjUusf1JE=; fh=MdZyvABTR4Gr48YQg8oSoHG4tFa6/Z6x1llEAnNb0w8=; b=Gn/+hC7NSxieViYKwlK7TZPUTcHTPo2OvAjJkWjreHCpzKT4AY714aioFSjqG8IZDZ l56FGCOQBeTHeAe0W7WKvjUGl73Sx9vT3VmpyRIv7Lr06cdr70UkmbX9MaI0TMdcoPOw 1vQpF0CygE804Xbpv5kKatKhgomZDb9stjAE/LyKpD5CSfvZQeKcuPWicSwrnaAVfyEm AzpE6KXNNgslusjcL/EL6yABfo0D3SdQ9U6ZOScW2FWVXJZedn34KvIofVKI5yoHbDYU fp4NDc37v25325wL8B5PTyUFHJV7TXgSttfW9DBhVZK4tODxCZTS3wwmtlsm5+IRs8Zb Iotw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=frUVCa6z; 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-7b18d362384si156976785a.640.2024.10.25.07.18.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Oct 2024 07:18:46 -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=frUVCa6z; 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 1t4L4I-0004VJ-9m; Fri, 25 Oct 2024 10:13:34 -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 1t4L4A-0004PK-Kq for qemu-devel@nongnu.org; Fri, 25 Oct 2024 10:13:26 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t4L3y-0007uk-EN for qemu-devel@nongnu.org; Fri, 25 Oct 2024 10:13:26 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4314f38d274so27178475e9.1 for ; Fri, 25 Oct 2024 07:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729865593; x=1730470393; darn=nongnu.org; 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=ID1X5YPOP+wvOiim/+MbdA0+ojv9rI9zYRkjUusf1JE=; b=frUVCa6zjscDYAOYmoQ8cjuBVXi9RkfQzHEIXNN41ZZV86q2w5A/+NuWeG/1eSgVxq kjH0pmkygx55ygkHZoSbT4CSLBwcoKHx1ZlT8aP2tmon9HxCA4/BMUXlSlnlc7hIa+st v4M5JI+s/p3+C+6oVGnIB5yxH7F2blMWFXiALkAYNsTIY4IUZHVGv3+K1N6u9xeodi1x 6ofMEW5gthepKcGKjPP/nniHttGyqCvwWCc7fTHq2LAdwnp7KfKadl4LBF5jGaWfeqMm K8viK/smDnec+yXRuxV3NlZidwycqY47bZQe1N+gvO9/noWRYMRawwiaT6NQ/WlAB7BL 4Geg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729865593; x=1730470393; 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=ID1X5YPOP+wvOiim/+MbdA0+ojv9rI9zYRkjUusf1JE=; b=vqQU9EAb9R6LQx8k63hrVg4hzNP5aJUjsMvlA+mqe9WcT47fA5EODfTwcBPcCCTM72 dH8CfP0MeA5l6DTo3uNv5zP6qmyMyje2aXsTWUh9Axc6kYIJLQd84hnG0VlFY29S9E0g OX/mDyNaepuVQUFGmFNSkI+WZ8lKpAEUxfFDDwlPvIVCFMb+M7dy3KFe2jgGPo2tkiJf nGTAY/217PVu7kvGZGh1FoHYyqnHqOD5groDPxqiGC5hy46StEAOtXD/0CTPDRvNzLrX 2i8Q3oPwo5tJY7GxZqDmHrfUwgeToHcgCxcFB0+sM2sOiFfQfJNcn52UsY2aa1k3EEpy 9wkg== X-Forwarded-Encrypted: i=1; AJvYcCVn1jWLWtTyS0zKDzJyQ86UnVdHj77R3RgDGyvfOCNczTK2RQiN7DhJFAn0jQqf15+vPBEEJO8KT0hi@nongnu.org X-Gm-Message-State: AOJu0Yz+8RprHoMc9OHKYvGBeP1fXps4vuN0TLhSUlpEuhJV4LP9eH4B vexVAbozARx4pzjn3imPUdl9RisVdqNPMk2zitla6n1RnkWvGDwgkaeo5WcXCpM= X-Received: by 2002:a05:600c:4f04:b0:431:24c3:dbaa with SMTP id 5b1f17b1804b1-4318c8db165mr63501525e9.2.1729865592796; Fri, 25 Oct 2024 07:13:12 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b57b051sm50104535e9.42.2024.10.25.07.13.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 07:13:12 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Song Gao , Eduardo Habkost , "Edgar E. Iglesias" , Jiaxun Yang , Aleksandar Rikalo , Stafford Horne , Nicholas Piggin , Daniel Henrique Barboza , Yoshinori Sato , David Hildenbrand , Ilya Leoshkevich , Thomas Huth , Mark Cave-Ayland , Artyom Tarasenko , Max Filippov , qemu-ppc@nongnu.org, qemu-s390x@nongnu.org Subject: [PATCH 19/21] target/openrisc: Explicitly set 2-NaN propagation rule Date: Fri, 25 Oct 2024 15:12:52 +0100 Message-Id: <20241025141254.2141506-20-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241025141254.2141506-1-peter.maydell@linaro.org> References: <20241025141254.2141506-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.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 autolearn=unavailable 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 Set the NaN propagation rule explicitly for the float_status word used in the openrisc target. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/openrisc/cpu.c | 6 ++++++ fpu/softfloat-specialize.c.inc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index 6ec54ad7a6c..b96561d1f26 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -105,6 +105,12 @@ static void openrisc_cpu_reset_hold(Object *obj, ResetType type) set_float_detect_tininess(float_tininess_before_rounding, &cpu->env.fp_status); + /* + * TODO: this is probably not the correct NaN propagation rule for + * this architecture. + */ + set_float_2nan_prop_rule(float_2nan_prop_x87, &cpu->env.fp_status); + #ifndef CONFIG_USER_ONLY cpu->env.picmr = 0x00000000; diff --git a/fpu/softfloat-specialize.c.inc b/fpu/softfloat-specialize.c.inc index 40cbb1ab73b..ee5c73cad46 100644 --- a/fpu/softfloat-specialize.c.inc +++ b/fpu/softfloat-specialize.c.inc @@ -407,7 +407,7 @@ static int pickNaN(FloatClass a_cls, FloatClass b_cls, || defined(TARGET_S390X) || defined(TARGET_PPC) || defined(TARGET_M68K) \ || defined(TARGET_SPARC) || defined(TARGET_XTENSA) \ || defined(TARGET_I386) || defined(TARGET_ALPHA) \ - || defined(TARGET_MICROBLAZE) + || defined(TARGET_MICROBLAZE) || defined(TARGET_OPENRISC) g_assert_not_reached(); #else rule = float_2nan_prop_x87;