qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pierre Muller <pierre@freepascal.org>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	laurent@vivier.eu, "Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH] * include/fpu/softfloat.h (floatx80_invalid_encoding): Handle m68k specific infinity pattern.
Date: Wed, 18 Sep 2019 10:20:33 +0200	[thread overview]
Message-ID: <ddb842e7-dd48-1e74-20db-dea75de0552d@freepascal.org> (raw)
In-Reply-To: <ae7415a9-54be-14de-9590-f9ff6ef025c4@redhat.com>

  Hi Thomas,

  I tried to use git format-patch -s below,
and change the commit message that appears below:


muller@gcc123:~/gnu/qemu/qemu$ git format-patch -s a017dc6d43aaa4ffc7be40ae3adee4086be9cec2^
0001-Fix-floatx80_invalid_encoding-function-for-m68k-cpu.patch
muller@gcc123:~/gnu/qemu/qemu$ cat 0001-Fix-floatx80_invalid_encoding-function-for-m68k-cpu.patch
From a017dc6d43aaa4ffc7be40ae3adee4086be9cec2 Mon Sep 17 00:00:00 2001
From: Pierre Muller <pierre@freepascal.org>
Date: Wed, 18 Sep 2019 08:04:19 +0000
Subject: [PATCH]    Fix floatx80_invalid_encoding function for m68k cpu

    As m68k accepts different patterns for infinity,
    and additional test for valid infinity must be added
    for m68k cpu target.

Signed-off-by: Pierre Muller <pierre@freepascal.org>
---
 include/fpu/softfloat.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h
index ecb8ba0114..dea24384e9 100644
--- a/include/fpu/softfloat.h
+++ b/include/fpu/softfloat.h
@@ -685,10 +685,17 @@ static inline int floatx80_is_any_nan(floatx80 a)
 | pseudo-infinities and un-normal numbers. It does not include
 | pseudo-denormals, which must still be correctly handled as inputs even
 | if they are never generated as outputs.
+| As m68k accepts different patterns for infinity, thus an additional test
+| for valid infinity value must be added for m68k CPU.
 *----------------------------------------------------------------------------*/
 static inline bool floatx80_invalid_encoding(floatx80 a)
 {
+#if defined (TARGET_M68K)
+    return ((a.low & (1ULL << 63)) == 0 && (a.high & 0x7FFF) != 0)
+           && (! floatx80_is_infinity(a));
+#else
     return (a.low & (1ULL << 63)) == 0 && (a.high & 0x7FFF) != 0;
+#endif
 }

 #define floatx80_zero make_floatx80(0x0000, 0x0000000000000000LL)
--
2.20.1

I hope this is correct according to the guidelines.


Le 18/09/2019 à 09:26, Thomas Huth a écrit :
> On 17/09/2019 22.04, Pierre Muller wrote:
>>
>> Hello,
....
> 
>  Hi Pierre,
> 
> thanks a lot for the patch! But please note that the QEMU project has
> some constraints for patches that have to be followed before a patch can
> be applied.
> 
> Most important one: You need to provide a "Signed-off-by:" line in the
> patch description to make sure that you agree with the Developer
> Certificate Of Origin. See this URL for more details:
> 
>  https://wiki.qemu.org/Contribute/SubmitAPatch

   I tried to follow this guide.

> Then it would be nice if you add some proper commit message to the patch
> (something similar to the comment that you've added to the source code
> would do the job, I guess).

  I hope the above is OK.

> And finally, please note that qemu-devel is a high traffic mailing list.
> When sending patches, you best make sure to put some maintainers on CC:,
> or your patch might get lost in the high traffic. You can either have a
> look at the MAINTAINERS file in the main directory, or use the
> scripts/get_maintainers.pl script on your patch to see who should be put
> on CC:.

Thus I took the liberty to use 'Reply to all' as you have
added several persons which are listed using
./scripts/get_maintainer.pl -f  include/fpu/softfloat.h
and Laurent who is more specifically involved in m68k support.

Please let me know if more is needed to get this patch accepted.

Pierre Muller



  reply	other threads:[~2019-09-18  8:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17 20:04 [Qemu-devel] [PATCH] * include/fpu/softfloat.h (floatx80_invalid_encoding): Handle m68k specific infinity pattern Pierre Muller
2019-09-18  7:26 ` Thomas Huth
2019-09-18  8:20   ` Pierre Muller [this message]
2019-09-18  9:59     ` Alex Bennée
2019-09-18 10:08       ` Laurent Vivier
2019-09-18 10:26 ` 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=ddb842e7-dd48-1e74-20db-dea75de0552d@freepascal.org \
    --to=pierre@freepascal.org \
    --cc=alex.bennee@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=laurent@vivier.eu \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --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).