5223636d02a0550d5e04b9c9655980558ccf4713
[fw/sdcc] / ChangeLog
1 2006-06-26 Raphael Neider <rneider AT web.de>
2
3         * src/pic16/gen.c (genFunction, genEndFunction): also preserve
4           PCLATH and PCLATU on interrupts, potentially fixes #1505141
5
6 2006-06-25 Raphael Neider <rneider AT web.de>
7
8         * device/lib/pic/libm: NEW, added math library functions
9         * device/lib/pic/libsdcc: NEW; added float support functions
10         * device/lib/pic/{Makefile.in,configure.in,configure}: added libm/
11         * device/include/pic/{limits.h,errno.h,sdcc-lib.h,float.h,math.h}:
12           NEW, added math related headers
13         * device/include/asm/pic/features.h: NEW
14         * src/pic/gen.c (emitpcode_real): emit warning on NULL pCodeOp,
15           (popGet): allow larger offsets for AOP_PCODE,
16           (genDataPointerSet): handle literals explicitly, more debug output,
17           (genAssign): fixed for float using aopLiteral ;-)
18         * src/pic/glue.c (pic14createInterruptVect): inserted pagesel before
19           GOTO initialisation routine
20         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): set wasUsed
21           flag on registers, fixes #1469043 (local variables do not work)
22         * src/pic/main.c (_pic14_do_link),
23         * src/pic16/main.c (_pic16_linkEdit): use fullDstFileName if
24           available
25
26 2006-06-25 Borut Razem <borut.razem AT siol.net>
27
28         * device/lib/pic16/libc/stdio/sprintf.c: return the number of
29           characters printed (not including the trailing '\0' used to end
30           output to strings). Problem detected in regression test bug-927659.c.
31           NOTE: printf() family functions should return int instead
32           unsigned int!
33         * device/lib/pic16/libc/stdio/vfprintf.c: "%%" prints "%", unknown
34           specifier are printed as themselves
35         * sdcc/support/regression/tests/bug1057979.c: pic16 printf doesn't
36           support flags, width and precision specifiers
37
38 2006-06-24 Borut Razem <borut.razem AT siol.net>
39
40         * sdcc/support/regression/tests/bitvars.c: added gbz80, pic16 and pic16
41           to the list of sdcc tagrets not supporting bit type
42         * sdcc/support/regression/tests/bug-905992.c.c: excluded regression
43           testfor pic16 due to bug:
44           [ 1511794 ] pic16: regression test bug-895992.c fails
45
46 2006-06-24 Maarten Brock <sourceforge.brock AT dse.nl>
47
48         * src/mcs51/gen.c (genCmp): optimization for RFE 1162453
49         * src/SDCCglue.c (initPointer), fixed bug 1496419
50         * support/regression/tests/bug1496419.c: new, added
51
52 2006-06-22 Borut Razem <borut.razem AT siol.net>
53
54         * support/regression/ports/pic16/support.c: use gpsim usart module from
55           libgpsim_modules library
56
57 2006-06-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
58
59         * device/include/mcs51/at89c51ed2.h: Fixed bug 1510144 changed
60         IP0H to IPH0.
61
62 2006-06-19 Raphael Neider <rneider AT web.de>
63
64         * src/pic/glue.h,src/pic16/glue.h: added prototypes
65         * src/pic/glue.c,src/pic16/glue.c (pic1x_stringInSet,
66           pic1x_emitSymbolIfNew): NEW, check for a string in a set,
67           (pic14printExterns,pic14printPublics,pic16printPublics,
68           pic16_printExterns): use new functions to emit symbols
69           (picglue,pic16glue): emit publics before emitting externs
70         * src/pic/gen.c,src/pic16/gen.c (genFunction): remember the names of
71           locally defined functions to avoid bug #1443651
72         * support/regression/tests/bug-716242.c: removed pic16 workaround
73         * support/regression/ports/pic16/spec.mk: ignore errors during build
74
75 2006-06-19 Raphael Neider <rneider AT web.de>
76
77         * src/pic/glue.h: added pic14aopLiteral prototype
78         * src/pic/glue.c (pic14aopLiteral): return unsigned int
79         * src/pic/gen.c: removed stdint.h dependency
80           (aopGet): use Safe_strdup()
81           (bitpatternFromVal): removed, replaced use with pic14aopLiteral
82           (genDataPointerSet): use pic14aopLiteral()
83         * src/pic16/glue.h, src/pic16/glue.c, src/pic16/gen.c: similar changes
84           for pic16; thanks to Bernhard and Maarten
85
86 2006-06-18 Borut Razem <borut.razem AT siol.net>
87
88         * support/regression/tests/structflexarray.c: flexible array members
89           not supported by gcc < 3
90         * sim/ucsim/configure, sim/ucsim/configure.in: do not compile serio
91           GUI tool by default
92         * src/pic/gen.c: don't include [p]strdin.h on solaris
93         * support/Util/pstdint.h: addad svn attributes
94         * support/regression/tests/constantRange.c,
95           support/regression/tests/rotate.c: include inttypes.h instead
96           stdint.h on solaris, addad svn attributes
97
98 2006-06-18 Raphael Neider <rneider AT web.de>
99
100         * src/SDCCsymt.c (initCSupport): change return type of divschar to
101           int for PIC16
102         * src/pic16/genarith.c (genAddLit): sign-extend via standard routine
103           (pic16_genMinusBits): simplified sign-extension
104           (pic16_genUMult8XLit_8,pic16_genUMult8X8_8): renamed to
105             pic16_genMult8XLit_n resp. pic16_genMult8X8_n, fixed and
106             adjusted to correctly handle mixed-signed operands, disabled
107             now unused multiplciation routines
108         * src/pic16/gen.c (pic16_pushpCodeOp): fixed to handle literals
109           (assignResultValue): added argument denoting the size of the result
110             as returned by the function (fixes upcasts in assigning from
111             function calls: char foo(); int i = foo();)
112           (genCall,genPcall,genGenPointerGet,genReceive): pass size of
113             function result to assignResultValue
114           (genMult): disabled inlined multiplication code
115           (genDiv): augmented to also handle the modulus operator, fixed to
116             handle mixed-signed operands correctly
117           (genMod): simply call genDiv, disabled unused code
118           (genAssign): fixed missing (sign-)extension on result
119         * src/pic16/main.c (_hasNativeMulFor): accept literals [-128..256) as
120             valid char operands, allow signed operands for native code, added
121             division and modulo operator handling
122         * device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
123
124         As a consequence, onebyte.c (if split into two files) and muldiv.c
125         pass regression tests.
126
127 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
128
129         * doc/Makefile.in: two runs of makeindex seem needed to get
130         correct page references in the index of sdccman.pdf
131         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
132
133 2006-06-17 Borut Razem <borut.razem AT siol.net>
134
135         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
136
137 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
138
139         * doc/sdccman.lyx: updated, added (porting source code, debugging),
140         mentioned ec2drv and paulmon
141
142 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
143
144         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
145           consecutive abs areas
146           (find_empty_space, allocate_space): added map to handle codemap or
147            xdatamap,
148           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
149            absolute idata and xdata
150         * as/mcs51/lkmem.c (summary2): updated legend
151
152 2006-06-16 Raphael Neider <rneider AT web.de>
153
154         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
155
156 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
157
158         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
159           1208515
160         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
161
162 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
163
164         * src/port.h (struct PORT): added field gp_tags, to hold the tag
165         value of generic pointers,
166         * src/avr/main.c,
167           src/ds390/main.c,
168           src/hc08/main.c,
169           src/izt/i186.c,
170           src/izt/tlcs900h.c,
171           src/mcs51/main.c,
172           src/pic/main.c,
173           src/pic16/main.c,
174           src/xa51/main.c,
175           src/z80/main.c: PORT structure, added elements for gp_tags field,
176         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
177         fields in the PORT structure of each port,
178         * src/SDCCast.c (decorateType): allow processing of generic pointers
179         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
180         S_FIXED symbols
181
182 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
183
184         * link/z80/lkgb.c,
185         * link/z80/lkgg.c,
186         * src/pic16/gen.c,
187         * src/pic16/main.c,
188         * src/pic16/pcode.c,
189         * src/pic/main.c,
190         * src/pic/pcoderegs.c,
191         * src/SDCCicode.c,
192         * src/SDCCmain.c,
193         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
194           bug 1504689 on minGW
195
196 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
197
198         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
199
200 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
201
202         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
203
204 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
205
206         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
207           for optimization
208
209 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
210
211         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
212         to a char variable. Fixed bug #1504211
213         * device/include/pic16/adc.h,
214         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
215         and fixed bug #1364390
216
217 2006-06-10 Borut Razem <borut.razem AT siol.net>
218
219         * CVSROOT: removed the CVS left-over
220
221 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
222
223         * as/hc08/asmain.c (asexit),
224         * as/hc08/lkmain.c (lkexit),
225         * as/mcs51/asmain.c (asexit),
226         * as/mcs51/lkmain.c (lkexit),
227         * src/SDCCglue.c (DEFSETFUNC),
228         * src/SDCCmain.c (linkEdit, assemble),
229         * support/librarian/sdcclib.c (AddRel),
230           replaced unlink() by standard C remove()
231         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
232         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
233           gatherImplicitVariables): new, added to fix bug 608752,
234           (createFunction): added gatherImplicitVariables()
235         * src/SDCCast.h: added createRMW prototype
236         * src/SDCCsymt.h (struct symbol): added infertype
237         * support/regression/tests/bug608752.c: new, added
238
239 2006-06-10 Raphael Neider <rneider AT web.de>
240
241         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
242           multibyte dummy reads (fixes #1503234)
243
244 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
245
246         * device/include/mcs51/compiler.h: new, added header file to enable
247           creating common sfr definition header files for different compilers
248
249 2006-06-05 Raphael Neider <rneider AT web.de>
250
251         * src/pic16/{pcode.h,genarith.c}:
252           introduced pCodeOp combining any two pCodeOps (previously only
253           two register operands could be combined), removed pcop2 from
254           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
255         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
256         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
257           rewritten to use new PO_TWO_OPS
258         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
259         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
260           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
261           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
262           (pic16_get_op): embraced return arg to allow #define return(x),
263             added new case for combined opcodes
264           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
265           (pic16_pCode2str,pic16_getRegFrompCodeOp,
266            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
267
268 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
269
270         * src/SDCCval.c (checkConstantRange): added
271         * src/SDCCval.h: added checkConstantRange
272         * support/Util/SDCCerr.c,
273         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
274         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
275         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
276         * src/SDCCast.c (decorateType): added checkConstantRange,
277         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
278         can be emitted with the correct always true/false warning,
279         added optimization for double '!';
280         result of decorateType() must be assigned back to the tree, because
281         decorateType() can change the tree
282         * src/SDCCicode.c (geniCodeLogic),
283         (geniCodeAssign): replaced new checkConstantRange, added warnings,
284         (checkConstantRange): removed, it was only a fragment which never
285         emitted a warning
286         * src/SDCCsymt.c (computeType): fixed promotion for
287         "-1 < (unsigned bit) b"
288         * src/pic/ralloc.c (packRegsForAssign),
289         * src/pic16/ralloc.c (packRegsForAssign),
290         * src/hc08/ralloc.c (packRegsForAssign),
291         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
292         from mcs51
293         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
294         * support/regression/tests/constantRange.c: added
295         * support/valdiag/tests/constantRange.c: added
296         * support/valdiag/valdiag.py: added -DPORT_HOST=1
297
298 2006-06-02 Borut Razem <borut.razem AT siol.net>
299
300         * support/regression/ports/pic16/support.c: increase stack size
301           to 255 bytes
302         * support/regression/Makefile.in: sort tests by name so that the
303           resutlts can be compared on different machines / platforms
304
305 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
306
307         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
308         * src/ds390/gen.c (emitLabel): new, added,
309           (genDjnz): fixed stack overflow bug,
310           (throughout): cosmetic changes to sync with mcs51/gen.c,
311           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
312         * src/mcs51/gen.c (genEndFunction): small optimization,
313           (throughout): cosmetic changes to sync with ds390/gen.c
314
315 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
316
317         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
318           (_print_format): fixed printing pointers
319         * src/mcs51/gen.c (emitLabel, movb): new, added,
320           (genAssign): small optimization,
321           (genDjnz): fixed stack overflow bug,
322           (throughout): replaced sprintf with SNPRINTF,
323           replaced mcs51_regWithIdx with REG_WITH_INDEX,
324           replaced emitcode("mov", "b,...") with MOVB(...),
325           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
326           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
327         * src/mcs51/peeph.def: added rules 140 and 264
328         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
329           so they may get optimized into registers
330
331 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
332
333         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
334           immediately when encountered,
335           (printUsage): always use stderr even on windows
336
337 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
338
339         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
340         (processParms): fixed bug #1247551
341         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
342         parseCmdLine, main): print '--version' to stdout,
343         print 'help' to stdout if --help is given,
344         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
345         arguments are given; fixed --help
346
347 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
348
349         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
350         * support/regression/tests/bug-1493710.c: added
351
352 2006-05-27 Borut Razem <borut.razem AT siol.net>
353
354         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
355           static instead auto
356         * support/regression/ports/pic16/support.c: increase stack size
357           from default 64 bytes to 128 bytes
358         * support/regression/tests/staticinit.c,
359           support/regression/tests/float.c: regression tests fully enabled
360           for pic16 port by putting the initialized data arrays into the code
361           section
362         * support/regression/ports/pic16/spec.mk: don't link default libraries.
363           This was changed by mistake in the previous version.
364
365 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
366
367         * src/pic16/gen.c (genFunction, genEndFunction): some
368         beautifications, fixed bug with falsely restoring FSR2 in large
369         stack model, thanks to Beau E. Cox for reporting the bug
370
371 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
372
373         * debugger/mcs51/break.c,
374         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
375           use %p to print pointers, made address variables unsigned
376         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
377         * debugger/mcs51/symtab.c (parseSymbol): must return something
378         * src/mcs51/gen.c (aopForSym): small optimization,
379            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
380           (freeAsmop): added missing break,
381           (aopPut): removed parameter bvolatile, determine it inside the function,
382           (saveRegisters, unsaveRegisters): small optimization,
383           (genIpush): removed pointless check,
384           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
385           replaced sprintf with SNPRINTF,
386           replaced strcpy with strncpyz,
387           updated aopPut calls,
388           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
389         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
390
391 2006-05-24 Borut Razem <borut.razem AT siol.net>
392
393         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
394           modification of test for the pic16 port, put the array to the code
395           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
396
397 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
398
399         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
400         * support/Util/pstdint.h: added
401
402 2006-05-22 Borut Razem <borut.razem AT siol.net>
403
404         * src/regression/Makefile: removed bool2.c test, added -q linker option
405         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
406           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
407           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
408           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
409           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
410           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
411           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
412           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
413           define SUPPORT_BIT_TYPES 0, removed unused bit variables
414
415 2006-05-22 Raphael Neider <rneider AT web.de>
416
417         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
418           bug #1492360 (problematic due to generic pointers, see code)
419
420 2006-05-22 Borut Razem <borut.razem AT siol.net>
421
422         * support/regression/ports/pic16/specs.mk: removed stack size linker
423           directive
424         * support/regression/tests/array.c,
425           support/regression/tests/bitopcse.c,
426           support/regression/tests/bug-908454.c,
427           support/regression/tests/malloc.c: modified for pic16 regression test
428         * support/regression/tests/bitfields.c:
429           pic16 - excluded bitfileds of size > 8
430         * support/regression/tests/bp.c: pic16 - reduced data size
431         * support/regression/tests/bug-221100.c: pic16 - reduced data size
432         * support/regression/tests/bug-460010.c:
433           pic16 - used the absolute address the fits in memory
434         * support/regression/tests/bug-716242.c:
435           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
436         * support/regression/tests/float.c:
437           pic16 - excluded - data size too big
438         * support/regression/tests/onebyte.c:
439           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
440         * support/regression/tests/shifts.c:
441           pic16 - function names probably have to differ in first X characters
442           (gpasm limitation?)
443         * support/regression/tests/staticinit.c:
444           pic16 - excluded some tests due error: no target memory available for
445           section ".idata"
446
447 2006-05-22 Borut Razem <borut.razem AT siol.net>
448
449         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
450           second try. Thanks Stas Sergeev once more.
451
452 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
453
454         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
455           (genLeftShift, genRightShift): fixed bug 1491627
456         * src/hc08/peeph.def (rules 7, 8.x): added
457         * support/regression/tests/shifts.c (ShiftLeftByParam,
458           ShiftRightByParam, testShiftByParam): added to test variable shifting
459
460 2006-05-20 Raphael Neider <rneider AT web.de>
461
462         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
463         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
464           (allocReg): add only new registers to dynAllocRegs,
465           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
466             #1489055, #1445850, and probably #1483693
467
468 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
469
470         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
471         bug in for-loop that didn't emit the last of CONFIG and ID registers
472
473 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
474
475         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
476           with offset
477         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
478           1489016, 1434401 and 1490124
479         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
480           1489016, 1434401 and 1490124
481
482 2006-05-17 Borut Razem <borut.razem AT siol.net>
483
484         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
485           thanks Stas Sergeev
486
487 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
488
489         * device/include/mcs51/P89c51RD2.h,
490         * device/include/mcs51/P89LPC901.h,
491         * device/include/mcs51/P89LPC922.h,
492         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
493
494 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
495
496         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
497         to fix missing stack pragma in compiled binary object file,
498
499 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
500
501         * support/packihx/configure.in,
502         * support/packihx/configure: removed warning, autoconf >= 2.5x can
503         determine sizeof basic types even while cross compiling
504
505 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
506
507         * src/avr/gen.c (aopop),
508         * src/ds390/gen.c (aopOp),
509         * src/hc08/gen.c (aopOp),
510         * src/mcs51/gen.c (aopop),
511         * src/pic16/gen.c (pic16_aopOp),
512         * src/pic/gen.c (aopOp),
513         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
514         if size of operand is smaller than spill location
515
516 2006-05-12 Borut Razem <borut.razem AT siol.net>
517
518         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
519           have to have CR/LF line endings even if they are checked out on *nix
520           or on WIN32 in cygwin binmode
521
522 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
523
524         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
525         * device/include/ds80c390.h: added sfr16 definitions
526         * src/ds390/gen.c,
527         * src/ds390/gen.h,
528         * src/ds390/main.c,
529         * src/ds390/ralloc.c,
530         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
531           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
532           bit returning functions
533         * support/regression/tests/sfr16.c: enabled test on ds390
534
535 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
536
537         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
538         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
539
540 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
541
542         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
543         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
544           (cl_address_space constructor): removed expensive initialization,
545           (cl_address_space::get_cell): extended for late initialization,
546           (cl_address_space::*): use late initialization,
547           (cl_address_decoder::activate): removed expensive initialization,
548           This reduced regression test running time by 25%
549
550 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
551
552         * packihx/,
553         * configure.in,
554         * configure,
555         * sdcc.dsw,
556         * Makefile.bcc,
557         * Makefile.in,
558         * support/packihx/Makefile.in,
559         * support/packihx/clean.mk,
560         * support/packihx/Makefile.bcc,
561         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
562
563 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
564
565         * src/SDCCval.c (valNot): fix for regression test failure
566           of not.c on big endian hosts
567
568 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
569
570         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
571
572 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
573
574         * device/lib/mcs51/Makefile.in: changed string comparison operator
575           to = for POSIX compliance; == is bash extension
576
577 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
578
579         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
580           kosmonaut_pirx
581
582 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
583
584         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
585         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
586         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
587         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
588         bug report #1478657,
589
590 2006-05-05 Borut Razem <borut.razem AT siol.net>
591
592         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
593           making the html
594
595 2006-05-02 Borut Razem <borut.razem AT siol.net>
596
597         * doc/Makefile.in: removed *.ind dependency since there is no rule to
598           create *.ind, which made make to fail if invoked with -j 2
599
600 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
601
602         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
603           Hubert Sack for patch 1479782
604
605 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
606
607         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
608
609 2006-05-01 Raphael Neider <rneider AT web.de>
610
611         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
612           (create_pic): store only prefix-free device name,
613           (init_pic): check for device names with "16" prefix,
614           (list_valid_pics),
615         * src/pic/device.h (struct PIC_device),
616         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
617             stored device name,
618         * device/include/pic/pic12f{635,675,629,683}.h,
619         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
620         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
621         * device/include/pic/pic16f505.h,
622         * device/lib/pic/libdev/pic16f505.c: removed
623         * device/include/pic/pic14devices.txt: added support for pic12f
624             devices, removed unsupported non 16-bit devices
625             [above changes provided by patch from Zik Saleeba]
626         * src/pic/*, src/pic16/*, device/include/pic16/*,
627           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
628
629 2006-05-01 Borut Razem <borut.razem AT siol.net>
630
631         * configure.in, configure, doc/Makefile.in:
632           sync with nightly build makefile - latex, dvipdf and dvips
633           not needed any more
634
635 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
636
637         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
638         in the library source
639
640 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
641
642         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
643
644 2006-04-28 Raphael Neider <rneider AT web.de>
645
646         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
647         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
648           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
649         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
650
651 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
652
653         * device/lib/pic/libdev/Makefile.in,
654         * device/lib/hc08/Makefile.in,
655         * device/lib/gbz80/Makefile.in,
656         * device/lib/z80/Makefile.in,
657         * device/lib/ds390/Makefile.in,
658         * device/lib/ds400/Makefile.in: added srcdir to include search path,
659         thanks to Borut for the bug report
660         * configure.in,
661         * configure: always create doc/Makefile independent from --enable-doc
662         * Makefile.in: always install from directory doc independent from
663         --enable-doc
664         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
665         removed
666         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
667         * doc/Makefile.in: install *.txt if present
668         * device/include/Makefile.in (install): added installation of pic/*.inc
669         and pic/*.txt files again, they were erroneously removed
670
671 2006-04-28 Raphael Neider <rneider AT web.de>
672
673         * src/pic/{gen.c,main.h,pcode.c},
674         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
675             concerning signedness with casts
676
677 2006-04-28 Raphael Neider <rneider AT web.de>
678
679         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
680             definition of an interrupt handler,
681         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
682             interrupt handler stuff from picglue() to separate routine,
683           (picglue): enabled definition of intr handlers in files w/o main()
684
685 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
686
687         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
688           compilation with MSVC 2005 Express Edition (VC8)
689
690 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
691
692         * device/lib/Makefile: fixed build of gbz80 lib
693
694 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
695
696         * support/regression/tests/bug-460010.c,
697         * support/regression/tests/bug-524691.c,
698         * support/regression/tests/bug-716242.c: removed conditional defines
699           that are already in testfwk.h
700
701 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
702
703         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
704           (AccAXRsh1): added, shift right by 1,
705           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
706            AccAXLrl1
707         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
708
709 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
710
711         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
712         remove cast to same type
713         * src/SDCCast.c (decorateType): fix for RFE 1475742,
714         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
715         * as/z80/Makefile,
716         * link/z80/Makefile: removed, they have moved to
717         Makefile.in files
718         * configure,
719         * configure.in: replaced duplicate message about ucsim by missing sdcpp
720         * install-sh: fix bug #1204398 by setting umask 0022
721         * device/lib/Makefile: separate build of z80 and gbz80 lib
722
723 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
724
725         Enabled VPATH feature: changed nearly all Makefiles (149 files).
726         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
727
728         One basic decision: e.g. src/clean.mk includes further files. In order
729         to make this work there are two solutions:
730         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
731           run configure on them. This way they can use
732           'include $(srcdir)/port-clean.mk'
733         - always include clean.mk by the Makefile at the same level. To avoid
734           that `make clean` tries to include and build Makefile.dep the
735           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
736           implemented, because now even `make uninstall` doesn't create
737           Makefile.in. clean.mk could be eliminated by pasting it in
738           Makefile.in.
739
740         * debugger/mcs51/Makefile.in: build own objects from library sources
741         (SLIB, SDCC) in current directory
742
743         * configure, configure.in: renamed --disable-device-lib-build in
744         --disable-device-lib; added --enable-doc, the required tools are
745         searched by configure; added result message; the toolchain for the
746         belonging ports are now only built, if the port is enabled.
747
748         * support/regression/*: all output is written in directory gen, because
749         the fwk and ports directories don't livet in the build tree using vpath
750
751         * doc/sdccman.lyx: renamed --disable-device-lib-build to
752         --disable-device-lib, added --enable-doc, added section VPATH
753
754         * sim/ucsim/configure.in,
755         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
756         z80 are enabled by default
757
758 2006-04-24 Raphael Neider <rneider AT web.de>
759
760         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
761             to config word, "pic14_"-prefixed some extern functions
762           (pic14_emitConfigWord): emit __config directive(s) if assignment to
763             config word has been found
764         * src/pic/device.h: added prototypes
765         * src/pic/pcode.c: added "pic14_"-prefix where needed
766         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
767             fixup
768         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
769             words,
770           (pic14emitRegularMap): ignore config words,
771           (pic14createInterruptVect): moved generating __config directives away
772           (picglue): have __config directives emitted
773
774 2006-04-24 Borut Razem <borut.razem AT siol.net>
775
776         * doc/Makefile: sync with nightly build makefile
777
778 2006-04-24 Raphael Neider <rneider AT web.de>
779
780         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
781             registers that have not been assigned proper liveranges,
782             fixes #1469504 and #1474602,
783           (pCodeRegOptimizeRegUsage): fixed typo in comment
784
785 2006-04-24 Borut Razem <borut.razem AT siol.net>
786
787         * device/examples/main8051.c: deleted - it was removed from CVS
788           24.mar.2000 and after that modified 18.feb.2001, so it reappered
789           after the transition to Subversion
790         * src/SDCCalloc.h: deleted - it was removed  from CVS
791           3.feb.2001 and after that modified 18.feb.2001, so it reappered
792           after the transition to Subversion
793         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
794           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
795           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
796           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
797
798 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
799
800         * as/asx8051.dsp: added mcs51/strcmpi.h
801         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
802         * as/hc08/aslink.h: updated lnksect prototype
803         * as/hc08/asm.h,
804         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
805         * as/hc08/asmain.c,
806         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
807           (newdot): handle A_ABS
808         * as/hc08/asout.c,
809         * as/mcs51/asout.c (outarea): output address
810         * as/hc08/lkaomf51.c,
811         * as/mcs51/lkaomf51.c: disabled unused array UsageType
812         * as/hc08/m08pst.c,
813         * as/mcs51/i51pst.c,
814         * as/z80/z80pst.c: "ABS" is not A_OVR
815         * as/hc08/lkarea.c (newarea): read a_addr,
816           (lnkarea): added codemap array, sort absolute areas to the front,
817            combine all GSINITx/GSFINAL,
818           (find_empty_space, allocate_space): new functions,
819           (lnksect): return next address, handle absolute sections
820         * as/mcs51/lkarea.c (newarea): read a_addr,
821           lnksect2 prototype changed,
822           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
823           (find_empty_space, allocate_space): new, factored out of lnksect2,
824           (lnksect2): return next address, handle absolute sections
825         * as/hc08/lkhead.c,
826         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
827         * as/hc08/lklibr.c (addfile, fndsym),
828         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
829           index out of range and detect both '\' and '/'
830         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
831         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
832           regression tests (ds390 cannot return bool yet)
833         * doc/sdccman.lyx: changed version number, document changed --no-peep,
834           document critical interrupts on z80, document changed SDCC define
835         * src/asm.c (_asxxxx_mapping): fixed .org directive,
836           (_a390_mapping): added .org directive
837         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
838           (genMultOneByte): fixed warnings
839         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
840           ones
841         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
842         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
843           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
844         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
845         * src/pic16/main.c: removed newReg prototype
846         * src/pic16/pcode.c,
847         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
848           warnings
849         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
850           ones
851         * src/pic16/ralloc.c
852         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
853           to fix warnings
854         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
855           from short to PIC_OPTYPE
856         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
857         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
858           optype from short to PIC_OPTYPE
859         * src/port.h: made int_size unsigned to fix warnings
860         * src/SDCC.y: fixed warning on MSVC
861         * src/SDCCicode.c (getArraySizePtr): return unsigned int
862         * src/SDCCopt.c (convertToFcall): fixed warnings
863         * src/SDCCsymt.h: removed double prototype for genSymName
864         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
865           offset int to fix warnings
866
867 2006-04-22 Borut Razem <borut.razem AT siol.net>
868
869         * doc/sdccman.lyx, */Makefile, */Makefile.in:
870           references to CVS replaced with Subversion
871
872 2006-04-21 Borut Razem <borut.razem AT siol.net>
873
874         * doc/sdccman.lyx, */Makefile, */Makefile.in:
875           references to CVS replaced with Subversion
876
877 2006-04-19 Borut Razem <borut.razem AT siol.net>
878
879         * src/version.awk: adapted for svn
880         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
881           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
882           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
883           /binutils-avr/etc/*.vi, *.jin: removed all properties
884           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
885
886 2006-04-19 Borut Razem <borut.razem AT siol.net>
887
888         * CVS to Subversion migration completed
889
890 2006-04-18 Borut Razem <borut.razem AT siol.net>
891
892         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
893           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
894
895 2006-04-17 Borut Razem <borut.razem AT siol.net>
896
897         * device/include/Makefile.in: added pic/*.inc to the installation
898
899 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
900
901         * support/regression/collate-results.py: fixed output in case of
902         a valdiag error
903         * support/regression/generate-cases.py: fixed splitting of pathnames
904         with dots
905         * as/hc08/lklibr.c (addfile),
906         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
907
908 2006-04-11 Raphael Neider <rneider AT web.de>
909
910         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
911         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
912         * src/pic16/pcode.c (assignValnums): fixed #1460578
913
914 2006-04-11 Raphael Neider <rneider AT web.de>
915
916         * device/lib/pic/libdev/*.c,
917         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
918           fixes #1468739, enables compilation in --std-c99 mode
919         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
920
921 2006-04-11 Raphael Neider <rneider AT web.de>
922
923         * src/pic/device.c (find_device): removed debug output
924           (list_valid_pics): enabled verbose listing of supported devices
925         * device/include/stdbool.h: define bool as char for pic14/16 as well
926
927 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
928
929         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
930
931 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
932
933         * .version: bumped version to 2.5.6
934         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
935
936 2006-04-06 Raphael Neider <rneider AT web.de>
937
938         * .version: bumped version to 2.5.6 (pic14 ABI changed)
939         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
940         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
941           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
942             pic14_constructAbsMap
943           (pic14printPublics): declare absolute global symbols as global
944           (pic14createInterruptVect),
945         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
946           (newReg): assume new registers unused, use correct name in
947             hashtable (reg->name instead of name), more debugLog output
948         * src/pic/device.h (PIC_device): added fields for verbose output
949         * src/pic/device.c: moved device definition to pic14devices.txt,
950             added routines for runtime parsing of pic14devices.txt,
951             added support for second config word
952         * src/pic/main.c (_process_pragma): removed #pragma maxram,
953           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
954           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
955           (_pic14_parseOptions): moved pCodeInitRegisters here
956           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
957         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
958           (pCodeInitRegisters): rewrapped comments, perpared new approach to
959             handling the pseudo stack
960         * device/lib/Makefile.in: ignore failures in objects-pic16,
961         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
962         * device/lib/pic/NEWS: document new dependency on picXXX.lib
963         * device/lib/pic/Makefile.subdir,
964         * device/lib/pic16/Makefile.subdir: improved clean rules
965         * device/lib/pic/libdev/: NEW, pic14 device libraries
966         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
967         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
968         * device/include/Makefile.in: create subdir and install pic14 headers
969         * device/include/pic/p16f_common.inc: removed unused declarations
970         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
971             PICs from inc2h.pl v1.6,
972             replaced BIT_AT macros with struct declarations
973         * device/include/pic/pic14devices.txt: definition of supported devices,
974             all above improvements contributed by Zik Saleeba, thanks
975         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
976         * support/scripts/sdcc.nsi: also install pic14 device libraries and
977             headers
978
979 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
980
981         * device/include/mcs51/c8051f410.h: added interrupt numbers,
982         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
983           thanks to Charles Olds
984
985 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
986
987         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
988
989 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
990
991         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
992         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
993         * support/regression/bug1464657.c: added, new test
994
995 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
996
997         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
998           version number
999
1000 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1001
1002         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
1003           --no-peep and --peep-file <file> are used don't use default rules but
1004           do use the <file>
1005
1006 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1007
1008         * src/mcs51/gen.c (genCall): fixed bug 1457608
1009
1010 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1011
1012         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
1013         changes seem to cause (trigger?) problems with the build system.
1014
1015 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
1016
1017         * src/SDCCpeeph.c (operandsLiteral): new, added,
1018           (callFuncByName): inserted operandsLiteral
1019         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
1020
1021 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1022
1023         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
1024         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
1025
1026 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1027
1028         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
1029           implemented patch 1120823 Thanks to Willy De la Court (normal
1030           interrupts need an interrupt number now if they are made critical),
1031           and enabled nesting of critical functions though not for gbz80
1032           (genCritical, genEndCritical): added functions
1033           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
1034         * src/z80/mappings.i: added "ei" to all mappings
1035
1036 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1037
1038         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
1039         submitted by the Debian SDCC maintainer Aurelien Jarno:
1040         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
1041         archive with gcc 4.1 on mips and wrote the patch"
1042
1043 2006-03-16 Raphael Neider <rneider AT web.de>
1044
1045         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
1046           the left operand is shorter than the result (c* = lit-c* + int),
1047           fixes bug #1450796
1048         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
1049           OP_SYMBOL
1050
1051 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1052
1053         * src/.version: increased version number to 2.5.5
1054         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
1055         linking is done manually in pic16 port's _linkEdit,
1056         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
1057         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
1058         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
1059         allocate asmop as AOP_ACC,
1060         (aopForRemat): added parameter 'bool result' in function declaration,
1061         (pic16_aopGet): return AOP_ACC when accessing WREG,
1062         (pic16_popGetTempReg): minor modification,
1063         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
1064         'pic16_allocWithIdx',
1065         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
1066         calling function in absolute addresses,
1067         (genAssign): take into account AOP_ACC asmop,
1068         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
1069         * src/pic16/pcoderegs.c: some debug functions and lines added,
1070         * src/pic16/ralloc.c (decodeRegType): added but commented out,
1071         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
1072         register too,
1073         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
1074         call to allocReg, not by manually allocating a new one,
1075         (pic16_assignRegisters): now before going through the register
1076         allocating functions mark all registers as free. This eliminates some
1077         side effects resulting from peephole parser done earlier in the backbone
1078
1079 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
1080
1081         * src/SDCCicode.c (geniCodeLogic),
1082         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
1083
1084 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
1085
1086         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
1087           (genSend): bugfix, do not allocate and free twice,
1088           (shiftRLong): handle partially overlapping aops
1089         * support/regression/tests/bitopcse.c: fixed warning redefined idata
1090
1091 2006-03-08 Borut Razem <borut.razem AT siol.net>
1092
1093         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
1094           for pic16
1095
1096 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
1097
1098         * support/regression/tests/bug1409955.c: new, added
1099         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
1100         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
1101           (aopForSym, aopOp): increment asmop.allocated if reused,
1102           (freeAsmop): decrement asmop.allocated and check for zero instead of
1103           using asmop.freed,
1104           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
1105           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
1106            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
1107            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
1108            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
1109            genSignedRightShift, genRightShift, genDataPointerGet,
1110            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
1111            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
1112             in reverse order from allocation,
1113           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
1114             added swappedLR to keep track
1115         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
1116           pdata & code for GCC, z80, gbz80 & hc08
1117         * support/regression/tests/zeropad.c: moved defines to testfwk.h
1118
1119 2006-03-08 Raphael Neider <rneider AT web.de>
1120
1121         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
1122
1123 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
1124
1125         * device/include/mcs51/c8051f410.h: new SiLabs mcu
1126         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
1127         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
1128
1129 2006-03-06 Borut Razem <borut.razem AT siol.net>
1130
1131         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
1132           made the linker quiet
1133
1134 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1135
1136         * src/pic16/gen.c (genPcall): fixed bug #1443644
1137         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
1138         which dumps before the function entry point a data byte which represents
1139         the number of the local variables used by the specified function, added
1140         'xinst' for initial support for Extended Instruction Support,
1141         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
1142         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
1143         port->fun_prefix anymore (may change later),
1144         (genFunction, genEndFunction): do not store/restore local registers for
1145         _main (this should take care the --main-return command line option in
1146         the future),
1147         (genOr): removed some legacy pic-port instructions,
1148         * src/pic16/genarith.c (genAddLit): re-enabled old code because
1149         performing operations with SFR's causes data to be written more than
1150         once to each SFR. Perhaps SFRs should be handled in special cases...
1151         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
1152         pcode.h
1153         * src/pic16/main.c (_process_pragma): stack bound checking did not take
1154         into account for stack starting position,
1155         (struct OPTIONS pic16_optionsTable): added command line argument
1156         --extended or -y for Extended Instruction Support,
1157         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
1158         (deassignLRs): *** perhaps the most important change, old 'for' code
1159         (commented out for reference), didn't account for some registers which
1160         were left marked 'not free' after a pointer operation. The change
1161         reduces register usage a lot in some cases
1162
1163 2006-03-04 Borut Razem <borut.razem AT siol.net>
1164
1165         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
1166           _clean
1167         * support/regression/tests/bug-524697.c: decreased array size for
1168           mcs51 to fit into the internal RAM
1169         * support/regression/Makefile.in: a little bit more verbose
1170
1171 2006-03-03 Borut Razem <borut.razem AT siol.net>
1172
1173         * support/regression/fwk/lib/testfwk.c,
1174           support/regression/fwk/include/testfwk.h: introduced function
1175           _prints(), nonrecursive _printn(), call _initEmu() from main()
1176         * support/regression/ports/gbz80/support.asm,
1177           support/regression/ports/ucz80/support.asm,
1178           support/regression/ports/z80/support.asm,
1179           support/regression/ports/ds390/support.c,
1180           support/regression/ports/hc08/support.c,
1181           support/regression/ports/host/support.c,
1182           support/regression/ports/mcs51/support.c,
1183           support/regression/ports/xa51/support.c: added empty _initEmu()
1184           function
1185         * support/regression/ports/pic16/gpsim.cmd,
1186           support/regression/ports/pic16/spec.mk,
1187           support/regression/ports/pic16/support.c,
1188           support/regression/Makefile.in: added pic16 regression test
1189
1190 2006-03-01 Raphael Neider <rneider AT web.de>
1191
1192         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
1193           genConstPointerGet): use safe way of generating MOVFF to cover
1194             literals as well as registers, fixes bug #1440527
1195         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
1196             dereference
1197           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
1198             more correctly, fixes bug #1232186
1199           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
1200         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
1201             gplink guess the correct processor in more cases, applied patch
1202             from Till Riedel attached to and fixing bug #1436552
1203
1204 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1205
1206         * support/regression/tests/array.c: added, contains check for #1434401
1207         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
1208
1209 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
1210
1211         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
1212         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
1213         * device/include/mcs51/c8051f326.h,
1214         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
1215         * device/include/mcs51/c8051f000.h,
1216         * device/include/mcs51/c8051f018.h,
1217         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
1218           PCON_IDLE,PCON_STOP and added sfr16 definitions
1219
1220 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1221
1222         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
1223           genGetWord): fixed bug 1409955
1224
1225 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1226
1227         * device/include/hc08/mc68hc908gp32.h,
1228         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
1229
1230 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
1231
1232         * src/SDCCast.c (constExprValue): return NULL if not a value
1233         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
1234         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
1235         * support/regression/tests/bitfields.c: enabled signed bitfield for all
1236
1237 2006-02-13 Borut Razem <borut.razem AT siol.net>
1238
1239         * src/regression/ptrarg.c: added, fails due to bug #1430967
1240         * src/regression/Makefile: ptrarg.c added, ...
1241
1242 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
1243
1244         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
1245         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
1246
1247 2006-02-11 Borut Razem <borut.razem AT siol.net>
1248
1249         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
1250           print "Processor: xxx" message to stdout only if --verbose
1251
1252 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1253
1254         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
1255         * support/regression/tests/bug1426356.c: added
1256         * support/regression/tests/bitfields.c: removed 2 tests
1257
1258 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1259
1260         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
1261         * device/include/mcs51/c8051f330.h,
1262         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
1263           PCON_IDLE,PCON_STOP and added sfr16 definitions
1264         * device/lib/_divsint.c,
1265         * device/lib/_divuint.c,
1266         * device/lib/_divulong.c,
1267         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1268           register bank bug for small stackauto
1269
1270 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1271
1272         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1273
1274 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1275
1276         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1277         * all.dsp: corrected several bin paths
1278         * device/include/mcs51/c8051f120.h,
1279         * device/include/mcs51/c8051f300.h,
1280         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1281           to PCON_IDLE,PCON_STOP
1282         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1283         * device/lib/printf_large.c (output_float): fixed bug 1388703
1284         * support/regression/tests/bug1057979.c: added test for bug 1388703
1285
1286 2006-02-08 Raphael Neider <rneider AT web.de>
1287
1288         * src/pic/pcode.c (pciTRIS): fixed typo,
1289           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1290           (LinkFlow): fixed handling of flows that end in a call,
1291           (ReuseReg): perform safety check earlier
1292         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1293             to work with flows at the beginning of a pBlock,
1294             fixes #1426557 (Symbol not previously defined),
1295           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1296             usage information
1297           (RemoveUnusedRegisters): update register usage info
1298         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1299             created, reuse existing ones instead
1300         * src/pic/gen.c (genPcall): fixed #1424719
1301
1302 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1303
1304         * link/z80/lkmain.c,
1305         * link/z80/lklex.c,
1306         * link/z80/lkdata.c,
1307         * link/z80/aslink.h: fixed build on current cygwin:
1308         replaced getline() by lk_getline()
1309
1310 2006-02-01 Borut Razem <borut.razem AT siol.net>
1311
1312         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
1313           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
1314           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
1315           src/regression/bool1.c, src/regression/bool2.c,
1316           src/regression/bool3.c, src/regression/call1.c,
1317           src/regression/compare.c, src/regression/compare10.c,
1318           src/regression/compare2.c, src/regression/compare3.c,
1319           src/regression/compare4.c, src/regression/compare5.c,
1320           src/regression/compare6.c, src/regression/compare7.c,
1321           src/regression/compare8.c, src/regression/compare9.c,
1322           src/regression/configword.c, src/regression/for.c,
1323           src/regression/inline.c, src/regression/mult1.c,
1324           src/regression/nestfor.c, src/regression/or1.c,
1325           src/regression/pointer1.c, src/regression/ptrfunc.c,
1326           src/regression/rotate1.c, src/regression/rotate2.c,
1327           src/regression/rotate3.c, src/regression/rotate4.c,
1328           src/regression/rotate5.c, src/regression/rotate6.c,
1329           src/regression/rotate7.c, src/regression/string1.c,
1330           src/regression/struct1.c, src/regression/sub.c,
1331           src/regression/sub2.c, src/regression/switch1.c,
1332           src/regression/while.c, src/regression/xor.c,
1333           src/regression/create_stc, src/regression/simulate,
1334           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
1335           regression tests
1336         * src/regression/gpsim_assert.h: added
1337
1338 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
1339
1340         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
1341         ((void (code *) (void)) 0) ();
1342         * as/hc08/aslex.c,
1343         * as/hc08/aslink.h,
1344         * as/hc08/asm.h,
1345         * as/hc08/asmain.c,
1346         * as/hc08/lkdata.c,
1347         * as/hc08/lklex.c,
1348         * as/hc08/lkmain.c,
1349         * as/mcs51/aslex.c,
1350         * as/mcs51/aslink.h,
1351         * as/mcs51/asm.h,
1352         * as/mcs51/asmain.c,
1353         * as/mcs51/lkdata.c,
1354         * as/mcs51/lklex.c,
1355         * as/mcs51/lkmain.c,
1356         * as/z80/aslex.c,
1357         * as/z80/asm.h,
1358         * as/z80/asmain.c: fixed build on current cygwin:
1359         replaced getline() by as_getline()
1360
1361 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
1362
1363         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
1364         declarator in the symbol chain
1365         * src/SDCCsymt.h,
1366         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
1367         parameter list for function pointers
1368         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
1369         * support/regression/tests/bug-716242.c: added
1370
1371 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
1372
1373         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
1374         offset if possible
1375         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
1376
1377 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
1378
1379         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
1380         inifinitely recurseable, added static
1381         * support/regression/tests/bug-1408066.c: added
1382
1383 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
1384
1385         * src/SDCCicode.h,
1386         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
1387         renamed, added possibility to create "postLoopLbl"-labels
1388         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
1389         newiTempLoopHeaderLabel
1390         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
1391         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
1392         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
1393         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
1394         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
1395         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
1396         (basicInduction): fixed bug #136564, made static,
1397         (loopInduction): changed parameter of basicInduction, made static,
1398         (addPostLoopBlock): added
1399         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
1400         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
1401         findLoopEndSeq
1402         * support/regression/tests/bug-136564.c: added
1403         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
1404         --std-sdcc99 to LIBSDCCFLAGS
1405
1406 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
1407
1408         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
1409         while loop
1410         * support/regression/tests/bug-1406131.c: added
1411
1412 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
1413
1414         * src/SDCCast.c (decorateType): fix promotion of unary minus
1415         * src/SDCCsymt.c (computeType): beautified
1416         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
1417         (valUnaryPM, valComplement): fix sign and promotion,
1418         (valNot): ANSI: result type is int (SDCC: unsigned char)
1419         * support/regression/tests/uminus.c: speedup by removing superflous
1420         test case 'int'
1421         * support/regression/tests/onebyte.c: added promotion and signedness
1422         tests for unary minus
1423         * support/regressions/tests/bug-477927.c: disable warning about
1424         uninitialized variables
1425         * support/regression/tests/not.c: added
1426
1427 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
1428
1429         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
1430         * src/mcs51/gen.c (gen51Code): show final register usage after
1431         fillGaps in asm with --i-code-in-asm
1432         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
1433         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
1434         incUsed, rliveClear, adjustIChain): made static,
1435         (setFromRange): excluded because it's unused,
1436         (findPrevUseSym, markWholeLoop): added,
1437         (findPrevUse): rewritten; fixes bug 895992; now a complete search
1438         through all branches of predecessors enables sdcc to emit the warning
1439         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
1440         (rlivePoint): made static, added parameter emitWarnings which is only
1441         true during the first run out of two,
1442         (findRecursiveSucc, findRecursivePred): removed,
1443         (computeLiveRanges): made static, added parameter emitWarnings,
1444         (dumpIcRlive): added for debugging only
1445         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
1446         removed prototype of setFromRange()
1447         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
1448         in call of computeLiveRanges()
1449         * support/regression/tests/bug-895992.c: added
1450         * support/regression/tests/bug-971834.c: added
1451         * support/valdiag/tests/bug-895992.c: added
1452         * support/valdiag/tests/bug-971834.c: added
1453
1454 2005-12-18 Raphael Neider <rneider AT web.de>
1455
1456         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
1457           (genUnpackBits): improved code for direct operands,
1458           (genPackBits): improved code for literal assignment to bitfields
1459             and for direct destination operands (no FSR indirection),
1460             prevented redundant AND, fixes #1362800,
1461           (AccLsh): added parameter to disable masking of the result
1462         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
1463           skip instructions with side-effects (like incfsz),
1464           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
1465         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
1466         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
1467           fixes #1375263
1468
1469 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
1470
1471         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
1472         volatile variables as spill location
1473
1474 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
1475
1476         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
1477         replacing literals
1478         * support/regression/tests/bug-1376320.c: added
1479
1480 2005-12-08 Raphael Neider <rneider AT web.de>
1481
1482         * src/pic/device.c: renamed is_shared to pic14_is_shared
1483         * src/pic/gen.c (genIfx): re-enabled handling of sbits
1484         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
1485           (is_valid_identifier): added for above workaround
1486
1487 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
1488
1489         * device/lib/Makefile.in: fixed to enable port-specific-objects
1490         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
1491           char, thanks Hubert Sack
1492         * doc/sdccman.lyx: documented --xstack-loc,
1493           elaborated a bit more on interrupts and pitfalls,
1494           removed "setjmp/longjmp unsupported",
1495           documented some unsupported C99 features
1496         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
1497         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
1498           if, thanks Hubert Sack
1499         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
1500         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
1501           make make_library
1502         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
1503           regression tests can report resource usage (rfe 700441)
1504         * support/regression/collate-results.py: report resource usage
1505         * support/regression/ports/ds390/spec.mk,
1506         * support/regression/ports/hc08/spec.mk,
1507         * support/regression/ports/mcs51/spec.mk,
1508         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
1509         * support/regression/ports/ds390/uCsim.cmd,
1510         * support/regression/ports/hc08/uCsim.cmd,
1511         * support/regression/ports/mcs51/uCsim.cmd,
1512         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
1513         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
1514           library, use the default one
1515         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
1516           building the library
1517
1518 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
1519
1520         * config.dsp: added dependency on .version and configure_vc.awk
1521         * device/include/setjmp.h: updated for --stack-auto and --xstack
1522         * device/include/mcs51/at89c51snd1c.h: corrected line endings
1523         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
1524         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
1525         * device/lib/libsdcc.lib: added _setjmp
1526         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
1527           (decorateType): fixed bug 1372851,
1528           (optimizeGetHbit): fixed warning
1529         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
1530           array initialisation
1531         * support/regression/tests/bug1057979.c: added test for bug 1358192
1532         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
1533
1534 2005-12-03 Borut Razem <borut.razem AT siol.net>
1535
1536         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
1537           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
1538
1539 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1540
1541         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
1542         createIval): implement symbol independant "flexible array member",
1543         (createIvalCharPtr): implemented flexible array initialisation with a
1544         string
1545         * src/SDCCsymt.c (copyStruct): removed,
1546         (getSize): fixed misleading comment,
1547         (getAllocSize): removed, the additional allocation size is now in
1548         sym->flexArrayLength,
1549         (checkStructFlexArray): new, syntax checks for flexible array members,
1550         (compStructSize): added syntax checks for "flexible array members"
1551         (copyStruct): removed,
1552         (copyLinkChain): removed inefficient fix for bug 770487
1553         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
1554         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
1555         symbol->flexArrayLength
1556         * src/SDCCerr.c,
1557         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
1558         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
1559         * support/regression/tests/structflexarray.c: added
1560         * support/valdiag/tests/structflexiblearray.c: added
1561
1562 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1563
1564         * src/SDCCast.c (decorateType): fixed bug 1368489
1565         * support/Util/SDCCerr.c,
1566         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
1567
1568 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1569
1570         * device/include/mcs51/at89c51snd1c.h: added file submitted by
1571           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
1572
1573 2005-11-27 Borut Razem <borut.razem AT siol.net>
1574
1575         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
1576           support/cpp2/mkdeps.h: added command line option
1577           -obj-ext=<extension> to SDCPP to define object file externion, used
1578           for generation of make dependencies (-M)
1579         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
1580
1581 2005-11-26 Borut Razem <borut.razem AT siol.net>
1582
1583         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
1584           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
1585           added pic and pic16 libraries
1586
1587 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1588
1589         * device/include/float.h: Corrected typo in prototype of __fsgt
1590
1591 2005-11-25 Borut Razem <borut.razem AT siol.net>
1592
1593         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
1594           added creation of model-mcs51-stack-auto libraries
1595
1596 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
1597
1598         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
1599         and fields-list too
1600         * src/SDCCast.c (createIvalArray): removed obsolete comment
1601
1602 2005-11-24 Borut Razem <borut.razem AT siol.net>
1603
1604         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
1605           added missing device/lib/mcs51/crt*.asm sources
1606
1607 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
1608
1609         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
1610
1611 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
1612
1613         * device/lib/_fs2schar.c,
1614         * device/lib/_fs2sint.c,
1615         * device/lib/_fs2slong.c: optimized inline asm
1616
1617 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1618
1619         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1620           Better handling of floats between -1.0 and 0.0.
1621
1622 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1623
1624         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
1625           (the missing "if"s prohibited removal of redundant labels)
1626
1627 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1628
1629         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1630           Properly convert floats between -1.0 and 0.0 to long, int, and char
1631           types (max integer value of negative floats tends to zero).
1632         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1633           Removed changes made so to work properly with floats between
1634           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
1635           and _fs2char.c
1636
1637 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1638
1639         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
1640         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
1641         (genCast) cosmetic change
1642         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
1643         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
1644         from mcs51
1645         * support/regression/tests/bitfields (testSignedBitfields): added
1646
1647 2005-11-18 Borut Razem <borut.razem AT siol.net>
1648
1649         * sdcc/device/lib/Makefile.in: remove all unnecessary files
1650         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
1651           introduced SILENT option to make building of pic16 libraries less
1652
1653 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1654
1655         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1656           Now they work properly with floats between -1.0 and 0.0
1657         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
1658
1659 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1660
1661         * src/SDCCicode.c (printOperand): added missing else
1662
1663 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1664
1665         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
1666         reformatted for better readability
1667         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
1668         signed bitfields
1669
1670 2005-11-17 Borut Razem <borut.razem AT siol.net>
1671
1672         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
1673           introduced SILENT option to make building of pic16 libraries less
1674           verbose - used for nightly snapshot build
1675         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
1676           available on Win32 platforms.
1677         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
1678           medium, large, pic and pic16
1679
1680 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1681
1682         * device/lib/printf_large.c: Temporary patch for bug 1358192:
1683           printf("%f"...) sets fraction to zero.
1684
1685 2005-11-16 Raphael Neider <rneider AT web.de>
1686
1687         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
1688           fixes #1357221
1689         * src/pic/gen.c (genIfx): implemented for CARRY bit
1690         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1691           to generic pointers, fixes #1357332,
1692           (pic16_movLit2f): NEW,
1693           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1694
1695 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1696
1697         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1698
1699 2005-11-11 Raphael Neider <rneider AT web.de>
1700
1701         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1702         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1703           compute pointer's type from operand,
1704           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1705           improved single bit reads, fixes bug #1353379
1706
1707 2005-11-09 Borut Razem <borut.razem AT siol.net>
1708
1709         * support/scripts/sdcc.nsi: added lib/pic to the package
1710
1711 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1712
1713         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1714
1715 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1716
1717         * support/regression/tests/bug1348008.c: added
1718         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1719         * support/regression/tests/bug1337835.c: updated comment
1720
1721 2005-11-06 Borut Razem <borut.razem AT siol.net>
1722
1723         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1724           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1725           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1726           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1727           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1728           dynamic construction of cl_error_class and derivates - 2.nd try
1729
1730 2005-11-05 Borut Razem <borut.razem AT siol.net>
1731
1732         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1733           bug, which caused Bus Errors on sparc solaris
1734
1735 2005-11-04 Borut Razem <borut.razem AT siol.net>
1736
1737         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1738           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1739           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1740           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1741           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1742           and derivates to resolve the initialization problem on OSX
1743
1744 2005-11-02 Borut Razem <borut.razem AT siol.net>
1745
1746         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1747           corrected typo - #include <winsock2.h>
1748
1749 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
1750
1751         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
1752           (_asxxxx_mapping): added org directive for future enhancements
1753
1754 2005-11-01 Borut Razem <borut.razem AT siol.net>
1755
1756         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1757           enabled sockets on WIN32
1758         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
1759
1760 2005-10-31 Borut Razem <borut.razem AT siol.net>
1761
1762         * support/regression/generate-cases.py: escape backslashes in {testcase}:
1763           WIN32 backslash path delimiters should be escaped when used in C strings
1764         * support/regression/tests/bitfields.c: exclude failing assertions for
1765           __CYGWIN32__ and __MINGW32__ hosts
1766
1767 2005-10-30 Borut Razem <borut.razem AT siol.net>
1768
1769         * src/SDCCutil.c: corrected double comparison typo
1770
1771 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
1772
1773         * device/lib/medium/Makefile: added for new memory model medium
1774         * device/include/asm/mcs51/features.h: updated for medium/pdata
1775         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
1776           added Multiply & Accumulate sbit's and MAC0_PAGE define
1777         * device/include/mcs51/c8051f300.h: added sfr16 definitions
1778         * device/include/mcs51/c8051f310.h: added sfr16 definitions
1779         * device/lib/_mullong.c: update for medium model
1780         * device/lib/incl.mk: added medium model
1781         * doc/sdccman.lyx: documented medium model
1782         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
1783         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1784         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1785         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1786           (allocParms): set SCLS and OCLS to pdata for medium model
1787         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1788           for pdata,
1789           (powof2): return <0 if not power of 2
1790         * src/avr/gen.c (genBitWise): use updated powof2
1791         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1792           (shiftR2Left2Result): small optimization in setup, save acc when storing,
1793           (shiftLLeftOrResult): use B if necessary
1794         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1795         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1796         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1797         * support/regression/Makefile.in: added test-mcs51-medium
1798         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1799
1800 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1801
1802         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1803         specifier unsigned
1804         * device/lib/time.c (mktime): fixed bug 1334315
1805
1806 2005-10-28 Raphael Neider <rneider AT web.de>
1807
1808         * device/include/pic/p16f_common.inc: added common declarations
1809         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1810
1811 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1812
1813         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1814           (aopPutUsesAcc): added to predict accumulator use,
1815           (assignResultValue): save acc if necessary,
1816           (genMinusDec): store result if indirectly addressed,
1817           (genDivOneByte):  save acc if necessary,
1818           (movLeft2Result): bugfix if left already in acc,
1819           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1820             attention to accumulator use (esp. pdata),
1821           (genReceive): receive pdata correctly
1822         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1823         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1824
1825 2005-10-27 Raphael Neider <rneider AT web.de>
1826
1827         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1828
1829 2005-10-27 Raphael Neider <rneider AT web.de>
1830
1831         * .version: changed version to 2.5.4
1832         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1833         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1834           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1835             arithmetics support routines
1836         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1837         * device/lib/Makefile.in: also create installdir for pic
1838
1839         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1840           pic14 port as well
1841         * src/pic/device.c (dump_sfr): rewritten to delegate register
1842           placement to the linker (use `extern sym' rather than sym EQU addr),
1843           (validAddress): fixed to check last specified address
1844         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1845           (popGetLit): truncate literal value to 8 bit,
1846           (popGet): moved assert to more appropriate place
1847           (popGetExternal): create pCode operand from and mark the according
1848             symbol as being `extern'
1849           (popGetAddr): added sanity check on immediate's offset, provide
1850             GPOINTER tag on demand
1851           (aopPut): fixed for immediates,
1852           (mov2w_op): move operand's address or contents to WREG (depending on
1853             operand type), safer variant of mov2w,
1854           (movwf,call_libraryfunc): NEW, handy abbreviations,
1855           (get_argument_pcop,get_return_val_pcop,pass_argument,
1856           get_returnvalue): interface for accessing function parameters and
1857             return values,
1858           (assignResultValuei,genRet): use new parameter/return value interface
1859           (pic14_getDataSize): back to old version handling generic pointers,
1860           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1861             provided implementation and/or fixed old one,
1862           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1863             calls, removed legacy 8051 reference code
1864           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1865           (loadSignToC): NEW, move the operands sign bit to CARRY,
1866           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1867             genRightShiftSigned, accepts negative shift counts,
1868           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1869           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1870             generic pointers, __data pointers and __code pointers,
1871           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1872             and signed bitfields, limit bitfields to 8 bit,
1873           (genDataPointerGet): fixed number of bytes read,
1874           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1875           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1876             pointers to constant data are no longer assumed to point to __code
1877             space, removed invalid pointer types,
1878           (bitpatternFromVal): retrieve the PICs representation of an integer
1879             or float literal,
1880           (genDataPointerSet): fixed assigning to po_immediate operands,
1881           (genGenPointerSet): implemented as library call,
1882           (genIfx): fixed incorrect condition,
1883           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1884             provide GPOINTER tag according to destination's storage class,
1885           (genCast): added code to handle casting to generic pointers, added
1886             sign-/zero extension of the result
1887           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1888         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1889         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1890           extend the result
1891         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1892           address/register resides in the shared banks
1893           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1894             put all variables into separate sections (have the linker arrange
1895             them)
1896           (picglue): put init code and interrupt handlers in separate sections
1897         * src/pic/main.c: added port specific options table, modified to PORT
1898           structure to make GPOINTERs 3 byte, added pic14_options
1899           (_pic14_do_link): private linking routine (update paths to libraries,
1900             add libsdcc.lib by default)
1901         * src/pic/main.h: declare pic14_options
1902         * src/pic/pcode.c: fixed instructions i/o relations,
1903           (RegCond): reverted to correct version,
1904           (newpCodeOpLit): truncate literals to 8 bit,
1905           (genericPrint): added debug output,
1906           (getRegFromInstruction): fixed for various operand types, simplified
1907           (BuildFlow): fixed broken handling of isntructions with labels
1908           (LinkFlow): start at last instruction in flow (skip trailing comments),
1909             pass the flow on to the next instruction after CALL
1910           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1911           (insertPCodeInstruction): fixed inserting after a skip instruction,
1912           (DoBankSelect): fixed for labeled instructions
1913           (OptimizepBlock): honor --nopeep switch
1914           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1915         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1916         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1917           (pCodeOptime2pCodes): allow disabling this optimization via
1918             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1919             but is still buggy), started implementation of a dataflow based
1920             pCode optimization (CSE + dead code elimination)
1921           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1922         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1923           names are independant of the stack location and therefore portable across
1924           devices
1925
1926 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1927
1928         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1929           (selectSpil): fixed bug 1337835 by not spilling bit variables
1930         * support/regression/tests/bug1337835.c: added test for this bug
1931         * src/mcs51/peeph.def: restart after rule 3.c,
1932           addded rules 263.x to optimize loading constants
1933
1934 2005-10-26 Raphael Neider <rneider AT web.de>
1935
1936         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1937         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1938           (genAssign): emit warning when casting literals to generic pointer
1939             type, also applies when taking the address of a fixed variable,
1940           (genCast): improved casting to generic pointers
1941         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1942           extern variables, added verbose error message
1943         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1944
1945 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1946
1947         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1948         carry must be complemented too
1949         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1950         could be emitted by genMinus
1951         * src/SDCCval.c (constVal): fixed bug 1305065
1952
1953 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1954
1955         * src/SDCCast.c (addCast): added promotion for bit variables
1956         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1957         promotion casts + optimisation
1958         (optimizeGetWord): fix warning 'i' might be used uninitialized
1959         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1960         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1961
1962 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1963
1964         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1965         all chars are promoted to int; promotion should be handled in SDCCast.c
1966
1967 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1968
1969         * device/lib/_strcmp.c: Fixed bug 1326457
1970
1971 2005-10-11 Raphael Neider <rneider AT web.de>
1972
1973         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1974         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1975
1976 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1977
1978         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1979         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1980
1981 2005-10-04 Raphael Neider <rneider AT web.de>
1982
1983         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1984           device/lib/pic16/pics.all: added pic18f1320
1985         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1986
1987 2005-09-30 Raphael Neider <rneider AT web.de>
1988
1989         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1990         * src/pic16/devices.inc: NEW, provides device descriptions
1991         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1992
1993 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1994
1995         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1996           GETHBIT
1997
1998 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1999
2000         * doc/sdccman.lyx: updated Highest Order Bit documentation,
2001           documented Any Order Bit, Higher Order Byte and Higher Order Word
2002         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
2003         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
2004           (optimizeGetAbit): new, to get any bit, not only the high bit,
2005           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
2006           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
2007           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
2008           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
2009             RIGHT_OP: also try GETBYTE, GETWORD optimization,
2010             GETABIT, GETBYTE, GETWORD: decorate them,
2011           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
2012           (ast_print): added GETABIT, GETBYTE, GETWORD
2013         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
2014         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
2015           (geniCodeBinary): new generic binary icode,
2016           (ast2iCode): added GETABIT, GETBYTE, GETWORD
2017         * src/port.h: updated comment for PORT.hasExtBitOp
2018         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
2019           (genGetByte): new, to get a single byte,
2020           (genGetWord): new, to get a word from a long,
2021           (gen51Code): added GETABIT, GETBYTE, GETWORD
2022         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
2023
2024 2005-09-23 Raphael Neider <rneider AT web.de>
2025
2026         * configure.in, configure: have device/lib/pic configured
2027         * device/lib/Makefile.in: added model-pic14
2028         * device/lib/clean.mk: added pic/ to clean rule
2029         * device/lib/pic: added rudimentary pic14 library providing support
2030           functions for multiplication/division/generic pointer access
2031         * src/SDCCopt.c (convilong): mark support functions as extern
2032           for pic14 port as well
2033         * src/pic/gen.c (genMult): added assertions,
2034           (genpic14Code): emit warning on unhandled iCodes
2035         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
2036         * src/pic/pcode.c (pCodeOpCopy),
2037         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
2038           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
2039           SFR_REGISTER}), made safe for future extensions
2040         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
2041           instructions even if preceeded by SKIP instructions (also remove
2042           them); removed unused code
2043         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
2044           prevents leaving parts of the structure uninitialized after copying
2045
2046 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
2047
2048         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
2049           ago by me
2050         * support/regression/tests/addsub.c: added test for the bug
2051
2052 2005-09-21 Raphael Neider <rneider AT web.de>
2053
2054         * device/include/pic16/pic18f1220.h,
2055           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
2056         * device/lib/pic16/Makefile.rules: added missing opening paren
2057         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
2058           are provided in genutils.c,
2059           (genUminusFloat,genUminus,genCmpEq): added asserts on different
2060           operand/result sizes,
2061           (genCmp): assert on NULL pointers first, then check deref'ed values
2062         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
2063           result size
2064
2065 2005-09-18 Raphael Neider <rneider AT web.de>
2066
2067         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
2068           as these are now unused,
2069           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
2070         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
2071           local, avoids uninitialized pointer dereference on r->name
2072         * src/pic16/ralloc.c (newReg): fixed indentation
2073
2074 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
2075
2076         * src/SDCCval.c (constVal): fixed bug 730366
2077         * support/Util/SDCCerr.c,
2078         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
2079
2080 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
2081
2082         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
2083
2084 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
2085
2086         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
2087
2088 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2089
2090         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
2091           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2092         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
2093           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2094         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
2095         * packihx/packihx.c (hexDigit): made c unsigned char
2096         * as/mcs51/lklibr.c (fndsym),
2097         * link/z80/lkgb.c (gb),
2098         * link/z80/lklibr.c (fndsym),
2099         * link/z80/lkrloc.c (relr),
2100         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
2101         * src/SDCC.lex (checkCurrFile, process_pragma),
2102         * src/SDCCglue.c (spacesToUnderscores),
2103         * src/SDCCmain.c (setParseWithComma, processFile),
2104         * src/asm.c (tvsprintf, printCLine),
2105         * src/avr/gen.c (emitcode, aopPut),
2106         * src/ds390/gen.c (emitcode),
2107         * src/hc08/gen.c (emitcode, emitinline),
2108         * src/mcs51/gen.c (emitcode, genInline),
2109         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2110           tokenizeLineNode),
2111         * src/pic/ralloc.c (debugLog),
2112         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2113           tokenizeLineNode),
2114         * src/pic16/ralloc.c (debugLog),
2115         * src/z80/main.c (_process_pragma):
2116            made all ctype.h function calls safe
2117         * src/SDCCopt.c: include math.h for fabs
2118         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
2119           and used them throughout the code to make ctype.h function calls safe
2120         * src/ds390/main.c (asmLineNodeFromLineNode),
2121         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
2122         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
2123            unsigned char*
2124         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
2125           (newpCodeAsmDir): made ctype.h function calls safe
2126         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
2127           pic16_emitcode):  made lbp unsigned char*
2128         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
2129           (pic16_newpCodeAsmDir): made ctype.h function calls safe
2130         * src/xa51/gen.c (emitcode),
2131         * src/z80/gen.c (_emit2): made lbp unsigned char*
2132         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
2133            char*
2134
2135 2005-09-05 Raphael Neider <rneider AT web.de>
2136
2137         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
2138           access bank splitpoint
2139
2140 2005-09-05 Raphael Neider <rneider AT web.de>
2141
2142         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
2143
2144 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
2145
2146         * .version: changed to version 2.5.3
2147         * doc/sdccman.lyx: changed version to 2.5.3,
2148           documented --codeseg and --constseg and pragma codeseg and constseg,
2149           documented bit parameters (reentrant) and bit returning
2150         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
2151            currFunc->recvSize, but is this ok for all ports?
2152           (ast2iCode): result of ~ on unsigned char must be cast to int for
2153            bool to work
2154         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
2155           function pointers in bit space
2156         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
2157           (processFuncArgs): call port.reg_parm() with reentrancy info
2158         * src/port.h,
2159         * src/avr/main.c,
2160         * src/ds390/main.c,
2161         * src/hc08/main.c,
2162         * src/pic/main.c,
2163         * src/pic16/main.c,
2164         * src/xa51/main.c,
2165         * src/z80/main.c: port.reg_parm prototype extended with
2166           "bool reentrant" parameter
2167         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
2168           options.stackAuto for allocating bit register parameters
2169         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
2170           (genSend): set BitBankUsed if it is,
2171           (selectRegBank): factored out of genCall for use in genPcall,
2172           (genCall): removed redundant dtype assignmen, use selectRegBank,
2173           (genPcall): handle returning in Carry properly, save in F0 if needed,
2174           (genReceive): handle bit register parameters
2175         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
2176           (mcs51_assignRegisters): enable bit registers for all reentrant
2177            functions and don't set BitBankUsed unconditionally
2178         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
2179         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
2180         * support/regression/tests/funptrs.c: added tests for BOOL and for return
2181
2182 2005-08-27 Borut Razem <borut.razem AT siol.net>
2183
2184         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
2185         ppc-osx (Darwin) does not support -u option. It seems that it is
2186         supported only on Linux - GNU cp
2187
2188 2005-08-25 Borut Razem <borut.razem AT siol.net>
2189
2190         * sim/ucsim/gui.src/serio.src/Makefile.in,
2191           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
2192           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2193           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
2194           install and strip, since the strip at /usr/ccs/bin should be used
2195           on solaris
2196
2197 2005-08-24 Borut Razem <borut.razem AT siol.net>
2198
2199         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
2200
2201 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
2202
2203         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
2204         ffffffffu
2205
2206 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
2207
2208         * as/mcs51/aslink.h: completed lkrloc.c prototypes
2209         * as/mcs51/lkmain.c (link_main): fixed warning
2210         * device/include/stdbool.h: ds390 has no advanced bit support yet
2211         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
2212         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
2213         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
2214           and updated their macros
2215         * src/SDCCval.c (constVal): updated comment for renamed b_long
2216
2217 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
2218
2219         * as/mcs51/asdata.c: changed ctype['['] to BINOP
2220         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
2221           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
2222           (oprio): set priority for '['
2223         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
2224            and adb_24_bit
2225         * as/mcs51/asm.h: added defines R_BIT and S_BIT
2226         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
2227         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
2228         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
2229           added overlayable BIT_BANK area
2230         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
2231           (summary2): explain 'T' in legenda
2232         * as/mcs51/lkrloc.c: replaced old K&R style,
2233           (relr): added R_BIT processing,
2234           (errmsg): added "Bit-addressable relocation error",
2235           (adb_bit): added for converting from byte- to bit-addressable space,
2236           (adb_24_bit): added for converting from byte- to bit-addressable space
2237         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
2238            used in reentrant functions now even as return value
2239         * device/lib/_gptrput.c (_gptrput): removed obsolete code
2240         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
2241           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
2242         * src/SDCCglobl.h: added indicator BitBankUsed
2243         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
2244            the bit registers b0-b7
2245         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
2246           (geniCodeCast): fixed bug 1263853,
2247           (geniCodeLogicAndOr): put result in bool or char,
2248           (geniCodeReceive): added parameter func for accessing the return type,
2249           (geniCodeFunctionBody): pass func to geniCodeReceive
2250         * src/SDCCmain.c: added indicator BitBankUsed
2251         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
2252         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
2253           (checkSClass): don't put automatic bool/bit on stack,
2254           (checkFunction): removed check on function cannot return bit
2255         * src/SDCCsymt.h: added newBoolLink prototype
2256         * src/mcs51/gen.c (rb1regs): added bit registers,
2257           (movc): created for assigning to carry,
2258           (pushReg, popReg): created for pushing registers,
2259           (sameRegs): check both AOP_REG and AOP_CRY types,
2260           (aopOp): handle bit registers,
2261           (aopPut): optimization no self-assign,
2262           (saveRegisters): push reg->base (bits) only once for bit registers,
2263            and use pushReg,
2264           (unsaveRegisters): pop reg->base only once and use popReg,
2265           (assignResultValue): added parameter func and return in carry for bits,
2266           (genIpush): optimization no reload in A if not changed,
2267           (genSend): bit parameters in reentrant functions are passed in bit
2268            registers by first assigning to bits in B, then save registers and
2269            copy B to bits,
2270           (genCall): handle returning in Carry properly, save it in F0 if needed,
2271           (genPcall): updated assignResultValue call, this is not safe yet for bit
2272            returning function !!!
2273           (genFunction): don't generate equ's for bit registers and use pushReg,
2274           (genEndFunction): take care of bit returning functions and use popReg,
2275           (genRet): return bit in Carry,
2276           (genIfx): optimize bit registers and other directly addressable bits,
2277           (genReceive): updated assignResultValue call
2278         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2279           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2280            registers when using stack-auto
2281         * src/mcs51/ralloc.c (_G): added allBitregs,
2282           (regs8051): added the bit registers,
2283           (createStackSpil): use macro IS_BIT,
2284           (getRegBit): added to allocate a bit register, else spill,
2285           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2286           (updateRegUsage): factored out to ease stepping while debugging,
2287           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2288            also allocate bit registers,
2289           (fillGaps): handle bit registers,
2290           (findAllBitregs): added to create bit vector with all bit registers,
2291           (mcs51_allBitregs): returns this bit vector,
2292           (mcs51_assignRegisters): when using stack-auto use bit registers for
2293            passing parameters and creating local variables
2294         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2295
2296 2005-08-22 Borut Razem <borut.razem AT siol.net>
2297
2298         * device/lib/Makefile.in: replaced find option -or with -o
2299           to make it run on solaris
2300
2301 2005-08-22 Raphael Neider <rneider AT web.de>
2302
2303         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
2304           fixes #1265442 (crash on Solaris)
2305
2306 2005-08-20 Borut Razem <borut.razem AT siol.net>
2307
2308         * configure, configure.in: added tests for libsocket and libnsl libraries,
2309           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
2310           from support/regression/Makefile.in
2311         * support/regression/Makefile.in: added
2312         * device/lib/pic16/Makefile.common.in: force make to use bash shell
2313         * sim/ucsim/libtool: regenerated on sparc-solaris
2314         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2315           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
2316           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
2317           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
2318           sparc-solaris, which doesn't use GNU ld linker
2319         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
2320         * as/Makefile: find on sparc-solaris does not support -maxdepth option
2321
2322 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
2323
2324         * src/mcs51/peeph.def: updated comments
2325
2326 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2327
2328         * device/lib/_gptrget.c,
2329         * device/lib/_gptrput.c: slightly shorter
2330         * doc/sdccman.lyx: incremented version
2331         * src/mcs51/peeph.def: moved peephole comments to the line of first
2332           change to better keep line correlation, reanimated 186.e
2333         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
2334
2335 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2336
2337         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
2338           David Saxton with quotes around file name.
2339
2340 2005-08-15 Borut Razem <borut.razem AT siol.net>
2341
2342         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
2343           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
2344           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
2345           make tests run on x86_64 platform
2346
2347 2005-08-13 Raphael Neider <rneider AT web.de>
2348
2349         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
2350           as it might be executed DURING a build (parallel make is wonderful)
2351
2352 2005-08-13 Raphael Neider <rneider AT web.de>
2353
2354         * device/lib/Makefile.in (port-specific-objects-pic16):
2355           revert to cp $(PORT)/bin/*.* $(PORTDIR)
2356         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
2357           dependency
2358         * device/lib/pic16/Makefile.rules: build subdirs before creating
2359           the library, removed builddir rule, create $(builddir) early in
2360           recurse rule, use empty recurse rule for leaf directories
2361         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
2362           mkdir errors (race condition), removed duplicate suffix "hex"
2363           from clean rules
2364         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
2365         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
2366           prevents mkdir -p from aborting on Alpha
2367
2368 2005-08-12 Raphael Neider <rneider AT web.de>
2369
2370         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
2371           db-statements in order to allow for arrays of pointers in code
2372           sections to be placed without interspersed 0-padding, fixes
2373           bug #1256215
2374         * (emitStatistics): fixed division by zero for pic18f1220
2375         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
2376           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
2377         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
2378         * (pic16_pCodeConstString): keep track of already emitted string
2379           literals to prevent "duplicate definitions of symbol _str_NR"
2380         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
2381           debug message
2382         * device/lib/Makefile.in: ignore failing PIC16 library builds
2383         * device/lib/pic16/Makefile: do not build if gputils are missing
2384         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
2385
2386 2005-08-10 Raphael Neider <rneider AT web.de>
2387
2388         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
2389           my last commit)
2390
2391 2005-08-10 Raphael Neider <rneider AT web.de>
2392
2393         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
2394           Rokas' patch to add the new fixed point type "__fixed16x16"
2395         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
2396           functions for __fixed16x16 arithmetics
2397         * device/lib/pic16: reimplemented the build system to support
2398           a separate build directory, better handling of libio (create
2399           the library in a separate subdir for each architecture) and
2400           easier configuration (centralized in Makefile.common)
2401
2402 2005-08-07 Raphael Neider <rneider AT web.de>
2403
2404         * src/pic16/gen.c (genrshTwo): fixed sign extension
2405         * src/pic16/device.c: added pic18f2320, 4220 and 4320
2406         * device/include/pic16/pic18f2220.h: changed some bit definitions,
2407           added T0CONbits
2408         * device/include/pic16/pic18f4220.h: NEW, header for
2409           pic18f4220 and pic18f4320
2410         * device/include/pic16/pic18fregs.h: added new devices,
2411           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
2412         * device/include/pic16/signal.h: resolved name clashes
2413           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
2414           to also allow testing for interrupt enable bits, added
2415           comments on how to use the macros
2416         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
2417         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
2418           register definitions for the devices
2419         * device/lib/pic16/pics.all: added new devices
2420         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
2421           allocated memory
2422         * device/lib/pic16/libc/stdlib/memfree: do not count
2423           the block header as free memory
2424         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
2425           simplified and added missing end-of-blocklist-marker
2426           (reported by Peter Onion, fixes #1252814)
2427         * (_mergeHeapBlock): fixed loop condition
2428         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
2429           len==0, restructured code
2430         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
2431           up a bit, reduced bitfield accesses, prevent endless loops
2432           in case of heap corruption
2433         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
2434           "unreferenced arguments/must return a value" warnings
2435         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
2436           replaced BAUDREG with SPBRG
2437         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
2438           device/lib/pic16/debug/gstack/gstack.c: replaced
2439           _naked, _asm, _endasm with __naked, __asm, __endasm
2440
2441 2005-08-05 Raphael Neider <rneider AT web.de>
2442
2443         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
2444           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
2445
2446 2005-08-05 Borut Razem <borut.razem AT siol.net>
2447
2448         * device/lib/Makefile.in: added missing ';'
2449         * configure: removed ^M characters
2450
2451 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2452
2453         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
2454           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
2455           License
2456
2457 2005-08-04 Borut Razem <borut.razem AT siol.net>
2458
2459         * configure.in: pic16 libraries build 2nd try - enable running
2460           configure in device/lib/pic16
2461         * configure: regenerated from configure.in
2462         * device/lib/Makefile.in: create $(PORT)/bin directory
2463
2464 2005-08-03 Raphael Neider <rneider AT web.de>
2465
2466         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
2467           to get/set values via pointers
2468         * (genUnpackBits,genPackBits): changed detection of
2469           ptr->bitfield vs. sym.bitfield, fixed access via generic
2470           pointers, removed dead (wrong) code for multibyte bitfields
2471         * (genNearPointerGet, genGenPointerGet): removed useless code,
2472           fixed bitfield detection, fixes #1250594
2473         * (genNearPointerSet): removed useless code
2474         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
2475           and introduced macro pic16_emitpcode that conditionally emits
2476           the origin of the following pCode (useful for debugging SDCC)
2477         * src/pic16/pcode.c: changed (and disabled) some debug outputs
2478         * (createDefmap): fixed handling of LFSR for --optimize-df
2479
2480 2005-08-02 Borut Razem <borut.razem AT siol.net>
2481
2482         * device/lib/Makefile.in: pic16 libraries build enabled since
2483           gputils-0.13.2 are now localy installed at sourceforge's compile farm
2484
2485 2005-08-02 Raphael Neider <rneider AT web.de>
2486
2487         * src/pic16/gen.c (genPackBits): removed deprecated warning
2488         * (genGenPointerSet): fixed bitfield detection
2489
2490 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2491
2492         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
2493
2494 2005-07-31 Raphael Neider <rneider AT web.de>
2495
2496         * device/lib/pic16/libdev/pic18f458.c,
2497           device/include/pic16/pic18f458.h: added missing T0CONbits
2498
2499 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2500
2501         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
2502
2503 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
2504
2505         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
2506
2507 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2508
2509         * device/include/mcs51/at89c51ed2.h: added.
2510
2511 2005-07-23 Raphael Neider <rneider AT web.de>
2512
2513         * src/pic/gen.h: added emitpcode macro for debugging
2514         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
2515           and replace by macro adding debug information on demand
2516         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
2517         * (gencjne): tried to fix; replaced with correct (slower) code
2518         * (gen{Unp,P}ackBits): fixed single bit access
2519         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
2520         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
2521           previous instruction
2522         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
2523           register has to be handled with care (forbidding movement
2524           of assignments/uses, removing assignments completely, ...)
2525         * (pCodeOptime2pCodes): make use of regIsSpecial
2526         * added lots of debugging output (commented out)
2527         * src/pic/rallloc.c (deassignLRs): prevent operand registers
2528           from being reused as result UNLESS it is known to work
2529
2530 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
2531
2532         * support/Util/dbuf.h: include <stddef.h> for size_t
2533         * .version: changed to version 2.5.2
2534
2535 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2536
2537         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
2538
2539 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2540
2541         * src/hc08/gen.c (genMinus): fixed bug #1241835,
2542           (genModOneByte): removed needless psha/pula
2543
2544 2005-07-22 Raphael Neider <rneider AT web.de>
2545
2546         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
2547           have PIC14 handled like PIC16, fixes broken pic14 linker calls
2548         * src/pic/gen.c (resolveIfx): do not "invent" labels
2549         * (genSkipc): changed to positive logic
2550         * (genSkipCond): removed as no longer needed
2551         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
2552           backport from PIC16
2553         * (genLeftShift): check operands are in different registers
2554         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
2555           INCF does not update CARRY...
2556         * src/pic/main.c: fixed _linkCmd
2557         * src/pic/pcode.c (unlinkpCode): added inactive code
2558         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
2559           alive (do not assign result and operand overlapping registers)
2560
2561 2005-07-22 Raphael Neider <rneider AT web.de>
2562
2563         * src/pic/device.c (dump_sfr): replaced register declaration with
2564           call to emitSymbolToFile() to avoid duplicate symbols
2565         * (assignRelocatableRegisters): do not declare external symbols
2566         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
2567           right (take size of type, not etype)
2568         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
2569         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
2570         * (packRegsForAccUse): disabled assignment of WREG as
2571           the result reg to prevent occurence of just fixed #1235003,
2572           fixes #1242954
2573         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
2574           symbols (avoids duplicate symbols in .asm file)
2575         * (pic14emitRegularMap): use emitSymbolToFile()
2576         * src/pic/gen.c (aopOp): fixed spillLocation handling
2577         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
2578         * (genDataPointerSet): removed unneccessary variables/output
2579
2580 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
2581
2582         * as/mcs51/lkarea.c: enlarged codemap for banked memory
2583         * device/lib/mcs51/crtbank.asm: added # to 0x0F
2584
2585 2005-07-21 Raphael Neider <rneider AT web.de>
2586
2587         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
2588           architecture cannot handle them efficiently, fixes bug #1235003
2589         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
2590           check for empty sets before using them (fixes bug #1232190)
2591
2592 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
2593
2594         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
2595           (lnksect2): generate warnings for memory overlap
2596         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
2597           constseg to set the name of these segments so you can instruct the linker
2598           to place them in banks
2599         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
2600         * src/SDCCglobl.h: added MODEL_HUGE to enum,
2601           added code_seg and const_seg to options
2602         * src/SDCCglue.c (emitMaps): use options.const_seg,
2603           (createInterruptVect): put interrupt vectors in segment HOME,
2604           (glue): put HOME before static segment and put the main glue in HOME,
2605           (glue): use options.code_seg
2606         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
2607         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
2608           these segments so you can instruct the linker to place them in banks
2609           (linkEdit): use code_loc for HOME segment which should be the first
2610           segment in code memory now
2611         * src/SDCCmem.c: fixed more stuff like bug 1238386
2612         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
2613           (changePointer): don't change function pointers to code pointers for
2614           banked functions,
2615           (compareType): added exceptional check for banked function pointers
2616         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
2617         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
2618           after static in code memory
2619         * src/mcs51/gen.c: added aopLiteralLong prototype,
2620           (aopForSym): use getSize for functions,
2621           (genCall): generate banked calls over one trampoline __sdcc_banked_call
2622           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
2623           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
2624           the segment,
2625           (genPcall): use call for literal function pointers and generate banked
2626           calls over the one trampoline so there's only one place for the user to
2627           modify according to his/hers hardware,
2628           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
2629           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
2630         * src/mcs51/main.c: added keyword banked,
2631           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
2632         * support/Util/SDCCerr.c,
2633         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
2634           needed for passing the bank and address to the trampoline
2635         * device/lib/mcs51/crtbank.asm: added for bankswitching
2636         * device/lib/mcs51/Makefile: added crtbank
2637
2638 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2639
2640         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
2641           for fields at offset 0 of a struct or union as reported
2642           on 2005-07-07 in the developer mailing list.
2643
2644 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
2645
2646         * src/SDCCmem.c: fixed bug 1238386
2647
2648 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2649
2650         * src/mcs51/peeph.def: added labelrefcounting for peepholes
2651           (patch #1144962), added peephole 300, enabled 259.x
2652         * doc/sdccman.lyx: removed screenshot and provided link instead
2653
2654 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2655
2656         * doc/sdccman.lyx: added section about debugging with ddd
2657         * doc/figures/ddd_example.eps: screenshot of debugging session
2658
2659 2005-07-04 Raphael Neider <rneider AT web.de>
2660
2661         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
2662           like CODE pointers, fixes #1115683
2663         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
2664           call, fixes bugs #1232211, #1228110,
2665           fixed wrong casts to pCodeFlow from pCodeInstructions
2666
2667 2005-07-04 Raphael Neider <rneider AT web.de>
2668
2669         * src/pic/gen.c (popGet): changed assert to allow for
2670           bit operands
2671         * (popGetAddr): changed signature to provide
2672           an additional index, patched all call sites
2673         * (genCmpEq): handle literal-like operands correctly
2674         * (genAddrOf): added sanity checks on __code/__data pointers
2675         * (genAssign): added handling of symbols from __code section
2676         * (gencjne): do not generate code for comparisons whose result
2677           is neither stored nor used, fixes bug #1171114
2678         * (AccLsh, AccRsh): operate on operand instead of WREG
2679         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
2680           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
2681           by known count
2682         * rewrote complete shift-by-literal logic, commented unused
2683           functions out
2684         * (genConstPointerGet): get multiple bytes (if result size > 1),
2685           fixed handling of non-immediate addresses
2686         * (genPointerGet): handle CODE pointers like CONST pointers
2687         * (genpic14Code): insert C-SRC lines as Cource-pCodes
2688         * ({aop,op}_isLitLike): NEW, single place to decide whether an
2689           operand is to be treated as a literal or not
2690         * (mov2w,genPcall,genCmpEq),
2691           src/pic/genarith.c: use aop_isLitLike() to decide between
2692           literal/register contents
2693         * (addSign): added missing offset
2694         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2695           only emit comment in debug-mode,
2696           use {aop,op}_isLitLike throughout the file
2697         * src/pic/glue.c: fix initializers for pointers (work in progress)
2698         * src/pic/pcode.c (get_op): honor index on _const symbols
2699         * ({reset,dump}pCodeStatistics): NEW, estimate code size
2700         * (dumppBlock): added pCode size estimation
2701         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2702           check for IS_SYMOP before OP_SYMBOL'ing
2703         * fixed indentation, compacted switch-statements
2704         * (allocReg): find free register and allocate it instead of
2705           allocating new registers all the time
2706         * (deassignLRs): prevent POINTER_GET's from being assigned the same
2707           registers as its operands (necessary only for multibyte GETs)
2708
2709 2005-07-01 Raphael Neider <rneider AT web.de>
2710
2711         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2712           debugging .asm-output macros FENTRY + FEXIT
2713         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2714           way... I wonder...
2715         * (emitpComment): NEW, printf to pCode
2716         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2717           offset handling
2718         * (popGetAddr): NEW, variant of popGet to access an immediates
2719           high(er) bytes instead of the n'th byte of memory they reference,
2720           replaced popGet with popGetAddr where neccessary
2721         * (genDataPointerGet): reactivated and fixed implementation
2722         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2723           accesses
2724         * (genDataPointerSet): fixed multibyte assignments
2725         * (genpic14Code): fixed --i-code-in-asm handling
2726         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2727         * (genPlus): fixed index-out-of-bounds error
2728         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2729         * src/pic/ralloc.c: added debugging output macro FENTRY2
2730         * (spillThis): fixed indentation, enbraced for-body for clarity
2731         * (rematStr): commented out as now unused
2732         * (regTypeNum): commented out special spill case (overwrites
2733           arbitrary values)
2734         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2735
2736 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2737
2738         * doc/sdccman.lyx: documented sfr16/sfr32,
2739           added example for using storage class with function pointers
2740         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2741
2742 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2743
2744         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
2745         * device/lib/_itoa.c,
2746         * device/lib/_ltoa.c: optimized codesize
2747         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
2748           but don't know how to suppress the double warning.
2749         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
2750         * support/Util/SDCCerr.c,
2751         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
2752
2753 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
2754
2755         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
2756           fixed old K&R prototypes
2757         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
2758         * device/lib/_gptrget.c,
2759         * device/lib/_gptrgetc.c,
2760         * device/lib/_gptrput.c: changed versions for new memory indicator values,
2761           also new versions for small generic pointers and banked generic pointers
2762         * src/port.h: added const_name
2763         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
2764         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
2765         * src/SDCCcse.c (findPrevIc): check all associative operators
2766         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
2767         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
2768         * src/SDCCmem.c: updated comments,
2769           set far-space to 0 for pdata, results in optimized code
2770         * src/SDCCmem.h: added macro CONST_NAME
2771         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
2772           moving the info into the highest bits, see also gptrget/gptrput
2773         * src/src.dsp: added sdcc.ico to project files
2774         * src/avr/gen.c (genCast): fixed bug 0x%d
2775         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
2776         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
2777           relation between ptr_type and DCL_TYPE,
2778           (genCast): fixed bug 0x%d
2779         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
2780           (CODE)" for const_name
2781         * src/hc08/gen.c (genCast): fixed bug 0x%d
2782         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
2783           (hc08_port): added "CONST (CODE)" for const_name
2784         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2785           (aopForRemat, adjustArithmeticResult): disconnected direct relation
2786           between ptr_type and DCL_TYPE,
2787           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2788           operand* and took AOP() inside function so sfr-ness can be checked,
2789           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2790           new prototype,
2791           (genFunction, genEndFunction): optimized stack setup,
2792           (genMinus): optimized for literals with ending zeroes (in bytes),
2793           (genCast): fixed bug 0x%d
2794         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2795           (mcs51_port): added "CONST (CODE)" for const_name
2796         * src/mcs51/peeph.def: made rule 226 more generic
2797         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2798         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2799         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2800         * src/z80/main.c (z80_port): added NULL for const_name,
2801           (gbz80_port): added NULL for const_name
2802         * support/regression/tests/bug663539.c,
2803         * support/regression/tests/sfr16.c: new tests
2804
2805 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2806
2807         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2808
2809 2005-06-24 Raphael Neider <rneider AT web.de>
2810
2811         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2812           corrected typos...
2813         * device/include/pic16/signal.h: added USBIF
2814           and SIG_USB
2815
2816 2005-06-24 Raphael Neider <rneider AT web.de>
2817
2818         * device/lib/pic16/libdev/pic18f2455.c,
2819           device/include/pic16/pic18f2455.h: NEW
2820         * device/include/pic16/pic18fregs.h,
2821           device/lib/pic16/pics.all,
2822           src/pic16/device.c: added 18f2455
2823         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2824           device/include/pic16/{pic18f[68][567].h,usart.h}:
2825           replaced MULTIPLE_USARTS define with more relaible
2826           compatibility sfrs (for USART access)
2827
2828 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2829
2830         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2831           and the output asm file line is printed on two lines.
2832
2833 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2834
2835         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2836           BGT, BLE, BHI, and BLS instructions
2837         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2838           genCmpEq): removed
2839         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2840           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2841           fixes bug #1216342
2842         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2843
2844 2005-06-15 Raphael Neider <rneider AT web.de>
2845
2846         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2847         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2848         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2849           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2850           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2851
2852 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2853
2854         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2855           Marcel Telka in bug #1215704
2856
2857 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2858
2859         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2860           located in shared memory bank.
2861
2862 2005-05-31 Raphael Neider <rneider AT web.de>
2863
2864         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2865           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2866           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2867
2868 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2869
2870         * device/lib/_strncpy.c: fixed the fix
2871
2872 2005-05-26 Raphael Neider <rneider AT web.de>
2873
2874         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2875           initializers with \0, bug #1208187
2876         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2877           intializers with \0, bug #1208187
2878
2879 2005-05-26 Raphael Neider <rneider AT web.de>
2880
2881         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2882           initializers with \0, bug #1208187
2883         * src/pic16/main.c (_process_pragma): added sanity checks
2884           for stack position and size, emit warnings when appropriate
2885
2886 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2887
2888         * device/lib/_strncpy.c: fixed not filling with \0
2889
2890 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2891
2892         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2893           createFunction),
2894         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2895           compound_statement),
2896         * src/SDCCsymt.h,
2897         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2898
2899 2005-05-24 Raphael Neider <rneider AT web.de>
2900
2901         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2902
2903 2005-05-24 Raphael Neider <rneider AT web.de>
2904
2905         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2906           TRISE definitions, closes bug #1162453
2907
2908 2005-05-22 Raphael Neider <rneider AT web.de>
2909
2910         * src/pic16/main.c (_process_pragma): check for missing
2911           arguments to pragmas code and udata
2912         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2913           consistency fixes to match other headers (thanks to Jim Paris)
2914         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2915
2916 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2917
2918         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2919
2920 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2921
2922         * support/regression/tests/bug1198642.c: new test
2923         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2924         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2925         * support/scripts/resource.h,
2926         * support/scripts/resource.rc,
2927         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2928         * support/scripts/sdcc.ico: added 32x32 icon
2929
2930 2005-05-18 Raphael Neider <rneider AT web.de>
2931
2932         * device/lib/pic16/libdev/pic18f*.c,
2933         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2934           keywords to "__sfr" and "__at (X)"
2935         * device/include/pic16/pic18fregs.h: added pic18f4520
2936         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2937           #1203088 (MPLAB compatibility)
2938
2939 2005-05-17 Raphael Neider <rneider AT web.de>
2940
2941         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2942         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2943         * device/lib/pic16/pics.all: added new devices
2944         * src/pic16/device.c: added support for pic18f4520
2945
2946 2005-05-16 Raphael Neider <rneider AT web.de>
2947         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2948         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2949         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2950           convenience function for bit access
2951
2952 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2953
2954         * device/lib/printf_large.c: fixed bug 1193299
2955         * support/regression/tests/bug1057979.c: added test %3.3s
2956
2957 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2958
2959         * device/include/mcs51/8051.h,
2960         * device/include/mcs51/8052.h: made parseable with lint
2961         * device/include/mcs51/lint.h: added include file for (sp)lint
2962         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2963         * doc/cdbfileformat.lyx,
2964         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2965
2966 2005-05-14 Raphael Neider <rneider AT web.de>
2967
2968         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2969         * device/lib/pic16/libc/stdlib/itoa.c (new)
2970         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2971         * device/lib/pic16/libio/Makefile: exclude subdir according to
2972           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2973         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2974         * src/pic16/gen.c (genFunction): prevent annoying warning
2975         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2976           nameclashes on BeOS
2977         * support/cpp2/cppmain.c (cpp_output_string): new
2978         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2979           fixes bug 1116802
2980
2981 2005-05-13 Borut Razem <borut.razem AT siol.net>
2982
2983         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2984
2985 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2986
2987         * .version: changed to version 2.5.1; back to bleeding edge development
2988
2989 2005-05-11 Borut Razem <borut.razem AT siol.net>
2990
2991         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2992           generate PDF version 1.3 documents
2993
2994 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2995
2996         * .version: changed to version 2.5.0
2997
2998 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2999
3000         * doc/sdccman.lyx: updated weblinks, index and smaller updates
3001
3002 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3003
3004         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
3005         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
3006         well as many smaller updates.
3007         * .version: changed to version 2.5.0-pre1
3008
3009 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3010
3011         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
3012
3013 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
3014
3015         * support/regression/tests/bug1185672.c: added
3016         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
3017           bug 1185672
3018         * src/mcs51/gen.c (genCall): added comments, made it look safer
3019         * src/mcs51/gen.c (genEndFunction): simplified
3020
3021 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
3022
3023         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
3024
3025 2005-04-14 Borut Razem <borut.razem AT siol.net>
3026
3027         * fixed bug 1045046 - SIGSEGV with really simple code?:
3028           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
3029           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
3030
3031 2005-04-14 Borut Razem <borut.razem AT siol.net>
3032
3033         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
3034           src/pic16/device.h: temporarily disabled experimental #inline pragma
3035           for 2.5.0 release
3036
3037 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
3038
3039         * device/include/z80/stdio.h,
3040         * device/include/z80/string.h: removed these highly incomplete files so
3041           SDCC can use the default ones in device/include/
3042
3043 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3044
3045         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
3046         gcc warning.
3047         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
3048         fix sdcpp warnings.
3049
3050 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3051
3052         * device/include/malloc.h: removed redundant __reentrant prototypes
3053         * device/lib/_mullong.c: added working xstack variant in asm (C version
3054           doesn't pass regression tests)
3055         * device/lib/bpx.c: used __data and made bpx char for mcs51
3056         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
3057           (createFunction): fixed bug with xstackPtr
3058         * src/SDCCcse.c: corrected comments
3059         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
3060           (killDeadCode, eBBlockFromiCode): removed unused code
3061         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
3062           corrected comments
3063         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
3064           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
3065           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
3066           (genModOneByte): fixed warning in MSVC
3067         * src/mcs51/main.c (): added comments
3068         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
3069
3070 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3071
3072         * src/SDCCmain.c (linkEdit): oops, changed one line too many
3073
3074 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
3075
3076         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
3077
3078 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
3079
3080         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
3081         characters arrays of larger size than the declared one.
3082
3083 2005-04-10 Borut Razem <borut.razem AT siol.net>
3084
3085         * src/pic/gen.c (genInline),
3086           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
3087           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
3088           (findNextInstruction), (findPrevInstruction),
3089           (findInstructionUsingLabel),
3090           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
3091         * src/pic/pcode.c (findLabel): added missing '\n'
3092         * src/src.dsp: added SDCCdwarf2.c to the project
3093
3094 2005-04-09 Borut Razem <borut.razem AT siol.net>
3095
3096         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
3097
3098 2005-04-08 Raphael Neider <rneider AT web.de>
3099
3100         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
3101           into the chain after a given one) and mergeDefmapSymbols (combine
3102           defmap entries for each symbol per pcode)
3103         * (createDefmap): have defmap entries merged in the end
3104         * (defmapReplaceSymRef): split defmap entries covering two accesses to
3105           a symbol before replacing one access type's symbol, merge symbols in
3106           the end (replacement symbol might already have an entry)
3107         * (assignValnums): keep reference to written WREG intact
3108
3109 2005-04-08 Raphael Neider <rneider AT web.de>
3110
3111         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
3112           Alpha)
3113
3114 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
3115
3116         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
3117         bytes
3118
3119 2005-04-07 Raphael Neider <rneider AT web.de>
3120
3121         * device/include/pic16/usart.h: added compatibility defines for
3122           devices with more than one USART
3123         * device/include/pic16/pic18f[68][567]20.h: activated above defines
3124
3125 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3126
3127         * device/lib/Makefile.in: updated for port specific include
3128
3129 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3130
3131         * support/regression/ports/mcs51/spec.mk: added mcs51 include
3132
3133 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3134
3135         * device/include/8051.h,
3136         * device/include/8052.h,
3137         * device/include/at89S8252.h,
3138         * device/include/at89c55.h,
3139         * device/include/at89x051.h,
3140         * device/include/at89x51.h,
3141         * device/include/at89x52.h,
3142         * device/include/mcs51reg.h,
3143         * device/include/reg51.h,
3144         * device/include/reg764.h,
3145         * device/include/regc515c.h,
3146         * device/include/sab80515.h: (re)moved these 12 files
3147         * device/include/mcs51/8051.h,
3148         * device/include/mcs51/8052.h,
3149         * device/include/mcs51/at89S8252.h,
3150         * device/include/mcs51/at89c55.h,
3151         * device/include/mcs51/at89x051.h,
3152         * device/include/mcs51/at89x51.h,
3153         * device/include/mcs51/at89x52.h,
3154         * device/include/mcs51/mcs51reg.h,
3155         * device/include/mcs51/reg51.h,
3156         * device/include/mcs51/reg764.h,
3157         * device/include/mcs51/regc515c.h,
3158         * device/include/mcs51/sab80515.h: and added them here
3159
3160 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
3161
3162         * device/include/stdarg.h: changed SDCC specific keywords to double
3163           underlined form.
3164         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
3165           mcs51 and ds390.
3166         * device/include/hc08/mc68hc908gp32.h,
3167         * device/include/hc08/mc68hc908jb8.h,
3168         * device/include/hc08/mc68hc908jkjl.h,
3169         * device/include/hc08/mc68hc908qy.h: fixed comments
3170         * device/include/mcs51/README: updated
3171         * device/include/mcs51/c8051f120.h: added PINRSF
3172         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
3173         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
3174           amidst code. Also inline is not supported.
3175
3176 2005-04-06 Raphael Neider <rneider AT web.de>
3177
3178         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
3179         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
3180           callers stack/frame pointers
3181
3182 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
3183
3184         * device/include/pic16/usart.h: added, missing in previous commit,
3185         * device/include/pic16/adc.h: fixed typo,
3186         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
3187         commit,
3188         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
3189         <p18fxxx.inc>
3190         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
3191         uninitialized because a bug appears with gplink
3192         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
3193         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
3194         complains for unrecognised option
3195
3196 2005-04-05 Raphael Neider <rneider AT web.de>
3197
3198         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
3199           structs as well (using memcpy)
3200         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
3201           on ISRs (GOTO has no label)
3202         * src/pic16/device.h: added OF_OPTIMIZE_DF
3203         * src/pic16/main.c: added compiler switch --optimize-df to enable the
3204           new data flow analysis/optimization
3205         * src/pic16/pcode.c: added (prototypes for and implementation of)
3206           dataflow analysis functions, fixed pCodeInstructions' inCond and
3207           outCond values, made RCALL a branch instruction
3208         * (pic16_unlinkpCode): keep C line if possible
3209         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
3210           C line moved if possible
3211         * (pic16_getRegFrompCodeOp): NEW, improved version of...
3212         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
3213           to use new pic16_getRegFrompCodeOp (works for more SFRs)
3214         * (pic16_BuildFlow): fixed skip instructions with label (did not start
3215           new flow)
3216         * (pic16_getJumptabpCode): NEW, needed in...
3217         * (LinkFlow): fixed handling of jumptables, calls and conditional
3218           branches
3219         * (pic16_InsertCommentAfter): NEW
3220         * (pic16_pCodeReplace): made verbose and flow preserving
3221         * (AnalyzeFlow): added call to data flow analysis
3222         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
3223         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
3224         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
3225
3226 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3227
3228         * src/SDCCast.c (decorateType): fixed bug #1105626
3229
3230 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
3231
3232         * device/include/asm/pic16/features.h,
3233         * pic18f*.h headers,
3234         * device/include/pic16/adc.h,
3235         * device/include/pic16/delay.h,
3236         * device/include/pic16/i2c.h,
3237         * device/include/pic16/malloc.h,
3238         * device/include/pic16/stdio.h,
3239         * device/include/pic16/stdlib.h,
3240         * device/include/pic16/string.h,
3241         * device/lib/pic16/libc/stdio/printf_tiny.c,
3242         * device/lib/pic16/libc/stdio/printf_small.c,
3243         * device/lib/pic16/libc/stdio/strmgpsim.c,
3244         * device/lib/pic16/libc/stdio/strmmssp.c,
3245         * device/lib/pic16/libc/stdio/strmusart.c,
3246         * device/lib/pic16/libc/stdio/vfprintf.c,
3247         * device/lib/pic16/libc/stdlib/ltoa.c,
3248         * device/lib/pic16/libc/stdlib/putchar.c,
3249         * device/lib/pic16/libc/stdlib/x_ftoa.c,
3250         * device/lib/pic16/libc/stdlib/memchrpgm.c,
3251         * device/lib/pic16/libc/stdlib/memchrram.c,
3252         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
3253         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
3254         * device/lib/pic16/libio/adc/adcbusy.c,
3255         * device/lib/pic16/libio/adc/adcread.c,
3256         * device/lib/pic16/libio/adc/adcsetch.c,
3257         * device/lib/pic16/libio/usart/ubaud.c,
3258         * device/lib/pic16/libio/usart/ubusy.c,
3259         * device/lib/pic16/libio/usart/udrdy.c,
3260         * device/lib/pic16/libio/usart/uopen.c,
3261         * device/lib/pic16/libio/usart/uputc.c,
3262         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
3263         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
3264         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
3265         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
3266         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
3267         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3268         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3269         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3270         specific keywords to double underlined form,
3271         * device/lib/pic16/libc/Makefile.rules,
3272         * device/lib/pic16/libsdcc/Makefile.rules,
3273         * device/lib/pic16/libm/Makefile,
3274         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3275         to compile with C standard set in Makefile.common
3276         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3277         rand.c and crc.c in compilation process,
3278         * device/lib/pic16/libsdcc/int/divuint.c,
3279         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3280         `c' from signed to unsigned,
3281         * device/lib/pic16/startup/crt0.c,
3282         * device/lib/pic16/startup/crt0i.c,
3283         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3284         keywords to double underlined form, bug fixes in _do_cinit function
3285         which prevented the correct initialization of the .idata segment,
3286         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3287         core to enter a infinite loop
3288         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3289
3290 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3291
3292         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3293
3294 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3295
3296         * device/include/Makefile.in: add support for hc08 subdirectory
3297         * device/include/hc08/: new subdirectory
3298         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3299         Lucas Loizaga, thanks!
3300         * device/include/hc08/mc68hc908qy.h,
3301         * device/include/hc08/mc68hc908gp32.h,
3302         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3303         their own directory. Changed internal macro names to use the compiler
3304         reserved namespace. Changed SDCC specific keywords to double
3305         underlined form.
3306         * device/include/math.h,
3307         * device/include/malloc.h,
3308         * device/include/stdarg.h,
3309         * device/include/stdbool.h
3310         * device/include/string.h,
3311         * device/include/tinibios.h,
3312         * device/include/ds400rom.h,
3313         * device/include/8051.h,
3314         * device/include/8052.h,
3315         * device/include/80c51xa.h,
3316         * device/include/at89c55.h,
3317         * device/include/at89S8252.h,
3318         * device/include/at89x51.h,
3319         * device/include/at89x52.h,
3320         * device/include/ds80c390.h,
3321         * device/include/reg764.h,
3322         * device/include/regc515c.h,
3323         * device/include/sab80515.h,
3324         * device/include/mcs51/c8051f000.h,
3325         * device/include/mcs51/c8051f018.h,
3326         * device/include/mcs51/c8051f020.h,
3327         * device/include/mcs51/c8051f040.h,
3328         * device/include/mcs51/c8051f060.h,
3329         * device/include/mcs51/c8051f120.h,
3330         * device/include/mcs51/c8051f300.h,
3331         * device/include/mcs51/c8051f310.h,
3332         * device/include/mcs51/c8051f320.h,
3333         * device/include/mcs51/c8051f330.h,
3334         * device/include/mcs51/c8051f350.h,
3335         * device/include/z180.h: Changed SDCC specific keywords to double
3336         underlined form.
3337
3338 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
3339
3340         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
3341         18F4455,
3342         * (pic16_assignConfigWordValue): disable testing of configuration
3343         register value with config mask,
3344         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
3345         function with port->fun_prefix,
3346         * (genFunction): when generating a naked interrupt function never
3347         create an absolute segment placed in interrupt vector address, place
3348         the actual interrupt function at IVA instead, when an interrupt
3349         function is generated with unspecified interrupt then do not create
3350         the absolute section,
3351         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
3352         code for generating a call to generic pointer get/put function with
3353         a call to function pic16_callGenericPointer(),
3354         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
3355         the call to the generic pointer get/put functions with prefixing the
3356         function name with port->fun_prefix,
3357         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
3358         * src/pic16/main.c (_process_pragma): prefix function with
3359         port->fun_prefix,
3360         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
3361         calling assembler, old 18Fxxxx macro is deprecated,
3362         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
3363         PC_ASMDIR in while condition,
3364         * (findInstruction): add PC_ASMDIR in while condition,
3365         * (buildCallTree): prefix main with port->fun_prefix,
3366         * (pic16_pCode2str): fixed bug that didn't emit the memory access
3367         identifier for variable with banked access in instructions BTFSS,
3368         BTFSC, BCF, BSF, BTG
3369         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
3370         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
3371         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
3372         perform optimization when enviroment variable NO_REG_OPT is set,
3373         * (insideLRBlock): NEW, return 1 if register is inside an
3374         INF_LOCALREGS block,
3375         * (RemoveRegFromLRBlock): remove a register that is completely
3376         eliminated by register optimization, but it is still left in local
3377         register store/restore in/from stack block,
3378         * (Remove2pcodes): after removing register, check to see if it
3379         should be removed from local register store/restore in/from stack
3380         block,
3381         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
3382         DUMMY_READ_VOLATILE,
3383
3384         * device/include/pic16/adc.h: minor prototype modifications and
3385         update,
3386         * device/include/pic16/malloc.h: added GPL notice various
3387         modifications,
3388         * device/include/pic16/stdint.h: NEW, standard header for ints
3389         * device/include/pic16/delay.h: NEW, header for delay functions,
3390         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
3391         delay1mtcy,
3392         * device/include/pic16/signal.h: NEW, header providing helper macros
3393         for implementing signal handlers,
3394         * device/include/pic16/stdio.h: added prototypes for functions,
3395         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
3396         prototypes for stdin and stdout, added macro PUTCHAR to
3397         automatically implement putchar function prototype,
3398         * device/include/pic16/usart.h: modified and updated USART library,
3399         * device/lib/pic16/libio/adc/,
3400         * device/lib/pic16/libio/i2c: some modifications to improve library
3401         performance,
3402         * device/lib/pic16/libc/stdio/: modifications for the new printf*
3403         family of functions,
3404         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
3405         family of functions and other sources,
3406         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
3407         of the PIC18Fxx[28] devices,
3408         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
3409         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
3410         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
3411         _do_cinit function, because the previous failed when local variables
3412         where not placed in the same memory bank,
3413         * device/lib/pic16/libsdcc/char/: various modifications to improve
3414         library performance,
3415         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
3416         information on the new functions of the c library and more...
3417
3418 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3419
3420         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
3421
3422 2005-03-26 Raphael Neider <rneider AT web.de>
3423
3424         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
3425           if condition == CARRY)
3426         * (genCmp): adapted to new genSkipc semantics
3427         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
3428           on rIfx (genCmp was broken)
3429
3430 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3431
3432         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
3433         * src/z80/main.c (_keywords[]),
3434         * src/SDCCglobal.h (struct options),
3435         * src/SDCC.y,
3436         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
3437         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
3438         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
3439         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
3440         always available in leading double underscore form. The C99 support is
3441         mostly missing, but it's a start.
3442         * support/regression/tests/bug-227710.c: fixed nonconforming use of
3443         reserved identifier "__data".
3444
3445 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
3446
3447         * src/mcs51/peeph.def: fixed bug 1170013
3448
3449 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
3450
3451         * device/include/mcs51reg.h: fixed bug 842007
3452
3453 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3454
3455         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
3456         last time.
3457
3458 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3459
3460         * src/port.h (struct PORT),
3461         * src/avr/ralloc.c (avr_assignRegisters),
3462         * src/avr/main.c,
3463         * src/ds390/ralloc.c (ds390_assignRegisters),
3464         * src/ds390/main.c,
3465         * src/hc08/ralloc.c (hc08_assignRegisters),
3466         * src/hc08/main.c,
3467         * src/mcs51/ralloc.c (mcs51_assignRegisters),
3468         * src/mcs51/main.c,
3469         * src/pic/ralloc.c (pic14_assignRegisters),
3470         * src/pic/main.c,
3471         * src/pic16/ralloc.c (pic16_assignRegisters),
3472         * src/pic16/main.c,
3473         * src/xa51/ralloc.c (xa51_assignRegisters),
3474         * src/xa51/main.c,
3475         * src/z80/ralloc.c (z80_assignRegisters),
3476         * src/z80/ralloc.h,
3477         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
3478         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
3479         * src/SDCCcse.h,
3480         * src/SDCCdflow.c (computeDataFlow),
3481         * src/SDCCdflow.h,
3482         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
3483         * src/SDCCloop.h,
3484         * src/SDCCcflow.c (*),
3485         * src/SDCCcflow.h,
3486         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
3487         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
3488         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
3489         immedDom() returning wrong block; probably fixes bug #1160833)
3490
3491 2005-03-20 Borut Razem <borut.razem AT siol.net>
3492
3493         * support/scripts/inc2h.pl: WIN32 port
3494
3495 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
3496
3497         * device/lib/makefile.in: added abs.c and labs.c
3498
3499 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
3500
3501         * device/include/stdint.h: added
3502         * device/lib/abs.c: added
3503         * device/lib/labs.c: added
3504         * device/include/stdlib.h: added abs() and labs() prototypes
3505         * device/lib/libsdcc.lib: added abs and labs
3506         * device/include/float.h,
3507         * device/lib/_fsmul.c,
3508         * device/lib/printf_fast.c,
3509         * device/lib/printf_tiny.c: updated comments
3510
3511 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3512
3513         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
3514         bug #1164313
3515
3516 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3517
3518         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
3519         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
3520
3521 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
3522
3523         * device/lib/printf_large.c: removed inline assembly for portability and
3524           readability. Use printf_fast if speed or size are more important.
3525         * src/pic16/gen.c: removed conditions around use of DEBUGpc
3526         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
3527
3528 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
3529
3530         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
3531         prevent compiler warning
3532
3533 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
3534
3535         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
3536         moved to level 0 and declared as static. Also they are explicit
3537         placed in access bank. This was necessery because some times they
3538         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
3539         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
3540         optimizations. Currently only compare to unsigned char is implemented,
3541         * src/pic16/gen.c: added fReturnIdx array,
3542         * (struct resolvedIfx) is moved to gen.h and made public,
3543         * (struct _G): added sregsAlloc and sregsAllocSet fields,
3544         * (aopForSym): added an optimization to directly store in stack of
3545         the operand of a SEND iCode,
3546         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
3547         but as registers instead (AOP_REG) using the fReturnIdx array,
3548         * (pic16_freeAsmop): remove the freed register from the
3549         _G.sregsAlloc field,
3550         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
3551         a compare of 'WREG',
3552         * (pic16_popGetTempRegCond): changed function prototype, now
3553         function takes also a bitVector argument v which holds the current
3554         set of registers that are allocated for stack access by aopForSym,
3555         registers allocated in aopForSym for accessing stack symbols are not
3556         any more part of the functions usedRegs field,
3557         * (genCall): some times aopOp is called for a stack variable to be
3558         send, aopForSym might perform the push, if this is true make sure
3559         that genCall doesn't push the variable twice by testing _G.resDirect,
3560         * (genFunction): changed testing for unspecified interrupt number
3561         from 256 to INTNO_UNSPEC,
3562         * modified selection scheme of frame pointer generation. Previously
3563         if function did use local registers a frame pointer was generated,
3564         now a frame pointer is generated only if function has arguments
3565         (that need PLUSW2 register access), or has stack arguments, or the
3566         compiler is not instructed to omit the frame pointer,
3567         * (genEndFunction): before restoring local registers that were saved
3568         in the function preamble, also restore the registers that *might*
3569         have been allocated for stack access,
3570         * (genRet): removed some old comments,
3571         * (genCmp, the active (RN's) version): added a call to the
3572         pic16_genCmp_special function to perform the compare with a more
3573         robust and optimized way,
3574         * (genInline): a feature has been added in inline code generation,
3575         which allows a wildcard variable substitution when writing inline
3576         assembly. Code is incomplete and experimental therefore undocumented,
3577         * (genCast): changed order of aopOp for result and right to allow
3578         aopForSym to directly load the result if possible,
3579         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
3580         perform an optimized compare on some selected special occasions,
3581         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
3582         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
3583         generate an IVT any more,
3584         * src/pic16/main.c (pic16_optionsTable): added command line option
3585         --optimize-cmp,
3586         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
3587         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
3588         macros,
3589         * src/pic16/NOTES: Raphael Neider added in list of active developers
3590         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
3591         jumptable_end to prevent bug #,
3592         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
3593         inCond and outCond fields,
3594         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
3595         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
3596         turn off register spilling,
3597         * (packRegsForOneUse): synced with other ports' versions although it
3598         is not used currently,
3599         * (pic16_packRegisters): added an optimization while reading
3600         structure bitfields, some registers may be saved (malloc code is
3601         decreased by 80 bytes)
3602
3603 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
3604
3605         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
3606         left is a bitfield, if yes, then don't optimize assignment. Perhaps
3607         this can be optimized more?
3608
3609 2005-03-10 Raphael Neider <rneider AT web.de>
3610
3611         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
3612           genNearPointerGet): (hopefully) fixed access to bitfields via
3613           pointers (p->bitN = x; and x = p->bitN; failed)
3614
3615 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
3616
3617         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
3618
3619 2005-03-09 Raphael Neider <rneider AT web.de>
3620
3621         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
3622
3623 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
3624
3625         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
3626         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
3627           (regTypeNum): set REG_BIT type if necessary
3628         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
3629         * support/regression/tests/critical.c: check bug 1144613
3630
3631 2005-03-02 Raphael Neider <rneider AT web.de>
3632
3633         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
3634
3635 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3636
3637         * src/avr/ralloc.c (serialRegAssign),
3638         * src/ds390/ralloc.c (serialRegAssign),
3639         * src/hc08/ralloc.c (serialRegAssign),
3640         * src/mcs51/ralloc.c (serialRegAssign),
3641         * src/pic/ralloc.c (serialRegAssign),
3642         * src/pic16/ralloc.c (serialRegAssign),
3643         * src/xa51/ralloc.c (serialRegAssign),
3644         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
3645
3646 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
3647
3648         * src/SDCCast.c (decorateType): fixed bug 1124787
3649
3650 2005-02-20 Hubert Sack <sack AT digiplan.de>
3651         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3652
3653         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
3654         patch #1121755
3655
3656 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3657
3658         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
3659         to keep the correct label reference count when adding/removing references
3660         to labels. A peephole file using this is appended to patch #1144962.
3661
3662 2005-02-14 Raphael Neider <rneider AT web.de>
3663
3664         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
3665         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
3666         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
3667           retrievals of result operand's value on assignment
3668
3669 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
3670
3671         * device/include/pic16/string.h: modified prototype for memccpy()
3672         to memccpy(void *, void *, char, size_t)
3673         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
3674         check whether to omit frame pointer or not,
3675         * (genInline): convert all occurences of "\n" to LF in inline
3676         assembler blocks, this helps formatting the inline text,
3677         * (pic16_loadFSR0): modified prototype,
3678         * (genNearPointerGet, genNearPointerSet): reorganization of code,
3679         removed some 8051 legacy code,
3680         * (genPackBits): enabled handling bitfields exceeding one byte in size,
3681         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
3682         before allocating temporary registers in functions,
3683
3684 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3685
3686         * support/regression/tests/bitvars.c: corrected the "fix"
3687
3688 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3689
3690         * support/regression/tests/bitvars.c,
3691         * support/regression/tests/bitwise.c,
3692         * support/regression/tests/rotate.c: "fixed" problems on Alpha
3693
3694 2005-02-10 Raphael Neider <rneider AT web.de>
3695
3696         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3697           different size for Alpha
3698         * src/pic16/gen.c (genCmpEq) : improved compare with 0
3699
3700 2005-02-09 Raphael Neider <rneider AT web.de>
3701
3702         * src/SDCC.lex(doPragma) : save and restore warning options as well
3703           (also added new stack plus clone- and copyAndFreeSDCCERRG())
3704         * have #pragma less_pedantic set the errorlevel to WARNING
3705           (fixes #1117001)
3706         * (cloneOptimize) : fixed wrong malloc's size
3707         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3708           facilitate correct handling of #pragma (save|restore)
3709
3710 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3711
3712         * src/mcs51/gen.c: removed non-standard C nameless struct/union
3713
3714 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3715
3716         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3717
3718 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3719
3720         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3721
3722 2005-02-02 Raphael Neider <rneider AT web.de>
3723
3724         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3725         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3726         * (pic16_storeForReturn): fixed to allow returning function pointers
3727         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3728         * device/include/pic16/{stddef.h,stdbool.h}: added
3729
3730 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3731
3732         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3733
3734 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3735
3736         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3737         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3738          appeared to be required
3739
3740 2005-01-31 Borut Razem <borut.razem AT siol.net>
3741
3742         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3743           include/mcs51 and include/z80 directories to the package
3744
3745 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3746
3747         * src/hc08/gen.c (genFunction): fixed bug #1112752
3748
3749 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3750
3751         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
3752
3753 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3754
3755         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
3756
3757 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
3758
3759         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
3760
3761 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
3762
3763         * device/include/c8051fxxx.h: removed these 6 files
3764         * device/include/mcs51/c8051fxxx.h: added these 11 new files
3765
3766 2005-01-26 Raphael Neider <rneider AT web.de>
3767
3768         * src/pic16/gen.c (genAssign): fixed assignment from longs
3769           in codespace (were cut to three bytes)
3770         * (genDummyRead): implemented (except for CODESPACE...),
3771           fixed bug #1108575
3772         * src/pic16/glue.c (emitStatistics): beautified
3773         * device/lib/pic16/libm/Makefile: added include path
3774
3775 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3776
3777         * src/z80/gen.c (aopPut): fixed bug #1103902
3778
3779 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3780
3781         * device/lib/expf.c: fixed bug #1095792
3782
3783 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3784
3785         * device/lib/pic16/libm: added Math library sources
3786
3787 2005-01-24 Raphael Neider <rneider AT web.de>
3788
3789         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3790           to enable upcast to pCodeOpReg2 (there is no type tag to
3791           differenciate the two and pic16_popGet2p cast into PCOR2)
3792         * src/pic16/main.c (_process_pragma): fixed another malloc bug
3793           (sizeof(sectNames) changed to sizeof(sectName))
3794           Both patches fix segfaults under MinGW.
3795
3796 2005-01-23 Raphael Neider <rneider AT web.de>
3797
3798         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3799           Safe_[mc]?alloc()'ed variables
3800         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3801           of (byte sized) temporaries (assign them to WREG for now)
3802         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3803           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3804           this might fix SIGSEGVs on MinGW...
3805         * src/SDCCopt.c (killDeadCode): restored original behaviour
3806           (volatile operands might get thrown away though)
3807
3808 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3809
3810         * src/pic16/gen.c: fixed bug #1106975,
3811         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3812         pointer update, INTCON is saved, global interrupts are disabled and
3813         restored after updateing TOS.
3814         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3815         * added function attribute 'shadowregs' to take advantage of shadow
3816         registers,
3817         * added function attribute 'wparam' as an alternative to the wparam
3818         pragma,
3819         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3820         user declares a non-ISR function as 'shadowregs',
3821         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3822
3823 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3824
3825         * .version: bumped version number to 2.4.8
3826         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3827         pic16 port,
3828         * device/lib/pic16/libio/i2c/: I2C module support library,
3829         * device/include/pic16/i2c.h: I2C support library header,
3830         * device/lib/pic16/libc/stdio/: standard IO support sources,
3831         * (printf_small.c): printf_small() source, supports float print,
3832         * (printf_tiny.c): printf_tiny() source, does not support floats,
3833         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3834         enable global optimizations for entire library source, other
3835         Makefiles in the source tree are also modified to reflect this,
3836         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3837         function,
3838         * doc/sdccman.lyx: updated to reflect new changes,
3839         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3840         sym->onStack if-case,
3841         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3842         sbit, idata, _idata, xdata, _xdata,
3843         * added pragma library, to link an external library, (see doc),
3844         * removed command line options, --pomit-config-words, --pomit-ivt,
3845         --pleave-reset-vector,
3846         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3847         when calling assembler to reflect memory model used, also define
3848         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3849         reflect stack model used,
3850         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3851         on stack return NULL,
3852
3853 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3854
3855         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3856           of the operands is volatile. Fixes #1020220
3857
3858 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3859
3860         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3861         * (OptimizeRegUsage): make sure that there is really no other flow where
3862           the first pCode is used
3863
3864 2005-01-22 Raphael Neider <rneider AT web.de>
3865
3866         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3867           to fix #1106967 (pCode->seq are not set up correctly)
3868
3869 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3870
3871         * src/SDCCglue.c (glue): make sure code area is declared before the
3872         static initialization area.
3873
3874 2005-01-21 Raphael Neider <rneider AT web.de>
3875
3876         * device/lib/Makefile.in: fixed test for pic16 install dir
3877         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3878           optimizations
3879         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3880           added --optimize-goto compiler switch and pragma wparam documentation
3881         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3882         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3883           and PRODH closing bug #1071770 (peephole optimizer)
3884
3885 2005-01-19 Raphael Neider <rneider AT web.de>
3886
3887         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3888           cmdLine buffers (used when calling sdcpp...) are large enough
3889           (MAX_PATH=256 truncates arguments leading to system halts when
3890           used in MinGW...)
3891         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3892         * (genUminus): rewritten to for efficiency
3893         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3894           used uninitialized in some cases)
3895         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3896           copy the third byte from the int -- now assumes 0x80 (data memory)
3897         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3898           operands (genAddLit expects the iCode's operands to swapped as
3899           well), fixed leftover bytes (crashed for short left operands)
3900         * (pic16_genMinusDec): performance improvements, removed false
3901           PIC14 emitSKPNCs
3902         * (pic16_genMinus): fixed to cope with differently sized operands
3903         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3904           for --obanksel > 1
3905         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3906         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3907           new banksel optimization
3908         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3909           analysis for temporary registers (segfaults...)
3910         * src/pic16/peeph.def: added rule
3911
3912 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3913
3914         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3915         which converts a float number to its ASCII representation
3916         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3917         functions to convert the fractional and integer part of a float to ASCII,
3918         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3919         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3920         ram
3921         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3922         _STATMEM macros,
3923         * device/include/pic16/adc.h: added GPL info,
3924         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3925         a pCodeOp as tested operand,
3926         * (genNearPointerGet): optimized bit testing, does not use
3927         intermediate register for bit value, test directly instead with
3928         BTFSS, BTFSC, works only for single bits,
3929         * (genpic16Code): dump the name of the iCode in the asm,
3930         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3931         renamed to pic16_decodeOp,
3932         * (serialRegAssign): do not allocate a temporary register for iCode
3933         sequences that test a single bit for 1/0
3934
3935 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3936
3937         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3938         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3939         access stack and frame pointers. They are initially assigned to
3940         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3941         accessing SFRs. Updated all occurences of modification of stack or
3942         frame pointer in gen.c and pcode.c,
3943         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3944         assigning of a literal value to pointers,
3945         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3946         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3947         selected
3948
3949 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3950
3951         * doc/sdccman.lyx: update documentation about stack pragma, added
3952         some info for stack memory models
3953
3954 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3955
3956         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3957
3958 2005-01-08 Raphael Neider <rneider AT web.de>
3959
3960         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3961           udata sections to fix bug #1097823
3962
3963 2005-01-05 Raphael Neider <rneider AT web.de>
3964
3965         * src/pic16/gen.c (genGenericShift): added handling of differently
3966           sized left operand and result
3967
3968 2005-01-04 Raphael Neider <rneider AT web.de>
3969
3970         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3971         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3972           to hold the condition bit)
3973         * added new version of genCmp (old code available via #define)
3974         * added new version of genShiftLeft/genShiftRight in a generic
3975           way, now supports shifting by negative values
3976         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3977           shiftCount (expected by genGenericShift)
3978         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3979         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3980           dump
3981         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3982           is an invalid literal too...)
3983
3984 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3985
3986         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3987         from Raphael Neider,
3988         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3989         for 8-bit literals. This fixes some literal operands which are sign
3990         extended to 16-bits ints when instruction needs only 8-bits.
3991
3992 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3993
3994         * device/lib/logf.c: added mcs51 assembly version
3995         * device/lib/expf.c: added mcs51 assembly version
3996         * device/lib/_logexpf.c: new shared asm code for expf and logf
3997         * device/include/math.h: add defines for assembly math library
3998         * device/lib/Makefile.in: build new _logexpf.c
3999         * device/lib/libfloat.lib: use new _logexpf.c
4000
4001 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4002
4003         * src/pic/device.c
4004         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
4005           device types which have less than 0x7f registers.
4006
4007 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4008
4009         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
4010
4011 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4012
4013         * device/lib/printf_fast.c: only build on supported arch.
4014         * device/lib/printf_tiny.c: only build on supported arch.
4015         * device/lib/printf_fast_f.c: only build if asm float lib
4016         * device/lib/_fsget1arg.c: only build if asm float lib
4017         * device/lib/_fsget2args.c: only build if asm float lib
4018         * device/lib/_fsnormalize.c: only build if asm float lib
4019         * device/lib/_fsreturnval.c: only build if asm float lib
4020         * device/lib/_fsrshift.c: only build if asm float lib
4021         * device/lib/_fsswapargs.c: only build if asm float lib
4022         * device/include/stdio.h: don't provide print_fast,
4023           print_fast_f, print_tiny prototypes if --xstack used
4024
4025 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
4026
4027         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
4028         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
4029           to the SOURCES
4030
4031 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4032
4033         * device/lib/printf_fast_f.c: same as printf_fast, but
4034           with floating point enabled
4035         * device/lib/printf_fast.c: minor tweaks
4036         * device/include/stdio.h: add printf_fast_f
4037
4038 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4039
4040         * src/SDCCmain.c: make --float-reent default for mcs51
4041         * device/lib/_fsadd.c: added mcs51 assembly version
4042         * device/lib/_fssub.c: added mcs51 assembly version
4043         * device/lib/_fsmul.c: added mcs51 assembly version
4044         * device/lib/_fsdiv.c: added mcs51 assembly version
4045         * device/lib/_fseq.c: added mcs51 assembly version
4046         * device/lib/_fsneq.c: added mcs51 assembly version
4047         * device/lib/_fsgt.c: added mcs51 assembly version
4048         * device/lib/_fslt.c: added mcs51 assembly version
4049         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
4050         * device/lib/Makefile.in: add _fscmp to build
4051         * device/lib/libfloat.lib: add _fscmp to build
4052
4053 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4054
4055         * device/lib/_fs2slong.c: added mcs51 assembly version
4056         * device/lib/_fs2sint.c: added mcs51 assembly version
4057         * device/lib/_fs2schar.c: added mcs51 assembly version
4058         * device/lib/_fs2ulong.c: added mcs51 assembly version
4059         * device/lib/_fs2uint.c: added mcs51 assembly version
4060         * device/lib/_fs2uchar.c: added mcs51 assembly version
4061         * device/lib/_slong2fs.c: added mcs51 assembly version
4062         * device/lib/_sint2fs.c: added mcs51 assembly version
4063         * device/lib/_schar2fs.c: added mcs51 assembly version
4064         * device/lib/_ulong2fs.c: added mcs51 assembly version
4065         * device/lib/_uint2fs.c: added mcs51 assembly version
4066         * device/lib/_uchar2fs.c: added mcs51 assembly version
4067         * device/include/float.h: added #define to select asm vs c
4068
4069 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
4070
4071         * device/lib/printf_fast.c: improvements to float output
4072         * device/include/float.h: add defines for assembly float library
4073         * device/lib/_fsget1arg.c: receive 1 float arg
4074         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
4075         * device/lib/_fsnormalize.c: normalize a float
4076         * device/lib/_fsreturnval.c: return float, various helper routines
4077         * device/lib/_fsrshift.c: right shift a float's mantissa
4078         * device/lib/_fsswapargs.c: swap 2 floats
4079         * device/lib/Makefile.in: build these 6 new files for mcs51
4080         * device/lib/libfloat.lib: add these 6 files to the library
4081
4082 2004-12-26 Borut Razem <borut.razem AT siol.net>
4083
4084         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
4085           built by gcc 3.4.2
4086
4087 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
4088
4089         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
4090           and fully reentrant and register bank neutral.
4091         * device/lib/printf_fast.c: added float (not enabled by default),
4092           added compact/slower integer (also not enabled by default),
4093           improved size/speed of fast integer code, other minor changes
4094         * device/include/stdio.h, device/lib/Makefile.in,
4095           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
4096
4097 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
4098
4099         * src/pic16/pcode.c: declaring variables other than at the start of a
4100           block is not supported in C by VC6.
4101
4102 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
4103
4104         * applied a previous patch from Raphael Neider that wasn't included
4105         in the previous commits, which fixes infinite loops within jumptable
4106         improvements,
4107         * made some fixes that previous patches introduced
4108
4109 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
4110
4111         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
4112         that fixes an issue with AOP_PCODE asmop's offset,
4113         * (pic16_popCopyReg): update instance field too,
4114         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
4115         function of pic port,
4116         * (genCmp, genAnd, genAssign),
4117         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
4118
4119 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
4120
4121         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
4122         variables initial values to idata section,
4123         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
4124         variables in some functions. This utilizes parmBytes field of iCode
4125         structure to hold the offset of the variable in stack. (might be
4126         able to use the stack field too?)
4127         * applied patch from Raphael Neider # ### , # ###
4128         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
4129         variable initial values in idata section,
4130         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
4131         for static variables with initial value
4132         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
4133         applied fix in while loop from Raphael Neider.
4134
4135 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
4136
4137         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
4138         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
4139         * src/ds390/ralloc.c (serialRegAssign): spill bits
4140         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
4141         * support/Util/SDCCerr.c,
4142         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
4143         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
4144         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
4145
4146 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
4147
4148         * device/include/sdcc-lib.h: inserted LGPL, added includes
4149           asm/ds390/features.h and asm/mcs51/features.h
4150         * device/include/asm/default/features.h,
4151         * device/include/asm/gbz80/features.h,
4152         * device/include/asm/z80/features.h: added empty _AUTOMEM
4153           and _STATMEM
4154         * device/include/asm/ds390/features.h,
4155         * device/include/asm/mcs51/features.h: added files with defines for
4156           _AUTOMEM and _STATMEM indicating automatic and static storage class
4157         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
4158         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
4159         * src/SDCCicode.c (geniCodeCast),
4160         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
4161         * src/SDCCloop.c (loopInduction): removed unused variable lr
4162         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
4163           to convertToFcall to include char modulo (RFE 1065037), added check
4164           if left operand is unsigned and use abs of literal value
4165         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
4166           as it doesn't work after conversion from peephole.def to peephole.rul
4167         * src/mcs51/gen.c (toBoolean): added check for size,
4168           (genModOneByte): optimized code for signed char modulo a literal
4169           power of 2 (thanks to Hubert Sack),
4170           (genRRC): removed unnecessary "clr c",
4171           (genRLC): replaced "add a,acc" with cheaper "rlc a"
4172         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
4173           jump optimization,
4174           swapped rules 256.c and 256.d,
4175           extended 256.d by using new multiple checks (thanks Erik),
4176           added rules 256.e and 256.f,
4177           updated rule 261.a and 261.b to new generated code
4178         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
4179
4180 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4181
4182         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
4183           induction related bugs, including first part of bug #1074377
4184
4185 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
4186
4187         * applied patch from bug-report #1076292,
4188         * applied patches for genAnd and Goto-optimizations for Raphael
4189         Neider,
4190         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
4191         dump a less iCode information,
4192         * src/pic16/device.h (pic16_options_t): added field debgen,
4193         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
4194         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
4195         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
4196         puclic,
4197         * (various functions): added macros FENTRY and FENTRY2 to functions,
4198         to emit function prologue,
4199         * (various functions): fixed indentation,
4200         * (genNearPointerGet): fixed loading of FSR0,
4201         * (genPackBits): applied patch from Raphael Neider to fix updating
4202         of FSR0 and touching only the modified bits,
4203         * src/pic16/genarith.c (various functions): added macros FENTRY to
4204         emit function prologue in comments,
4205         * src/pic16/pcode.h: added functions debugf2, debugf3,
4206         * src/pic16/ralloc.c: partial fix for packForPush caused
4207         segmentation fault,
4208
4209 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4210
4211         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
4212           <stsp AT users.sourceforge.net> with reversed byte order
4213         * support/regression/tests/rotate.c: added (ds390 skips some tests)
4214
4215 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4216
4217         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
4218           bug #1074377
4219         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
4220         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
4221
4222 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4223
4224         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
4225
4226 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4227
4228         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
4229           conditions,
4230           (setFromConditionArgs): friendly operand parser for peephole rules,
4231           (operandBaseName, operandsNotRelated): new peephole condition
4232           "operandsNotRelated" -- similar to "operandsNotSame", but takes
4233           architecture specific register naming into account, handles n-way
4234           comparisons, and supports quoted literals
4235         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
4236
4237 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4238
4239         * src/mcs51/peeph.def: fixed bug #1076940
4240
4241 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4242
4243         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
4244
4245 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4246
4247         Adding support for replacing ljmps with sjmps in jumptables
4248         generated for switch statements. For now you need to set the
4249         environment variable SDCC_SJMP_JUMPTABLE to enable this.
4250         Now 4 algorithms for mcs51 jumptable generation are used:
4251         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
4252         addresses loaded pc-relative for up to 112 cases and stack-pushing
4253         target addresses loaded with offset from dptr for up to 256 cases.
4254
4255         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
4256         * src/mcs51/main.c: adapted constants for switch table generation
4257         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
4258
4259 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
4260
4261         * device/lib/printf_large.c (_print_format): fixed bug 1073386
4262         * support/regression/tests/bug1057979.c: added test for bug 1073386
4263
4264 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4265
4266         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
4267         compilers
4268
4269 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4270
4271         * src/pic16/device.h,
4272         * src/pic16/genarith.c,
4273         * src/pic16/glue.c,
4274         * src/pic16/main.c,
4275         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4276
4277 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4278
4279         Large cummulative patch for pic16 port.
4280         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4281         to call when a stack overflow occurs,
4282         * (malloc.h): added CVS Id tag,
4283         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4284         variable,
4285         * added libc directory. The current version of LibC contains string
4286         functions, ctype functions and macros and some functions of the
4287         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4288         be extensively tested in the future. Standard disclaimer here.
4289         Library is not automatically build yet. But one can build it by
4290         invoking 'make' inside the libc directory.
4291         * added ADC library under libio. Preliminary version yet.
4292
4293         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4294         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4295         aopForRemat() now and not by pic16_aopOp(),
4296         * (pic16_popGetTempReg): removed warning messgae when allocating
4297         temporary registers, its a buggy feature and will be removed,
4298         * (pic16_popGet): set register instance field in AOP_CRY,
4299         * (pic16_outBitC): fixed for results in size greater than 1,
4300         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4301         * (pic16_storeForReturn): optimized return of 0,
4302         * (genCmp): experimental code for new genCmp which uses PIC18's
4303         special compare&skip instructions. Initial tests fail some times
4304         with variables grater than 1 byte in size, so new code is disabled,
4305         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
4306         a single bit,
4307         * (genCast): began a fix to optimize the casting of a bit to another
4308         bit, now assigning a bitfield to another bitfield will fail, sorry,
4309         * src/pic16/main.c: disabled the use of lr-support feature,
4310         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
4311         * added some function prototypes, added function _debugf prototype,
4312         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
4313         bits with offset (case PO_GPR_BIT),
4314         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
4315         command line,
4316         * (isBankInstruction): modified to return 0 for no banking instruction,
4317         and 1 for banking instruction,
4318         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
4319         caused stop processing pCodes after a inline assembly block,
4320         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
4321         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
4322         registers when it shouldn't,
4323         * src/pic16/ralloc.c (allocReg): add preliminary support for
4324         supporting a limited set of temporary registers,
4325
4326 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4327
4328         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
4329           genDataPointerSet): ensure assignments always copy in MSB to LSB
4330           order,
4331           (loadRegFromAop): recognize CLRH optimization,
4332           (genFunction): optimize RECEIVE iCodes in reentrant functions
4333
4334 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4335
4336         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
4337           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
4338           selected.
4339         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
4340         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
4341           contiguous with data
4342
4343 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4344
4345         * device/lib/_gptrget.c (_gptrget),
4346         * device/lib/_gptrgetc.c (_gptrgetc),
4347         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
4348           instead of sjmp to ret
4349         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
4350           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
4351
4352 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
4353
4354         * .version: bumped version to 2.4.7
4355         * device/lib/_gptrget.c (_gptrget): is now _naked
4356         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
4357         * device/lib/_gptrput.c (_gptrput): is now _naked
4358         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
4359           (createFunction): fixed xstack
4360         * src/SDCCglue.c (emitMaps): set allocation required for bit area
4361         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
4362           or bit either,
4363           (geniCodeCritical): store original interrupt state in an iTemp bit
4364           var unless stack-auto
4365         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
4366         * src/SDCCmain.c (setIncludePath): added include/target to search path
4367         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
4368         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
4369           prototype,
4370           (processFuncArgs): put bit vars in bit area
4371         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
4372           unsaveRBank): fixed xstack,
4373           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
4374           (genFunction, genEndFunction): fixed xstack,
4375           (genAssign): optimization don't walk backwards through mem
4376         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
4377         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
4378         * support/regression/Makefile: also make library (for stack-auto) when
4379           making "all" and added "test-mcs51-xstack-auto"
4380         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
4381         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
4382         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
4383         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
4384         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
4385           make-library by MAKE_LIBRARY
4386         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
4387           regression tests for xstack
4388         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
4389         * support/regression/tests/critical.c: test for critical on mcs51
4390
4391 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4392
4393         * support/regression/ports/ucz80/spec.mk: use include and lib files from
4394           built version of sdcc instead of installed version
4395
4396 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
4397
4398         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
4399         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
4400           vprintf.c now
4401         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
4402         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
4403           WARNING: remove device/lib/build/z80/printf.o by hand when
4404           updating from previous build!
4405         * device/lib/z80/printf.c: updated comment
4406         * support/regression/tests/bug1057979.c: test all ports now
4407         * support/regression/tests/bug1065458.c: file added
4408
4409 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4410
4411         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
4412           *_start and *_end symbols for static functions
4413
4414 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
4415
4416         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
4417           and search crt0.o in all library paths,
4418           (setIncludePath): proper handling of --nostdinc,
4419           (setLibPath): proper handling of --nostdlib
4420         * support/regression/Makefile,
4421         * support/regression/ports/ds390/spec.mk,
4422         * support/regression/ports/gbz80/spec.mk,
4423         * support/regression/ports/hc08/spec.mk,
4424         * support/regression/ports/mcs51/spec.mk,
4425         * support/regression/ports/mcs51-large/spec.mk,
4426         * support/regression/ports/mcs51-stack-auto/spec.mk,
4427         * support/regression/ports/z80/spec.mk: use include and lib files from
4428           built version of sdcc instead of installed version
4429         * doc/sdccman.lyx: fixed typo in --nostdinc
4430
4431 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
4432
4433         * src/pic/pcode.c,
4434         * src/pic/device.c,
4435         * src/pic/ralloc.c,
4436         * src/pic/gen.c : added support to generate code for struct bit fields.
4437
4438 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
4439
4440         * as/xa51/xa_version.h,
4441         * device/include/errno.h,
4442         * device/include/regc515c.h,
4443         * device/lib/_itoa.c,
4444         * device/lib/_ltoa.c,
4445         * device/lib/ser_ir_cts_rts.c,
4446         * sim/ucsim/xa.src/glob.cc,
4447         * sim/ucsim/xa.src/inst_gen.cc,
4448         * sim/ucsim/xa.src/xa_bit.cc,
4449         * sim/ucsim/xa.src/xa_sfr.cc,
4450         * sim/ucsim/z80.src/inst_dd.cc,
4451         * sim/ucsim/z80.src/inst_fdcb.cc,
4452         * support/scripts/keil2sdcc.pl,
4453         * src/pic16/pic16.dsp,
4454         * src/pic16/pic16a.dsp: corrected cvs line endings
4455         * device/lib/printf_large.c: fixed bug 1057979
4456         * src/pic16/gen.c: fixed non-C standard code
4457         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
4458         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
4459         * support/regression/ports/mcs51/support.c: reload T1 asap
4460         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
4461           pdata use and clear idata startup behaviour
4462         * support/regression/tests/bug1057979.c: added
4463
4464 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
4465
4466         * device/examples/ds390/ow390/ad26.h,
4467         * device/examples/ds390/ow390/cnt1d.h,
4468         * device/examples/ds390/ow390/crcutil.c,
4469         * device/examples/ds390/ow390/ownet.h,
4470         * device/examples/ds390/ow390/owsesu.c,
4471         * device/examples/ds390/ow390/swt12.h,
4472         * device/examples/ds390/ow390/swtoper.c,
4473         * device/examples/ds390/ow390/temp10.h,
4474         * device/examples/ds390/ow390/thermodl.c,
4475         * device/examples/ds390/tinitalk/tinitalk.dsp,
4476         * device/examples/ds390/tinitalk/tinitalk.dsw,
4477         * device/examples/mcs51/clock/hw.h,
4478         * device/examples/mcs51/simple2/go.bat,
4479         * device/examples/serialcomm/windows/serial.h,
4480         * device/examples/xa51/dummy.c,
4481         * device/examples/xa51/hello.c,
4482         * device/include/80c51xa.h,
4483         * device/include/at89x051.h: corrected cvs line endings
4484
4485 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
4486
4487         * src/pic16/main.c (options): added command line --gstack, to trace
4488         stack over/under flows,
4489         * added pragma 'wparam' to allow passing first byte of function
4490         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
4491         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
4492         call to __gstack_test function and sets up the symbol as extern,
4493         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
4494         * popaop): added call to pic16_testStackOverflow,
4495         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
4496         wparamList list,
4497         * (genCall, genPcall): now all parameters are passed via stack
4498         except in functions that are pass to wparam pragma in which WREG is
4499         used too,
4500         * (genPcall): REENTRANT flag is checked to see if variable prototype
4501         contains reentrant keyword, don't call a non-reentrant function, via
4502         a reentrant function pointer or vice versa, functions are never
4503         passed via WREG,
4504         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
4505         D.Winkler,
4506         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
4507         SIGSEGV when accessing a NULL register stucture,
4508         * (pic16_printGPointerType): modified to handle UPPER modifier for
4509         function initializers, changed prototype of function to simpler one,
4510         * (pic16_printIvalFuncPtr): check to see if function is already
4511         added in externs list,
4512         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
4513         optimized a move from W to SFR with a move to the same register
4514         later after a CALL,
4515         * device/lib/pic16/debug: NEW directory, contains debug features
4516         which are enabled when linking with libdebug.lib, currently command
4517         line option --gstack enables stack pointer tracing for over/under
4518         flow, corresponding sources are in debug/gstack
4519
4520 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
4521
4522         * doc/sdccman.lyx: updated SDCC version,
4523         * (PIC16 port): update list of command line options,
4524         * src/pic16/device.h (structure pic16_options_t): added field gstack
4525         to enable stack overflow tracing on push/pops,
4526         * src/pic16/device.c (statistics structure): added statistics
4527         structure,
4528         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
4529         pic16_dump_int_registers): increase statistics counters for each
4530         * variable which is encountered
4531         * (pic16_dump_usection): emit each .udata variable to its own udata
4532         section,
4533         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
4534         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
4535         parameters via stack, otherwise use old scheme,
4536         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
4537         assembler output file,
4538         * src/pic16/main.c: added command line options --gstack to enable
4539         push/pop tracing for stack overflow,
4540         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
4541         instructions): added size of each instruction,
4542         * (pic16_countInstruction): estimate size of instructions in
4543         the_pFile list, inline assembly blocks are not counted,
4544         * (pic16_FixRegisterBanking): trace previous register usage, when
4545         banksel optimizations is greater than 0, don't emit a redudant
4546         banksel directive,
4547
4548 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
4549
4550         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
4551         * src/pic16/ralloc.c : applied same fix for pic16.
4552         * src/pic/gen.c : tidied it up a little.
4553
4554 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4555
4556         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
4557         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
4558
4559 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4560
4561         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
4562
4563 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4564
4565         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
4566         non-reentrant function __modsint in the interrupt function (thus
4567         corrupting math operations during serial I/O)
4568         * device/lib/ser_ir.c: as above, changed buffersize
4569         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
4570         256.c,d for zeroing
4571         * doc/Makefile: added option -t for rsync
4572
4573 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4574
4575         * src/SDCCast.h (struct ast),
4576         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
4577
4578 2004-10-20 Borut Razem <borut.razem AT siol.net>
4579
4580         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
4581         package
4582
4583 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
4584
4585         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
4586         makefile targets,
4587         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
4588         support functions to replace long sequences of MOVFF's from access
4589         bank registers to stack and vice versa,
4590         * src/pic16/device.h: added new field opt_flags, where optimization
4591         flags can be set to enable certain features,
4592         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
4593         * pBlock, (genFunction, genEndFunction): surroung loop for
4594         saving/loading used registers in stack with PC_INFO pCodes,
4595         INF_LREGS. Code in between can then be optimized by pCode optimizer
4596         to support function calls,
4597         * (genDataPointerSet): fixed bug which loaded float fields in
4598         structures with corrupt data,
4599         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
4600         in a standard way debug info on stderr. Feature used for developing
4601         and debugging only,
4602         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
4603         obsolete chunks of code,
4604         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
4605         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
4606         * pic16/src/pcode.c (pic16_newpCodeInfo,
4607         * (pic16_newpCodeOpLocalRegs),
4608         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
4609         feature,
4610         * (pic16_pCodeConstString): printing of the initial value of a
4611         symbol as a comment is inhibited since parsing was already done by
4612         copyStr and output is corrupt,
4613         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
4614
4615 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4616
4617         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
4618
4619 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
4620
4621         * as/mcs51/lkarea.c: removed old K&R style,
4622           (lnksect): changed check on boundary error,
4623           (lnksect2): changed check on boundary error,
4624           (lnksect2): extend XSTK to end of page if size = 1
4625         * as/mcs51/lkmain.c: removed old K&R style,
4626           (Areas51): create l_IRAM symbol
4627         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
4628         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
4629           model-mcs51-stack-auto, added model-mcs51-xstack-auto
4630         * device/lib/_mullong.c: added version to be compiled with xstack
4631         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
4632         * device/lib/mcs51/crtxclear.asm: clear pdata as well
4633         * device/lib/mcs51/crtxstack.asm: fixed comment
4634         * src/SDCCglue.c: maxInterrupts defaults to 0,
4635           (emitMaps): added pdata,
4636           (createInterruptVect): (re)moved default,
4637           (glue): added pdata,
4638           (glue): moved __start__xstack to XSTK with default size 1
4639         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
4640           and options.float_rent when options.stackAuto is set,
4641           (linkEdit): only write XDATA_NAME if provided on command line
4642         * src/SDCCmem.h,
4643         * src/SDCCmem.c: added pdata
4644         * src/port.h: added pdata_name to PORT
4645         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
4646           (saveRegisters, unsaveRegisters): removed usage of B,
4647           (genMinus): fixed accumulator clash,
4648           (genJumpTab): added comment, this needs another look
4649         * src/mcs51/gen.c: added check for "B in use" paranoia,
4650           added pushB() and popB()
4651         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
4652           chance
4653         * src/avr/main.c,
4654         * src/ds390/main.c,
4655         * src/hc08/main.c,
4656         * src/mcs51/main.c,
4657         * src/pic/main.c,
4658         * src/pic16/main.c,
4659         * src/xa51/main.c,
4660         * src/z80/main.c: (reset_regparms) made void parameter explicit and
4661           added PSEG (PAG,XDATA) or NULL to port specifier
4662         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
4663         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
4664           (_mcs51_genInitStartup): removed __start__xstack equ,
4665           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
4666         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
4667         * src/z80/gen.c (_rleAppend): fixed warnings
4668         * support/regression/tests/zeropad.c: added pdata test
4669         * .version: bumped to 2.4.6
4670
4671 2004-10-17 Borut Razem <borut.razem AT siol.net>
4672
4673         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
4674         as a part of nightly build
4675
4676 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
4677
4678         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
4679         WREG holds the first byte function parameters,
4680         * (aopForSym): take special case for symbols which are in FARSPACE
4681         but in CODESPACE too,
4682         * (assignResultValue): modified to take into account _G.useWreg,
4683         * (genCall): don't use wreg for parameter passing when function is
4684         declared as reentrant, too, added optimization INCF to stack
4685         pointer when stack parameter count is 1,
4686         * (genFunction, genEndFunction): refurnished and fixed to not using
4687         wreg for passing parameters when function has varargs or is
4688         reentrant, fixed bug with symbol name compare for generating
4689         functions in absolute address,
4690         * (pic16_storeForReturn): refurnished,
4691         * (genCmp): began writing a new version of the function, not ready
4692         yet, therefore it is disabled,
4693         * (genAssign): do not read code memory when assigning a function to
4694         a pointer function,
4695         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
4696         array of characters, not pointer,
4697         * (pic16initialComments): in debug mode emit an .ident directive for
4698         the assembler,
4699         * (_process_pragma): emit a new warning type (internal to pic16)
4700         when setting stack to default length, emit a similar warning when
4701         placing a function at absolute address and address is not word aligned
4702         * (_pic16_parseOptions): added 'return TRUE' statement,
4703         * (_pic16_linkEdit): if compiling a source, then add the source's
4704         file object, first in the list of objects to link,
4705
4706 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
4707
4708         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
4709         * src/pic/main.c : removed VC warning.
4710         * src/pic/gen.c : changed comment.
4711
4712 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
4713
4714         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
4715         reference to a deprecated symbol _GPTRREG was causing failure to
4716         link. Thanks G. M. Gallant for the info.
4717
4718 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
4719
4720         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
4721         comments for Bugs item #954788.
4722
4723 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
4724
4725         * src/pic16/device.c (pic16_dump_gsection,
4726         * pic16_groupRegistersInSection): handle symbols declared to be in
4727         access bank differently,
4728         * src/pic16/gen.c (struct _G): added field resDirect,
4729         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
4730         send values read from stack directly to result and don't allocate
4731         temporary values,
4732         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
4733         same registers,
4734         * (pic16_sameRegsOfs): NEW,
4735         * (freeAsmop): if _G.resDirect is set then do not mark registers as
4736         free because they were not allocated from temporary pool,
4737         * pic16_popRegFromString): workaround to fix a problem with
4738         allocating variables twice or never,
4739         * (genGenPointerGet): using PRODL instead of FSR0H,
4740         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
4741         instead of FSR0H,
4742         * (genAssign): take advantage of the _G.resDirect flag,
4743         * (genCast): around line 11844, use mov2f instead of directly
4744         MOVFF'ing between operands to account for literal values,
4745         * src/pic16/genutils.c: some new debug functions for gpsim have been
4746         added,
4747         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
4748         float with integer part only,
4749         * src/pic16/main.c (_process_pragma): handle pragma udata access to
4750         place variables in access bank
4751         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
4752         updated sources to reflect recent changes in gen.c
4753
4754 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
4755
4756         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
4757         sources that searched for headers in installation path, now the
4758         device/include/pic16 is used,
4759         * src/pic16/glue.c (pic16glue),
4760         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
4761         .line directives if not in debug mode, this suppresses assembler's
4762         warnings for ignored directives
4763
4764 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
4765
4766         * src/port.h: made reset_regparms prototype void parameter explicit.
4767         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
4768         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
4769         * doc/sdccman.lyx: documented warning disabling and how to use
4770           printf_large to make it print floats.
4771         * device/include/stdbool.h: NEW
4772         * device/lib/_atof.c,
4773         * device/lib/_divuint.c,
4774         * device/lib/_divulong.c,
4775         * device/lib/expf.c,
4776         * device/lib/printf_large.c,
4777         * device/lib/sincosf.c,
4778         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
4779         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
4780           a completely reentrant lib.
4781
4782 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
4783
4784         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
4785         * device/include/pic16/stdio.h: fixed bug with colon
4786
4787 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
4788
4789         * device/include/pic16/stdio.h,
4790         * device/include/pic16/stdlib.h,
4791         * device/include/pic16/math.h: NEW
4792         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
4793         declared as _naked to reduce overhead
4794         * device/lib/Makefile.in (target port-specific-objects-pic16):
4795         changed * to *.* so to ignore the CVS directory,
4796         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4797         stacked variables back in stack,
4798         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4799         corruption
4800
4801 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4802
4803         * .version: bumped version number to 2.4.5
4804         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4805         * support/Util/SDCCerr.c (messages structure): added entry for
4806         W_POSSBUG2
4807
4808         Large cumulative patch for pic16 port and libraries.
4809         * device/include/pic16/sdcc-lib.h,
4810         * device/include/pic16/stdarg.h,
4811         * device/include/asm/pic16/features.h,
4812         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4813         * device/include/pic16/float.h: changes reentrant keyword with
4814         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4815         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4816         updated target build-libraries to include objects from gptr,
4817         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4818         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4819         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4820         all function headings,
4821         * src/SDCCmain.c: added global parameter userIncDirsSet,
4822         * (parseCmdLine): when option -I is encountered add directory to
4823         userIncDirsSet too,
4824         * src/version.awk: added space between control and long,
4825         * src/pic16/NOTES: added some notes for the port,
4826         * src/pic16/gen.c: added prototype for mov2fp function,
4827         * (fReturnpic16[]): properly named return value registers,
4828         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4829         * (aopForSym): added code to handle symbols with onStack flag set,
4830         symbols onStack are allocated PTRSIZE bytes,
4831         * (aopFreeAsmop): handles special case where asmops are stack objects,
4832         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4833         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4834         added argument lock to trace flaws in allocating temporary registers
4835         when developing port,
4836         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4837         * (pic16_popRegFromString): reenabled allocating a direct register
4838         from string,
4839         * (assignResultValue): various beautifications,
4840         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4841         referenced function argument,
4842         * (genIpush): reenabled to allow stacked arguments, handles only
4843         ic->parmPush iCodes,
4844         * (genCall, genPcall): major changes to allow for variable argument
4845         functions, fixed a bug with falsely restoring stack pointer after
4846         returning from call,
4847         * (genFunction): pending code for critical function,
4848         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4849         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4850         * (genNearPointerGet): fixed bug with indirect reading, was always
4851         reading from INDF0
4852         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4853         pointers,
4854         * (genAddrOf): rewrote code to take address of a stacked function parameter
4855         * (genCast): fixed casting to generic pointer type,
4856         * src/pic16/gen.h: added AOP_STA,
4857         * (struct asmop): added field stk,
4858         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4859         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4860         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4861         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4862         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4863         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4864         generic pointers,
4865         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4866         and library paths,
4867         * (pic16_port structure): generic pointer size is set to 3,
4868         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4869         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4870         compiler warning,
4871         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4872         operand is an iTemp,
4873
4874 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4875
4876         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4877         * debugger/mcs51/simi.c: addapt new syntax of s51
4878
4879 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4880
4881         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4882         * src/pic16/pcode.c: commented out some calls to free() in order to
4883         fix bug #989576,
4884
4885 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4886
4887         * src/SDCCicode.h,
4888         * src/SDCCicode.c (isiCodeInFunctionCall),
4889         * src/avr/ralloc.c (selectSpil),
4890         * src/pic/ralloc.c (selectSpil),
4891         * src/pic16/ralloc.c (selectSpil),
4892         * src/ds390/ralloc.c (selectSpil),
4893         * src/hc08/ralloc.c (selectSpil),
4894         * src/xa51/ralloc.c (selectSpil),
4895         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4896         stack in the middle of a function call sequence (fixes bug #1020268)
4897         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4898         costs associated with the minimum switch case.
4899
4900 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4901
4902         * src/SDCC.lex: fixed bug #1030549
4903
4904 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4905
4906         * src/SDCCcse.h (struct cseDef),
4907         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4908         over a function call if the CSE is derived from a symbol whose
4909         address has been taken (fixes bug #1029883)
4910         * support/regression/tests/bug-1029883: a new regression test for
4911         this bug
4912
4913 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4914
4915         * src/hc08/gen.c (emitinline): fixed bug #1029778
4916         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4917         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4918         and starts toward RFE #905167)
4919
4920 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4921
4922         * src/pic16/gen.c (mov2f): New function to move an operand to
4923         another without considering if it is a literal or a register,
4924         * (pic16_sameRegs): don't check if they are both AOP_REG,
4925         * (AccRsh): removed andmask=0 lines,
4926         * (genLeftShift): duplicated to be improved in future versions,
4927         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4928         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4929         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4930         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4931         * (insertBankSwitch): fixed inserting banksel directives algorithm
4932         for instructions that follow a skip instruction, this fixes a report
4933         for broken subtraction code generation,
4934         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4935         iCode is a left op, just in case result and right share the same
4936         registers
4937
4938 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4939
4940         * src/hc08/main.c,
4941         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4942         preservation of HX
4943         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4944         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4945         on 2004-09-12; it was buggy
4946
4947 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4948
4949         * src/SDCCsymt.h: removed RESULT_CHECK
4950         * src/SDCCast.c,
4951         * src/SDCCglue.c,
4952         * src/SDCCval.c,
4953         * src/pic/glue.c,
4954         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4955
4956 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4957
4958         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4959         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4960         configuration values no more rejected by compiler, they are assigned
4961         to configuration registers with a warning message instead,
4962         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4963         the for-loop so last conf register is emitted too,
4964         * (_pic16_initPaths): link library libsdcc.lib by default,
4965         * (_hasNativeMulFor): modified test for multiplication according to
4966         Raphael Neider's remarks. Integer multiplication is also done with
4967         support functions,
4968         * device/include/pic16/pic18fregs.h: corrected type error in while
4969         testing and including 18f6720 header file
4970
4971 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4972
4973         * src/pic16/device.h (pic16_options): removed field use_crt,
4974         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4975         until an optimization to handle single bits is added,
4976         * (pic16_loadFSR0): moved before genUnpackBits,
4977         * (genAnd): some white lines removed,
4978         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4979         leave_reset flags in pic16_options when using crt modules,
4980
4981 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4982
4983         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4984           for bugs 898889 & 979599. Also used some safer print instructions.
4985
4986 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4987
4988         * src/pic16/device.h (pic16_options_t): added field use_crt,
4989         crt_name, no_crt,
4990         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4991         catch a probable future bug,
4992         * src/pic16/gen.c: aopIdx function commented out,
4993         * (genAssign): commented out old code which used aopIdx,
4994         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4995         code, added if conditionals to take into account the --use-crt
4996         command line options,
4997         * src/pic16/main.c (pic16_optionsTable): added new command line
4998         options, --use-crt= and --no-crt,
4999         * (_pic16_linkEdit): now the proper crt object is added in the
5000         linker command line except than when --no-crt is specified,
5001         * src/pic16/pcode.c,
5002         * src/pic16/pcode.h: added some structures and functions for a new
5003         optimization scheme to compansate for instruction overhead between
5004         same iCodes, this scheme is currently under development and is not
5005         working in any way,
5006         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
5007         to && operator,
5008         * device/lib/pic16/startup/crt0i.c,
5009         * device/lib/pic16/startup/crt0iz.c: added global char variable
5010         __uflags to force the generation of an idata section
5011
5012 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
5013
5014         * doc/Makefile,
5015         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
5016         * doc/sdccman.lyx: updated sdcc version to 2.4.4
5017
5018 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5019
5020         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
5021         Frieder) and clarified the default code optimization mode
5022
5023 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5024
5025         * src/SDCC.lex (doPragma, process_pragma),
5026         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
5027         "opt_code_size", and "opt_code_balanced"
5028         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
5029         regrouped options by category, added support for category headers
5030         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
5031         and "--opt-code-size"
5032         * doc/sdccman.lyx: documented these new options and pragmas
5033         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
5034         preference into account
5035
5036 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5037
5038         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
5039           geniCodePreDec): Fixed bug 904237 by generating a warning
5040         * src/SDCCerr.h,
5041         * src/SDCCerr.c: added warning W_SIZEOF_VOID
5042
5043 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
5044
5045         * src/pic/device.c : When no max ram set validate full memory range.
5046         * src/pic/pcode.c,
5047         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
5048
5049 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5050
5051         * device/lib/_gptrget.c,
5052         * device/lib/_gptrput.c: updated comment
5053         * device/lib/calloc.c,
5054         * device/lib/free.c,
5055         * device/lib/malloc.c,
5056         * device/lib/realloc.c: added LGPL, made them reentrant-safe
5057         * src/SDCCcse.c (cseBBlock),
5058         * src/SDCCicode.c (printOperand, geniCodeArray),
5059         * src/SDCCicode.h (struct operand): fixed bug 868103
5060         * support/regression/tests/bug-868103.c: added
5061         * src/SDCCast.c (searchLitOp),
5062         * src/SDCCcse.h (struct cseDef),
5063         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
5064         * src/SDCCicode.h (struct operand),
5065         * src/SDCCsymt.h (struct sym_link),
5066         * src/avr/gen.c (hasInc),
5067         * src/ds390/gen.c (hasInc),
5068         * src/hc08/gen.c (genPlusIncr, hasInc),
5069         * src/mcs51/gen.c (hasInc),
5070         * src/pic16/glue.c (pic16_printIvalChar),
5071         * src/pic16/ralloc.c (regWithIdx),
5072         * src/xa51/gen.c (hasInc) : removed warnings
5073         * src/SDCCast.c (createBlock): added comment ???
5074         * src/hc08/ralloc.c: updated comments
5075
5076 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5077
5078         * doc/sdccman.lyx: updated section on switch statements, added
5079         section about semaphore locking
5080         * doc/Makefile: added option -info for latex2html
5081         * device/lib/_gptrget.c,
5082         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
5083
5084 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5085
5086         * src/pic/device.h,
5087         * src/pic/device.c,
5088         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
5089          maxram is less than 0x100.
5090
5091 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5092
5093         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
5094
5095 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5096
5097         * src/port.h,
5098         * src/mcs51/main.c,
5099         * src/ds390/main.c,
5100         * src/z80/main.c,
5101         * src/hc08/main.c,
5102         * src/pic/main.c,
5103         * src/pic16/main.c,
5104         * src/avr/main.c,
5105         * src/xa51/main.c
5106         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
5107         a jump table is the best form for a switch statement, including
5108         automatic insertion of missing cases to make the case range
5109         continuous. Developed in collaboration with Frieder Ferlemann.
5110
5111 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5112
5113         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
5114         accumulator result if it needs sign extension
5115
5116 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5117
5118         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
5119
5120 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5121
5122         * device/lib/gbz80/printf.c,
5123         * device/lib/z80/printf.c: removed define for NULL
5124
5125 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5126
5127         * as/xa51/xa_link.c,
5128         * device/examples/ds390/ow390/ad26.c,
5129         * device/examples/ds390/ow390/cnt1d.c,
5130         * device/examples/ds390/ow390/counter.c,
5131         * device/examples/ds390/ow390/ds2480.h,
5132         * device/examples/ds390/ow390/ds2480ut.c,
5133         * device/examples/ds390/ow390/findtype.c,
5134         * device/examples/ds390/ow390/gethumd.c,
5135         * device/examples/ds390/ow390/owllu.c,
5136         * device/examples/ds390/ow390/ownetu.c,
5137         * device/examples/ds390/ow390/swt12.c,
5138         * device/examples/ds390/ow390/swtloop.c,
5139         * device/examples/ds390/ow390/temp.c,
5140         * device/examples/ds390/ow390/temp10.c,
5141         * device/examples/ds390/ow390/thermo21.c,
5142         * device/examples/ds390/ow390/tinilnk.c,
5143         * device/examples/ds390/ow390/tstfind.c,
5144         * device/examples/serialcomm/windows/serial.cpp,
5145         * device/examples/serialcomm/windows/test_serialcomm.cpp,
5146         * device/include/reg51.h: fixed line endings for cvs
5147
5148 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5149
5150         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
5151         packRegsForAccUse, packRegisters): new accumulator register
5152         packing algorithm
5153         * support/regression/ports/hc08/support.c (_putchar): suppress
5154         warning of unused variable
5155         * src/SDCCicode.c: added SWAP entry to codeTable
5156
5157 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
5158
5159         * device/lib/sprintf.c: forgot to add this file before previous commit
5160
5161 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
5162
5163         * src/pic16/gen.c (genPackBits): added operand right in function
5164         parameters, load result directly if p_type is POINTER (that is
5165         called by genNearPointerSet)
5166         * (genUnPackBits): added operand left in function parameters,
5167         * (genNearPointerGet, genNearPointerSet): prevent the loading of
5168         FSR0 if accessing bitfields,
5169
5170 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
5171
5172         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
5173           _print_format; updated printf, sprintf, vsprintf
5174         * device/include/asm/default/features.h: corrected comment/define
5175         * device/lib/Makefile.in: added sprintf.c
5176         * device/lib/libsdcc.lib: added sprintf module
5177         * device/lib/printf_large.c,
5178         * device/lib/vprintf.c,
5179         * device/lib/sprintf.c: totally refactored printf_large and vprintf
5180           into these 3 files
5181         * support/regression/Makefile: changed ALL_PORTS into a usefull default
5182         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
5183         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
5184           hc08 test
5185         * support/regression/tests/zeropad.c: define idata as data for hc08
5186
5187 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5188
5189         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
5190         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
5191         labels are referenced at least once (even if a reference is not found)
5192         * src/hc08/gen.c (emitcode): set isComment flag for comments
5193         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
5194         loads), rules 6a..6b (optimize jumps to return)
5195
5196 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5197
5198         * device/lib/acosf.c (acosf),
5199         * device/lib/asinf.c (asinf),
5200         * device/lib/atanf.c (atanf),
5201         * device/lib/ceilf.c (ceilf),
5202         * device/lib/cosf.c (cosf),
5203         * device/lib/coshf.c (coshf),
5204         * device/lib/cotf.c (cotf),
5205         * device/lib/fabsf.c (fabsf),
5206         * device/lib/floorf.c (floorf),
5207         * device/lib/log10f.c (log10f),
5208         * device/lib/logf.c (logf),
5209         * device/lib/sinf.c (sinf),
5210         * device/lib/sinhf.c (sinhf),
5211         * device/lib/sqrtf.c (sqrtf),
5212         * device/lib/tanf.c (tanf),
5213         * device/lib/tanhf.c (tanhf),
5214         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
5215         replaced all instances of "reentrant" in the library functions
5216         defined in math.h with this macro.
5217         * support/regression/tests/float_trans.c: reenabled test for hc08
5218
5219 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
5220
5221         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
5222         erroneously deleted
5223
5224 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5225
5226         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
5227         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
5228         multi-byte volatile operands are used
5229         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
5230         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
5231         initialization to area GSINIT0 so that it would always precede
5232         any static initializers in GSINIT
5233         * support/regression/tests/zeropad.c: fixed idata define for hc08
5234         * support/regression/tests/bug-927659.c,
5235         * support/regression/tests/float_trans.c: disabled tests for hc08
5236         pending missing library routines
5237         * .version: increased version number to 2.4.4 - hc08 port now passes
5238         regression tests
5239
5240
5241 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
5242
5243         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
5244         * Makefile.common.in,
5245         * as/Makefile,
5246         * as/hc08/Makefile.in,
5247         * as/mcs51/Makefile.in,
5248         * as/z80/Makefile.in,
5249         * debugger/mcs51/Makefile.in,
5250         * device/include/Makefile.in,
5251         * device/lib/Makefile.in,
5252         * doc/Makefile,
5253         * link/Makefile,
5254         * link/z80/Makefile.in,
5255         * packihx/Makefile.in,
5256         * sim/ucsim/main_in.mk,
5257         * sim/ucsim/avr.src/Makefile.in,
5258         * sim/ucsim/doc/Makefile.in,
5259         * sim/ucsim/gui.src/serio.src/Makefile.in,
5260         * sim/ucsim/hc08.src/Makefile.in,
5261         * sim/ucsim/s51.src/Makefile.in,
5262         * sim/ucsim/xa.src/Makefile.in,
5263         * sim/ucsim/z80.src/Makefile.in,
5264         * src/Makefile.in,
5265         * support/cpp2/Makefile.in,
5266         * support/librarian/Makefile,
5267         * support/makebin/Makefile: added DESTDIR to the install path proposed
5268         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5269         * doc/sdccman.lyx: added DESTDIR documentation
5270
5271 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5272
5273         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5274         instruction for interrupt handlers, use fast returns when returning
5275         from high priority interrupts
5276
5277 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5278
5279         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5280         code generation
5281         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5282         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5283         bugs, ported much of Bernhard's code from mcs51
5284         * src/mcs51/gen.c (genSend),
5285         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5286         than one when calling a reentrant function
5287         * device/lib/_mullong.c: defined an alternate struct layout for big
5288         endian ports (hc08)
5289
5290 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5291
5292         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5293         test
5294
5295 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5296
5297         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5298         are sane and complete before asking the port its prefered parameter
5299         passing method (fixes bug #1017633)
5300         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5301         and _ret3
5302
5303 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5304
5305         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
5306         problem in bitfields >= 8 bits.
5307
5308 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5309
5310         * src/SDCCsymt.c: undid changes that were not meant to be committed
5311
5312 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5313
5314         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
5315
5316 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5317
5318         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
5319           copied and wrong bit got inverted
5320
5321 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5322
5323         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
5324         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
5325         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
5326         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
5327         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
5328         assignments to bitfields at known addresses
5329         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
5330         reads from bitfields at known addresses
5331         * src/hc08/ralloc.c (packRegisters),
5332         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
5333         genhc08Code): optimize pointer get values used as conditionals
5334         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
5335         and branch
5336
5337 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5338
5339         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
5340         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
5341         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
5342         as conditionals
5343
5344 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5345
5346         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
5347
5348 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5349
5350         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
5351         related problems
5352
5353 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
5354
5355         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
5356
5357 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5358
5359         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
5360         mcs51 port
5361
5362 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
5363
5364         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
5365
5366 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5367
5368         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
5369         cases use more compact code.
5370
5371 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
5372
5373         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
5374
5375 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5376
5377         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
5378
5379 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5380
5381         * src/SDCCsymt.h,
5382         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
5383         parameter of changePointer() from symbol* to sym_link*
5384         * src/SDCCast.c (decorateType): call changePointer() for CAST op
5385         * src/SDCCsymt.c (compareType): void* type is castable to other
5386         pointers, but not necesarily an exact match.
5387         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
5388         is no longer blindly treated as an exact match.
5389         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
5390
5391 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
5392
5393         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
5394
5395 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
5396
5397         * src/pic/gen.c,
5398         * src/pic/pcode.c,
5399         * src/pic/ralloc.h,
5400         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
5401
5402 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
5403
5404         * src/pic/device.c,
5405         * src/pic/device.h,
5406         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
5407
5408 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5409
5410         * src/mcs51/gen.c (emitcode): fixed bug #992819
5411
5412 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
5413
5414         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
5415           there's no need to make it worse
5416
5417 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5418
5419         * src/mcs51/ralloc.c (deassignLR),
5420         * src/ds390/ralloc.c (deassignLR),
5421         * src/hc08/ralloc.c (deassignLR),
5422         * src/z80/ralloc.c (deassignLR),
5423         * src/pic/ralloc.c (deassignLR),
5424         * src/pic16/ralloc.c (deassignLR),
5425         * src/avr/ralloc.c (deassignLR),
5426         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
5427         rlivePoint): fixed another part of bug #971834
5428
5429 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5430
5431         * src/z80/main.c: enabled "critical" keyword
5432         * src/z80/mappings.i,
5433         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
5434         functions (fixes bug #979646)
5435         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
5436
5437 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5438
5439         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
5440           such as c:\mydir.
5441
5442 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
5443
5444         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
5445           doesn't disable too much optimizations
5446
5447 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5448
5449         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
5450
5451 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
5452
5453         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
5454
5455 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5456
5457         * src/pic/gen.c tidied up tabs
5458         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
5459         * src/pic/main.c tidied up tabs
5460         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
5461         * src/pic/pcoderegs.c tidied up tabs
5462         * src/pic/ralloc.c tidied up tabs
5463
5464 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
5465
5466         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
5467         to S_FIXED for pic16 port and when symbol is not in level 0,
5468         allocate for S_REGISTER storage class and pic16 port, too,
5469         * src/pic16/device.h: prototype for checkSym,
5470         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
5471         * (pic16_assignConfigWordValue): test the value and the mask to
5472         validate that the value is suitable for the configuration word,
5473         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
5474         collect extern declared symbols, don't emit symbol twice, check
5475         first if symbol is in publics set first,
5476         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
5477         * added command line '--fstack' which enables an experimental
5478         feature for stack access, too buggy to be used yet...
5479         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
5480         * (pic16_allocDirReg): when register has storage class S_REGISTER
5481         allocate in pic16_dynAccessRegs,
5482         * device/include/pic16/pic18f????.h: modified configuration word
5483         naming convention, words started as CONFIG0H but should be CONFIG1H
5484
5485 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
5486
5487         * device/include/mcs51reg.h: fixed bug 970993
5488
5489 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
5490
5491         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
5492         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
5493         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
5494         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
5495         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
5496         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
5497           error/warning numbers,
5498           added function setWarningDisabled()
5499         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
5500         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
5501           _memcmp.c _memmove.c calloc.c realloc.c free.c
5502         * support/regression/tests/malloc.c: added tests for new functionality
5503         * support/regression/tests/zeropad.c: added tests for truncated initializers
5504           and initialized char arrays starting with '\x0'
5505         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
5506
5507 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
5508
5509         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
5510
5511 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5512
5513         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
5514         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
5515         peephole 177.e. Thanks to anonymous
5516
5517 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
5518
5519         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
5520         function isn't used in the source but referenced as a
5521         variable initializer then declare it as extern in .asm file
5522
5523 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
5524
5525         * .version: increased version number to 2.4.3
5526
5527         Adding version extension according to ChangeLog CVS revision
5528         * src/Makefile.in (target all): added dependency 'version.h'
5529         * (rule version.h): added rule to create version.h from ChangeLog,
5530         * (rule dep): added dependency version.h,
5531         * src/version.awk: AWK script to create version.h
5532         * src/SDCCdwarf2.c (dwWriteModule),
5533         * src/SDCCglue.c (initialComments),
5534         * src/SDCCmain.c (printVersionInfo): modified to write after
5535         version string the version extension number,
5536         * src/SDCCutil.c: included "version.h"
5537         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
5538         number,
5539         * src/SDCCutil.h: added prototype for getBuildNumber
5540
5541         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
5542         includeDirsSet, too,
5543         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
5544         const char [] is found in function prototype...
5545
5546         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
5547         moving to WREG with source is already in WREG,
5548         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
5549         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
5550         * (aopForSym): stack'ed symbols are partially supported, added
5551         if-clause to support symbols in FARSPACE,
5552         * (sameRegs): added test for AOP_ACC to see if registers are same,
5553         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
5554         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
5555         * (pic16_popRegFromString): will not allocate a new register if it
5556         doesn't find one by name, bug may have introduced...
5557         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
5558         * (genIpush): revived to use pic16 port's stack,
5559         * (genAddrOf): added incomplete case for stack'ed operand,
5560         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
5561         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
5562         can handle multibyte operands,
5563         * src/pic16/glue.c (pic16_printIval*): some debug info added,
5564         * (pic16initialComments): added message for MPLAB compatibility
5565         mode enabled,
5566         * src/pic16/main.h: prototype for pic16_mplab_comp,
5567         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
5568         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
5569         * (_pic16_linkEdit): NEW, handles link stage, transferred here
5570         because of increased complexity of procedure,
5571         * (_process_pragma): stack pragma changed to format 'stack pos len',
5572         emit symbol '_stack_end' to conform with gplink,
5573         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
5574         to search for register,
5575         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
5576         PO_GPR_REGISTER,
5577         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
5578         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
5579         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5580         case for PO_GPR_REGISTER,
5581         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
5582         dies, the new era is ahead !...
5583         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
5584         pic16_dynInternalRegs,
5585         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
5586         * (pic16_allocDirReg): minor optimizations and bug fixes,
5587         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
5588
5589         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
5590         load stack and frame pointer with address of 'stack_end' symbol
5591
5592 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
5593
5594         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
5595         without source code but only variable initializers
5596
5597 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
5598
5599         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
5600         external are not declared as extern to reduce overhead while linking
5601
5602 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
5603
5604         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
5605
5606 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
5607
5608         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
5609           Yee Keat for the patch
5610         * src/SDCCast.c (decorateType): fixed bug #979599
5611         * src/ds390/gen.h: removed local fReturnSizeDS390
5612         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
5613         * src/ds390/gen.c (genAnd, genOr, genXor),
5614         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
5615
5616 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
5617
5618         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
5619         add relFilesSet to $3, manipulate $2 to handle linking of object
5620         files without source files in command line,
5621         * device/include/pic16 (all headers): added ID location macros,
5622         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
5623         entries for ID location bytes,
5624         * (pic16_assignIdByteValue): NEW,
5625         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
5626         added field dumpcalltree to pic16_options_t,
5627         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
5628         is used instead of pic16_Gstack_base_addr, check if (ifx) before
5629         emitting rFalseIfx label after check_carry label,
5630         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
5631         pic16_emitDIRegs), NEW
5632         * (pic16glue): dump .calltree file when option --calltree found,
5633         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
5634         * (_pic16_genAssemblerPreamble): emit ID locations after
5635         configuration registers,
5636         * (pic16_linkCmd): modifications of the link command,
5637         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
5638         * (pic16_pCodeInitRegisters): don't init stack registers,
5639         * (pic16_findPrevInstruction): fixed bug,
5640         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
5641         bug with immediate registers,
5642         * (buildCallTree): traces stack push and pop,
5643         * (pct2): dump also stack usage for each function,
5644         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
5645         * (pic16_allocDirReg): various modifications,
5646         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
5647         fixed to 1,
5648
5649 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
5650
5651         * src/pic16/pcode.c: removed buggy double colon
5652
5653 2004-07-01 Borut Razem <borut.razem AT siol.net>
5654
5655         * support/scripts/sdcc.nsi: added include/pic16 to setup
5656
5657 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
5658
5659         * device/lib/Makefile.in: fixed bug in target objects-pic16,
5660         * device/lib/pic16/Makefile: prefixed with dash (-) command under
5661         target 'clean',
5662         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
5663         specific command line arguments. Also added sample lkr script
5664         for placing a variable at a specific memory bank.
5665         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
5666         at a specific memory bank,
5667         * (pic16_dump_isection): fixed bug which caused string literals to
5668         be omitted when dumping idata section,
5669         * (pic16_groupRegistersInSection): added code to handle registers
5670         in specific memory banks,
5671         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
5672         public, all references are renamed too,
5673         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
5674         AOP_DPTR2,
5675         * (pic16_storeForReturn): added case to handle when dest is WREG,
5676         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
5677         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
5678         pic16_rel_udata, check to see if that register is marked as being
5679         a member of a specific memory bank,
5680         * (pic16_printIvalCharPtr): added code to add string literals either
5681         to code or the idata sections,
5682         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
5683         also accept the 'udata' pragma,
5684         * src/pic16/main.h: new structure types sectName and sectSym
5685         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
5686         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
5687         * (pic16_findPrevInstruction): fixed, it returned nothing,
5688         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
5689         instruction combinations,
5690         * (pic16_FixRegisterBanking): heavily reorganised,
5691         * (pic16_AnalyzeBanking): if generating banksel directives is
5692         disabled, then don't call FixRegisterBanking at all,
5693         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
5694         completely removed,
5695         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
5696
5697 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
5698
5699         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
5700         Phuah Yee Keat <yk.phuah AT nestac.com>
5701
5702 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5703
5704         * src/pic16/glue.c (pic16createInterruptVect): function now emits
5705         correctly the IVT even if it is relocated to some other location
5706
5707 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5708
5709         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
5710         * device/include/pic16/pic18f2220.h: NEW,
5711         * device/lib/pic16/libdev/pic18f2220.c: NEW,
5712         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
5713         * src/pic16/device.c (struct Pics16): added info for 18f2220,
5714         * src/pic16/device.h (struct pic16_options): added ivt_loc and
5715         nodefaultlibs, ivt_loc is the location of the interrupt vector
5716         table, and nodefaultlibs signs that default libraries should not be
5717         linked in link stage,
5718         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
5719         according to --ivt-loc argument,
5720         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
5721         when pragma stack is found,
5722
5723 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5724
5725         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
5726         256 (range check), 257 (do while), 258.a-f (bit banging
5727         f.e. on 3-wire SPI bus)
5728
5729 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5730
5731         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
5732         variables used exclusively within a loop
5733
5734 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
5735
5736         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
5737
5738 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5739
5740         * src/SDCClrange.c (computeClash): fixed bug #971834
5741
5742 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5743
5744         * src/mcs51/gen.c (genCmp): fixed bug #975903
5745         * src/hc08/gen.c (operandsEqu),
5746         * src/ds390/gen.c (operandsEqu),
5747         * src/z80/gen.c (operandsEqu),
5748         * src/pic/gen.c (operandsEqu),
5749         * src/pic16/gen.c (operandsEqu),
5750         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
5751         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
5752
5753 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5754
5755         * src/SDCCcse.c (cseBBlock): fixed bug #966963
5756
5757 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
5758
5759         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
5760         default case in switch statement,
5761         * glue.c (pic16_initPointer): expr is initialised via decoarteType
5762         to eliminate problem with initialisation of pointers, but problem
5763         still exists,
5764         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
5765         * (emitStaticSegment): removed various lines emitting debug info,
5766         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
5767         added processor registers for utilizing EEPROM,
5768         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
5769         configurable and set 8
5770
5771 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
5772
5773         * .version: increased version number to 2.4.2,
5774
5775         Cumulative patch for pic16 port
5776         * src/pic16/device.c: changed scheme to dump initial values for
5777         variables in idata segment, all print_idata* functions were removed,
5778         now the pic16_printIval* will be called,
5779         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
5780         * _pic16_printPointerType, pic16_printPointerType,
5781         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
5782         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
5783         NEW, similar to the respective functions in SDCCglue.c,
5784         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
5785         way, emitting hex bytes,
5786         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
5787
5788 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5789
5790         * src/avr/ralloc.c (serialRegAssign),
5791         * src/xa51/ralloc.c (serialRegAssign),
5792         * src/pic/ralloc.c (serialRegAssign),
5793         * src/pic16/ralloc.c (serialRegAssign),
5794         * src/hc08/ralloc.c (serialRegAssign),
5795         * src/z80/ralloc.c (serialRegAssign),
5796         * src/ds390/ralloc.c (serialRegAssign),
5797         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5798
5799 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5800
5801         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5802         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5803
5804 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5805
5806         Cumulative patch for pic16 port:
5807         * src/pic16/device.h (typedef PIC16_device) modified fields for
5808         defining microcontrollers,
5809         * src/pic16/device.c: added new info for all devices in Pics16 array,
5810         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5811         to be optimised out by the pCode optimiser,
5812         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5813         specially, bug reported by G.M. Gallant,
5814         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5815         as force'd so that cannot be optimised out by pCode optimiser,
5816         * src/pic16/pcode.c,
5817         * src/pic16/pcodepeeph.c,
5818         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5819         they are disabled by default, but can be enabled explicit with
5820         command argument --denable-peeps, for testing,
5821         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5822         --pomit-ivt in COMPILE_FLAGS
5823
5824 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5825
5826         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5827           compilation on MSVC
5828
5829 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5830
5831         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5832
5833 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5834
5835         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5836         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5837
5838 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5839
5840         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5841         would only assign 0x300001 register.
5842
5843 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5844
5845         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5846         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5847
5848 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5849
5850         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5851         for ds80c400
5852         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5853         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5854         added peephole 254 (left shift), 255 (jump table)
5855
5856 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5857
5858         * device/lib/Makefile.in: removed comment line with model-pic16,
5859         * (target port-specific-objects-pic16): the libraries and objects
5860         are copied to the build directory form the device/lib/pic16/bin
5861         directory
5862
5863         Cumulative patch concerning pic16 port:
5864         * library directory has been re-organized,
5865         * added support for PIC18F1220,
5866         * added headers and library sources for chips 18f1220,18f6520,
5867         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5868
5869         * configuration registers setting has changed, now each supported
5870         device has a complete description of the registers it uses,
5871         * all initialisations are moved to idata sections, these section
5872         can be absolute or relocatable,
5873         * fixed initialisation of codespace variables,
5874         * fixed warning about PCLATU and gpsim,
5875         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5876         * (genAssign): use table reads when assigning from variables in codespace,
5877         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5878         char/int variables placed in codespace,
5879         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5880         registers set in .asm file, no need for --pomit-config-words anymore,
5881         * (pic16glue): some 8051 legacy segments are commented out
5882         (to be removed completely),
5883         * added support for alternative assembler and linker with --asm=
5884         and --link= command line arguments,
5885         * peepholes are disabled automatically in the port, no need to
5886         specify on command line,
5887         * port supports natively char/int/long multiplication, but converts
5888         all divisions to support functions,
5889         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5890         to the file set in variable $2,
5891         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5892         strings in ASCII format and not in hex,
5893         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5894         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5895         allocate proper register if iCodes aren't temporary,
5896
5897 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5898
5899         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5900
5901 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5902
5903         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5904         is commented out
5905
5906 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5907
5908         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5909         computed address is reused
5910         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5911         multi-byte bitfields
5912
5913 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5914
5915         * src/z80/gen.c: (genArrayInit): must check for pointers too
5916
5917 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5918
5919         * support/regression/tests/zeropad.c: never meant to commit the
5920           nestedstruct test: removed, added check for GCC version
5921
5922 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5923
5924         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5925         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5926         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5927           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5928           bugs 928906 and 954082 half-empty initializers
5929         * src/SDCCsymt.h,
5930         * src/SDCCsymt.c (getAllocSize): added for above fix
5931         * src/z80/gen.c (genArrayInit): fixed bug 741044
5932         * support/regression/tests/zeropad.c: added tests
5933
5934 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5935
5936         * src/pic16/device.c (pic16_dump_section): corrected bug which
5937         caused some symbols of the libraries to be misplaced
5938
5939 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5940
5941         * src/pic16/glue.c,
5942         * src/pic16/ralloc.h,
5943         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5944         to fix conflict with pic port
5945
5946 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5947
5948         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5949         externs configuration variables,
5950         * src/pic16/ralloc.h,
5951         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5952         prototype in header, commented out some debug messages
5953
5954 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5955
5956         * src/pic16/glue.c,
5957         * src/pic16/main.c,
5958         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5959         for gpasm COFF object generation. Thanks to D. Hawkins for
5960         his patch info
5961
5962 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5963
5964         * src/ds390/main.c,
5965         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5966         Brock for spotting this)
5967         * src/ds390/gen.c (genEndFunction),
5968         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5969         interrupt handler and critical. Disable push/pop optimizations when
5970         peephole optimizations disabled.
5971
5972 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5973
5974         Updated pic16 library sources and headers.
5975         * device/lib/pic16/pic18f*/ ,
5976         * device/include/pic16/*.h: modified to handle structured SFR
5977         definitions
5978
5979 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5980
5981         * src/port.h (PORT structure): added hook initPaths, now each
5982         port can declare its own default search paths,
5983         which can been seen with the --print-search-dirs option,
5984         see pic16 port for example,
5985         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5986         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5987         * (doPrintSearchDirs): NEW, replaces in a central manner the
5988         printing of search dirs which was split in set*Paths functions,
5989         * (main): added call to port->initPaths and doPrintSearchDirs,
5990         * src/avr/main.c,
5991         * src/ds390/main.c,
5992         * src/hc08/main.c,
5993         * src/izt/i186.c,
5994         * src/izt/tlcs900h.c,
5995         * src/mcs51/main.c,
5996         * src/pic/main.c,
5997         * src/pic16/main.c: modified port structures to reflect addition of
5998         initPaths hook,
5999
6000         * src/pic16/device.c (regCompare): registers are finally sorted by name,
6001         * (pic16_dump_section): for registers in same address reserve memory once,
6002         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
6003         to no_banksel,
6004         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
6005         result is greater in size than right or left,
6006         * (pic16_genUMult8X8_8): there are some cases where the result can
6007         be 16 bits size, so handle these,
6008         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
6009         * (pic16_outBitC): modified to emit pcodes,
6010         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
6011         or not,
6012         * (genDivOneByte): implemented algorithm to divide 8-bits,
6013         * (genCmp): uncommented goto, but issues still exist,
6014         * (genAnd): fixed a bug with variables >8bits,
6015         * (genPackBits): optimization added that uses BCF/BSF to change a
6016         single bit,
6017         * (genAssign): fixed bug when assigning floating point literals,
6018         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
6019         __sdcc_gsinit_startup label,
6020         * src/pic16/main.c (_pic16_init): removed search directory
6021         initialisations,
6022         * (_pic16_initPaths): NEW, used to initialise search directories,
6023         * (_hasNativeMulFor): support functions for all except char/int
6024         multiplication, and char division,
6025         * (PIC16_port struct): modified entry for native mul support,
6026         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
6027         no_banksel option,
6028         * (buildCallTree): call to register_usage is ifdef'ed out,
6029
6030 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6031
6032         * device/include/string.h: applied Stas Sergeev's patch to make this
6033         header file compatible with the preprocessor -Wundef option
6034         * src/SDCCmain.c (main): abort compilation if preprocessor reports
6035         failure (fixes bug #941458)
6036
6037 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6038
6039         * src/SDCCopt.c (killDeadCode): fixed bug #907733
6040         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
6041         that the variable, not the function, should be static
6042         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
6043         to be consistent with non-literal case
6044
6045 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6046
6047         * src/SDCCast.c (isConformingBody): fixed bug #949967
6048         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
6049         convilong): fixed bug #952086
6050
6051 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6052
6053         * src/SDCCmem.c (allocVariables): fixed bug #955321
6054
6055 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6056
6057         * src/hc08/main.c (_hc08_genAssemblerEnd),
6058         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
6059         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
6060         completely eliminated the use of a temporary file
6061         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
6062         when more than one file linked
6063         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
6064
6065 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6066
6067         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
6068         which fixes bug #543481
6069         * support/regression/tests/bug-751703.c: fixed comments left from a
6070         cut and paste error
6071         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
6072         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
6073         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
6074         scopes
6075         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
6076         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
6077         are now changed to underscores in moduleName
6078
6079 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6080
6081         * as/mcs51/lkmem.c: better fix for bug #954173
6082
6083 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
6084         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6085
6086         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
6087         * device/include/c8051f000.h,
6088         * device/include/c8051f120.h,
6089         * device/include/c8051f300.h,
6090         * device/include/c8051f310.h,
6091         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
6092         PWM16) and detab'ed
6093
6094 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6095
6096         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
6097         and mailing lists, doc'ed --no-peep-comments, removed reference
6098         to knoppix (newest version has no LyX/LaTeX), other minor changes
6099         * src/SDCCglue.c (glue): save 2 bytes stack space with
6100         option --main-return. The ljmp could probably be avoided too
6101
6102 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6103
6104         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
6105
6106 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6107
6108         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
6109         * src/SDCCopt.c (isLocalWithoutDef),
6110         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
6111         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
6112         (credit to Maarten Brock for patch #949363, on which this is based)
6113         * support/regression/tests/bug-751703.c: some test cases of extern used
6114         within inner scopes.
6115
6116 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6117
6118         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
6119         SPEC_STRUCT
6120         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
6121         struct definitions
6122         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
6123         dwWriteLabel): fix to create valid debugger symbols even when
6124         the module name has non-alphanumeric symbols in it
6125         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
6126         when a variable's allocation has been optimized away
6127
6128
6129 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6130
6131         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
6132         * src/hc08/main.c,
6133         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
6134         * src/mcs51/main.c,
6135         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
6136         * src/ds390/main.c,
6137         * src/z80/gen.c (z80_emitDebuggerSymbol),
6138         * src/z80/main.c,
6139         * src/pic/gen.c (pic14_emitDebuggerSymbol),
6140         * src/pic/main.c,
6141         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
6142         * src/pic16/main.c,
6143         * src/avr/gen.c (avr_emitDebuggerSymbol),
6144         * src/avr/main.c,
6145         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
6146         * src/xa51/main.c,
6147         * src/SDCCdebug.c (emitDebuggerSymbol),
6148         * src/SDCCdebug.h,
6149         * src/port.h: added a debugger struct to the port struct. Added a
6150         callback for defining debugger symbols
6151
6152         * src/SDCCast.c (createLabel),
6153         * src/SDCC.y (labeled_statement): mark all compiler generated labels
6154         with isitmp = 1
6155         * src/SDCCicode.h,
6156         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
6157         iCode back to the ast for the function
6158
6159         * src/hc08/ralloc.c (hc08_assignRegisters),
6160         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
6161         unneeded fields from the regs struct.
6162         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
6163         pushReg() & pullReg() functions instead of emitcode()
6164
6165         * src/hc08/gen.c (genLabel, genhc08Code),
6166         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
6167
6168         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
6169         debugger hooks
6170
6171         * src/hc08/gen.c (genEndFunction, genhc08Code),
6172         * src/hc08/gen.h,
6173         * src/mcs51/gen.c (genEndFunction, gen51Code),
6174         * src/mcs51/gen.h,
6175         * src/ds390/gen.c (genEndFunction, gen390Code),
6176         * src/ds390/gen.h,
6177         * src/z80/gen.c (genEndFunction, genZ80Code),
6178         * src/z80/gen.h,
6179         * src/z80/z80.h,
6180         * src/pic/gen.c (genEndFunction, genpic14Code),
6181         * src/pic/gen.h,
6182         * src/pic16/gen.c (genEndFunction, genpic16Code),
6183         * src/pic16/gen.h,
6184         * src/avr/gen.c (genEndFunction, genAVRCode),
6185         * src/avr/gen.h,
6186         * src/xa51/gen.c (genEndFunction, genXA51Code),
6187         * src/xa51/gen.h,
6188         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
6189         specific code to cdbFile.c and out of the backend code generators
6190
6191         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
6192         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
6193         starting address is now 0
6194
6195         * as/hc08/asm.h,
6196         * as/hc08/m08pst.c,
6197         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
6198         assembler directive for DWARF support
6199         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
6200
6201         * src/src.dsp,
6202         * src/Makefile.in,
6203         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
6204
6205 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6206
6207         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
6208         and inappropriate peephole optimization in jump tables
6209
6210 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6211
6212         * as/hc08/m08pst.c,
6213         * src/SDCCglue.c: sdccopt works for the hc08 port now
6214
6215 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
6216
6217         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
6218
6219 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6220
6221         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
6222
6223 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6224
6225         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
6226         rules
6227         * src/SDCCmain.c,
6228         * src/SDCCglobl.h,
6229         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
6230         comments from the peephole optimizer replacement rules
6231         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
6232         symbols
6233         * src/SDCCcse.c (updateSpillLocation),
6234         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
6235         equivalents
6236         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
6237         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
6238         objects far pointers
6239
6240 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6241
6242         * src/SDCCsymt.h: a missing part of my last change
6243         * src/pic/ralloc.c (regTypeNum),
6244         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
6245
6246 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6247
6248         * src/SDCCicode.h,
6249         * src/SDCCicode.c (aggrToPtrDclType),
6250         * src/SDCCptropt.h,
6251         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
6252         ptrPseudoSymConvert),
6253         * src/pic/ralloc.c (regTypeNum),
6254         * src/pic16/ralloc.c (regTypeNum),
6255         * src/hc08/ralloc.c (regTypeNum),
6256         * src/ds390/ralloc.c (regTypeNum),
6257         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
6258         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
6259
6260 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6261
6262         * link/z80/lkmain.c (afile),
6263         * as/hc08/lkmain.c (afile),
6264         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
6265         prevent a pointer problem when a filename has no directory and
6266         no extension specified.
6267
6268 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6269
6270         * link/z80/lkmain.c (afile): allow periods in directory names
6271         * link/z80/lkmain.c (afile),
6272         * as/mcs51/lkmain.c (afile),
6273         * as/hc08/lkmain.c (afile): allow linker script file to have an
6274         extension other than ".lnk"
6275         * link/z80/lklex.c (getfid),
6276         * link/z80/lkmain.c (parse),
6277         * as/mcs51/lklex.c (getfid),
6278         * as/mcs51/lkmain.c (parse),
6279         * as/hc08/lklex.c (getfid),
6280         * as/hc08/lkmain.c (parse): Support comments in the linker script
6281         file on lines by themselves and after filenames
6282
6283 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6284
6285         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6286
6287 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6288
6289         * src/z80/peeph-z80.def: removed some peephole rules that don't
6290         work with multibyte arithmetic (fixed bug #937126)
6291         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6292         to registers and not global variables
6293         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6294         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6295         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6296         checking for assignments not internally generated (fixed bug #931895)
6297         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6298         structure member (fixed bug #930072)
6299
6300 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6301
6302         * src/SDCCmain.c (linkEdit),
6303         * src/hc08/main.c (_hc08_parseOptions),
6304         * as/hc08/Makefile.in,
6305         * as/hc08/aslink.h,
6306         * as/hc08/asm.h,
6307         * as/hc08/m08pst.c,
6308         * as/hc08/lkrloc.c (relr, rele),
6309         * as/hc08/lkarea.c (lnkarea)
6310         * as/hc08/lkmain.c (afile, parse),
6311         * as/hc08/lkelf.c: support for ELF output
6312         * as/hc08/lks19.c (s19),
6313         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
6314
6315 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6316
6317         * as/mcs51/lkihx.c: Fixed bug #899105.
6318
6319 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6320
6321         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
6322         .dsp files from Unix to DOS.
6323
6324 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6325
6326         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
6327         function pointers; we have been compliant for several months now.
6328         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
6329         change that was accidently commented out
6330         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
6331         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
6332         bug #922319
6333
6334 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6335
6336         * src/hc08/gen.c: output of all of the internal debugging information
6337         is now controlled by the D() macro; it is disabled by default
6338
6339 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6340
6341         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
6342         harder to keep the same registers during a CAST iCode
6343         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
6344         long via int can be done in a single cast, if the signedness is
6345         correct.
6346         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
6347         putchar() in tinibios.c in ds390's library
6348
6349 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
6350
6351         * src/SDCCast.c (decorateType): fixed bug #898889,
6352         cast result of a literal complement too
6353         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
6354         fixed check for bitfields
6355
6356 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
6357
6358         * src/SDCCicode.c (geniCodeLogic): made it static,
6359         (geniCodeLogicAndOr): added in order to fix bug #905492,
6360         (ast2iCode): fixed bug #905492
6361         * support/regression/tests/bug-905492.c: added
6362         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
6363         (processParms): fixed bug #927659: don't copy parms, this will clear
6364         decorated flag
6365         * support/regression/tests/bug-927659.c: added
6366
6367 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
6368
6369         * src/SDCCast.c (addCast): don't cast float to char
6370         * device/lib/libsdcc.lib: added _memmove
6371
6372 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
6373
6374         * device/lib/large/Makefile: fixed parallel execution by
6375         replacing `make` by `$(MAKE)`
6376
6377 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6378
6379         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
6380         offsets (fixes bug #923936)
6381
6382 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
6383
6384         * device/lib/small/Makefile: fixed parallel execution by
6385         replacing `make` by `$(MAKE)`
6386
6387 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6388
6389         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
6390
6391 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
6392
6393         * src/pic/gen.c (genCpl): multi-byte complements were not working.
6394         * src/regression/Makefile: Regression test was not running.
6395
6396 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6397
6398         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
6399         complement if possible
6400         * src/SDCCval.c (valComplement),
6401         * src/SDCCicode.c (operandOperation): fixed complement of literal
6402         * support/regression/tests/onebyte.c (testComplement): added
6403
6404 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
6405
6406         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
6407         return an optimized tree; actually replace actParm with the new tree
6408         * src/SDCCast.h: added some parantheses to remove side effects
6409         * support/regression/tests/bug-920866.c
6410
6411 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
6412         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
6413         Bit operands were not being handled properly in the pic14 port.
6414         (now src/regression/add.c passes again).
6415
6416 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6417
6418         * src/SDCC.y (labeled_statement): case and default no longer require
6419         a following statement (RFE #893037)
6420
6421 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6422
6423         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
6424         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
6425         disabled (fixes bug #916294)
6426         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
6427         "mov a,acc"; patch provided by Lenny Story
6428         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
6429
6430 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6431
6432         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
6433         functions
6434         * src/ds390/gen.c (genFunction, genEndFunction),
6435         * src/ds390/ralloc.c (ds390_assignRegisters),
6436         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
6437         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
6438         pushed if there are parameters passed on the stack. Also, a cleaner
6439         way to decide if r0/r1 should be pushed/popped. (Together they fix
6440         bug #918693)
6441
6442 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6443
6444         * doc/sdccman.lyx,
6445         * device/lib/mcs51/crtpagesfr.asm,
6446         * device/lib/mcs51/crtxinit.asm,
6447         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
6448         to avoid confusion with Si Lab's SFRPAGE register.
6449
6450 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6451
6452         * src/SDCCglue.c (emitMaps): allow public sfr variables
6453         * src/SDCCglue.c (initialComments): include compiler build date
6454         with compiler version and put the timestamp of the generated
6455         assembly file on a serperate line to be less confusing.
6456         * src/port.h: added genInitStartup hook
6457         * src/avr/main.c,
6458         * src/ds390/main.c,
6459         * src/hc08/main.c,
6460         * src/pic/main.c,
6461         * src/pic16/main.c,
6462         * src/xa51/main.c,
6463         * src/z80/main.c: genInitStartup initialize as NULL (default to
6464         historical behaviour)
6465         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
6466         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
6467         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
6468         library instead of hard coding it into the compiler.
6469         * support/regression/ports/mcs51-stack-auto/spec.mk,
6470         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
6471         * device/lib/mcs51/Makefile,
6472         * device/lib/small/Makefile,
6473         * device/lib/large/Makefile,
6474         * device/lib/mcs51/crtpagesfr.asm,
6475         * device/lib/mcs51/crtstart.asm,
6476         * device/lib/mcs51/crtxclear.asm,
6477         * device/lib/mcs51/crtxinit.asm,
6478         * device/lib/mcs51/crtclear.asm,
6479         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
6480         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
6481         and into user configurable files.
6482         * device/lib/clean.mk: clean mcs51 directory too
6483         * support/regression/tests/longlit.c: added static to T1 declaration
6484         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
6485         accesses in the initialization code
6486
6487 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6488
6489         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
6490         OSCTRIMVAL as noted in bug #916008
6491
6492 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6493
6494         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
6495         in loops with multiple exits (reported as incorrect registers
6496         used by Martin Helmling in Sdcc-user list)
6497
6498 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6499
6500         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
6501         made ds390 register extensions look less like error messages
6502
6503 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6504
6505         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
6506         reported by Adam Wozniak in Sdcc-user list
6507
6508 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
6509
6510         * src/SDCCast.c (decorateType): fixed with bug and promotion in
6511         arithmetic optimizations, added debug output
6512
6513 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
6514
6515         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
6516         * sdcc.spec: updated and split sdcc into 3 rpms
6517         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
6518         needed for literals of LEFT_OP and '+'
6519         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
6520         introduced RESULT_TYPE_NOPROM
6521         (geniCodeMultiply): fixed logic for decision if mul is optimized to
6522         left shift
6523         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
6524         limited promotion to int only for '*'
6525         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
6526
6527 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
6528
6529         * src/pic16/gen.c (genSkip),
6530         (genc16bit2lit), (gencjneshort): commented out
6531         (is_LitOp): new helper function, checks operand type
6532         (genCmpEq): rewritten
6533
6534 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
6535
6536         * support/regression/tests/bug-908454.c: added
6537
6538 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
6539
6540         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
6541         * src/SDCCicode.c (usualBinaryConversions): op needs int type
6542         (geniCodeCast): cosmetic, don't preserve bit storage class
6543         (geniCodeLeftShift): added promotion
6544         (geniCodeLogic): fixed regression
6545         * src/SDCCsymt.c (computeTypeOr): accept bits too
6546         (compareType): 2nd part of fix for bug #908454, needed for bitfields
6547
6548 2004-03-07  Borut Razem <borut.razem AT siol.net>
6549
6550         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
6551
6552 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
6553
6554         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
6555         version of pic16_genPackRegisters which does not check if ic is a
6556         CAST operator,
6557         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
6558         function cause string1.c regression test fails
6559
6560 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
6561
6562         * sim/ucsim/configure.in,
6563         * sim/ucsim/configure,
6564         * sim/ucsim/doc/Makefile.in: use docdir
6565         * src/SDCC.y: fixed sbit atrributes
6566         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
6567         * src/SDCCast.c (decorateType): |^& need special promotion handling
6568         * src/SDCCast.h,
6569         * src/SDCCsymt.h: moved definition of RESULT_TYPE
6570         * src/SDCCsymt.h (computeType),
6571         * src/SDCCicode.c: computeType() needs op
6572         * src/SDCCsymt.c (checkTypeSanity),
6573         * doc/sddman.lyx: "plain" bitfields are unsigned
6574         * src/SDCCsymt.c (computeTypeOr): added
6575         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
6576         |^& ops
6577         * src/SDCCval.c (val*): computeType() needs op
6578         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
6579         * support/regression/tests/onebyte.c: added tests for |^&
6580
6581 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
6582
6583         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
6584         for writing icode into asm output.
6585
6586 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
6587
6588         * src/pic16/device.c: added some debug lines enabled
6589         with macro DEBUG_CHECK,
6590         * src/pic16/genarith.c: more debug in genPlus,
6591         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
6592         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
6593         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
6594         * (aopForSym): onStack symbols are re-placed in data memspace,
6595         and onStack flag is cleared,
6596         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
6597         copy temporary pcodeop,
6598         * (genPcall): added warning for not updating PCLATU,
6599         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
6600         always true for pic16 port,
6601         * (genMultOneWord): NEW, supports integer multiplication,
6602         * (genMult): modified to call genMultOneWord,
6603         * (ifxForOp): added warning when return NULL,
6604         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
6605         flag is set before call to operandFromSymbol for implicit
6606         added structures,
6607         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
6608         options.intlong_rent are set by default,
6609         * (_hasNativeMulFor): modified to allow port generation of integer
6610         multiplication,
6611         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
6612         set regtype to REG_SFR for all registers, restricting seting the
6613         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
6614
6615 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6616
6617         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
6618         more than 500 times in the regression tests
6619
6620 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6621
6622         * support/Util/SDCCerr.h,
6623         * support/Util/SDCCerr.c,
6624         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6625         enumerator_list),
6626         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
6627         for symbol conflicts.
6628         * support/valdiags/tests/enum.c,
6629         * support/valdiags/tests/tentdecl.c,
6630         * support/valdiags/tests/struct.c: expect possible error messages
6631         referring to original symbol definitions.
6632         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
6633         * src/SDCCsymt.h,
6634         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
6635
6636 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
6637
6638         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
6639
6640 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
6641
6642         * src/pic16/ralloc.c (newReg): fixed bug #908929
6643
6644 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6645
6646         * src/ds390/gen.c: added missing #include "main.h"
6647
6648 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
6649
6650         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
6651         checking if symbol is already in set,
6652         * src/pic16/device.h: prototype for checkAddSym,
6653         * src/pic16/gen.c: (_G): added entry interruptvector,
6654         * (assignResultValue): removed some commented out lines,
6655         * (genFunction): check for ISR via sym->type, absolute section for
6656         interrupt code is created via a new pBlock, the goto instruction is
6657         placed now correctly at the interrupt vector position, changed all
6658         references from ivec to _G.interruptvector,
6659         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
6660         is the interrupt is a high priority one, same for return from ISR,
6661         * src/pic16/glue.c: changed all calls of addSetHead for publics and
6662         externs to calls of checkAddSym,
6663         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
6664         pic16_pcode_verbose flag is set,
6665         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
6666         * src/pic16/pcoderegs.c: message about how many registers are saved
6667         will only be emitted if pic16_pcode_verbose flag is set,
6668
6669 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6670
6671         * src/ds390/ralloc.h,
6672         * src/ds390/ralloc.c (ds390_regWithIdx),
6673         * src/ds390/gen.c (emitcode),
6674         * src/ds390/main.h,
6675         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
6676         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6677         ds390operandCompare, getRegsRead, getRegsWritten,
6678         initializeAsmLineNode): customized instruction size calculation for
6679         ds390, started basis for some register optimizations
6680         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
6681         corresponding assembly output
6682         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
6683         missing push/pop of r0/r1. Optimized push/pops
6684
6685 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6686
6687         * src/mcs51/main.c (instructionSize): fixed ACALL size
6688         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
6689
6690 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
6691
6692         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
6693         the sorting of rlist with NULL elements
6694         * (print_idataType, print_idata): NEW to create idata sections
6695         * src/pic16/device.h: idataSymSet new variable
6696         * src/pic16/gen.c (genFunction): fixed some bugs in string
6697         comparing, improved the absolute section creation for ISRs,
6698         added FSR0L/FSR0H in registers that are saved in an ISR,
6699         * (genInline): fixed the processing of inline snippets,
6700         now they undergo no process by the peephole optimizer
6701         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
6702         are placed in idataSymSet,
6703         * (pic16emitStaticSeg): extern symbols are added in externs,
6704         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
6705         switching when aboslute variables are placed in access bank memory
6706         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
6707         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
6708         commented out with #if,
6709         * (pic16_packRegisters): reintroduce the check for CAST because some
6710         symbols are not correctly handled,
6711         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
6712         pCodeInstruction instead of pCode,
6713         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
6714         pCodeAsmDir definition,
6715         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
6716         directive, then the argument directive is emitted without the leading
6717         tab, hack for inline labels which must be in the first column,
6718         * (compareLabel,pic16_findNextInstruction),
6719         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
6720         * (insertBankSwitch): modified for the new pCodeAsmDir,
6721
6722 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6723         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
6724
6725         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
6726         instance,
6727         * (pushSide): commented out with #if,
6728         * (assignResultValue): fixed some typos in saving
6729         registers,
6730         * (genPcall): FIXED and sync'ed with genCall,
6731         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
6732         * (genNearPointerGet): fixed to handle some more cases,
6733         implementation scheme via table reads,
6734         * (genConstPointerGet): modified to access code memory correct,
6735         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
6736         and improved to handle some cases
6737         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
6738         instead of "RETLW" for init data
6739         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
6740         not IN_DIRSPACE, work around to reduce bank switching when aboslute
6741         variables are placed in access bank memory (<0x80 and >=0xf80),
6742         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
6743         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
6744         TBLWT_POSTDEC,TBLWT_PREINC
6745         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
6746         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
6747         directives
6748         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
6749         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
6750         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
6751         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
6752
6753 2004-02-29  Borut Razem <borut.razem AT siol.net>
6754
6755         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
6756         support/Util/findme.h, support/Util/system.h: enhance binary relative
6757         search for lib and include by using findProgramPath()
6758
6759 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6760
6761         * src/SDCCpeeph.h,
6762         * src/SDCCpeeph.c (pcDistance),
6763         * src/port.h,
6764         * src/mcs51/ralloc.h,
6765         * src/mcs51/ralloc.c (mcs51_regWithIdx),
6766         * src/mcs51/main.h,
6767         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
6768         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6769         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
6770         size calculation port specific, started basis for some register
6771         optimizations
6772         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
6773         missing push/pop of r0/r1. Optimized push/pops
6774         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
6775         * device/lib/_modsint.c (_modsint),
6776         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
6777         and stack version so regression tests pass
6778
6779 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
6780
6781         * src/Makefile.in (dep): include SLIBOBJS in dependency check
6782         * src/SDCCast.c (decorateType): catch another small optimization
6783         with '?' operator
6784         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
6785         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
6786         modified to finally use computeType() all over SDCC,
6787         see Feature Request #877103
6788         * src/SDCCval.h: cosmetic
6789         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
6790         valCompare(); regression tested in muldiv.c
6791         * support/regression/tests/muldiv.c (testMod): mod sign follows
6792         dividend only
6793
6794 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
6795
6796         * src/SDCCast.c (decorateType): fixed bug #902362
6797         * doc/INSTALL.txt: fixed install instructions for win32
6798
6799 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6800
6801         * device/include/Makefile.in (install): fixed by replacing spaces
6802         by tabs
6803         * doc/README.txt,
6804         * doc/INSTALL.txt: updated for release
6805         * doc/sdccman.lyx: added warning for --xstack being buggy
6806
6807 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6808
6809         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6810         to eliminate build warnings.
6811         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6812
6813 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6814            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6815
6816         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6817         removed -penable-stack, added comment for stack pragma, added
6818         warning for not initializing the stack/frame registers, removed
6819         comment at interrupts section
6820
6821         Stack is made permanent, there is no ability to disable stack usage.
6822         * src/pic16/device.h,
6823         * src/pic16/device.c: removed all references to USE_STACK macro,
6824         * src/pic16/device.c (pic16_dump_section): when no elements in
6825         rlist, free rlist before return,
6826         * (pic16_dump_int_registers): NEW, internal registers are a new set
6827         of general purpose registers reused by each function,
6828         * (checkAddReg): returns 1 if registers is added to set,
6829         * (pic16_groupRegistersInSection): when a registers is of type
6830         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6831         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6832         SRCASECMP macro is moved here from device.c
6833         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6834         PO_PCLATU, PO_PRODL, PO_PRODH,
6835         * (pic16_pCodeOpType, genMinus,
6836         changed compares to "a" register, with AOP_ACC,
6837         * (pic16_genPlus): fixed some bugs and indented properly,
6838         * (pic16_addSign): changed size to size+offset in the MOVWF
6839         instruction,
6840         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6841         multiply 8-bit operand by literal, result is 8-bit,
6842         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6843         multiply 2 8-bit operand, result is 8-bit,
6844         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6845         genUMult8X*_16,
6846         * src/pic16/gen.c: changed accUse to contain WREG only,
6847         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6848         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6849         true, do not use immediate addressing any more unless sym is a
6850         pointer in codespace,
6851         * (aopForRemat): do not use immediate addressing when symbol not in
6852         codespace and when symbol's address is requested,
6853         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6854         accUse size (= 1),
6855         * (aopGet): added case for AOP_ACC and don't return "accumulator
6856         bug" but WREG instead,
6857         * (popGetTempReg): pushes contents of temporary register in stack,
6858         * (popReleaseTempReg): pops contents of temporary register from
6859         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6860         * (pic16_popGet): separated case AOP_ACC to return register WREG
6861         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6862         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6863         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6864         the use of immediate pointers to certain cases only.
6865
6866         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6867         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6868         * (assignResultValue, genCall, genRet): modified to use the new
6869         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6870         genPcall is still broken,
6871         * (genFunction): added code to create 'A' type pBlocks when
6872         interrupt functions are generated, code not extensively tested yet,
6873         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6874         * (genEndFunction): modified so ISRs pop stored registers from stack,
6875         * (genMultOneByte): cleanup,
6876         * (AccRsh): added flag andmask, to and result with appropriate mask,
6877         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6878         * (genDataPointerGet): fixed and reenabled its use,
6879         * (genNearDataPointerGet): bugs fixed,
6880         * (genDataPointerSet): bugs fixed,
6881         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6882         pic16_DumpSymbol, pic16_DumpOp,
6883         * src/pic16/genutils.h: function prototypes for the above functions,
6884         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6885         pointers,
6886         * (pic16emitRegularMap): many many many improvements, but needs a
6887         major cleanup,
6888         * src/pic16/main.c: enable_stack in pic16_options is removed,
6889         * (_pic16_parseOptions): removed command line options -penable-stack,
6890         * (_process_pragma): emit stack symbol only when stack pragma is
6891         processed,
6892         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6893         redirected to FSR0L/FSR0H pair,
6894         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6895         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6896         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6897         for immediates,
6898         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6899         * (dumpPicOptype): NEW,
6900         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6901         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6902         with movff instruction,
6903         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6904         added pic16_int_regs, some packRegsFor* functions are commented out,
6905         because produce errors,
6906         * src/pic16/NOTES: minor modifications
6907
6908 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6909
6910         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6911         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6912         --pack-iram.
6913         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6914         * as/mcs51/lkaomf51.c: fixed bug #895763
6915
6916 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6917
6918         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6919
6920 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6921
6922         * doc/sdccman.lyx: added details about the HC08 storage classes and
6923         interrupts, fixed the register usage info for z80 & gbz80
6924
6925 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6926
6927         * doc/sdccman.lyx: added more pic16 port documentation
6928         * device/include/pic16/: added header pic18fregs.h
6929
6930 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6931
6932         * doc/sdccman.lyx: added Vangelis' contribution
6933
6934 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6935
6936         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6937         extend to the next CALL or PCALL, not just to the next CALL.
6938
6939 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6940
6941         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6942
6943 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6944
6945         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6946         bug #895752 and a better fix for bug #716790
6947
6948 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6949
6950         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6951
6952 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6953
6954         * doc/sdccman.lyx: minor changes, minor changed
6955
6956 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6957
6958         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6959         which can't handle SDCC_NEWONEBYTEOPS,
6960         (geniCodeMultiply): removed conversion from mult to shift for pic14
6961         and pic16
6962
6963 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6964
6965         * src/hc08/gen.h,
6966         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6967         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6968         thus fixing bug #895406
6969
6970 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6971
6972         * device/lib/_modsint.c,
6973         * device/lib/_modslong.c: sign follows divisor only
6974         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6975         signs or signedness can be ignored
6976         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6977         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6978         added optimization for IFX,
6979         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6980         arguments;
6981         reenabled optimization for IFX, which was removed on 2004-01-11
6982         * src/SDCCast.h: added return type IFX
6983         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6984         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6985         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6986         SDCC_OLDONEBYTEOPS selects the old behaviour
6987         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6988         changed again and commented promotion rule
6989         * src/SDCCval.c (valDiv): promotion no longer necessary
6990         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6991         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6992         rewritten
6993         * support/regression/tests/onebyte.c: added
6994
6995 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6996
6997         * gen.c (genInline): reverted to old code for assemnling inline
6998         code because of bug reported James Chadd
6999
7000 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
7001
7002         * ralloc.h: missing declarations from previous patch,
7003         seems that patch for ralloc.h was never applied, fixed
7004
7005 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7006            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7007
7008         * pcode.c,
7009         * pcode.h,
7010         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
7011         indirect addressing. Marked FSR0 as deprecated
7012         * gen.c (pointerCode): commented out, not needed now
7013         (pic16_popGet2p): new MOVFF helper function
7014         (genGenPointerGet),
7015         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
7016         (shiftRLong): removed duplicate debugging info
7017
7018 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7019
7020         * src/ds390/gen.c (genNearPointerGet),
7021         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
7022         optimization with bits, but not bitfields.
7023         * src/ds390/ralloc.c (packRegisters),
7024         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
7025
7026 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
7027
7028         * src/SDCCcse.c (algebraicOpts): copy operands before modification
7029
7030 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7031
7032         * src/SDCCsymt.h,
7033         * src/SDCCicode.c (operandFromSymbol),
7034         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
7035         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
7036         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
7037         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
7038         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
7039         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
7040         bug #892038
7041         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
7042         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
7043         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
7044         * src/SDCCsymt.c (newSymbol),
7045         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7046         enumerator_list),
7047         * src/SDCCval.h,
7048         * src/SDCCval.c (newiList): fixed bug #885705
7049
7050 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7051
7052         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
7053         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
7054
7055 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7056
7057         * device/include/c8051f120.h,
7058         * device/include/c8051f300.h,
7059         * device/include/c8051f310.h: added/updated header files for Silicon
7060         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7061         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
7062         in new section Submitting patches
7063
7064 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7065
7066         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
7067         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7068         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7069         genGenPointerSet),
7070         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
7071         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7072         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7073         genGenPointerSet),
7074         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
7075         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7076         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7077         genGenPointerSet),
7078         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
7079         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7080         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7081         genGenPointerSet): fixed bug #892400
7082         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
7083         to eliminate build warnings.
7084         * src/SDCCast.c (processParms),
7085         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
7086         fixed bug 751859
7087         * support/valdiag/valdiag.py: added GCC to the list of defines active
7088         when compiling with gcc
7089
7090 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7091
7092         * support/Util/SDCCerr.h,
7093         * support/Util/SDCCerr.c,
7094         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
7095         with an incomplete type (fixed bug #883734)
7096         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
7097
7098 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7099
7100         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
7101
7102 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7103
7104         * src/SDCCast.c (decorateType),
7105         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
7106         function pointer implementation
7107         * support/regression/tests/funptrs.c: added tests to verify both forms
7108         of function pointers work correctly. Added tests to verify parameters
7109         are passed in the correct order.
7110
7111 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
7112
7113         * device.c (regCompare): registers are sorted by ascending
7114         address and increasing size,
7115         * main.c (_pic16_finaliseOptions): removed the declaration
7116         of compiler macro MCU. Now a macro of the format pic18fxxxx
7117         will be defined from the command line
7118
7119 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7120             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7121
7122         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
7123         PCOP_RLCF was overwritten!
7124         * gen.c (genSkip): commented out calls to pic16_emitcode,
7125         * (genCmpEQ): fixed "long" compares, only high word did get compared,
7126         * (genlshTwo),
7127         * (genRRC): added debugging info,
7128         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
7129         overwritten while shifting,
7130         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
7131         overwritten while shifting,
7132         * (AccLsh),
7133         * (AccRsh),
7134         * (shiftLLeftOrResult),
7135         * (shiftRLeftOrResult),
7136         * (shiftRLong),
7137         * (shiftLLong): Implemented with pic16_emitpcode
7138         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
7139         * (genLeftShift): Fixed bug, operand for shift by variable always
7140         was "and"ed with 0x0f,
7141         * (genLeftShiftLiteral),
7142         * (genrshTwo),
7143         * (genRightShiftLiteral): added debugging info,
7144         * (genrshFour): added comment,
7145         * (genRightShift): determined signedness from operand "left"
7146         instead of "result"
7147
7148 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7149
7150         * src/SDCCicode.c (geniCodeParms),
7151         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
7152         function pointers, fixed function pointer bugs #861242 and #861896
7153
7154 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7155
7156         * device/include/c8051f000.h,
7157         * device/include/c8051f120.h,
7158         * device/include/c8051f300.h: added header files for Silicon
7159         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7160
7161 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
7162
7163         * src/SDCCast.c (processParams): added new type flow and restructured
7164         (gatherAutoInit): added new type flow
7165         (addCast): cosmetic changes
7166         (getLeftResultType): added new type flow for array indices, patch
7167         provided by Stas, see FR #877103
7168         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
7169         array index patch by Stas
7170         * src/SDCCast.h: added prototype getResultTypeFromType()
7171         * src/SDCCval.h,
7172         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
7173         * src/pic/glue.c (pic14emitStaticSeg),
7174         * src/pic16/glue.c (pic16emitStaticSeg),
7175         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
7176         for initialization of symbols
7177         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
7178         * support/Util/SDCCerr.h:
7179         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
7180         * .version: bumped version number to 2.3.8
7181         * device/include/Makefile.in (install),
7182         * doc/Makefile (install): changed to 'rm `find ...`' construct to
7183         avoid warnings
7184
7185 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
7186
7187         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
7188         Slade Rich fixed an optimization bug
7189         * src/pic/pcodepeep.c,
7190         * src/pic/pcoderegs.c
7191         * doc/Makefile (install): added test for directory
7192
7193 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7194
7195         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
7196         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
7197         * src/pic/ralloc.c (getRegPtr, getRegGpr),
7198         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
7199         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
7200         * as/mcs51/asexpr.c (term),
7201         * as/hc08/asexpr.c (term): fixed bug #887146
7202
7203 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7204
7205         * src/z80/gen.c (genMult): handle single byte result product
7206         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
7207         DUMMY_READ_VOLATILE (fixed bug #886367)
7208
7209 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7210
7211         * support/regression/tests/libmullong.c: fixed logic, on little endian
7212         hosts we ended without a mullong_wrapper()
7213
7214 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7215
7216         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
7217         virus/worm forged address usage.
7218
7219 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7220
7221         Fixed promotion, it should be done on AST level:
7222         * src/SDCCast.c (addCast): added promotion to int
7223         (decorateType): updated call to upCast()
7224         * src/SDCCicode.c (geniCodeLeftShift): removed call to
7225         usualUnaryConversions()
7226
7227 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
7228
7229         * support/regression/tests/literalop.c (mulWrapper): Added a
7230         wrapper to remove integer overflow warnings.
7231
7232         * support/regression/tests/float_trans.c: Made work on host.
7233
7234         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
7235         location of sz80.
7236
7237         * support/regression/generate-cases.py (main): Changed from inline
7238         to a main method.
7239
7240         * doc/Makefile (install): Changed to depth first to get rid of
7241         missing directory install warning.
7242
7243         * as/Makefile (install-doc): Made work on Mac.
7244
7245 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
7246
7247         * src/SDCCast.c: added an additional type flow in decorateType() of
7248         opposite direction, see feature request #860006; it's enabled at runtime
7249         by setting the environment variable SDCC_NEWTYPEFLOW
7250         * src/SDCCast.h: changed prototype of decorateType()
7251         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
7252         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
7253         'char' to 'int' can be omitted, if both operands are 'unsigned char';
7254         see feature request #877103
7255         * src/SDCCval.c: updated call of decorateType()
7256         (valBitwise): fixed bug #882876
7257         (valMinus): added promotion
7258         (valLogicAndOr): result is unsigned
7259         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
7260         * src/SDCCsymt.c (computeType),
7261         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
7262         must not cause an unsigned operation
7263         * src/pic/glue (pic14emitRegularMap),
7264         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
7265
7266 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
7267
7268         * src/pic/pcode.c (PCodeID): commented out left over debug code
7269
7270 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7271
7272         * support/valdiag/tests/overflow.c: added shift tests
7273         * src/pic/device.c,
7274         * src/pic/gen.c,
7275         * src/pic/gen.h,
7276         * src/pic/glue.c,
7277         * src/pic/main.c,
7278         * src/pic/pcode.c,
7279         * src/pic/pcode.h,
7280         * src/pic/pcodepeep.c,
7281         * src/pic/pcoderegs.c,
7282         * src/pic/ralloc.c,
7283         * src/pic/ralloc.h: applied patch from Slade Rich;
7284         added support for multiple code pages and multiple RAM banks on the
7285         PIC 14 port. The ASM files now no longer simply assume all the
7286         code / RAM are in the same page / bank. This means the linker can
7287         safely allocate code/RAM of separate ASM files to different pages/banks.
7288         * doc/sdccman.lyx: added Slade's tips
7289         * src/mcs51/peeph.def: fixed bug #880768
7290
7291 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7292
7293         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7294         * src/SDCCast.c (decorateType): fixed bug #880197
7295
7296 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7297
7298         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7299         getopt.h.
7300
7301         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7302         strtof is not part of C89 and isn't included with Mac OS X.
7303
7304 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7305
7306         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
7307         shiftL2Left2Result): fixed bug #879326
7308         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
7309         (genMultOneByte): fixed bug in signed vs unsigned multiplication
7310         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
7311         address fetch for clr instruction
7312         * device/lib/hc08/_mulint.c: created optimized assembly version
7313         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
7314
7315 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
7316
7317         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
7318         proposed in FR #877103
7319
7320 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
7321
7322         * src/SDCCval.c (cheapestVal): added missing checks
7323         * src/SDCCicode.c (usualBinaryConversions): fixed condition
7324         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
7325
7326 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
7327
7328         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
7329         equal operands
7330
7331 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
7332
7333         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
7334         loaded with the linker search paths (-L arguments) and the libraries
7335         to be linked with the current source (-l arguments). Changes
7336         currently will affect only the pic16 port.
7337         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
7338         include path the port specific paths and port specific libraries,
7339         * gplink command now contains the $3 argument,
7340         * src/pic16/device.h,
7341         * src/pic16/device.c,: structure PIC_device is made public and
7342         renamed to PIC16_device, the same for variable Pics which is renamed
7343         to Pics16. Updated all references to them.
7344         * src/pic16/glue.c (pic16glue): corrected bug with code
7345         initialization which bypassed the variable initializations block.
7346
7347         * device/lib/pic16/Makefile.rules: removed --penable-stack from
7348         COMPILE_FLAGS and added the --nostdinc option
7349
7350 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7351
7352         * device/include/mc68hc908jb8.h: Register defs for another member
7353         of the hc08 family. Contributed by Bjorn Bringert - thanks!
7354
7355 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
7356
7357         Documenting changes from previous commits.
7358         * configure.in (version 1.56),
7359         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
7360         when generating output files to configure the pic16 library,
7361         but now I've commented it out, since gputils aren't installed in the
7362         SF compile farm, so library won't compile
7363
7364         * device/lib/Makefile.in (version 1.56): initially I've added in
7365         target 'all' the prerequestive 'model-pic16' so it compiled the
7366         pic16 library, but now I've commented it out for the same reasons
7367         above,
7368         * added targets 'model-pic16' and 'objects-pic16' to compile the
7369         library
7370         * added target 'port-specific-objects-pic16' to handle the
7371         generated libraries and copy them into the build/ directory
7372         * added target 'clean-intermediate-pic16' to clean intermediate
7373         files into pic16 directory
7374         * in target 'installdirs' added line to create directory pic16 in
7375         the installation path
7376
7377         * device/include/Makefile.in (version 1.11): in target 'install'
7378         added lines to copy all header files to installation path,
7379         * in target 'installdirs' added line create directory for pic16
7380         headers in the installation path
7381
7382 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
7383
7384         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
7385          a function call
7386
7387 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
7388
7389         * configure,
7390         * device/lib/configure.in,
7391         * device/lib/configure: fixed for autoconf 2.57
7392
7393 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7394
7395         * src/z80/main.c (_parseOptions): fixed the portmode= command line
7396         option so that it actually works. Made it specific to the z80, since
7397         the gbz80 doesn't have these kinds of I/O ports.
7398
7399 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7400
7401         * device/include/z180.h,
7402         * device/lib/_memcpy.c,
7403         * device/lib/_memmove.c,
7404         * device/lib/_mulint.c,
7405         * device/lib/ser_ir.c,
7406         * device/lib/ser_ir_cts_rts.c,
7407         * device/lib/_strcmp.c,
7408         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
7409         * src/z80/main.c (_process_pragma): add support for pragmas bank and
7410         portmode; added deprecation warning for bank= and protmode= forms.
7411         Also, guard against buffer overflow.
7412         * src/z80/gen.c (aopGet): generate better code for sfr banked read
7413
7414 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7415
7416         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
7417         changed interrupt vector table generation to only emit declared vectors.
7418         * device/include/Makefile.in: added missing backslash
7419         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
7420
7421 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7422
7423         Mainly changes to support compilation of the device libraries
7424         * src/pic16/device.c: stack is allocated via symbol and not
7425         via literal number. The symbol is placed in the corresponding
7426         position of the data ram
7427         * (pic16_dump_section): relocatable and absolute uninitialized
7428         data are now emitted in sorted order to reduce section naming,
7429         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
7430         weren't marked as being in the access bank,
7431
7432 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7433
7434         Added portion of GNU PIC Library under the directory
7435         device/include/pic16 and device/lib/pic16. These files
7436         contain the declarations of SFRs for the PIC18Fxx2 devices.
7437         The directory is initialized via configure from toplevel.
7438
7439 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
7440
7441         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
7442         the spilllocations to be compared correctly
7443
7444 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7445
7446         * src/SDCCast.c (decorateType): fixed bug introduced today
7447
7448 2004-01-12  Borut Razem <borut.razem AT siol.net>
7449
7450         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
7451         doc/sdccman.lyx: upper case pragmas are deprecated
7452
7453 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7454
7455         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
7456         in simpler and even better code
7457
7458 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
7459
7460         * src/SDCCicode.c (operandOperation): fixed bug #874819
7461         * src/SDCCast.c (decorateType): fixed
7462         char foo (unsigned long ul) { return ul > 0; }
7463
7464 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7465
7466         * doc/sdccman.lyx: Moved and added some sections, small changes
7467         all over. Telling LaTeX to be less strict with word spacing
7468         to better keep the right margin. Changed some notes about
7469         maintainance of the ports in section 3.2.1 - is it OK like this?
7470
7471 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
7472
7473         SDCC source changes:
7474         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
7475         convilong): modified to inform the pic16 port that builtin functions
7476         are external
7477
7478         PIC16 PORT specific changes:
7479         * src/pic16/device.c pic16_dump_equates() added,
7480         processor registers declared internally by the port are emitted in
7481         the translation as equates,
7482         * src/pic16/gen.c: inline code is passed unprocessed to the
7483         translation,
7484         * (pic16_popGetLit2): fnuction modified to take second operand as
7485         pCodeOp pointer and not as literal,
7486         * (popRegFromIdx): prefixed with pic16_,
7487         * (pic16_popCombine2): modified to receive already allocated pCode
7488         operands,
7489         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
7490         * (genFunction): initializes local stack frame and pushes on stack
7491         all the registers used by this function,
7492         * (genEndFunction): restores all registers from stack and restores
7493         stack frame,
7494         * src/pic16/glue.c (pic16emitRegularMap): various changes and
7495         improvements,
7496         * (pic16glue): changed the program startup sequence,
7497         * added new dbName code 'A' for functions placed in absolute section
7498         * src/pic16/main.c: added function attribute _naked,
7499         * added pragma 'code' to place a fnuction at an absolute address,
7500         * added command line arguments --debug-ralloc and --pcode-verbose,
7501         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
7502         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
7503         * (pic16_newpCodeOpLit2): modified to take the second operand as
7504         pCodeOp pointer,
7505         * (pic16_printpBlock): modified to emit each function in a separate
7506         section,
7507         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
7508         UPPER for immediate operands,
7509         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
7510         instruction,
7511         * src/pic16/peeph.def: all peepholes with movff are commented out,
7512         because there is a problem in the pcode peep optimizer,
7513         * src/pic16/ralloc.c: the register allocator can now reuse local
7514         function symbols for another function. This saves register usage.
7515         * src/pic16/ralloc.h: added flag isLocal in structure regs,
7516
7517         Added file src/pic16/NOTES with information about program writing on
7518         the current port version.
7519
7520 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7521
7522         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
7523         and peephole 252 (array access)
7524
7525 2004-01-09  Borut Razem <borut.razem AT siol.net>
7526
7527         * src/SDCCmain.c : fixed #872250: -l command line defined library
7528           files are scanned before standard library files
7529
7530 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7531
7532         * src/SDCCast.c (decorateType): fixed bug #874046
7533
7534 2004-01-09  Borut Razem <borut.razem AT siol.net>
7535
7536         * support/scripts/sdcc.nsi: remove previous installation
7537
7538 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7539
7540         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
7541         bytes for last interrupt vector (mcs51)
7542         * sdcc.spec: fixed typo
7543
7544 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7545
7546         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
7547         gen51Code): more efficient parameter receive for --model-large
7548         ("bug" #845294)
7549
7550 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7551
7552         * src/ds390/main.c,
7553         * src/z80/main.c: added missed needLinkerScript flags (more than
7554         one port structure defined in these file)
7555         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
7556         bug #795325
7557
7558 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
7559
7560         * src/SDCCmain.c: removed various references to DEFAULT_PORT
7561         * src/port.h: added flag needLinkerScript in port->linker
7562         structure to inform whether to create a .lnk file or not,
7563         * src/avr/main.c,
7564         * src/ds390/main.c,
7565         * src/hc08/main.c,
7566         * src/mcs51/main.c,
7567         * src/pic/main.c,
7568         * src/pic16/main.c,
7569         * src/xa51/main.c,
7570         * src/z80/main.c: changed appropriately to configure
7571         needLinkerScript flag
7572         * src/pic/gen.c,
7573         * src/pic16/gen.c (genAddrOf): fixed bug #863624
7574         * src/pic/glue.c: added variable udata_section_name to
7575         override default uninitialized data segment definition for
7576         devices only with SHAREBANK memory (reported from Erik Epetrich)
7577         * (pic14emitOverlay): modified to emit a commented overlay segment
7578         directive when no overlay data exist
7579         * (picglue): modified to emit uninitialized data segment
7580         according to udata_section_name
7581         * src/pic/main.c (_pic14_parseOptions): added command line
7582         options --udata-section-name=[name] to override default
7583         udata definition name
7584         * modified _linkCmd and _asmCmd to include compiler passed
7585         arguments via -W option
7586         * src/pic16/main.c: added $l in _asmCmd, changed extension for
7587         object file from '.rel' to '.o' in port->linker structure,
7588         changed size of fptr from 2 to 3 in port structure
7589
7590 2004-01-07  Borut Razem <borut.razem AT siol.net>
7591
7592         * support/scripts/sdcc.nsi: update PATH
7593         * support/scripts/sdcc.ico: craeted
7594
7595 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
7596
7597         * device/include/Makefile.in: fix install
7598         * doc/Makefile: fix install
7599
7600 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7601
7602         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
7603         in bug #860505
7604         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
7605         how the function variable allocation summary is displayed; also
7606         include information about variables allocated to the overlay
7607         segment
7608
7609 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7610
7611         * as/mcs51/lkmain.c: Help about -Y option
7612         * as/mcs51/lkarea.c: Fixed gcc warnings
7613
7614 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7615
7616         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
7617         fixed warning
7618         * support/valdiag/tests/overflow.c: added
7619         * src/SDCCast.c (decorateType),
7620         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
7621         LEFT_OP (left shift)
7622
7623 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7624
7625         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
7626         (default behaviour).
7627
7628 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7629
7630         A python script to validate compiler diagnostic messages. It can be
7631         used to verify that sdcc complains about bad c source code and
7632         gives a good location of the error.
7633         * support/valdiag/Makefile,
7634         * support/valdiag/valdiag.py,
7635         * support/valdiag/tests/*
7636
7637 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7638
7639         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
7640         * src/SDCCsymt.c (newEnumType),
7641         * src/SDCCsymt.h
7642         * support/Util/SDCCerr.c,
7643         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
7644         enum related bugs.
7645         * support/regression/tests/enum.c: added test for enum values that
7646         require at least 2 bytes of storage.
7647
7648 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7649
7650         * src/common.h: added ifndef/define/endif macros
7651         around the header file.
7652         Bug reported from Jesus Calvino-Fraga
7653
7654 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7655
7656         * sdcc.spec: updated
7657         * device/include/Makefile.in: don't install CVS directories
7658         * device/lib/Makefile.in: added removal of CVS directories after install
7659         * doc/Makefile: fixed install, added local_icons
7660         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
7661         * src/mcs51/gen.c (genRightShift): fixed bug #870788
7662         * src/ds390/gen.c (genRightShift): fixed bug #870788
7663         * src/SDCCast.c (decorateType): fixed bug #870781
7664
7665 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7666
7667         PIC16 port related changes:
7668         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
7669         added variable stackPos,
7670
7671         * gen.c: genCall, assignResultValue: added support for
7672         pushing/retrieving function parameters to/from stack,
7673         genFunction,genEndFunction: setup stack frame for the
7674         generated function,
7675         genAddrOf: will be changed according to bug 863624
7676
7677         * added files genutils.c and genutils.h which contain gen*
7678         debugged and optimised functions extracted from gen.c
7679
7680         * glue.c: added variable 'externs' which holds extern symbols,
7681         pic16emitRegularMap: is modified to properly handle relocatable
7682          symbols under the new scheme,
7683         pic16createInterruptVect: is modified
7684         pic16printPublics: is modified to emit 'global' assembler directives,
7685         added pic16_printExterns to print extern symbols,
7686         pic16glue: initializes stack/frame pointer in the beginning of
7687         the assembly output. Temporary hack, will be corrected later,
7688         because gplink yet does not support stack and SDCC does not
7689         yet support a type of crt0.o object to create the final binary.
7690
7691         * Removed many lines that contain 8051 legacy code.
7692         * The code is finally placed under a 'code' directive.
7693         * Added port specific options.
7694
7695         * _process_pragma: simplified since now we do not need *special*
7696         include file to define SFR registers. But a separate header
7697         will be needed. This will be developed later.
7698         * _pic16_parseOptions: added, parses port specific options:
7699         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
7700         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
7701         --preplace-udata-with=
7702
7703         * _pic16_setDefaultOptions: modified to initialize section names,
7704         but hack is temporarly out of order since it needs improvement.
7705         * _pic16_genAssemblerPreamble: configuration words are emitted by
7706         their address instead of their name. This part is incomplete and
7707         supports only the 18Fxx2 devices. Other devices will emit an error
7708         during assembly since they do not contain the same set of config
7709         registers
7710         * _pic16_genIVT: is modified,
7711
7712         * pcode.c: added definitions for some hardware registers that are needed
7713         for stack support
7714         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
7715         All PCI entries are updated. Now LFSR is supported.
7716         * Removed pic16_pciTRIS is mentioned by mdubuc in source
7717         * added pic16_newpCodeOpLit2 to support instructions with
7718         two literal arguments
7719         * pic16_pCode2str: corrected code that emits assembler instructions
7720         with two literal operands and those that have an access bit modifier
7721         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
7722         this fixes a bug which caused some labels to be lost, when an
7723         assembler directive was added, i.e. banksel,
7724         * pic16_FixRegisterBanking: improved logic that causes the insertion
7725         of bank switching,
7726         * InlineFunction: functions that are called once, are not any more
7727         inlined. This can be a port option in the future,
7728
7729         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
7730
7731         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
7732         hold the corresponding uninitialized symbols,
7733         * pic16_allocProcessorRegister: registers have explicit marked the
7734         accessBank field,
7735         * pic16_allocInternalRegister: registers are explicit marked as
7736         not used,
7737         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
7738         processing list, so bit registers were lost,
7739         *
7740
7741         * ralloc.h: added field 'accessBank' and original symbol operand
7742         in register definition,
7743         * removed the field isMapped from register definition,
7744
7745         ** Several functions have been removed from various sources:
7746         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
7747         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
7748         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
7749         pic16_assignRelocatableRegisters
7750
7751         ** others have been introduced:
7752         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
7753         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
7754
7755 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
7756
7757         * support/scripts/inc2h.pl: changed definition of BIT_AT
7758         to emit 'sbit at' instead of 'bit at'. This was a request.
7759
7760         PIC16 port related preliminary changes:
7761         * gen.c: prefixed function popRegFromString with
7762         pic16_ and all references to it corrected
7763         * pcode.c: all pic16_pc_* hardware registers prefixed
7764         with underscore (_),
7765         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
7766         * ralloc.c: newReg(): when register is REG_SFR then
7767         set address to rIdx,
7768         pic16_allocProcessorRegister(): marks register wasUsed=0
7769         pic16_writeUsedRegs(): added a call to assign processor
7770         registers via pic16_assignFixedRegisters
7771
7772 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7773
7774         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
7775         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
7776         variables in unused register banks.  Also the SSEG is placed
7777         wherever there is enough space for it, and IDATA can be anywhere
7778         in internal RAM.  For now compile using -Wl-Y[stack_size].
7779         The mem file is different for this option as well, since it
7780         makes no sense of talking about DSEG lenght.
7781
7782 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
7783
7784         * src/SDCClrange.c: fixed bug 869095 that caused segfault
7785         in certain cases, e.g. when ROM assignment, patch provided
7786         from Albert den Haan.
7787
7788 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
7789
7790         Many signedness and type propagation fixes:
7791         * src/SDCCicode.c: made geniCodeCast() static
7792         replaced SPEC_ by IS_ (cosmetic)
7793         (operandOperation): fixed div and mod operation
7794         (usualBinaryConversions): added support for promotion of char
7795         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
7796         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7797         (geniCodeAdd): an array index will stay unsigned, even if promoted
7798         from char to int
7799         (geniCodeArray): ditto
7800         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7801         * src/SDCCsymt.c (computeType): added more support for char;
7802         promotion of char is selectable by promoteCharToInt, fixed signedness
7803         for all cases
7804         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7805         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7806         * src/SDCCval (val*): replaced signedness calculation by
7807         computeType()
7808         rearranged if-branches (cosmetic)
7809         (valShift): added warning W_SHIFT_CHANGED
7810         (valCompare): fixed problem with different types
7811         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7812         * support/regression/tests/literalop.c: added many cases
7813         * support/regression/tests/ast_constant_folding.c: changed finally to
7814         'unsigned int'
7815         * .version: new year, new version: 2.3.7
7816         * src/SDCCmain.c (main): applied patch #866468
7817         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7818         provided by Scott Bronson
7819         * doc/sdccman.lyx: updated documentation for sdcdb
7820         updated and added chapter tips
7821
7822 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7823
7824         * src/SDCCsymt.h: missing from yesterday's commits
7825
7826 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7827
7828         * src/SDCC.y (struct_or_union_specifier),
7829         * support/Util/SDCCerr.c,
7830         * support/Util/SDCCerr.h: verify that struct & union tags are used
7831         as declared.
7832
7833 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7834
7835         * src/SDCCglobl.h: missing from yesterday's commits
7836
7837 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7838
7839         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7840         sft_attributes, struct_declaration, parameter_declaration,
7841         type_name, start_block, declaration_list),
7842         * src/SDCC.lex (check_type): support redefinition of typedef names
7843
7844 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7845
7846         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7847         aligned xdata arrays. Erik helped me with the if clause.
7848
7849 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7850
7851         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7852         warning
7853
7854 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7855
7856         * src/SDCCast.h,
7857         * src/SDCCast.c (newAst_),
7858         * src/SDCCicode.h,
7859         * src/SDCCicode.c (ast2iCode, newiCode),
7860         * src/SDCCglobl.h,
7861         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7862         expr, statement, expression_statement, selection_statement,
7863         iteration_statement, expr_opt, jump_statement): foundation for tracking
7864         sequence points
7865         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7866         point code too)
7867
7868 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7869
7870         * support/Util/SDCCerr.c,
7871         * src/SDCCast.h,
7872         * src/SDCCast.c (createCase, createDefault, decorateType),
7873         * src/SDCClabel.c (labelUnreach),
7874         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7875         to error messages.
7876         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7877         (with thanks to Stas Sergeev)
7878         * device/include/time.h,
7879         * device/lib/time.c (CheckTime): suppress unreachable code warning
7880
7881 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7882
7883         * src/SDCCast.c (createIvalCharPtr),
7884         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7885         bug #753752)
7886         * support/regression/tests/nullstring.c: tests for these two bugs
7887
7888 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7889
7890         * support/Util/SDCCerr.h,
7891         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7892         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7893         about storage class and 'at' used inside struct or union
7894         * src/SDCCBBlock.c (iCodeFromeBBlock),
7895         * src/SDCCcse.c (ifxOptimize),
7896         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7897         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7898         printIval, emitStaticSeg, emitOverlay),
7899         * src/SDCClabel.c (deleteIfx),
7900         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7901         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7902         gatherAutoInit, processParms),
7903         * support/Util/SDCCerr.h,
7904         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7905         reporting for post-parse errors.
7906
7907 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7908
7909         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7910         implicit casts via union; they don't work on big endian systems
7911         (possible fix for bug #861138)
7912
7913 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7914
7915         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7916         * src/mcs51/main.c: fixed the fix for bug #737001
7917
7918 2003-12-15  Borut Razem <borut.razem AT siol.net>
7919
7920         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7921
7922 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7923
7924         * support/makebin/makebin.c: put output in binary mode
7925
7926 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7927
7928         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7929         xdata and data memory on startup. Set the environment variable
7930         SDCC_NOGENRAMCLEAR to disable this.
7931         * src/mcs51/peephole.def,
7932         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7933         (allows non-interrupt and interrupt code to safely compete for a resource
7934         without the non-interrupt code having to disable interrupts)
7935
7936 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7937
7938         * src/SDCCicode.c (geniCodeAdd),
7939         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7940         with valFromType if type might be a pointer and host is big endian).
7941         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7942         types, not just integer types.
7943         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7944         multiply defined with mismatching "at" address.
7945
7946 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7947
7948         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7949         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7950         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7951         with embedded nulls (fixed bug #753752)
7952
7953 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7954
7955         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7956         Apparently this did not see much testing (endless loop)
7957
7958 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7959
7960         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7961
7962 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7963
7964         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7965         gracefully handle NULL memmap pointers
7966
7967 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7968
7969         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7970         instead of deleting the iCode when an operand is volatile
7971         * src/z80/gen.c (genDummyRead),
7972         * src/mcs51/gen.c (genDummyRead),
7973         * src/ds390/gen.c (genDummyRead),
7974         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7975         not just IC_RIGHT
7976         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7977         * src/SDCC.y: fixed bug #850420
7978
7979 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7980
7981         Applied z80 i/o port patch from Peter Townson and fixed some operators
7982         to better handle operands in A register.
7983         * device/include/z180.h
7984         * src/SDCC.y
7985         * src/SDCCglue.c
7986         * src/z80/gen.c
7987         * src/z80/gen.h
7988         * src/z80/main.c
7989         * src/z80/peeph-z80.def
7990         * src/z80/peeph.def
7991         * src/z80/z80.h
7992
7993 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7994
7995         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7996
7997 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7998
7999         * device/lib/hc08/_mullong.c: Removed extra #endif
8000
8001 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8002
8003         * sim/ucsim/hc08.src/inst.cc,
8004         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
8005         carries from x to h
8006         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
8007         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
8008         * device/include/stdarg.h: fixed varargs for hc08
8009         * device/lib/Makefile.in,
8010         * device/lib/hc08/Makefile,
8011         * device/lib/hc08/_mulint.c,
8012         * device/lib/hc08/_mullong.c: fixed some endian problems
8013
8014 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8015
8016         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
8017         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
8018         * device/lib/_gptrget.c,
8019         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
8020
8021 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8022
8023         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
8024         * src/SDCCast.c (astErrors): fixed bug #846007
8025         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
8026
8027 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8028
8029         * src/SDCCast.c (decorateType): disabled a transformation I added in
8030         revision 1.188 (access to fields of a structure at an absolute address);
8031         it breaks with bitfields, extern declarations, and gcse analysis.
8032         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
8033         could be assigned through a pointer, so don't complain.
8034         * src/SDCCast.c (astErrors),
8035         * src/SDCCast.h,
8036         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
8037
8038 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
8039
8040         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
8041         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
8042         output of __config directives, since gpasm now supports them
8043         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
8044         pre-processor macro, i.e. -DMCU=p18f452
8045         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
8046         and modified to handle 'cast' icode similarly to '=' icode
8047         * src/pic16/device.h (typedef struct PIC_device): added field
8048         'extMIface' to indicate that chip has external memory interface
8049         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
8050         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
8051         18F8720
8052
8053 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8054
8055         * src/SDCC.y (pointer): fixed bug #846006
8056         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
8057         * src/SDCCast.c (decorateType): fixed bug #846009
8058         * src/ds390/peeph.def,
8059         * src/ds390/gen.c (genAnd, genOr),
8060         * src/mcs51/peeph.def,
8061         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
8062
8063 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8064
8065         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
8066         * src/SDCCdflow.c
8067         * src/SDCCcse.c
8068         * src/SDCCcse.h
8069         * src/SDCCBBlock.h
8070         * src/SDCCBBlock.c
8071
8072 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
8073
8074         fixed bug #845089
8075         * src/SDCCbitv.h,
8076         * src/SDCCbitv.c: added function to free a bitvector
8077         * src/SDCClrange.h,
8078         * src/SDCClrange.c: added function to recompute the liveranges
8079         * src/avr/ralloc.c,
8080         * src/ds390/ralloc.c,
8081         * src/hc08/ralloc.c,
8082         * src/mcs51/ralloc.c,
8083         * src/pic/ralloc.c,
8084         * src/pic16/ralloc.c,
8085         * src/xa51/ralloc.c,
8086         * src/z80/ralloc.c: recompute the liveranges after register packing
8087
8088 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
8089
8090         * src/SDCCloop.c (newInduction): fixed bug #845630
8091
8092 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8093
8094         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
8095         inadvertantly left behind from my 2003-11-12 change
8096
8097 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8098
8099         Updated headers I neglected to commit yesterday.
8100         * src/SDCClrange.h,
8101         * src/SDCCicode.h
8102
8103 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8104
8105         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
8106         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
8107         * src/SDCCopt.c (eBBlockFromiCode),
8108         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
8109         the creation of the key hash table from the sequencing so it can be used
8110         earlier (for some GCSE bug fixes still pending)
8111
8112 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8113
8114         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
8115         * support/regression/tests/addsub.c: testing genPlus shortcut
8116
8117 2003-11-15  Borut Razem <borut.razem AT siol.net>
8118
8119         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
8120
8121 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8122
8123         * src/SDCCcse.c (cseBBlock): fixed bug #527779
8124         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
8125         ordering is immaterial.
8126         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
8127
8128 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8129
8130         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
8131         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
8132         (SIGSEV) of bug #840381
8133         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
8134         unlink new file before rename if new and old filenames are the same)
8135
8136 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8137
8138         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
8139         uninitialized variables) for the mcs51. Set environment variable
8140         SDCC_GENRAMCLEAR to test.
8141         xdata initialization slightly shorter
8142
8143 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8144
8145         * src/SDCCsymt.h,
8146         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
8147         #838241 & 780691 (basicly the same bug)
8148         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
8149         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
8150
8151 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
8152
8153         * src/SDCCmain.c (linkEdit): "fix" #834252
8154
8155 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8156
8157         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
8158         * src/SDCCast.h,
8159         * src/SDCC.y: fixed bug #819403
8160
8161 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8162
8163         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
8164         the reentrant attribute.
8165         * src/hc08/gen.c (genPackBits): added missing stack readjustment
8166         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
8167         simulation
8168         * src/SDCCast.c (decorateType): fixed bug with storage class not being
8169         updated during pointer dereference; f.e. ~(((char *)1)*) was being
8170         erroneously reduced to a literal.
8171         * src/hc08/ralloc.c (packRegisters, rematStr),
8172         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
8173         some cases
8174
8175 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8176
8177         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
8178         * doc/sdccman.lyx: changed from 'article' to 'book'
8179         * doc/Makefile: readded test_suite_spec and cdbfileformat
8180
8181 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
8182
8183         * device/include/stdlib.h: include malloc.h to comply with ANSI
8184         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
8185
8186 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8187
8188         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
8189         * doc/clean.mk: also remove *.out files
8190         * doc/sdccman.lyx: some additions, larger top/bottom margins
8191
8192 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8193
8194         * src/SDCC.y: fixed bug #837365
8195         * support/regression/tests/bitopcse.c
8196         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
8197         a symbol (might be valop instead)
8198         * device/lib/Makefile.in: added errno.c to HC08SOURCES
8199         * device/lib/clean.mk: added hc08 to the cleaning list
8200
8201 2003-11-04  Borut Razem <borut.razem AT siol.net>
8202
8203         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
8204           made 2003-11-04
8205         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8206           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
8207           malloc is declared in standard stdlib.h
8208
8209 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8210
8211         * device/lib/hc08/Makefile: need to clean .rel not .o files
8212         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
8213
8214 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8215
8216         * src/port.h,
8217         * src/hc08/main.c,
8218         * src/mcs51/main.c,
8219         * src/ds390/main.c,
8220         * src/z80/main.c,
8221         * src/avr/main.c,
8222         * src/pic/main.c,
8223         * src/pic16/main.c,
8224         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
8225         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
8226         tests (which uses the port's oclsExpense function)
8227         * src/SDCC.y,
8228         * src/SDCCast.c,
8229         * src/SDCCicode.c,
8230         * src/hc08/gen.c,
8231         * src/ds390/gen.c,
8232         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
8233
8234 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8235
8236         * src/SDCCcse.c (ifxOptimize),
8237         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
8238         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
8239         deleting the IFX iCode.
8240         * src/hc08/ralloc.c: reduced unneeded slocs
8241         * src/hc08/gen.c: fixed bug in asmopToBoolean
8242
8243 2003-11-04  Borut Razem <borut.razem AT siol.net>
8244
8245         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
8246           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8247           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
8248           transferred to configure
8249
8250 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
8251
8252         Use headers defined in the C[++] standards:
8253         * sim/ucsim/gui.src/serio.src/fileio.cc
8254         * sim/ucsim/gui.src/serio.src/frontend.cc
8255         * sim/ucsim/gui.src/serio.src/main.cc
8256         * sim/ucsim/gui.src/serio.src/posix_signal.cc
8257         * support/Util/NewAlloc.c
8258         * as/hc08/lklibr.c
8259         * as/mcs51/lklibr.c
8260         * as/z80/aslist.c
8261         * as/z80/assym.c
8262
8263 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8264
8265         * Added MSVC projects for hc08 assembler and linker:
8266         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
8267         /as/hc08/link_hc08.dsp
8268
8269 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8270
8271         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8272
8273 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8274
8275         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8276
8277 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8278
8279         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8280
8281 2003-10-31  Borut Razem <borut.razem AT siol.net>
8282
8283         * support/cpp2/cpplib.h,
8284           support/cpp2/cpplib.c,
8285           support/cpp2/cpplex.c,
8286           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8287           to switch _asm block preprocessing on / off. Default is
8288           #pragma preproc_asm +
8289
8290 2003-10-31  Borut Razem <borut.razem AT siol.net>
8291
8292         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8293           when outputting comment blocks (when executed with -C option) and
8294           _asm (SDCPP specific) blocks
8295
8296 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8297
8298         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8299
8300 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8301
8302         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8303
8304 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
8305
8306         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
8307         * src/SDCCast.c (decorateType): fixed bug #832664
8308
8309 2003-10-31  Borut Razem <borut.razem AT siol.net>
8310
8311         * support\cpp2\cpplex.c: fixed for SDCPP:
8312           comments(when executed with -C option) and _asm blocks
8313           were included even if they where in skipped #if block.
8314           Applied solution from GCC cpp 3.3.2
8315
8316 2003-10-31  Borut Razem <borut.razem AT siol.net>
8317
8318         * src/SDCC.lex: sdcc now understands both formats:
8319           '# <line_number> <file_name>' and
8320           '#line <line_number> <file_name>'
8321         * support/cpp2/cppmain.c: sdcpp now generates the standard
8322           '# <line_number> <file_name>' instead of former
8323           '#line <line_number> <file_name>'
8324
8325 2003-10-30  Borut Razem <borut.razem AT siol.net>
8326
8327         * support/cpp2/cpphash.h,
8328         * support/cpp2/cpplib.h
8329         * support/cpp2/cpplex.c,
8330         * support/cpp2/cppmain.c,
8331         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
8332
8333 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8334
8335         Fixed a number of problems revealed by bug #827883.
8336         * src/SDCCloop.c (loopInvariants): Spill location of the
8337         result operand should be recomputed if extracted from
8338         a loop. Also, don't extract assignments of an iTemp
8339         from a literal.
8340         * src/SDCCast.c (isConformingBody): loop reversal should
8341         not occur if the control variable is involved with a
8342         relational operator.
8343
8344 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
8345
8346         * .version: bumped to 2.3.6 to reflect the big improvements
8347         made by Erik and Klaus. Thanks!
8348
8349 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
8350
8351         Replaced the livrange code.
8352         * src/SDCClrange.c: added new LR code
8353         * src/SDCCloop.c,
8354         * src/SDCCBBlock.h: removed remainig parts from old LR code
8355         * src/ds390/ralloc.c,
8356         * src/ds390/gen.c: minor fixes to make it work with new code
8357
8358 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8359
8360         * as/hc08/asm.h,
8361         * as/hc08/lkrloc.c,
8362         * src/hc08/gen.c,
8363         * src/hc08/ralloc.c: Fix various warnings related to the hc08
8364         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
8365         (tweaked fix for bug #818696)
8366
8367 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8368
8369         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
8370
8371 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8372
8373         * src/SDCCmain.c,
8374         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
8375         * src/mcs51/gen.c (gencjneshort),
8376         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
8377         more efficient (per Scott Bronson's suggestion)
8378
8379 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8380
8381         Extended the semantics of the critical keyword to include
8382         individual statements. See RFE #827755 and #799831
8383         * src/SDCC.y
8384         * src/SDCCicode.c
8385         * src/SDCCopt.c
8386         * src/SDCCast.c
8387         * support/Util/SDCCerr.c
8388         * support/Util/SDCCerr.h
8389         * src/mcs51/gen.c
8390         * src/ds390/gen.c
8391         * src/hc08/gen.c
8392
8393 2003-10-19  Borut Razem <borut.razem AT siol.net>
8394
8395         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
8396
8397 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8398
8399         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
8400         Fixed bug #818696
8401         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
8402         and predecrement operand is displayed
8403
8404 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8405
8406         * src/SDCCval.c (valMinus): fixed bug #826041
8407
8408 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8409
8410         Some hc08 related updates that I missed earlier
8411         * sim/ucsim/stypes.h
8412         * support/regression/ports/hc08/spec.mk
8413
8414 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8415
8416         New target "hc08" for the Motorola 68hc08 family of micros
8417
8418         * configure
8419         * configure.in
8420         * Makefile
8421         * src/hc08/*
8422         * src/SDCCmain.c
8423         * src/port.h
8424         * sim/ucsim/hc08.src/*
8425         * sim/ucsim/configure.in
8426         * src/ucsim/configure
8427         * sim/ucsim/packages_in.mk
8428         * as/hc08/*
8429         * as/Makefile
8430         * device/include/mc68hc908qy.h
8431         * device/lib/hc08/*
8432         * device/lib/Makefile.in
8433         * support/regression/ports/hc08/*
8434         * support/regression/Makefile
8435
8436 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8437
8438         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
8439         regression test
8440         * src/ds390/gen.c (genCast): fixed bug #821957
8441
8442 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8443
8444         * device/lib/logf.c: "fixed" overlay bug
8445         * support/regression/ports/host/spec.mk: added m library
8446         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
8447         * support/regression/tests/float_trans: added (for Eric)
8448
8449 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
8450
8451         * src/mcs51/gen.c (genCpl): fixed bug
8452         http://sf.net/mailarchive/message.php?msg_id=6263915
8453
8454 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
8455
8456         * src/SDCCast.c (decorateType): added extended constant folding
8457         * src/SDCCsymt.c (computeType): cleanup
8458         * src/SDCCval.c (valShift): minor optimization
8459         * support/regression/tests/ast_constant_folding.c: added
8460
8461 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8462
8463         * src/SDCCmain.c: removed some unintended changes
8464
8465 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8466
8467         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
8468         * src/z80/gen.c: fixed part of bug #817589
8469         * src/SDCCsymt.c (checkFunction): fixed bug #817895
8470
8471 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
8472
8473         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
8474         * src/SDCCcflow.c
8475         * src/SDCCcse.c
8476         * src/SDCCdflow.c
8477         * src/SDCClabel.c
8478         * src/SDCClrange.c
8479         * src/SDCCmem.c
8480         * src/SDCCopt.c
8481         * src/SDCCpeeph.c
8482         * src/SDCCset.c
8483         * src/avr/ralloc.c
8484         * src/ds390/ralloc.c
8485         * src/izt/ralloc.c
8486         * src/mcs51/ralloc.c
8487         * src/pic/ralloc.c
8488         * src/pic16/ralloc.c
8489         * src/xa51/ralloc.c
8490         * src/z80/ralloc.c
8491         * src/z80/gen.c: removed unused label "release:"
8492
8493 2003-10-06  Borut Razem <borut.razem AT siol.net>
8494
8495         * src/SDCC.lex: removed definition of unused variables
8496           save_optimize and save_options
8497
8498 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
8499
8500         * clean.mk: removed '=' in "-maxdepth=1"
8501         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
8502         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
8503
8504 2003-10-06  Borut Razem <borut.razem AT siol.net>
8505
8506         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
8507           my_unput() replaced by unput()
8508
8509 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
8510
8511         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
8512         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
8513         type-punned pointer will break strict-aliasing rules"
8514         Old LR behaviour is again default; Klaus' LR can be choosen by
8515         defining the environment variable LRKLAUS
8516         * src/SDCCBBlock.h
8517         * src/SDCCloop.c
8518         * src/SDCClrange.c
8519         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
8520         * clean.mk: fixed removal of files in bin/CVS/
8521         * device/lib/clean.mk: fixed removal of directories small and large
8522         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
8523         * src/SDCCicode.c,
8524         * src/SDCCval.c: removed superflous test for pedantic
8525
8526 2003-10-05  Borut Razem <borut.razem AT siol.net>
8527
8528         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
8529           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
8530           message "unmatched #pragma SAVE and #pragma RESTORE"
8531
8532 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8533
8534         * doc/sdccman.lyx: various additions and updates (interrupts, inline
8535           assembly, critical functions, atomic, nojtbound)
8536
8537 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
8538
8539         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
8540         * src/SDCCBBlock.h
8541         * src/SDCCloop.c
8542         * src/SDCCloop.h
8543         * src/SDCClrange.c
8544
8545 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8546
8547         * src/z80/gen.h,
8548         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8549         * src/mcs51/gen.h
8550         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8551         * src/ds390/gen.h
8552         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8553         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
8554         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
8555
8556 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8557
8558         * src/z80/gen.c (genRet): fixed bug #524753
8559         * src/z80/gen.c (genCast): fixed internal error on cast from
8560         pointer to long
8561         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
8562         fix for bug #477835 to the z80
8563         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
8564         for tracking iCodes in the peephole optimizer for z80
8565
8566 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8567
8568         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
8569         the other part of bug #814548
8570         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
8571
8572 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
8573
8574         * src/SDCCcse.c: fixed part of bug #814548
8575
8576 2003-09-28  Borut Razem <borut.razem AT siol.net>
8577
8578         * src/asm.c: rewrite of printILine() to use temporary file instead
8579           a pipe
8580         * src/xa51/main.c: commented out declaration of int rewinds
8581
8582 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8583
8584         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
8585
8586 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8587
8588         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
8589         * src/asm.c (printILine): Fixed bug #811015
8590
8591 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8592
8593         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
8594         freeing.
8595
8596 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8597
8598         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
8599         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
8600         to correctly handle general case of AOP_PAIRPTR
8601         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
8602
8603 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8604
8605         * src/mcs51/ralloc.c (fillGaps),
8606         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
8607         register positioning bug)
8608
8609 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
8610
8611         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
8612
8613 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8614
8615         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
8616         genCodePointerGet, genGenPointerGet, genFarPointerSet,
8617         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
8618         (ralloc doesn't intentionally do this now, but perhaps later)
8619         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
8620         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
8621         register positioning bugs (Fixed bug #762602 and #795325)
8622         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
8623         (Fixed bug #808779)
8624         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
8625         lines that --i-code-in-asm generates
8626
8627 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8628
8629         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
8630         trying to fclose a FILE* that was already closed.
8631
8632 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8633
8634         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
8635         of const struct should be treated as if const themselves)
8636
8637 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
8638
8639         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
8640
8641 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8642
8643         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
8644         Unix (/n) and DOS (/r/n) line terminations.
8645
8646 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8647
8648         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
8649         bug #613775
8650
8651 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8652
8653         * src/mcs51/gen.c (genFunction, genEndFunction),
8654         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
8655         and restore of EA so that stack offsets to parameters are
8656         correct when using both critical and reentrant/stack-auto.
8657         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
8658         size (can be triggered in error if sloc is shared between
8659         different sized objects)
8660         * device/include/float.h: fixed macros to explicitly use
8661         unsigned long where needed
8662
8663 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
8664
8665         Feature req. 799831: added code to allow nesting of critical functions
8666         * src/mcs51/gen.c (genFunction, genEndFunction)
8667         * src/ds390/gen.c (genFunction, genEndFunction)
8668
8669 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8670
8671         * src/SDCCsymt.c (sclsFromPtr),
8672         * src/SDCCsymt.h,
8673         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
8674         support for standard C idiom of memory mapped variables; for
8675         example, *((xdata int*)0x1234) = 1 is now internally equivalent
8676         to xdata int at 0x1234 tempvar = 1.
8677         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
8678         provided by Akiya ISHIDA
8679
8680 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
8681
8682         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
8683         * src/SDCCval.c (constVal): added reduction from int to char
8684         * src/SDCCval.c (valMult, valDiv): fixed sign handling
8685         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
8686         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
8687         to ignore the sign
8688         * support/regression/tests/shifts.c: fixed
8689
8690 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8691
8692         * src/z80/gen.c (genXor): Fixed bug #805445
8693
8694 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8695
8696         Fixed bug #621531 (const & volatile confusion in the type chain).
8697         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
8698         refer to the const or volatile state of the pointer itself.
8699
8700         * src/SDCCast.c
8701         * src/SDCCglue.c
8702         * src/SDCCicode.c
8703         * src/SDCCsymt.c
8704         * src/SDCCval.c
8705         * src/SDCC.y
8706         * src/SDCCsymt.h
8707         * src/pic/gen.c
8708         * src/pic/ralloc.c
8709         * src/pic16/gen.c
8710         * src/pic16/ralloc.c
8711         * support/regression/tests/const.c
8712
8713 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8714
8715         When checking for duplicated modules, use absolute paths
8716         instead of relative paths.  Files changed:
8717
8718         * as/mcs51/lklib.c
8719         * link/z80/lklib.c
8720
8721 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8722
8723         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
8724
8725 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8726
8727         * device/include/string.h: added size_t typedef, changed
8728         prototypes to use size_t, eliminated separate reentrant and
8729         non-reentrant declarations, added _memmove declaration
8730         * device/lib/_memcpy.c: changed to use size_t instead of int,
8731         changed /4 to >>2 to avoid division library call
8732         * device/lib/_memcmp.c,
8733         * device/lib/_memset.c,
8734         * device/lib/_strncat.c,
8735         * device/lib/_strncpy.c,
8736         * device/lib/_strncmp.c: changed to use size_t instead of int
8737         * device/lib/_memmove.c: new file (fixed bug #772294)
8738         * device/lib/Makefile.in: added _memmove.c
8739         * device/lib/z80/asm_strings.s: fixed bug #772290
8740         * support/regression/tests/bitfields.c: attempt to fix host assertion
8741         failure on amd64-unknown-linux2.2
8742
8743 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8744
8745         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
8746         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
8747         * as/z80/asmain.c (main): fixed bug #801766
8748
8749 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
8750
8751         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
8752         compilers
8753
8754 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8755
8756         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
8757         reported in bug #800609
8758
8759 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
8760
8761         * Top header beautifications in src/pic16 directory:
8762           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
8763           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
8764           pcoderegs.h, ralloc.c, ralloc.h
8765         * main.c: added top header and GPL license notice
8766         * pcode.c: fixed the if-conditional warning
8767
8768 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
8769
8770         * device/lib/_mullong.c: replaced int by short for gcc
8771
8772 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8773
8774         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
8775         and JUMPTABLE iCodes properly now (worked by accident before)
8776         * src/mcs51/gen.c (leftRightUseAcc),
8777         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
8778         iCode properly now. Use getSize instead of nRegs since a & b
8779         aren't part of the nRegs tally.
8780
8781 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
8782
8783         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
8784         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
8785           before instructions that use the _STATUS register
8786
8787 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
8788
8789         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
8790         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
8791         fetching of the pointer
8792         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
8793         copied from genNearPointerSet()
8794         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
8795         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
8796         If they pop r0/r1 they must be called in the opposite order than aopOp().
8797         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8798         (resp. --stack-auto), prepared for --xstack
8799
8800 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8801
8802         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8803
8804 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8805
8806         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8807         these ports have their own __sdcc_external_start()
8808
8809 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8810
8811         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8812         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8813         type for bits was changed. It resulted in bit variables becoming
8814         global, which is not permitted in PIC 14 assembly output.
8815
8816 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8817
8818         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8819
8820 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8821
8822         Z80 and MCS51 linkers complaint if a public symbol is defined
8823         in more than one library module:
8824
8825         * as/mcs51/lklib.c
8826         * link/z80/lklib.c
8827         * as/mcs51/Makefile.in
8828
8829 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8830
8831         A few small changes that speed up the peephole optimizer.
8832
8833         * src/SDCCpeeph.c
8834
8835 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8836
8837         Try to make the peephole optimizer smarter by maintaining
8838         an association between the assembly source code and the
8839         iCodes that originated them. Put this information to use
8840         with a new peephole rule condition "notVolatile" so that
8841         the rules can be aggressive yet still safe.
8842
8843         * src/SDCCpeeph.c
8844         * src/SDCCpeeph.h
8845         * src/mcs51/gen.c
8846         * src/mcs51/peeph.def
8847
8848 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8849
8850         Fixed bug #741761
8851
8852         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8853         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8854         if the left or right operand symbols have the accuse flag set.
8855
8856 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8857
8858         Changed the type of the result of the ! (NOT) operator to char;
8859         previously it returned the same type as the source. This allows
8860         us to eliminate all the genFloatNot functions (all of its target
8861         implementations were very buggy) since !float can use the same
8862         code as !long now.
8863
8864         * src/SDCCicode.c (ast2iCode): ! returns char
8865         * src/mcs51/gen.c (genNot, genNotFloat),
8866         * src/ds390/gen.c (genNot, genNotFloat),
8867         * src/z80/gen.c (genNot, genNotFloat),
8868         * src/pic/gen.c (genNot, genNotFloat),
8869         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8870
8871 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8872
8873         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8874         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8875            during interrupts. Ensure WSAVE is located at a shared bank address.
8876         2. Fixed page selection in some places
8877         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8878            the registers name strings.
8879         4. Fixed "signed / unsigned compare" compiler warnings.
8880         5. The PIC port manages its own allocation of the general purpose
8881            registers, but makes no attempt to reuse them. As a result when
8882            compiling it soon runs out of general purpose registers. Some
8883            additional code was added to the files pcode.c and device.c to walk
8884            through the function call tree and rename the registers so that they
8885            get reused.
8886
8887         * src/pic/device.c
8888         * src/pic/gen.c
8889         * src/pic/glue.c
8890         * src/pic/pcode.c
8891         * src/pic/pcode.h
8892         * src/pic/ralloc.c
8893         * src/pic/ralloc.h
8894         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8895         genPlus() & genMinus() when the result is the same as left or right
8896
8897 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8898
8899         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8900
8901 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8902
8903         Made bitfield a distinct type from bit so that bitfields
8904         convert as per ANSI C and bits retain their traditional
8905         boolean style behaviour. Implemented bitfield support in
8906         the z80 port.
8907
8908         * src/SDCCsymt.h,
8909         * src/SDCCsymt.c,
8910         * src/SDCCast.c,
8911         * src/cdbFile.c,
8912         * src/mcs51/gen.c,
8913         * src/ds390/gen.c: bit v bitfield split
8914         * src/z80/gen.c: New support for bitfields
8915         * support/regression/tests/bitfields.c: reenabled z80,
8916         added more tests
8917
8918 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8919
8920         Rules 246.x, 247.x relate to bitfields, the others speed up
8921         access to xdata mapped I/O devices.
8922
8923         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8924
8925 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8926
8927         Cleaned up genPackBits and genUnpackBits and added two helper
8928         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8929         for literal assignments in genPackBits (thanks to Frieder for
8930         reminding me).
8931
8932         * src/mcs51/gen.c
8933         * src/ds390/gen.c
8934
8935 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8936
8937         Fixed bug #748310 (pointer to function type mishandled when the
8938         function name is omitted). Also fixed a SIGSEGV when a function
8939         attribute (reentrant, etc) is used on a non-function or on a
8940         function but misplaced before the parameter list.
8941
8942         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8943         bug #748310
8944         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8945         * support/Util/SDCCerr.h,
8946         * support/Util/SDCCerr.c: Added func attr misuse error msg
8947
8948 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8949
8950         Fixed bug #787649 by anonymous
8951         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8952         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8953
8954 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8955
8956         Fixed numerous bitfield problems.
8957
8958         * src/SDCC.y: More bitfield related error checking
8959         * src/SDCCsymt.h,
8960         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8961         * support/Util/SDCCerr.h,
8962         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8963         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8964         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8965         * support/regression/tests/bitfields.c: tests added
8966
8967 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8968
8969         Made the constant following the "interrupt" keyword optional. If
8970         omitted, the function will not automatically be given an entry
8971         in the interrupt vector table (similar to #pragma NOIV, but
8972         less syntacticly kludgy). The interrupt number is also now
8973         range checked. Also fixed a bug in the high order bit example
8974         in the manual.
8975
8976         * src/SDCC.y
8977         * src/SDCCmem.c
8978         * src/SDCCglue.c
8979         * src/SDCCsymt.h
8980         * support/Util/SDCCerr.c
8981         * support/Util/SDCCerr.h
8982         * doc/sdccman.lyx
8983
8984 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8985
8986         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8987         * src/SDCCicode.c (operandOperation): rewritten some ops
8988         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8989         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8990         other type
8991         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8992         be re-activated by defining REDUCE_LITERALS)
8993         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8994         unsigned, but are signed by default
8995         * src/SDCCval.c (constVal): rearranged
8996         * src/SDCCval.c (valMod): preliminary fix
8997         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8998         * support/regression/literalop.c: added, work in progress
8999
9000 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9001
9002         Generate warnings for useless declarations like "char data;"
9003         that don't do what new users expect.
9004
9005         * src/SDCC.y
9006         * support/Util/SDCCerr.h
9007         * support/Util/SDCCerr.c
9008
9009 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
9010
9011         * src/SDCCval.c (valMult): fix overflow detection of negative int
9012
9013 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9014
9015         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
9016
9017         Changes to support big endian targets:
9018
9019         * src/ports.h
9020         * src/SDCCglue.c
9021         * src/avr/main.c
9022         * src/ds390/main.c
9023         * src/izt/i186.c
9024         * src/mcs51/main.c
9025         * src/pic/main.c
9026         * src/pic16/main.c
9027         * src/xa51/main.c
9028         * src/z80/main.c
9029
9030 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
9031
9032         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
9033         * device/lib/time.c: fixed warning "integer overflow in expression"
9034
9035 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
9036
9037         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
9038         * src/SDCCval.c (constVal): changed default to signed; hex and octal
9039         constants are unsigned; added recognition of "u" flag for unsigned
9040         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
9041         * src/SDCCval.c (valDiv, valMod): fixed signdness
9042         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
9043         signedness of modulo, left and right shift
9044         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
9045         * support/Util/SDCCerr.h: added warning W_INT_OVL
9046         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
9047         * src/SDCCast.c (ast_print): improved output of constants
9048
9049 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9050
9051         Fixed some warnings when building with MSVC:
9052
9053         * as\mcs51\asdata.c
9054         * as\z80\asdata.c
9055         * as\mcs51\asm.h
9056         * as\z80\asm.h
9057         * link\z80\aslink.h
9058         * link\z80\lkdata.c
9059         * link\z80\lkeval.c
9060         * link\z80\lkgb.c
9061         * link\z80\lkihx.c
9062         * link\z80\lks19.c
9063         * link\z80\lksym.c
9064         * support\cpp2\cpplib.c
9065         * src\ds390\gen.c
9066         * src\mcs51\gen.c
9067
9068 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
9069
9070         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
9071
9072 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9073
9074         * support\librarian\clean.mk: Do not remove Makefile.
9075         * support\librarian\Makefile: added.
9076
9077 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9078
9079         Added librarian to MSVC build:
9080         * all.dsp
9081         * sdcc.dsw
9082         * support\librarian\librarian.dsp
9083
9084         'configure' not needed for librarian, removed:
9085         * support\librarian\configure
9086         * support\librarian\configure.in
9087         * support\librarian\config_in.h
9088         * support\librarian\Makefile.in
9089
9090         Hopefully these ones built the librarian and the rest of sdcc properly:
9091         * Makefile
9092         * Makefile.common.in
9093
9094         Messed up 'configure', so revert to previous version:
9095         * configure
9096         * configure.in
9097
9098 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
9099
9100         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
9101         there, while the mantissa of a double is "only" 53 bits wide.
9102
9103 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9104
9105         Adding sdcclib to the build.  MSVC project coming soon.
9106         Files added/changed:
9107
9108         * support\librarian\clean.mk
9109         * support\librarian\configure
9110         * support\librarian\configure.in
9111         * support\librarian\config_in.h
9112         * support\librarian\Makefile.bcc
9113         * support\librarian\Makefile.in
9114         * support\librarian\sdcclib.c
9115         * Makefile.bcc
9116         * Makefile
9117         * Makefile.common.in
9118         * configure
9119         * configure.in
9120
9121 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9122
9123         Linker now complaints if linked modules have conflicting options, for
9124         example, one compiled using --model-large and another one compiled with
9125         --model-small.  The following files were modified:
9126
9127         * as\mcs51\asdata.c
9128         * as\mcs51\aslink.h
9129         * as\mcs51\asm.h
9130         * as\mcs51\asmain.c
9131         * as\mcs51\asout.c
9132         * as\mcs51\i51pst.c
9133         * as\mcs51\lkdata.c
9134         * as\mcs51\lklibr.c
9135         * as\mcs51\lkmain.c
9136         * as\z80\asdata.c
9137         * as\z80\asm.h
9138         * as\z80\asmain.c
9139         * as\z80\asout.c
9140         * as\z80\z80pst.c
9141         * link\z80\aslink.h
9142         * link\z80\lkdata.c
9143         * link\z80\lklibr.c
9144         * link\z80\lkmain.c
9145         * src\SDCCglue.c
9146
9147 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9148
9149         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
9150         as/mcs51/lklibr.c: Generate a warning when a library is not found.
9151
9152 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
9153
9154         * src/z80/mappings.i: fix _mul[us][int,long] entries
9155
9156 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9157
9158         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
9159
9160 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9161
9162         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
9163         * support/regression/tests/bitopcse.c: added
9164         fixed warning:
9165         * src/avr/gen.c:
9166         * src/pic/gen.c:
9167         * src/pic16/gen.c:
9168         * src/z80/gen.c:
9169         * src/xa51/gen.c:
9170
9171 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9172
9173         added support for new library format to z80, gbz80 linkers:
9174         *link/z80/aslink.h
9175         *link/z80/lklex.c
9176         *link/z80/lklib.c
9177         *link/z80/lklist.c
9178
9179 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9180
9181         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
9182         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
9183
9184 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
9185
9186         added DUMMY_READ_VOLATILE:
9187         * src/SDCC.y:
9188         * src/avr/gen.c:
9189         * src/xa51/gen.c:
9190         * src/z80/gen.c:
9191         * src/pic/gen.c:
9192         * src/pic16/gen.c:
9193         * src/mcs51/gen.c:
9194         * src/ds390/gen.c:
9195         * src/SDCCcse.c (algebraicOpts): many improvements
9196         * src/SDCCcse.h: removed algebraicOpts()
9197         * src/SDCCicode.c (picDummyRead): added
9198
9199 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9200
9201         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
9202         "Insufficient space in data memory".
9203
9204 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9205
9206         * src/mcs51/gen.c: fixed bug #771358
9207         * src/z80/gen.c: fixed bug #759087
9208
9209 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
9210
9211         * src/pic16/glue.c: minor cleanup by Vangelis
9212
9213 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9214
9215         * device/include/regc515c.h: fixed #758477
9216         * device/lib/_gptrget.c: saving some cycles in generic pointer get
9217         * device/lib/_gptrput.c: saved a few bytes
9218         * my tab spacing is 8, yours too?)
9219         * device/lib/_ser.c: process RX bytes earlier than TX bytes
9220         * device/lib/serial.c: process RX bytes earlier than TX bytes
9221         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
9222
9223 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9224
9225         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
9226
9227 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9228
9229     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
9230
9231 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
9232
9233         * device/lib/Makefile.in: bad fix, reverted to 1.43
9234
9235 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
9236
9237         * device/lib/Makefile.in: added missing z80 object files
9238
9239 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
9240
9241         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
9242         pic16 progress by Vangelis:
9243         * src/SDCCglobl.h:
9244         * src/SDCCmain.c:
9245         * src/pic/Makefile:
9246         * src/pic:
9247         * pic/Makefile:
9248         * pic16/device.c:
9249         * pic16/device.h:
9250         * pic16/gen.c:
9251         * pic16/gen.h:
9252         * pic16/genarith.c:
9253         * pic16/glue.c:
9254         * pic16/main.c:
9255         * pic16/pcode.c:
9256         * pic16/pcode.h:
9257         * pic16/pcodepeep.c:
9258         * pic16/peeph.def:
9259
9260 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9261
9262     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
9263
9264 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9265
9266     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
9267     added gbz80 build to MSVC project.
9268     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9269     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9270     from 8051 stuff and setup so it links using a .lnk file.
9271
9272 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9273
9274     * support/librarian/sdcclib.c: sdcc librarian.
9275     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9276     with sdcclib.
9277
9278 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9279
9280     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9281
9282 2003-07-02  Borut Razem <borut.razem AT siol.net>
9283
9284         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9285         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9286         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9287         src/xa51/main.c, src/z80/main.c:
9288         virtualization of glue() function: each port has it's own glue function,
9289         which is accessed by do_glue function pointer in PORT.general structure
9290
9291 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9292
9293         * DS800C400 fun, improved ROM interface and tinibios.
9294
9295 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9296
9297         * More support for DS80C400. Now includes beginning of interface to ROM.
9298
9299 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9300
9301         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9302
9303 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9304
9305         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
9306
9307 2003-06-19  Borut Razem <borut.razem AT siol.net>
9308
9309         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
9310
9311 2003-06-19  Borut Razem <borut.razem AT siol.net>
9312
9313         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
9314         fixed Z80 port - crt0.o: cannot open.
9315
9316 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
9317
9318         * support/Util/MySystem.c (merge_command): revert bad fix
9319
9320 2003-06-18  Borut Razem <borut.razem AT siol.net>
9321
9322         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
9323
9324 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9325
9326         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9327         option --use-stdout sends errors to stdout instead of stderr.
9328
9329 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
9330
9331         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
9332
9333 2003-06-15  Borut Razem <borut.razem AT siol.net>
9334
9335         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
9336         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
9337         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
9338         fixed width array of pointers replaced with sets;
9339         multiple include and lib paths ared transferred to preprocessor and linker
9340         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
9341         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
9342         fixed width array of pointers
9343         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
9344         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
9345         fixupPath(), getPathDifference()
9346         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
9347         fixed width array of pointers
9348
9349 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
9350
9351         * src/pic16/ralloc.c: fix warnings
9352         * src/pic16/pcode.c: fix warning
9353
9354 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
9355
9356          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
9357         know all the details, but essentially this set of changes enable
9358         the pic16 port to generate movff instructions and generate assembler
9359         directives,
9360         * src/SDCCmain.c:
9361         * src/pic16/gen.c:
9362         * src/pic16/glue.c:
9363         * src/pic16/pcode.c:
9364         * src/pic16/device.c:
9365         * src/pic16/main.c:
9366         * src/pic16/pcode.h:
9367         * src/pic16/pcoderegs.c:
9368         * src/pic16/ralloc.c:
9369         * src/pic16/ralloc.h:
9370
9371 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9372
9373         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9374         added option --vc, so sdcc errors and warnings are compatible with
9375         Microsoft Visual Studio.
9376
9377 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9378
9379         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
9380           device/lib/libfloat.lib: added atof function.
9381
9382 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
9383
9384         * doc/sdccman.lyx: updated to Lyx 1.3
9385         * doc/cdbfileformat.lyx: updated to Lyx 1.3
9386         * doc/test_suite_spec.lyx: updated to Lyx 1.3
9387         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
9388
9389 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
9390
9391         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
9392
9393 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9394
9395         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
9396           additions to the "related tools/documentation" section
9397
9398 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
9399
9400         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
9401
9402 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
9403
9404         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
9405         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
9406
9407 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
9408
9409         * doc/sdccman.lyx: fix double dash and other minor things
9410         * doc/Makefile: fix double dash
9411
9412 2003-05-28  Karl Bongers(patches from Martin Helmling)
9413         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
9414           condition and ignore commands.
9415
9416 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9417
9418         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
9419           is in parts still quite out of date, I did changes as far as I felt makes sense
9420           for a non-native english speaker.
9421           Please feel free to add to the manual or to correct my changes.
9422         * doc/Makefile: undid touching the date of intermediate tex files.
9423
9424 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9425
9426         * doc/sdccman.lyx: Manual has an index now
9427
9428 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
9429
9430         Finalize muluint/mulsint and mululong/mulslong merging:
9431         * device/lib/_mulint.c
9432         * device/lib/_mullong.c
9433         * device/lib/gbz80/mul.s
9434         * device/lib/gbz80/stubs.s
9435         * device/lib/z80/mul.s
9436         * device/lib/z80/stubs.s
9437         * src/SDCCsymt.c (initCSupport)
9438
9439 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9440
9441         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
9442         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
9443           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
9444           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
9445           instead of /Zm500.
9446
9447 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9448
9449         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
9450           the regression tests I'm not brave enough to enable 245.b, 245.c
9451         * doc/sdccman.lyx: added latex preamble for hyperref package.
9452           Using pdflatex this will give you a hyperlinked pdf file with
9453           bookmarks. (prepend '%' before /usepackage if this breaks something)
9454
9455 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9456
9457          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
9458
9459 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
9460
9461         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
9462
9463 2003-05-21    <johan AT balder>
9464
9465         * src/SDCCglue.c (printIval): fixed bug #739934
9466
9467 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9468
9469         Applied patch from bug 737905 (renamed yylineo to mylineno):
9470         * src/altlex.c
9471         * src/SDCCast.c
9472         * src/SDCglobl.h
9473         * src/SDCC.lex
9474         * src/SDCCsymt.c
9475         * src/SDCCval.c
9476         * src/pic16/pcode.c: Cleaned warnings
9477         * src/pic16/pcodeflow.c: Cleaned warnings
9478         * src/pic16/pcoderegs.c: Cleaned warnings
9479
9480 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
9481
9482         * src/pic16/pcode.c: Cleaned warnings
9483         * src/pic16/pcodepeep.c: Cleaned warnings
9484         * src/pic16/ralloc.c: Cleaned warnings
9485
9486 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9487
9488         * doc/sdccman.lyx: fixed bug 739745
9489         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
9490
9491 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
9492
9493         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
9494         it can be defined with CFLAGS when running configure
9495         * src/SDCCmain.c: fixed compiling + linking with object files
9496
9497 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
9498
9499         * configure.in: configure for pic16 port,
9500             added --disable-pic16-port
9501         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
9502         * src/SDCCmain.c: linkOptions is changed to set *,
9503             added if/endif conditional macros to remove options help
9504             messages from optionsTable when a port is not configured, added
9505             support for the PIc16 port in the ports table, when executing
9506             the compiler with no port specified on command line, a default
9507             port is selected with the new macro DEFAULT_PORT which is
9508             defined in port.h, in setDefaultOptions() linkOptions is removed
9509             from initialization assignment, since now it is a set,
9510             parseCmdLine uses setParseWithComma for linkOptions, in
9511             linkEdit() linkOptions are accessed with new function indexSet()
9512             which returns the i'th item of a set variable. See SDCCset.c, in
9513             linkEdit() when calling buildCmdLine(), added linkOptions as
9514             last argument. Now users can pass arguments to gplink via the
9515             -Wl option, main() uses pic16glue() to glue up pic16 programs
9516         * src/SDCCpeeph.c: various changes to support pic16
9517         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
9518             return the i'th item of the set
9519         * src/SDCCset.h: added function prototype for indexSet()
9520         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
9521         * src/clean.mk: added pic16 in CLEANALLPORTS variable
9522         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
9523             added macro DEFAULT_PORT
9524         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
9525         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
9526             generated
9527         * src/pic16/glue.c: commented out some error producing lines
9528         * src/pic16/main.c: __config directives are commented out to stop
9529             gpasm complaining and test the linkage with gplink, _linkCmd and
9530             _asmCmd changed to be more gplink and gpasm friendly
9531         * src/pic16/peeph.def: peep rule 3 is commented out, since it
9532             produced an error when parsed, peep rule 12 is added to utilize
9533             movff, but it is commented out since the pCode does not support
9534             yet a command with 2 address arguments
9535
9536 2003-05-18    <johan AT balder>
9537
9538         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9539         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9540 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
9541
9542         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
9543   Added feature to script commands from file.
9544
9545 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
9546
9547         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
9548         * src/SDCCutil.c: include ctype.h for win32
9549
9550 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
9551
9552         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
9553
9554 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
9555
9556         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
9557   Fixed so you can set breakpoints prior to run, run does not stop
9558   on entry now.  Add tbreak.  Other enhancements and fixes for use
9559   with ddd.
9560
9561 2003-05-12  Borut Razem <borut.razem AT siol.net>
9562
9563         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
9564
9565 2003-05-11  Borut Razem <borut.razem AT siol.net>
9566
9567         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
9568         the path of bin directory, so that PATH is the only env. variable, which has to be set
9569         in case of standard installation.
9570         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
9571         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
9572         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
9573
9574 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9575
9576         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
9577         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
9578         temp files are in the port dir; clean the gen/test directory when
9579         generating new test.c
9580         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
9581         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
9582         * support/regression/tests/zeropad.c: added
9583
9584 2003-05-09    <johan AT balder>
9585
9586         * src/SDCCglue.c: fixed bug #597940
9587
9588 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
9589
9590         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9591   cache sfr, optimize next,step, fix off by one sourceline,
9592   support ddd list function.
9593         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
9594
9595 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9596
9597         * support/regression/HTMLgen.py: added compare_s2f()
9598         * support/regression/Makefile: redo 1.27
9599         * support/regression/generate-cases.py: redo 1.5
9600
9601 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
9602
9603         * support/regression/tests/float.c: workaround 33 bit hex constant
9604         * support/regression/tests/simplefloat.c: fix division for host
9605
9606 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
9607
9608         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
9609         that tame's the PIC's over-aggressive optimizer.
9610
9611 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9612
9613          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
9614          support for MSVC.
9615
9616 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
9617
9618         Initial support for DS80C400. "Hello world" runs on TINIm400
9619         (with polled I/O).
9620
9621 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
9622
9623          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9624          * Some notes on ddd usage added in debugger/README
9625          Martin Helmling adding more features and fixes for ddd GUI debugger.
9626          Code added for nexti, stepi, up, down, and other adjustments.
9627
9628 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
9629
9630         * src/pic/pCodepeep.c non-wildcard asmops are now handled
9631         * src/pic/peeph.def Added two rules to optimize carry manipulation
9632         * src/pic/* removed debug printfs
9633
9634 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
9635
9636         * debugger/mcs51/cmd.c: added header newalloc.h
9637
9638 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
9639
9640         * as/Makefile: new EXEEXT
9641         * as/z80/Makefile: remove trailing slash of BUILDIR
9642         * as/z80/clean.mk: new EXEEXT
9643         * Makefile.common.in: add to CFLAGS (and others), don't replace it
9644         * support/cpp2/Makefile.in: new EXEEXT
9645         * src/pic/glue.c (pic14emitRegularMap): fixed warning
9646
9647 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
9648
9649         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
9650         EXEEXT was introduced to fix all related problems with targets
9651         "clean", "install" and "uninstall"; a couple of further flaws
9652         especially with "clean" have been fixed too
9653         * as/mcs51/Makefile.in
9654         * as/mcs51/clean.mk
9655         * as/z80/Makefile
9656         * Makefile
9657         * clean.mk
9658         * debugger/mcs51/Makefile.in
9659         * debugger/mcs51/clean.mk
9660         * link/z80/Makefile
9661         * link/z80/Makefile.in
9662         * link/z80/clean.mk
9663         * link/Makefile
9664         * packihx/Makefile.in
9665         * packihx/clean.mk
9666         * sim/ucsim/Makefile
9667         * sim/ucsim/clean.mk
9668         * sim/ucsim/avr.src/Makefile.in
9669         * sim/ucsim/avr.src/clean.mk
9670         * sim/ucsim/s51.src/Makefile.in
9671         * sim/ucsim/s51.src/clean.mk
9672         * sim/ucsim/xa.src/Makefile.in
9673         * sim/ucsim/xa.src/clean.mk
9674         * sim/ucsim/z80.src/Makefile.in
9675         * sim/ucsim/z80.src/clean.mk
9676         * sim/ucsim/main_in.mk
9677         * sim/ucsim/packages_in.mk
9678         * sim/ucsim/gui.src/Makefile.in
9679         * sim/ucsim/gui.src/serio.src/Makefile.in
9680         * sim/ucsim/gui.src/serio.src/clean.mk
9681         * src/Makefile.in
9682         * src/clean.mk
9683         * support/cpp2/Makefile.in
9684         * support/cpp2/clean.mk
9685         * support/makebin/Makefile
9686         * support/makebin/clean.mk
9687         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
9688         * doc/sdccman.lyx: --program-suffix no longer needed
9689
9690 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
9691
9692          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
9693          Martin Helmling added support for ddd GUI debugger.
9694          Code added to display assembly, set variables, and other commands
9695          to interface to ddd.
9696
9697 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
9698
9699         * as/Makefile: fix target clean
9700         * as/clean.mk: fix target clean
9701         * as/z80/clean.mk: fix target clean
9702
9703 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
9704
9705         * Makefile.common.in: added  AT EXEEXT AT
9706         * configure.in: removed all mingw32 stuff
9707         * configure: rebuilt from configure.in
9708         * doc/sdccman.lyx: updated section "installation"
9709         * support/scripts/sdcc_mingw32: adapted to configure
9710         * support/scripts/sdcc_cygwin_mingw32: added
9711
9712 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
9713
9714         * src/pic Added object file support for the PIC port
9715         * src/pic Applied patch from Craig Franklin (this started the object file support)
9716         * src/regression Updated the PIC regression tests for object files
9717
9718 2003-04-20  Borut Razem <borut.razem AT siol.net>
9719
9720         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
9721           lklex.c: In function `getfid':
9722           lklex.c:203: warning: array subscript has type `char'
9723         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
9724           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
9725         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
9726           stack handling macros
9727
9728 2003-04-19  Borut Razem <borut.razem AT siol.net>
9729
9730         * "handling space characters in file path" task:
9731         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
9732         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
9733         * support/Util/MySystem.h: make it self-sufficient
9734         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
9735           src/z80/main.c, sdcc/as/mcs51/lklex.c:
9736           handling space characters in file path
9737         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
9738           (it will be used by assemblers, which have their own includes, e.g. gpasm)
9739         * support/Util/MySystem.c: handling space characters in executable's path
9740
9741 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
9742
9743         * as/z80/Makefile: fix permanent rebuild of z80
9744         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
9745         * support/regression/tests/bitfields.c: added Johan's bitfields.c
9746
9747 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
9748
9749         * src/SDCCopt.c: add special case optimization to replace modulo by
9750           a power of two with a bitwise AND.
9751
9752 2003-04-18    <johan AT balder>
9753
9754         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
9755
9756 2003-04-17    <johan AT balder>
9757
9758         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
9759         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
9760
9761 2003-04-13  Borut Razem <borut.razem AT siol.net>
9762
9763         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
9764         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
9765           fixed mingw problem in adl_NORMALIZE_PATH
9766
9767 2003-04-12  Borut Razem <borut.razem AT siol.net>
9768
9769         * fixed "#pragma SAVE/RESTORE can not be nested":
9770         * src/SDCC.lex: reworked pragma handling functions
9771         * sdcc/src/SDCCglobl.h: reworked stack handling macros
9772         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
9773
9774 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9775
9776         * src/SDCCutil.c (pathEquivalent): defined but not used
9777         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
9778         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
9779         * configure: rebuilt from configure.in
9780         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9781         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9782         * device/include/Makefile.in: replace sdcc_datadir
9783         * device/lib/Makefile.in: replace sdcc_datadir
9784         * Makefile.common.in: add LDFLAGS from configure
9785         * packihx/Makefile.in: use LDFLAGS
9786         * src/Makefile.in: use LDFLAGS
9787         * support/cpp2/Makefile.in: add LDFLAGS from configure
9788         * support/makebin/Makefile: use LDFLAGS
9789         * .version: bumped version number to 2.3.5
9790
9791 2003-04-12  Borut Razem <borut.razem AT siol.net>
9792
9793         * completed "different paths" task:
9794         * src/SDCCmacro.c: fixed bug in handling quotes
9795         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
9796         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9797
9798 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9799
9800         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9801
9802 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9803
9804         * ds390/gen.c ds390/peeph.def: fix bug 706781
9805
9806 2003-04-11  Borut Razem <borut.razem AT siol.net>
9807
9808         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9809
9810 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9811
9812         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9813         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9814          set - this bit used to not be set...).
9815         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9816           bad code in PIC Port
9817         * src/regression/and2.c added to test bug 609268
9818         * src/regression/Makefile added and2.c to regression test
9819
9820
9821 2003-04-08    <johan AT CP255758-A>
9822
9823         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9824         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9825         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9826
9827 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9828
9829         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9830         fix bug #487815
9831         * support/cpp2/Makefile.in: fix bug #487815
9832         * configure: rebuilt from configure.in
9833         * Makefile.common.in: docdir changed, new path suffixes
9834         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9835         * sdcc_vc_in.h: reflect changes from sdccconf.h
9836         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9837         * src/SDCCutil.h: remove BINDIR hack
9838         * doc/sdccman.lyx: update new path hierarchy
9839
9840 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9841
9842         * src/SDCCpeeph.c: added okToRemoveSLOC test
9843
9844 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9845
9846         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9847
9848 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9849
9850         * src/SDCCpeeph.c: added labelIsReturnOnly test
9851         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9852
9853 2003-04-05    <johan AT balder>
9854
9855         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9856         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9857         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9858         * src/SDCCast.c: fixed a warning
9859         * src/SDCCast.h: fixed a warning
9860         * src/SDCCicode.c (operandFromAst): fixed a warning
9861
9862 2003-04-04    <johan AT balder>
9863
9864         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9865         * src/SDCCast.c (decorateType): fixed bug #715076
9866         * src/SDCC.y: fixed bug #702907
9867
9868 2003-04-03    <johan AT balder>
9869
9870         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9871         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9872         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9873         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9874         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9875
9876 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9877
9878         * _decdptr.c: fix return values
9879         * _gptrget.c: fix return values
9880         * _gptrgetc.c: fix return values
9881         * _gptrput.c: fix return values
9882         * _mulint.c: fix return values
9883         * as/z80/Makefile: fix 'make -j' problem
9884
9885 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9886
9887         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9888         * configure.in: big cleanup, updated to autoconf 2.5x
9889         * configure: rebuilt from configure.in
9890         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9891         * sdcc_vc_in.h: reflect changes from sdccconf.h
9892         * doc/Makefile: fixed a flaw in "make install"
9893
9894 2003-04-02    <johan AT balder>
9895
9896         * src/ds390/gen.c (genCmp): no comments
9897         * src/mcs51/gen.c (genCmp): no comments
9898         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9899         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9900
9901 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9902
9903         * support/regression/generate-cases.py: place generated file in given sub directory
9904         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9905         * support/regression/Makefile: improvements for 'make -j';
9906         side effect: it's simpler and faster now
9907
9908 2003-03-31  Borut Razem <borut.razem AT siol.net>
9909
9910         * src/z80/main.c: link-{port} and as-{port} defined without path
9911         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9912
9913 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9914
9915         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9916
9917 2003-03-30  Borut Razem <borut.razem AT siol.net>
9918
9919         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9920           changed type of list parameter to set
9921         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9922         * src/port.h: changed type of do_assemble() parameter to set
9923         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9924           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9925           definition of "cppoutfilename" macro with NULL value in preProcess()
9926         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9927         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9928         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9929           replaced with set *binPathSet
9930         * shash_add() deallocates the item, if allready exsists, before adding the new one
9931         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9932
9933 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9934
9935         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9936           a nested for loop bug in the PIC port
9937         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9938           for loops
9939
9940 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9941
9942         * support/Util/dbuf.h: remove C++ stuff to make it portable
9943
9944 2003-03-28  Borut Razem <borut.razem AT siol.net>
9945
9946         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9947           literal strings in stringLiteral()
9948         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9949         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9950           to the project
9951
9952 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9953
9954         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9955
9956 2003-03-26    <johan AT balder>
9957
9958         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9959         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9960         * src/SDCCast.c (decorateType): fixed " -v < 3"
9961
9962 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9963
9964         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9965         Added Lenny Story's debug infrastructure changes:
9966         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9967         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9968         * src/cdbFile.c: added
9969         * src/SDCCdebug.c: added
9970         * src/SDCCdebug.h: added
9971         * src/SDCCast.c (createFunction)
9972         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9973         * src/SDCCmain.c (parseCmdLine, main)
9974         * src/SDCCmem.c (redoStackOffsets)
9975         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9976         * src/SDCCsymt.h
9977         * src/common.h
9978         * src/avr/gen.c (genAVRCode)
9979         * src/ds390/gen.c (gen390Code)
9980         * src/mcs51/gen.c (gen51Code)
9981         * src/pic/gen.c (genpic14Code)
9982         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9983         * src/xa51/gen.c (genXA51Code)
9984         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9985
9986 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9987
9988         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9989         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9990
9991 2003-03-22    <johan AT balder>
9992
9993         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9994
9995 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9996
9997         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9998         * doc/cdbfileformat.lyx: added, written by Lenny Story
9999         * doc/Makefile: added cdbfileformat.lyx
10000         * doc/clean.mk: added cdbfileformat.lyx
10001
10002 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
10003
10004         * src/mcs51/peeph.def: fix bug #705773
10005
10006 2003-03-20    <johan AT balder>
10007
10008         An sfr/sbit can have an "at #" AND an initializer
10009         * src/SDCCsymt.c (checkSClass):
10010         * src/SDCCmem.c (allocGlobal):
10011         * src/SDCCmem.c (allocLocal):
10012         * src/SDCCast.c (createBlock):
10013
10014 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
10015
10016         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
10017
10018 2003-03-16    <johan AT balder>
10019
10020         Undid the hackup of const and volatile, the problem is much bigger
10021         * src/SDCC.y:1.65
10022         * src/SDCCast.c:1.171
10023         * src/SDCCglue.c:1.138
10024         * src/SDCCicode.c:1.146
10025         * src/SDCCsymt.c:1.150
10026         * src/SDCCval.c:1.65
10027
10028 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
10029
10030         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
10031         * src/ds390/gen.c (genAddrOf): fixed bug #704087
10032
10033 2003-03-13    <johan AT balder>
10034
10035         Hackup const and volatile modifiers in type chains a bit:
10036         * src/SDCC.y:1.63
10037         * src/SDCCast.c:1.169
10038         * src/SDCCglue.c:1.136
10039         * src/SDCCicode.c:1.143
10040         * src/SDCCsymt.c1.146
10041         * src/SDCCsymt.h1.59
10042         * src/SDCCval.c:1.63
10043
10044 2003-03-12    <johan AT balder>
10045
10046         * src/SDCCBBlock.h: more LRH debugging junk
10047         * src/SDCCcflow.h: more LRH debugging junk
10048         * src/SDCCloop.c: more LRH debugging junk
10049         * src/SDCC.y (struct_declaration): fixed bug #697590
10050         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
10051         * src/ds390/gen.c (aopForRemat): fixed bug #700031
10052         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
10053
10054 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10055         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
10056         test function names must now match exactly).
10057         * src/SDCCcse.c: added special case in findCheaperOp to allow
10058         extending a short integer. Makes less awful code for bug 700121 test case.
10059
10060 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10061
10062         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
10063         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
10064
10065 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10066
10067         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
10068         actually called (operandsNotEqual() was called for all
10069         operandsNotEqualX tests).
10070
10071 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10072
10073         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
10074         with shorter literals. Fixes bug 700121.
10075
10076 2003-03-11    <johan AT balder>
10077
10078         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
10079
10080 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
10081
10082         * src/SDCCloop.c (mergeRegions): an evil beast is dead
10083         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
10084
10085 2003-03-10  Borut Razem <borut.razem AT siol.net>
10086
10087         * src/SDCCmain.c: pipe preprocessor's output
10088         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10089         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10090         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10091         which closes all pipes in pipeSet set
10092         * src/SDCCset.c: free deleted item in function deleteSetItem()
10093         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10094         moved from z80 to src subproject
10095         * .version: increased version number to 2.3.4
10096
10097 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
10098
10099         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
10100         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
10101         * support/regression/ports/xa51/spec.mk: fix typo
10102
10103 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
10104
10105         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
10106
10107 2003-03-09  Borut Razem <borut.razem AT siol.net>
10108
10109         * src/SDCCmain.c: pipe preprocessor's output
10110         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10111         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10112         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10113         which closes all pipes in pipeSet set
10114         * src/SDCCset.c: free deleted item in function deleteSetItem()
10115         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10116         moved from z80 to src subproject
10117
10118 2003-03-09  Borut Razem <borut.razem AT siol.net>
10119
10120         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
10121         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
10122         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
10123         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
10124         * src/SDCCglobl.h: unification of WIN32 native definitions
10125
10126 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10127
10128         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
10129
10130 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10131
10132         * src/configure.in:   check for endianess (even while cross-compiling)
10133         * src/configure:      check for endianess (even while cross-compiling)
10134         * src/configure_in.h: check for endianess (even while cross-compiling)
10135         * src/avr/gen.c:        remove old endianess stuff
10136         * src/mcs51/gen.c:      remove old endianess stuff
10137         * src/ds390/gen.c:      remove old endianess stuff
10138         * src/pic/gen.c:        remove old endianess stuff
10139         * src/pic/genarith.c:   remove old endianess stuff
10140         * src/pic/glue.c:       fix endianess check
10141         * src/pic16/gen.c:      remove old endianess stuff
10142         * src/pic16/genarith.c: remove old endianess stuff
10143         * src/pic16/glue.c:     fix endianess check
10144         * src/xa51/gen.c:       remove old endianess stuff
10145         * src/z80/gen.c:        fix endianess check
10146         * src/SDCCglue.c:       fix endianess check
10147         * src/ds390/peeph.def: fix bug 700036
10148
10149 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10150
10151         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
10152         * src/configure: find appropriate data-types on host for SDCC's int and long
10153         * src/configure.in: find appropriate data-types on host for SDCC's int and long
10154         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
10155         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
10156
10157 2003-03-07    <johan AT balder>
10158
10159         Just a big NOOP:
10160                 some minor cleanups before the big shot
10161                 OP_DEFS and OP_USES now use Kevin's protection
10162                 new option --nolabelopt
10163
10164         * src/SDCCBBlock.c:
10165         * src/SDCCast.c,:
10166         * src/SDCCcflow.c:
10167         * src/SDCCcse.c:
10168         * src/SDCCicode.c:
10169         * src/SDCCicode.h:
10170         * src/SDCClabel.c:
10171         * src/SDCCloop.c:
10172         * src/SDCCmain.c:
10173         * src/ds390/ralloc.c:
10174         * src/mcs51/ralloc.c:
10175         * src/pic/ralloc.c:
10176         * src/xa51/ralloc.c:
10177         * src/z80/ralloc.c:
10178
10179 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
10180
10181         * src/pic/pcode.c (get_op): fix 64 bit warnings
10182         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
10183         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
10184         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
10185         * support/regression/tests/malloc.c: fix 64 bit warnings
10186
10187 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
10188
10189         * src/mcs51/gen.c (genMinus): fixed bug 696436
10190
10191 2003-03-02  Borut Razem <borut.razem AT siol.net>
10192
10193         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
10194
10195 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
10196
10197         * configure.in: test for mkstemp
10198         * sdccconf_in.h: add HAVE_MKSTEMP
10199
10200 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
10201
10202         * device/include/ctype.h: removed warning while using --stack-auto
10203         * device/include/malloc.h: removed warning while using --stack-auto
10204         * device/include/string.h: removed warning while using --stack-auto
10205
10206 2003-02-23  Borut Razem <borut.razem AT siol.net>
10207
10208         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
10209         because NDEBUG is defined (see man assert)
10210         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
10211
10212 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10213
10214         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
10215         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
10216
10217 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10218
10219         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
10220         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
10221
10222 2003-02-18    <johan AT balder>
10223
10224         * as/mcs51/asmain.c (asmbl): module can start with a digit
10225         * as/z80/asmain.c (asmbl): module can start with a digit
10226
10227 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
10228
10229         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
10230         * src/asm.c: fix pipe() for Mingw32
10231
10232 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
10233
10234         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
10235         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
10236         make -V work again; --c1mode reads now from stdin
10237         * doc/sdccman.lyx: added --c1mode
10238         * support/Util/SDCCerr.c: new messages for c1 mode
10239         * support/Util/SDCCerr.h: new messages for c1 mode
10240         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
10241
10242 2003-02-15    <johan AT balder>
10243
10244         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
10245
10246 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
10247
10248         * doc/sdccman.lyx: Environment variables, -o and other minor things
10249
10250 2003-02-14    <johan AT balder>
10251
10252         * src/xa51/main.c: before anyone really tries to use it :)
10253
10254         * Install doc's in share/sdcc/doc
10255         * removed some obsolete files
10256         * Do a proper make distclean and uninstall
10257         M Makefile.common.in
10258         R sdccbuild.sh
10259         M as/Makefile
10260         M device/include/Makefile.in
10261         M device/lib/Makefile.in
10262         M doc/sdccman.lyx
10263         M link/Makefile
10264         M sim/ucsim/doc/Makefile.in
10265         M src/clean.mk
10266         R src/avr/peeph.rul
10267         R src/xa51/peeph.rul
10268         M support/cpp2/Makefile.in
10269         M support/makebin/Makefile
10270
10271
10272 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10273
10274         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10275
10276 2003-02-10  Borut Razem <borut.razem AT siol.net>
10277
10278         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10279         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10280         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10281         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10282         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10283         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10284         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10285         src/z80/Makefile.bcc: Borland Makefile cleanup
10286         * as/z80/Makefile.bcc: Added Borland Makefile
10287         * support/cpp2/borland.h: Removed
10288
10289 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10290
10291         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10292         * src/SDCC.lex: new pragma NOIV
10293         * src/SDCCglobl.h: new pragma NOIV
10294         * src/SDCCmem.c: new pragma NOIV
10295
10296 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10297
10298         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10299
10300 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10301
10302         * src/SDCCmain.c: signal handling is switched off by --debug
10303         * doc/Makefile: small fix for install; use clean.mk again
10304         * doc/clean.mk: clean *.pdf and *.html too
10305
10306 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
10307
10308         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
10309         * device/lib/printfl.c: fix a ds390 bug by making it portable
10310         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
10311         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
10312         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
10313         * debugger/mcs51/cmd.c: converted multi-line string literals
10314         * sim/ucsim/globals.cc: converted multi-line string literals
10315         * src/SDCCmain.c: introduced signal handler to remove temp files
10316         * doc/Makefile: small tweaks, implement clean
10317         * doc: removed generated files
10318
10319 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10320
10321         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
10322         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
10323         Address Record is not correctly generated for DS390."
10324
10325 2003-02-02  Borut Razem <borut.razem AT siol.net>
10326
10327         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
10328         * as/mcs51/asm.h: fixed compilation with Borland C
10329         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
10330         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
10331         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
10332         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
10333         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
10334         src/z80/Makefile.bcc: delete $(LIB) only if exist
10335         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
10336
10337 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
10338
10339         * device/include/malloc.h: introduced NULL
10340         * device/include/string.h: introduced NULL
10341         * device/include/stdlib.h: introduced NULL
10342         * device/lib/_memcpy.c: removed NULL
10343         * device/lib/_strcat.c: removed NULL
10344         * device/lib/_strchr.c: removed NULL
10345         * device/lib/_strcmp.c: removed NULL
10346         * device/lib/_strcpy.c: removed NULL
10347         * device/lib/_strcspn.c: removed NULL
10348         * device/lib/_strlen.c: removed NULL
10349         * device/lib/_strncat.c: removed NULL
10350         * device/lib/_strncmp.c: removed NULL
10351         * device/lib/_strncpy.c: removed NULL
10352         * device/lib/_strpbrk.c: removed NULL
10353         * device/lib/_strrchr.c: removed NULL
10354         * device/lib/_strspn.c: removed NULL
10355         * device/lib/_strstr.c: removed NULL
10356         * device/lib/_strtok.c: removed NULL
10357         * device/lib/malloc.c: removed NULL, include own header
10358
10359 2003-02-02    <johan AT balder>
10360
10361         * src/mcs51/ralloc.c (packForPush): fixed bug #631653, maybe other ports need this too? At least now some new alerts in SDCCBBlock.c and SDCCicode.c gives an early warning
10362         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
10363         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
10364         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
10365         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
10366         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
10367
10368 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10369
10370         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
10371         area 'DATA'"
10372
10373 2003-02-01    <johan AT balder>
10374
10375         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
10376
10377 2003-01-31    <johan AT CP255758-A>
10378
10379         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
10380
10381 2003-01-30    <johan AT balder>
10382
10383         * src/SDCCBBlock.c: automatic bug detection
10384         * src/SDCCicode.c: automatic bug detection
10385
10386 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10387
10388         * src/SDCCglobl.h:   now --xram-size 0 works
10389         * src/SDCCmain.c:    now --xram-size 0 works
10390
10391 2003-01-29    <johan AT balder>
10392
10393         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
10394
10395 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10396
10397         * as/mcs51/aslink.h: Added options --xram-size and --code-size
10398         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
10399         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
10400         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
10401         * src/SDCCglobl.h:   Added options --xram-size and --code-size
10402         * src/SDCCmain.c:    Added options --xram-size and --code-size
10403
10404 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
10405
10406         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
10407         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
10408
10409 2003-01-27    <johan AT balder>
10410
10411         * src/SDCC.y: fixed bug #613764
10412
10413 2003-01-26    <johan AT balder>
10414
10415         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
10416         * src/SDCCsymt.h: fixed bug #673374
10417         * src/SDCCglue.c: fixed bug #661910
10418         * src/SDCCast.c: fixed bug #458099 and 673374
10419
10420 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
10421
10422         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
10423         * as/mcs51/strcmpi.h: added
10424         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
10425         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
10426         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
10427         * as/mcs51/assym.c: strcmpi -> as_strcmpi
10428         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
10429         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
10430         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
10431         * as/mcs51/Makefile.aslink: new module strcmpi
10432         * as/mcs51/Makefile.asx8051: new module strcmpi
10433         * as/mcs51/Makefil.bcc: new module strcmpi
10434         * as/mcs51/Makefile.in: new module strcmpi
10435         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
10436
10437 2003-01-26    <johan AT balder>
10438
10439         * src/SDCCglue.c: reverted back to 1.124
10440         * src/SDCCast.c: reverted back to 1.156
10441         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
10442
10443 2003-01-25    <johan AT balder>
10444
10445         * src/SDCCglue.c: A better fix for bug #661910
10446         * src/SDCCast.c: A better fix for bug #661910
10447         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
10448
10449 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10450
10451         * src/Makefile.in: remove spawn.o
10452         * src/SDCCmain.c: remove spawn.h
10453         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
10454         * src/spawn.c: removed
10455         * src/spawn.h: removed
10456         * support/regression/ports/ds390/spec.mk: link with -r
10457
10458 2003-01-24    <johan AT CP255758-A>
10459
10460         * src/ds390/gen.c (aopOp): fixed bug #667458
10461         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
10462         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
10463         (createIvalCharPtr): an ival doesn't always have a storage class anymore
10464
10465 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10466
10467         * src/mcs51/peeph.def: better assembler identation by Frieder
10468         * src/mcs51/gen.c: better assembler identation by Frieder
10469
10470 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
10471
10472         * as/z80/string.h: removed for gcc 3.2
10473         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
10474         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
10475
10476 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10477
10478         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
10479         * src/SDCCpeeph.c (replaceRule): fix bug #663503
10480         * support/regression/Makefile: separate temp files for ports
10481         * support/regression/generate-cases.py: separate temp files for ports
10482         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10483         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10484
10485 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10486
10487         * moved tinitalk to device/examples/ds390
10488
10489 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
10490
10491         * as/mcs51/lkmem.c: rflag is for DS390
10492         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
10493         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
10494                          (linkEdit): move mem- and map-files the same way as ihx-files
10495         * src/z80/main.c (_setDefaultOptions): removed --generic
10496         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
10497         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
10498         * src/pic/glue.c (picglue): --c1mode works again
10499         * src/pic16/glue.c (pic16glue): --c1mode works again
10500         * src/asm.c (printCLine): fix #660034
10501
10502 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
10503
10504         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
10505         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
10506         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
10507         * as/mcs51/lkmem (summary): better fix for sp problem
10508         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
10509         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
10510         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
10511                                               remove --stack-after-data
10512
10513 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
10514
10515         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
10516         * src/SDCCutil.c (join): ugly bug: missing '\0'
10517         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
10518
10519 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10520
10521         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
10522         * src/port.h: typo
10523         * src/pic/main.c (_asmCmd): gpasm supports -o
10524         * src/z80/main.c: more general macros
10525         * device/lib/Makefile.in: remove intermediate files
10526
10527 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10528
10529         * .version: Bumped version number to 2.3.3
10530         * src/SDCCBBlock.c: new option -o
10531         * src/SDCCglobl.h: new option -o
10532         * src/SDCCglue.c: new option -o
10533         * src/SDCCmain.c: new option -o
10534         * src/asm.c: new option -o
10535         * src/ds390/main.c: new option -o
10536         * src/pic/glue.c: new option -o
10537         * src/pic/pcode.c: new option -o
10538         * src/pic/ralloc.c: new option -o
10539         * src/pic16/glue.c: new option -o
10540         * src/pic16/pcode.c: new option -o
10541         * src/pic16/ralloc.c: new option -o
10542         * src/z80/main.c: new option -o
10543         * device/lib/Makefile.in: use -o
10544         * support/regression/ports/ds390/spec.mk: use -o
10545         * support/regression/ports/gbz80/spec.mk: use -o
10546         * support/regression/ports/mcs51/spec.mk: use -o
10547         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
10548         * support/regression/ports/z80/spec.mk: use -o
10549         * support/regression/ports/ucz80/spec.mk: use -o
10550         * support/regression/ports/xa51/spec.mk: use -o
10551         * support/regression/fwk/lib/timeout.c: fix usage string
10552
10553 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
10554         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
10555
10556 2003-01-07    <johan AT balder>
10557
10558         * src/SDCCast.c (decorateType): fixed bug #600035
10559
10560 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
10561         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
10562         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
10563         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
10564         * src/pic/pcode.c: outcommented unused variable to remove warnings
10565         * src/pic/ralloc.c: outcommented unused variable to remove warnings
10566
10567 2003-01-06    <karl AT turbobit.com>
10568         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
10569    regression tests.
10570
10571 2003-01-06    <johan AT balder>
10572
10573         * src/SDCCicode.c: fixed array add
10574
10575 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
10576         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
10577         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
10578
10579 2003-01-04    <johan AT balder>
10580
10581         * src/SDCCval.c (getNelements): fixed the initialized array of structures
10582
10583 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10584         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
10585
10586 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10587         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
10588         * support/regression/tests/bug-524697.c: fit mem usage into 8032
10589
10590 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10591         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
10592
10593 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
10594         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
10595
10596 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
10597         * src/mcs51/main.c: removed {bindir}{sep} from aslink
10598
10599 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10600
10601     * in \sdcc\as\mcs51\ changed these files in order to create an
10602     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
10603     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
10604     following files to include the previous two files: aslink.dsp,
10605     Makefile.aslink, Makefile.bcc, and Makefile.in.
10606
10607     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
10608     .adb instead of .cdb
10609
10610 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10611
10612         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
10613         value from option --iram-size.
10614
10615 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10616
10617         * \sdcc\as\mcs51\lklist.c: added boundary check before using
10618         dram[] array.
10619
10620 2002-09-18    <wiml AT hhhh.org>
10621
10622         * SDCClrange.h: exposed setFromRange() and setToRange()
10623         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
10624           packRegsForAccUse() (bug 542397)
10625         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
10626           multiple times and emitting the fetch operations more than once
10627           added aopGetUsesAcc() function to allow binary operators to
10628           fetch their operands in the correct order; made genMinus() emit
10629           compact code for X = LITERAL - Y
10630
10631 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10632         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
10633         sprintf() in line 1267.
10634
10635 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10636         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
10637         like ports.
10638
10639 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10640         Changes to aslink (All the changes are marked with 'JCF'):
10641
10642         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
10643         summary().
10644
10645         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
10646         area BSEG.  Also moves, if possible, the DATA area down into the internal
10647         ram so more space is available.
10648
10649         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
10650         sflag.
10651
10652         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
10653         not bytes.  Function summary() which creates a memory usage summary
10654         file with extension .mem.  Reports of overlaping stack and small stack
10655         size.  If the space for the stack is less than 16 bytes aslink trows a
10656         warning.
10657
10658         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
10659         the 8051.  Option 'y' for memory summary output file.
10660
10661         Changes to sdcc (All the changes are marked with 'JCF'):
10662
10663         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
10664
10665         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
10666         overlaying area for it (uses RegBankUsed[4]).
10667
10668         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
10669         bank zero as used by default.  By default aslink locates the stack
10670         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
10671         the creation of the .mem file.  Delegates the allocation of data area
10672         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
10673         the begining of the stack area to aslink.
10674
10675         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
10676         glue() in SDCCglue.c creates an area for it.
10677
10678 2002-09-03  Borut Razem <borut.razem AT siol.net>
10679         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
10680         sdcc/src/pic/glue.c:
10681         introduced atexit() handler for teporay files removal in case of
10682         errors, assertions, ...
10683
10684 2002-08-29  Borut Razem <borut.razem AT siol.net>
10685         * sdcc/support/cpp2/auto-host_vc_in.h:
10686         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
10687         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
10688         Maybe there is a similar problem with BORLANDC? It should be checked!
10689
10690         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
10691         corrected improper use of assert: the assignment to clr variable was done inside the assert.
10692         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
10693         was not executed, and the compiler (cl) launched a warning:
10694         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
10695
10696 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10697         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
10698
10699 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
10700         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
10701
10702         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10703           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
10704           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
10705           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10706           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
10707           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
10708           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
10709         - added Release configuration in VS projects
10710         - review of compiler an linker options
10711         - VC .exe files are generated in bin_vc directory, not to interfere
10712           with binaries generated from other projects (cygwin, mingw, bcc ...)
10713
10714         * sdcc/src/yacc.dsp: added
10715
10716         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
10717         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
10718         and insert the version number definitions from .version
10719
10720         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
10721
10722         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
10723         added - genarate auto-host.h using auto-host_vc_in.h as template
10724
10725         * sdcc/sdcc_vc.h,
10726         removed from CVS, generated automatically
10727
10728 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
10729         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
10730
10731 2002-08-11  Borut Razem <borut.razem AT siol.net>
10732         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
10733
10734 2002-08-10  Borut Razem <borut.razem AT siol.net>
10735         * src/SDCCmain.c (main):
10736         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
10737         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
10738         The consequence was that some temporary files were not removed.
10739
10740         * src/SDCCglue.c:
10741         unification of code in functions tempfilename() and tempfile():
10742         function tempnam() is defined in Visual Studio 6.0 and .NET
10743
10744         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
10745
10746         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10747           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
10748         - removed compiler command line option /WX: Treats all warnings as errors
10749         - update a list of source files, included into the project
10750
10751         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10752           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
10753         changed project type to Generic Project so that can be correcly converted to VS.NET project
10754
10755         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
10756
10757         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
10758
10759         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
10760
10761         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
10762         added return 0 statements after assert() to make compiler happy
10763
10764         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
10765         added newline in the def file to keep MSC compiler satisfied
10766
10767         * sdcc/src/z80/gen.c:
10768         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
10769           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
10770         - solved MSC error in function aopDump()
10771
10772         * sdcc_vc.h: define PREFIX as "\\sdcc"
10773
10774 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
10775         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
10776
10777 2002-06-22  Scott Dattalo <scott AT dattalo.com>
10778         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
10779         - Rewrote the register banking algorithm.
10780         - Added pCode live-range analysis to registers (for now, only non-used and
10781         singly-used registers optimized away)
10782
10783         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
10784
10785         * support/scripts/inc2h.pl Kevin L. Pauba <klpauba AT cox.net> submitted this perl script for converting MicroChip include files into SDCC Pic include files.
10786
10787 2002-05-10  Scott Dattalo <scott AT dattalo.com>
10788         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
10789
10790 2002-04-22  Michael Hope  <michaelh AT vroom>
10791
10792         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
10793
10794         * configure.in (DD_COPT): Added include support required for gbdk.
10795
10796         * .version: Bumped version number just to increase it.
10797
10798         * src/SDCCmain.c: Added -nostdinc to the default options.
10799
10800 2002-04-15  Michael Hope  <michaelh AT vroom>
10801
10802         * device/lib/z80/printf.c (sprintf): Added.
10803
10804         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10805
10806         * src/z80/peeph.def: Added transpose redundent load rule.
10807
10808         * src/z80/main.c: Added force callee saves for jaune.
10809
10810         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10811
10812         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10813
10814 2002-03-28  Johan Knol  <johan AT balder>
10815
10816         * src/SDCCval.c: fixed bug #532436
10817
10818 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10819         * /src/port.h:
10820         Added "char *Processor" field to the port structure.
10821
10822         * /src/SDCCmain.c:
10823         Added -p option. Allows port dependent processor to be specified.
10824
10825         * all ports:
10826         Initialized the new field char *Processor field to NULL in all ports
10827
10828         * /src/pic/*:
10829         Compiler generated registers for interrupt context saving
10830         were not getting allocated.
10831
10832 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10833
10834         * /src/SDCCast.c:
10835         Fixed left shift. Will promote the left side of a left shift
10836         if a) left shifting more than size of operand or b) when assigned
10837         to something size > size of left side
10838
10839 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10840         * src/pic/*
10841         tons of changes. Register allocation has been
10842         rewritten. Added customization for the various PICs. Flow
10843         analysis is restructured. ...
10844
10845         * src/pic/device.h:
10846         Added
10847
10848         * src/pic/device.c:
10849         Added. device.c is a PIC port hack to accomodate variations
10850         in PIC devices.
10851
10852 2002-03-13  Michael Hope  <michaelh AT vroom>
10853
10854         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10855
10856 2002-03-04  johanknol  <johanknol AT manik>
10857
10858         * /src/SDCCval.c: fixed
10859
10860         const unsigned char arr[][2] = { { 0, 1 } };
10861         t18.c:1: error: Initializer element is not constant
10862
10863 2002-03-04  bela  <bela AT manik>
10864
10865         * /device/include/mcs51reg.h:
10866         ds89c420 register definition update
10867
10868 2002-03-03    <johan AT FRIJA>
10869
10870         * support/Util/SDCCerr.c: did something, but don't no why anymore
10871
10872         * support/regression/tests/bug-524691.c: made it a little less shy
10873
10874         * src/SDCCast.c (decorateType): fixed bug #524697
10875
10876         * src/SDCCast.c: made some lineno improvements
10877
10878         * src/SDCCval.c (getNelements): changed warning to error
10879
10880         * src/SDCCglue.c (printIvalArray): changed warning to error
10881
10882         * src/SDCCicode.c: fixed a warning for mingw
10883
10884         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10885
10886         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10887
10888 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10889
10890         * src/ds390/peeph.def:
10891         Added some more peephole rules
10892
10893         * src/ds390/gen.c: Various fixes & enhancements
10894
10895         * src/SDCClrange.c, src/SDCClrange.h:
10896         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10897
10898         * src/ds390/ralloc.c:
10899         various fixes & enhancements (ds390) specific
10900
10901         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10902         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10903         from rallocs.
10904
10905         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10906
10907 2002-03-02    <johan AT FRIJA>
10908
10909         * src/SDCCast.c (decorateType): fixed bug #524708
10910
10911         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10912
10913         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10914
10915 2002-03-01  Michael Hope  <michaelh AT vroom>
10916
10917         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10918
10919         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10920
10921 2002-03-01    <johan AT FRIJA>
10922
10923         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10924
10925         * src/SDCCast.c (decorateType): fixed bug #524209
10926
10927         * src/SDCCval.c (valNot): fixed bug #524195
10928
10929 2002-02-26    <johan AT balder>
10930
10931         * src/xa51/gen.c: fixed a warning
10932
10933         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10934
10935         * src/SDCCast.c (decorateType): fixed bug #522534
10936
10937 2002-02-23    <johan AT balder>
10938
10939         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10940
10941 2002-02-22    <johan AT balder>
10942
10943         * src/SDCCast.c: fixed bug #514865
10944
10945         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10946
10947 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10948
10949         * sdcc/src/SDCCloop.c:
10950         Previous fix was not good. basic blocks that have "break" or "return" are
10951         not really partof a loop , but live ranges used in these blocks should
10952         be live thru the entire loop, so set partOfLoop but don't add them to
10953         loop region
10954
10955 2002-02-21    <johan AT FRIJA>
10956
10957         * src/SDCCcse.c: fixed bug #514308
10958
10959 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10960
10961         * src/SDCCloop.c:
10962         Fixed BUG #519583. If a conditional block ended in a return/break
10963         statement inside a loop, it was not being considered part of the loop.
10964
10965         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10966
10967 2002-02-10  Karl Bongers <karl AT turbobit.com>
10968
10969         * debugger/*:
10970         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10971         with lots of comments and notes.
10972
10973         * device/examples/test2.c:
10974         Fix bug, "red" variable not being initialized(compiler complained).
10975
10976         * device/examples/Makefile, examples/test3.c:
10977         Add Makefile in device/examples folder, compiles test3.c
10978         for use as a multiple module SDCDB test case.
10979
10980         * sim/ucsim/cmd.src/cmdset.cc:
10981         Took out debug printfs in ucsim "next" command.
10982
10983         * sim/ucsim/xa.src:
10984         Karl and Johan start ucsim XA support.  Most dissassembly working,
10985         about 75% emulation done(plenty of work remaining).
10986
10987         * sim/ucsim/z80.src:
10988         Add Z80 support to ucsim, add test-ucz80 regression test,
10989         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10990         Notice z80 compiler fails on examples/test3.c/crc code.
10991
10992 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10993
10994         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10995         Added support for --parms-in-bank1
10996
10997         * src/ds390/peeph.def:
10998         added a few more peephole optimzations
10999
11000         * src/ds390/main.c:
11001         1) added __builtin_inp & __builtin_outp used to read in data of given length
11002            from a memory mapped port
11003         2) added __builtin_memcmp
11004         3) added __builtin_swapw swap bytes of a short
11005
11006         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
11007         1) handle multiple send & receives from register bank1
11008         2) ralloc can now allocate DPTR1 to some liveRanges
11009
11010         * src/SDCCsymt.c, src/SDCCsymt.h:
11011         changes to handle multiple sends & receives
11012
11013         * src/SDCCptropt.h:
11014         added some pointer arithmetic optimization
11015
11016         * src/SDCCptropt.c:
11017         added some pointer arithmetic optimizations but not stable yet so not
11018         called from anywhere (will get this working shortly)
11019
11020         * src/SDCCopt.c: fixed for multiple sends & receives
11021
11022         * src/SDCCmain.c:
11023         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
11024         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
11025            set preprocessor defines (depending on options)
11026
11027         * src/SDCCicode.c, src/SDCCicode.h:
11028         changes made to handle multiple sends & receives
11029
11030         * src/SDCCglobl.h:
11031         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
11032
11033         * src/SDCCcse.c, src/SDCCcse.h:
11034         added function findbackward def (to be used in upcoming optimization)
11035
11036         * src/SDCCcflow.c, src/SDCCcflow.h:
11037         added function returnAtEnd - to determine if a basic block terminates with
11038         a RETURN iCode
11039
11040         * src/SDCCast.c, src/SDCCast.h:
11041         added option parms-in-bank1
11042
11043         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
11044         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
11045         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
11046         adjusted for --parms-in-bank1 option
11047
11048         * device/include/string.h:
11049         donot redefine "reentrant" keyword
11050
11051         * device/include/ds80c390.h: Added some more SFRs
11052
11053 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
11054
11055         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
11056
11057 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
11058
11059         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
11060
11061 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
11062
11063         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
11064
11065 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
11066
11067         * Added --xram-movc option
11068
11069 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
11070
11071         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
11072
11073 2002-01-11  Johan Knol
11074
11075         * Added math lib of Jesus Calvino-Fraga
11076
11077 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
11078
11079         * src/SDCCmain.c (processFile): fix processing of ../../src.c
11080         * support/regression/Makefile: new target test-mcs51-stack-auto
11081         * support/regression/ports/mcs51-stack-auto/spec.mk: added
11082
11083 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11084
11085         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
11086
11087 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11088
11089         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
11090
11091 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
11092
11093         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
11094
11095         * src/SDCCglue.h: add definition for printIvalChar()
11096
11097 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11098
11099         * src/SDCCast.c: fix #498138 by Johan
11100
11101         * src/SDCCglue.c: fix #498138 by Johan
11102
11103 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11104
11105         * support/regression/Makefile: fix clean
11106
11107         * support/regression/ports/ds390/support.c: fix transmission of last character
11108
11109 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
11110
11111         * /sdcc/src/ds390/gen.c:
11112         a) improved computing address of stack variable
11113         b) took out some #if 0 code
11114         c) improved parmBytes adjustment
11115         d) improved genPlusIncr & genMinusIncr
11116         e) genCmp could generate bad code (when left assigned to DPTR)
11117         f) Fixed bug in hasInc
11118
11119         * /sdcc/src/ds390/ralloc.c:
11120         a) packRegsForSupport could mess up live information (Fixed)
11121         b) packRegsDPTRuse could be incorrect for left & right shift
11122
11123         * /sdcc/src/mcs51/ralloc.c:
11124         packRegsForSupport could mess up the live information (Fixed)
11125
11126         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
11127
11128         * /sdcc/src/SDCCast.c:
11129         can reverse a loop even if function call is present as long
11130         as the loop control variable is local & is not passed as parameter
11131
11132 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11133
11134         * /sdcc/ChangeLog: *** empty log message ***
11135
11136         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
11137         More builtin function additions for TININative
11138
11139         * /sdcc/src/ds390/ralloc.c:
11140         Had broken the regression testsuite
11141
11142         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
11143
11144         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
11145         Added funcattr hasStackParms will be set for reentrant functions when there
11146         are paramteres on the stack, this helps in minimizing frame pointer generation
11147         typeFromStr can handle function pointers now
11148
11149         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
11150         *** empty log message ***
11151
11152 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11153
11154         * /src/ds390/gen.c, /src/ds390/main.c:
11155         More builtin function additions for TININative
11156
11157         * /src/ds390/ralloc.c:
11158         Had broken the regression testsuite
11159
11160         * /src/SDCCast.c: Fixed a bug in dumptree
11161
11162         * /src/SDCCsymt.c, /src/SDCCsymt.h:
11163         Added funcattr hasStackParms will be set for reentrant functions when there
11164         are paramteres on the stack, this helps in minimizing frame pointer generation
11165         typeFromStr can handle function pointers now
11166
11167         * /doc/builtins.txt, /doc/TININative.txt:
11168         *** empty log message ***
11169
11170
11171 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11172
11173         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
11174         ALPHA version for -mTININative
11175
11176         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
11177         updated to reflect changes in the port structure
11178
11179         * /src/port.h:
11180         added function do_assemble (similar to do_link) if non-null this function
11181         will be called to do assembly (-mTININative) requires a multi command
11182         assembly
11183         added function genAssemblerEnd will be called to generate assembler Epilogue
11184
11185         * /src/SDCCsymt.c:
11186         added _JavaNative to debug info printing
11187
11188         * /src/SDCCmain.c: added option --tini-libid
11189         added port->do_assemble function (-mTININative) has a multi command assemble
11190
11191         * /src/SDCCglue.c: Disabled "constExpr" check
11192         added port->genAssemblerEnd function
11193
11194         * /src/SDCCglobl.h: Added option --tini-libid value
11195
11196         * /src/SDCCast.h:
11197         tookout optimizeCompare from the header (has no external references)
11198
11199         * /src/SDCCast.c: made one more function "static"
11200
11201 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
11202
11203         * src/z80/mappings.i: Added z80asm support.
11204
11205         * src/z80/main.c: Added z80asm support on --asm=z80asm
11206
11207         * src/z80/gen.c: Fixed asm portability issues.
11208
11209         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
11210
11211         * src/SDCCglue.c (printExterns): Added global/extern split.
11212
11213 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
11214
11215         * support/regression/Makefile: added test for mcs51 model large
11216
11217         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
11218
11219         * support/regression/ports/gbz80/spec.mk: added -mgbz80
11220
11221 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
11222
11223         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
11224
11225 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
11226
11227         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
11228
11229         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
11230
11231 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
11232
11233         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
11234
11235         * support/regression/tests/simplefloat.c: Port to mcs51.
11236
11237 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
11238         * support/regression/tests/bug-485362.c: Added.
11239
11240         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
11241
11242         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
11243
11244         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
11245
11246         * src/z80/gen.c (aopDump): Added a dump function.
11247
11248 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
11249         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
11250
11251         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
11252
11253         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
11254
11255         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
11256
11257         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
11258
11259         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
11260
11261         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
11262
11263         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
11264
11265         * support/regression/ports/ds390/support.c: Use tinibios.
11266
11267         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11268
11269 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11270
11271         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11272         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11273
11274         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11275
11276         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11277
11278 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11279
11280         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11281
11282         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11283         (packRegsForIYUse): Created and optimised.
11284
11285 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11286
11287         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11288 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11289
11290         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11291
11292         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11293
11294         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11295
11296 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11297
11298         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11299
11300         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11301
11302 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11303
11304         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
11305
11306         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
11307
11308         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
11309
11310 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11311
11312         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
11313         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
11314         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
11315
11316         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
11317
11318         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
11319         (genNotFloat): Added.
11320         (genUminusFloat): Added.
11321
11322         * device/lib/z80/Makefile: Added floating pt stubs.
11323
11324         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
11325
11326         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
11327
11328         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
11329
11330 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11331
11332         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
11333
11334         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
11335
11336         * sdcc/support/regression/Makefile: Add port ds390.
11337
11338         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
11339
11340         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
11341
11342         * sdcc/support/regression/ports/ds390/spec.mk: Added.
11343
11344         * sdcc/support/regression/ports/ds390/support.c: Added.
11345
11346         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
11347
11348         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
11349
11350         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
11351
11352 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11353
11354         * device/include/malloc.h: Added z80 and gbz80 support.
11355
11356         * device/lib/gbz80/heap.s: Added.
11357
11358         * device/lib/z80/heap.s: Added.
11359
11360         * device/lib/malloc.c: Added z80 and gbz80 support.
11361
11362         * support/regression/tests/malloc.c (testMalloc): Added.
11363
11364         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
11365
11366         * support/regression/tests/bug-478094.c: Added.
11367
11368         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
11369
11370 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
11371
11372         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
11373
11374         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
11375
11376         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
11377
11378         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
11379
11380         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
11381
11382 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11383
11384         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
11385
11386 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
11387
11388         * support/regression/tests/bug-477927.c: Added.
11389
11390         * src/z80/peeph.def: Added minor rules.
11391
11392         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
11393
11394         * src/z80/peeph.def: Added jump optimisation modification.
11395
11396 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
11397
11398         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
11399
11400 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
11401
11402         * support/regression/tests/funptrs.c: Added.
11403
11404 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
11405
11406         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
11407
11408 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
11409
11410         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
11411
11412         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
11413
11414         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
11415         (movLeft2ResultLong): Created.
11416
11417         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
11418         (joinPushes): Added.  Joins two char pushes into a word push.
11419
11420 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
11421
11422         * support/cpp2/Makefile.in (install): Added creation of dest dir.
11423
11424         * support/makebin/Makefile (install): Added creation of dest dir.
11425
11426 2001-10-24 Karl Bongers <karl AT turbobit.com>
11427
11428         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
11429
11430 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
11431
11432         * src/z80/ralloc.c: Turned off faulty pack for one use.
11433
11434         * src/z80/peeph-gbz80.def: Removed redundent restart options.
11435
11436         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
11437
11438 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
11439
11440         * support/regression/Makefile: Improved clean
11441
11442         * support/regression/ports/gbz80/spec.mk: Added clean
11443
11444         * support/regression/ports/host/spec.mk: Added clean
11445
11446         * support/regression/ports/z80/spec.mk: Added clean
11447
11448         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
11449
11450         * support/regression/ports/mcs51/timeout.c: little improvements
11451
11452 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
11453
11454         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
11455
11456         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
11457
11458         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
11459
11460 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
11461
11462         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
11463
11464         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
11465
11466 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
11467         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
11468
11469         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
11470
11471         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
11472
11473         * src/mcs51/main.c (_linkCmd): Added bin path to command.
11474
11475         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
11476
11477         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
11478
11479         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
11480
11481         * support/regression/tests/longor.c: Added.
11482
11483 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
11484
11485         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
11486
11487         * as/mcs51/aslink.h: define PATH_MAX
11488
11489         * as/mcs51/asm.h: define PATH_MAX
11490
11491         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
11492
11493         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
11494
11495         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
11496
11497         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
11498
11499         * src/SDCCglobl.h: define PATH_MAX
11500
11501         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
11502
11503         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
11504
11505 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
11506
11507         * src/z80/gen.c (gencjneshort): Fixed
11508
11509         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
11510
11511 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
11512
11513         * support/regression/tests/bug-469671.c: Added.
11514
11515         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
11516
11517 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
11518
11519         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
11520
11521         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
11522
11523 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
11524
11525         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
11526
11527         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
11528
11529         * src/device/lib/_mullong.c : removed hint: nooverlay bug
11530
11531         * src/device/lib/_divuint.c : removed hint: nooverlay bug
11532
11533         * src/device/lib/_divulong.c: removed hint: nooverlay bug
11534
11535         * src/device/lib/_moduint.c : removed hint: nooverlay bug
11536
11537         * src/device/lib/_modulong.c: removed hint: nooverlay bug
11538
11539 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
11540
11541         * src/z80/gen.c (setupPair): Added 'extended stack' support for the z80.  Can now have local variables or parameters of more than 127 bytes in size.  Increadibly slow, but it will work.  Currently anything involving the carry flag.
11542
11543         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
11544
11545         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
11546
11547 2001-10-07    <johan AT FRIJA>
11548
11549         * device/lib/gets.c (gets): fixed the return value.
11550
11551 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
11552         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
11553
11554         * src/SDCCpeeph.c (peepHole): Fixed all leaks.  Added trace support for freeing lines.  Optimised restart logic to re-run instead of restart.  Now compiles dscan.c on ~60MB instead of ~200MB.
11555
11556         * support/Util/NewAlloc.c: Added ability to use libgc instead of malloc.  Added Safe_free and Safe_strdup.  Added trace support where you can log allocations and free all at once.
11557
11558         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
11559
11560         * src/pic/gen.c: Removed Safe_strdup.
11561
11562         * configure.in: Added option to enable libgc support.
11563
11564         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
11565         (bitVectUnion): Optimised.
11566         (bitVectIntersect): Optimised.
11567         (bitVectBitsInCommon): Optimised.
11568         (bitVectCplAnd): Optimised.
11569
11570         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
11571
11572 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11573
11574         * src/SDCCmain.c: distinguish between assembler debug and plain options
11575
11576         * src/avr/main.c:   remove standard assembler options
11577
11578         * src/ds390/main.c: remove standard assembler options
11579
11580         * src/mcs51/main.c: remove standard assembler options
11581
11582         * src/port.h: removed "PENDING" comment
11583
11584 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11585
11586         * src/device/lib/_mulint.c  : new, with assember functions
11587
11588         * src/device/lib/_mullong.c : new, with assember functions
11589
11590         * src/device/lib/_divuint.c : with assember functions
11591
11592         * src/device/lib/_divsint.c : with assember functions
11593
11594         * src/device/lib/_divulong.c: with assember functions
11595
11596         * src/device/lib/_divslong.c: with assember functions
11597
11598         * src/device/lib/_moduint.c : with assember functions
11599
11600         * src/device/lib/_modsint.c : with assember functions
11601
11602         * src/device/lib/_modulong.c: with assember functions
11603
11604         * src/device/lib/_modslong.c: with assember functions
11605
11606         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
11607
11608         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
11609
11610         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
11611                                       replaced _mululong.c and _mulslong.c by _mullong.c
11612
11613 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11614
11615         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
11616
11617 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11618
11619         * src/SDCCglue.c: test, if win32api is available for MINGW
11620
11621 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11622
11623         * src/SDCCsymt.c: no more _modifier in printTypeChain()
11624         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
11625         * support/regression/ports/gbz80/spec.mk: removed GENERIC
11626         * support/regression/ports/host/spec.mk: removed GENERIC
11627         * support/regression/ports/mcs51/spec.mk: removed GENERIC
11628         * support/regression/ports/z80/spec.mk: removed GENERIC
11629
11630 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
11631
11632         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
11633
11634         * support/regression/tests/bug-467035.c: Created.
11635
11636 2001-10-01    <johan AT FRIJA>
11637
11638         * src/SDCC.y: fixed bug #466586 part 1
11639
11640 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
11641
11642         * SDCCicode.c: z80 has no generic pointers
11643         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
11644
11645 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
11646
11647         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
11648
11649 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
11650
11651         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
11652
11653         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
11654
11655 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
11656
11657         * configure.in: Fixed up so that ucsim is only configured once.
11658
11659         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
11660
11661         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
11662         (getPathDifference): As above.
11663
11664         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
11665
11666         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
11667
11668 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
11669         * .version: Updated to 2.3.1
11670
11671         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
11672         Added copyright header.
11673
11674         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
11675         (assemble): Added support for macro based assembler commands.
11676         (linkEdit): Added support for macro based linker commands.
11677         (preProcess): Changed the pre-processor to use macros.
11678         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
11679         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
11680
11681         * device/lib/z80/crt0.s: Added module name for debugging.
11682
11683 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
11684
11685         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11686
11687         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
11688
11689         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
11690
11691         * src/Makefile.in: Added SDCCmacro and SDCCutil
11692
11693 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
11694
11695         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11696
11697 2001-09-16    <johan AT FRIJA>
11698
11699         * support/Util/SDCCerr.c: fixed up the error/warning/info database. I only changed the E_ W_ I_ prefix to what SDCCerr.c says it is.
11700
11701 2001-09-15    <johan AT FRIJA>
11702
11703         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
11704         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
11705
11706 2001-09-11    <johan AT FRIJA>
11707
11708         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
11709
11710 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
11711
11712         * support/regression/tests/bug-460444.c: Added test case.
11713
11714         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
11715         (genCast): Added justification for all of the asserts.
11716
11717 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
11718
11719         * support/regression/support.c: _xdata replaced by xdata
11720
11721         * support/regression/spec.mk: removed _generic
11722
11723 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
11724
11725         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
11726
11727         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
11728         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
11729
11730         * src/z80/peeph.def: Added a rule to optimise shift then compare.
11731
11732         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
11733
11734         * support/regression/tests/bug-460010.c: Added test case.
11735
11736         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
11737
11738 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
11739
11740         * support/regression/Makefile: inter-port-clean adjusted for mcs51
11741
11742         * support/regression/testfwk.c: removed workaround for bug #436344
11743
11744         * support/regression/tests/bp.c: use less memory with mcs51
11745
11746         * support/regression/tests/bug-441448.c: use less memory
11747
11748         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
11749
11750         * support/regression/collate-results.py: typo
11751
11752 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
11753
11754         * support/regression/tests/fetchoverlap.c: Added new test case.
11755
11756         * support/regression/tests/bp.c: Added new test case.
11757
11758         * support/regression/tests/bug-448984.c: Added new test case.
11759
11760         * support/regression/tests/pow2shifts.c: Added new test case.
11761
11762         * src/z80/gen.c: Turned off the noise it normally generates for the release.
11763         (genlshTwo): Fixed right shift for count > 8.
11764
11765         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
11766
11767 2001-09-08    <johan AT FRIJA>
11768
11769         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
11770
11771 2001-09-07    <johan AT FRIJA>
11772
11773         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
11774
11775         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
11776
11777 2001-09-06    <johan AT FRIJA>
11778
11779         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
11780         * bernhard noted me at this: "() equals to (void)" (1.38)
11781
11782 2001-09-05    <johan AT FRIJA>
11783
11784         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
11785
11786 2001-09-04    <johan AT FRIJA>
11787
11788         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
11789
11790
11791 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
11792
11793         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
11794
11795 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
11796
11797         * link/z80/aslink.h: Fixed path for PATH_MAX
11798
11799 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11800
11801         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11802
11803         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11804
11805         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11806
11807         * src/z80/gen.c (genUminus): Fixed add, sub, and uminus on the gbz80 port for longs.  Had to shift some functions about to do it.
11808
11809 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11810
11811         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11812         (genCmp): Fixed up genCmp for the GB with longs.
11813
11814         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11815
11816         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11817
11818         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11819
11820         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11821
11822 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11823
11824         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11825
11826 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11827
11828         * device/lib/gbz80/crt0.s (init): Fixed up support for the gbz80 such that it will at least run (and fail badly) the regression tests.
11829
11830         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11831
11832 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11833
11834         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11835
11836         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11837
11838 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11839
11840   * sim/ucsim/configure:    little improvement of Cygwin-detection
11841   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11842   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11843   * support/regression/tests/bug-221100.c: small changes for mcs51
11844   * support/regression/tests/bug-221168.c: small changes for mcs51
11845   * support/regression/tests/bug-227710.c: small changes for mcs51
11846   * support/regression/tests/staticinit.c: small changes for mcs51
11847   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11848   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11849   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11850
11851 $Revision$