qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [PATCH v2 09/13] audio: remove GNUC & MSVC check
Date: Thu, 26 Nov 2020 12:06:17 +0000	[thread overview]
Message-ID: <CAFEAcA9tcduAw1vEjWoOvmiJGS-S6zUx3t_nmssSNxbgPXpyOQ@mail.gmail.com> (raw)
In-Reply-To: <20201126112915.525285-10-marcandre.lureau@redhat.com>

On Thu, 26 Nov 2020 at 11:30, <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> QEMU requires either GCC or Clang, which both advertize __GNUC__.
> Drop MSVC fallback path.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  audio/audio.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/audio/audio.c b/audio/audio.c
> index 46578e4a58..d7a00294de 100644
> --- a/audio/audio.c
> +++ b/audio/audio.c
> @@ -122,13 +122,7 @@ int audio_bug (const char *funcname, int cond)
>
>  #if defined AUDIO_BREAKPOINT_ON_BUG
>  #  if defined HOST_I386
> -#    if defined __GNUC__
> -        __asm__ ("int3");
> -#    elif defined _MSC_VER
> -        _asm _emit 0xcc;
> -#    else
> -        abort ();
> -#    endif
> +      __asm__ ("int3");
>  #  else
>          abort ();
>  #  endif
> --
> 2.29.0

I would prefer to just drop this attempt to emit an inline
breakpoint insn (which won't work on non-x86 hosts and seems
to me to have no benefit over just calling abort(), which will
also drop you into the debugger) and simply make it abort() if
AUDIO_BREAKPOINT_ON_BUG is defined. Gerd, do you have an
opinion ?

thanks
-- PMM


  reply	other threads:[~2020-11-26 12:11 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26 11:29 [PATCH v2 00/13] Remove GCC < 4.8 checks marcandre.lureau
2020-11-26 11:29 ` [PATCH v2 01/13] compiler.h: replace QEMU_GNUC_PREREQ macro marcandre.lureau
2020-11-26 11:48   ` Peter Maydell
2020-11-26 11:55     ` Marc-André Lureau
2020-11-26 11:29 ` [PATCH v2 02/13] qemu/atomic: Drop special case for unsupported compiler marcandre.lureau
2020-11-26 11:49   ` Peter Maydell
2020-11-26 12:06     ` Daniel P. Berrangé
2020-11-26 12:13       ` Peter Maydell
2020-12-10 13:17         ` Marc-André Lureau
2020-12-10 13:42           ` Daniel P. Berrangé
2020-12-10 13:50             ` Daniel P. Berrangé
2020-11-26 11:29 ` [PATCH v2 03/13] accel/tcg: Remove special case for GCC < 4.6 marcandre.lureau
2020-11-26 11:29 ` [PATCH v2 04/13] compiler.h: remove GCC < 3 __builtin_expect fallback marcandre.lureau
2020-11-26 11:55   ` Peter Maydell
2020-12-10 13:35     ` Marc-André Lureau
2020-11-26 11:29 ` [PATCH v2 05/13] qemu-plugin.h: remove GCC < 4 marcandre.lureau
2020-11-26 11:57   ` Peter Maydell
2020-11-26 12:12     ` Daniel P. Berrangé
2020-11-26 12:14       ` Peter Maydell
2020-11-26 13:13         ` Alex Bennée
2020-11-26 11:29 ` [PATCH v2 06/13] tests: remove GCC < 4 fallbacks marcandre.lureau
2020-11-26 11:58   ` Peter Maydell
2020-11-27 13:10     ` Alex Bennée
2020-11-26 11:29 ` [PATCH v2 07/13] virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON marcandre.lureau
2020-11-26 11:29 ` [PATCH v2 08/13] compiler.h: explicit case for Clang printf attribute marcandre.lureau
2020-11-26 12:00   ` Peter Maydell
2020-11-26 11:29 ` [PATCH v2 09/13] audio: remove GNUC & MSVC check marcandre.lureau
2020-11-26 12:06   ` Peter Maydell [this message]
2020-11-26 12:09     ` Marc-André Lureau
2020-11-27  7:15     ` Gerd Hoffmann
2020-11-27  7:20       ` Marc-André Lureau
2020-11-26 11:29 ` [PATCH v2 10/13] poison: remove GNUC check marcandre.lureau
2020-11-26 12:06   ` Peter Maydell
2020-11-26 11:29 ` [PATCH v2 11/13] xen: " marcandre.lureau
2020-11-26 12:09   ` Peter Maydell
2020-12-01 21:53     ` Stefano Stabellini
2020-11-26 11:29 ` [PATCH v2 12/13] compiler: " marcandre.lureau
2020-11-26 12:10   ` Peter Maydell
2020-11-26 12:12     ` Marc-André Lureau
2020-11-26 11:29 ` [PATCH v2 13/13] linux-user: " marcandre.lureau
2020-11-26 12:10   ` Peter Maydell
2020-11-26 11:57 ` [PATCH v2 00/13] Remove GCC < 4.8 checks no-reply

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=CAFEAcA9tcduAw1vEjWoOvmiJGS-S6zUx3t_nmssSNxbgPXpyOQ@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=philmd@redhat.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).