From: Joseph Myers <joseph@codesourcery.com>
To: David Miller <davem@davemloft.net>
Cc: linux-s390@vger.kernel.org, linux-sh@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org,
sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
kkojima@rr.iij4u.or.jp
Subject: Re: [PATCH RFC] Update kernel math-emu code from current glibc soft-fp
Date: Thu, 19 Feb 2015 18:40:34 +0000 [thread overview]
Message-ID: <alpine.DEB.2.10.1502191835490.22905@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20150219.132122.204795202277130266.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 1794 bytes --]
On Thu, 19 Feb 2015, David Miller wrote:
> From: Joseph Myers <joseph@codesourcery.com>
> Date: Fri, 6 Feb 2015 17:25:29 +0000
>
> > * On SPARC, comparisons now use raw unpacking (this should not in fact
> > change how the emulation behaves, just make it more efficient).
>
> I did a sparc64 test build and it failed like so:
>
> arch/sparc/math-emu/math_64.c: In function ‘do_mathemu’:
> arch/sparc/math-emu/math_64.c:487:1: error: expected expression before ‘return’
> arch/sparc/math-emu/math_64.c:488:1: error: expected expression before ‘return’
> arch/sparc/math-emu/math_64.c:490:1: error: expected expression before ‘return’
> arch/sparc/math-emu/math_64.c:491:1: error: expected expression before ‘return’
> arch/sparc/math-emu/math_64.c:495:1: error: expected expression before ‘return’
>
> I'm attaching a CPP processed math_64.c for your convenience:
Please try this patch on top of the previous one. The way abort is
redefined in the kernel code doesn't work for one place using it in an
expression; this patch changes a comma expression to a statement
expression. This didn't appear in my powerpc testing because the powerpc
emulation never uses FP_FROM_INT; I'm not sure how Kaz's sh testing
avoided the problem appearing there.
diff --git a/include/math-emu/op-common.h b/include/math-emu/op-common.h
index b9f5e1a..8c059c3 100644
--- a/include/math-emu/op-common.h
+++ b/include/math-emu/op-common.h
@@ -1818,7 +1818,7 @@
X##_e = (_FP_EXPBIAS_##fs + 2 * _FP_W_TYPE_SIZE - 1 \
- _FP_FROM_INT_lz); \
}) \
- : (abort (), 0))); \
+ : ({ abort (); 0; }))); \
\
if ((rsize) - 1 + _FP_EXPBIAS_##fs >= _FP_EXPMAX_##fs \
&& X##_e >= _FP_EXPMAX_##fs) \
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2015-02-19 18:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.DEB.2.10.1502061719210.27832@digraph.polyomino.org.uk>
2015-02-06 17:41 ` [PATCH RFC] Update kernel math-emu code from current glibc soft-fp Randy Dunlap
2015-02-06 18:03 ` Joseph Myers
[not found] ` <20150219.132122.204795202277130266.davem@davemloft.net>
2015-02-19 18:40 ` Joseph Myers [this message]
2015-02-19 19:10 ` David Miller
2015-02-20 2:52 ` Kaz Kojima
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=alpine.DEB.2.10.1502191835490.22905@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=davem@davemloft.net \
--cc=kkojima@rr.iij4u.or.jp \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=sparclinux@vger.kernel.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