qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kamil Rytarowski <n54@gmx.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	Laurent Vivier <laurent@vivier.eu>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static array to switch
Date: Mon, 4 Sep 2017 18:38:05 +0200	[thread overview]
Message-ID: <b79a96fa-74ac-cab3-8f87-a94be96e7ae5@gmx.com> (raw)
In-Reply-To: <CAFEAcA8VYnJgru6bV7_tNkPoJSKm3pwTH=8oJRdpTEW9PXycug@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1867 bytes --]

On 04.09.2017 18:17, Peter Maydell wrote:
> On 4 September 2017 at 16:53, Laurent Vivier <laurent@vivier.eu> wrote:
>> Le 04/09/2017 à 17:02, Peter Maydell a écrit :
>>> On 4 September 2017 at 15:09, Laurent Vivier <laurent@vivier.eu> wrote:
>>>> You can:
>>>>
>>>> either replace the "#define floatx80_pi make_floatx80(...)" by a "const
>>>> floatx80 floatx80_pi = make_floatx80_init(...)"
>>>>
>>>> or replace all the macros in the m68k/fpu_helper.c array by
>>>> make_floatx80_init(...)
>>>
>>> Taking a step back, what's different about floatx80 and float12
>>> that means they need separate _init and non-init versions of
>>> the macros, when for float16/float32/float64 we instead have
>>> #define make_float32(x) __extension__ ({ float32 f32_val = {x}; f32_val; })
>>> #define const_float32(x) { x }
>>
>> floatx80/float128 are structureq while float16/float32/float64 are
>> native data types.
> 
> If USE_SOFTFLOAT_STRUCT_TYPES is defined then float16/32/64 are
> also struct types and use the make_ and const_ macros as above.
> 
> (We should check whether USE_SOFTFLOAT_STRUCT_TYPES still builds,
> it tends to bitrot. If it does then maybe we should use it by default
> since gcc 3 is now just a memory...)
> 

USE_SOFTFLOAT_STRUCT_TYPES breaks for me on SmartOS:

migration/vmstate-types.c: In function 'put_float64':
migration/vmstate-types.c:430:5: error: conversion to non-scalar type
requested

>>> ? Could we move to consistency for the macro naming we're using?
>>
>> Do you mean "s/make_floatx80_init/const_floatx80/"?
> 
> Yes (and the same implementation would be nice too).
> 

I will push my patch as is and later it can be refactored by a
maintainer. Is this fine?

https://github.com/NetBSD/pkgsrc-wip/blob/master/qemu-git/patches/patch-target_m68k_fpu__helper.c

> thanks
> -- PMM
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2017-09-04 16:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-03 16:31 [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static array to switch Kamil Rytarowski
2017-09-03 17:05 ` Laurent Vivier
2017-09-04  0:27   ` Philippe Mathieu-Daudé
2017-09-04 13:54     ` Kamil Rytarowski
2017-09-04 14:09       ` Laurent Vivier
2017-09-04 14:41         ` Philippe Mathieu-Daudé
2017-09-04 14:53           ` Kamil Rytarowski
2017-09-04 15:02         ` Peter Maydell
2017-09-04 15:16           ` Kamil Rytarowski
2017-09-04 15:53           ` Laurent Vivier
2017-09-04 16:17             ` Peter Maydell
2017-09-04 16:38               ` Kamil Rytarowski [this message]
2017-09-04 16:38                 ` Laurent Vivier
2017-09-04 16:40                   ` Peter Maydell
2017-09-04  8:00 ` no-reply
2017-09-04 16:46 ` [Qemu-devel] [PATCH v2] target/m68k: Switch fpu_rom from make_floatx80() to make_floatx80_init() Kamil Rytarowski
2017-09-04 17:16   ` Philippe Mathieu-Daudé
2017-09-04 17:23   ` Laurent Vivier
2017-09-04 18:01     ` Philippe Mathieu-Daudé
2017-09-04 17:32   ` [Qemu-devel] [PATCH v3] " Kamil Rytarowski
2017-09-04 19:02     ` Laurent Vivier
2017-09-04 21:38       ` Kamil Rytarowski
2017-09-04 21:23     ` [Qemu-devel] [PATCH v4] " Kamil Rytarowski
2017-09-04 21:44       ` Laurent Vivier

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=b79a96fa-74ac-cab3-8f87-a94be96e7ae5@gmx.com \
    --to=n54@gmx.com \
    --cc=f4bug@amsat.org \
    --cc=laurent@vivier.eu \
    --cc=peter.maydell@linaro.org \
    --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).