+2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
+
+ * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
+ * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
+ (regTypeNum): set REG_BIT type if necessary
+ * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
+ * support/regression/tests/critical.c: check bug 1144613
+
2005-03-02 Raphael Neider <rneider AT web.de>
* src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
-2004-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
* src/avr/ralloc.c (serialRegAssign),
* src/ds390/ralloc.c (serialRegAssign),
* src/SDCCast.c (decorateType): fixed bug 1124787
-2004-02-20 Hubert Sack <sack AT digiplan.de>
+2005-02-20 Hubert Sack <sack AT digiplan.de>
committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
* src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
patch #1121755
-2004-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
+2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
* src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
to keep the correct label reference count when adding/removing references
* src/pic/gen.c : Fix for bugs #1080519 & #1115662.
-2004-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
+2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
* device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
* (genPackBits): improved accessing full bytes, implemented for GPOINTERs
* device/include/pic16/{stddef.h,stdbool.h}: added
-2004-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
+2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
* device/include/mcs51/c8051f040.h: added define CPT2_PAGE
* src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
appeared to be required
-2004-01-31 Borut Razem <borut.razem AT siol.net>
+2005-01-31 Borut Razem <borut.razem AT siol.net>
* support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
include/mcs51 and include/z80 directories to the package
-2004-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
* src/hc08/gen.c (genFunction): fixed bug #1112752
-2004-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
+2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
* src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
-2004-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
+2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
* src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
-2004-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
+2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
* device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
-2004-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
+2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
* device/include/c8051fxxx.h: removed these 6 files
* device/include/mcs51/c8051fxxx.h: added these 11 new files
* src/pic16/glue.c (emitStatistics): beautified
* device/lib/pic16/libm/Makefile: added include path
-2004-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
* src/z80/gen.c (aopPut): fixed bug #1103902
-2004-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
* device/lib/expf.c: fixed bug #1095792
* src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
to fix #1106967 (pCode->seq are not set up correctly)
-2004-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
* src/SDCCglue.c (glue): make sure code area is declared before the
static initialization area.
x->op == LABEL || \
x->op == FUNCTION || \
x->op == INLINEASM || \
- x->op == ENDFUNCTION || \
- x->op == CRITICAL || \
- x->op == ENDCRITICAL )
+ x->op == ENDFUNCTION )
#define SKIP_IC1(x) (x->op == CALL || \
SKIP_IC2(x) )
x->op == RECEIVE || \
x->op == ARRAYINIT || \
SKIP_IC1(x) || \
+ x->op == CRITICAL || \
+ x->op == ENDCRITICAL || \
x->op == SEND )
#define SKIP_IC3(x) (SKIP_IC2(x) || \
}
/*-----------------------------------------------------------------*/
-/* getRegPtrNoSpil - get it cannot split */
+/* getRegPtrNoSpil - get it cannot be spilt */
/*-----------------------------------------------------------------*/
static regs *getRegPtrNoSpil()
{
}
/*-----------------------------------------------------------------*/
-/* getRegGprNoSpil - get it cannot split */
+/* getRegGprNoSpil - get it cannot be spilt */
/*-----------------------------------------------------------------*/
static regs *getRegGprNoSpil()
{
static int
willCauseSpill (int nr, int rt)
{
- /* first check if there are any avlb registers
- of te type required */
+ /* first check if there are any available registers
+ of the type required */
if (rt == REG_PTR)
{
/* special case for pointer type
if (nFreeRegs (REG_GPR) >= nr)
return 0;
}
+ else if (rt == REG_BIT)
+ {
+ if (nFreeRegs (rt) >= nr)
+ return 0;
+ }
else
{
if (mcs51_ptrRegReq)
int j;
int ptrRegSet = 0;
- /* Make sure any spill location is definately allocated */
+ /* Make sure any spill location is definitely allocated */
if (sym->isspilt && !sym->remat && sym->usl.spillLoc &&
!sym->usl.spillLoc->allocreq)
{
}
}
- D(printf("Atemping fillGaps on %s: [",sym->name));
+ D(printf("Attempting fillGaps on %s: [",sym->name));
/* THERE IS HOPE !!!! */
for (i=0; i < sym->nRegs ; i++ ) {
if (sym->regType == REG_PTR)
}
/* determine the type of register required */
- if (sym->nRegs == 1 &&
- IS_PTR (sym->type) &&
- sym->uptr)
+ if (sym->nRegs == 1 && IS_PTR (sym->type) && sym->uptr)
sym->regType = REG_PTR;
+ else if (IS_BIT(sym->type))
+ sym->regType = REG_BIT;
else
sym->regType = REG_GPR;
-
}
else
/* for the first run we don't provide */
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
+
In other words, you are welcome to use, share and improve this program.
You are forbidden to forbid anyone else to use, share and improve
- what you give them. Help stamp out software-hoarding!
+ what you give them. Help stamp out software-hoarding!
-------------------------------------------------------------------------*/
#include "SDCCicode.h"
#include "SDCCBBlock.h"
enum
{
- R2_IDX = 0, R3_IDX, R4_IDX,
- R5_IDX, R6_IDX, R7_IDX,
- R0_IDX, R1_IDX, X8_IDX,
- X9_IDX, X10_IDX, X11_IDX,
+ R2_IDX = 0, R3_IDX, R4_IDX, R5_IDX,
+ R6_IDX, R7_IDX, R0_IDX, R1_IDX,
+ X8_IDX, X9_IDX, X10_IDX, X11_IDX,
X12_IDX, CND_IDX,
DPL_IDX, DPH_IDX, B_IDX, A_IDX,
END_IDX
#define REG_PTR 0x01
#define REG_GPR 0x02
#define REG_CND 0x04
+#define REG_BIT 0x08
/* definition for the registers */
typedef struct regs
{
- short type; /* can have value
- REG_GPR, REG_PTR or REG_CND */
- short rIdx; /* index into register table */
+ short type; /* can have value
+ REG_GPR, REG_PTR or REG_CND */
+ short rIdx; /* index into register table */
short otype;
- char *name; /* name */
- char *dname; /* name when direct access needed */
- char *base; /* base address */
- short offset; /* offset from the base */
- unsigned isFree:1; /* is currently unassigned */
+ char *name; /* name */
+ char *dname; /* name when direct access needed */
+ char *base; /* base address */
+ short offset; /* offset from the base */
+ unsigned isFree:1; /* is currently unassigned */
}
regs;
extern regs regs8051[];
//must be at least 2 bytes big and volatile
volatile big global_var = { 0 };
+int y;
unsigned int get_global (void) critical
{
}
//check the interrupt has run at all
ASSERT(x.a != 0);
+
+ critical y = 0;
+ //check the interrupts are still enabled
+ ASSERT(EA);
#else
ASSERT(1);
#endif