This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19161] No emms or femms emitted between MMX and FP instructions
- From: "uros at kss-loka dot si" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Aug 2005 14:33:26 -0000
- Subject: [Bug target/19161] No emms or femms emitted between MMX and FP instructions
- References: <20041226201629.19161.rth@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From uros at kss-loka dot si 2005-08-24 14:33 -------
There is another bug in ix86_mode_needed() that causes timeouts for
pr20314-1.c. The problem is in asm operands parsing code that gets into
infinite loop. The correct code should increase variable c instead of cc when
comma is found:
config/i386/i386.c (ix86_mode_needed):
...
for (i = 0; i < noperands; i++)
{
const char *c = constraints[i];
enum reg_class class;
if (c[0] == '%')
c++;
if (ISDIGIT ((unsigned char) c[0]) && c[1] == '\0')
c = constraints[c[0] - '0'];
while (*c)
{
char cc = *c;
int len;
switch (cc)
{
case ',':
c++; <<<<< here!!
continue;
case '=':
case '+':
case '*':
case '%':
case '!':
case '#':
case '&':
case '?':
break;
...
Regarding emms/efpu instructions in loop: I have made some experiments by
inserting mode switching insn before NOTE_INSN_LOOP_BEGIN. The failure in
20050604-1.c is fixed if this mode is set to FPU_MODE_MMX.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19161