aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/5l/softfloat.c
diff options
context:
space:
mode:
authorKen Thompson <ken@golang.org>2010-12-09 14:45:27 -0800
committerKen Thompson <ken@golang.org>2010-12-09 14:45:27 -0800
commitae605268488e49f4c4f0e46ac0fb69d7129d9f0c (patch)
tree89ed13760497ff493cb8ac3e9709749e20996154 /src/cmd/5l/softfloat.c
parentaa9c213e564d58026fd6f822d43c8f3f6e66c68b (diff)
downloadgo-ae605268488e49f4c4f0e46ac0fb69d7129d9f0c.tar.xz
arm floating point simulation
R=rsc CC=golang-dev https://golang.org/cl/3565041
Diffstat (limited to 'src/cmd/5l/softfloat.c')
-rw-r--r--src/cmd/5l/softfloat.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/cmd/5l/softfloat.c b/src/cmd/5l/softfloat.c
index 8df8e5b3cb..fd66b09699 100644
--- a/src/cmd/5l/softfloat.c
+++ b/src/cmd/5l/softfloat.c
@@ -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;
}
}