* device/include/pic/p16f_common.inc: added common declarations
authortecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 28 Oct 2005 09:42:56 +0000 (09:42 +0000)
committertecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 28 Oct 2005 09:42:56 +0000 (09:42 +0000)
* src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3918 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
device/include/pic/p16f_common.inc [new file with mode: 0644]
src/pic/ralloc.c

index 494ed1b2558a5bc23454cfc5e14f86e8e509d46b..bf0303dca7034c7d5e2f0a33dfb117af43011b64 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-28 Raphael Neider <rneider AT web.de>
+
+       * device/include/pic/p16f_common.inc: added common declarations
+       * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
+
 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
 
        * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
diff --git a/device/include/pic/p16f_common.inc b/device/include/pic/p16f_common.inc
new file mode 100644 (file)
index 0000000..6f0b03f
--- /dev/null
@@ -0,0 +1,70 @@
+; -----------------------------------------------
+; p16f_common.inc - definitions common to all 14 bit PIC devices
+;
+; Copyright (C) 2005 by Raphael Neider
+;
+; This file is part of the SDCC/pic14 library.
+; This file is licensed under the terms of the LGPL, see LGPL
+; for details.
+;
+; $Id$
+
+               extern  STK00
+               extern  STK01
+               extern  STK02
+               extern  STK03
+               extern  STK04
+               extern  STK05
+               extern  STK06
+               extern  STK07
+               extern  STK08
+               extern  STK09
+               extern  STK10
+               extern  STK11
+               extern  STK12
+               extern  STK13
+               extern  STK14
+
+; -----------------------------------------------
+; --- PIC14 special function registers
+; -----------------------------------------------
+
+INDF           EQU     0x0000
+TMR0           EQU     0x0001
+PCL            EQU     0x0002
+STATUS         EQU     0x0003
+FSR            EQU     0x0004
+PORTA          EQU     0x0005
+PORTB          EQU     0x0006
+; unimplemented EQU    0x0007
+EEDATA         EQU     0x0008
+EEADR          EQU     0x0009
+PCLATH         EQU     0x000a
+INTCON         EQU     0x000b
+
+; INDF         EQU     0x0080
+OPTION_REG     EQU     0x0081
+; PCL          EQU     0x0082
+; STATUS       EQU     0x0083
+; FSR          EQU     0x0084
+TRISA          EQU     0x0085
+TRISB          EQU     0x0086
+; unimplemented EQU    0x0087
+EECON1         EQU     0x0088
+EECON2         EQU     0x0089
+; PCLATH       EQU     0x008a
+; INTCON       EQU     0x008b
+
+; -----------------------------------------------
+; --- useful symbolic constants
+; -----------------------------------------------
+
+C              EQU     0
+DC             EQU     1
+Z              EQU     2
+nPD            EQU     3
+nTO            EQU     4
+RP0            EQU     5
+RP1            EQU     6       ; possibly unimplemented
+IRP            EQU     7       ; possibly unimplemented
+
index 5e385a07b8c1ca0ddb909efe668a56a5c347079a..65e14e03f9b77960b205c8a7d5b2c89136c57aa9 100644 (file)
@@ -484,7 +484,7 @@ void initStack(int base_address, int size)
        
        for(i = 0; i<size; i++) {
                char buffer[16];
-        regs *r;
+               regs *r;
                SNPRINTF(&buffer[0], 16, "STK%02d", i);
                r = newReg(REG_STK, PO_GPR_TEMP,base_address,buffer,1,0);
                r->address = base_address; // Pseudo stack needs a fixed location that can be known by all modules