1
0
mirror of https://github.com/cc65/cc65.git synced 2025-08-13 08:25:28 +00:00

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
This commit is contained in:
cuz
2001-05-05 11:46:02 +00:00
parent 8800b0c1c8
commit 0218f8c632
17 changed files with 53 additions and 70 deletions

View File

@@ -6,10 +6,10 @@
/* */ /* */
/* */ /* */
/* */ /* */
/* (C) 2000 Ullrich von Bassewitz */ /* (C) 2000 Ullrich von Bassewitz */
/* Wacholderweg 14 */ /* Wacholderweg 14 */
/* D-70597 Stuttgart */ /* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */ /* EMail: uz@cc65.org */
/* */ /* */
/* */ /* */
/* This software is provided 'as-is', without any expressed or implied */ /* This software is provided 'as-is', without any expressed or implied */

View File

@@ -6,10 +6,10 @@
/* */ /* */
/* */ /* */
/* */ /* */
/* (C) 2000 Ullrich von Bassewitz */ /* (C) 2000 Ullrich von Bassewitz */
/* Wacholderweg 14 */ /* Wacholderweg 14 */
/* D-70597 Stuttgart */ /* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */ /* EMail: uz@cc65.org */
/* */ /* */
/* */ /* */
/* This software is provided 'as-is', without any expressed or implied */ /* This software is provided 'as-is', without any expressed or implied */

View File

@@ -36,12 +36,10 @@
/* common */ /* common */
#include "check.h" #include "check.h"
/* b6502 */ /* cc65 */
#include "codeopt.h" #include "codeopt.h"
#include "codeseg.h" #include "codeseg.h"
#include "dataseg.h" #include "dataseg.h"
/* cc65 */
#include "symtab.h" #include "symtab.h"
#include "asmcode.h" #include "asmcode.h"

View File

@@ -38,13 +38,11 @@
#include "xmalloc.h" #include "xmalloc.h"
/* cc65 */ /* cc65 */
#include "error.h"
#include "global.h"
/* b6502 */
#include "codeinfo.h" #include "codeinfo.h"
#include "error.h"
#include "funcinfo.h" #include "funcinfo.h"
#include "label.h" #include "global.h"
#include "codelab.h"
#include "opcodes.h" #include "opcodes.h"
#include "codeent.h" #include "codeent.h"

View File

@@ -43,8 +43,8 @@
/* common */ /* common */
#include "coll.h" #include "coll.h"
/* b6502 */ /* cc65 */
#include "label.h" #include "codelab.h"
#include "opcodes.h" #include "opcodes.h"

View File

@@ -43,14 +43,12 @@
#include "xmalloc.h" #include "xmalloc.h"
#include "xsprintf.h" #include "xsprintf.h"
/* b6502 */
#include "codeseg.h"
#include "dataseg.h"
/* cc65 */ /* cc65 */
#include "asmcode.h" #include "asmcode.h"
#include "asmlabel.h" #include "asmlabel.h"
#include "codeseg.h"
#include "cpu.h" #include "cpu.h"
#include "dataseg.h"
#include "error.h" #include "error.h"
#include "global.h" #include "global.h"
#include "segname.h" #include "segname.h"
@@ -60,7 +58,7 @@
/*****************************************************************************/ /*****************************************************************************/
/* Data */ /* Data */
/*****************************************************************************/ /*****************************************************************************/
@@ -74,7 +72,7 @@ segment_t CurSeg = SEG_INV;
/*****************************************************************************/ /*****************************************************************************/
/* Helpers */ /* Helpers */
/*****************************************************************************/ /*****************************************************************************/

View File

@@ -1,6 +1,6 @@
/*****************************************************************************/ /*****************************************************************************/
/* */ /* */
/* label.c */ /* codelab.c */
/* */ /* */
/* Code label structure */ /* Code label structure */
/* */ /* */
@@ -36,9 +36,9 @@
/* common */ /* common */
#include "xmalloc.h" #include "xmalloc.h"
/* b6502 */ /* cc65 */
#include "codeent.h" #include "codeent.h"
#include "label.h" #include "codelab.h"

View File

@@ -1,6 +1,6 @@
/*****************************************************************************/ /*****************************************************************************/
/* */ /* */
/* label.h */ /* codelab.h */
/* */ /* */
/* Code label structure */ /* Code label structure */
/* */ /* */
@@ -33,8 +33,8 @@
#ifndef LABEL_H #ifndef CODELAB_H
#define LABEL_H #define CODELAB_H
@@ -100,7 +100,7 @@ void OutputCodeLabel (FILE* F, const CodeLabel* L);
/* End of label.h */ /* End of codelab.h */
#endif #endif

View File

@@ -37,11 +37,9 @@
#include "print.h" #include "print.h"
/* cc65 */ /* cc65 */
#include "global.h"
/* b6502 */
#include "codeent.h" #include "codeent.h"
#include "codeinfo.h" #include "codeinfo.h"
#include "global.h"
#include "codeopt.h" #include "codeopt.h"
@@ -117,7 +115,7 @@ static void OptDeadJumps (CodeSeg* S)
static void OptDeadCode (CodeSeg* S) static void OptDeadCode (CodeSeg* S)
/* Remove dead code (code that follows an unconditional jump or an rts/rti /* Remove dead code (code that follows an unconditional jump or an rts/rti
* and has no label) * and has no label)
*/ */
{ {
unsigned I; unsigned I;

View File

@@ -38,7 +38,7 @@
/* b6502 */ /* cc65 */
#include "codeseg.h" #include "codeseg.h"

View File

@@ -45,11 +45,9 @@
#include "xsprintf.h" #include "xsprintf.h"
/* cc65 */ /* cc65 */
#include "error.h"
/* b6502 */
#include "codeent.h" #include "codeent.h"
#include "codeinfo.h" #include "codeinfo.h"
#include "error.h"
#include "codeseg.h" #include "codeseg.h"

View File

@@ -44,8 +44,8 @@
#include "attrib.h" #include "attrib.h"
#include "coll.h" #include "coll.h"
/* b6502 */ /* cc65 */
#include "label.h" #include "codelab.h"

View File

@@ -11,11 +11,10 @@ EXE = cc65
# Library directories # Library directories
COMMON = ../common COMMON = ../common
B6502 = b6502
# Default for the compiler lib search path as compiler define # Default for the compiler lib search path as compiler define
CDEFS=-DCC65_INC=\"/usr/lib/cc65/include/\" 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 CC=gcc
EBIND=emxbind EBIND=emxbind
LDFLAGS= LDFLAGS=
@@ -26,9 +25,14 @@ LDFLAGS=
OBJS = anonname.o \ OBJS = anonname.o \
asmcode.o \ asmcode.o \
asmlabel.o \ asmlabel.o \
codeent.o \
codegen.o \ codegen.o \
codelab.o \
codeopt.o \
codeseg.o \
compile.o \ compile.o \
cpu.o \ cpu.o \
dataseg.o \
datatype.o \ datatype.o \
declare.o \ declare.o \
declattr.o \ declattr.o \
@@ -37,6 +41,7 @@ OBJS = anonname.o \
exprheap.o \ exprheap.o \
exprnode.o \ exprnode.o \
funcdesc.o \ funcdesc.o \
funcinfo.o \
function.o \ function.o \
global.o \ global.o \
goto.o \ goto.o \
@@ -48,6 +53,7 @@ OBJS = anonname.o \
loop.o \ loop.o \
macrotab.o \ macrotab.o \
main.o \ main.o \
opcodes.o \
preproc.o \ preproc.o \
pragma.o \ pragma.o \
scanner.o \ scanner.o \
@@ -59,8 +65,7 @@ OBJS = anonname.o \
typecmp.o \ typecmp.o \
util.o util.o
LIBS = $(B6502)/b6502.a \ LIBS = $(COMMON)/common.a
$(COMMON)/common.a
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -76,16 +81,10 @@ all: depend
@$(MAKE) -f make/gcc.mak all @$(MAKE) -f make/gcc.mak all
endif endif
$(EXE): $(OBJS) $(LIBS) subs $(EXE): $(OBJS) $(LIBS)
$(CC) $(LDFLAGS) -o $(EXE) $(CFLAGS) $(OBJS) $(LIBS) $(CC) $(LDFLAGS) -o $(EXE) $(CFLAGS) $(OBJS) $(LIBS)
@if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi @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: clean:
rm -f *~ core *.map rm -f *~ core *.map
@@ -98,6 +97,6 @@ zap: clean
.PHONY: depend dep .PHONY: depend dep
depend dep: $(OBJS:.o=.c) depend dep: $(OBJS:.o=.c)
@echo "Creating dependency information" @echo "Creating dependency information"
$(CC) -I$(COMMON) -I$(B6502) -MM $^ > .depend $(CC) -I$(COMMON) -MM $^ > .depend

View File

@@ -41,10 +41,8 @@
#include "check.h" #include "check.h"
/* cc65 */ /* cc65 */
#include "error.h"
/* b6502 */
#include "codeinfo.h" #include "codeinfo.h"
#include "error.h"
#include "opcodes.h" #include "opcodes.h"

View File

@@ -143,10 +143,6 @@ typedef struct {
char Mnemo[4]; /* Mnemonic */ char Mnemo[4]; /* Mnemonic */
opc_t OPC; /* Opcode */ opc_t OPC; /* Opcode */
unsigned Size; /* Size, 0 means "check addressing mode" */ unsigned Size; /* Size, 0 means "check addressing mode" */
####
unsigned char Use;
unsigned char Load;
unsigned Info; /* Usage flags */ unsigned Info; /* Usage flags */
} OPCDesc; } OPCDesc;

View File

@@ -6,10 +6,10 @@
/* */ /* */
/* */ /* */
/* */ /* */
/* (C) 2000 Ullrich von Bassewitz */ /* (C) 2000 Ullrich von Bassewitz */
/* Wacholderweg 14 */ /* Wacholderweg 14 */
/* D-70597 Stuttgart */ /* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */ /* EMail: uz@cc65.org */
/* */ /* */
/* */ /* */
/* This software is provided 'as-is', without any expressed or implied */ /* This software is provided 'as-is', without any expressed or implied */

View File

@@ -6,10 +6,10 @@
/* */ /* */
/* */ /* */
/* */ /* */
/* (C) 2000 Ullrich von Bassewitz */ /* (C) 2000 Ullrich von Bassewitz */
/* Wacholderweg 14 */ /* Wacholderweg 14 */
/* D-70597 Stuttgart */ /* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */ /* EMail: uz@cc65.org */
/* */ /* */
/* */ /* */
/* This software is provided 'as-is', without any expressed or implied */ /* This software is provided 'as-is', without any expressed or implied */