qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: "Aleksandar Rikalo" <arikalo@gmail.com>,
	"Riku Voipio" <riku.voipio@iki.fi>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Huacai Chen" <chenhuacai@kernel.org>,
	"Jiaxun Yang" <jiaxun.yang@flygoat.com>
Subject: Re: [PATCH 4/5] tcg/mips: Check O32/N32/64 ABI definitions actually exist
Date: Fri, 22 Aug 2025 07:09:42 +1000	[thread overview]
Message-ID: <861610db-6bc7-4e5d-b54a-a86c5818e9ca@linaro.org> (raw)
In-Reply-To: <20250820142108.46639-5-philmd@linaro.org>

On 8/21/25 00:21, Philippe Mathieu-Daudé wrote:
> Similarly noted in libunwind: https://reviews.llvm.org/D38110#895887,
> when _ABIO32 / _ABIN32 / _ABI64 are not defined (like on OpenBSD) we
> get:
> 
>    [666/1234] Compiling C object libsystem.a.p/tcg_tcg-common.c.o
>    In file included from ../tcg/tcg-common.c:26:
>    In file included from include/tcg/tcg.h:34:
>    tcg/mips/tcg-target-reg-bits.h:10:18: warning: '_ABIO32' is not defined, evaluates to 0 [-Wundef]
>    #if _MIPS_SIM == _ABIO32
>                     ^
>    tcg/mips/tcg-target-reg-bits.h:12:20: warning: '_ABIN32' is not defined, evaluates to 0 [-Wundef]
>    #elif _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
>                       ^
>    2 warnings generated.



> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   tcg/mips/tcg-target-reg-bits.h           | 5 +++--
>   tcg/mips/tcg-target.c.inc                | 5 +++--
>   common-user/host/mips/safe-syscall.inc.S | 4 ++--
>   3 files changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/tcg/mips/tcg-target-reg-bits.h b/tcg/mips/tcg-target-reg-bits.h
> index 56fe0a725e9..a957d2312f3 100644
> --- a/tcg/mips/tcg-target-reg-bits.h
> +++ b/tcg/mips/tcg-target-reg-bits.h
> @@ -7,9 +7,10 @@
>   #ifndef TCG_TARGET_REG_BITS_H
>   #define TCG_TARGET_REG_BITS_H
>   
> -#if _MIPS_SIM == _ABIO32
> +#if defined(_ABIO32) && _MIPS_SIM == _ABIO32
>   # define TCG_TARGET_REG_BITS 32
> -#elif _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
> +#elif (defined(_ABIN32) && _MIPS_SIM == _ABIN32) \
> +       || (defined(_ABI64) && _MIPS_SIM == _ABI64)
>   # define TCG_TARGET_REG_BITS 64
>   #else
>   # error "Unknown ABI"


Alternately, remove all of this.  If we're removing 32-bit hosts, _ABI64 is the only valid 
answer (N32 has 64-bit registers but 32-bit pointers).


r~


  reply	other threads:[~2025-08-21 21:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20 14:21 [PATCH 0/5] tcg/mips: Remove support for 32-bit hosts Philippe Mathieu-Daudé
2025-08-20 14:21 ` [PATCH 1/5] docker: Remove 32-bit MIPS toolchain from debian-all-test image Philippe Mathieu-Daudé
2025-08-22 11:23   ` Alex Bennée
2025-08-22 14:49     ` Philippe Mathieu-Daudé
2025-08-20 14:21 ` [PATCH 2/5] gitlab: Stop cross-testing for 32-bit MIPS hosts Philippe Mathieu-Daudé
2025-08-25 12:31   ` Thomas Huth
2025-08-20 14:21 ` [PATCH 3/5] docker: Stop building 32-bit MIPS images Philippe Mathieu-Daudé
2025-08-25 12:33   ` Thomas Huth
2025-08-20 14:21 ` [PATCH 4/5] tcg/mips: Check O32/N32/64 ABI definitions actually exist Philippe Mathieu-Daudé
2025-08-21 21:09   ` Richard Henderson [this message]
2025-08-20 14:21 ` [PATCH 5/5] tcg/mips: Remove support for 32-bit hosts Philippe Mathieu-Daudé
2025-08-21 20:48 ` [PATCH 0/5] " 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=861610db-6bc7-4e5d-b54a-a86c5818e9ca@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=arikalo@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=chenhuacai@kernel.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=thuth@redhat.com \
    /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).