From patchwork Fri Nov 11 08:08:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 623725 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp634880pvb; Fri, 11 Nov 2022 00:31:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf6yCDeotffkLNGRAUKisJcPJntdIlfRhNIwJm0cdKEJKxfYrJ4q1U9X4XWiYGaIt5GzOEk4 X-Received: by 2002:ad4:5363:0:b0:4bc:49c:992b with SMTP id e3-20020ad45363000000b004bc049c992bmr1028193qvv.61.1668155476861; Fri, 11 Nov 2022 00:31:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668155476; cv=none; d=google.com; s=arc-20160816; b=u2s3Iv6uHPGXUbLXoGxhl4eaOmuUxgGwC/XXR+jzXQVjHYSBjXvS1tSS2OteG8LEsX n6NA8CI6Z6QjbVAldxCzAOwWCod/iYHmXxCamBA2PuIs+08JggY1NfnKodLltBOBwqyB hsOGFMEUITwDpcn/ruz0CxfNXyjlCNFzqryWQfcWBejgX8XV1l69zlZjXMvkWV+GkkUQ JDzuL9fcxbwnOalPtqlHyVP6EC/XNiftSWVq9jeuWlIBTala/SnYRpPfmu5maK9ZCiEy IBWI+sl6rhrNzp74+mYNKkTEK9r6rjf4hHgiVr0V1t5wPe98U3eEFAirW09xDGQ/fS3S PlOQ== 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=wHZLFNNm0ZFp31ulDF75QeL44+XwFwYbg39T7b6YDuI=; b=G+DecVh+iEoyB1TiswCiWLINqa4gIMACm4XszW/KWB+KE79yM6epEMwpdx2BL1JSr4 aqHYjlhFYIps4pjs2dnaH1yvqZIvc0jxaWNCpl4dyADbLe6okUk6PHdnDoWr2dHAh9pS ahC1LjaC3XgHptPNswvg9q9UxxoBSfEnrGn7lh+7SNJiR8fey9TtgnN2vBw+8x3qWziQ SvE1FRVYUyJWWY6sooCc4rBUvIf/BvVumTwIc5QhkWMzk6sO030d4oUBibbr7f01xM2n DFbHqc1vPSn/960m1HsIIjS1q/m1O4NmZU6xF+ARv54AbZpgUtGM/8BbbkNkUKTcIGTg 98Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lrvExQqH; 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 e1-20020a0562140d8100b004bb9dd1b84esi632728qve.123.2022.11.11.00.31.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2022 00:31:16 -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; dkim=pass header.i=@linaro.org header.s=google header.b=lrvExQqH; 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 1otP6B-0001F7-D8; Fri, 11 Nov 2022 03:09:16 -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 1otP5a-00012y-Io for qemu-devel@nongnu.org; Fri, 11 Nov 2022 03:08:39 -0500 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otP5Z-0002EW-45 for qemu-devel@nongnu.org; Fri, 11 Nov 2022 03:08:38 -0500 Received: by mail-pl1-x630.google.com with SMTP id u6so3649005plq.12 for ; Fri, 11 Nov 2022 00:08:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=wHZLFNNm0ZFp31ulDF75QeL44+XwFwYbg39T7b6YDuI=; b=lrvExQqH1w6XjkIQYK2d419/m7ZliWnB2NPGas5ara0PexBj0NzQQYMqdYn/E2S6qn jHyP5QR5vsAypg2dYuKrGPR3FTW/vUtQXiXY2kw5IiwYCXnVM6ZJeBzkzaxQN0qGj7U3 xCo3HVk20Ht0uihAGa5qv9ASgpUP7AbL+lUjPYmg2ftaGLAaWCXhmuN5EvCoLRcXVNLW A+HjPkjQeKxIsDvoY+x15GIXL0sef4dCMvoz4bnBuEsEmVOLv3tnGSW88i2M5rAixeJl zruW0MpVDO7SCQrr4AtuEecAhP6Hfp9h+AHLFAhN1HDwBo4EDL6cbJzd7vMlvMEn3N2f Wi0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=wHZLFNNm0ZFp31ulDF75QeL44+XwFwYbg39T7b6YDuI=; b=PWOmsCSBFpob8xdWEa7fTqbb+VU+NgS0rG8gon+r4tpNPJLUBTF5GsHx7rNblHbLDt zosl83pFTpbkYBRD0XQpagY8264ugcIKugyKCM3baaf6dxh+fBWqh457VAluDKRK4h+L Q4uHuXvLym8QL+fIoHDnkSzb9eeP5QQWwayixJM6NkJLqjX1um3AWk1va7M0Qnzx2LIu SiEj4j21XpoLRToYluGjp9UsDbEvBA/VLq8XXh3sowY46CHN43Q+JE5GTBdLhQimnCir oLkL+rXY1nuYM+2PJwylNxvXF2kPFvYoXbAdQw43Z0lwkPtIx8UlUC9Fa115smu3kRQi Gyxw== X-Gm-Message-State: ANoB5pnTNN4m/d9Kh7+HLsQUE1HBxi3XJ7lEVNTxcsatC6rqA4RJ8B2O Yh2IDVh0g9vzUYgDdA8wJMT6DUDx9twk/XBa X-Received: by 2002:a17:902:b781:b0:185:40ca:68b8 with SMTP id e1-20020a170902b78100b0018540ca68b8mr1541673pls.16.1668154115458; Fri, 11 Nov 2022 00:08:35 -0800 (PST) Received: from stoup.lan (2001-44b8-2176-c800-0aef-59aa-1faf-7e61.static.ipv6.internode.on.net. [2001:44b8:2176:c800:aef:59aa:1faf:7e61]) by smtp.gmail.com with ESMTPSA id j4-20020a170902c3c400b00186a2dd3ffdsm1046341plj.15.2022.11.11.00.08.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 00:08:35 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: iii@linux.ibm.com, david@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH for-8.0 v2 03/13] tests/tcg/s390x: Add long-double.c Date: Fri, 11 Nov 2022 18:08:10 +1000 Message-Id: <20221111080820.2132412-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111080820.2132412-1-richard.henderson@linaro.org> References: <20221111080820.2132412-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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=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 Acked-by: Ilya Leoshkevich Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tests/tcg/s390x/long-double.c | 24 ++++++++++++++++++++++++ tests/tcg/s390x/Makefile.target | 1 + 2 files changed, 25 insertions(+) create mode 100644 tests/tcg/s390x/long-double.c diff --git a/tests/tcg/s390x/long-double.c b/tests/tcg/s390x/long-double.c new file mode 100644 index 0000000000..757a6262fd --- /dev/null +++ b/tests/tcg/s390x/long-double.c @@ -0,0 +1,24 @@ +/* + * Perform some basic arithmetic with long double, as a sanity check. + * With small integral numbers, we can cross-check with integers. + */ + +#include + +int main() +{ + int i, j; + + for (i = 1; i < 5; i++) { + for (j = 1; j < 5; j++) { + long double la = (long double)i + j; + long double lm = (long double)i * j; + long double ls = (long double)i - j; + + assert(la == i + j); + assert(lm == i * j); + assert(ls == i - j); + } + } + return 0; +} diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.target index 79250f31dd..1d454270c0 100644 --- a/tests/tcg/s390x/Makefile.target +++ b/tests/tcg/s390x/Makefile.target @@ -26,6 +26,7 @@ TESTS+=branch-relative-long TESTS+=noexec TESTS+=div TESTS+=clst +TESTS+=long-double Z13_TESTS=vistr $(Z13_TESTS): CFLAGS+=-march=z13 -O2