Commit a00782ed by Jan Hubicka Committed by Jan Hubicka

re PR other/8289 (Errorneous prototypes of xmmintrin.h functions)


	PR other/8289
	* xmmintrin.h: Add const to the argument of loads.

	* i386.md (pushv2di): New pattern.
	PR target/6890
	* xmmintrin.h (_MM_TRANSPOSE4_PS): New.

From-SVN: r58428
parent ad4f9910
Wed Oct 23 01:52:36 CEST 2002 Jan Hubicka <jh@suse.cz>
PR other/8289
* xmmintrin.h: Add const to the argument of loads.
* i386.md (pushv2di): New pattern.
PR target/6890
* xmmintrin.h (_MM_TRANSPOSE4_PS): New.
2002-10-22 Richard Henderson <rth@redhat.com> 2002-10-22 Richard Henderson <rth@redhat.com>
* target.h (gcc_target.asm_out): Merge output_mi_thunk and * target.h (gcc_target.asm_out): Merge output_mi_thunk and
......
...@@ -18055,6 +18055,17 @@ ...@@ -18055,6 +18055,17 @@
"" ""
[(set_attr "type" "multi")]) [(set_attr "type" "multi")])
(define_insn_and_split "*pushv2di"
[(set (match_operand:V2DI 0 "push_operand" "=<")
(match_operand:V2DI 1 "nonmemory_operand" "x"))]
"TARGET_SSE2"
"#"
""
[(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16)))
(set (mem:V2DI (reg:SI 7)) (match_dup 1))]
""
[(set_attr "type" "multi")])
(define_insn_and_split "*pushv8hi" (define_insn_and_split "*pushv8hi"
[(set (match_operand:V8HI 0 "push_operand" "=<") [(set (match_operand:V8HI 0 "push_operand" "=<")
(match_operand:V8HI 1 "nonmemory_operand" "x"))] (match_operand:V8HI 1 "nonmemory_operand" "x"))]
......
...@@ -648,7 +648,7 @@ _mm_unpacklo_ps (__m128 __A, __m128 __B) ...@@ -648,7 +648,7 @@ _mm_unpacklo_ps (__m128 __A, __m128 __B)
/* Sets the upper two SPFP values with 64-bits of data loaded from P; /* Sets the upper two SPFP values with 64-bits of data loaded from P;
the lower two values are passed through from A. */ the lower two values are passed through from A. */
static __inline __m128 static __inline __m128
_mm_loadh_pi (__m128 __A, __m64 *__P) _mm_loadh_pi (__m128 __A, __m64 const *__P)
{ {
return (__m128) __builtin_ia32_loadhps ((__v4sf)__A, (__v2si *)__P); return (__m128) __builtin_ia32_loadhps ((__v4sf)__A, (__v2si *)__P);
} }
...@@ -677,7 +677,7 @@ _mm_movelh_ps (__m128 __A, __m128 __B) ...@@ -677,7 +677,7 @@ _mm_movelh_ps (__m128 __A, __m128 __B)
/* Sets the lower two SPFP values with 64-bits of data loaded from P; /* Sets the lower two SPFP values with 64-bits of data loaded from P;
the upper two values are passed through from A. */ the upper two values are passed through from A. */
static __inline __m128 static __inline __m128
_mm_loadl_pi (__m128 __A, __m64 *__P) _mm_loadl_pi (__m128 __A, __m64 const *__P)
{ {
return (__m128) __builtin_ia32_loadlps ((__v4sf)__A, (__v2si *)__P); return (__m128) __builtin_ia32_loadlps ((__v4sf)__A, (__v2si *)__P);
} }
...@@ -762,42 +762,42 @@ _MM_SET_FLUSH_ZERO_MODE (unsigned int __mode) ...@@ -762,42 +762,42 @@ _MM_SET_FLUSH_ZERO_MODE (unsigned int __mode)
/* Create a vector with element 0 as *P and the rest zero. */ /* Create a vector with element 0 as *P and the rest zero. */
static __inline __m128 static __inline __m128
_mm_load_ss (float *__P) _mm_load_ss (float const *__P)
{ {
return (__m128) __builtin_ia32_loadss (__P); return (__m128) __builtin_ia32_loadss (__P);
} }
/* Create a vector with all four elements equal to *P. */ /* Create a vector with all four elements equal to *P. */
static __inline __m128 static __inline __m128
_mm_load1_ps (float *__P) _mm_load1_ps (float const *__P)
{ {
__v4sf __tmp = __builtin_ia32_loadss (__P); __v4sf __tmp = __builtin_ia32_loadss (__P);
return (__m128) __builtin_ia32_shufps (__tmp, __tmp, _MM_SHUFFLE (0,0,0,0)); return (__m128) __builtin_ia32_shufps (__tmp, __tmp, _MM_SHUFFLE (0,0,0,0));
} }
static __inline __m128 static __inline __m128
_mm_load_ps1 (float *__P) _mm_load_ps1 (float const *__P)
{ {
return _mm_load1_ps (__P); return _mm_load1_ps (__P);
} }
/* Load four SPFP values from P. The address must be 16-byte aligned. */ /* Load four SPFP values from P. The address must be 16-byte aligned. */
static __inline __m128 static __inline __m128
_mm_load_ps (float *__P) _mm_load_ps (float const *__P)
{ {
return (__m128) __builtin_ia32_loadaps (__P); return (__m128) __builtin_ia32_loadaps (__P);
} }
/* Load four SPFP values from P. The address need not be 16-byte aligned. */ /* Load four SPFP values from P. The address need not be 16-byte aligned. */
static __inline __m128 static __inline __m128
_mm_loadu_ps (float *__P) _mm_loadu_ps (float const *__P)
{ {
return (__m128) __builtin_ia32_loadups (__P); return (__m128) __builtin_ia32_loadups (__P);
} }
/* Load four SPFP values in reverse order. The address must be aligned. */ /* Load four SPFP values in reverse order. The address must be aligned. */
static __inline __m128 static __inline __m128
_mm_loadr_ps (float *__P) _mm_loadr_ps (float const *__P)
{ {
__v4sf __tmp = __builtin_ia32_loadaps (__P); __v4sf __tmp = __builtin_ia32_loadaps (__P);
return (__m128) __builtin_ia32_shufps (__tmp, __tmp, _MM_SHUFFLE (0,1,2,3)); return (__m128) __builtin_ia32_shufps (__tmp, __tmp, _MM_SHUFFLE (0,1,2,3));
...@@ -1069,8 +1069,8 @@ _mm_pause (void) ...@@ -1069,8 +1069,8 @@ _mm_pause (void)
do { \ do { \
__v4sf __r0 = (row0), __r1 = (row1), __r2 = (row2), __r3 = (row3); \ __v4sf __r0 = (row0), __r1 = (row1), __r2 = (row2), __r3 = (row3); \
__v4sf __t0 = __builtin_ia32_shufps (__r0, __r1, 0x44); \ __v4sf __t0 = __builtin_ia32_shufps (__r0, __r1, 0x44); \
__v4sf __t1 = __builtin_ia32_shufps (__r0, __r1, 0xEE); \ __v4sf __t2 = __builtin_ia32_shufps (__r0, __r1, 0xEE); \
__v4sf __t2 = __builtin_ia32_shufps (__r2, __r3, 0x44); \ __v4sf __t1 = __builtin_ia32_shufps (__r2, __r3, 0x44); \
__v4sf __t3 = __builtin_ia32_shufps (__r2, __r3, 0xEE); \ __v4sf __t3 = __builtin_ia32_shufps (__r2, __r3, 0xEE); \
(row0) = __builtin_ia32_shufps (__t0, __t1, 0x88); \ (row0) = __builtin_ia32_shufps (__t0, __t1, 0x88); \
(row1) = __builtin_ia32_shufps (__t0, __t1, 0xDD); \ (row1) = __builtin_ia32_shufps (__t0, __t1, 0xDD); \
...@@ -1095,42 +1095,42 @@ typedef int __v16qi __attribute__ ((mode (V16QI))); ...@@ -1095,42 +1095,42 @@ typedef int __v16qi __attribute__ ((mode (V16QI)));
/* Create a vector with element 0 as *P and the rest zero. */ /* Create a vector with element 0 as *P and the rest zero. */
static __inline __m128d static __inline __m128d
_mm_load_sd (double *__P) _mm_load_sd (double const *__P)
{ {
return (__m128d) __builtin_ia32_loadsd (__P); return (__m128d) __builtin_ia32_loadsd (__P);
} }
/* Create a vector with all two elements equal to *P. */ /* Create a vector with all two elements equal to *P. */
static __inline __m128d static __inline __m128d
_mm_load1_pd (double *__P) _mm_load1_pd (double const *__P)
{ {
__v2df __tmp = __builtin_ia32_loadsd (__P); __v2df __tmp = __builtin_ia32_loadsd (__P);
return (__m128d) __builtin_ia32_shufpd (__tmp, __tmp, _MM_SHUFFLE2 (0,0)); return (__m128d) __builtin_ia32_shufpd (__tmp, __tmp, _MM_SHUFFLE2 (0,0));
} }
static __inline __m128d static __inline __m128d
_mm_load_pd1 (double *__P) _mm_load_pd1 (double const *__P)
{ {
return _mm_load1_pd (__P); return _mm_load1_pd (__P);
} }
/* Load two DPFP values from P. The addresd must be 16-byte aligned. */ /* Load two DPFP values from P. The addresd must be 16-byte aligned. */
static __inline __m128d static __inline __m128d
_mm_load_pd (double *__P) _mm_load_pd (double const *__P)
{ {
return (__m128d) __builtin_ia32_loadapd (__P); return (__m128d) __builtin_ia32_loadapd (__P);
} }
/* Load two DPFP values from P. The addresd need not be 16-byte aligned. */ /* Load two DPFP values from P. The addresd need not be 16-byte aligned. */
static __inline __m128d static __inline __m128d
_mm_loadu_pd (double *__P) _mm_loadu_pd (double const *__P)
{ {
return (__m128d) __builtin_ia32_loadupd (__P); return (__m128d) __builtin_ia32_loadupd (__P);
} }
/* Load two DPFP values in reverse order. The addresd must be aligned. */ /* Load two DPFP values in reverse order. The addresd must be aligned. */
static __inline __m128d static __inline __m128d
_mm_loadr_pd (double *__P) _mm_loadr_pd (double const *__P)
{ {
__v2df __tmp = __builtin_ia32_loadapd (__P); __v2df __tmp = __builtin_ia32_loadapd (__P);
return (__m128d) __builtin_ia32_shufpd (__tmp, __tmp, _MM_SHUFFLE2 (0,1)); return (__m128d) __builtin_ia32_shufpd (__tmp, __tmp, _MM_SHUFFLE2 (0,1));
...@@ -1932,7 +1932,7 @@ _mm_unpacklo_pd (__m128d __A, __m128d __B) ...@@ -1932,7 +1932,7 @@ _mm_unpacklo_pd (__m128d __A, __m128d __B)
} }
static __inline __m128d static __inline __m128d
_mm_loadh_pd (__m128d __A, double *__B) _mm_loadh_pd (__m128d __A, double const *__B)
{ {
return (__m128d)__builtin_ia32_loadhpd ((__v2df)__A, (__v2si *)__B); return (__m128d)__builtin_ia32_loadhpd ((__v2df)__A, (__v2si *)__B);
} }
...@@ -1944,7 +1944,7 @@ _mm_storeh_pd (double *__A, __m128d __B) ...@@ -1944,7 +1944,7 @@ _mm_storeh_pd (double *__A, __m128d __B)
} }
static __inline __m128d static __inline __m128d
_mm_loadl_pd (__m128d __A, double *__B) _mm_loadl_pd (__m128d __A, double const *__B)
{ {
return (__m128d)__builtin_ia32_loadlpd ((__v2df)__A, (__v2si *)__B); return (__m128d)__builtin_ia32_loadlpd ((__v2df)__A, (__v2si *)__B);
} }
...@@ -2436,7 +2436,7 @@ _mm_movpi64_epi64 (__m64 __A) ...@@ -2436,7 +2436,7 @@ _mm_movpi64_epi64 (__m64 __A)
} }
static __inline void static __inline void
_mm_clflush (void *__A) _mm_clflush (void const *__A)
{ {
return __builtin_ia32_clflush (__A); return __builtin_ia32_clflush (__A);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment