[vlc-devel] [PATCH 04/16] Add ARM NEON support
Serg Chernyavskiy
glenvt18 at gmail.com
Tue Jul 7 04:17:48 CEST 2015
Yes it is. The problem is that we only have a whole world shifts for 32 and
64 bit integers, lane shifts and only x8 shifts with sse2, only lane shifts
(64 bit max) with neon, and more tricky shifts with altivec. In other
words, shifts are target specific. On the other hand, we don't need a
"generic shift operation" for the bitslice implementation, but only
particular shifts. That's why it works even if testbsopts fails. I agee
that this code is ugly but it reflects the implementation of the shift
operation on the target. To be perfect we should use BS_SHL1(), BS_SHL3(),
BS_SHL4(), BS_SHL6(), BS_SHL8(), BS_SHL16(), ... and test them (with
appropriate masks). But this would make other code uglier. This test file
needs some refactoring, but frankly, I just didn't mean to spend much time
on it. For instance, it fails with gcc 4.7 and -O3 on ARM because of the
invalid BS_VAL assignment.
2015-07-06 19:12 GMT+03:00 Jean-Baptiste Kempf <jb at videolan.org>:
> On 26 Jun, glenvt18 wrote :
> > + /* there is no neon instruction to shift a whole register */
> > +#ifdef DVBCSA_USE_NEON
> > + b = BS_VAL(0xaaaaaaaaaaaaaa00LL, 0x5555555555555500LL);
> > +#else
> > b = BS_VAL(0xaaaaaaaaaaaaaa55LL, 0x5555555555555500LL);
> > +#endif
>
> This and the related ones gives really ugly code.
>
> With my kindest regards,
>
> --
> Jean-Baptiste Kempf
> http://www.jbkempf.com/ - +33 672 704 734
> Sent from my Electronic Device
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150707/ff8b1a08/attachment.html>
More information about the vlc-devel
mailing list