On Mon, Sep 29, 2014 at 4:15 PM, Bill Schmidt <wschm...@linux.vnet.ibm.com> wrote: > Hi, > > The vec_lvsl and vec_lvsr interfaces are deprecated for little-endian > Power, and really should not be used on big-endian Power either when the > target CPU is power8 or above. The lexer in libcpp currently makes use > of these interfaces in search_line_fast(). This patch provides a new > version of search_line_fast() that allows unaligned loads to be handled > by the hardware. > > The new version is used when _ARCH_PWR8 and __ALTIVEC__ are defined. > Otherwise, the older version may be used; however it is now restricted > for use only on big-endian systems. If we are targeting little-endian > (which requires P8 or higher) and either Altivec support or Power8 > architecture support has been disabled, then we revert to a slower > search routine. This prevents ever using the deprecated instructions > for little-endian code generation. > > I haven't added a new test case, as bootstrapping GCC is an excellent > test of search_line_fast(), and that appears to be all we do at present > for the existing implementations. > > Bootstrapped and tested on powerpc64le-unknown-linux-gnu and > powerpc64-unknown-linux-gnu with no new regressions. Is this ok for > trunk? > > Thanks, > Bill > > > 2014-09-29 Bill Schmidt <wschm...@linux.vnet.ibm.com> > > * lex.c (search_line_fast): Add new version to be used for Power8 > and later targets when Altivec is enabled. Restrict the existing > Altivec version to big-endian systems so that lvsr is not used on > little endian, where it is deprecated. Remove LE-specific code > from the now-BE-only version.
The code is POWER-specific. It's okay with me. The GCC front-end maintainers do not seem to have any concerns or objections. Thanks, David