From 2370a59167d20d1759ba409391b74278707acebc Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Fri, 14 Nov 2014 13:58:31 -0500 Subject: [dev.power64] 6g,9g: formatters for Prog and Addr details The pretty printers for these make it hard to understand what's actually in the fields of these structures. These "ugly printers" show exactly what's in each field, which can be useful for understanding and debugging code. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/175780043 --- src/cmd/5l/5.out.h | 2 ++ src/cmd/6l/6.out.h | 2 ++ src/cmd/8l/8.out.h | 2 ++ src/cmd/9l/9.out.h | 2 ++ src/cmd/dist/buildgc.c | 4 +++- 5 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/cmd') diff --git a/src/cmd/5l/5.out.h b/src/cmd/5l/5.out.h index 7b16ac446..38a33db64 100644 --- a/src/cmd/5l/5.out.h +++ b/src/cmd/5l/5.out.h @@ -338,6 +338,8 @@ enum D_STATIC = (D_NONE+4), D_AUTO = (D_NONE+5), D_PARAM = (D_NONE+6), + + D_LAST = (D_NONE+26), }; /* diff --git a/src/cmd/6l/6.out.h b/src/cmd/6l/6.out.h index af72784e8..c09ac2824 100644 --- a/src/cmd/6l/6.out.h +++ b/src/cmd/6l/6.out.h @@ -865,6 +865,8 @@ enum D_INDIR, /* additive */ + D_LAST, + T_TYPE = 1<<0, T_INDEX = 1<<1, T_OFFSET = 1<<2, diff --git a/src/cmd/8l/8.out.h b/src/cmd/8l/8.out.h index ed54f6744..596c5f61a 100644 --- a/src/cmd/8l/8.out.h +++ b/src/cmd/8l/8.out.h @@ -654,6 +654,8 @@ enum D_CONST2 = D_INDIR+D_INDIR, + D_LAST, + T_TYPE = 1<<0, T_INDEX = 1<<1, T_OFFSET = 1<<2, diff --git a/src/cmd/9l/9.out.h b/src/cmd/9l/9.out.h index 08a339318..87917f88a 100644 --- a/src/cmd/9l/9.out.h +++ b/src/cmd/9l/9.out.h @@ -497,6 +497,8 @@ enum D_DCONST, D_ADDR, // not used, use D_CONST with non-empty sym. + D_LAST, + /* reg names for 9g OREGISTER */ D_R0 = 0, // type is D_REG D_F0 = D_R0+NREG, // type is D_FREG diff --git a/src/cmd/dist/buildgc.c b/src/cmd/dist/buildgc.c index 39679fb72..64434d51e 100644 --- a/src/cmd/dist/buildgc.c +++ b/src/cmd/dist/buildgc.c @@ -184,12 +184,14 @@ mkanames(char *dir, char *file) continue; p = lines.p[i] + 3; + if(xstrcmp(p, "LAST") == 0) + continue; vadd(&dnames[n], p); j++; } } if(j>0){ - bwritestr(&out, bprintf(&b, "char* dnames%c[] = {\n", ch)); + bwritestr(&out, bprintf(&b, "char* dnames%c[D_LAST] = {\n", ch)); for(i=0; i