Bug 7693 - Typo in i386 mmintrin.h header
Typo in i386 mmintrin.h header
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: target
3.2
: P3 normal
: ---
Assigned To: Bernd Schmidt
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-08-23 00:36 UTC by shawnw
Modified: 2003-07-25 17:33 UTC (History)
2 users (show)

See Also:
Host: athlon-pc-linux-gnu
Target: athlon-pc-linux-gnu
Build: athlon-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description shawnw 2002-08-23 00:36:01 UTC
The functions in gcc/config/i386/mmintrin.h for shifting 64 bit values don't
match the names in the Intel x86 instruction set documentation, or what the
Intel compiler accepts. In all 4 relevant functions, the pi64 extension in
the gcc mmintrin.h names should be si64. For example, _mm_sll_pi64() should
be _mm_sll_si64().

Problem is in 3.2 and current cvs HEAD.

Release:
3.2

Environment:
System: Linux sherlock.localdomain 2.2.21 #1 Sun Aug 18 11:20:19 PDT 2002 i686 unknown
Architecture: athlon

	
host: athlon-pc-linux-gnu
build: athlon-pc-linux-gnu
target: athlon-pc-linux-gnu
configured with: ../gcc-3.2/configure --prefix=/usr/local --target=athlon-pc-linux-gnu --with-arch=athlon --enable-threads=posix --disable-nls --with-system-zlib --enable-languages=c,c++,f77 --enable-__cxa_atexit --enable-shared
Comment 1 shawnw 2002-08-23 00:36:01 UTC
Fix:
--- gcc/config/i386/mmintrin.h.orig	Fri Aug 23 00:06:52 2002
+++ gcc/config/i386/mmintrin.h	Fri Aug 23 00:10:40 2002
@@ -293,13 +293,13 @@
 
 /* Shift the 64-bit value in M left by COUNT.  */
 static __inline __m64
-_mm_sll_pi64 (__m64 __m, __m64 __count)
+_mm_sll_si64 (__m64 __m, __m64 __count)
 {
   return (__m64) __builtin_ia32_psllq (__m, __count);
 }
 
 static __inline __m64
-_mm_slli_pi64 (__m64 __m, int __count)
+_mm_slli_si64 (__m64 __m, int __count)
 {
   return (__m64) __builtin_ia32_psllq (__m, __count);
 }
@@ -358,13 +358,13 @@
 
 /* Shift the 64-bit value in M left by COUNT; shift in zeros.  */
 static __inline __m64
-_mm_srl_pi64 (__m64 __m, __m64 __count)
+_mm_srl_si64 (__m64 __m, __m64 __count)
 {
   return (__m64) __builtin_ia32_psrlq (__m, __count);
 }
 
 static __inline __m64
-_mm_srli_pi64 (__m64 __m, int __count)
+_mm_srli_si64 (__m64 __m, int __count)
 {
   return (__m64) __builtin_ia32_psrlq (__m, __count);
 }
Comment 2 Jan Hubicka 2002-10-03 10:39:07 UTC
Responsible-Changed-From-To: unassigned->bernds
Responsible-Changed-Why: Bernd, looks like trivial for you to approve this fix
Comment 3 Jan Hubicka 2002-10-19 08:48:38 UTC
From: hubicka@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: target/7693
Date: 19 Oct 2002 08:48:38 -0000

 CVSROOT:	/cvs/gcc
 Module name:	egcs
 Changes by:	hubicka@gcc.gnu.org	2002-10-19 01:48:38
 
 Modified files:
 	gcc            : ChangeLog 
 	gcc/config/i386: i386.h mmintrin.h 
 
 Log message:
 	* mmintrin.h (__m64): typedef it to v2si.
 	(_mm_cvtsi32_si64, _mm_cvtsi32_si64_mm_sll_pi16,
 	_mm_sll_pi32, _mm_sll_pi64, _mm_slli_pi64, _mm_sra_pi16,
 	_mm_sra_pi32, _mm_srl_pi16, _mm_srl_pi32, _mm_srl_pi64,
 	_mm_srli_pi64, _mm_and_si64, _mm_andnot_si64,
 	_mm_or_si64, _mm_xor_si64): Add neccesary casts.
 	* xmmintrin.h (_mm_setzero_si64): Likewise.
 	
 	* i386.h (ALIGN_MODE_128): Update comment; add missing modes
 	(SSE_REG_MODE_P, MMX_REG_MODE_P): New macros.
 	
 	PR target/7693
 	Patch by Shawn Wagner
 	* mmintrin.h: Replace pi64 by si64.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.15728&r2=1.15729
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/config/i386/i386.h.diff?cvsroot=gcc&r1=1.296&r2=1.297
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/config/i386/mmintrin.h.diff?cvsroot=gcc&r1=1.3&r2=1.4
 

Comment 4 Jan Hubicka 2002-10-19 13:51:34 UTC
From: hubicka@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: target/7693
Date: 19 Oct 2002 13:51:34 -0000

 CVSROOT:	/cvs/gcc
 Module name:	egcs
 Branch: 	gcc-3_2-branch
 Changes by:	hubicka@gcc.gnu.org	2002-10-19 06:51:34
 
 Modified files:
 	gcc            : ChangeLog 
 	gcc/config/i386: mmintrin.h 
 
 Log message:
 	* mmintrin.h (__m64): typedef it to v2si.
 	(_mm_cvtsi32_si64, _mm_cvtsi32_si64_mm_sll_pi16,
 	_mm_sll_pi32, _mm_sll_pi64, _mm_slli_pi64, _mm_sra_pi16,
 	_mm_sra_pi32, _mm_srl_pi16, _mm_srl_pi32, _mm_srl_pi64,
 	_mm_srli_pi64, _mm_and_si64, _mm_andnot_si64,
 	_mm_or_si64, _mm_xor_si64): Add neccesary casts.
 	* xmmintrin.h (_mm_setzero_si64): Likewise.
 	
 	PR target/7693
 	Patch by Shawn Wagner
 	* mmintrin.h: Replace pi64 by si64.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.13152.2.657.2.98&r2=1.13152.2.657.2.99
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/config/i386/mmintrin.h.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1.22.1&r2=1.1.22.2
 
Comment 5 Jan Hubicka 2002-10-27 02:24:46 UTC
State-Changed-From-To: open->closed
State-Changed-Why: Fixed.