summaryrefslogtreecommitdiff
path: root/src/cmd/8l
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2013-07-19 16:04:09 -0400
committerRuss Cox <rsc@golang.org>2013-07-19 16:04:09 -0400
commitf4020ef56c1a6c8a836eeb235027d820ef1a9de5 (patch)
treece435ffb2aefb376c74038ba29df4e0f0f0878b7 /src/cmd/8l
parent61cb7c17c9217b3ed5b9b7b77e8d19054e990b91 (diff)
downloadgo-f4020ef56c1a6c8a836eeb235027d820ef1a9de5.tar.gz
runtime: use funcdata to supply garbage collection information
This CL introduces a FUNCDATA number for runtime-specific garbage collection metadata, changes the C and Go compilers to emit that metadata, and changes the runtime to expect it. The old pseudo-instructions that carried this information are gone, as is the linker code to process them. R=golang-dev, dvyukov, cshapiro CC=golang-dev https://codereview.appspot.com/11406044
Diffstat (limited to 'src/cmd/8l')
-rw-r--r--src/cmd/8l/8.out.h5
-rw-r--r--src/cmd/8l/l.h3
-rw-r--r--src/cmd/8l/obj.c40
3 files changed, 0 insertions, 48 deletions
diff --git a/src/cmd/8l/8.out.h b/src/cmd/8l/8.out.h
index fecb0852c..7683d50ad 100644
--- a/src/cmd/8l/8.out.h
+++ b/src/cmd/8l/8.out.h
@@ -582,11 +582,6 @@ enum as
AFUNCDATA,
APCDATA,
- // TODO: Remove these.
- ALOCALS,
- ANPTRS,
- APTRS,
-
ALAST
};
diff --git a/src/cmd/8l/l.h b/src/cmd/8l/l.h
index 2cf8c76b1..67e607b5b 100644
--- a/src/cmd/8l/l.h
+++ b/src/cmd/8l/l.h
@@ -143,10 +143,7 @@ struct Sym
int32 got;
int32 align; // if non-zero, required alignment in bytes
int32 elfsym;
- int32 locals; // size of stack frame locals area
int32 args; // size of stack frame incoming arguments area
- int32 nptrs; // number of bits in the pointer map
- uint32* ptrs; // pointer map data
Sym* hash; // in hash table
Sym* allsym; // in all symbol list
Sym* next; // in text or data list
diff --git a/src/cmd/8l/obj.c b/src/cmd/8l/obj.c
index 5e8988c9c..8c84aaaea 100644
--- a/src/cmd/8l/obj.c
+++ b/src/cmd/8l/obj.c
@@ -614,51 +614,12 @@ loop:
pc++;
goto loop;
- case ALOCALS:
- if(skip)
- goto casdef;
- cursym->locals = p->to.offset;
- pc++;
- goto loop;
-
case ATYPE:
if(skip)
goto casdef;
pc++;
goto loop;
- case ANPTRS:
- if(skip)
- goto casdef;
- if(cursym->nptrs != -1) {
- diag("ldobj1: multiple pointer maps defined for %s", cursym->name);
- errorexit();
- }
- if(p->to.offset > cursym->args/PtrSize) {
- diag("ldobj1: pointer map definition for %s exceeds its argument size", cursym->name);
- errorexit();
- }
- cursym->nptrs = p->to.offset;
- if(cursym->nptrs != 0)
- cursym->ptrs = mal((rnd(cursym->nptrs, 32) / 32) * sizeof(*cursym->ptrs));
- pc++;
- goto loop;
-
- case APTRS:
- if(skip)
- goto casdef;
- if(cursym->nptrs == -1 || cursym->ptrs == nil) {
- diag("ldobj1: pointer map data provided for %s without a definition", cursym->name);
- errorexit();
- }
- if(p->from.offset*32 >= rnd(cursym->nptrs, 32)) {
- diag("ldobj1: excessive pointer map data provided for %s", cursym->name);
- errorexit();
- }
- cursym->ptrs[p->from.offset] = p->to.offset;
- pc++;
- goto loop;
-
case ATEXT:
s = p->from.sym;
if(s->text != nil) {
@@ -699,7 +660,6 @@ loop:
s->hist = gethist();
s->value = pc;
s->args = p->to.offset2;
- s->nptrs = -1;
lastp = p;
p->pc = pc++;
goto loop;