public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman•id.au>
To: Joel Stanley <joel@jms•id.au>, linuxppc-dev@lists•ozlabs.org
Cc: Nick Desaulniers <ndesaulniers@google•com>
Subject: Re: [v3] powerpc/math-emu: Update macros from GCC
Date: Sat,  8 Dec 2018 00:06:58 +1100 (AEDT)	[thread overview]
Message-ID: <43BCRQ6ZqDz9s55@ozlabs.org> (raw)
In-Reply-To: <20181203230746.27196-1-joel@jms.id.au>

On Mon, 2018-12-03 at 23:07:46 UTC, Joel Stanley wrote:
> The add_ssaaaa, sub_ddmmss, umul_ppmm and udiv_qrnnd macros originate
> from GCC's longlong.h which in turn was copied from GMP's longlong.h a
> few decades ago.
> 
> This was found when compiling with clang:
> 
>    arch/powerpc/math-emu/fnmsub.c:46:2: error: invalid use of a cast in a
>    inline asm context requiring an l-value: remove the cast or build with
>    -fheinous-gnu-extensions
>            FP_ADD_D(R, T, B);
>            ^~~~~~~~~~~~~~~~~
>    ...
> 
>    ./arch/powerpc/include/asm/sfp-machine.h:283:27: note: expanded from
>    macro 'sub_ddmmss'
>                   : "=r" ((USItype)(sh)),                                  \
>                           ~~~~~~~~~~^~~
> 
> Segher points out: this was fixed in GCC over 16 years ago
> ( https://gcc.gnu.org/r56600 ), and in GMP (where it comes from)
> presumably before that.
> 
> Update the add_ssaaaa, sub_ddmmss, umul_ppmm and udiv_qrnnd macros to
> the latest GCC version in order to git rid of the invalid casts. These
> were taken as-is from GCC's longlong in order to make future syncs
> obvious. Other parts of sfp-machine.h were left as-is as the file
> contains more features than present in longlong.h.
> 
> Link: https://github.com/ClangBuiltLinux/linux/issues/260
> Signed-off-by: Joel Stanley <joel@jms•id.au>
> Reviewed-by: Nick Desaulniers <ndesaulniers@google•com>
> Reviewed-by: Segher Boessenkool <segher@kernel•crashing.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/b682c8692442711684befe413cf93c

cheers

      parent reply	other threads:[~2018-12-07 13:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-03 23:07 [PATCH v3] powerpc/math-emu: Update macros from GCC Joel Stanley
2018-12-03 23:25 ` Nick Desaulniers
2018-12-03 23:29 ` Segher Boessenkool
2018-12-07 13:06 ` Michael Ellerman [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=43BCRQ6ZqDz9s55@ozlabs.org \
    --to=patch-notifications@ellerman$(echo .)id.au \
    --cc=joel@jms$(echo .)id.au \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=ndesaulniers@google$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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