aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config.gcc1
-rw-r--r--gcc/config/sparc/visintrin.h160
3 files changed, 167 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 94a61ec..a5a2b00 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-16 David S. Miller <davem@davemloft.net>
+
+ * config/sparc/visintrin.h: New file.
+ * config.gcc: Add it to extra_headers on sparc.
+
2011-09-16 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.c (ix86_expand_reduc_v4sf): Rename to ...
@@ -19,7 +24,7 @@
32-byte vector modes if TARGET_AVX.
2011-09-16 Georg-Johann Lay <avr@gjlay.de>
-
+
* config/avr/avr.md: (umulqihi3, mulqihi3): Write as one pattern.
(umulqi3_highpart, smulqi3_highpart): Ditto.
(*maddqihi4.const, *umaddqihi4.uconst): Ditto.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index e442fa7..7183f26 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -422,6 +422,7 @@ score*-*-*)
;;
sparc*-*-*)
cpu_type=sparc
+ extra_headers="visintrin.h"
need_64bit_hwint=yes
;;
spu*-*-*)
diff --git a/gcc/config/sparc/visintrin.h b/gcc/config/sparc/visintrin.h
new file mode 100644
index 0000000..5687c9b
--- /dev/null
+++ b/gcc/config/sparc/visintrin.h
@@ -0,0 +1,160 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ GCC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _VISINTRIN_H_INCLUDED
+#define _VISINTRIN_H_INCLUDED
+
+typedef int __v2si __attribute__ ((__vector_size__ (8)));
+typedef short __v4hi __attribute__ ((__vector_size__ (8)));
+typedef short __v2hi __attribute__ ((__vector_size__ (4)));
+typedef char __v8qi __attribute__ ((__vector_size__ (8)));
+typedef char __v4qi __attribute__ ((__vector_size__ (4)));
+typedef int __i64 __attribute__ ((__mode__ (DI)));
+
+extern __inline void *
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_alignaddr (void *__A, long __B)
+{
+ return __builtin_vis_alignaddr (__A, __B);
+}
+
+extern __inline __i64
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_faligndatadi (__i64 __A)
+{
+ return __builtin_vis_faligndatadi (__A);
+}
+
+extern __inline __v2si
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_faligndatav2si (__v2si __A)
+{
+ return __builtin_vis_faligndatav2si (__A);
+}
+
+extern __inline __v4hi
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_faligndatav4hi (__v4hi __A)
+{
+ return __builtin_vis_faligndatav4hi (__A);
+}
+
+extern __inline __v8qi
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_faligndatav8qi (__v8qi __A)
+{
+ return __builtin_vis_faligndatav8qi (__A);
+}
+
+extern __inline __v4hi
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_fexpand (__v4qi __A)
+{
+ return __builtin_vis_fexpand (__A);
+}
+
+extern __inline __v4hi
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_fmul8x16 (__v4qi __A, __v4hi __B)
+{
+ return __builtin_vis_fmul8x16 (__A, __B);
+}
+
+extern __inline __v4hi
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_fmul8x16au (__v4qi __A, __v4hi __B)
+{
+ return __builtin_vis_fmul8x16au (__A, __B);
+}
+
+extern __inline __v4hi
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_fmul8x16al (__v4qi __A, __v4hi __B)
+{
+ return __builtin_vis_fmul8x16al (__A, __B);
+}
+
+extern __inline __v4hi
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_fmul8sux16 (__v8qi __A, __v4hi __B)
+{
+ return __builtin_vis_fmul8sux16 (__A, __B);
+}
+
+extern __inline __v4hi
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_fmul8ulx16 (__v8qi __A, __v4hi __B)
+{
+ return __builtin_vis_fmul8ulx16 (__A, __B);
+}
+
+extern __inline __v2si
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_fmuld8sux16 (__v4qi __A, __v2hi __B)
+{
+ return __builtin_vis_fmuld8sux16 (__A, __B);
+}
+
+extern __inline __v2si
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_fmuld8ulx16 (__v4qi __A, __v2hi __B)
+{
+ return __builtin_vis_fmuld8ulx16 (__A, __B);
+}
+
+extern __inline __v4qi
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_fpack16 (__v4hi __A)
+{
+ return __builtin_vis_fpack16 (__A);
+}
+
+extern __inline __v8qi
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_fpack32 (__v2si __A, __v2si __B)
+{
+ return __builtin_vis_fpack32 (__A, __B);
+}
+
+extern __inline __v2hi
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_fpackfix (__v2si __A)
+{
+ return __builtin_vis_fpackfix (__A);
+}
+
+extern __inline __v8qi
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_fpmerge (__v4qi __A, __v4qi __B)
+{
+ return __builtin_vis_fpmerge (__A, __B);
+}
+
+extern __inline __i64
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+__vis_pdist (__v8qi __A, __v8qi __B, __i64 __C)
+{
+ return __builtin_vis_pdist (__A, __B, __C);
+}
+
+#endif /* _VISINTRIN_H_INCLUDED */