From: cuz Date: Sat, 5 May 2001 11:46:02 +0000 (+0000) Subject: Working on the new backend. Moved the files from the b6502 into the main X-Git-Tag: V2.12.0~2850 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0218f8c63222c2c26470f73604ce3cd937d8dada;p=cc65 Working on the new backend. Moved the files from the b6502 into the main compiler dir because the backend is not really a submodule, so this did not reflect the real relations of the backend to the rest of the compiler. git-svn-id: svn://svn.cc65.org/cc65/trunk@713 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/anonname.c b/src/cc65/anonname.c index 1a52147e2..b10ca3c1d 100644 --- a/src/cc65/anonname.c +++ b/src/cc65/anonname.c @@ -6,10 +6,10 @@ /* */ /* */ /* */ -/* (C) 2000 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@musoftware.de */ +/* (C) 2000 Ullrich von Bassewitz */ +/* Wacholderweg 14 */ +/* D-70597 Stuttgart */ +/* EMail: uz@cc65.org */ /* */ /* */ /* This software is provided 'as-is', without any expressed or implied */ diff --git a/src/cc65/anonname.h b/src/cc65/anonname.h index 3f833f0ee..123a9cf26 100644 --- a/src/cc65/anonname.h +++ b/src/cc65/anonname.h @@ -6,10 +6,10 @@ /* */ /* */ /* */ -/* (C) 2000 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@musoftware.de */ +/* (C) 2000 Ullrich von Bassewitz */ +/* Wacholderweg 14 */ +/* D-70597 Stuttgart */ +/* EMail: uz@cc65.org */ /* */ /* */ /* This software is provided 'as-is', without any expressed or implied */ diff --git a/src/cc65/asmcode.c b/src/cc65/asmcode.c index b52987b34..3522ce169 100644 --- a/src/cc65/asmcode.c +++ b/src/cc65/asmcode.c @@ -36,12 +36,10 @@ /* common */ #include "check.h" -/* b6502 */ +/* cc65 */ #include "codeopt.h" #include "codeseg.h" #include "dataseg.h" - -/* cc65 */ #include "symtab.h" #include "asmcode.h" diff --git a/src/cc65/codeent.c b/src/cc65/codeent.c index 8dff3a528..09e4b3ef8 100644 --- a/src/cc65/codeent.c +++ b/src/cc65/codeent.c @@ -38,13 +38,11 @@ #include "xmalloc.h" /* cc65 */ -#include "error.h" -#include "global.h" - -/* b6502 */ #include "codeinfo.h" +#include "error.h" #include "funcinfo.h" -#include "label.h" +#include "global.h" +#include "codelab.h" #include "opcodes.h" #include "codeent.h" diff --git a/src/cc65/codeent.h b/src/cc65/codeent.h index 4140663a8..61cd3b55f 100644 --- a/src/cc65/codeent.h +++ b/src/cc65/codeent.h @@ -43,8 +43,8 @@ /* common */ #include "coll.h" -/* b6502 */ -#include "label.h" +/* cc65 */ +#include "codelab.h" #include "opcodes.h" diff --git a/src/cc65/codegen.c b/src/cc65/codegen.c index 20478bb6f..ce7ef5d2c 100644 --- a/src/cc65/codegen.c +++ b/src/cc65/codegen.c @@ -43,14 +43,12 @@ #include "xmalloc.h" #include "xsprintf.h" -/* b6502 */ -#include "codeseg.h" -#include "dataseg.h" - /* cc65 */ #include "asmcode.h" -#include "asmlabel.h" +#include "asmlabel.h" +#include "codeseg.h" #include "cpu.h" +#include "dataseg.h" #include "error.h" #include "global.h" #include "segname.h" @@ -60,7 +58,7 @@ /*****************************************************************************/ -/* Data */ +/* Data */ /*****************************************************************************/ @@ -74,7 +72,7 @@ segment_t CurSeg = SEG_INV; /*****************************************************************************/ -/* Helpers */ +/* Helpers */ /*****************************************************************************/ diff --git a/src/cc65/codelab.c b/src/cc65/codelab.c index e02fd7946..55069c3f9 100644 --- a/src/cc65/codelab.c +++ b/src/cc65/codelab.c @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* label.c */ +/* codelab.c */ /* */ /* Code label structure */ /* */ @@ -36,9 +36,9 @@ /* common */ #include "xmalloc.h" -/* b6502 */ -#include "codeent.h" -#include "label.h" +/* cc65 */ +#include "codeent.h" +#include "codelab.h" diff --git a/src/cc65/codelab.h b/src/cc65/codelab.h index 8e6ef97bb..203d16bd8 100644 --- a/src/cc65/codelab.h +++ b/src/cc65/codelab.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* label.h */ +/* codelab.h */ /* */ /* Code label structure */ /* */ @@ -33,8 +33,8 @@ -#ifndef LABEL_H -#define LABEL_H +#ifndef CODELAB_H +#define CODELAB_H @@ -100,7 +100,7 @@ void OutputCodeLabel (FILE* F, const CodeLabel* L); -/* End of label.h */ +/* End of codelab.h */ #endif diff --git a/src/cc65/codeopt.c b/src/cc65/codeopt.c index 384a41455..a0c7be717 100644 --- a/src/cc65/codeopt.c +++ b/src/cc65/codeopt.c @@ -37,11 +37,9 @@ #include "print.h" /* cc65 */ -#include "global.h" - -/* b6502 */ #include "codeent.h" #include "codeinfo.h" +#include "global.h" #include "codeopt.h" @@ -117,7 +115,7 @@ static void OptDeadJumps (CodeSeg* S) static void OptDeadCode (CodeSeg* S) /* Remove dead code (code that follows an unconditional jump or an rts/rti - * and has no label) + * and has no label) */ { unsigned I; diff --git a/src/cc65/codeopt.h b/src/cc65/codeopt.h index 4edacb11b..15960a99f 100644 --- a/src/cc65/codeopt.h +++ b/src/cc65/codeopt.h @@ -38,7 +38,7 @@ -/* b6502 */ +/* cc65 */ #include "codeseg.h" diff --git a/src/cc65/codeseg.c b/src/cc65/codeseg.c index aed667b85..264bee2f7 100644 --- a/src/cc65/codeseg.c +++ b/src/cc65/codeseg.c @@ -45,11 +45,9 @@ #include "xsprintf.h" /* cc65 */ -#include "error.h" - -/* b6502 */ #include "codeent.h" #include "codeinfo.h" +#include "error.h" #include "codeseg.h" diff --git a/src/cc65/codeseg.h b/src/cc65/codeseg.h index 59bfb0842..d09f07a8c 100644 --- a/src/cc65/codeseg.h +++ b/src/cc65/codeseg.h @@ -44,8 +44,8 @@ #include "attrib.h" #include "coll.h" -/* b6502 */ -#include "label.h" +/* cc65 */ +#include "codelab.h" diff --git a/src/cc65/make/gcc.mak b/src/cc65/make/gcc.mak index a490d8dce..4f839e4e1 100644 --- a/src/cc65/make/gcc.mak +++ b/src/cc65/make/gcc.mak @@ -11,11 +11,10 @@ EXE = cc65 # Library directories COMMON = ../common -B6502 = b6502 # Default for the compiler lib search path as compiler define CDEFS=-DCC65_INC=\"/usr/lib/cc65/include/\" -CFLAGS = -O2 -g -Wall -I$(COMMON) -I$(B6502) $(CDEFS) +CFLAGS = -O2 -g -Wall -I$(COMMON) $(CDEFS) CC=gcc EBIND=emxbind LDFLAGS= @@ -26,9 +25,14 @@ LDFLAGS= OBJS = anonname.o \ asmcode.o \ asmlabel.o \ + codeent.o \ codegen.o \ + codelab.o \ + codeopt.o \ + codeseg.o \ compile.o \ cpu.o \ + dataseg.o \ datatype.o \ declare.o \ declattr.o \ @@ -37,6 +41,7 @@ OBJS = anonname.o \ exprheap.o \ exprnode.o \ funcdesc.o \ + funcinfo.o \ function.o \ global.o \ goto.o \ @@ -48,6 +53,7 @@ OBJS = anonname.o \ loop.o \ macrotab.o \ main.o \ + opcodes.o \ preproc.o \ pragma.o \ scanner.o \ @@ -59,8 +65,7 @@ OBJS = anonname.o \ typecmp.o \ util.o -LIBS = $(B6502)/b6502.a \ - $(COMMON)/common.a +LIBS = $(COMMON)/common.a # ------------------------------------------------------------------------------ @@ -76,16 +81,10 @@ all: depend @$(MAKE) -f make/gcc.mak all endif -$(EXE): $(OBJS) $(LIBS) subs +$(EXE): $(OBJS) $(LIBS) $(CC) $(LDFLAGS) -o $(EXE) $(CFLAGS) $(OBJS) $(LIBS) @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi -.PHONY: subs -subs: - @for dir in $(COMMON) $(B6502); do \ - $(MAKE) -C $$dir -f make/gcc.mak || exit 1; \ - done - clean: rm -f *~ core *.map @@ -98,6 +97,6 @@ zap: clean .PHONY: depend dep depend dep: $(OBJS:.o=.c) @echo "Creating dependency information" - $(CC) -I$(COMMON) -I$(B6502) -MM $^ > .depend + $(CC) -I$(COMMON) -MM $^ > .depend diff --git a/src/cc65/opcodes.c b/src/cc65/opcodes.c index b2165b20f..4396cb211 100644 --- a/src/cc65/opcodes.c +++ b/src/cc65/opcodes.c @@ -41,10 +41,8 @@ #include "check.h" /* cc65 */ -#include "error.h" - -/* b6502 */ #include "codeinfo.h" +#include "error.h" #include "opcodes.h" diff --git a/src/cc65/opcodes.h b/src/cc65/opcodes.h index b4c372a53..58375b725 100644 --- a/src/cc65/opcodes.h +++ b/src/cc65/opcodes.h @@ -143,10 +143,6 @@ typedef struct { char Mnemo[4]; /* Mnemonic */ opc_t OPC; /* Opcode */ unsigned Size; /* Size, 0 means "check addressing mode" */ -#### - unsigned char Use; - unsigned char Load; - unsigned Info; /* Usage flags */ } OPCDesc; diff --git a/src/cc65/segname.c b/src/cc65/segname.c index 4bfbf7c44..422d86ec9 100644 --- a/src/cc65/segname.c +++ b/src/cc65/segname.c @@ -6,10 +6,10 @@ /* */ /* */ /* */ -/* (C) 2000 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@musoftware.de */ +/* (C) 2000 Ullrich von Bassewitz */ +/* Wacholderweg 14 */ +/* D-70597 Stuttgart */ +/* EMail: uz@cc65.org */ /* */ /* */ /* This software is provided 'as-is', without any expressed or implied */ diff --git a/src/cc65/segname.h b/src/cc65/segname.h index 236705679..b200d213c 100644 --- a/src/cc65/segname.h +++ b/src/cc65/segname.h @@ -6,10 +6,10 @@ /* */ /* */ /* */ -/* (C) 2000 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@musoftware.de */ +/* (C) 2000 Ullrich von Bassewitz */ +/* Wacholderweg 14 */ +/* D-70597 Stuttgart */ +/* EMail: uz@cc65.org */ /* */ /* */ /* This software is provided 'as-is', without any expressed or implied */