Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1091)

Unified Diff: src/cmd/8g/gsubr.c

Issue 6259057: code review 6259057: cmd/5g, cmd/6g, cmd/8g: delete clearstk (Closed)
Patch Set: diff -r a621ac756347 https://go.googlecode.com/hg/ Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/6g/gsubr.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/8g/gsubr.c
===================================================================
--- a/src/cmd/8g/gsubr.c
+++ b/src/cmd/8g/gsubr.c
@@ -174,44 +174,6 @@
}
void
-clearstk(void)
-{
- Plist *pl;
- Prog *p1, *p2;
- Node sp, di, cx, con, ax;
-
- if(plast->firstpc->to.offset <= 0)
- return;
-
- // reestablish context for inserting code
- // at beginning of function.
- pl = plast;
- p1 = pl->firstpc;
- p2 = p1->link;
- pc = mal(sizeof(*pc));
- clearp(pc);
- p1->link = pc;
-
- // zero stack frame
- nodreg(&sp, types[tptr], D_SP);
- nodreg(&di, types[tptr], D_DI);
- nodreg(&cx, types[TUINT32], D_CX);
- nodconst(&con, types[TUINT32], p1->to.offset / widthptr);
- gins(ACLD, N, N);
- gins(AMOVL, &sp, &di);
- gins(AMOVL, &con, &cx);
- nodconst(&con, types[TUINT32], 0);
- nodreg(&ax, types[TUINT32], D_AX);
- gins(AMOVL, &con, &ax);
- gins(AREP, N, N);
- gins(ASTOSL, N, N);
-
- // continue with original code.
- gins(ANOP, N, N)->link = p2;
- pc = P;
-}
-
-void
gused(Node *n)
{
gins(ANOP, n, N); // used
« no previous file with comments | « src/cmd/6g/gsubr.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b