qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: Daniel Henrique Barboza <danielhb413@gmail.com>
Subject: [PULL 03/16] tcg/ppc: Define _CALL_AIX for clang on ppc64(be)
Date: Tue, 20 Jun 2023 10:25:58 +0200	[thread overview]
Message-ID: <20230620082611.770620-4-richard.henderson@linaro.org> (raw)
In-Reply-To: <20230620082611.770620-1-richard.henderson@linaro.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 <danielhb413@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 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"
-- 
2.34.1



  parent reply	other threads:[~2023-06-20  8:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20  8:25 [PULL 00/16] tcg patch queue Richard Henderson
2023-06-20  8:25 ` [PULL 01/16] host/include/x86_64: Use __m128i for "x" constraints Richard Henderson
2023-06-20  8:25 ` [PULL 02/16] accel/tcg: Handle MO_ATOM_WITHIN16 in do_st16_leN Richard Henderson
2023-06-20  8:25 ` Richard Henderson [this message]
2023-06-20  8:25 ` [PULL 04/16] target/i386: Simplify i386_tr_init_disas_context() Richard Henderson
2023-06-20  8:26 ` [PULL 05/16] target/tricore: Remove pointless CONFIG_SOFTMMU guard Richard Henderson
2023-06-20  8:26 ` [PULL 06/16] target/m68k: Check for USER_ONLY definition instead of SOFTMMU one Richard Henderson
2023-06-20  8:26 ` [PULL 07/16] target/ppc: " Richard Henderson
2023-06-20  8:26 ` [PULL 08/16] hw/core/cpu: " Richard Henderson
2023-06-20  8:26 ` [PULL 09/16] accel/tcg: " Richard Henderson
2023-06-20  8:26 ` [PULL 10/16] meson: Alias CONFIG_SOFTMMU -> CONFIG_SYSTEM_ONLY Richard Henderson
2023-06-20  8:26 ` [PULL 11/16] meson: Replace " Richard Henderson
2023-06-20  8:26 ` [PULL 12/16] meson: Replace softmmu_ss -> system_ss Richard Henderson
2023-06-20  8:26 ` [PULL 13/16] plugins: Remove unused 'exec/helper-proto.h' header Richard Henderson
2023-06-20  8:26 ` [PULL 14/16] accel/tcg/cpu-exec: Use generic 'helper-proto-common.h' header Richard Henderson
2023-06-20  8:26 ` [PULL 15/16] exec/cpu-defs: Check for SOFTMMU instead of !USER_ONLY Richard Henderson
2023-06-20  8:26 ` [PULL 16/16] cputlb: Restrict SavedIOTLB to system emulation Richard Henderson
2023-06-20  9:52 ` [PULL 00/16] tcg patch queue Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230620082611.770620-4-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=danielhb413@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).