#endif
/* size's in bytes */
-#define CHARSIZE 1
-#define SHORTSIZE 1
-#define INTSIZE 2
-#define LONGSIZE 4
-#define PTRSIZE 1
-#define FPTRSIZE 2
-#define GPTRSIZE 3
-#define BITSIZE 1
-#define FLOATSIZE 4
-#define MAXBASESIZE 4
+#define CHARSIZE port->s.char_size
+#define SHORTSIZE port->s.short_size
+#define INTSIZE port->s.int_size
+#define LONGSIZE port->s.long_size
+#define PTRSIZE port->s.ptr_size
+#define FPTRSIZE port->s.fptr_size
+#define GPTRSIZE port->s.gptr_size
+#define BITSIZE port->s.bit_size
+#define FLOATSIZE port->s.float_size
+#define MAXBASESIZE port->s.max_base_size
#define PRAGMA_SAVE "SAVE"
set *ovrset;
if (!elementsInSet(ovrSetSets))
- fprintf(afile,"\t.area\tOSEG\t(OVR,DATA)\n");
+ fprintf(afile,"\t.area\t%s\n", port->mem.overlay_name);
/* for each of the sets in the overlay segment do */
for (ovrset = setFirstItem(ovrSetSets); ovrset;
sad but true */
fprintf(afile,"\t.area _DUMMY\n");
/* output the area informtion */
- fprintf(afile,"\t.area\tOSEG\t(OVR,DATA)\n"); /* MOF */
+ fprintf(afile,"\t.area\t%s\n", port->mem.overlay_name); /* MOF */
}
for (sym = setFirstItem(ovrset); sym;
fprintf (asmFile, "%s", iComments2);
fprintf (asmFile, "; global & static initialisations\n");
fprintf (asmFile, "%s", iComments2);
- fprintf (asmFile, "\t.area GSINIT (CODE)\n"); /* MOF */
+ fprintf (asmFile, "\t.area %s\n", port->mem.static_name); /* MOF */
if (mainf && mainf->fbody) {
fprintf (asmFile,"__sdcc_gsinit_startup:\n");
/* if external stack is specified then the
fprintf (asmFile, "%s", iComments2);
fprintf (asmFile, "; code\n");
fprintf (asmFile, "%s", iComments2);
- fprintf (asmFile, "\t.area CSEG (CODE)\n");
+ fprintf (asmFile, "\t.area %s\n", port->mem.code_name);
if (mainf && mainf->fbody) {
/* entry point @ start of CSEG */
int i;
fprintf(file,"[");
for(i=0;i<OP_SYMBOL(op)->nRegs;i++)
- fprintf(file,"%s ", port->getRegName(OP_SYMBOL(op)));
+ fprintf(file,"%s ", port->getRegName(OP_SYMBOL(op)->regs[i]));
fprintf(file,"]");
}
}
static PORT *_ports[] = {
&mcs51_port,
+ &z80_port
};
#define NUM_PORTS (sizeof(_ports)/sizeof(_ports[0]))
static void assemble (char **envp)
{
char *asmArgs[128]; /* assembler arguments */
+ /* PENDING: A bit messy */
+ char buffer2[1024];
+
int i = 2;
- asmArgs[0] = "asx8051";
+ asmArgs[0] = port->assembler.exec_name;
/* if (options.debug) */
- asmArgs[1] = "-plosgffc" ;
+ asmArgs[1] = port->assembler.debug_opts;
/* else */
-/* asmArgs[1] = "-plosgff"; */
+/* asmArgs[1] = port->assembler.plain_opts; */
/* add the extra options if any */
for (; asmOptions[i-2] ; i++)
asmArgs[i] = asmOptions[i-2];
+ if (port->assembler.requires_output_name) {
+ sprintf(buffer2, srcFileName);
+ strcat(buffer2, ".o");
+ asmArgs[i++] = buffer2;
+ }
+
/* create the assembler file name */
sprintf (buffer, srcFileName);
strcat (buffer, ".asm");
asmArgs[i] = 0; /* end of args */
- if (my_system("asx8051",asmArgs)) {
+ if (my_system(port->assembler.exec_name, asmArgs)) {
perror("Cannot exec linker");
exit(1);
}
argv++;
argc--;
}
- /* Assume mcs51 */
- port = &mcs51_port;
+ /* Use the first in the list */
+ port = _ports[0];
}
/*
extern FILE *junkFile ;
/* memory map prefixes MOF added the DATA,CODE,XDATA,BIT */
-#define XSTACK_NAME "XSEG (XDATA)"
-#define ISTACK_NAME "STACK (DATA)"
-#define CODE_NAME "CSEG (CODE)"
-#define DATA_NAME "DSEG (DATA)"
-#define IDATA_NAME "ISEG (DATA)"
-#define XDATA_NAME "XSEG (XDATA)"
-#define BIT_NAME "BSEG (BIT)"
-#define REG_NAME "RSEG (DATA)"
-#define STATIC_NAME "GSINIT (CODE)"
+#define XSTACK_NAME port->mem.xstack_name
+#define ISTACK_NAME port->mem.istack_name
+#define CODE_NAME port->mem.code_name
+#define DATA_NAME port->mem.data_name
+#define IDATA_NAME port->mem.idata_name
+#define XDATA_NAME port->mem.xdata_name
+#define BIT_NAME port->mem.bit_name
+#define REG_NAME port->mem.reg_name
+#define STATIC_NAME port->mem.static_name
/* forward definition for variables */
extern memmap *xstack; /* xternal stack data */
#define MOVA(x) if (strcmp(x,"a") && strcmp(x,"acc")) emitcode("mov","a,%s",x);
#define CLRC emitcode("clr","c");
-lineNode *lineHead = NULL;
-lineNode *lineCurr = NULL;
+static lineNode *lineHead = NULL;
+static lineNode *lineCurr = NULL;
-unsigned char SLMask[] = {0xFF ,0xFE, 0xFC, 0xF8, 0xF0,
+static unsigned char SLMask[] = {0xFF ,0xFE, 0xFC, 0xF8, 0xF0,
0xE0, 0xC0, 0x80, 0x00};
-unsigned char SRMask[] = {0xFF, 0x7F, 0x3F, 0x1F, 0x0F,
+static unsigned char SRMask[] = {0xFF, 0x7F, 0x3F, 0x1F, 0x0F,
0x07, 0x03, 0x01, 0x00};
#define LSB 0
+/** @file main.c
+ mcs51 specific general functions.
+
+ Note that mlh prepended _mcs51_ on the static functions. Makes
+ it easier to set a breakpoint using the debugger.
+*/
#include "common.h"
#include "main.h"
#include "ralloc.h"
+
void mcs51_assignRegisters (eBBlock **ebbs, int count);
static bool _mcs51_parseOptions(int *pargc, char **argv)
/* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
1, 1, 2, 4, 1, 2, 3, 1, 4, 4
},
+ {
+ "XSEG (XDATA)",
+ "STACK (DATA)",
+ "CSEG (CODE)",
+ "DSEG (DATA)",
+ "ISEG (DATA)",
+ "XSEG (XDATA)",
+ "BSEG (BIT)",
+ "RSEG (DATA)",
+ "GSINIT (CODE)",
+ "OSEG (OVR,DATA)"
+ },
{
+1, 1, 4, 0, 0
},
mcs51_assignRegisters,
_mcs51_getRegName
};
-
You are forbidden to forbid anyone else to use, share and improve
what you give them. Help stamp out software-hoarding!
-------------------------------------------------------------------------*/
-#include <stdio.h>
-#include <stdlib.h>
-#include "SDCCglobl.h"
-#include "SDCCast.h"
-#include "SDCCmem.h"
-#include "SDCCy.h"
-#include "SDCChasht.h"
-#include "SDCCbitv.h"
-#include "SDCCset.h"
-#include "SDCCicode.h"
-#include "SDCClabel.h"
-#include "SDCCBBlock.h"
-#include "SDCCloop.h"
-#include "SDCCcse.h"
-#include "SDCCcflow.h"
-#include "SDCCdflow.h"
-#include "SDCClrange.h"
-#include "SDCCralloc.h"
+
+#include "common.h"
+#include "ralloc.h"
/*-----------------------------------------------------------------*/
/* At this point we start getting processor specific although */
{ REG_CND ,CND_IDX,REG_CND , "C" , "C" , "xreg", 0, 1 },
};
int mcs51_nRegs = 13;
-void spillThis (symbol *);
+static void spillThis (symbol *);
/*-----------------------------------------------------------------*/
/* allocReg - allocates register of given type */
/*-----------------------------------------------------------------*/
/* notUsedInRemaining - not used or defined in remain of the block */
/*-----------------------------------------------------------------*/
-int notUsedInRemaining (symbol *sym, eBBlock *ebp, iCode *ic)
+static int notUsedInRemaining (symbol *sym, eBBlock *ebp, iCode *ic)
{
return ((usedInRemaining (operandFromSymbol(sym),ic) ? 0 : 1) &&
allDefsOutOfRange (sym->defs,ic->seq,ebp->lSeq));
/*-----------------------------------------------------------------*/
/* allLRs - return true for all */
/*-----------------------------------------------------------------*/
-int allLRs (symbol *sym, eBBlock *ebp, iCode *ic)
+static int allLRs (symbol *sym, eBBlock *ebp, iCode *ic)
{
return 1;
}
/*-----------------------------------------------------------------*/
/* liveRangesWith - applies function to a given set of live range */
/*-----------------------------------------------------------------*/
-set *liveRangesWith (bitVect *lrs, int (func)(symbol *,eBBlock *, iCode *),
+static set *liveRangesWith (bitVect *lrs, int (func)(symbol *,eBBlock *, iCode *),
eBBlock *ebp, iCode *ic)
{
set *rset = NULL;
/*-----------------------------------------------------------------*/
/* leastUsedLR - given a set determines which is the least used */
/*-----------------------------------------------------------------*/
-symbol *leastUsedLR (set *sset)
+static symbol *leastUsedLR (set *sset)
{
symbol *sym = NULL, *lsym = NULL ;
/*-----------------------------------------------------------------*/
/* noOverLap - will iterate through the list looking for over lap */
/*-----------------------------------------------------------------*/
-int noOverLap (set *itmpStack, symbol *fsym)
+static int noOverLap (set *itmpStack, symbol *fsym)
{
symbol *sym;
/*-----------------------------------------------------------------*/
/* isFree - will return 1 if the a free spil location is found */
/*-----------------------------------------------------------------*/
-DEFSETFUNC(isFree)
+static DEFSETFUNC(isFree)
{
symbol *sym = item;
V_ARG(symbol **,sloc);
/*-----------------------------------------------------------------*/
/* spillLRWithPtrReg :- will spil those live ranges which use PTR */
/*-----------------------------------------------------------------*/
-void spillLRWithPtrReg (symbol *forSym)
+static void spillLRWithPtrReg (symbol *forSym)
{
symbol *lrsym;
regs *r0,*r1;
/*-----------------------------------------------------------------*/
/* createStackSpil - create a location on the stack to spil */
/*-----------------------------------------------------------------*/
-symbol *createStackSpil (symbol *sym)
+static symbol *createStackSpil (symbol *sym)
{
symbol *sloc= NULL;
int useXstack, model, noOverlay;
/*-----------------------------------------------------------------*/
/* isSpiltOnStack - returns true if the spil location is on stack */
/*-----------------------------------------------------------------*/
-bool isSpiltOnStack (symbol *sym)
+static bool isSpiltOnStack (symbol *sym)
{
link *etype;
/*-----------------------------------------------------------------*/
/* spillThis - spils a specific operand */
/*-----------------------------------------------------------------*/
-void spillThis (symbol *sym)
+static void spillThis (symbol *sym)
{
int i;
/* if this is rematerializable or has a spillLocation
/*-----------------------------------------------------------------*/
/* selectSpil - select a iTemp to spil : rather a simple procedure */
/*-----------------------------------------------------------------*/
-symbol *selectSpil (iCode *ic, eBBlock *ebp, symbol *forSym)
+static symbol *selectSpil (iCode *ic, eBBlock *ebp, symbol *forSym)
{
bitVect *lrcs= NULL ;
set *selectS ;
/*-----------------------------------------------------------------*/
/* spilSomething - spil some variable & mark registers as free */
/*-----------------------------------------------------------------*/
-bool spilSomething (iCode *ic, eBBlock *ebp, symbol *forSym)
+static bool spilSomething (iCode *ic, eBBlock *ebp, symbol *forSym)
{
symbol *ssym;
int i ;
/*-----------------------------------------------------------------*/
/* getRegGpr - will try for GPR if not spil */
/*-----------------------------------------------------------------*/
-regs *getRegGpr (iCode *ic, eBBlock *ebp,symbol *sym)
+static regs *getRegGpr (iCode *ic, eBBlock *ebp,symbol *sym)
{
regs *reg;
/* deassignLRs - check the live to and if they have registers & are*/
/* not spilt then free up the registers */
/*-----------------------------------------------------------------*/
-void deassignLRs (iCode *ic, eBBlock *ebp)
+static void deassignLRs (iCode *ic, eBBlock *ebp)
{
symbol *sym;
int k;
/*-----------------------------------------------------------------*/
/* reassignLR - reassign this to registers */
/*-----------------------------------------------------------------*/
-void reassignLR (operand *op)
+static void reassignLR (operand *op)
{
symbol *sym = OP_SYMBOL(op);
int i;
/*-----------------------------------------------------------------*/
/* willCauseSpill - determines if allocating will cause a spill */
/*-----------------------------------------------------------------*/
-int willCauseSpill ( int nr, int rt)
+static int willCauseSpill ( int nr, int rt)
{
/* first check if there are any avlb registers
of te type required */
/*-----------------------------------------------------------------*/
/* serialRegAssign - serially allocate registers to the variables */
/*-----------------------------------------------------------------*/
-void serialRegAssign (eBBlock **ebbs, int count)
+static void serialRegAssign (eBBlock **ebbs, int count)
{
int i;
/*-----------------------------------------------------------------*/
/* rUmaskForOp :- returns register mask for an operand */
/*-----------------------------------------------------------------*/
-bitVect *rUmaskForOp (operand *op)
+static bitVect *rUmaskForOp (operand *op)
{
bitVect *rumask;
symbol *sym;
/*-----------------------------------------------------------------*/
/* regsUsedIniCode :- returns bit vector of registers used in iCode*/
/*-----------------------------------------------------------------*/
-bitVect *regsUsedIniCode (iCode *ic)
+static bitVect *regsUsedIniCode (iCode *ic)
{
bitVect *rmask = newBitVect(mcs51_nRegs);
/*-----------------------------------------------------------------*/
/* createRegMask - for each instruction will determine the regsUsed*/
/*-----------------------------------------------------------------*/
-void createRegMask (eBBlock **ebbs, int count)
+static void createRegMask (eBBlock **ebbs, int count)
{
int i;
/*-----------------------------------------------------------------*/
/* rematStr - returns the rematerialized string for a remat var */
/*-----------------------------------------------------------------*/
-char *rematStr (symbol *sym)
+static char *rematStr (symbol *sym)
{
char *s = buffer;
iCode *ic = sym->rematiCode;
/*-----------------------------------------------------------------*/
/* regTypeNum - computes the type & number of registers required */
/*-----------------------------------------------------------------*/
-void regTypeNum ()
+static void regTypeNum ()
{
symbol *sym;
int k;
/*-----------------------------------------------------------------*/
/* freeAllRegs - mark all registers as free */
/*-----------------------------------------------------------------*/
-void freeAllRegs()
+static void freeAllRegs()
{
int i;
/*-----------------------------------------------------------------*/
/* deallocStackSpil - this will set the stack pointer back */
/*-----------------------------------------------------------------*/
-DEFSETFUNC(deallocStackSpil)
+static DEFSETFUNC(deallocStackSpil)
{
symbol *sym = item;
/*-----------------------------------------------------------------*/
/* packRegsForAssign - register reduction for assignment */
/*-----------------------------------------------------------------*/
-int packRegsForAssign (iCode *ic,eBBlock *ebp)
+static int packRegsForAssign (iCode *ic,eBBlock *ebp)
{
iCode *dic, *sic;
/*-----------------------------------------------------------------*/
/* findAssignToSym : scanning backwards looks for first assig found*/
/*-----------------------------------------------------------------*/
-iCode *findAssignToSym (operand *op,iCode *ic)
+static iCode *findAssignToSym (operand *op,iCode *ic)
{
iCode *dic;
/*-----------------------------------------------------------------*/
/* packRegsForSupport :- reduce some registers for support calls */
/*-----------------------------------------------------------------*/
-int packRegsForSupport (iCode *ic, eBBlock *ebp)
+static int packRegsForSupport (iCode *ic, eBBlock *ebp)
{
int change = 0 ;
/* for the left & right operand :- look to see if the
/*-----------------------------------------------------------------*/
/* packRegsForAccUse - pack registers for acc use */
/*-----------------------------------------------------------------*/
-void packRegsForAccUse (iCode *ic)
+static void packRegsForAccUse (iCode *ic)
{
iCode *uic;
int float_size;
int max_base_size;
} s;
+ /** Names for all the memory regions */
+ struct {
+ const char *xstack_name;
+ const char *istack_name;
+ const char *code_name;
+ const char *data_name;
+ const char *idata_name;
+ const char *xdata_name;
+ const char *bit_name;
+ const char *reg_name;
+ const char *static_name;
+ const char *overlay_name;
+ } mem;
struct {
/** -1 for grows down (z80), +1 for grows up (mcs51) */
int direction;
include $(PRJDIR)/Makefile.common
-OBJ = icode.o gen.o ralloc.o main.o glue.o mem.o
+OBJ = gen.o ralloc.o main.o
LIB = port.a
CFLAGS = -ggdb -Wall
}
}
-/*-----------------------------------------------------------------*/
-/* aopLiteral - string from a literal value */
-/*-----------------------------------------------------------------*/
-char *aopLiteral (value *val, int offset)
-{
- char *rs;
-
- /* if it is a float then it gets tricky */
- /* otherwise it is fairly simple */
- if (!IS_FLOAT(val->type)) {
- unsigned long v = floatFromVal(val);
-
- v >>= (offset * 8);
- sprintf(buffer,"#0x%02x",((char) v) & 0xff);
- ALLOC_ATOMIC(rs,strlen(buffer)+1);
- return strcpy (rs,buffer);
- }
-
- assert(0);
-}
-
char *aopGetWord(asmop *aop, int offset)
{
char *s = buffer ;
if (SPEC_CRTCL(sym->etype))
emitcode("ei", "");
- if (sym->calleeSave) {
- /* Handled by cret */
- }
- else {
- assert(0);
- }
+ /* PENDING: calleeSave */
/* if debug then send end of function */
if (options.debug && currFunc) {
+++ /dev/null
-typedef struct {
-} PROCESSOR_OPTIONS;
-
+++ /dev/null
-#include "SDCCglue.h"
-#include "glue.h"
-
-extern int maxRegBank ;
-
-/* Not yet ported */
-#if 0
-void x_glue(FILE *asmFile)
-{
- assert(asmFile);
-}
-
-void x_insertMainHook(FILE *asmFile)
-{
- assert(asmFile);
-
- if (mainf && mainf->fbody) {
- fprintf (asmFile,"__sdcc_gsinit_startup:\n");
- }
-
-}
-#endif
+++ /dev/null
-#ifndef GLUE_INCLUDE
-#define GLUE_INCLUDE
-
-#include <stdio.h>
-
-void x_glue(FILE *asmFile);
-void x_insertMainHook(FILE *asmFile);
-
-#endif
+++ /dev/null
-#include "SDCCglobl.h"
-#include "SDCCast.h"
-#include "SDCCmem.h"
-#include "SDCCy.h"
-#include "SDCChasht.h"
-#include "SDCCicode.h"
-#include "SDCCerr.h"
-#include "ralloc.h"
-
-/* Not ported yet */
-#if 0
-/*-----------------------------------------------------------------*/
-/* aggrToPtr - changes an aggregate to pointer to an aggregate */
-/*-----------------------------------------------------------------*/
-link *aggrToPtr ( link *type, bool force)
-{
- link *etype ;
- link *ptype ;
-
-
- if (IS_PTR(type) && !force)
- return type;
-
- etype = getSpec(type);
- ptype = newLink();
-
- ptype->next = type;
- /* if the output class is generic */
- if (SPEC_OCLS(etype) == generic)
- DCL_TYPE(ptype) = GPOINTER;
- else
- if (SPEC_OCLS(etype)->codesp ) {
- DCL_TYPE(ptype) = POINTER ;
- DCL_PTR_CONST(ptype) = 1;
- }
- else
- DCL_TYPE(ptype) = POINTER ;
-
- /* if the variable was declared a constant */
- /* then the pointer points to a constant */
- if (IS_CONSTANT(etype) )
- DCL_PTR_CONST(ptype) = 1;
-
- /* the variable was volatile then pointer to volatile */
- if (IS_VOLATILE(etype))
- DCL_PTR_VOLATILE(ptype) = 1;
- return ptype;
-}
-
-/*-----------------------------------------------------------------*/
-/* geniCodeArray2Ptr - array to pointer */
-/*-----------------------------------------------------------------*/
-operand *geniCodeArray2Ptr (operand *op)
-{
- link *optype = operandType(op);
- link *opetype = getSpec(optype);
-
- /* set the pointer depending on the storage class */
- if (SPEC_OCLS(opetype)->codesp ) {
- DCL_TYPE(optype) = POINTER ;
- DCL_PTR_CONST(optype) = 1;
- }
- else {
- DCL_TYPE(optype) = POINTER;
- }
-
- /* if the variable was declared a constant */
- /* then the pointer points to a constant */
- if (IS_CONSTANT(opetype) )
- DCL_PTR_CONST(optype) = 1;
-
- /* the variable was volatile then pointer to volatile */
- if (IS_VOLATILE(opetype))
- DCL_PTR_VOLATILE(optype) = 1;
- op->isaddr = 0;
- return op;
-}
-
-/*-----------------------------------------------------------------*/
-/* geniCodeAddressOf - gens icode for '&' address of operator */
-/*-----------------------------------------------------------------*/
-operand *geniCodeAddressOf (operand *op)
-{
- iCode *ic;
- link *p ;
- link *optype = operandType(op);
- link *opetype= getSpec(optype);
-
- /* this must be a lvalue */
- if (!op->isaddr && !IS_AGGREGATE(optype)) {
- werror (E_LVALUE_REQUIRED,"&");
- return op;
- }
-
- p = newLink();
- p->class = DECLARATOR ;
- /* set the pointer depending on the storage class */
- if (SPEC_OCLS(opetype)->codesp ) {
- DCL_TYPE(p) = POINTER ;
- DCL_PTR_CONST(p) = 1;
- }
- else {
- DCL_TYPE(p) = POINTER ;
- }
-
- /* make sure we preserve the const & volatile */
- if (IS_CONSTANT(opetype))
- DCL_PTR_CONST(p) = 1;
-
- if (IS_VOLATILE(opetype))
- DCL_PTR_VOLATILE(p) = 1;
-
- p->next = copyLinkChain(optype);
-
- /* if already a temp */
- if (IS_ITEMP(op)) {
- setOperandType (op,p);
- op->isaddr= 0;
- return op;
- }
-
- /* other wise make this of the type coming in */
- ic = newiCode(ADDRESS_OF,op,NULL);
- IC_RESULT(ic) = newiTempOperand(p,1);
- IC_RESULT(ic)->isaddr = 0;
- ADDTOCHAIN(ic);
- return IC_RESULT(ic);
-}
-
-/*-----------------------------------------------------------------*/
-/* setOClass - sets the output class depending on the pointer type */
-/*-----------------------------------------------------------------*/
-void setOClass (link *ptr, link *spec)
-{
- switch (DCL_TYPE(ptr)) {
- case POINTER:
- SPEC_OCLS(spec) = data ;
- break ;
-
- case CPOINTER:
- SPEC_OCLS(spec) = code ;
- break ;
-
- case GPOINTER:
- SPEC_OCLS(spec) = generic;
- break;
-
- default:
- assert(0);
- }
-}
-
-#endif
#include "common.h"
-#include "main.h"
+#include "ralloc.h"
void z80_assignRegisters (eBBlock **ebbs, int count);
optimize.loopInduction = 0;
}
+static const char *_z80_getRegName(struct regs *reg)
+{
+ if (reg)
+ return reg->name;
+ return "err";
+}
+
/* Globals */
PORT z80_port = {
"z80",
/* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
1, 1, 2, 4, 2, 2, 2, 1, 4, 4
},
+ {
+ "_XSEG",
+ "_STACK",
+ "_CODE",
+ "_DATA",
+ "_ISEG",
+ "_XSEG",
+ "_BSEG",
+ "_RSEG",
+ "_GSINIT",
+ "_OVERLAY"
+ },
{
-1, 0, 0, 8, 0
},
_z80_finaliseOptions,
_z80_setDefaultOptions,
z80_assignRegisters,
+ _z80_getRegName
};
+++ /dev/null
-#ifndef MAIN_INCLUDE
-#define MAIN_INCLUDE
-
-bool x_parseOptions(char **argv, int *pargc);
-void x_setDefaultOptions(void);
-void x_finaliseOptions(void);
-
-#endif
+++ /dev/null
-#include "SDCCglobl.h"
-#include "SDCCmem.h"
-#include "mem.h"
-
-memmap *xstack= NULL ; /* xternal stack data */
-memmap *xdata = NULL; /* external data */
-memmap *idata = NULL; /* internal data upto 256 */
-memmap *bit = NULL; /* bit addressable space */
-memmap *sfr = NULL; /* register space */
-memmap *sfrbit= NULL; /* sfr bit space */
-memmap *overlay=NULL; /* overlay segment */
-
-void x_initMem(void)
-{
-}
-
+++ /dev/null
-#ifndef MEM_INCLUDE
-#define MEM_INCLUDE
-
-/* memory map prefixes MOF added the DATA,CODE,XDATA,BIT */
-#define OVERLAY_NAME "_OVERLAY"
-#define CODE_NAME "_CODE"
-#define DATA_NAME "_DATA"
-#define STATIC_NAME "GSINIT"
-#define GENERIC_NAME "GENERIC"
-#define ISTACK_NAME "_STACK"
-
-#define IN_STACK(x) (IS_SPEC(x) && (SPEC_OCLS(x) == istack ))
-#define IN_FARSPACE(x) FALSE
-
-typedef struct {
-} X_MEMMAP;
-
-#endif
+++ /dev/null
-/** Set to target the 8051 */
-#define PROCESSOR_Z80 1
-
-#define HAS_BITSPACE 0
-#define HAS_REGSPACE 0
-#define HAS_PAGEDSPACE 0
-#define HAS_DIRECTSPACE 0
-#define HAS_XDATA 0
-#define HAS_OVERLAY 0
-#define HAS_IDATA 0
-#define HAS_SFRSPACE 0
-#define HAS_SFRBITSPACE 0
-#define HAS_XSTACK 0
-
-#define HAS_INTERRUPT_TABLE 0
-
-/** Setting this is equivalent to --stack-auto --no-peep --main-return --callee-saves --noregparms --xstack */
-#define USE_CLEAN_OPTIONS 1
-/** Set if the callee should save _all_ registers */
-#define USE_CALLEE_SAVES_ALL 1
-