From patchwork Thu Jan 26 04:38:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 647047 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp58132pvb; Wed, 25 Jan 2023 20:40:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXsiwtD6P3K8VsNMssUDRl3OXwyHGVnfq2Mm6KEnFFo44lvtNuLeYia/AcZ2QD4GEzYaRXlM X-Received: by 2002:a05:622a:4a0f:b0:3b0:b9a4:a20f with SMTP id fv15-20020a05622a4a0f00b003b0b9a4a20fmr54091149qtb.4.1674708001548; Wed, 25 Jan 2023 20:40:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674708001; cv=none; d=google.com; s=arc-20160816; b=c14vr8ioSHQ/yDXHtx6GguniZTga/FVe628FJO+djSezb+I4kXVI07YlpAyZsfy4jt 5Ohh5mIWiinqR3ElPMceAv09e0xv4e5vr0IoNtQFysucLwawkNpt2vcTpDWBmtzFuvHu cFDEnhwmZZ0068//goOjhnA5/c/gaq4dsirVYyJWysQKmlj2nWjF1Wq2uJ+fFY2Bujnm yk2QNmivGL0gSRqPBHN7d8gPpyo+oZB7iSh3JLYdZebft0YwYH8IYMU4G3sDbMqeksqW Ah+D6YSE4Na+OaHR/WgutMsvE9pv2MdIl+YjxIhvoxbzxnqBZdSbFtWtfHBOwD6D0yBQ F9ZQ== 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=XJlQ1ZDdzdz8urUjxab7bAeLFEXl2+XvA/kUFtyuGcKvB3SsLE01yurZOYW1MQ4fGg yBR/Czacs0BuuyqqgrDn4IkkEuatHX0cD47u3S3+RUIVZbqKMIJwvgozG23NnR6QZCVz LN2rqxlNmVOyi/2lL8s4aANlhjL22DNSYK3p4PxyoWxfzc7cjFdmmMu5tft58y+u9bjv MWgd2tgZpDtbMUmq3eR3x8IE3xmu+INT93ZBDBvYOLlIgIE6lDvy24mgyuQ/lEpRF0h6 hP9pAmTAo9u1GAk60Z9BqBtOUVZ2Z3o1LeyuVcgv4wKPu7BF8R8BfgC4aHelEmBi5Q1m 7mqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DRk6XXyz; 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 c11-20020a05622a058b00b003b62e2dc90esi131816qtb.343.2023.01.25.20.40.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Jan 2023 20:40:01 -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=DRk6XXyz; 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 1pKu2Y-0000HP-IT; Wed, 25 Jan 2023 23:39:10 -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 1pKu2X-0000H3-18 for qemu-devel@nongnu.org; Wed, 25 Jan 2023 23:39:09 -0500 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pKu2V-0004Rg-Fw for qemu-devel@nongnu.org; Wed, 25 Jan 2023 23:39:08 -0500 Received: by mail-pj1-x1035.google.com with SMTP id z1-20020a17090a66c100b00226f05b9595so756996pjl.0 for ; Wed, 25 Jan 2023 20:39:03 -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=DRk6XXyztC0i8zM1NC8JU0QlibApXebR0Xvz2JS2Z62Ch95pvxhxtkxJWUe9ykvzro KHhaKHjz5aXe0cmQqJ64+j2o1rbASsS086cYkWAKQJK8OoIeaJkpGDPKCaRaXvYEa42d s+3aLvQ3oJyyIAXbeAqDFPD/026GS58Le3W2YjKtr6VLnYr6ZNKF5l9POtlAUg8EZq3d v4ug8uFHOj6BsFIeRdATlinQt+X0Sy+kHS+lhA8LYZEappLj+h5a4Mew4ehgg7muiwrr 0GqREtGMJN+2SY8BSe9nw/N3/oD2AqCIW02uuyCwsVleB2g4ytOsQXddwVo0slyLKxEi aiXA== 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=agjusueq45T2O6wImamFQr1sjzxQ10HtIj+GwonbJHEHa0S6LAgoTZWZMGvk2BB/At JX/Q4sb5PusomFf8FVoiCac+jGVJWnP1hXljuyRJtRRJdZ9R5ycqa9yfZ80XfPmerPsG oS0fhzCeHlCrCSwHDtqjH1oIGVdaDlKNJiIGsN/GzT5aNMAS7C3txEozBh3IDGY90XkS H1yqHPjAL7W+NeVmlUcepU7ROKO8fk2GhCgyjr8N5SUzx/UX35v4Qe2RmA4JSkRhjLmo vGL7jAEEYY6oQwwm+YFGjxN+tJgkYITdoHGWmMAh9h3MPIi3MMNwgMNfFxis8n/h8zOc /nuQ== X-Gm-Message-State: AFqh2krd/slLFFmaRTKpVcxTUL1yvzRJx8w91AT8JfpbFA4tCktY0pvv Tbfu4nSafG5Hn3VYwNDGdnMkI+bjQiUc8dezXXQ= X-Received: by 2002:a17:90b:3143:b0:22b:b6b0:7889 with SMTP id ip3-20020a17090b314300b0022bb6b07889mr21150978pjb.15.1674707943423; Wed, 25 Jan 2023 20:39:03 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id s62-20020a17090a69c400b00228e56d375asm233376pjj.33.2023.01.25.20.39.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 20:39:02 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: alex.bennee@linaro.org, Ilya Leoshkevich , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v5 23/36] tests/tcg/s390x: Add long-double.c Date: Wed, 25 Jan 2023 18:38:11 -1000 Message-Id: <20230126043824.54819-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230126043824.54819-1-richard.henderson@linaro.org> References: <20230126043824.54819-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.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