[PATCH] lround for PowerPC

David Edelsohn dje.gcc@gmail.com
Tue Nov 24 19:29:00 GMT 2015


On Tue, Nov 24, 2015 at 1:55 PM, Michael Meissner
<meissner@linux.vnet.ibm.com> wrote:
> Whoops, I forgot to update the ChangeLog after reversing Fv and Fv2.
>
> 2015-11-24  David Edelsohn  <dje.gcc@gmail.com>
>             Michael Meissner  <meissner@linux.vnet.ibm.com>
>
>         * config/rs6000/rs6000.md (UNSPEC_XSRDPI): New unspec.
>         (Fv2): New mode attribute to be used when ISA 2.07 instructions
>         are used on SF values, and ISA 2.06 instructions on DF values.
>         (add<mode>3_fpr): Use <Fv2> instead of <Fv>.
>         (sub<mode>3_fpr): Use <Fv2> instead of <Fv>.
>         (mul<mode>3_fpr): Use <Fv2> instead of <Fv>.
>         (div<mode>3_fpr): Use <Fv2> instead of <Fv>.
>         (sqrt<mode>2): Use <Fv2> instead of <Fv>.
>         (fre<Fs>): Use <Fv2> instead of <Fv>.
>         (rsqrt<mode>2): Use <Fv2> instead of <Fv>.

Why are the above instructions converted to Fv2?  xsadd, xssub, xsmul,
xsdiv, xsre, and xsrsqrte are Power7 instructions.

xssqrt and the ones below are Power8.

>         (cmp<mode>_fpr): Use <Fv2> instead of <Fv>.
>         (xsrdpi<mode>): Add support for the lround function.
>         (lround<mode>di2): Likewise.
>         (fma<mode>4_fpr): Use <Fv2> instead of <Fv>.
>         (fms<mode>4_fpr): Use <Fv2> instead of <Fv>.
>         (nfma<mode>4_fpr): Use <Fv2> instead of <Fv>.
>         (nfms<mode>4_fpr): Use <Fv2> instead of <Fv>.

Thanks, David



More information about the Gcc-patches mailing list