summaryrefslogtreecommitdiff
path: root/src/cmd/5c/sgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/5c/sgen.c')
-rw-r--r--src/cmd/5c/sgen.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cmd/5c/sgen.c b/src/cmd/5c/sgen.c
index 1584ecff3..92a0f64f8 100644
--- a/src/cmd/5c/sgen.c
+++ b/src/cmd/5c/sgen.c
@@ -34,9 +34,17 @@
Prog*
gtext(Sym *s, int32 stkoff)
{
+ int32 a;
+
+ a = 0;
+ if(!(textflag & NOSPLIT))
+ a = argsize();
+ else if(stkoff >= 128)
+ yyerror("stack frame too large for NOSPLIT function");
+
gpseudo(ATEXT, s, nodconst(stkoff));
p->to.type = D_CONST2;
- p->to.offset2 = argsize();
+ p->to.offset2 = a;
return p;
}