[x264-devel] PPC -- vec_splats doesn't exist on Power4 PPC/Apple

Ken Cunningham ken.cunningham.webuse at gmail.com
Sun Mar 31 22:53:33 CEST 2019



> On Mar 31, 2019, at 10:50 AM, Luca Barbato <lu_zero at gentoo.org> wrote:
> 
> On 31/03/2019 04:26, Ken Cunningham wrote:
> 

> Both clang and gcc seem to not guard that intrinsic and clang has it mapped to its portable simd.
> 
> Could you please check that passing the -march/-mcpu for g4 or g5 produces valid code?
> 
> lu

You are right. There is a combination of CFLAGS that does ultimately work to enable the vec_splats() instruction on PPC Darwin.

It is only available with newer gcc versions, and so far only gcc7 has built x264 successfully with the current assembly — prior gcc versions either had internal compiler errors during the compilation, or didn’t include the instruction.

I was initially running into trouble with gcc7 because compiling with gcc7 also enabled the -mvsx flag but then Darwin’s assembler errored out on the assembly instructions that flag caused to be generated. I manually disabled that.

I will work on this further and see if I can trim the CFLAGS for darwin down to their essential needs. 

If I can get it sufficiently clean, I’ll report back.

Best, Ken




More information about the x264-devel mailing list