On Jun 18, 2:08 am, zhangfx <zhan
...@lemote.com> wrote:
> Generally very low level advantage is hard to make use directly for
> non-assembly programmers. The toolchain is a good starting point.
Is the vectoriser active in mainline gcc using -march=loongson2f?
I've never had much luck getting it to do anything useful on x86 but I
like to think that it's there, ready to handle that one specific
memset loop that it actually understands.
> For simd, it is mainly suitable for multimedia related things. People
> has already done some work on ffmpeg.
There's a heck of a lot of x86 MMX assembly already written in most
projects that matter, and I'm guessing that it's not hard to
translate. Is it easy enough that a script could do it? I realise
that without 3-op and a decent regfile any existing MMX code is going
to be quite inefficient. I also realise that there are complications
to rewriting both assembly files and C files (assembly files have
whole ABIs that need to be rewritten and will use lots of scalar
instructions and registers, while C files with inline assembly have to
have their assembly rewritten in place). But it seems like it should
be possible to automate most of the tedious rewriting work.
Unfortunately I don't know any useful scripting languages, so I'm not
much use. I'll probably end up using my command history in vim to
repeat various complex search and replace operations.