All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [PATCH-for-5.0] gdbstub: Introduce gdb_get_freg32() to get float32 registers
Date: Tue, 14 Apr 2020 17:22:06 +0200	[thread overview]
Message-ID: <9805276a-79d5-e913-5817-b894d2aabf72@redhat.com> (raw)
In-Reply-To: <420ba3eb-996a-6bab-7764-ebf91ab22917@linaro.org>

On 4/14/20 5:19 PM, Richard Henderson wrote:
> On 4/14/20 4:18 AM, Philippe Mathieu-Daudé wrote:
>> +static inline int gdb_get_freg32(GByteArray *array, float32 val)
>> +{
>> +    uint8_t buf[4];
>> +
>> +    QEMU_BUILD_BUG_ON(sizeof(CPU_FloatU) != sizeof(buf));
> 
> Why bother withe the BUG_ON when you could just put the sizeof(CPU_FloatU) into
> the array bounds above?

Ah good idea, thanks :)

> 
> 
> r~
> 



      reply	other threads:[~2020-04-14 16:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 11:18 [PATCH-for-5.0] gdbstub: Introduce gdb_get_freg32() to get float32 registers Philippe Mathieu-Daudé
2020-04-14 15:19 ` Richard Henderson
2020-04-14 15:22   ` Philippe Mathieu-Daudé [this message]

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=9805276a-79d5-e913-5817-b894d2aabf72@redhat.com \
    --to=philmd@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.