This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/33369] [4.3 Regression] suffix or operands invalid for `pslld'
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Sep 2007 06:32:55 -0000
- Subject: [Bug target/33369] [4.3 Regression] suffix or operands invalid for `pslld'
- References: <bug-33369-3760@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from ubizjak at gmail dot com 2007-09-10 06:32 -------
A 64-bit compiler is required. The problem is, that gcc creates a vector shift
constant for vector shift instruction, without checking if optab can take
vector argument.
This one will also create wrong operand for x86_64:
--cut here--
typedef struct tagPOINT
{
int x;
int y;
} POINT;
void
f (POINT * ptBuf)
{
int i;
for (i = 0; i < 4; i++)
{
ptBuf[i].x = ((ptBuf[i].x) << 4);
ptBuf[i].y = ((ptBuf[i].y) << 4);
}
}
--cut here--
When compiling with 32bit compiler, the shift argument is pushed into memory,
but resulting code is still wrong:
movdqu (%edx), %xmm0
movdqa .LC0, %xmm1
pslld %xmm1, %xmm0
movdqa %xmm0, (%edx)
movdqu 16(%edx), %xmm0
pslld %xmm1, %xmm0
movdqa %xmm0, 16(%edx)
where
.LC0:
.long 4
.long 4
.long 4
.long 4
This problem is similar or the same as PR22480.
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |22480
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33369