This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
PSRLQ question.
- To: <gcc at gcc dot gnu dot org>
- Subject: PSRLQ question.
- From: Adam <adam at cfar dot umd dot edu>
- Date: Fri, 2 Nov 2001 21:44:08 -0500 (EST)
Hello,
I have this sample test case (it is extracted from cinelerra,
formerly broadcast 2000 if it matters [*]) This is the test
program:
-----------------------------------------------------------------
typedef unsigned int uint32_t;
#define mmx_i2r(op,imm,reg) \
__asm__ __volatile__ (#op " %0, %%" #reg \
: /* nothing */ \
: "X" (imm) )
#define psrlq_i2r(imm,reg) mmx_i2r (psrlq, imm, reg)
static __inline__ void shift_blk(const uint32_t shift) {
psrlq_i2r( shift,mm0);
}
main () {shift_blk(1);}
-----------------------------------------------------------------
[root@pepsi mpeg2enc]# gcc -v
Reading specs from
/usr/local/gcc302/lib/gcc-lib/i686-pc-linux-gnu/3.0.2/specs
Configured with: ../gcc-3.0.2/configure --prefix=/usr/local/gcc302
Thread model: single
gcc version 3.0.2
[root@pepsi mpeg2enc]# kgcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
-----------------------------------------------------------------
[root@pepsi mpeg2enc]# kgcc -S test.c -o t1.s
[root@pepsi mpeg2enc]# gcc -S test.c -o t2.s
[root@pepsi mpeg2enc]# grep psrlq t?.s
t1.s: psrlq 8(%ebp), %mm0
t2.s: psrlq %eax, %mm0
-----------------------------------------------------------------
[root@pepsi mpeg2enc]# kgcc test.c
[root@pepsi mpeg2enc]# gcc test.c
/tmp/ccnQVpOM.s: Assembler messages:
/tmp/ccnQVpOM.s:27: Error: suffix or operands invalid for `psrlq'
-----------------------------------------------------------------
now as shown above it compiles fine with kgcc, but it fails to compile
with gcc 3.0.2.
Is this problem with gcc, or is this problem with sample code?
[*] file cinelerra/plugins/mpeg2enc/mblock_sub44_sads.c
--
Adam
http://www.eax.com The Supreme Headquarters of the 32 bit registers