Go to the source code of this file.
Defines | |
| #define | putcomment1(a, b) fprintf(Voutfile,"\n") |
| #define | putcomment2(a, b, c) fprintf(Voutfile,"\n") |
| #define | putcomment(a) fprintf(Voutfile,"\n") |
| #define | ObjSize 4 |
| #define | AR_FIRST_PARM 1 |
| #define | FO_SIZE 0 |
| #define | FO_EP FO_SIZE+ObjSize |
| #define | FO_IP FO_EP+ObjSize |
| #define | FO_OBJ_SIZE 3 |
| #define | ASSERT(a, b) |
| #define | ASSERT2(a, b, c) |
| #define | R0 0x0001 |
| #define | R1 0x0002 |
| #define | R2 0x0004 |
| #define | R3 0x0008 |
| #define | R4 0x0010 |
| #define | R5 0x0020 |
| #define | R6 0x0040 |
| #define | R7 0x0080 |
| #define | R8 0x0100 |
| #define | R9 0x0200 |
| #define | R10 0x0400 |
| #define | R11 0x0800 |
| #define | Rap 0x1000 |
| #define | Rfp 0x2000 |
| #define | Rsp 0x4000 |
| #define | Rpc 0x8000 |
| #define | movc_regs (R2|R3|R4|R5) |
| #define | POP(reg, com) |
| #define | POP_DISP(reg, disp, com) |
| #define | PUSH(reg, com) |
| #define | PUSH_DISP(reg, disp, com) |
| #define | L0fp "r9" |
| #define | L0FP R9 |
| #define | DISPLAY(dest, level, rdest, com) |
| #define | CODE(line) { fputs(line, Voutfile); putc('\n', Voutfile); } |
| #define | NEWOBJ |
| #define | FXD_NEWOBJ(s) |
| #define | SET_GC_INFO |
| #define | ASM_HEADER |
Functions | |
| void | Vretreg () |
| char * | Vnewreg () |
| char * | Vnewlabel () |
Variables | |
| int | Ventry_mask |
| int | Vgc_mask |
| int | Vreg_bit |
| #define AR_FIRST_PARM 1 |
| #define ASM_HEADER |
Value:
{\
CODE("\t.globl _russell_entry" );\
CODE("\t.globl _objfreelist" );\
CODE("\t.globl _allocobj" );\
CODE("\t.globl _entry_ar_sz" );\
CODE("\t.text" );\
CODE("\t.align 1" );\
CODE("_russell_entry:" );\
CODE("\t.word 0" );\
CODE("\tcallg *4(ap),russell_top_level" );\
CODE("\tret" );}
Definition at line 155 of file codeutil.h.
Referenced by Vgeneratecode().
| #define ASSERT | ( | a, | |||
| b | ) |
Definition at line 41 of file codeutil.h.
| #define ASSERT2 | ( | a, | |||
| b, | |||||
| c | ) |
Definition at line 47 of file codeutil.h.
Definition at line 128 of file codeutil.h.
Referenced by copy_r10_to_r0(), copy_r3_to_r2(), Ffuncbody(), Vappl(), Vexpression(), and Vfuncbody().
| #define DISPLAY | ( | dest, | |||
| level, | |||||
| rdest, | |||||
| com | ) |
Value:
{\
if (level == 0) { \
dest = L0fp; \
} else if (level == Vlevel) { \
dest = "ap"; \
} else { \
int i = Vlevel - level; /* number of indirections needed */ \
char * source = "ap"; \
\
while (i >= 2) { \
fprintf(Voutfile,"\tmovl\t*(%s),%s", source, rdest); \
i =- 2; source = rdest; \
if (i > 0) fprintf(Voutfile, "\n"); \
} \
if (i == 1) { \
fprintf(Voutfile,"\tmovl\t(%s),%s", source, rdest); \
} \
dest = rdest; \
} \
putcomment (com);}
Definition at line 107 of file codeutil.h.
| #define FO_EP FO_SIZE+ObjSize |
Definition at line 34 of file codeutil.h.
| #define FO_IP FO_EP+ObjSize |
Definition at line 35 of file codeutil.h.
| #define FO_OBJ_SIZE 3 |
| #define FO_SIZE 0 |
Definition at line 33 of file codeutil.h.
| #define FXD_NEWOBJ | ( | s | ) |
Value:
{\
fprintf(Voutfile,"\tmoval\t_objfreelist+%d,r10\n", 4*(s));\
CODE("\tmovl\t(r10),r0");\
CODE("\tjneq\t1f");\
SET_GC_INFO;\
fprintf(Voutfile, "\tpushl\t$%d\n", (s));\
CODE("\tcalls\t$1,_allocobj");\
CODE("1:\tmovl\t(r0),(r10)");\
Ventry_mask |= R10;}
Definition at line 141 of file codeutil.h.
Referenced by gen_special(), Vappl(), Vexpression(), and Vfuncconstructor().
| #define L0FP R9 |
| #define L0fp "r9" |
| #define movc_regs (R2|R3|R4|R5) |
| #define NEWOBJ |
Value:
{ \
CODE("\tmoval\t_objfreelist[r1],r10");\
CODE("\tmovl\t(r10),r0");\
CODE("\tjneq\t1f");\
SET_GC_INFO;\
CODE("\tpushl\tr1");\
CODE("\tcalls\t$1,_allocobj");\
CODE("1:\tmovl\t(r0),(r10)");\
Ventry_mask |= R10;}
Definition at line 131 of file codeutil.h.
Referenced by Vappl().
| #define ObjSize 4 |
| #define POP | ( | reg, | |||
| com | ) |
Value:
{\
fprintf (Voutfile,"\tmovl\t(sp)+,%s",reg);\
putcomment (com);}
Definition at line 72 of file codeutil.h.
Referenced by Fexpression(), Ffuncbody(), str_length(), str_to_contig1(), Vappl(), Vexpression(), and Vfuncbody().
| #define POP_DISP | ( | reg, | |||
| disp, | |||||
| com | ) |
Value:
{\
fprintf (Voutfile,"\tmovl\t(sp)+,%d(%s)",(disp)*ObjSize,reg);\
putcomment (com);}
Definition at line 76 of file codeutil.h.
Referenced by Vappl(), Vexpression(), and Vtraverse().
| #define PUSH | ( | reg, | |||
| com | ) |
Value:
{\
fprintf (Voutfile,"\tpushl\t%s",reg);\
putcomment (com);}
Definition at line 80 of file codeutil.h.
Referenced by str_length(), str_to_contig1(), Vappl(), Vexpression(), and Vfuncconstructor().
| #define PUSH_DISP | ( | reg, | |||
| disp, | |||||
| com | ) |
Value:
{\
fprintf (Voutfile,"\tpushl\t%d(%s)",(disp)*ObjSize,reg);\
putcomment (com);}
Definition at line 84 of file codeutil.h.
Referenced by Fexpression(), Vappl(), and Vexpression().
Definition at line 17 of file codeutil.h.
Referenced by Fexpression(), gen_special(), Vappl(), Vexpression(), Vfuncbody(), and Vfuncconstructor().
Definition at line 11 of file codeutil.h.
| #define R0 0x0001 |
Definition at line 51 of file codeutil.h.
| #define R1 0x0002 |
Definition at line 52 of file codeutil.h.
| #define R10 0x0400 |
| #define R11 0x0800 |
| #define R2 0x0004 |
Definition at line 53 of file codeutil.h.
| #define R3 0x0008 |
Definition at line 54 of file codeutil.h.
| #define R4 0x0010 |
Definition at line 55 of file codeutil.h.
| #define R5 0x0020 |
Definition at line 56 of file codeutil.h.
| #define R6 0x0040 |
Definition at line 57 of file codeutil.h.
| #define R7 0x0080 |
Definition at line 58 of file codeutil.h.
| #define R8 0x0100 |
Definition at line 59 of file codeutil.h.
| #define R9 0x0200 |
Definition at line 60 of file codeutil.h.
| #define Rap 0x1000 |
Definition at line 63 of file codeutil.h.
| #define Rfp 0x2000 |
Definition at line 64 of file codeutil.h.
| #define Rpc 0x8000 |
Definition at line 66 of file codeutil.h.
| #define Rsp 0x4000 |
Definition at line 65 of file codeutil.h.
| #define SET_GC_INFO |
Value:
{\
fprintf(Voutfile,"\tmovl\t$0x%x,r11\n",(Vgc_mask<<16));\
Ventry_mask |= R11;}
Definition at line 151 of file codeutil.h.
Referenced by Vappl().
| char* Vnewlabel | ( | ) |
| char* Vnewreg | ( | ) |
Definition at line 227 of file codeutil.c.
References FALSE, mask_bit, NREGS, reg_free, regs, tmp(), Ventry_mask, Vnewlabel(), Voutfile, and Vreg_bit.
Referenced by Vappl().
| void Vretreg | ( | ) |
| int Ventry_mask |
| int Vreg_bit |
1.5.4