Bug 18510 - GCC should have instrinsics for SPARC VIS instructions
Summary: GCC should have instrinsics for SPARC VIS instructions
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.0
: P2 enhancement
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-16 00:25 UTC by James A. Morrison
Modified: 2004-11-26 15:24 UTC (History)
2 users (show)

See Also:
Host:
Target: sparc*--
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-11-16 13:55:15


Attachments
VIS intrinsics patch, fails in recog (1.90 KB, patch)
2004-11-16 00:36 UTC, James A. Morrison
Details | Diff
SPARC VIS intrinsics (2.32 KB, patch)
2004-11-16 13:40 UTC, James A. Morrison
Details | Diff
Testcases (686 bytes, application/octet-stream)
2004-11-16 13:43 UTC, James A. Morrison
Details
Updated intrinsics patch, no changelog (3.10 KB, patch)
2004-11-18 14:37 UTC, James A. Morrison
Details | Diff
pdist tests (249 bytes, text/x-csrc)
2004-11-18 14:39 UTC, James A. Morrison
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James A. Morrison 2004-11-16 00:25:38 UTC
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}  .
Comment 1 James A. Morrison 2004-11-16 00:36:29 UTC
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.
Comment 2 James A. Morrison 2004-11-16 04:17:17 UTC
 Having sparc_expand_builtin return target/op[0] instead of pat makes gets rid
of the problems in extract_insn.
Comment 3 James A. Morrison 2004-11-16 13:40:55 UTC
Created attachment 7558 [details]
SPARC VIS intrinsics

 This patch doesn't fail in recog and passes the attached tests.
Comment 4 James A. Morrison 2004-11-16 13:43:21 UTC
Created attachment 7559 [details]
Testcases
Comment 5 Andrew Pinski 2004-11-16 13:55:15 UTC
Confirmed.
Comment 6 James A. Morrison 2004-11-18 14:37:25 UTC
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.
Comment 7 James A. Morrison 2004-11-18 14:39:41 UTC
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.
Comment 8 James A. Morrison 2004-11-20 20:00:06 UTC
http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01653.html
Comment 9 James A. Morrison 2004-11-23 02:12:06 UTC
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
Comment 10 GCC Commits 2004-11-26 13:18:33 UTC
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

Comment 11 Andrew Pinski 2004-11-26 15:24:05 UTC
Fixed.