mirror of
https://github.com/golang/go
synced 2024-11-20 05:44:44 -07:00
8g: fix 386 floating point stack bug
Also fixes issue 310 comment 5 error. Fixes #310. R=rsc https://golang.org/cl/163042
This commit is contained in:
parent
a0f742d343
commit
e1c347ca59
@ -254,7 +254,9 @@ regopt(Prog *p)
|
||||
*/
|
||||
case AFMOVDP:
|
||||
case AFMOVFP:
|
||||
case AFMOVLP:
|
||||
case AFMOVVP:
|
||||
case AFMOVWP:
|
||||
case ACALL:
|
||||
for(z=0; z<BITS; z++)
|
||||
addrs.b[z] |= bit.b[z];
|
||||
|
4
src/cmd/8g/gsubr.c
Executable file → Normal file
4
src/cmd/8g/gsubr.c
Executable file → Normal file
@ -1289,10 +1289,12 @@ gmove(Node *f, Node *t)
|
||||
if(t->op == OREGISTER)
|
||||
goto hardmem;
|
||||
nodreg(&r1, types[ft], D_F0);
|
||||
if(ft == TFLOAT32 && f->op != OREGISTER)
|
||||
if(f->op != OREGISTER) {
|
||||
if(ft == TFLOAT32)
|
||||
gins(AFMOVF, f, &r1);
|
||||
else
|
||||
gins(AFMOVD, f, &r1);
|
||||
}
|
||||
|
||||
// set round to zero mode during conversion
|
||||
tempalloc(&t1, types[TUINT16]);
|
||||
|
@ -306,8 +306,9 @@ regopt(Prog *firstp)
|
||||
*/
|
||||
case AFMOVDP:
|
||||
case AFMOVFP:
|
||||
case AFMOVVP:
|
||||
case AFMOVLP:
|
||||
case AFMOVVP:
|
||||
case AFMOVWP:
|
||||
case ACALL:
|
||||
for(z=0; z<BITS; z++)
|
||||
addrs.b[z] |= bit.b[z];
|
||||
|
Loading…
Reference in New Issue
Block a user