diff options
Diffstat (limited to 'src/cmd/5c/gc.h')
-rw-r--r-- | src/cmd/5c/gc.h | 83 |
1 files changed, 15 insertions, 68 deletions
diff --git a/src/cmd/5c/gc.h b/src/cmd/5c/gc.h index 084da7e6a..40d3a2b07 100644 --- a/src/cmd/5c/gc.h +++ b/src/cmd/5c/gc.h @@ -46,46 +46,19 @@ #define SZ_DOUBLE 8 #define FNX 100 -typedef struct Adr Adr; -typedef struct Prog Prog; typedef struct Case Case; typedef struct C1 C1; typedef struct Multab Multab; typedef struct Hintab Hintab; -typedef struct Var Var; typedef struct Reg Reg; typedef struct Rgn Rgn; #define R0ISZERO 0 -struct Adr -{ - int32 offset; - int32 offset2; - double dval; - char sval[NSNAME]; - Ieee ieee; - - Sym* sym; - char type; - uchar reg; - char name; - char etype; -}; -#define A ((Adr*)0) +#define A ((Addr*)0) #define INDEXED 9 -struct Prog -{ - Adr from; - Adr to; - Prog* link; - int32 lineno; - char as; - uchar reg; - uchar scond; -}; #define P ((Prog*)0) struct Case @@ -116,14 +89,6 @@ struct Hintab char hint[10]; }; -struct Var -{ - int32 offset; - Sym* sym; - char name; - char etype; -}; - struct Reg { int32 pc; @@ -174,7 +139,6 @@ EXTERN Node fconstnode; EXTERN int32 continpc; EXTERN int32 curarg; EXTERN int32 cursafe; -EXTERN Prog* firstp; EXTERN int32 isbigendian; EXTERN Prog* lastp; EXTERN int32 maxargsafe; @@ -230,7 +194,6 @@ EXTERN Reg* firstr; EXTERN Reg* lastr; EXTERN Reg zreg; EXTERN Reg* freer; -EXTERN Var var[NVAR]; EXTERN int32* idom; EXTERN Reg** rpo2r; EXTERN int32 maxnr; @@ -285,7 +248,7 @@ void regaalloc(Node*, Node*); void regind(Node*, Node*); void gprep(Node*, Node*); void raddr(Node*, Prog*); -void naddr(Node*, Adr*); +void naddr(Node*, Addr*); void gmovm(Node*, Node*, int); void gmove(Node*, Node*); void gmover(Node*, Node*); @@ -314,19 +277,11 @@ int mulcon(Node*, Node*); Multab* mulcon0(int32); void nullwarn(Node*, Node*); void outcode(void); -void ieeedtod(Ieee*, double); /* * list */ void listinit(void); -int Pconv(Fmt*); -int Aconv(Fmt*); -int Dconv(Fmt*); -int Sconv(Fmt*); -int Nconv(Fmt*); -int Bconv(Fmt*); -int Rconv(Fmt*); /* * reg.c @@ -335,7 +290,7 @@ Reg* rega(void); int rcmp(const void*, const void*); void regopt(Prog*); void addmove(Reg*, int, int, int); -Bits mkvar(Adr*, int); +Bits mkvar(Addr*, int); void prop(Reg*, Bits, Bits); void loopit(Reg*, int32); void synch(Reg*, Bits); @@ -343,7 +298,7 @@ uint32 allreg(uint32, Rgn*); void paint1(Reg*, int); uint32 paint2(Reg*, int); void paint3(Reg*, int, int32, int); -void addreg(Adr*, int); +void addreg(Addr*, int); /* * peep.c @@ -352,21 +307,21 @@ void peep(void); void excise(Reg*); Reg* uniqp(Reg*); Reg* uniqs(Reg*); -int regtyp(Adr*); -int regzer(Adr*); -int anyvar(Adr*); +int regtyp(Addr*); +int regzer(Addr*); +int anyvar(Addr*); int subprop(Reg*); int copyprop(Reg*); int shiftprop(Reg*); -void constprop(Adr*, Adr*, Reg*); -int copy1(Adr*, Adr*, Reg*, int); -int copyu(Prog*, Adr*, Adr*); +void constprop(Addr*, Addr*, Reg*); +int copy1(Addr*, Addr*, Reg*, int); +int copyu(Prog*, Addr*, Addr*); -int copyas(Adr*, Adr*); -int copyau(Adr*, Adr*); -int copyau1(Prog*, Adr*); -int copysub(Adr*, Adr*, Adr*, int); -int copysub1(Prog*, Adr*, Adr*, int); +int copyas(Addr*, Addr*); +int copyau(Addr*, Addr*); +int copyau1(Prog*, Addr*); +int copysub(Addr*, Addr*, Addr*, int); +int copysub1(Prog*, Addr*, Addr*, int); int32 RtoB(int); int32 FtoB(int); @@ -377,11 +332,3 @@ void predicate(void); int isbranch(Prog *); int predicable(Prog *p); int modifiescpsr(Prog *p); - -#pragma varargck type "A" int -#pragma varargck type "B" Bits -#pragma varargck type "D" Adr* -#pragma varargck type "N" Adr* -#pragma varargck type "R" Adr* -#pragma varargck type "P" Prog* -#pragma varargck type "S" char* |