Commit ae605268 authored by Ken Thompson's avatar Ken Thompson

arm floating point simulation

R=rsc
CC=golang-dev
https://golang.org/cl/3565041
parent aa9c213e
......@@ -29,6 +29,11 @@ softfloat(void)
p->cond->mark |= LABEL;
for(p = cursym->text; p != P; p = p->link) {
switch(p->as) {
case AMOVW:
if(p->to.type == D_FREG || p->from.type == D_FREG)
goto soft;
goto notsoft;
case AMOVWD:
case AMOVWF:
case AMOVDW:
......@@ -37,6 +42,7 @@ softfloat(void)
case AMOVDF:
case AMOVF:
case AMOVD:
case ACMPF:
case ACMPD:
case AADDF:
......@@ -47,13 +53,19 @@ softfloat(void)
case AMULD:
case ADIVF:
case ADIVD:
goto soft;
default:
goto notsoft;
soft:
if (psfloat == P)
diag("floats used with _sfloat not defined");
if (!wasfloat || (p->mark&LABEL)) {
next = prg();
*next = *p;
// BL _sfloat(SB)
// BL _sfloat(SB)
*p = zprg;
p->link = next;
p->as = ABL;
......@@ -65,7 +77,8 @@ softfloat(void)
wasfloat = 1;
}
break;
default:
notsoft:
wasfloat = 0;
}
}
......
This diff is collapsed.
......@@ -230,7 +230,9 @@ struct M
uint32 machport; // Return address for Mach IPC (OS X)
MCache *mcache;
G* lockedg;
uint64 freg[8]; // Floating point register storage used by ARM software fp routines
uint32 freglo[16]; // D[i] lsb and F[i]
uint32 freghi[16]; // D[i] msb and F[i+16]
uint32 fflag; // floating point compare flags
#ifdef __WINDOWS__
void* gostack; // bookmark to keep track of go stack during stdcall
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment