This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] Fix PR63266: Keep track of impact of sign extension in bswap


> From: Christophe Lyon [mailto:christophe.lyon@linaro.org]
> Sent: Tuesday, October 21, 2014 10:03 PM
> > +typedef int SItype __attribute__ ((mode (SI)));
> What's the purpose of this? It seems unused.

Sigh. Bad copy/paste from optimize-bswapsi-1.c

I'll add it to my patch for pr63259.


> I believe this should be:
> "checks that unknown byte markers are set correctly in case of cast"

Indeed, there is a 's' missing for markers.

> 
> > +
> > +HItype
> > +swap16 (HItype in)
> > +{
> > +  return (HItype) (((in >> 0) & 0xFF) << 8)
> > +               | (((in >> 8) & 0xFF) << 0);
> > +}
> > +
> >  /* { dg-final { scan-tree-dump-times "16 bit load in target endianness
> found at" 3 "bswap" } } */
> > -/* { dg-final { scan-tree-dump-times "16 bit bswap implementation
> found at" 3 "bswap" { xfail alpha*-*-* arm*-*-* } } } */
> > +/* { dg-final { scan-tree-dump-times "16 bit bswap implementation
> found at" 1 "bswap" { target alpha*-*-* arm*-*-* } } } */
> 
> This line fails when forcing the compiler to target -march=armv5t for
> instance. I suspect this is because the check_effective_target_bswap
> test is too permissive.

Yep, it's likely to be the case. Feel to add a version check in it.

Thanks for the review.

Best regards,

Thomas





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]