GCC currently doesn't have any builtin functions to access SPARCs VIS instructions. It should have nice functions for instructions such as fpack{16,32,fix} .
Created attachment 7551 [details] VIS intrinsics patch, fails in recog This patch gets GCC to the point where recog fails to recognize the fpack{16,32} instructions, but the builtins are expanded.
Having sparc_expand_builtin return target/op[0] instead of pat makes gets rid of the problems in extract_insn.
Created attachment 7558 [details] SPARC VIS intrinsics This patch doesn't fail in recog and passes the attached tests.
Created attachment 7559 [details] Testcases
Confirmed.
Created attachment 7565 [details] Updated intrinsics patch, no changelog This has been built on sparc-linux testing gcc.target/sparc and regtested on sparc64-linux with no regressions.
Created attachment 7566 [details] pdist tests I've updated the other tests to use foo instead of useless function, but that is the only difference from the tests in the testcases tarball.
http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01653.html
Most VIS intructions now have intrinsics. edge* and array* intructions don't nor do the compare instructions. I'm hopeful the comparison instructions can be done without intrinsics, but I'm not sure. I still don't have a clue how the edge and array instructions are supposed to be use, so I've avoided dealing with them. The documentation at least needs to be fixed before I close this bug. The cvs commit is at. http://gcc.gnu.org/ml/gcc-cvs/2004-11/msg01053.html
Subject: Bug 18510 CVSROOT: /cvs/gcc Module name: gcc Changes by: phython@gcc.gnu.org 2004-11-26 13:18:16 Modified files: gcc : ChangeLog gcc/doc : extend.texi Log message: 2004-11-26 James A. Morrison <phython@gcc.gnu.org> PR target/18510 * doc/extend.texi (SPARC VIS Built-in Functions): New section. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6569&r2=2.6570 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/extend.texi.diff?cvsroot=gcc&r1=1.232&r2=1.233
Fixed.