diff options
| author | Russ Cox <rsc@golang.org> | 2014-09-04 21:12:31 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-09-04 21:12:31 -0400 |
| commit | db58ab96fa4767ca6144678d63203be5381709d6 (patch) | |
| tree | 734bf2f8992b8992c96a8a56c946acfc33db05f2 /src/pkg/runtime/softfloat_arm.c | |
| parent | 1a14b5bad8926941023ca310fa3b53c70717b1e2 (diff) | |
| download | go-db58ab96fa4767ca6144678d63203be5381709d6.tar.xz | |
runtime: more C to Go conversion adjustments
Mostly NOSPLIT additions.
Had to rewrite atomic_arm.c in Go because it calls lock,
and lock is too complex.
With this CL, I find no Go -> C calls that can split the stack
on any system except Solaris and Windows.
Solaris and Windows need more work and will be done separately.
LGTM=iant, dave
R=golang-codereviews, bradfitz, iant, dave
CC=dvyukov, golang-codereviews, khr, r
https://golang.org/cl/137160043
Diffstat (limited to 'src/pkg/runtime/softfloat_arm.c')
| -rw-r--r-- | src/pkg/runtime/softfloat_arm.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/src/pkg/runtime/softfloat_arm.c b/src/pkg/runtime/softfloat_arm.c index 6b37160114..5e5f4025ec 100644 --- a/src/pkg/runtime/softfloat_arm.c +++ b/src/pkg/runtime/softfloat_arm.c @@ -606,20 +606,43 @@ struct Sfregs uint32 cspr; }; +static void sfloat2(void); + #pragma textflag NOSPLIT uint32* runtime·_sfloat2(uint32 *lr, Sfregs regs) { + void (*fn)(void); + + g->m->ptrarg[0] = lr; + g->m->ptrarg[1] = ®s; + fn = sfloat2; + runtime·onM(&fn); + lr = g->m->ptrarg[0]; + g->m->ptrarg[0] = nil; + return lr; +} + +static void +sfloat2(void) +{ + uint32 *lr; + Sfregs *regs; uint32 skip; + + lr = g->m->ptrarg[0]; + regs = g->m->ptrarg[1]; + g->m->ptrarg[0] = nil; + g->m->ptrarg[1] = nil; - skip = stepflt(lr, (uint32*)®s.r0); + skip = stepflt(lr, (uint32*)®s->r0); if(skip == 0) { runtime·printf("sfloat2 %p %x\n", lr, *lr); fabort(); // not ok to fail first instruction } lr += skip; - while(skip = stepflt(lr, (uint32*)®s.r0)) + while(skip = stepflt(lr, (uint32*)®s->r0)) lr += skip; - return lr; + g->m->ptrarg[0] = lr; } |
