From patchwork Tue Jun 20 08:25:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 694440 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp186442wrm; Tue, 20 Jun 2023 01:28:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ebPCzD6YVk1fnJB4gmIx7Dyz+BLNf4xcZg4KvTZFY5388sIataxdHzimOwwgGd/TEJDMB X-Received: by 2002:a05:6214:20ae:b0:62f:fe87:67e9 with SMTP id 14-20020a05621420ae00b0062ffe8767e9mr12363574qvd.44.1687249706035; Tue, 20 Jun 2023 01:28:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687249706; cv=none; d=google.com; s=arc-20160816; b=yNnyKgD3eb7m6QXbtEAbSlJ+5OH6k9a7+2UERZ5/aIkEoIr9Zlgvgd7YMjy8FAd3bK UI/pOx8mt6epomT/6IHRLEiH9h2acsh8PMjdcP0ICPfW5AFQ3WQzcBbJry7cYq1bpkTW 0w3N+UUKD+Dt0+dKkhyZK3h3p4z7A/iigQHEVBmkjYV7yJBeIA7VvrcJ+IIUnPlKOi30 +HQA3X95824W84C0XyZ5WRSvInO4HuanGXwSucWZOH/Oh2MhiJObTmeT6GHZoG5FGBrQ TTunfpOUbR1OZY3xO8iPpYDTsAg1lFfXa4GBDuOAE1IUHGKQ8sotwfsMR1nKYdMYwlwB h1mA== 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=vtpvnoCGXBYmDE1iTvy2apfZncVWql8zpzIm5cBPnKE=; b=nn4DffDCt+J5HsBSjR+znrr79oYskfdWPUXe1gobHROYLDMA6BEHkYH5VvUCUphFMt 6YcINr1Sw9Q1VPnrIULO0GzCCJ9HCWDJutsEKQgbxPBJV0Kii7X536QpFxM26EfI5CfV 1TuLERjKA7TPtJga5+oBfeRq+jUNt6tpkDeYO4tkuE9FWtTO4W6LM3+DZplQG7kacxME 0E42/DVqxWHRsOx8KG21+QuF3lBPHxaKo6TPU0fY6N6shieXWG6F2aNnO4rCrBY6dfO6 GR5KPMi1Wsa2Wze0KZXSIhLQvQzc0ub5YMq1T8pSViT76KfxkywUHoOxpHek2efDI1or HfKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TdzzK9LS; 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 t7-20020a0562140c6700b005ef70d6a66bsi620285qvj.146.2023.06.20.01.28.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jun 2023 01:28:26 -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=TdzzK9LS; 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 1qBWh2-0003oJ-GA; Tue, 20 Jun 2023 04:26:28 -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 1qBWgu-0003my-JV for qemu-devel@nongnu.org; Tue, 20 Jun 2023 04:26:20 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450: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 1qBWgs-00065S-7j for qemu-devel@nongnu.org; Tue, 20 Jun 2023 04:26:19 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-988a5383fd4so368417666b.0 for ; Tue, 20 Jun 2023 01:26:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687249576; x=1689841576; 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=vtpvnoCGXBYmDE1iTvy2apfZncVWql8zpzIm5cBPnKE=; b=TdzzK9LS1Dju1xZfKask8UrA4XH89+GMJA45YuTANRRyXRMOzKPAdU3IuabMkChRgD nSjniZDQflskPsdFko0daKijo/ssljsTDTvUFWOV8Mi1JquInE9pyOPEpw+AzRZYwrfe +uxxdUwSEtHM20yFCO06iYbUTY/eTAwky40dUdSJCxRfJcWcpCe2ebJNBbN1wTnSka1g KVU187RjP5dq1rrfmgV41By+RB7/fAvTTyhiWpqVQJVYWW1MDZF+n6cmaMnKN5r8EYCL 4N1THm00nNEyjFQ7fHczFp7c9Z9+cF6U4Lo41ZIu7IqVcfaO4kRsR5ETTvUuT2P/YDiT vDxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687249576; x=1689841576; 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=vtpvnoCGXBYmDE1iTvy2apfZncVWql8zpzIm5cBPnKE=; b=hk/jtHOFnXUkGke2AzYgNfNO1VwuqsOq1QRDPnTwuX7CKcXAkytNdtl4u9wehG6DJu b9FeQTTjA5Axl8+E99JkBX7at07sqlNaXxdId/ta46HsU93E+FjMxQeNFjrJOzRSmjAI t0lLAdIgbEPR+uP1JDEwipHnQpVneqROIU011EC2egXwSZB9d0r+d+FXxxk24Ph/5idX MY5Aprz9Pl9oxitDUATrDFxdl8whq+rVLV+yazJvQAjQMC1fWv9SaU03jDHn3s1NeoTt nznJcJZRkVCO6vLpCzYCRRKbe9cj2qWoPVenvOqiOSMGKSzZlnQbLtbv+TudcU7pkoi9 BYrw== X-Gm-Message-State: AC+VfDwS2+BahkMxc7KenjA2IOQJajNUVT+OUzPHTevrvv/MiWtMtt+m OMg8UzIn97M6MvfQlIBAweV+zWBrYwzq8lIagzr7Yz+D X-Received: by 2002:a17:907:8a1b:b0:988:bad4:e422 with SMTP id sc27-20020a1709078a1b00b00988bad4e422mr4123458ejc.13.1687249576520; Tue, 20 Jun 2023 01:26:16 -0700 (PDT) Received: from stoup.lan ([176.176.183.29]) by smtp.gmail.com with ESMTPSA id z19-20020a170906669300b00977c7566ccbsm935901ejo.164.2023.06.20.01.26.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 01:26:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza Subject: [PULL 03/16] tcg/ppc: Define _CALL_AIX for clang on ppc64(be) Date: Tue, 20 Jun 2023 10:25:58 +0200 Message-Id: <20230620082611.770620-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620082611.770620-1-richard.henderson@linaro.org> References: <20230620082611.770620-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-ej1-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 Restructure the ifdef ladder, separating 64-bit from 32-bit, and ensure _CALL_AIX is set for ELF v1. Fixes the build for ppc64 big-endian host with clang. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c.inc | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 507fe6cda8..5c8378f8f6 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -29,15 +29,24 @@ /* * Standardize on the _CALL_FOO symbols used by GCC: * Apple XCode does not define _CALL_DARWIN. - * Clang defines _CALL_ELF (64-bit) but not _CALL_SYSV (32-bit). + * Clang defines _CALL_ELF (64-bit) but not _CALL_SYSV or _CALL_AIX. */ -#if !defined(_CALL_SYSV) && \ - !defined(_CALL_DARWIN) && \ - !defined(_CALL_AIX) && \ - !defined(_CALL_ELF) -# if defined(__APPLE__) +#if TCG_TARGET_REG_BITS == 64 +# ifdef _CALL_AIX + /* ok */ +# elif defined(_CALL_ELF) && _CALL_ELF == 1 +# define _CALL_AIX +# elif defined(_CALL_ELF) && _CALL_ELF == 2 + /* ok */ +# else +# error "Unknown ABI" +# endif +#else +# if defined(_CALL_SYSV) || defined(_CALL_DARWIN) + /* ok */ +# elif defined(__APPLE__) # define _CALL_DARWIN -# elif defined(__ELF__) && TCG_TARGET_REG_BITS == 32 +# elif defined(__ELF__) # define _CALL_SYSV # else # error "Unknown ABI"