From patchwork Fri Jun 9 02:23:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 690869 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp598520wru; Thu, 8 Jun 2023 19:29:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7/StKC7Bxo48R8XbGbN+Cyhf+TnWwbK/46lZT+JGYZHQDvzYMg4qVYHW0LLCyQ6MzoFOwS X-Received: by 2002:a05:6214:c4f:b0:625:aa49:c342 with SMTP id r15-20020a0562140c4f00b00625aa49c342mr276075qvj.54.1686277754080; Thu, 08 Jun 2023 19:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686277754; cv=none; d=google.com; s=arc-20160816; b=OcKHuhqYA1Ko+GhHBdvmS7fRzw15/h8EmQi5Ibm6V5CM9Ol5jo1fF9lHdax3Xmu+U9 IDg9IOCGSv/bpvQZ100cU1XlX6AEBXImQeBN5l5TzF/vax8faRCKFMlntrOZKLAavP+m 8pwRTU0gaG8diGmGQLMsUtBRg3UTvKZSTqglP83wrk1BoPdZd7sUiSr7JhfPH2T8pwZH Lf/OFF4PJaRh1bKpQzUM2LEsK9uyHicWXLkBR2ofuvdwzWp6vEKLcVmGgAwDmvEDtySv beYkKD7MBHu6h8iH+WVPsUWWSCR5wHxzn46WL0AoKE9yN4q4h5LAjoeO9CUg5Plb4GM5 xeKQ== 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=qVOgPdpdn5OzaD8uC9gXnLe4O2qeMpIufQqKixCjiEQ=; b=oh9b5uTt7nxvXhaWqeh7KCRcThc4XXIh2YB/xS9GGTGUsDAModvcMKTupEeaoWyjAK i31MO/dZwdEIQsOPA/OIQf1vc7940boqz597RnaZt9EtmLGKUJm4Fk46UKSMAft8p5O0 WAxKeiVHm4/3xPIrYdIb7peUiWIXrfnEhs5/oEgGLzDqZ3auJpWTd+xWI3UMlahVdWLj h6Vbc34WVmZOBA3L6DI6PElzvUsBd0RKLHfNoRRuhtDVhY7P7iqXdWxYhYKN5lf4LwtA em65UAmxFWmhfSLUimilueuprF3SDjgn4I0gM12Qe8HIWjEiGwrMR4qPWQgqiQh6+fgx dugA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="A7lSk/DZ"; 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 jl9-20020ad45e89000000b005994d62c136si1659095qvb.447.2023.06.08.19.29.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Jun 2023 19:29:14 -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="A7lSk/DZ"; 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 1q7RnO-0002T3-2K; Thu, 08 Jun 2023 22:24:10 -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 1q7RnM-0002Qv-JT for qemu-devel@nongnu.org; Thu, 08 Jun 2023 22:24:08 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q7RnJ-0005X0-HL for qemu-devel@nongnu.org; Thu, 08 Jun 2023 22:24:08 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-65242634690so1012851b3a.0 for ; Thu, 08 Jun 2023 19:24:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686277444; x=1688869444; 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=qVOgPdpdn5OzaD8uC9gXnLe4O2qeMpIufQqKixCjiEQ=; b=A7lSk/DZ+ucqn9riSY07zqG8Qc/clWgKKmtYD0seiIlp7TETwVJBVBpahoEMDJSGSp j8RZll2jOeiceCrGQjaAnKwZ6BP8c/j0YZYip9oLMwPCCCmxjg3t0XH8Po7tYbcGy1Fe AYKZWTIzFU3Zo7CQF+AGN+orsDr9BJ3ZB3int1PzD7Nda4Yr0oIS3+PRN+MOCA8ehiXc b3phXKufK4iWb5IzbDFZaZj2bE7PLRu+HRzGQ93xjeGwgDQNhtWoMpKpY9fdu8Npw7bg yWA5+igEME+DuTSnYHOqRMIQzUFrast+73QyaLtg1zZ3Yi5r0pG3L80+FOh0OSj6QKGd qNEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686277444; x=1688869444; 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=qVOgPdpdn5OzaD8uC9gXnLe4O2qeMpIufQqKixCjiEQ=; b=jqhsz7d4CD8Kd7XSOfE8hMqykKQ9DTv1EJY1Ie0kzdQI4LW6YIgYR6YddyxYH+7eJH egQ9vYx2m1obzbc3GDSA63Wvk81QPWrx1I25nC+gb/BGVXipbG+Svg/0NeH2hCr/QSWZ 02WeRZr4aclsbT2H8/qLQpDDKd0csbY/GXZj99WkhVtkkwvxfng69lX+WlMOQzd85m/M znsL/9dHSsUJdj4HkzkHvbNEC/hGMSJR4rRoOSeos/zsIZGkTsSjuEu4XOZkCnxglzdS Y4ZV/VkimYZ6y6fCwO4Zw9+N2yaf8RvpsfrckJKlPQ8ZNVmWoQfZl64JZ6QmcNw39N9N 4lPA== X-Gm-Message-State: AC+VfDyt2h2zx/opmLJQyrqHw5nCWqDjyw6MiVx6cHNlzMSXpUfiut9i V/nfxEZCuPCC2QeOraAfVrNO0qkO8cK+4yNOf3E= X-Received: by 2002:a05:6a00:1a0f:b0:65a:1efc:13ca with SMTP id g15-20020a056a001a0f00b0065a1efc13camr13812pfv.15.1686277444032; Thu, 08 Jun 2023 19:24:04 -0700 (PDT) Received: from stoup.. ([2602:ae:1598:4c01:b071:df63:5761:f449]) by smtp.gmail.com with ESMTPSA id x25-20020a62fb19000000b0063afb08afeesm1686458pfm.67.2023.06.08.19.24.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 19:24:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: ardb@kernel.org, berrange@redhat.com, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, pbonzini@redhat.com Subject: [PATCH v2 01/38] tcg/ppc: Define _CALL_AIX for clang on ppc64(be) Date: Thu, 8 Jun 2023 19:23:24 -0700 Message-Id: <20230609022401.684157-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230609022401.684157-1-richard.henderson@linaro.org> References: <20230609022401.684157-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.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=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 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. Signed-off-by: Richard Henderson Reviewed-by: Daniel Henrique Barboza --- 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"