From patchwork Wed Mar 24 14:30:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 407827 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp469433jai; Wed, 24 Mar 2021 07:39:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy41FN6BBxMoXVVEG73XwaAuKzsaBuKXu+w8GILKC761+KmrB8d7CoxM+w8ZdfiO+b4XLzx X-Received: by 2002:a05:6638:191c:: with SMTP id p28mr3222649jal.39.1616596748926; Wed, 24 Mar 2021 07:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616596748; cv=none; d=google.com; s=arc-20160816; b=qPMYH0xIE+iJASJE6bLlxtu3x7QsfibR9R2/HX3o3+xzRckznWjii8wBJO913yrb6J ceh4wZknyryrvCBWKvf8IPqCJeBv7JlQKuIAaoICCT/+NZJVbs7CfD1TXtTCSvsMvcV7 0DzOkeybYSThrFmiKfbgUctMrzNUeA3ko/XmLE9PG0l64+4yz3RyW92KdBdZQEFRL92I 7PEmBzPwSgB2OXD99C1khXE811EY85U/cSwiIS8A1NnsGfxuUJ2g10kC4jMn960apLi2 YZ20pWfnoMUE6fO4GtRIIg9Au7LM28mmL7lNRsucpxFQcW1F3oKlOlo7glTbwx7xWfs5 loUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=EQ6CyjRWV4zJk3tXYM7i3XWmVgXsciBwzt1eUVUQ5Yg=; b=Mq292mVr0C+4Tg5059ZyQNUO4Aoros84JFWThyyrfAblrQtrQ7cA+2Q4iFAhQ2Wa8F BRq+PpbIky+Ddl/+ftBCgJsumO+fkyfn02l2BtmkIZEnrRrmVpBuUfmgaOyl/qz28Vfe yB05AZJOfF6ts0zD+TEgroPo/G8v7Xf0YoFolP2Ue44CjT4QDrxaiSG4uH/ujr7NUJkD wZ7yVtlJbcJFN6U9+fDUc+rcWsVCFul4ffcglGQ9SBXCTg1X0JV+5Kazt35Fe4gZiAWv QSJHjxmESIFOTBml8wZ4dBKq60VcG6beho84E/01jsfMgePsUbX33LUguSx9WN6QLooE 6lMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=u+Z2H6T3; 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=fail (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 i14si1628977ilu.67.2021.03.24.07.39.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Mar 2021 07:39:08 -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=fail header.i=@linaro.org header.s=google header.b=u+Z2H6T3; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4f6-0008EC-AG for patch@linaro.org; Wed, 24 Mar 2021 10:39:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4Wu-0006bd-Ex for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:40 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:33422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4Ws-0007Oa-5h for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:40 -0400 Received: by mail-wr1-x434.google.com with SMTP id o16so24691179wrn.0 for ; Wed, 24 Mar 2021 07:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EQ6CyjRWV4zJk3tXYM7i3XWmVgXsciBwzt1eUVUQ5Yg=; b=u+Z2H6T3gA4RnkbRTn66m4SURlRxJddVo7Uxi2L07Gxbv29vfX4zHngCptcjLGrzMP 3uXD6CpmuHvp/M474UeefnbW8+6asA7R0n6xaEF5c4Cgfi0m14ZwEgINBUva8gq62OXZ eOE+v5ua0LLR5d5f5Ed63tk7QrZ4ShaAcuP2yXhOKC86OnkXMkPP6k6NO7r2/T25r6bO ge/9Y2JGvN8N8+lsCqvKnRWJxpViHhgNqY+0l5Xbc6oXitnK247iw3Ld4sxcwuR82X1g hcUAgAPUvvQ+ax+Z3oOiD1wG+QUKMUEGPvI4Ib5BprnKUH1wp/nxiLKm00biSP0PFBfg 6xHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EQ6CyjRWV4zJk3tXYM7i3XWmVgXsciBwzt1eUVUQ5Yg=; b=mFseNNInqK/21IAotyp1xWrM2CJiWFmyENBdJSSNznumAoTWB8uDNj4+PDQ2KpOshZ MsYIZUZr0Tkk074rnrRrFrM4Et85K19JtKgLOh8A4ddos92iaM/cbnnuPwUFQIaOHScR ZOjmopQ95kA7Q2WePZB5QEpI8RznVXKBdl6OTsFZZOaUeOqzUWFAqyaNykh3ZsTqfABy vwkP6wGOUEpmf/mn9/AvpPj0HnK7Rq2qOtRnGsogBJY9ZZ+finN5lKySD9kvLfNTz2kd s3CuAiVAVESYzN387Pj/s9ts6n8TtzI/FekOjIcyvZbxO3EgbOtmo/xu2072gSw41bTV Zdog== X-Gm-Message-State: AOAM533pQtEUf3t1lsRaZXfjr54PgvTsZg+m0BO3c36IbcvFAlnAgLBV MSALeyqW+f1PfofBA3P5/68GPg== X-Received: by 2002:a5d:6684:: with SMTP id l4mr3767163wru.381.1616596236749; Wed, 24 Mar 2021 07:30:36 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u23sm2759517wmn.26.2021.03.24.07.30.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:30:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BEF8E1FF9A; Wed, 24 Mar 2021 14:30:22 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 11/22] configure: Don't use the __atomic_*_16 functions for testing 128-bit support Date: Wed, 24 Mar 2021 14:30:10 +0000 Message-Id: <20210324143021.8560-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth The test for 128-bit atomics is causing trouble with FreeBSD 12.2 and --enable-werror: cc -Werror -fPIE -DPIE -std=gnu99 -Wall -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wno-initializer-overrides -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-string-plus-int -Wno-typedef-redefinition -Wno-tautological-type-limit-compare -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -pie -Wl,-z,relro -Wl,-z,now -m64 -fstack-protector-strong config-temp/qemu-conf.c:4:7: error: implicit declaration of function '__atomic_load_16' is invalid in C99 [-Werror,-Wimplicit-function-declaration] y = __atomic_load_16(&x, 0); ^ config-temp/qemu-conf.c:5:3: error: implicit declaration of function '__atomic_store_16' is invalid in C99 [-Werror,-Wimplicit-function-declaration] __atomic_store_16(&x, y, 0); ^ config-temp/qemu-conf.c:5:3: note: did you mean '__atomic_load_16'? config-temp/qemu-conf.c:4:7: note: '__atomic_load_16' declared here y = __atomic_load_16(&x, 0); ^ config-temp/qemu-conf.c:6:3: error: implicit declaration of function '__atomic_compare_exchange_16' is invalid in C99 [-Werror,-Wimplicit-function-declaration] __atomic_compare_exchange_16(&x, &y, x, 0, 0, 0); ^ 3 errors generated. Looking for they way we are using atomic functions in QEMU, we are not using these functions with the _16 suffix anyway. Switch to the same functions that we use in the include/qemu/atomic.h header. Signed-off-by: Thomas Huth Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Acked-by: Paolo Bonzini Message-Id: <20210317110512.583747-2-thuth@redhat.com> Message-Id: <20210323165308.15244-12-alex.bennee@linaro.org> -- 2.20.1 diff --git a/configure b/configure index edf9dc8985..535e6a9269 100755 --- a/configure +++ b/configure @@ -4779,9 +4779,9 @@ if test "$int128" = "yes"; then int main(void) { unsigned __int128 x = 0, y = 0; - y = __atomic_load_16(&x, 0); - __atomic_store_16(&x, y, 0); - __atomic_compare_exchange_16(&x, &y, x, 0, 0, 0); + y = __atomic_load(&x, 0); + __atomic_store(&x, y, 0); + __atomic_compare_exchange(&x, &y, x, 0, 0, 0); return 0; } EOF