|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH-for-5.0] gdbstub: Introduce gdb_get_freg32() to get float32 registers |
Date: | Tue, 14 Apr 2020 17:22:06 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
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~
[Prev in Thread] | Current Thread | [Next in Thread] |