Skip to content

Commit

Permalink
fix MOVQ
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Nov 1, 2011
1 parent d3046fe commit df8b1f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/backend/cod1.c
Expand Up @@ -3874,6 +3874,12 @@ code *loaddata(elem *e,regm_t *pretregs)

assert(sz == 4 || sz == 8); // float or double
unsigned op = (sz == 4) ? 0xF30F10 : 0xF20F10;
if (e->Eoper == OPvar)
{ symbol *s = e->EV.sp.Vsym;
if (s->Sfl == FLreg && !(mask[s->Sreglsw] & XMMREGS))
{ op = 0x660F6E; // MOVD/MOVQ
}
}
ce = loadea(e,&cs,op,reg,0,RMload,0); // MOVSS/MOVSD reg,data
c = cat(c,ce);
}
Expand Down

0 comments on commit df8b1f4

Please sign in to comment.