* device/lib/pic/libm: NEW, added math library functions
[fw/sdcc] / ChangeLog
1 2006-06-25 Raphael Neider <rneider AT web.de>
2
3         * device/lib/pic/libm: NEW, added math library functions
4         * device/lib/pic/libsdcc: NEW; added float support functions
5         * device/lib/pic/{Makefile.in,configure.in,configure}: added libm/
6         * device/include/pic/{limits.h,errno.h,sdcc-lib.h,float.h,math.h}:
7           NEW, added math related headers
8         * device/include/asm/pic/features.h: NEW
9         * src/pic/gen.c (emitpcode_real): emit warning on NULL pCodeOp,
10           (popGet): allow larger offsets for AOP_PCODE,
11           (genDataPointerSet): handle literals explicitly, more debug output,
12           (genAssign): fixed for float using aopLiteral ;-)
13         * src/pic/glue.c (pic14createInterruptVect): inserted pagesel before
14           GOTO initialisation routine
15         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): set wasUsed
16           flag on registers, fixes #1469043 (local variables do not work)
17         * src/pic/main.c (_pic14_do_link),
18         * src/pic16/main.c (_pic16_linkEdit): use fullDstFileName if
19           available
20
21 2006-06-25 Borut Razem <borut.razem AT siol.net>
22
23         * device/lib/pic16/libc/stdio/sprintf.c: return the number of
24           characters printed (not including the trailing '\0' used to end
25           output to strings). Problem detected in regression test bug-927659.c.
26           NOTE: printf() family functions should return int instead
27           unsigned int!
28         * device/lib/pic16/libc/stdio/vfprintf.c: "%%" prints "%", unknown
29           specifier are printed as themselves
30         * sdcc/support/regression/tests/bug1057979.c: pic16 printf doesn't
31           support flags, width and precision specifiers
32
33 2006-06-24 Borut Razem <borut.razem AT siol.net>
34
35         * sdcc/support/regression/tests/bitvars.c: added gbz80, pic16 and pic16
36           to the list of sdcc tagrets not supporting bit type
37         * sdcc/support/regression/tests/bug-905992.c.c: excluded regression
38           testfor pic16 due to bug:
39           [ 1511794 ] pic16: regression test bug-895992.c fails
40
41 2006-06-24 Maarten Brock <sourceforge.brock AT dse.nl>
42
43         * src/mcs51/gen.c (genCmp): optimization for RFE 1162453
44         * src/SDCCglue.c (initPointer), fixed bug 1496419
45         * support/regression/tests/bug1496419.c: new, added
46
47 2006-06-22 Borut Razem <borut.razem AT siol.net>
48
49         * support/regression/ports/pic16/support.c: use gpsim usart module from
50           libgpsim_modules library
51
52 >>>>>>> .r4249
53 2006-06-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
54
55         * device/include/mcs51/at89c51ed2.h: Fixed bug 1510144 changed
56         IP0H to IPH0.
57
58 2006-06-19 Raphael Neider <rneider AT web.de>
59
60         * src/pic/glue.h,src/pic16/glue.h: added prototypes
61         * src/pic/glue.c,src/pic16/glue.c (pic1x_stringInSet,
62           pic1x_emitSymbolIfNew): NEW, check for a string in a set,
63           (pic14printExterns,pic14printPublics,pic16printPublics,
64           pic16_printExterns): use new functions to emit symbols
65           (picglue,pic16glue): emit publics before emitting externs
66         * src/pic/gen.c,src/pic16/gen.c (genFunction): remember the names of
67           locally defined functions to avoid bug #1443651
68         * support/regression/tests/bug-716242.c: removed pic16 workaround
69         * support/regression/ports/pic16/spec.mk: ignore errors during build
70
71 2006-06-19 Raphael Neider <rneider AT web.de>
72
73         * src/pic/glue.h: added pic14aopLiteral prototype
74         * src/pic/glue.c (pic14aopLiteral): return unsigned int
75         * src/pic/gen.c: removed stdint.h dependency
76           (aopGet): use Safe_strdup()
77           (bitpatternFromVal): removed, replaced use with pic14aopLiteral
78           (genDataPointerSet): use pic14aopLiteral()
79         * src/pic16/glue.h, src/pic16/glue.c, src/pic16/gen.c: similar changes
80           for pic16; thanks to Bernhard and Maarten
81
82 2006-06-18 Borut Razem <borut.razem AT siol.net>
83
84         * support/regression/tests/structflexarray.c: flexible array members
85           not supported by gcc < 3
86         * sim/ucsim/configure, sim/ucsim/configure.in: do not compile serio
87           GUI tool by default
88         * src/pic/gen.c: don't include [p]strdin.h on solaris
89         * support/Util/pstdint.h: addad svn attributes
90         * support/regression/tests/constantRange.c,
91           support/regression/tests/rotate.c: include inttypes.h instead
92           stdint.h on solaris, addad svn attributes
93
94 2006-06-18 Raphael Neider <rneider AT web.de>
95
96         * src/SDCCsymt.c (initCSupport): change return type of divschar to
97           int for PIC16
98         * src/pic16/genarith.c (genAddLit): sign-extend via standard routine
99           (pic16_genMinusBits): simplified sign-extension
100           (pic16_genUMult8XLit_8,pic16_genUMult8X8_8): renamed to
101             pic16_genMult8XLit_n resp. pic16_genMult8X8_n, fixed and
102             adjusted to correctly handle mixed-signed operands, disabled
103             now unused multiplciation routines
104         * src/pic16/gen.c (pic16_pushpCodeOp): fixed to handle literals
105           (assignResultValue): added argument denoting the size of the result
106             as returned by the function (fixes upcasts in assigning from
107             function calls: char foo(); int i = foo();)
108           (genCall,genPcall,genGenPointerGet,genReceive): pass size of
109             function result to assignResultValue
110           (genMult): disabled inlined multiplication code
111           (genDiv): augmented to also handle the modulus operator, fixed to
112             handle mixed-signed operands correctly
113           (genMod): simply call genDiv, disabled unused code
114           (genAssign): fixed missing (sign-)extension on result
115         * src/pic16/main.c (_hasNativeMulFor): accept literals [-128..256) as
116             valid char operands, allow signed operands for native code, added
117             division and modulo operator handling
118         * device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
119
120         As a consequence, onebyte.c (if split into two files) and muldiv.c
121         pass regression tests.
122
123 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
124
125         * doc/Makefile.in: two runs of makeindex seem needed to get
126         correct page references in the index of sdccman.pdf
127         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
128
129 2006-06-17 Borut Razem <borut.razem AT siol.net>
130
131         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
132
133 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
134
135         * doc/sdccman.lyx: updated, added (porting source code, debugging),
136         mentioned ec2drv and paulmon
137
138 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
139
140         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
141           consecutive abs areas
142           (find_empty_space, allocate_space): added map to handle codemap or
143            xdatamap,
144           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
145            absolute idata and xdata
146         * as/mcs51/lkmem.c (summary2): updated legend
147
148 2006-06-16 Raphael Neider <rneider AT web.de>
149
150         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
151
152 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
153
154         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
155           1208515
156         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
157
158 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
159
160         * src/port.h (struct PORT): added field gp_tags, to hold the tag
161         value of generic pointers,
162         * src/avr/main.c,
163           src/ds390/main.c,
164           src/hc08/main.c,
165           src/izt/i186.c,
166           src/izt/tlcs900h.c,
167           src/mcs51/main.c,
168           src/pic/main.c,
169           src/pic16/main.c,
170           src/xa51/main.c,
171           src/z80/main.c: PORT structure, added elements for gp_tags field,
172         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
173         fields in the PORT structure of each port,
174         * src/SDCCast.c (decorateType): allow processing of generic pointers
175         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
176         S_FIXED symbols
177
178 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
179
180         * link/z80/lkgb.c,
181         * link/z80/lkgg.c,
182         * src/pic16/gen.c,
183         * src/pic16/main.c,
184         * src/pic16/pcode.c,
185         * src/pic/main.c,
186         * src/pic/pcoderegs.c,
187         * src/SDCCicode.c,
188         * src/SDCCmain.c,
189         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
190           bug 1504689 on minGW
191
192 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
193
194         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
195
196 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
197
198         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
199
200 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
201
202         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
203           for optimization
204
205 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
206
207         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
208         to a char variable. Fixed bug #1504211
209         * device/include/pic16/adc.h,
210         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
211         and fixed bug #1364390
212
213 2006-06-10 Borut Razem <borut.razem AT siol.net>
214
215         * CVSROOT: removed the CVS left-over
216
217 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
218
219         * as/hc08/asmain.c (asexit),
220         * as/hc08/lkmain.c (lkexit),
221         * as/mcs51/asmain.c (asexit),
222         * as/mcs51/lkmain.c (lkexit),
223         * src/SDCCglue.c (DEFSETFUNC),
224         * src/SDCCmain.c (linkEdit, assemble),
225         * support/librarian/sdcclib.c (AddRel),
226           replaced unlink() by standard C remove()
227         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
228         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
229           gatherImplicitVariables): new, added to fix bug 608752,
230           (createFunction): added gatherImplicitVariables()
231         * src/SDCCast.h: added createRMW prototype
232         * src/SDCCsymt.h (struct symbol): added infertype
233         * support/regression/tests/bug608752.c: new, added
234
235 2006-06-10 Raphael Neider <rneider AT web.de>
236
237         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
238           multibyte dummy reads (fixes #1503234)
239
240 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
241
242         * device/include/mcs51/compiler.h: new, added header file to enable
243           creating common sfr definition header files for different compilers
244
245 2006-06-05 Raphael Neider <rneider AT web.de>
246
247         * src/pic16/{pcode.h,genarith.c}:
248           introduced pCodeOp combining any two pCodeOps (previously only
249           two register operands could be combined), removed pcop2 from
250           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
251         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
252         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
253           rewritten to use new PO_TWO_OPS
254         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
255         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
256           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
257           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
258           (pic16_get_op): embraced return arg to allow #define return(x),
259             added new case for combined opcodes
260           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
261           (pic16_pCode2str,pic16_getRegFrompCodeOp,
262            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
263
264 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
265
266         * src/SDCCval.c (checkConstantRange): added
267         * src/SDCCval.h: added checkConstantRange
268         * support/Util/SDCCerr.c,
269         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
270         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
271         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
272         * src/SDCCast.c (decorateType): added checkConstantRange,
273         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
274         can be emitted with the correct always true/false warning,
275         added optimization for double '!';
276         result of decorateType() must be assigned back to the tree, because
277         decorateType() can change the tree
278         * src/SDCCicode.c (geniCodeLogic),
279         (geniCodeAssign): replaced new checkConstantRange, added warnings,
280         (checkConstantRange): removed, it was only a fragment which never
281         emitted a warning
282         * src/SDCCsymt.c (computeType): fixed promotion for
283         "-1 < (unsigned bit) b"
284         * src/pic/ralloc.c (packRegsForAssign),
285         * src/pic16/ralloc.c (packRegsForAssign),
286         * src/hc08/ralloc.c (packRegsForAssign),
287         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
288         from mcs51
289         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
290         * support/regression/tests/constantRange.c: added
291         * support/valdiag/tests/constantRange.c: added
292         * support/valdiag/valdiag.py: added -DPORT_HOST=1
293
294 2006-06-02 Borut Razem <borut.razem AT siol.net>
295
296         * support/regression/ports/pic16/support.c: increase stack size
297           to 255 bytes
298         * support/regression/Makefile.in: sort tests by name so that the
299           resutlts can be compared on different machines / platforms
300
301 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
302
303         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
304         * src/ds390/gen.c (emitLabel): new, added,
305           (genDjnz): fixed stack overflow bug,
306           (throughout): cosmetic changes to sync with mcs51/gen.c,
307           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
308         * src/mcs51/gen.c (genEndFunction): small optimization,
309           (throughout): cosmetic changes to sync with ds390/gen.c
310
311 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
312
313         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
314           (_print_format): fixed printing pointers
315         * src/mcs51/gen.c (emitLabel, movb): new, added,
316           (genAssign): small optimization,
317           (genDjnz): fixed stack overflow bug,
318           (throughout): replaced sprintf with SNPRINTF,
319           replaced mcs51_regWithIdx with REG_WITH_INDEX,
320           replaced emitcode("mov", "b,...") with MOVB(...),
321           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
322           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
323         * src/mcs51/peeph.def: added rules 140 and 264
324         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
325           so they may get optimized into registers
326
327 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
328
329         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
330           immediately when encountered,
331           (printUsage): always use stderr even on windows
332
333 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
334
335         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
336         (processParms): fixed bug #1247551
337         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
338         parseCmdLine, main): print '--version' to stdout,
339         print 'help' to stdout if --help is given,
340         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
341         arguments are given; fixed --help
342
343 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
344
345         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
346         * support/regression/tests/bug-1493710.c: added
347
348 2006-05-27 Borut Razem <borut.razem AT siol.net>
349
350         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
351           static instead auto
352         * support/regression/ports/pic16/support.c: increase stack size
353           from default 64 bytes to 128 bytes
354         * support/regression/tests/staticinit.c,
355           support/regression/tests/float.c: regression tests fully enabled
356           for pic16 port by putting the initialized data arrays into the code
357           section
358         * support/regression/ports/pic16/spec.mk: don't link default libraries.
359           This was changed by mistake in the previous version.
360
361 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
362
363         * src/pic16/gen.c (genFunction, genEndFunction): some
364         beautifications, fixed bug with falsely restoring FSR2 in large
365         stack model, thanks to Beau E. Cox for reporting the bug
366
367 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
368
369         * debugger/mcs51/break.c,
370         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
371           use %p to print pointers, made address variables unsigned
372         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
373         * debugger/mcs51/symtab.c (parseSymbol): must return something
374         * src/mcs51/gen.c (aopForSym): small optimization,
375            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
376           (freeAsmop): added missing break,
377           (aopPut): removed parameter bvolatile, determine it inside the function,
378           (saveRegisters, unsaveRegisters): small optimization,
379           (genIpush): removed pointless check,
380           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
381           replaced sprintf with SNPRINTF,
382           replaced strcpy with strncpyz,
383           updated aopPut calls,
384           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
385         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
386
387 2006-05-24 Borut Razem <borut.razem AT siol.net>
388
389         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
390           modification of test for the pic16 port, put the array to the code
391           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
392
393 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
394
395         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
396         * support/Util/pstdint.h: added
397
398 2006-05-22 Borut Razem <borut.razem AT siol.net>
399
400         * src/regression/Makefile: removed bool2.c test, added -q linker option
401         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
402           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
403           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
404           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
405           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
406           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
407           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
408           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
409           define SUPPORT_BIT_TYPES 0, removed unused bit variables
410
411 2006-05-22 Raphael Neider <rneider AT web.de>
412
413         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
414           bug #1492360 (problematic due to generic pointers, see code)
415
416 2006-05-22 Borut Razem <borut.razem AT siol.net>
417
418         * support/regression/ports/pic16/specs.mk: removed stack size linker
419           directive
420         * support/regression/tests/array.c,
421           support/regression/tests/bitopcse.c,
422           support/regression/tests/bug-908454.c,
423           support/regression/tests/malloc.c: modified for pic16 regression test
424         * support/regression/tests/bitfields.c:
425           pic16 - excluded bitfileds of size > 8
426         * support/regression/tests/bp.c: pic16 - reduced data size
427         * support/regression/tests/bug-221100.c: pic16 - reduced data size
428         * support/regression/tests/bug-460010.c:
429           pic16 - used the absolute address the fits in memory
430         * support/regression/tests/bug-716242.c:
431           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
432         * support/regression/tests/float.c:
433           pic16 - excluded - data size too big
434         * support/regression/tests/onebyte.c:
435           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
436         * support/regression/tests/shifts.c:
437           pic16 - function names probably have to differ in first X characters
438           (gpasm limitation?)
439         * support/regression/tests/staticinit.c:
440           pic16 - excluded some tests due error: no target memory available for
441           section ".idata"
442
443 2006-05-22 Borut Razem <borut.razem AT siol.net>
444
445         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
446           second try. Thanks Stas Sergeev once more.
447
448 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
449
450         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
451           (genLeftShift, genRightShift): fixed bug 1491627
452         * src/hc08/peeph.def (rules 7, 8.x): added
453         * support/regression/tests/shifts.c (ShiftLeftByParam,
454           ShiftRightByParam, testShiftByParam): added to test variable shifting
455
456 2006-05-20 Raphael Neider <rneider AT web.de>
457
458         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
459         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
460           (allocReg): add only new registers to dynAllocRegs,
461           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
462             #1489055, #1445850, and probably #1483693
463
464 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
465
466         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
467         bug in for-loop that didn't emit the last of CONFIG and ID registers
468
469 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
470
471         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
472           with offset
473         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
474           1489016, 1434401 and 1490124
475         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
476           1489016, 1434401 and 1490124
477
478 2006-05-17 Borut Razem <borut.razem AT siol.net>
479
480         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
481           thanks Stas Sergeev
482
483 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
484
485         * device/include/mcs51/P89c51RD2.h,
486         * device/include/mcs51/P89LPC901.h,
487         * device/include/mcs51/P89LPC922.h,
488         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
489
490 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
491
492         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
493         to fix missing stack pragma in compiled binary object file,
494
495 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
496
497         * support/packihx/configure.in,
498         * support/packihx/configure: removed warning, autoconf >= 2.5x can
499         determine sizeof basic types even while cross compiling
500
501 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
502
503         * src/avr/gen.c (aopop),
504         * src/ds390/gen.c (aopOp),
505         * src/hc08/gen.c (aopOp),
506         * src/mcs51/gen.c (aopop),
507         * src/pic16/gen.c (pic16_aopOp),
508         * src/pic/gen.c (aopOp),
509         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
510         if size of operand is smaller than spill location
511
512 2006-05-12 Borut Razem <borut.razem AT siol.net>
513
514         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
515           have to have CR/LF line endings even if they are checked out on *nix
516           or on WIN32 in cygwin binmode
517
518 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
519
520         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
521         * device/include/ds80c390.h: added sfr16 definitions
522         * src/ds390/gen.c,
523         * src/ds390/gen.h,
524         * src/ds390/main.c,
525         * src/ds390/ralloc.c,
526         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
527           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
528           bit returning functions
529         * support/regression/tests/sfr16.c: enabled test on ds390
530
531 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
532
533         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
534         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
535
536 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
537
538         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
539         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
540           (cl_address_space constructor): removed expensive initialization,
541           (cl_address_space::get_cell): extended for late initialization,
542           (cl_address_space::*): use late initialization,
543           (cl_address_decoder::activate): removed expensive initialization,
544           This reduced regression test running time by 25%
545
546 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
547
548         * packihx/,
549         * configure.in,
550         * configure,
551         * sdcc.dsw,
552         * Makefile.bcc,
553         * Makefile.in,
554         * support/packihx/Makefile.in,
555         * support/packihx/clean.mk,
556         * support/packihx/Makefile.bcc,
557         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
558
559 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
560
561         * src/SDCCval.c (valNot): fix for regression test failure
562           of not.c on big endian hosts
563
564 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
565
566         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
567
568 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
569
570         * device/lib/mcs51/Makefile.in: changed string comparison operator
571           to = for POSIX compliance; == is bash extension
572
573 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
574
575         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
576           kosmonaut_pirx
577
578 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
579
580         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
581         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
582         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
583         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
584         bug report #1478657,
585
586 2006-05-05 Borut Razem <borut.razem AT siol.net>
587
588         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
589           making the html
590
591 2006-05-02 Borut Razem <borut.razem AT siol.net>
592
593         * doc/Makefile.in: removed *.ind dependency since there is no rule to
594           create *.ind, which made make to fail if invoked with -j 2
595
596 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
597
598         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
599           Hubert Sack for patch 1479782
600
601 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
602
603         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
604
605 2006-05-01 Raphael Neider <rneider AT web.de>
606
607         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
608           (create_pic): store only prefix-free device name,
609           (init_pic): check for device names with "16" prefix,
610           (list_valid_pics),
611         * src/pic/device.h (struct PIC_device),
612         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
613             stored device name,
614         * device/include/pic/pic12f{635,675,629,683}.h,
615         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
616         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
617         * device/include/pic/pic16f505.h,
618         * device/lib/pic/libdev/pic16f505.c: removed
619         * device/include/pic/pic14devices.txt: added support for pic12f
620             devices, removed unsupported non 16-bit devices
621             [above changes provided by patch from Zik Saleeba]
622         * src/pic/*, src/pic16/*, device/include/pic16/*,
623           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
624
625 2006-05-01 Borut Razem <borut.razem AT siol.net>
626
627         * configure.in, configure, doc/Makefile.in:
628           sync with nightly build makefile - latex, dvipdf and dvips
629           not needed any more
630
631 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
632
633         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
634         in the library source
635
636 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
637
638         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
639
640 2006-04-28 Raphael Neider <rneider AT web.de>
641
642         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
643         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
644           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
645         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
646
647 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
648
649         * device/lib/pic/libdev/Makefile.in,
650         * device/lib/hc08/Makefile.in,
651         * device/lib/gbz80/Makefile.in,
652         * device/lib/z80/Makefile.in,
653         * device/lib/ds390/Makefile.in,
654         * device/lib/ds400/Makefile.in: added srcdir to include search path,
655         thanks to Borut for the bug report
656         * configure.in,
657         * configure: always create doc/Makefile independent from --enable-doc
658         * Makefile.in: always install from directory doc independent from
659         --enable-doc
660         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
661         removed
662         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
663         * doc/Makefile.in: install *.txt if present
664         * device/include/Makefile.in (install): added installation of pic/*.inc
665         and pic/*.txt files again, they were erroneously removed
666
667 2006-04-28 Raphael Neider <rneider AT web.de>
668
669         * src/pic/{gen.c,main.h,pcode.c},
670         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
671             concerning signedness with casts
672
673 2006-04-28 Raphael Neider <rneider AT web.de>
674
675         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
676             definition of an interrupt handler,
677         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
678             interrupt handler stuff from picglue() to separate routine,
679           (picglue): enabled definition of intr handlers in files w/o main()
680
681 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
682
683         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
684           compilation with MSVC 2005 Express Edition (VC8)
685
686 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
687
688         * device/lib/Makefile: fixed build of gbz80 lib
689
690 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
691
692         * support/regression/tests/bug-460010.c,
693         * support/regression/tests/bug-524691.c,
694         * support/regression/tests/bug-716242.c: removed conditional defines
695           that are already in testfwk.h
696
697 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
698
699         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
700           (AccAXRsh1): added, shift right by 1,
701           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
702            AccAXLrl1
703         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
704
705 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
706
707         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
708         remove cast to same type
709         * src/SDCCast.c (decorateType): fix for RFE 1475742,
710         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
711         * as/z80/Makefile,
712         * link/z80/Makefile: removed, they have moved to
713         Makefile.in files
714         * configure,
715         * configure.in: replaced duplicate message about ucsim by missing sdcpp
716         * install-sh: fix bug #1204398 by setting umask 0022
717         * device/lib/Makefile: separate build of z80 and gbz80 lib
718
719 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
720
721         Enabled VPATH feature: changed nearly all Makefiles (149 files).
722         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
723
724         One basic decision: e.g. src/clean.mk includes further files. In order
725         to make this work there are two solutions:
726         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
727           run configure on them. This way they can use
728           'include $(srcdir)/port-clean.mk'
729         - always include clean.mk by the Makefile at the same level. To avoid
730           that `make clean` tries to include and build Makefile.dep the
731           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
732           implemented, because now even `make uninstall` doesn't create
733           Makefile.in. clean.mk could be eliminated by pasting it in
734           Makefile.in.
735
736         * debugger/mcs51/Makefile.in: build own objects from library sources
737         (SLIB, SDCC) in current directory
738
739         * configure, configure.in: renamed --disable-device-lib-build in
740         --disable-device-lib; added --enable-doc, the required tools are
741         searched by configure; added result message; the toolchain for the
742         belonging ports are now only built, if the port is enabled.
743
744         * support/regression/*: all output is written in directory gen, because
745         the fwk and ports directories don't livet in the build tree using vpath
746
747         * doc/sdccman.lyx: renamed --disable-device-lib-build to
748         --disable-device-lib, added --enable-doc, added section VPATH
749
750         * sim/ucsim/configure.in,
751         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
752         z80 are enabled by default
753
754 2006-04-24 Raphael Neider <rneider AT web.de>
755
756         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
757             to config word, "pic14_"-prefixed some extern functions
758           (pic14_emitConfigWord): emit __config directive(s) if assignment to
759             config word has been found
760         * src/pic/device.h: added prototypes
761         * src/pic/pcode.c: added "pic14_"-prefix where needed
762         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
763             fixup
764         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
765             words,
766           (pic14emitRegularMap): ignore config words,
767           (pic14createInterruptVect): moved generating __config directives away
768           (picglue): have __config directives emitted
769
770 2006-04-24 Borut Razem <borut.razem AT siol.net>
771
772         * doc/Makefile: sync with nightly build makefile
773
774 2006-04-24 Raphael Neider <rneider AT web.de>
775
776         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
777             registers that have not been assigned proper liveranges,
778             fixes #1469504 and #1474602,
779           (pCodeRegOptimizeRegUsage): fixed typo in comment
780
781 2006-04-24 Borut Razem <borut.razem AT siol.net>
782
783         * device/examples/main8051.c: deleted - it was removed from CVS
784           24.mar.2000 and after that modified 18.feb.2001, so it reappered
785           after the transition to Subversion
786         * src/SDCCalloc.h: deleted - it was removed  from CVS
787           3.feb.2001 and after that modified 18.feb.2001, so it reappered
788           after the transition to Subversion
789         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
790           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
791           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
792           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
793
794 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
795
796         * as/asx8051.dsp: added mcs51/strcmpi.h
797         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
798         * as/hc08/aslink.h: updated lnksect prototype
799         * as/hc08/asm.h,
800         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
801         * as/hc08/asmain.c,
802         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
803           (newdot): handle A_ABS
804         * as/hc08/asout.c,
805         * as/mcs51/asout.c (outarea): output address
806         * as/hc08/lkaomf51.c,
807         * as/mcs51/lkaomf51.c: disabled unused array UsageType
808         * as/hc08/m08pst.c,
809         * as/mcs51/i51pst.c,
810         * as/z80/z80pst.c: "ABS" is not A_OVR
811         * as/hc08/lkarea.c (newarea): read a_addr,
812           (lnkarea): added codemap array, sort absolute areas to the front,
813            combine all GSINITx/GSFINAL,
814           (find_empty_space, allocate_space): new functions,
815           (lnksect): return next address, handle absolute sections
816         * as/mcs51/lkarea.c (newarea): read a_addr,
817           lnksect2 prototype changed,
818           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
819           (find_empty_space, allocate_space): new, factored out of lnksect2,
820           (lnksect2): return next address, handle absolute sections
821         * as/hc08/lkhead.c,
822         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
823         * as/hc08/lklibr.c (addfile, fndsym),
824         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
825           index out of range and detect both '\' and '/'
826         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
827         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
828           regression tests (ds390 cannot return bool yet)
829         * doc/sdccman.lyx: changed version number, document changed --no-peep,
830           document critical interrupts on z80, document changed SDCC define
831         * src/asm.c (_asxxxx_mapping): fixed .org directive,
832           (_a390_mapping): added .org directive
833         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
834           (genMultOneByte): fixed warnings
835         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
836           ones
837         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
838         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
839           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
840         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
841         * src/pic16/main.c: removed newReg prototype
842         * src/pic16/pcode.c,
843         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
844           warnings
845         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
846           ones
847         * src/pic16/ralloc.c
848         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
849           to fix warnings
850         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
851           from short to PIC_OPTYPE
852         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
853         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
854           optype from short to PIC_OPTYPE
855         * src/port.h: made int_size unsigned to fix warnings
856         * src/SDCC.y: fixed warning on MSVC
857         * src/SDCCicode.c (getArraySizePtr): return unsigned int
858         * src/SDCCopt.c (convertToFcall): fixed warnings
859         * src/SDCCsymt.h: removed double prototype for genSymName
860         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
861           offset int to fix warnings
862
863 2006-04-22 Borut Razem <borut.razem AT siol.net>
864
865         * doc/sdccman.lyx, */Makefile, */Makefile.in:
866           references to CVS replaced with Subversion
867
868 2006-04-21 Borut Razem <borut.razem AT siol.net>
869
870         * doc/sdccman.lyx, */Makefile, */Makefile.in:
871           references to CVS replaced with Subversion
872
873 2006-04-19 Borut Razem <borut.razem AT siol.net>
874
875         * src/version.awk: adapted for svn
876         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
877           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
878           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
879           /binutils-avr/etc/*.vi, *.jin: removed all properties
880           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
881
882 2006-04-19 Borut Razem <borut.razem AT siol.net>
883
884         * CVS to Subversion migration completed
885
886 2006-04-18 Borut Razem <borut.razem AT siol.net>
887
888         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
889           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
890
891 2006-04-17 Borut Razem <borut.razem AT siol.net>
892
893         * device/include/Makefile.in: added pic/*.inc to the installation
894
895 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
896
897         * support/regression/collate-results.py: fixed output in case of
898         a valdiag error
899         * support/regression/generate-cases.py: fixed splitting of pathnames
900         with dots
901         * as/hc08/lklibr.c (addfile),
902         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
903
904 2006-04-11 Raphael Neider <rneider AT web.de>
905
906         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
907         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
908         * src/pic16/pcode.c (assignValnums): fixed #1460578
909
910 2006-04-11 Raphael Neider <rneider AT web.de>
911
912         * device/lib/pic/libdev/*.c,
913         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
914           fixes #1468739, enables compilation in --std-c99 mode
915         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
916
917 2006-04-11 Raphael Neider <rneider AT web.de>
918
919         * src/pic/device.c (find_device): removed debug output
920           (list_valid_pics): enabled verbose listing of supported devices
921         * device/include/stdbool.h: define bool as char for pic14/16 as well
922
923 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
924
925         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
926
927 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
928
929         * .version: bumped version to 2.5.6
930         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
931
932 2006-04-06 Raphael Neider <rneider AT web.de>
933
934         * .version: bumped version to 2.5.6 (pic14 ABI changed)
935         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
936         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
937           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
938             pic14_constructAbsMap
939           (pic14printPublics): declare absolute global symbols as global
940           (pic14createInterruptVect),
941         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
942           (newReg): assume new registers unused, use correct name in
943             hashtable (reg->name instead of name), more debugLog output
944         * src/pic/device.h (PIC_device): added fields for verbose output
945         * src/pic/device.c: moved device definition to pic14devices.txt,
946             added routines for runtime parsing of pic14devices.txt,
947             added support for second config word
948         * src/pic/main.c (_process_pragma): removed #pragma maxram,
949           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
950           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
951           (_pic14_parseOptions): moved pCodeInitRegisters here
952           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
953         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
954           (pCodeInitRegisters): rewrapped comments, perpared new approach to
955             handling the pseudo stack
956         * device/lib/Makefile.in: ignore failures in objects-pic16,
957         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
958         * device/lib/pic/NEWS: document new dependency on picXXX.lib
959         * device/lib/pic/Makefile.subdir,
960         * device/lib/pic16/Makefile.subdir: improved clean rules
961         * device/lib/pic/libdev/: NEW, pic14 device libraries
962         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
963         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
964         * device/include/Makefile.in: create subdir and install pic14 headers
965         * device/include/pic/p16f_common.inc: removed unused declarations
966         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
967             PICs from inc2h.pl v1.6,
968             replaced BIT_AT macros with struct declarations
969         * device/include/pic/pic14devices.txt: definition of supported devices,
970             all above improvements contributed by Zik Saleeba, thanks
971         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
972         * support/scripts/sdcc.nsi: also install pic14 device libraries and
973             headers
974
975 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
976
977         * device/include/mcs51/c8051f410.h: added interrupt numbers,
978         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
979           thanks to Charles Olds
980
981 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
982
983         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
984
985 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
986
987         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
988         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
989         * support/regression/bug1464657.c: added, new test
990
991 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
992
993         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
994           version number
995
996 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
997
998         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
999           --no-peep and --peep-file <file> are used don't use default rules but
1000           do use the <file>
1001
1002 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1003
1004         * src/mcs51/gen.c (genCall): fixed bug 1457608
1005
1006 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1007
1008         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
1009         changes seem to cause (trigger?) problems with the build system.
1010
1011 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
1012
1013         * src/SDCCpeeph.c (operandsLiteral): new, added,
1014           (callFuncByName): inserted operandsLiteral
1015         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
1016
1017 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1018
1019         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
1020         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
1021
1022 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1023
1024         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
1025           implemented patch 1120823 Thanks to Willy De la Court (normal
1026           interrupts need an interrupt number now if they are made critical),
1027           and enabled nesting of critical functions though not for gbz80
1028           (genCritical, genEndCritical): added functions
1029           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
1030         * src/z80/mappings.i: added "ei" to all mappings
1031
1032 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1033
1034         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
1035         submitted by the Debian SDCC maintainer Aurelien Jarno:
1036         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
1037         archive with gcc 4.1 on mips and wrote the patch"
1038
1039 2006-03-16 Raphael Neider <rneider AT web.de>
1040
1041         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
1042           the left operand is shorter than the result (c* = lit-c* + int),
1043           fixes bug #1450796
1044         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
1045           OP_SYMBOL
1046
1047 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1048
1049         * src/.version: increased version number to 2.5.5
1050         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
1051         linking is done manually in pic16 port's _linkEdit,
1052         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
1053         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
1054         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
1055         allocate asmop as AOP_ACC,
1056         (aopForRemat): added parameter 'bool result' in function declaration,
1057         (pic16_aopGet): return AOP_ACC when accessing WREG,
1058         (pic16_popGetTempReg): minor modification,
1059         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
1060         'pic16_allocWithIdx',
1061         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
1062         calling function in absolute addresses,
1063         (genAssign): take into account AOP_ACC asmop,
1064         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
1065         * src/pic16/pcoderegs.c: some debug functions and lines added,
1066         * src/pic16/ralloc.c (decodeRegType): added but commented out,
1067         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
1068         register too,
1069         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
1070         call to allocReg, not by manually allocating a new one,
1071         (pic16_assignRegisters): now before going through the register
1072         allocating functions mark all registers as free. This eliminates some
1073         side effects resulting from peephole parser done earlier in the backbone
1074
1075 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
1076
1077         * src/SDCCicode.c (geniCodeLogic),
1078         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
1079
1080 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
1081
1082         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
1083           (genSend): bugfix, do not allocate and free twice,
1084           (shiftRLong): handle partially overlapping aops
1085         * support/regression/tests/bitopcse.c: fixed warning redefined idata
1086
1087 2006-03-08 Borut Razem <borut.razem AT siol.net>
1088
1089         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
1090           for pic16
1091
1092 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
1093
1094         * support/regression/tests/bug1409955.c: new, added
1095         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
1096         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
1097           (aopForSym, aopOp): increment asmop.allocated if reused,
1098           (freeAsmop): decrement asmop.allocated and check for zero instead of
1099           using asmop.freed,
1100           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
1101           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
1102            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
1103            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
1104            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
1105            genSignedRightShift, genRightShift, genDataPointerGet,
1106            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
1107            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
1108             in reverse order from allocation,
1109           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
1110             added swappedLR to keep track
1111         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
1112           pdata & code for GCC, z80, gbz80 & hc08
1113         * support/regression/tests/zeropad.c: moved defines to testfwk.h
1114
1115 2006-03-08 Raphael Neider <rneider AT web.de>
1116
1117         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
1118
1119 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
1120
1121         * device/include/mcs51/c8051f410.h: new SiLabs mcu
1122         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
1123         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
1124
1125 2006-03-06 Borut Razem <borut.razem AT siol.net>
1126
1127         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
1128           made the linker quiet
1129
1130 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1131
1132         * src/pic16/gen.c (genPcall): fixed bug #1443644
1133         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
1134         which dumps before the function entry point a data byte which represents
1135         the number of the local variables used by the specified function, added
1136         'xinst' for initial support for Extended Instruction Support,
1137         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
1138         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
1139         port->fun_prefix anymore (may change later),
1140         (genFunction, genEndFunction): do not store/restore local registers for
1141         _main (this should take care the --main-return command line option in
1142         the future),
1143         (genOr): removed some legacy pic-port instructions,
1144         * src/pic16/genarith.c (genAddLit): re-enabled old code because
1145         performing operations with SFR's causes data to be written more than
1146         once to each SFR. Perhaps SFRs should be handled in special cases...
1147         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
1148         pcode.h
1149         * src/pic16/main.c (_process_pragma): stack bound checking did not take
1150         into account for stack starting position,
1151         (struct OPTIONS pic16_optionsTable): added command line argument
1152         --extended or -y for Extended Instruction Support,
1153         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
1154         (deassignLRs): *** perhaps the most important change, old 'for' code
1155         (commented out for reference), didn't account for some registers which
1156         were left marked 'not free' after a pointer operation. The change
1157         reduces register usage a lot in some cases
1158
1159 2006-03-04 Borut Razem <borut.razem AT siol.net>
1160
1161         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
1162           _clean
1163         * support/regression/tests/bug-524697.c: decreased array size for
1164           mcs51 to fit into the internal RAM
1165         * support/regression/Makefile.in: a little bit more verbose
1166
1167 2006-03-03 Borut Razem <borut.razem AT siol.net>
1168
1169         * support/regression/fwk/lib/testfwk.c,
1170           support/regression/fwk/include/testfwk.h: introduced function
1171           _prints(), nonrecursive _printn(), call _initEmu() from main()
1172         * support/regression/ports/gbz80/support.asm,
1173           support/regression/ports/ucz80/support.asm,
1174           support/regression/ports/z80/support.asm,
1175           support/regression/ports/ds390/support.c,
1176           support/regression/ports/hc08/support.c,
1177           support/regression/ports/host/support.c,
1178           support/regression/ports/mcs51/support.c,
1179           support/regression/ports/xa51/support.c: added empty _initEmu()
1180           function
1181         * support/regression/ports/pic16/gpsim.cmd,
1182           support/regression/ports/pic16/spec.mk,
1183           support/regression/ports/pic16/support.c,
1184           support/regression/Makefile.in: added pic16 regression test
1185
1186 2006-03-01 Raphael Neider <rneider AT web.de>
1187
1188         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
1189           genConstPointerGet): use safe way of generating MOVFF to cover
1190             literals as well as registers, fixes bug #1440527
1191         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
1192             dereference
1193           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
1194             more correctly, fixes bug #1232186
1195           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
1196         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
1197             gplink guess the correct processor in more cases, applied patch
1198             from Till Riedel attached to and fixing bug #1436552
1199
1200 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1201
1202         * support/regression/tests/array.c: added, contains check for #1434401
1203         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
1204
1205 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
1206
1207         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
1208         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
1209         * device/include/mcs51/c8051f326.h,
1210         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
1211         * device/include/mcs51/c8051f000.h,
1212         * device/include/mcs51/c8051f018.h,
1213         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
1214           PCON_IDLE,PCON_STOP and added sfr16 definitions
1215
1216 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1217
1218         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
1219           genGetWord): fixed bug 1409955
1220
1221 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1222
1223         * device/include/hc08/mc68hc908gp32.h,
1224         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
1225
1226 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
1227
1228         * src/SDCCast.c (constExprValue): return NULL if not a value
1229         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
1230         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
1231         * support/regression/tests/bitfields.c: enabled signed bitfield for all
1232
1233 2006-02-13 Borut Razem <borut.razem AT siol.net>
1234
1235         * src/regression/ptrarg.c: added, fails due to bug #1430967
1236         * src/regression/Makefile: ptrarg.c added, ...
1237
1238 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
1239
1240         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
1241         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
1242
1243 2006-02-11 Borut Razem <borut.razem AT siol.net>
1244
1245         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
1246           print "Processor: xxx" message to stdout only if --verbose
1247
1248 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1249
1250         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
1251         * support/regression/tests/bug1426356.c: added
1252         * support/regression/tests/bitfields.c: removed 2 tests
1253
1254 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1255
1256         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
1257         * device/include/mcs51/c8051f330.h,
1258         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
1259           PCON_IDLE,PCON_STOP and added sfr16 definitions
1260         * device/lib/_divsint.c,
1261         * device/lib/_divuint.c,
1262         * device/lib/_divulong.c,
1263         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1264           register bank bug for small stackauto
1265
1266 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1267
1268         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1269
1270 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1271
1272         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1273         * all.dsp: corrected several bin paths
1274         * device/include/mcs51/c8051f120.h,
1275         * device/include/mcs51/c8051f300.h,
1276         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1277           to PCON_IDLE,PCON_STOP
1278         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1279         * device/lib/printf_large.c (output_float): fixed bug 1388703
1280         * support/regression/tests/bug1057979.c: added test for bug 1388703
1281
1282 2006-02-08 Raphael Neider <rneider AT web.de>
1283
1284         * src/pic/pcode.c (pciTRIS): fixed typo,
1285           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1286           (LinkFlow): fixed handling of flows that end in a call,
1287           (ReuseReg): perform safety check earlier
1288         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1289             to work with flows at the beginning of a pBlock,
1290             fixes #1426557 (Symbol not previously defined),
1291           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1292             usage information
1293           (RemoveUnusedRegisters): update register usage info
1294         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1295             created, reuse existing ones instead
1296         * src/pic/gen.c (genPcall): fixed #1424719
1297
1298 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1299
1300         * link/z80/lkmain.c,
1301         * link/z80/lklex.c,
1302         * link/z80/lkdata.c,
1303         * link/z80/aslink.h: fixed build on current cygwin:
1304         replaced getline() by lk_getline()
1305
1306 2006-02-01 Borut Razem <borut.razem AT siol.net>
1307
1308         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
1309           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
1310           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
1311           src/regression/bool1.c, src/regression/bool2.c,
1312           src/regression/bool3.c, src/regression/call1.c,
1313           src/regression/compare.c, src/regression/compare10.c,
1314           src/regression/compare2.c, src/regression/compare3.c,
1315           src/regression/compare4.c, src/regression/compare5.c,
1316           src/regression/compare6.c, src/regression/compare7.c,
1317           src/regression/compare8.c, src/regression/compare9.c,
1318           src/regression/configword.c, src/regression/for.c,
1319           src/regression/inline.c, src/regression/mult1.c,
1320           src/regression/nestfor.c, src/regression/or1.c,
1321           src/regression/pointer1.c, src/regression/ptrfunc.c,
1322           src/regression/rotate1.c, src/regression/rotate2.c,
1323           src/regression/rotate3.c, src/regression/rotate4.c,
1324           src/regression/rotate5.c, src/regression/rotate6.c,
1325           src/regression/rotate7.c, src/regression/string1.c,
1326           src/regression/struct1.c, src/regression/sub.c,
1327           src/regression/sub2.c, src/regression/switch1.c,
1328           src/regression/while.c, src/regression/xor.c,
1329           src/regression/create_stc, src/regression/simulate,
1330           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
1331           regression tests
1332         * src/regression/gpsim_assert.h: added
1333
1334 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
1335
1336         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
1337         ((void (code *) (void)) 0) ();
1338         * as/hc08/aslex.c,
1339         * as/hc08/aslink.h,
1340         * as/hc08/asm.h,
1341         * as/hc08/asmain.c,
1342         * as/hc08/lkdata.c,
1343         * as/hc08/lklex.c,
1344         * as/hc08/lkmain.c,
1345         * as/mcs51/aslex.c,
1346         * as/mcs51/aslink.h,
1347         * as/mcs51/asm.h,
1348         * as/mcs51/asmain.c,
1349         * as/mcs51/lkdata.c,
1350         * as/mcs51/lklex.c,
1351         * as/mcs51/lkmain.c,
1352         * as/z80/aslex.c,
1353         * as/z80/asm.h,
1354         * as/z80/asmain.c: fixed build on current cygwin:
1355         replaced getline() by as_getline()
1356
1357 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
1358
1359         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
1360         declarator in the symbol chain
1361         * src/SDCCsymt.h,
1362         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
1363         parameter list for function pointers
1364         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
1365         * support/regression/tests/bug-716242.c: added
1366
1367 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
1368
1369         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
1370         offset if possible
1371         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
1372
1373 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
1374
1375         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
1376         inifinitely recurseable, added static
1377         * support/regression/tests/bug-1408066.c: added
1378
1379 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
1380
1381         * src/SDCCicode.h,
1382         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
1383         renamed, added possibility to create "postLoopLbl"-labels
1384         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
1385         newiTempLoopHeaderLabel
1386         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
1387         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
1388         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
1389         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
1390         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
1391         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
1392         (basicInduction): fixed bug #136564, made static,
1393         (loopInduction): changed parameter of basicInduction, made static,
1394         (addPostLoopBlock): added
1395         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
1396         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
1397         findLoopEndSeq
1398         * support/regression/tests/bug-136564.c: added
1399         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
1400         --std-sdcc99 to LIBSDCCFLAGS
1401
1402 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
1403
1404         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
1405         while loop
1406         * support/regression/tests/bug-1406131.c: added
1407
1408 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
1409
1410         * src/SDCCast.c (decorateType): fix promotion of unary minus
1411         * src/SDCCsymt.c (computeType): beautified
1412         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
1413         (valUnaryPM, valComplement): fix sign and promotion,
1414         (valNot): ANSI: result type is int (SDCC: unsigned char)
1415         * support/regression/tests/uminus.c: speedup by removing superflous
1416         test case 'int'
1417         * support/regression/tests/onebyte.c: added promotion and signedness
1418         tests for unary minus
1419         * support/regressions/tests/bug-477927.c: disable warning about
1420         uninitialized variables
1421         * support/regression/tests/not.c: added
1422
1423 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
1424
1425         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
1426         * src/mcs51/gen.c (gen51Code): show final register usage after
1427         fillGaps in asm with --i-code-in-asm
1428         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
1429         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
1430         incUsed, rliveClear, adjustIChain): made static,
1431         (setFromRange): excluded because it's unused,
1432         (findPrevUseSym, markWholeLoop): added,
1433         (findPrevUse): rewritten; fixes bug 895992; now a complete search
1434         through all branches of predecessors enables sdcc to emit the warning
1435         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
1436         (rlivePoint): made static, added parameter emitWarnings which is only
1437         true during the first run out of two,
1438         (findRecursiveSucc, findRecursivePred): removed,
1439         (computeLiveRanges): made static, added parameter emitWarnings,
1440         (dumpIcRlive): added for debugging only
1441         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
1442         removed prototype of setFromRange()
1443         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
1444         in call of computeLiveRanges()
1445         * support/regression/tests/bug-895992.c: added
1446         * support/regression/tests/bug-971834.c: added
1447         * support/valdiag/tests/bug-895992.c: added
1448         * support/valdiag/tests/bug-971834.c: added
1449
1450 2005-12-18 Raphael Neider <rneider AT web.de>
1451
1452         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
1453           (genUnpackBits): improved code for direct operands,
1454           (genPackBits): improved code for literal assignment to bitfields
1455             and for direct destination operands (no FSR indirection),
1456             prevented redundant AND, fixes #1362800,
1457           (AccLsh): added parameter to disable masking of the result
1458         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
1459           skip instructions with side-effects (like incfsz),
1460           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
1461         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
1462         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
1463           fixes #1375263
1464
1465 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
1466
1467         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
1468         volatile variables as spill location
1469
1470 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
1471
1472         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
1473         replacing literals
1474         * support/regression/tests/bug-1376320.c: added
1475
1476 2005-12-08 Raphael Neider <rneider AT web.de>
1477
1478         * src/pic/device.c: renamed is_shared to pic14_is_shared
1479         * src/pic/gen.c (genIfx): re-enabled handling of sbits
1480         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
1481           (is_valid_identifier): added for above workaround
1482
1483 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
1484
1485         * device/lib/Makefile.in: fixed to enable port-specific-objects
1486         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
1487           char, thanks Hubert Sack
1488         * doc/sdccman.lyx: documented --xstack-loc,
1489           elaborated a bit more on interrupts and pitfalls,
1490           removed "setjmp/longjmp unsupported",
1491           documented some unsupported C99 features
1492         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
1493         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
1494           if, thanks Hubert Sack
1495         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
1496         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
1497           make make_library
1498         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
1499           regression tests can report resource usage (rfe 700441)
1500         * support/regression/collate-results.py: report resource usage
1501         * support/regression/ports/ds390/spec.mk,
1502         * support/regression/ports/hc08/spec.mk,
1503         * support/regression/ports/mcs51/spec.mk,
1504         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
1505         * support/regression/ports/ds390/uCsim.cmd,
1506         * support/regression/ports/hc08/uCsim.cmd,
1507         * support/regression/ports/mcs51/uCsim.cmd,
1508         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
1509         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
1510           library, use the default one
1511         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
1512           building the library
1513
1514 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
1515
1516         * config.dsp: added dependency on .version and configure_vc.awk
1517         * device/include/setjmp.h: updated for --stack-auto and --xstack
1518         * device/include/mcs51/at89c51snd1c.h: corrected line endings
1519         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
1520         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
1521         * device/lib/libsdcc.lib: added _setjmp
1522         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
1523           (decorateType): fixed bug 1372851,
1524           (optimizeGetHbit): fixed warning
1525         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
1526           array initialisation
1527         * support/regression/tests/bug1057979.c: added test for bug 1358192
1528         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
1529
1530 2005-12-03 Borut Razem <borut.razem AT siol.net>
1531
1532         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
1533           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
1534
1535 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1536
1537         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
1538         createIval): implement symbol independant "flexible array member",
1539         (createIvalCharPtr): implemented flexible array initialisation with a
1540         string
1541         * src/SDCCsymt.c (copyStruct): removed,
1542         (getSize): fixed misleading comment,
1543         (getAllocSize): removed, the additional allocation size is now in
1544         sym->flexArrayLength,
1545         (checkStructFlexArray): new, syntax checks for flexible array members,
1546         (compStructSize): added syntax checks for "flexible array members"
1547         (copyStruct): removed,
1548         (copyLinkChain): removed inefficient fix for bug 770487
1549         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
1550         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
1551         symbol->flexArrayLength
1552         * src/SDCCerr.c,
1553         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
1554         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
1555         * support/regression/tests/structflexarray.c: added
1556         * support/valdiag/tests/structflexiblearray.c: added
1557
1558 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1559
1560         * src/SDCCast.c (decorateType): fixed bug 1368489
1561         * support/Util/SDCCerr.c,
1562         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
1563
1564 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1565
1566         * device/include/mcs51/at89c51snd1c.h: added file submitted by
1567           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
1568
1569 2005-11-27 Borut Razem <borut.razem AT siol.net>
1570
1571         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
1572           support/cpp2/mkdeps.h: added command line option
1573           -obj-ext=<extension> to SDCPP to define object file externion, used
1574           for generation of make dependencies (-M)
1575         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
1576
1577 2005-11-26 Borut Razem <borut.razem AT siol.net>
1578
1579         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
1580           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
1581           added pic and pic16 libraries
1582
1583 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1584
1585         * device/include/float.h: Corrected typo in prototype of __fsgt
1586
1587 2005-11-25 Borut Razem <borut.razem AT siol.net>
1588
1589         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
1590           added creation of model-mcs51-stack-auto libraries
1591
1592 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
1593
1594         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
1595         and fields-list too
1596         * src/SDCCast.c (createIvalArray): removed obsolete comment
1597
1598 2005-11-24 Borut Razem <borut.razem AT siol.net>
1599
1600         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
1601           added missing device/lib/mcs51/crt*.asm sources
1602
1603 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
1604
1605         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
1606
1607 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
1608
1609         * device/lib/_fs2schar.c,
1610         * device/lib/_fs2sint.c,
1611         * device/lib/_fs2slong.c: optimized inline asm
1612
1613 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1614
1615         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1616           Better handling of floats between -1.0 and 0.0.
1617
1618 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1619
1620         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
1621           (the missing "if"s prohibited removal of redundant labels)
1622
1623 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1624
1625         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1626           Properly convert floats between -1.0 and 0.0 to long, int, and char
1627           types (max integer value of negative floats tends to zero).
1628         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1629           Removed changes made so to work properly with floats between
1630           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
1631           and _fs2char.c
1632
1633 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1634
1635         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
1636         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
1637         (genCast) cosmetic change
1638         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
1639         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
1640         from mcs51
1641         * support/regression/tests/bitfields (testSignedBitfields): added
1642
1643 2005-11-18 Borut Razem <borut.razem AT siol.net>
1644
1645         * sdcc/device/lib/Makefile.in: remove all unnecessary files
1646         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
1647           introduced SILENT option to make building of pic16 libraries less
1648
1649 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1650
1651         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1652           Now they work properly with floats between -1.0 and 0.0
1653         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
1654
1655 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1656
1657         * src/SDCCicode.c (printOperand): added missing else
1658
1659 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1660
1661         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
1662         reformatted for better readability
1663         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
1664         signed bitfields
1665
1666 2005-11-17 Borut Razem <borut.razem AT siol.net>
1667
1668         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
1669           introduced SILENT option to make building of pic16 libraries less
1670           verbose - used for nightly snapshot build
1671         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
1672           available on Win32 platforms.
1673         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
1674           medium, large, pic and pic16
1675
1676 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1677
1678         * device/lib/printf_large.c: Temporary patch for bug 1358192:
1679           printf("%f"...) sets fraction to zero.
1680
1681 2005-11-16 Raphael Neider <rneider AT web.de>
1682
1683         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
1684           fixes #1357221
1685         * src/pic/gen.c (genIfx): implemented for CARRY bit
1686         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1687           to generic pointers, fixes #1357332,
1688           (pic16_movLit2f): NEW,
1689           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1690
1691 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1692
1693         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1694
1695 2005-11-11 Raphael Neider <rneider AT web.de>
1696
1697         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1698         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1699           compute pointer's type from operand,
1700           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1701           improved single bit reads, fixes bug #1353379
1702
1703 2005-11-09 Borut Razem <borut.razem AT siol.net>
1704
1705         * support/scripts/sdcc.nsi: added lib/pic to the package
1706
1707 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1708
1709         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1710
1711 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1712
1713         * support/regression/tests/bug1348008.c: added
1714         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1715         * support/regression/tests/bug1337835.c: updated comment
1716
1717 2005-11-06 Borut Razem <borut.razem AT siol.net>
1718
1719         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1720           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1721           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1722           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1723           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1724           dynamic construction of cl_error_class and derivates - 2.nd try
1725
1726 2005-11-05 Borut Razem <borut.razem AT siol.net>
1727
1728         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1729           bug, which caused Bus Errors on sparc solaris
1730
1731 2005-11-04 Borut Razem <borut.razem AT siol.net>
1732
1733         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1734           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1735           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1736           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1737           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1738           and derivates to resolve the initialization problem on OSX
1739
1740 2005-11-02 Borut Razem <borut.razem AT siol.net>
1741
1742         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1743           corrected typo - #include <winsock2.h>
1744
1745 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
1746
1747         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
1748           (_asxxxx_mapping): added org directive for future enhancements
1749
1750 2005-11-01 Borut Razem <borut.razem AT siol.net>
1751
1752         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1753           enabled sockets on WIN32
1754         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
1755
1756 2005-10-31 Borut Razem <borut.razem AT siol.net>
1757
1758         * support/regression/generate-cases.py: escape backslashes in {testcase}:
1759           WIN32 backslash path delimiters should be escaped when used in C strings
1760         * support/regression/tests/bitfields.c: exclude failing assertions for
1761           __CYGWIN32__ and __MINGW32__ hosts
1762
1763 2005-10-30 Borut Razem <borut.razem AT siol.net>
1764
1765         * src/SDCCutil.c: corrected double comparison typo
1766
1767 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
1768
1769         * device/lib/medium/Makefile: added for new memory model medium
1770         * device/include/asm/mcs51/features.h: updated for medium/pdata
1771         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
1772           added Multiply & Accumulate sbit's and MAC0_PAGE define
1773         * device/include/mcs51/c8051f300.h: added sfr16 definitions
1774         * device/include/mcs51/c8051f310.h: added sfr16 definitions
1775         * device/lib/_mullong.c: update for medium model
1776         * device/lib/incl.mk: added medium model
1777         * doc/sdccman.lyx: documented medium model
1778         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
1779         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1780         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1781         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1782           (allocParms): set SCLS and OCLS to pdata for medium model
1783         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1784           for pdata,
1785           (powof2): return <0 if not power of 2
1786         * src/avr/gen.c (genBitWise): use updated powof2
1787         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1788           (shiftR2Left2Result): small optimization in setup, save acc when storing,
1789           (shiftLLeftOrResult): use B if necessary
1790         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1791         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1792         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1793         * support/regression/Makefile.in: added test-mcs51-medium
1794         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1795
1796 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1797
1798         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1799         specifier unsigned
1800         * device/lib/time.c (mktime): fixed bug 1334315
1801
1802 2005-10-28 Raphael Neider <rneider AT web.de>
1803
1804         * device/include/pic/p16f_common.inc: added common declarations
1805         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1806
1807 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1808
1809         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1810           (aopPutUsesAcc): added to predict accumulator use,
1811           (assignResultValue): save acc if necessary,
1812           (genMinusDec): store result if indirectly addressed,
1813           (genDivOneByte):  save acc if necessary,
1814           (movLeft2Result): bugfix if left already in acc,
1815           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1816             attention to accumulator use (esp. pdata),
1817           (genReceive): receive pdata correctly
1818         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1819         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1820
1821 2005-10-27 Raphael Neider <rneider AT web.de>
1822
1823         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1824
1825 2005-10-27 Raphael Neider <rneider AT web.de>
1826
1827         * .version: changed version to 2.5.4
1828         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1829         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1830           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1831             arithmetics support routines
1832         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1833         * device/lib/Makefile.in: also create installdir for pic
1834
1835         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1836           pic14 port as well
1837         * src/pic/device.c (dump_sfr): rewritten to delegate register
1838           placement to the linker (use `extern sym' rather than sym EQU addr),
1839           (validAddress): fixed to check last specified address
1840         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1841           (popGetLit): truncate literal value to 8 bit,
1842           (popGet): moved assert to more appropriate place
1843           (popGetExternal): create pCode operand from and mark the according
1844             symbol as being `extern'
1845           (popGetAddr): added sanity check on immediate's offset, provide
1846             GPOINTER tag on demand
1847           (aopPut): fixed for immediates,
1848           (mov2w_op): move operand's address or contents to WREG (depending on
1849             operand type), safer variant of mov2w,
1850           (movwf,call_libraryfunc): NEW, handy abbreviations,
1851           (get_argument_pcop,get_return_val_pcop,pass_argument,
1852           get_returnvalue): interface for accessing function parameters and
1853             return values,
1854           (assignResultValuei,genRet): use new parameter/return value interface
1855           (pic14_getDataSize): back to old version handling generic pointers,
1856           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1857             provided implementation and/or fixed old one,
1858           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1859             calls, removed legacy 8051 reference code
1860           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1861           (loadSignToC): NEW, move the operands sign bit to CARRY,
1862           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1863             genRightShiftSigned, accepts negative shift counts,
1864           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1865           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1866             generic pointers, __data pointers and __code pointers,
1867           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1868             and signed bitfields, limit bitfields to 8 bit,
1869           (genDataPointerGet): fixed number of bytes read,
1870           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1871           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1872             pointers to constant data are no longer assumed to point to __code
1873             space, removed invalid pointer types,
1874           (bitpatternFromVal): retrieve the PICs representation of an integer
1875             or float literal,
1876           (genDataPointerSet): fixed assigning to po_immediate operands,
1877           (genGenPointerSet): implemented as library call,
1878           (genIfx): fixed incorrect condition,
1879           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1880             provide GPOINTER tag according to destination's storage class,
1881           (genCast): added code to handle casting to generic pointers, added
1882             sign-/zero extension of the result
1883           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1884         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1885         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1886           extend the result
1887         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1888           address/register resides in the shared banks
1889           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1890             put all variables into separate sections (have the linker arrange
1891             them)
1892           (picglue): put init code and interrupt handlers in separate sections
1893         * src/pic/main.c: added port specific options table, modified to PORT
1894           structure to make GPOINTERs 3 byte, added pic14_options
1895           (_pic14_do_link): private linking routine (update paths to libraries,
1896             add libsdcc.lib by default)
1897         * src/pic/main.h: declare pic14_options
1898         * src/pic/pcode.c: fixed instructions i/o relations,
1899           (RegCond): reverted to correct version,
1900           (newpCodeOpLit): truncate literals to 8 bit,
1901           (genericPrint): added debug output,
1902           (getRegFromInstruction): fixed for various operand types, simplified
1903           (BuildFlow): fixed broken handling of isntructions with labels
1904           (LinkFlow): start at last instruction in flow (skip trailing comments),
1905             pass the flow on to the next instruction after CALL
1906           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1907           (insertPCodeInstruction): fixed inserting after a skip instruction,
1908           (DoBankSelect): fixed for labeled instructions
1909           (OptimizepBlock): honor --nopeep switch
1910           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1911         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1912         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1913           (pCodeOptime2pCodes): allow disabling this optimization via
1914             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1915             but is still buggy), started implementation of a dataflow based
1916             pCode optimization (CSE + dead code elimination)
1917           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1918         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1919           names are independant of the stack location and therefore portable across
1920           devices
1921
1922 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1923
1924         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1925           (selectSpil): fixed bug 1337835 by not spilling bit variables
1926         * support/regression/tests/bug1337835.c: added test for this bug
1927         * src/mcs51/peeph.def: restart after rule 3.c,
1928           addded rules 263.x to optimize loading constants
1929
1930 2005-10-26 Raphael Neider <rneider AT web.de>
1931
1932         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1933         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1934           (genAssign): emit warning when casting literals to generic pointer
1935             type, also applies when taking the address of a fixed variable,
1936           (genCast): improved casting to generic pointers
1937         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1938           extern variables, added verbose error message
1939         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1940
1941 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1942
1943         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1944         carry must be complemented too
1945         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1946         could be emitted by genMinus
1947         * src/SDCCval.c (constVal): fixed bug 1305065
1948
1949 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1950
1951         * src/SDCCast.c (addCast): added promotion for bit variables
1952         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1953         promotion casts + optimisation
1954         (optimizeGetWord): fix warning 'i' might be used uninitialized
1955         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1956         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1957
1958 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1959
1960         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1961         all chars are promoted to int; promotion should be handled in SDCCast.c
1962
1963 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1964
1965         * device/lib/_strcmp.c: Fixed bug 1326457
1966
1967 2005-10-11 Raphael Neider <rneider AT web.de>
1968
1969         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1970         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1971
1972 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1973
1974         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1975         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1976
1977 2005-10-04 Raphael Neider <rneider AT web.de>
1978
1979         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1980           device/lib/pic16/pics.all: added pic18f1320
1981         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1982
1983 2005-09-30 Raphael Neider <rneider AT web.de>
1984
1985         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1986         * src/pic16/devices.inc: NEW, provides device descriptions
1987         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1988
1989 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1990
1991         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1992           GETHBIT
1993
1994 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1995
1996         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1997           documented Any Order Bit, Higher Order Byte and Higher Order Word
1998         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1999         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
2000           (optimizeGetAbit): new, to get any bit, not only the high bit,
2001           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
2002           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
2003           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
2004           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
2005             RIGHT_OP: also try GETBYTE, GETWORD optimization,
2006             GETABIT, GETBYTE, GETWORD: decorate them,
2007           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
2008           (ast_print): added GETABIT, GETBYTE, GETWORD
2009         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
2010         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
2011           (geniCodeBinary): new generic binary icode,
2012           (ast2iCode): added GETABIT, GETBYTE, GETWORD
2013         * src/port.h: updated comment for PORT.hasExtBitOp
2014         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
2015           (genGetByte): new, to get a single byte,
2016           (genGetWord): new, to get a word from a long,
2017           (gen51Code): added GETABIT, GETBYTE, GETWORD
2018         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
2019
2020 2005-09-23 Raphael Neider <rneider AT web.de>
2021
2022         * configure.in, configure: have device/lib/pic configured
2023         * device/lib/Makefile.in: added model-pic14
2024         * device/lib/clean.mk: added pic/ to clean rule
2025         * device/lib/pic: added rudimentary pic14 library providing support
2026           functions for multiplication/division/generic pointer access
2027         * src/SDCCopt.c (convilong): mark support functions as extern
2028           for pic14 port as well
2029         * src/pic/gen.c (genMult): added assertions,
2030           (genpic14Code): emit warning on unhandled iCodes
2031         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
2032         * src/pic/pcode.c (pCodeOpCopy),
2033         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
2034           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
2035           SFR_REGISTER}), made safe for future extensions
2036         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
2037           instructions even if preceeded by SKIP instructions (also remove
2038           them); removed unused code
2039         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
2040           prevents leaving parts of the structure uninitialized after copying
2041
2042 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
2043
2044         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
2045           ago by me
2046         * support/regression/tests/addsub.c: added test for the bug
2047
2048 2005-09-21 Raphael Neider <rneider AT web.de>
2049
2050         * device/include/pic16/pic18f1220.h,
2051           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
2052         * device/lib/pic16/Makefile.rules: added missing opening paren
2053         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
2054           are provided in genutils.c,
2055           (genUminusFloat,genUminus,genCmpEq): added asserts on different
2056           operand/result sizes,
2057           (genCmp): assert on NULL pointers first, then check deref'ed values
2058         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
2059           result size
2060
2061 2005-09-18 Raphael Neider <rneider AT web.de>
2062
2063         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
2064           as these are now unused,
2065           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
2066         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
2067           local, avoids uninitialized pointer dereference on r->name
2068         * src/pic16/ralloc.c (newReg): fixed indentation
2069
2070 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
2071
2072         * src/SDCCval.c (constVal): fixed bug 730366
2073         * support/Util/SDCCerr.c,
2074         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
2075
2076 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
2077
2078         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
2079
2080 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
2081
2082         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
2083
2084 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2085
2086         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
2087           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2088         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
2089           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2090         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
2091         * packihx/packihx.c (hexDigit): made c unsigned char
2092         * as/mcs51/lklibr.c (fndsym),
2093         * link/z80/lkgb.c (gb),
2094         * link/z80/lklibr.c (fndsym),
2095         * link/z80/lkrloc.c (relr),
2096         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
2097         * src/SDCC.lex (checkCurrFile, process_pragma),
2098         * src/SDCCglue.c (spacesToUnderscores),
2099         * src/SDCCmain.c (setParseWithComma, processFile),
2100         * src/asm.c (tvsprintf, printCLine),
2101         * src/avr/gen.c (emitcode, aopPut),
2102         * src/ds390/gen.c (emitcode),
2103         * src/hc08/gen.c (emitcode, emitinline),
2104         * src/mcs51/gen.c (emitcode, genInline),
2105         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2106           tokenizeLineNode),
2107         * src/pic/ralloc.c (debugLog),
2108         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2109           tokenizeLineNode),
2110         * src/pic16/ralloc.c (debugLog),
2111         * src/z80/main.c (_process_pragma):
2112            made all ctype.h function calls safe
2113         * src/SDCCopt.c: include math.h for fabs
2114         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
2115           and used them throughout the code to make ctype.h function calls safe
2116         * src/ds390/main.c (asmLineNodeFromLineNode),
2117         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
2118         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
2119            unsigned char*
2120         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
2121           (newpCodeAsmDir): made ctype.h function calls safe
2122         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
2123           pic16_emitcode):  made lbp unsigned char*
2124         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
2125           (pic16_newpCodeAsmDir): made ctype.h function calls safe
2126         * src/xa51/gen.c (emitcode),
2127         * src/z80/gen.c (_emit2): made lbp unsigned char*
2128         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
2129            char*
2130
2131 2005-09-05 Raphael Neider <rneider AT web.de>
2132
2133         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
2134           access bank splitpoint
2135
2136 2005-09-05 Raphael Neider <rneider AT web.de>
2137
2138         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
2139
2140 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
2141
2142         * .version: changed to version 2.5.3
2143         * doc/sdccman.lyx: changed version to 2.5.3,
2144           documented --codeseg and --constseg and pragma codeseg and constseg,
2145           documented bit parameters (reentrant) and bit returning
2146         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
2147            currFunc->recvSize, but is this ok for all ports?
2148           (ast2iCode): result of ~ on unsigned char must be cast to int for
2149            bool to work
2150         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
2151           function pointers in bit space
2152         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
2153           (processFuncArgs): call port.reg_parm() with reentrancy info
2154         * src/port.h,
2155         * src/avr/main.c,
2156         * src/ds390/main.c,
2157         * src/hc08/main.c,
2158         * src/pic/main.c,
2159         * src/pic16/main.c,
2160         * src/xa51/main.c,
2161         * src/z80/main.c: port.reg_parm prototype extended with
2162           "bool reentrant" parameter
2163         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
2164           options.stackAuto for allocating bit register parameters
2165         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
2166           (genSend): set BitBankUsed if it is,
2167           (selectRegBank): factored out of genCall for use in genPcall,
2168           (genCall): removed redundant dtype assignmen, use selectRegBank,
2169           (genPcall): handle returning in Carry properly, save in F0 if needed,
2170           (genReceive): handle bit register parameters
2171         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
2172           (mcs51_assignRegisters): enable bit registers for all reentrant
2173            functions and don't set BitBankUsed unconditionally
2174         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
2175         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
2176         * support/regression/tests/funptrs.c: added tests for BOOL and for return
2177
2178 2005-08-27 Borut Razem <borut.razem AT siol.net>
2179
2180         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
2181         ppc-osx (Darwin) does not support -u option. It seems that it is
2182         supported only on Linux - GNU cp
2183
2184 2005-08-25 Borut Razem <borut.razem AT siol.net>
2185
2186         * sim/ucsim/gui.src/serio.src/Makefile.in,
2187           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
2188           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2189           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
2190           install and strip, since the strip at /usr/ccs/bin should be used
2191           on solaris
2192
2193 2005-08-24 Borut Razem <borut.razem AT siol.net>
2194
2195         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
2196
2197 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
2198
2199         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
2200         ffffffffu
2201
2202 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
2203
2204         * as/mcs51/aslink.h: completed lkrloc.c prototypes
2205         * as/mcs51/lkmain.c (link_main): fixed warning
2206         * device/include/stdbool.h: ds390 has no advanced bit support yet
2207         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
2208         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
2209         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
2210           and updated their macros
2211         * src/SDCCval.c (constVal): updated comment for renamed b_long
2212
2213 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
2214
2215         * as/mcs51/asdata.c: changed ctype['['] to BINOP
2216         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
2217           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
2218           (oprio): set priority for '['
2219         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
2220            and adb_24_bit
2221         * as/mcs51/asm.h: added defines R_BIT and S_BIT
2222         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
2223         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
2224         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
2225           added overlayable BIT_BANK area
2226         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
2227           (summary2): explain 'T' in legenda
2228         * as/mcs51/lkrloc.c: replaced old K&R style,
2229           (relr): added R_BIT processing,
2230           (errmsg): added "Bit-addressable relocation error",
2231           (adb_bit): added for converting from byte- to bit-addressable space,
2232           (adb_24_bit): added for converting from byte- to bit-addressable space
2233         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
2234            used in reentrant functions now even as return value
2235         * device/lib/_gptrput.c (_gptrput): removed obsolete code
2236         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
2237           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
2238         * src/SDCCglobl.h: added indicator BitBankUsed
2239         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
2240            the bit registers b0-b7
2241         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
2242           (geniCodeCast): fixed bug 1263853,
2243           (geniCodeLogicAndOr): put result in bool or char,
2244           (geniCodeReceive): added parameter func for accessing the return type,
2245           (geniCodeFunctionBody): pass func to geniCodeReceive
2246         * src/SDCCmain.c: added indicator BitBankUsed
2247         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
2248         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
2249           (checkSClass): don't put automatic bool/bit on stack,
2250           (checkFunction): removed check on function cannot return bit
2251         * src/SDCCsymt.h: added newBoolLink prototype
2252         * src/mcs51/gen.c (rb1regs): added bit registers,
2253           (movc): created for assigning to carry,
2254           (pushReg, popReg): created for pushing registers,
2255           (sameRegs): check both AOP_REG and AOP_CRY types,
2256           (aopOp): handle bit registers,
2257           (aopPut): optimization no self-assign,
2258           (saveRegisters): push reg->base (bits) only once for bit registers,
2259            and use pushReg,
2260           (unsaveRegisters): pop reg->base only once and use popReg,
2261           (assignResultValue): added parameter func and return in carry for bits,
2262           (genIpush): optimization no reload in A if not changed,
2263           (genSend): bit parameters in reentrant functions are passed in bit
2264            registers by first assigning to bits in B, then save registers and
2265            copy B to bits,
2266           (genCall): handle returning in Carry properly, save it in F0 if needed,
2267           (genPcall): updated assignResultValue call, this is not safe yet for bit
2268            returning function !!!
2269           (genFunction): don't generate equ's for bit registers and use pushReg,
2270           (genEndFunction): take care of bit returning functions and use popReg,
2271           (genRet): return bit in Carry,
2272           (genIfx): optimize bit registers and other directly addressable bits,
2273           (genReceive): updated assignResultValue call
2274         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2275           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2276            registers when using stack-auto
2277         * src/mcs51/ralloc.c (_G): added allBitregs,
2278           (regs8051): added the bit registers,
2279           (createStackSpil): use macro IS_BIT,
2280           (getRegBit): added to allocate a bit register, else spill,
2281           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2282           (updateRegUsage): factored out to ease stepping while debugging,
2283           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2284            also allocate bit registers,
2285           (fillGaps): handle bit registers,
2286           (findAllBitregs): added to create bit vector with all bit registers,
2287           (mcs51_allBitregs): returns this bit vector,
2288           (mcs51_assignRegisters): when using stack-auto use bit registers for
2289            passing parameters and creating local variables
2290         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2291
2292 2005-08-22 Borut Razem <borut.razem AT siol.net>
2293
2294         * device/lib/Makefile.in: replaced find option -or with -o
2295           to make it run on solaris
2296
2297 2005-08-22 Raphael Neider <rneider AT web.de>
2298
2299         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
2300           fixes #1265442 (crash on Solaris)
2301
2302 2005-08-20 Borut Razem <borut.razem AT siol.net>
2303
2304         * configure, configure.in: added tests for libsocket and libnsl libraries,
2305           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
2306           from support/regression/Makefile.in
2307         * support/regression/Makefile.in: added
2308         * device/lib/pic16/Makefile.common.in: force make to use bash shell
2309         * sim/ucsim/libtool: regenerated on sparc-solaris
2310         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2311           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
2312           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
2313           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
2314           sparc-solaris, which doesn't use GNU ld linker
2315         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
2316         * as/Makefile: find on sparc-solaris does not support -maxdepth option
2317
2318 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
2319
2320         * src/mcs51/peeph.def: updated comments
2321
2322 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2323
2324         * device/lib/_gptrget.c,
2325         * device/lib/_gptrput.c: slightly shorter
2326         * doc/sdccman.lyx: incremented version
2327         * src/mcs51/peeph.def: moved peephole comments to the line of first
2328           change to better keep line correlation, reanimated 186.e
2329         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
2330
2331 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2332
2333         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
2334           David Saxton with quotes around file name.
2335
2336 2005-08-15 Borut Razem <borut.razem AT siol.net>
2337
2338         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
2339           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
2340           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
2341           make tests run on x86_64 platform
2342
2343 2005-08-13 Raphael Neider <rneider AT web.de>
2344
2345         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
2346           as it might be executed DURING a build (parallel make is wonderful)
2347
2348 2005-08-13 Raphael Neider <rneider AT web.de>
2349
2350         * device/lib/Makefile.in (port-specific-objects-pic16):
2351           revert to cp $(PORT)/bin/*.* $(PORTDIR)
2352         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
2353           dependency
2354         * device/lib/pic16/Makefile.rules: build subdirs before creating
2355           the library, removed builddir rule, create $(builddir) early in
2356           recurse rule, use empty recurse rule for leaf directories
2357         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
2358           mkdir errors (race condition), removed duplicate suffix "hex"
2359           from clean rules
2360         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
2361         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
2362           prevents mkdir -p from aborting on Alpha
2363
2364 2005-08-12 Raphael Neider <rneider AT web.de>
2365
2366         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
2367           db-statements in order to allow for arrays of pointers in code
2368           sections to be placed without interspersed 0-padding, fixes
2369           bug #1256215
2370         * (emitStatistics): fixed division by zero for pic18f1220
2371         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
2372           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
2373         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
2374         * (pic16_pCodeConstString): keep track of already emitted string
2375           literals to prevent "duplicate definitions of symbol _str_NR"
2376         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
2377           debug message
2378         * device/lib/Makefile.in: ignore failing PIC16 library builds
2379         * device/lib/pic16/Makefile: do not build if gputils are missing
2380         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
2381
2382 2005-08-10 Raphael Neider <rneider AT web.de>
2383
2384         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
2385           my last commit)
2386
2387 2005-08-10 Raphael Neider <rneider AT web.de>
2388
2389         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
2390           Rokas' patch to add the new fixed point type "__fixed16x16"
2391         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
2392           functions for __fixed16x16 arithmetics
2393         * device/lib/pic16: reimplemented the build system to support
2394           a separate build directory, better handling of libio (create
2395           the library in a separate subdir for each architecture) and
2396           easier configuration (centralized in Makefile.common)
2397
2398 2005-08-07 Raphael Neider <rneider AT web.de>
2399
2400         * src/pic16/gen.c (genrshTwo): fixed sign extension
2401         * src/pic16/device.c: added pic18f2320, 4220 and 4320
2402         * device/include/pic16/pic18f2220.h: changed some bit definitions,
2403           added T0CONbits
2404         * device/include/pic16/pic18f4220.h: NEW, header for
2405           pic18f4220 and pic18f4320
2406         * device/include/pic16/pic18fregs.h: added new devices,
2407           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
2408         * device/include/pic16/signal.h: resolved name clashes
2409           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
2410           to also allow testing for interrupt enable bits, added
2411           comments on how to use the macros
2412         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
2413         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
2414           register definitions for the devices
2415         * device/lib/pic16/pics.all: added new devices
2416         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
2417           allocated memory
2418         * device/lib/pic16/libc/stdlib/memfree: do not count
2419           the block header as free memory
2420         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
2421           simplified and added missing end-of-blocklist-marker
2422           (reported by Peter Onion, fixes #1252814)
2423         * (_mergeHeapBlock): fixed loop condition
2424         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
2425           len==0, restructured code
2426         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
2427           up a bit, reduced bitfield accesses, prevent endless loops
2428           in case of heap corruption
2429         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
2430           "unreferenced arguments/must return a value" warnings
2431         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
2432           replaced BAUDREG with SPBRG
2433         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
2434           device/lib/pic16/debug/gstack/gstack.c: replaced
2435           _naked, _asm, _endasm with __naked, __asm, __endasm
2436
2437 2005-08-05 Raphael Neider <rneider AT web.de>
2438
2439         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
2440           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
2441
2442 2005-08-05 Borut Razem <borut.razem AT siol.net>
2443
2444         * device/lib/Makefile.in: added missing ';'
2445         * configure: removed ^M characters
2446
2447 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2448
2449         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
2450           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
2451           License
2452
2453 2005-08-04 Borut Razem <borut.razem AT siol.net>
2454
2455         * configure.in: pic16 libraries build 2nd try - enable running
2456           configure in device/lib/pic16
2457         * configure: regenerated from configure.in
2458         * device/lib/Makefile.in: create $(PORT)/bin directory
2459
2460 2005-08-03 Raphael Neider <rneider AT web.de>
2461
2462         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
2463           to get/set values via pointers
2464         * (genUnpackBits,genPackBits): changed detection of
2465           ptr->bitfield vs. sym.bitfield, fixed access via generic
2466           pointers, removed dead (wrong) code for multibyte bitfields
2467         * (genNearPointerGet, genGenPointerGet): removed useless code,
2468           fixed bitfield detection, fixes #1250594
2469         * (genNearPointerSet): removed useless code
2470         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
2471           and introduced macro pic16_emitpcode that conditionally emits
2472           the origin of the following pCode (useful for debugging SDCC)
2473         * src/pic16/pcode.c: changed (and disabled) some debug outputs
2474         * (createDefmap): fixed handling of LFSR for --optimize-df
2475
2476 2005-08-02 Borut Razem <borut.razem AT siol.net>
2477
2478         * device/lib/Makefile.in: pic16 libraries build enabled since
2479           gputils-0.13.2 are now localy installed at sourceforge's compile farm
2480
2481 2005-08-02 Raphael Neider <rneider AT web.de>
2482
2483         * src/pic16/gen.c (genPackBits): removed deprecated warning
2484         * (genGenPointerSet): fixed bitfield detection
2485
2486 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2487
2488         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
2489
2490 2005-07-31 Raphael Neider <rneider AT web.de>
2491
2492         * device/lib/pic16/libdev/pic18f458.c,
2493           device/include/pic16/pic18f458.h: added missing T0CONbits
2494
2495 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2496
2497         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
2498
2499 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
2500
2501         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
2502
2503 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2504
2505         * device/include/mcs51/at89c51ed2.h: added.
2506
2507 2005-07-23 Raphael Neider <rneider AT web.de>
2508
2509         * src/pic/gen.h: added emitpcode macro for debugging
2510         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
2511           and replace by macro adding debug information on demand
2512         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
2513         * (gencjne): tried to fix; replaced with correct (slower) code
2514         * (gen{Unp,P}ackBits): fixed single bit access
2515         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
2516         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
2517           previous instruction
2518         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
2519           register has to be handled with care (forbidding movement
2520           of assignments/uses, removing assignments completely, ...)
2521         * (pCodeOptime2pCodes): make use of regIsSpecial
2522         * added lots of debugging output (commented out)
2523         * src/pic/rallloc.c (deassignLRs): prevent operand registers
2524           from being reused as result UNLESS it is known to work
2525
2526 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
2527
2528         * support/Util/dbuf.h: include <stddef.h> for size_t
2529         * .version: changed to version 2.5.2
2530
2531 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2532
2533         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
2534
2535 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2536
2537         * src/hc08/gen.c (genMinus): fixed bug #1241835,
2538           (genModOneByte): removed needless psha/pula
2539
2540 2005-07-22 Raphael Neider <rneider AT web.de>
2541
2542         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
2543           have PIC14 handled like PIC16, fixes broken pic14 linker calls
2544         * src/pic/gen.c (resolveIfx): do not "invent" labels
2545         * (genSkipc): changed to positive logic
2546         * (genSkipCond): removed as no longer needed
2547         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
2548           backport from PIC16
2549         * (genLeftShift): check operands are in different registers
2550         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
2551           INCF does not update CARRY...
2552         * src/pic/main.c: fixed _linkCmd
2553         * src/pic/pcode.c (unlinkpCode): added inactive code
2554         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
2555           alive (do not assign result and operand overlapping registers)
2556
2557 2005-07-22 Raphael Neider <rneider AT web.de>
2558
2559         * src/pic/device.c (dump_sfr): replaced register declaration with
2560           call to emitSymbolToFile() to avoid duplicate symbols
2561         * (assignRelocatableRegisters): do not declare external symbols
2562         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
2563           right (take size of type, not etype)
2564         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
2565         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
2566         * (packRegsForAccUse): disabled assignment of WREG as
2567           the result reg to prevent occurence of just fixed #1235003,
2568           fixes #1242954
2569         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
2570           symbols (avoids duplicate symbols in .asm file)
2571         * (pic14emitRegularMap): use emitSymbolToFile()
2572         * src/pic/gen.c (aopOp): fixed spillLocation handling
2573         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
2574         * (genDataPointerSet): removed unneccessary variables/output
2575
2576 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
2577
2578         * as/mcs51/lkarea.c: enlarged codemap for banked memory
2579         * device/lib/mcs51/crtbank.asm: added # to 0x0F
2580
2581 2005-07-21 Raphael Neider <rneider AT web.de>
2582
2583         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
2584           architecture cannot handle them efficiently, fixes bug #1235003
2585         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
2586           check for empty sets before using them (fixes bug #1232190)
2587
2588 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
2589
2590         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
2591           (lnksect2): generate warnings for memory overlap
2592         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
2593           constseg to set the name of these segments so you can instruct the linker
2594           to place them in banks
2595         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
2596         * src/SDCCglobl.h: added MODEL_HUGE to enum,
2597           added code_seg and const_seg to options
2598         * src/SDCCglue.c (emitMaps): use options.const_seg,
2599           (createInterruptVect): put interrupt vectors in segment HOME,
2600           (glue): put HOME before static segment and put the main glue in HOME,
2601           (glue): use options.code_seg
2602         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
2603         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
2604           these segments so you can instruct the linker to place them in banks
2605           (linkEdit): use code_loc for HOME segment which should be the first
2606           segment in code memory now
2607         * src/SDCCmem.c: fixed more stuff like bug 1238386
2608         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
2609           (changePointer): don't change function pointers to code pointers for
2610           banked functions,
2611           (compareType): added exceptional check for banked function pointers
2612         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
2613         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
2614           after static in code memory
2615         * src/mcs51/gen.c: added aopLiteralLong prototype,
2616           (aopForSym): use getSize for functions,
2617           (genCall): generate banked calls over one trampoline __sdcc_banked_call
2618           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
2619           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
2620           the segment,
2621           (genPcall): use call for literal function pointers and generate banked
2622           calls over the one trampoline so there's only one place for the user to
2623           modify according to his/hers hardware,
2624           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
2625           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
2626         * src/mcs51/main.c: added keyword banked,
2627           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
2628         * support/Util/SDCCerr.c,
2629         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
2630           needed for passing the bank and address to the trampoline
2631         * device/lib/mcs51/crtbank.asm: added for bankswitching
2632         * device/lib/mcs51/Makefile: added crtbank
2633
2634 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2635
2636         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
2637           for fields at offset 0 of a struct or union as reported
2638           on 2005-07-07 in the developer mailing list.
2639
2640 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
2641
2642         * src/SDCCmem.c: fixed bug 1238386
2643
2644 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2645
2646         * src/mcs51/peeph.def: added labelrefcounting for peepholes
2647           (patch #1144962), added peephole 300, enabled 259.x
2648         * doc/sdccman.lyx: removed screenshot and provided link instead
2649
2650 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2651
2652         * doc/sdccman.lyx: added section about debugging with ddd
2653         * doc/figures/ddd_example.eps: screenshot of debugging session
2654
2655 2005-07-04 Raphael Neider <rneider AT web.de>
2656
2657         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
2658           like CODE pointers, fixes #1115683
2659         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
2660           call, fixes bugs #1232211, #1228110,
2661           fixed wrong casts to pCodeFlow from pCodeInstructions
2662
2663 2005-07-04 Raphael Neider <rneider AT web.de>
2664
2665         * src/pic/gen.c (popGet): changed assert to allow for
2666           bit operands
2667         * (popGetAddr): changed signature to provide
2668           an additional index, patched all call sites
2669         * (genCmpEq): handle literal-like operands correctly
2670         * (genAddrOf): added sanity checks on __code/__data pointers
2671         * (genAssign): added handling of symbols from __code section
2672         * (gencjne): do not generate code for comparisons whose result
2673           is neither stored nor used, fixes bug #1171114
2674         * (AccLsh, AccRsh): operate on operand instead of WREG
2675         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
2676           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
2677           by known count
2678         * rewrote complete shift-by-literal logic, commented unused
2679           functions out
2680         * (genConstPointerGet): get multiple bytes (if result size > 1),
2681           fixed handling of non-immediate addresses
2682         * (genPointerGet): handle CODE pointers like CONST pointers
2683         * (genpic14Code): insert C-SRC lines as Cource-pCodes
2684         * ({aop,op}_isLitLike): NEW, single place to decide whether an
2685           operand is to be treated as a literal or not
2686         * (mov2w,genPcall,genCmpEq),
2687           src/pic/genarith.c: use aop_isLitLike() to decide between
2688           literal/register contents
2689         * (addSign): added missing offset
2690         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2691           only emit comment in debug-mode,
2692           use {aop,op}_isLitLike throughout the file
2693         * src/pic/glue.c: fix initializers for pointers (work in progress)
2694         * src/pic/pcode.c (get_op): honor index on _const symbols
2695         * ({reset,dump}pCodeStatistics): NEW, estimate code size
2696         * (dumppBlock): added pCode size estimation
2697         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2698           check for IS_SYMOP before OP_SYMBOL'ing
2699         * fixed indentation, compacted switch-statements
2700         * (allocReg): find free register and allocate it instead of
2701           allocating new registers all the time
2702         * (deassignLRs): prevent POINTER_GET's from being assigned the same
2703           registers as its operands (necessary only for multibyte GETs)
2704
2705 2005-07-01 Raphael Neider <rneider AT web.de>
2706
2707         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2708           debugging .asm-output macros FENTRY + FEXIT
2709         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2710           way... I wonder...
2711         * (emitpComment): NEW, printf to pCode
2712         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2713           offset handling
2714         * (popGetAddr): NEW, variant of popGet to access an immediates
2715           high(er) bytes instead of the n'th byte of memory they reference,
2716           replaced popGet with popGetAddr where neccessary
2717         * (genDataPointerGet): reactivated and fixed implementation
2718         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2719           accesses
2720         * (genDataPointerSet): fixed multibyte assignments
2721         * (genpic14Code): fixed --i-code-in-asm handling
2722         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2723         * (genPlus): fixed index-out-of-bounds error
2724         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2725         * src/pic/ralloc.c: added debugging output macro FENTRY2
2726         * (spillThis): fixed indentation, enbraced for-body for clarity
2727         * (rematStr): commented out as now unused
2728         * (regTypeNum): commented out special spill case (overwrites
2729           arbitrary values)
2730         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2731
2732 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2733
2734         * doc/sdccman.lyx: documented sfr16/sfr32,
2735           added example for using storage class with function pointers
2736         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2737
2738 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2739
2740         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
2741         * device/lib/_itoa.c,
2742         * device/lib/_ltoa.c: optimized codesize
2743         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
2744           but don't know how to suppress the double warning.
2745         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
2746         * support/Util/SDCCerr.c,
2747         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
2748
2749 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
2750
2751         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
2752           fixed old K&R prototypes
2753         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
2754         * device/lib/_gptrget.c,
2755         * device/lib/_gptrgetc.c,
2756         * device/lib/_gptrput.c: changed versions for new memory indicator values,
2757           also new versions for small generic pointers and banked generic pointers
2758         * src/port.h: added const_name
2759         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
2760         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
2761         * src/SDCCcse.c (findPrevIc): check all associative operators
2762         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
2763         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
2764         * src/SDCCmem.c: updated comments,
2765           set far-space to 0 for pdata, results in optimized code
2766         * src/SDCCmem.h: added macro CONST_NAME
2767         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
2768           moving the info into the highest bits, see also gptrget/gptrput
2769         * src/src.dsp: added sdcc.ico to project files
2770         * src/avr/gen.c (genCast): fixed bug 0x%d
2771         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
2772         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
2773           relation between ptr_type and DCL_TYPE,
2774           (genCast): fixed bug 0x%d
2775         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
2776           (CODE)" for const_name
2777         * src/hc08/gen.c (genCast): fixed bug 0x%d
2778         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
2779           (hc08_port): added "CONST (CODE)" for const_name
2780         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2781           (aopForRemat, adjustArithmeticResult): disconnected direct relation
2782           between ptr_type and DCL_TYPE,
2783           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2784           operand* and took AOP() inside function so sfr-ness can be checked,
2785           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2786           new prototype,
2787           (genFunction, genEndFunction): optimized stack setup,
2788           (genMinus): optimized for literals with ending zeroes (in bytes),
2789           (genCast): fixed bug 0x%d
2790         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2791           (mcs51_port): added "CONST (CODE)" for const_name
2792         * src/mcs51/peeph.def: made rule 226 more generic
2793         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2794         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2795         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2796         * src/z80/main.c (z80_port): added NULL for const_name,
2797           (gbz80_port): added NULL for const_name
2798         * support/regression/tests/bug663539.c,
2799         * support/regression/tests/sfr16.c: new tests
2800
2801 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2802
2803         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2804
2805 2005-06-24 Raphael Neider <rneider AT web.de>
2806
2807         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2808           corrected typos...
2809         * device/include/pic16/signal.h: added USBIF
2810           and SIG_USB
2811
2812 2005-06-24 Raphael Neider <rneider AT web.de>
2813
2814         * device/lib/pic16/libdev/pic18f2455.c,
2815           device/include/pic16/pic18f2455.h: NEW
2816         * device/include/pic16/pic18fregs.h,
2817           device/lib/pic16/pics.all,
2818           src/pic16/device.c: added 18f2455
2819         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2820           device/include/pic16/{pic18f[68][567].h,usart.h}:
2821           replaced MULTIPLE_USARTS define with more relaible
2822           compatibility sfrs (for USART access)
2823
2824 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2825
2826         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2827           and the output asm file line is printed on two lines.
2828
2829 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2830
2831         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2832           BGT, BLE, BHI, and BLS instructions
2833         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2834           genCmpEq): removed
2835         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2836           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2837           fixes bug #1216342
2838         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2839
2840 2005-06-15 Raphael Neider <rneider AT web.de>
2841
2842         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2843         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2844         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2845           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2846           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2847
2848 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2849
2850         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2851           Marcel Telka in bug #1215704
2852
2853 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2854
2855         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2856           located in shared memory bank.
2857
2858 2005-05-31 Raphael Neider <rneider AT web.de>
2859
2860         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2861           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2862           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2863
2864 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2865
2866         * device/lib/_strncpy.c: fixed the fix
2867
2868 2005-05-26 Raphael Neider <rneider AT web.de>
2869
2870         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2871           initializers with \0, bug #1208187
2872         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2873           intializers with \0, bug #1208187
2874
2875 2005-05-26 Raphael Neider <rneider AT web.de>
2876
2877         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2878           initializers with \0, bug #1208187
2879         * src/pic16/main.c (_process_pragma): added sanity checks
2880           for stack position and size, emit warnings when appropriate
2881
2882 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2883
2884         * device/lib/_strncpy.c: fixed not filling with \0
2885
2886 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2887
2888         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2889           createFunction),
2890         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2891           compound_statement),
2892         * src/SDCCsymt.h,
2893         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2894
2895 2005-05-24 Raphael Neider <rneider AT web.de>
2896
2897         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2898
2899 2005-05-24 Raphael Neider <rneider AT web.de>
2900
2901         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2902           TRISE definitions, closes bug #1162453
2903
2904 2005-05-22 Raphael Neider <rneider AT web.de>
2905
2906         * src/pic16/main.c (_process_pragma): check for missing
2907           arguments to pragmas code and udata
2908         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2909           consistency fixes to match other headers (thanks to Jim Paris)
2910         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2911
2912 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2913
2914         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2915
2916 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2917
2918         * support/regression/tests/bug1198642.c: new test
2919         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2920         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2921         * support/scripts/resource.h,
2922         * support/scripts/resource.rc,
2923         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2924         * support/scripts/sdcc.ico: added 32x32 icon
2925
2926 2005-05-18 Raphael Neider <rneider AT web.de>
2927
2928         * device/lib/pic16/libdev/pic18f*.c,
2929         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2930           keywords to "__sfr" and "__at (X)"
2931         * device/include/pic16/pic18fregs.h: added pic18f4520
2932         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2933           #1203088 (MPLAB compatibility)
2934
2935 2005-05-17 Raphael Neider <rneider AT web.de>
2936
2937         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2938         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2939         * device/lib/pic16/pics.all: added new devices
2940         * src/pic16/device.c: added support for pic18f4520
2941
2942 2005-05-16 Raphael Neider <rneider AT web.de>
2943         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2944         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2945         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2946           convenience function for bit access
2947
2948 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2949
2950         * device/lib/printf_large.c: fixed bug 1193299
2951         * support/regression/tests/bug1057979.c: added test %3.3s
2952
2953 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2954
2955         * device/include/mcs51/8051.h,
2956         * device/include/mcs51/8052.h: made parseable with lint
2957         * device/include/mcs51/lint.h: added include file for (sp)lint
2958         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2959         * doc/cdbfileformat.lyx,
2960         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2961
2962 2005-05-14 Raphael Neider <rneider AT web.de>
2963
2964         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2965         * device/lib/pic16/libc/stdlib/itoa.c (new)
2966         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2967         * device/lib/pic16/libio/Makefile: exclude subdir according to
2968           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2969         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2970         * src/pic16/gen.c (genFunction): prevent annoying warning
2971         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2972           nameclashes on BeOS
2973         * support/cpp2/cppmain.c (cpp_output_string): new
2974         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2975           fixes bug 1116802
2976
2977 2005-05-13 Borut Razem <borut.razem AT siol.net>
2978
2979         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2980
2981 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2982
2983         * .version: changed to version 2.5.1; back to bleeding edge development
2984
2985 2005-05-11 Borut Razem <borut.razem AT siol.net>
2986
2987         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2988           generate PDF version 1.3 documents
2989
2990 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2991
2992         * .version: changed to version 2.5.0
2993
2994 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2995
2996         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2997
2998 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2999
3000         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
3001         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
3002         well as many smaller updates.
3003         * .version: changed to version 2.5.0-pre1
3004
3005 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3006
3007         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
3008
3009 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
3010
3011         * support/regression/tests/bug1185672.c: added
3012         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
3013           bug 1185672
3014         * src/mcs51/gen.c (genCall): added comments, made it look safer
3015         * src/mcs51/gen.c (genEndFunction): simplified
3016
3017 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
3018
3019         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
3020
3021 2005-04-14 Borut Razem <borut.razem AT siol.net>
3022
3023         * fixed bug 1045046 - SIGSEGV with really simple code?:
3024           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
3025           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
3026
3027 2005-04-14 Borut Razem <borut.razem AT siol.net>
3028
3029         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
3030           src/pic16/device.h: temporarily disabled experimental #inline pragma
3031           for 2.5.0 release
3032
3033 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
3034
3035         * device/include/z80/stdio.h,
3036         * device/include/z80/string.h: removed these highly incomplete files so
3037           SDCC can use the default ones in device/include/
3038
3039 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3040
3041         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
3042         gcc warning.
3043         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
3044         fix sdcpp warnings.
3045
3046 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3047
3048         * device/include/malloc.h: removed redundant __reentrant prototypes
3049         * device/lib/_mullong.c: added working xstack variant in asm (C version
3050           doesn't pass regression tests)
3051         * device/lib/bpx.c: used __data and made bpx char for mcs51
3052         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
3053           (createFunction): fixed bug with xstackPtr
3054         * src/SDCCcse.c: corrected comments
3055         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
3056           (killDeadCode, eBBlockFromiCode): removed unused code
3057         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
3058           corrected comments
3059         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
3060           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
3061           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
3062           (genModOneByte): fixed warning in MSVC
3063         * src/mcs51/main.c (): added comments
3064         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
3065
3066 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3067
3068         * src/SDCCmain.c (linkEdit): oops, changed one line too many
3069
3070 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
3071
3072         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
3073
3074 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
3075
3076         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
3077         characters arrays of larger size than the declared one.
3078
3079 2005-04-10 Borut Razem <borut.razem AT siol.net>
3080
3081         * src/pic/gen.c (genInline),
3082           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
3083           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
3084           (findNextInstruction), (findPrevInstruction),
3085           (findInstructionUsingLabel),
3086           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
3087         * src/pic/pcode.c (findLabel): added missing '\n'
3088         * src/src.dsp: added SDCCdwarf2.c to the project
3089
3090 2005-04-09 Borut Razem <borut.razem AT siol.net>
3091
3092         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
3093
3094 2005-04-08 Raphael Neider <rneider AT web.de>
3095
3096         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
3097           into the chain after a given one) and mergeDefmapSymbols (combine
3098           defmap entries for each symbol per pcode)
3099         * (createDefmap): have defmap entries merged in the end
3100         * (defmapReplaceSymRef): split defmap entries covering two accesses to
3101           a symbol before replacing one access type's symbol, merge symbols in
3102           the end (replacement symbol might already have an entry)
3103         * (assignValnums): keep reference to written WREG intact
3104
3105 2005-04-08 Raphael Neider <rneider AT web.de>
3106
3107         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
3108           Alpha)
3109
3110 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
3111
3112         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
3113         bytes
3114
3115 2005-04-07 Raphael Neider <rneider AT web.de>
3116
3117         * device/include/pic16/usart.h: added compatibility defines for
3118           devices with more than one USART
3119         * device/include/pic16/pic18f[68][567]20.h: activated above defines
3120
3121 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3122
3123         * device/lib/Makefile.in: updated for port specific include
3124
3125 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3126
3127         * support/regression/ports/mcs51/spec.mk: added mcs51 include
3128
3129 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3130
3131         * device/include/8051.h,
3132         * device/include/8052.h,
3133         * device/include/at89S8252.h,
3134         * device/include/at89c55.h,
3135         * device/include/at89x051.h,
3136         * device/include/at89x51.h,
3137         * device/include/at89x52.h,
3138         * device/include/mcs51reg.h,
3139         * device/include/reg51.h,
3140         * device/include/reg764.h,
3141         * device/include/regc515c.h,
3142         * device/include/sab80515.h: (re)moved these 12 files
3143         * device/include/mcs51/8051.h,
3144         * device/include/mcs51/8052.h,
3145         * device/include/mcs51/at89S8252.h,
3146         * device/include/mcs51/at89c55.h,
3147         * device/include/mcs51/at89x051.h,
3148         * device/include/mcs51/at89x51.h,
3149         * device/include/mcs51/at89x52.h,
3150         * device/include/mcs51/mcs51reg.h,
3151         * device/include/mcs51/reg51.h,
3152         * device/include/mcs51/reg764.h,
3153         * device/include/mcs51/regc515c.h,
3154         * device/include/mcs51/sab80515.h: and added them here
3155
3156 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
3157
3158         * device/include/stdarg.h: changed SDCC specific keywords to double
3159           underlined form.
3160         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
3161           mcs51 and ds390.
3162         * device/include/hc08/mc68hc908gp32.h,
3163         * device/include/hc08/mc68hc908jb8.h,
3164         * device/include/hc08/mc68hc908jkjl.h,
3165         * device/include/hc08/mc68hc908qy.h: fixed comments
3166         * device/include/mcs51/README: updated
3167         * device/include/mcs51/c8051f120.h: added PINRSF
3168         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
3169         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
3170           amidst code. Also inline is not supported.
3171
3172 2005-04-06 Raphael Neider <rneider AT web.de>
3173
3174         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
3175         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
3176           callers stack/frame pointers
3177
3178 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
3179
3180         * device/include/pic16/usart.h: added, missing in previous commit,
3181         * device/include/pic16/adc.h: fixed typo,
3182         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
3183         commit,
3184         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
3185         <p18fxxx.inc>
3186         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
3187         uninitialized because a bug appears with gplink
3188         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
3189         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
3190         complains for unrecognised option
3191
3192 2005-04-05 Raphael Neider <rneider AT web.de>
3193
3194         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
3195           structs as well (using memcpy)
3196         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
3197           on ISRs (GOTO has no label)
3198         * src/pic16/device.h: added OF_OPTIMIZE_DF
3199         * src/pic16/main.c: added compiler switch --optimize-df to enable the
3200           new data flow analysis/optimization
3201         * src/pic16/pcode.c: added (prototypes for and implementation of)
3202           dataflow analysis functions, fixed pCodeInstructions' inCond and
3203           outCond values, made RCALL a branch instruction
3204         * (pic16_unlinkpCode): keep C line if possible
3205         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
3206           C line moved if possible
3207         * (pic16_getRegFrompCodeOp): NEW, improved version of...
3208         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
3209           to use new pic16_getRegFrompCodeOp (works for more SFRs)
3210         * (pic16_BuildFlow): fixed skip instructions with label (did not start
3211           new flow)
3212         * (pic16_getJumptabpCode): NEW, needed in...
3213         * (LinkFlow): fixed handling of jumptables, calls and conditional
3214           branches
3215         * (pic16_InsertCommentAfter): NEW
3216         * (pic16_pCodeReplace): made verbose and flow preserving
3217         * (AnalyzeFlow): added call to data flow analysis
3218         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
3219         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
3220         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
3221
3222 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3223
3224         * src/SDCCast.c (decorateType): fixed bug #1105626
3225
3226 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
3227
3228         * device/include/asm/pic16/features.h,
3229         * pic18f*.h headers,
3230         * device/include/pic16/adc.h,
3231         * device/include/pic16/delay.h,
3232         * device/include/pic16/i2c.h,
3233         * device/include/pic16/malloc.h,
3234         * device/include/pic16/stdio.h,
3235         * device/include/pic16/stdlib.h,
3236         * device/include/pic16/string.h,
3237         * device/lib/pic16/libc/stdio/printf_tiny.c,
3238         * device/lib/pic16/libc/stdio/printf_small.c,
3239         * device/lib/pic16/libc/stdio/strmgpsim.c,
3240         * device/lib/pic16/libc/stdio/strmmssp.c,
3241         * device/lib/pic16/libc/stdio/strmusart.c,
3242         * device/lib/pic16/libc/stdio/vfprintf.c,
3243         * device/lib/pic16/libc/stdlib/ltoa.c,
3244         * device/lib/pic16/libc/stdlib/putchar.c,
3245         * device/lib/pic16/libc/stdlib/x_ftoa.c,
3246         * device/lib/pic16/libc/stdlib/memchrpgm.c,
3247         * device/lib/pic16/libc/stdlib/memchrram.c,
3248         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
3249         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
3250         * device/lib/pic16/libio/adc/adcbusy.c,
3251         * device/lib/pic16/libio/adc/adcread.c,
3252         * device/lib/pic16/libio/adc/adcsetch.c,
3253         * device/lib/pic16/libio/usart/ubaud.c,
3254         * device/lib/pic16/libio/usart/ubusy.c,
3255         * device/lib/pic16/libio/usart/udrdy.c,
3256         * device/lib/pic16/libio/usart/uopen.c,
3257         * device/lib/pic16/libio/usart/uputc.c,
3258         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
3259         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
3260         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
3261         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
3262         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
3263         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3264         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3265         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3266         specific keywords to double underlined form,
3267         * device/lib/pic16/libc/Makefile.rules,
3268         * device/lib/pic16/libsdcc/Makefile.rules,
3269         * device/lib/pic16/libm/Makefile,
3270         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3271         to compile with C standard set in Makefile.common
3272         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3273         rand.c and crc.c in compilation process,
3274         * device/lib/pic16/libsdcc/int/divuint.c,
3275         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3276         `c' from signed to unsigned,
3277         * device/lib/pic16/startup/crt0.c,
3278         * device/lib/pic16/startup/crt0i.c,
3279         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3280         keywords to double underlined form, bug fixes in _do_cinit function
3281         which prevented the correct initialization of the .idata segment,
3282         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3283         core to enter a infinite loop
3284         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3285
3286 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3287
3288         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3289
3290 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3291
3292         * device/include/Makefile.in: add support for hc08 subdirectory
3293         * device/include/hc08/: new subdirectory
3294         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3295         Lucas Loizaga, thanks!
3296         * device/include/hc08/mc68hc908qy.h,
3297         * device/include/hc08/mc68hc908gp32.h,
3298         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3299         their own directory. Changed internal macro names to use the compiler
3300         reserved namespace. Changed SDCC specific keywords to double
3301         underlined form.
3302         * device/include/math.h,
3303         * device/include/malloc.h,
3304         * device/include/stdarg.h,
3305         * device/include/stdbool.h
3306         * device/include/string.h,
3307         * device/include/tinibios.h,
3308         * device/include/ds400rom.h,
3309         * device/include/8051.h,
3310         * device/include/8052.h,
3311         * device/include/80c51xa.h,
3312         * device/include/at89c55.h,
3313         * device/include/at89S8252.h,
3314         * device/include/at89x51.h,
3315         * device/include/at89x52.h,
3316         * device/include/ds80c390.h,
3317         * device/include/reg764.h,
3318         * device/include/regc515c.h,
3319         * device/include/sab80515.h,
3320         * device/include/mcs51/c8051f000.h,
3321         * device/include/mcs51/c8051f018.h,
3322         * device/include/mcs51/c8051f020.h,
3323         * device/include/mcs51/c8051f040.h,
3324         * device/include/mcs51/c8051f060.h,
3325         * device/include/mcs51/c8051f120.h,
3326         * device/include/mcs51/c8051f300.h,
3327         * device/include/mcs51/c8051f310.h,
3328         * device/include/mcs51/c8051f320.h,
3329         * device/include/mcs51/c8051f330.h,
3330         * device/include/mcs51/c8051f350.h,
3331         * device/include/z180.h: Changed SDCC specific keywords to double
3332         underlined form.
3333
3334 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
3335
3336         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
3337         18F4455,
3338         * (pic16_assignConfigWordValue): disable testing of configuration
3339         register value with config mask,
3340         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
3341         function with port->fun_prefix,
3342         * (genFunction): when generating a naked interrupt function never
3343         create an absolute segment placed in interrupt vector address, place
3344         the actual interrupt function at IVA instead, when an interrupt
3345         function is generated with unspecified interrupt then do not create
3346         the absolute section,
3347         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
3348         code for generating a call to generic pointer get/put function with
3349         a call to function pic16_callGenericPointer(),
3350         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
3351         the call to the generic pointer get/put functions with prefixing the
3352         function name with port->fun_prefix,
3353         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
3354         * src/pic16/main.c (_process_pragma): prefix function with
3355         port->fun_prefix,
3356         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
3357         calling assembler, old 18Fxxxx macro is deprecated,
3358         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
3359         PC_ASMDIR in while condition,
3360         * (findInstruction): add PC_ASMDIR in while condition,
3361         * (buildCallTree): prefix main with port->fun_prefix,
3362         * (pic16_pCode2str): fixed bug that didn't emit the memory access
3363         identifier for variable with banked access in instructions BTFSS,
3364         BTFSC, BCF, BSF, BTG
3365         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
3366         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
3367         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
3368         perform optimization when enviroment variable NO_REG_OPT is set,
3369         * (insideLRBlock): NEW, return 1 if register is inside an
3370         INF_LOCALREGS block,
3371         * (RemoveRegFromLRBlock): remove a register that is completely
3372         eliminated by register optimization, but it is still left in local
3373         register store/restore in/from stack block,
3374         * (Remove2pcodes): after removing register, check to see if it
3375         should be removed from local register store/restore in/from stack
3376         block,
3377         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
3378         DUMMY_READ_VOLATILE,
3379
3380         * device/include/pic16/adc.h: minor prototype modifications and
3381         update,
3382         * device/include/pic16/malloc.h: added GPL notice various
3383         modifications,
3384         * device/include/pic16/stdint.h: NEW, standard header for ints
3385         * device/include/pic16/delay.h: NEW, header for delay functions,
3386         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
3387         delay1mtcy,
3388         * device/include/pic16/signal.h: NEW, header providing helper macros
3389         for implementing signal handlers,
3390         * device/include/pic16/stdio.h: added prototypes for functions,
3391         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
3392         prototypes for stdin and stdout, added macro PUTCHAR to
3393         automatically implement putchar function prototype,
3394         * device/include/pic16/usart.h: modified and updated USART library,
3395         * device/lib/pic16/libio/adc/,
3396         * device/lib/pic16/libio/i2c: some modifications to improve library
3397         performance,
3398         * device/lib/pic16/libc/stdio/: modifications for the new printf*
3399         family of functions,
3400         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
3401         family of functions and other sources,
3402         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
3403         of the PIC18Fxx[28] devices,
3404         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
3405         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
3406         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
3407         _do_cinit function, because the previous failed when local variables
3408         where not placed in the same memory bank,
3409         * device/lib/pic16/libsdcc/char/: various modifications to improve
3410         library performance,
3411         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
3412         information on the new functions of the c library and more...
3413
3414 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3415
3416         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
3417
3418 2005-03-26 Raphael Neider <rneider AT web.de>
3419
3420         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
3421           if condition == CARRY)
3422         * (genCmp): adapted to new genSkipc semantics
3423         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
3424           on rIfx (genCmp was broken)
3425
3426 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3427
3428         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
3429         * src/z80/main.c (_keywords[]),
3430         * src/SDCCglobal.h (struct options),
3431         * src/SDCC.y,
3432         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
3433         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
3434         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
3435         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
3436         always available in leading double underscore form. The C99 support is
3437         mostly missing, but it's a start.
3438         * support/regression/tests/bug-227710.c: fixed nonconforming use of
3439         reserved identifier "__data".
3440
3441 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
3442
3443         * src/mcs51/peeph.def: fixed bug 1170013
3444
3445 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
3446
3447         * device/include/mcs51reg.h: fixed bug 842007
3448
3449 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3450
3451         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
3452         last time.
3453
3454 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3455
3456         * src/port.h (struct PORT),
3457         * src/avr/ralloc.c (avr_assignRegisters),
3458         * src/avr/main.c,
3459         * src/ds390/ralloc.c (ds390_assignRegisters),
3460         * src/ds390/main.c,
3461         * src/hc08/ralloc.c (hc08_assignRegisters),
3462         * src/hc08/main.c,
3463         * src/mcs51/ralloc.c (mcs51_assignRegisters),
3464         * src/mcs51/main.c,
3465         * src/pic/ralloc.c (pic14_assignRegisters),
3466         * src/pic/main.c,
3467         * src/pic16/ralloc.c (pic16_assignRegisters),
3468         * src/pic16/main.c,
3469         * src/xa51/ralloc.c (xa51_assignRegisters),
3470         * src/xa51/main.c,
3471         * src/z80/ralloc.c (z80_assignRegisters),
3472         * src/z80/ralloc.h,
3473         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
3474         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
3475         * src/SDCCcse.h,
3476         * src/SDCCdflow.c (computeDataFlow),
3477         * src/SDCCdflow.h,
3478         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
3479         * src/SDCCloop.h,
3480         * src/SDCCcflow.c (*),
3481         * src/SDCCcflow.h,
3482         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
3483         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
3484         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
3485         immedDom() returning wrong block; probably fixes bug #1160833)
3486
3487 2005-03-20 Borut Razem <borut.razem AT siol.net>
3488
3489         * support/scripts/inc2h.pl: WIN32 port
3490
3491 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
3492
3493         * device/lib/makefile.in: added abs.c and labs.c
3494
3495 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
3496
3497         * device/include/stdint.h: added
3498         * device/lib/abs.c: added
3499         * device/lib/labs.c: added
3500         * device/include/stdlib.h: added abs() and labs() prototypes
3501         * device/lib/libsdcc.lib: added abs and labs
3502         * device/include/float.h,
3503         * device/lib/_fsmul.c,
3504         * device/lib/printf_fast.c,
3505         * device/lib/printf_tiny.c: updated comments
3506
3507 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3508
3509         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
3510         bug #1164313
3511
3512 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3513
3514         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
3515         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
3516
3517 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
3518
3519         * device/lib/printf_large.c: removed inline assembly for portability and
3520           readability. Use printf_fast if speed or size are more important.
3521         * src/pic16/gen.c: removed conditions around use of DEBUGpc
3522         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
3523
3524 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
3525
3526         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
3527         prevent compiler warning
3528
3529 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
3530
3531         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
3532         moved to level 0 and declared as static. Also they are explicit
3533         placed in access bank. This was necessery because some times they
3534         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
3535         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
3536         optimizations. Currently only compare to unsigned char is implemented,
3537         * src/pic16/gen.c: added fReturnIdx array,
3538         * (struct resolvedIfx) is moved to gen.h and made public,
3539         * (struct _G): added sregsAlloc and sregsAllocSet fields,
3540         * (aopForSym): added an optimization to directly store in stack of
3541         the operand of a SEND iCode,
3542         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
3543         but as registers instead (AOP_REG) using the fReturnIdx array,
3544         * (pic16_freeAsmop): remove the freed register from the
3545         _G.sregsAlloc field,
3546         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
3547         a compare of 'WREG',
3548         * (pic16_popGetTempRegCond): changed function prototype, now
3549         function takes also a bitVector argument v which holds the current
3550         set of registers that are allocated for stack access by aopForSym,
3551         registers allocated in aopForSym for accessing stack symbols are not
3552         any more part of the functions usedRegs field,
3553         * (genCall): some times aopOp is called for a stack variable to be
3554         send, aopForSym might perform the push, if this is true make sure
3555         that genCall doesn't push the variable twice by testing _G.resDirect,
3556         * (genFunction): changed testing for unspecified interrupt number
3557         from 256 to INTNO_UNSPEC,
3558         * modified selection scheme of frame pointer generation. Previously
3559         if function did use local registers a frame pointer was generated,
3560         now a frame pointer is generated only if function has arguments
3561         (that need PLUSW2 register access), or has stack arguments, or the
3562         compiler is not instructed to omit the frame pointer,
3563         * (genEndFunction): before restoring local registers that were saved
3564         in the function preamble, also restore the registers that *might*
3565         have been allocated for stack access,
3566         * (genRet): removed some old comments,
3567         * (genCmp, the active (RN's) version): added a call to the
3568         pic16_genCmp_special function to perform the compare with a more
3569         robust and optimized way,
3570         * (genInline): a feature has been added in inline code generation,
3571         which allows a wildcard variable substitution when writing inline
3572         assembly. Code is incomplete and experimental therefore undocumented,
3573         * (genCast): changed order of aopOp for result and right to allow
3574         aopForSym to directly load the result if possible,
3575         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
3576         perform an optimized compare on some selected special occasions,
3577         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
3578         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
3579         generate an IVT any more,
3580         * src/pic16/main.c (pic16_optionsTable): added command line option
3581         --optimize-cmp,
3582         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
3583         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
3584         macros,
3585         * src/pic16/NOTES: Raphael Neider added in list of active developers
3586         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
3587         jumptable_end to prevent bug #,
3588         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
3589         inCond and outCond fields,
3590         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
3591         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
3592         turn off register spilling,
3593         * (packRegsForOneUse): synced with other ports' versions although it
3594         is not used currently,
3595         * (pic16_packRegisters): added an optimization while reading
3596         structure bitfields, some registers may be saved (malloc code is
3597         decreased by 80 bytes)
3598
3599 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
3600
3601         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
3602         left is a bitfield, if yes, then don't optimize assignment. Perhaps
3603         this can be optimized more?
3604
3605 2005-03-10 Raphael Neider <rneider AT web.de>
3606
3607         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
3608           genNearPointerGet): (hopefully) fixed access to bitfields via
3609           pointers (p->bitN = x; and x = p->bitN; failed)
3610
3611 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
3612
3613         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
3614
3615 2005-03-09 Raphael Neider <rneider AT web.de>
3616
3617         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
3618
3619 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
3620
3621         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
3622         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
3623           (regTypeNum): set REG_BIT type if necessary
3624         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
3625         * support/regression/tests/critical.c: check bug 1144613
3626
3627 2005-03-02 Raphael Neider <rneider AT web.de>
3628
3629         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
3630
3631 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3632
3633         * src/avr/ralloc.c (serialRegAssign),
3634         * src/ds390/ralloc.c (serialRegAssign),
3635         * src/hc08/ralloc.c (serialRegAssign),
3636         * src/mcs51/ralloc.c (serialRegAssign),
3637         * src/pic/ralloc.c (serialRegAssign),
3638         * src/pic16/ralloc.c (serialRegAssign),
3639         * src/xa51/ralloc.c (serialRegAssign),
3640         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
3641
3642 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
3643
3644         * src/SDCCast.c (decorateType): fixed bug 1124787
3645
3646 2005-02-20 Hubert Sack <sack AT digiplan.de>
3647         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3648
3649         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
3650         patch #1121755
3651
3652 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3653
3654         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
3655         to keep the correct label reference count when adding/removing references
3656         to labels. A peephole file using this is appended to patch #1144962.
3657
3658 2005-02-14 Raphael Neider <rneider AT web.de>
3659
3660         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
3661         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
3662         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
3663           retrievals of result operand's value on assignment
3664
3665 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
3666
3667         * device/include/pic16/string.h: modified prototype for memccpy()
3668         to memccpy(void *, void *, char, size_t)
3669         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
3670         check whether to omit frame pointer or not,
3671         * (genInline): convert all occurences of "\n" to LF in inline
3672         assembler blocks, this helps formatting the inline text,
3673         * (pic16_loadFSR0): modified prototype,
3674         * (genNearPointerGet, genNearPointerSet): reorganization of code,
3675         removed some 8051 legacy code,
3676         * (genPackBits): enabled handling bitfields exceeding one byte in size,
3677         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
3678         before allocating temporary registers in functions,
3679
3680 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3681
3682         * support/regression/tests/bitvars.c: corrected the "fix"
3683
3684 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3685
3686         * support/regression/tests/bitvars.c,
3687         * support/regression/tests/bitwise.c,
3688         * support/regression/tests/rotate.c: "fixed" problems on Alpha
3689
3690 2005-02-10 Raphael Neider <rneider AT web.de>
3691
3692         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3693           different size for Alpha
3694         * src/pic16/gen.c (genCmpEq) : improved compare with 0
3695
3696 2005-02-09 Raphael Neider <rneider AT web.de>
3697
3698         * src/SDCC.lex(doPragma) : save and restore warning options as well
3699           (also added new stack plus clone- and copyAndFreeSDCCERRG())
3700         * have #pragma less_pedantic set the errorlevel to WARNING
3701           (fixes #1117001)
3702         * (cloneOptimize) : fixed wrong malloc's size
3703         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3704           facilitate correct handling of #pragma (save|restore)
3705
3706 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3707
3708         * src/mcs51/gen.c: removed non-standard C nameless struct/union
3709
3710 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3711
3712         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3713
3714 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3715
3716         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3717
3718 2005-02-02 Raphael Neider <rneider AT web.de>
3719
3720         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3721         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3722         * (pic16_storeForReturn): fixed to allow returning function pointers
3723         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3724         * device/include/pic16/{stddef.h,stdbool.h}: added
3725
3726 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3727
3728         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3729
3730 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3731
3732         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3733         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3734          appeared to be required
3735
3736 2005-01-31 Borut Razem <borut.razem AT siol.net>
3737
3738         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3739           include/mcs51 and include/z80 directories to the package
3740
3741 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3742
3743         * src/hc08/gen.c (genFunction): fixed bug #1112752
3744
3745 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3746
3747         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
3748
3749 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3750
3751         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
3752
3753 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
3754
3755         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
3756
3757 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
3758
3759         * device/include/c8051fxxx.h: removed these 6 files
3760         * device/include/mcs51/c8051fxxx.h: added these 11 new files
3761
3762 2005-01-26 Raphael Neider <rneider AT web.de>
3763
3764         * src/pic16/gen.c (genAssign): fixed assignment from longs
3765           in codespace (were cut to three bytes)
3766         * (genDummyRead): implemented (except for CODESPACE...),
3767           fixed bug #1108575
3768         * src/pic16/glue.c (emitStatistics): beautified
3769         * device/lib/pic16/libm/Makefile: added include path
3770
3771 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3772
3773         * src/z80/gen.c (aopPut): fixed bug #1103902
3774
3775 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3776
3777         * device/lib/expf.c: fixed bug #1095792
3778
3779 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3780
3781         * device/lib/pic16/libm: added Math library sources
3782
3783 2005-01-24 Raphael Neider <rneider AT web.de>
3784
3785         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3786           to enable upcast to pCodeOpReg2 (there is no type tag to
3787           differenciate the two and pic16_popGet2p cast into PCOR2)
3788         * src/pic16/main.c (_process_pragma): fixed another malloc bug
3789           (sizeof(sectNames) changed to sizeof(sectName))
3790           Both patches fix segfaults under MinGW.
3791
3792 2005-01-23 Raphael Neider <rneider AT web.de>
3793
3794         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3795           Safe_[mc]?alloc()'ed variables
3796         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3797           of (byte sized) temporaries (assign them to WREG for now)
3798         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3799           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3800           this might fix SIGSEGVs on MinGW...
3801         * src/SDCCopt.c (killDeadCode): restored original behaviour
3802           (volatile operands might get thrown away though)
3803
3804 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3805
3806         * src/pic16/gen.c: fixed bug #1106975,
3807         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3808         pointer update, INTCON is saved, global interrupts are disabled and
3809         restored after updateing TOS.
3810         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3811         * added function attribute 'shadowregs' to take advantage of shadow
3812         registers,
3813         * added function attribute 'wparam' as an alternative to the wparam
3814         pragma,
3815         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3816         user declares a non-ISR function as 'shadowregs',
3817         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3818
3819 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3820
3821         * .version: bumped version number to 2.4.8
3822         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3823         pic16 port,
3824         * device/lib/pic16/libio/i2c/: I2C module support library,
3825         * device/include/pic16/i2c.h: I2C support library header,
3826         * device/lib/pic16/libc/stdio/: standard IO support sources,
3827         * (printf_small.c): printf_small() source, supports float print,
3828         * (printf_tiny.c): printf_tiny() source, does not support floats,
3829         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3830         enable global optimizations for entire library source, other
3831         Makefiles in the source tree are also modified to reflect this,
3832         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3833         function,
3834         * doc/sdccman.lyx: updated to reflect new changes,
3835         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3836         sym->onStack if-case,
3837         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3838         sbit, idata, _idata, xdata, _xdata,
3839         * added pragma library, to link an external library, (see doc),
3840         * removed command line options, --pomit-config-words, --pomit-ivt,
3841         --pleave-reset-vector,
3842         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3843         when calling assembler to reflect memory model used, also define
3844         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3845         reflect stack model used,
3846         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3847         on stack return NULL,
3848
3849 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3850
3851         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3852           of the operands is volatile. Fixes #1020220
3853
3854 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3855
3856         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3857         * (OptimizeRegUsage): make sure that there is really no other flow where
3858           the first pCode is used
3859
3860 2005-01-22 Raphael Neider <rneider AT web.de>
3861
3862         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3863           to fix #1106967 (pCode->seq are not set up correctly)
3864
3865 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3866
3867         * src/SDCCglue.c (glue): make sure code area is declared before the
3868         static initialization area.
3869
3870 2005-01-21 Raphael Neider <rneider AT web.de>
3871
3872         * device/lib/Makefile.in: fixed test for pic16 install dir
3873         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3874           optimizations
3875         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3876           added --optimize-goto compiler switch and pragma wparam documentation
3877         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3878         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3879           and PRODH closing bug #1071770 (peephole optimizer)
3880
3881 2005-01-19 Raphael Neider <rneider AT web.de>
3882
3883         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3884           cmdLine buffers (used when calling sdcpp...) are large enough
3885           (MAX_PATH=256 truncates arguments leading to system halts when
3886           used in MinGW...)
3887         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3888         * (genUminus): rewritten to for efficiency
3889         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3890           used uninitialized in some cases)
3891         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3892           copy the third byte from the int -- now assumes 0x80 (data memory)
3893         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3894           operands (genAddLit expects the iCode's operands to swapped as
3895           well), fixed leftover bytes (crashed for short left operands)
3896         * (pic16_genMinusDec): performance improvements, removed false
3897           PIC14 emitSKPNCs
3898         * (pic16_genMinus): fixed to cope with differently sized operands
3899         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3900           for --obanksel > 1
3901         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3902         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3903           new banksel optimization
3904         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3905           analysis for temporary registers (segfaults...)
3906         * src/pic16/peeph.def: added rule
3907
3908 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3909
3910         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3911         which converts a float number to its ASCII representation
3912         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3913         functions to convert the fractional and integer part of a float to ASCII,
3914         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3915         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3916         ram
3917         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3918         _STATMEM macros,
3919         * device/include/pic16/adc.h: added GPL info,
3920         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3921         a pCodeOp as tested operand,
3922         * (genNearPointerGet): optimized bit testing, does not use
3923         intermediate register for bit value, test directly instead with
3924         BTFSS, BTFSC, works only for single bits,
3925         * (genpic16Code): dump the name of the iCode in the asm,
3926         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3927         renamed to pic16_decodeOp,
3928         * (serialRegAssign): do not allocate a temporary register for iCode
3929         sequences that test a single bit for 1/0
3930
3931 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3932
3933         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3934         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3935         access stack and frame pointers. They are initially assigned to
3936         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3937         accessing SFRs. Updated all occurences of modification of stack or
3938         frame pointer in gen.c and pcode.c,
3939         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3940         assigning of a literal value to pointers,
3941         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3942         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3943         selected
3944
3945 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3946
3947         * doc/sdccman.lyx: update documentation about stack pragma, added
3948         some info for stack memory models
3949
3950 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3951
3952         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3953
3954 2005-01-08 Raphael Neider <rneider AT web.de>
3955
3956         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3957           udata sections to fix bug #1097823
3958
3959 2005-01-05 Raphael Neider <rneider AT web.de>
3960
3961         * src/pic16/gen.c (genGenericShift): added handling of differently
3962           sized left operand and result
3963
3964 2005-01-04 Raphael Neider <rneider AT web.de>
3965
3966         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3967         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3968           to hold the condition bit)
3969         * added new version of genCmp (old code available via #define)
3970         * added new version of genShiftLeft/genShiftRight in a generic
3971           way, now supports shifting by negative values
3972         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3973           shiftCount (expected by genGenericShift)
3974         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3975         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3976           dump
3977         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3978           is an invalid literal too...)
3979
3980 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3981
3982         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3983         from Raphael Neider,
3984         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3985         for 8-bit literals. This fixes some literal operands which are sign
3986         extended to 16-bits ints when instruction needs only 8-bits.
3987
3988 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3989
3990         * device/lib/logf.c: added mcs51 assembly version
3991         * device/lib/expf.c: added mcs51 assembly version
3992         * device/lib/_logexpf.c: new shared asm code for expf and logf
3993         * device/include/math.h: add defines for assembly math library
3994         * device/lib/Makefile.in: build new _logexpf.c
3995         * device/lib/libfloat.lib: use new _logexpf.c
3996
3997 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3998
3999         * src/pic/device.c
4000         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
4001           device types which have less than 0x7f registers.
4002
4003 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4004
4005         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
4006
4007 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4008
4009         * device/lib/printf_fast.c: only build on supported arch.
4010         * device/lib/printf_tiny.c: only build on supported arch.
4011         * device/lib/printf_fast_f.c: only build if asm float lib
4012         * device/lib/_fsget1arg.c: only build if asm float lib
4013         * device/lib/_fsget2args.c: only build if asm float lib
4014         * device/lib/_fsnormalize.c: only build if asm float lib
4015         * device/lib/_fsreturnval.c: only build if asm float lib
4016         * device/lib/_fsrshift.c: only build if asm float lib
4017         * device/lib/_fsswapargs.c: only build if asm float lib
4018         * device/include/stdio.h: don't provide print_fast,
4019           print_fast_f, print_tiny prototypes if --xstack used
4020
4021 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
4022
4023         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
4024         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
4025           to the SOURCES
4026
4027 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4028
4029         * device/lib/printf_fast_f.c: same as printf_fast, but
4030           with floating point enabled
4031         * device/lib/printf_fast.c: minor tweaks
4032         * device/include/stdio.h: add printf_fast_f
4033
4034 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4035
4036         * src/SDCCmain.c: make --float-reent default for mcs51
4037         * device/lib/_fsadd.c: added mcs51 assembly version
4038         * device/lib/_fssub.c: added mcs51 assembly version
4039         * device/lib/_fsmul.c: added mcs51 assembly version
4040         * device/lib/_fsdiv.c: added mcs51 assembly version
4041         * device/lib/_fseq.c: added mcs51 assembly version
4042         * device/lib/_fsneq.c: added mcs51 assembly version
4043         * device/lib/_fsgt.c: added mcs51 assembly version
4044         * device/lib/_fslt.c: added mcs51 assembly version
4045         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
4046         * device/lib/Makefile.in: add _fscmp to build
4047         * device/lib/libfloat.lib: add _fscmp to build
4048
4049 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4050
4051         * device/lib/_fs2slong.c: added mcs51 assembly version
4052         * device/lib/_fs2sint.c: added mcs51 assembly version
4053         * device/lib/_fs2schar.c: added mcs51 assembly version
4054         * device/lib/_fs2ulong.c: added mcs51 assembly version
4055         * device/lib/_fs2uint.c: added mcs51 assembly version
4056         * device/lib/_fs2uchar.c: added mcs51 assembly version
4057         * device/lib/_slong2fs.c: added mcs51 assembly version
4058         * device/lib/_sint2fs.c: added mcs51 assembly version
4059         * device/lib/_schar2fs.c: added mcs51 assembly version
4060         * device/lib/_ulong2fs.c: added mcs51 assembly version
4061         * device/lib/_uint2fs.c: added mcs51 assembly version
4062         * device/lib/_uchar2fs.c: added mcs51 assembly version
4063         * device/include/float.h: added #define to select asm vs c
4064
4065 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
4066
4067         * device/lib/printf_fast.c: improvements to float output
4068         * device/include/float.h: add defines for assembly float library
4069         * device/lib/_fsget1arg.c: receive 1 float arg
4070         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
4071         * device/lib/_fsnormalize.c: normalize a float
4072         * device/lib/_fsreturnval.c: return float, various helper routines
4073         * device/lib/_fsrshift.c: right shift a float's mantissa
4074         * device/lib/_fsswapargs.c: swap 2 floats
4075         * device/lib/Makefile.in: build these 6 new files for mcs51
4076         * device/lib/libfloat.lib: add these 6 files to the library
4077
4078 2004-12-26 Borut Razem <borut.razem AT siol.net>
4079
4080         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
4081           built by gcc 3.4.2
4082
4083 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
4084
4085         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
4086           and fully reentrant and register bank neutral.
4087         * device/lib/printf_fast.c: added float (not enabled by default),
4088           added compact/slower integer (also not enabled by default),
4089           improved size/speed of fast integer code, other minor changes
4090         * device/include/stdio.h, device/lib/Makefile.in,
4091           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
4092
4093 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
4094
4095         * src/pic16/pcode.c: declaring variables other than at the start of a
4096           block is not supported in C by VC6.
4097
4098 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
4099
4100         * applied a previous patch from Raphael Neider that wasn't included
4101         in the previous commits, which fixes infinite loops within jumptable
4102         improvements,
4103         * made some fixes that previous patches introduced
4104
4105 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
4106
4107         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
4108         that fixes an issue with AOP_PCODE asmop's offset,
4109         * (pic16_popCopyReg): update instance field too,
4110         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
4111         function of pic port,
4112         * (genCmp, genAnd, genAssign),
4113         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
4114
4115 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
4116
4117         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
4118         variables initial values to idata section,
4119         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
4120         variables in some functions. This utilizes parmBytes field of iCode
4121         structure to hold the offset of the variable in stack. (might be
4122         able to use the stack field too?)
4123         * applied patch from Raphael Neider # ### , # ###
4124         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
4125         variable initial values in idata section,
4126         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
4127         for static variables with initial value
4128         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
4129         applied fix in while loop from Raphael Neider.
4130
4131 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
4132
4133         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
4134         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
4135         * src/ds390/ralloc.c (serialRegAssign): spill bits
4136         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
4137         * support/Util/SDCCerr.c,
4138         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
4139         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
4140         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
4141
4142 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
4143
4144         * device/include/sdcc-lib.h: inserted LGPL, added includes
4145           asm/ds390/features.h and asm/mcs51/features.h
4146         * device/include/asm/default/features.h,
4147         * device/include/asm/gbz80/features.h,
4148         * device/include/asm/z80/features.h: added empty _AUTOMEM
4149           and _STATMEM
4150         * device/include/asm/ds390/features.h,
4151         * device/include/asm/mcs51/features.h: added files with defines for
4152           _AUTOMEM and _STATMEM indicating automatic and static storage class
4153         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
4154         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
4155         * src/SDCCicode.c (geniCodeCast),
4156         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
4157         * src/SDCCloop.c (loopInduction): removed unused variable lr
4158         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
4159           to convertToFcall to include char modulo (RFE 1065037), added check
4160           if left operand is unsigned and use abs of literal value
4161         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
4162           as it doesn't work after conversion from peephole.def to peephole.rul
4163         * src/mcs51/gen.c (toBoolean): added check for size,
4164           (genModOneByte): optimized code for signed char modulo a literal
4165           power of 2 (thanks to Hubert Sack),
4166           (genRRC): removed unnecessary "clr c",
4167           (genRLC): replaced "add a,acc" with cheaper "rlc a"
4168         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
4169           jump optimization,
4170           swapped rules 256.c and 256.d,
4171           extended 256.d by using new multiple checks (thanks Erik),
4172           added rules 256.e and 256.f,
4173           updated rule 261.a and 261.b to new generated code
4174         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
4175
4176 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4177
4178         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
4179           induction related bugs, including first part of bug #1074377
4180
4181 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
4182
4183         * applied patch from bug-report #1076292,
4184         * applied patches for genAnd and Goto-optimizations for Raphael
4185         Neider,
4186         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
4187         dump a less iCode information,
4188         * src/pic16/device.h (pic16_options_t): added field debgen,
4189         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
4190         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
4191         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
4192         puclic,
4193         * (various functions): added macros FENTRY and FENTRY2 to functions,
4194         to emit function prologue,
4195         * (various functions): fixed indentation,
4196         * (genNearPointerGet): fixed loading of FSR0,
4197         * (genPackBits): applied patch from Raphael Neider to fix updating
4198         of FSR0 and touching only the modified bits,
4199         * src/pic16/genarith.c (various functions): added macros FENTRY to
4200         emit function prologue in comments,
4201         * src/pic16/pcode.h: added functions debugf2, debugf3,
4202         * src/pic16/ralloc.c: partial fix for packForPush caused
4203         segmentation fault,
4204
4205 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4206
4207         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
4208           <stsp AT users.sourceforge.net> with reversed byte order
4209         * support/regression/tests/rotate.c: added (ds390 skips some tests)
4210
4211 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4212
4213         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
4214           bug #1074377
4215         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
4216         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
4217
4218 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4219
4220         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
4221
4222 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4223
4224         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
4225           conditions,
4226           (setFromConditionArgs): friendly operand parser for peephole rules,
4227           (operandBaseName, operandsNotRelated): new peephole condition
4228           "operandsNotRelated" -- similar to "operandsNotSame", but takes
4229           architecture specific register naming into account, handles n-way
4230           comparisons, and supports quoted literals
4231         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
4232
4233 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4234
4235         * src/mcs51/peeph.def: fixed bug #1076940
4236
4237 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4238
4239         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
4240
4241 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4242
4243         Adding support for replacing ljmps with sjmps in jumptables
4244         generated for switch statements. For now you need to set the
4245         environment variable SDCC_SJMP_JUMPTABLE to enable this.
4246         Now 4 algorithms for mcs51 jumptable generation are used:
4247         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
4248         addresses loaded pc-relative for up to 112 cases and stack-pushing
4249         target addresses loaded with offset from dptr for up to 256 cases.
4250
4251         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
4252         * src/mcs51/main.c: adapted constants for switch table generation
4253         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
4254
4255 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
4256
4257         * device/lib/printf_large.c (_print_format): fixed bug 1073386
4258         * support/regression/tests/bug1057979.c: added test for bug 1073386
4259
4260 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4261
4262         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
4263         compilers
4264
4265 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4266
4267         * src/pic16/device.h,
4268         * src/pic16/genarith.c,
4269         * src/pic16/glue.c,
4270         * src/pic16/main.c,
4271         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4272
4273 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4274
4275         Large cummulative patch for pic16 port.
4276         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4277         to call when a stack overflow occurs,
4278         * (malloc.h): added CVS Id tag,
4279         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4280         variable,
4281         * added libc directory. The current version of LibC contains string
4282         functions, ctype functions and macros and some functions of the
4283         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4284         be extensively tested in the future. Standard disclaimer here.
4285         Library is not automatically build yet. But one can build it by
4286         invoking 'make' inside the libc directory.
4287         * added ADC library under libio. Preliminary version yet.
4288
4289         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4290         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4291         aopForRemat() now and not by pic16_aopOp(),
4292         * (pic16_popGetTempReg): removed warning messgae when allocating
4293         temporary registers, its a buggy feature and will be removed,
4294         * (pic16_popGet): set register instance field in AOP_CRY,
4295         * (pic16_outBitC): fixed for results in size greater than 1,
4296         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4297         * (pic16_storeForReturn): optimized return of 0,
4298         * (genCmp): experimental code for new genCmp which uses PIC18's
4299         special compare&skip instructions. Initial tests fail some times
4300         with variables grater than 1 byte in size, so new code is disabled,
4301         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
4302         a single bit,
4303         * (genCast): began a fix to optimize the casting of a bit to another
4304         bit, now assigning a bitfield to another bitfield will fail, sorry,
4305         * src/pic16/main.c: disabled the use of lr-support feature,
4306         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
4307         * added some function prototypes, added function _debugf prototype,
4308         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
4309         bits with offset (case PO_GPR_BIT),
4310         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
4311         command line,
4312         * (isBankInstruction): modified to return 0 for no banking instruction,
4313         and 1 for banking instruction,
4314         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
4315         caused stop processing pCodes after a inline assembly block,
4316         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
4317         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
4318         registers when it shouldn't,
4319         * src/pic16/ralloc.c (allocReg): add preliminary support for
4320         supporting a limited set of temporary registers,
4321
4322 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4323
4324         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
4325           genDataPointerSet): ensure assignments always copy in MSB to LSB
4326           order,
4327           (loadRegFromAop): recognize CLRH optimization,
4328           (genFunction): optimize RECEIVE iCodes in reentrant functions
4329
4330 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4331
4332         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
4333           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
4334           selected.
4335         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
4336         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
4337           contiguous with data
4338
4339 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4340
4341         * device/lib/_gptrget.c (_gptrget),
4342         * device/lib/_gptrgetc.c (_gptrgetc),
4343         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
4344           instead of sjmp to ret
4345         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
4346           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
4347
4348 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
4349
4350         * .version: bumped version to 2.4.7
4351         * device/lib/_gptrget.c (_gptrget): is now _naked
4352         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
4353         * device/lib/_gptrput.c (_gptrput): is now _naked
4354         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
4355           (createFunction): fixed xstack
4356         * src/SDCCglue.c (emitMaps): set allocation required for bit area
4357         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
4358           or bit either,
4359           (geniCodeCritical): store original interrupt state in an iTemp bit
4360           var unless stack-auto
4361         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
4362         * src/SDCCmain.c (setIncludePath): added include/target to search path
4363         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
4364         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
4365           prototype,
4366           (processFuncArgs): put bit vars in bit area
4367         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
4368           unsaveRBank): fixed xstack,
4369           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
4370           (genFunction, genEndFunction): fixed xstack,
4371           (genAssign): optimization don't walk backwards through mem
4372         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
4373         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
4374         * support/regression/Makefile: also make library (for stack-auto) when
4375           making "all" and added "test-mcs51-xstack-auto"
4376         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
4377         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
4378         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
4379         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
4380         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
4381           make-library by MAKE_LIBRARY
4382         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
4383           regression tests for xstack
4384         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
4385         * support/regression/tests/critical.c: test for critical on mcs51
4386
4387 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4388
4389         * support/regression/ports/ucz80/spec.mk: use include and lib files from
4390           built version of sdcc instead of installed version
4391
4392 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
4393
4394         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
4395         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
4396           vprintf.c now
4397         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
4398         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
4399           WARNING: remove device/lib/build/z80/printf.o by hand when
4400           updating from previous build!
4401         * device/lib/z80/printf.c: updated comment
4402         * support/regression/tests/bug1057979.c: test all ports now
4403         * support/regression/tests/bug1065458.c: file added
4404
4405 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4406
4407         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
4408           *_start and *_end symbols for static functions
4409
4410 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
4411
4412         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
4413           and search crt0.o in all library paths,
4414           (setIncludePath): proper handling of --nostdinc,
4415           (setLibPath): proper handling of --nostdlib
4416         * support/regression/Makefile,
4417         * support/regression/ports/ds390/spec.mk,
4418         * support/regression/ports/gbz80/spec.mk,
4419         * support/regression/ports/hc08/spec.mk,
4420         * support/regression/ports/mcs51/spec.mk,
4421         * support/regression/ports/mcs51-large/spec.mk,
4422         * support/regression/ports/mcs51-stack-auto/spec.mk,
4423         * support/regression/ports/z80/spec.mk: use include and lib files from
4424           built version of sdcc instead of installed version
4425         * doc/sdccman.lyx: fixed typo in --nostdinc
4426
4427 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
4428
4429         * src/pic/pcode.c,
4430         * src/pic/device.c,
4431         * src/pic/ralloc.c,
4432         * src/pic/gen.c : added support to generate code for struct bit fields.
4433
4434 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
4435
4436         * as/xa51/xa_version.h,
4437         * device/include/errno.h,
4438         * device/include/regc515c.h,
4439         * device/lib/_itoa.c,
4440         * device/lib/_ltoa.c,
4441         * device/lib/ser_ir_cts_rts.c,
4442         * sim/ucsim/xa.src/glob.cc,
4443         * sim/ucsim/xa.src/inst_gen.cc,
4444         * sim/ucsim/xa.src/xa_bit.cc,
4445         * sim/ucsim/xa.src/xa_sfr.cc,
4446         * sim/ucsim/z80.src/inst_dd.cc,
4447         * sim/ucsim/z80.src/inst_fdcb.cc,
4448         * support/scripts/keil2sdcc.pl,
4449         * src/pic16/pic16.dsp,
4450         * src/pic16/pic16a.dsp: corrected cvs line endings
4451         * device/lib/printf_large.c: fixed bug 1057979
4452         * src/pic16/gen.c: fixed non-C standard code
4453         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
4454         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
4455         * support/regression/ports/mcs51/support.c: reload T1 asap
4456         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
4457           pdata use and clear idata startup behaviour
4458         * support/regression/tests/bug1057979.c: added
4459
4460 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
4461
4462         * device/examples/ds390/ow390/ad26.h,
4463         * device/examples/ds390/ow390/cnt1d.h,
4464         * device/examples/ds390/ow390/crcutil.c,
4465         * device/examples/ds390/ow390/ownet.h,
4466         * device/examples/ds390/ow390/owsesu.c,
4467         * device/examples/ds390/ow390/swt12.h,
4468         * device/examples/ds390/ow390/swtoper.c,
4469         * device/examples/ds390/ow390/temp10.h,
4470         * device/examples/ds390/ow390/thermodl.c,
4471         * device/examples/ds390/tinitalk/tinitalk.dsp,
4472         * device/examples/ds390/tinitalk/tinitalk.dsw,
4473         * device/examples/mcs51/clock/hw.h,
4474         * device/examples/mcs51/simple2/go.bat,
4475         * device/examples/serialcomm/windows/serial.h,
4476         * device/examples/xa51/dummy.c,
4477         * device/examples/xa51/hello.c,
4478         * device/include/80c51xa.h,
4479         * device/include/at89x051.h: corrected cvs line endings
4480
4481 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
4482
4483         * src/pic16/main.c (options): added command line --gstack, to trace
4484         stack over/under flows,
4485         * added pragma 'wparam' to allow passing first byte of function
4486         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
4487         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
4488         call to __gstack_test function and sets up the symbol as extern,
4489         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
4490         * popaop): added call to pic16_testStackOverflow,
4491         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
4492         wparamList list,
4493         * (genCall, genPcall): now all parameters are passed via stack
4494         except in functions that are pass to wparam pragma in which WREG is
4495         used too,
4496         * (genPcall): REENTRANT flag is checked to see if variable prototype
4497         contains reentrant keyword, don't call a non-reentrant function, via
4498         a reentrant function pointer or vice versa, functions are never
4499         passed via WREG,
4500         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
4501         D.Winkler,
4502         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
4503         SIGSEGV when accessing a NULL register stucture,
4504         * (pic16_printGPointerType): modified to handle UPPER modifier for
4505         function initializers, changed prototype of function to simpler one,
4506         * (pic16_printIvalFuncPtr): check to see if function is already
4507         added in externs list,
4508         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
4509         optimized a move from W to SFR with a move to the same register
4510         later after a CALL,
4511         * device/lib/pic16/debug: NEW directory, contains debug features
4512         which are enabled when linking with libdebug.lib, currently command
4513         line option --gstack enables stack pointer tracing for over/under
4514         flow, corresponding sources are in debug/gstack
4515
4516 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
4517
4518         * doc/sdccman.lyx: updated SDCC version,
4519         * (PIC16 port): update list of command line options,
4520         * src/pic16/device.h (structure pic16_options_t): added field gstack
4521         to enable stack overflow tracing on push/pops,
4522         * src/pic16/device.c (statistics structure): added statistics
4523         structure,
4524         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
4525         pic16_dump_int_registers): increase statistics counters for each
4526         * variable which is encountered
4527         * (pic16_dump_usection): emit each .udata variable to its own udata
4528         section,
4529         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
4530         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
4531         parameters via stack, otherwise use old scheme,
4532         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
4533         assembler output file,
4534         * src/pic16/main.c: added command line options --gstack to enable
4535         push/pop tracing for stack overflow,
4536         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
4537         instructions): added size of each instruction,
4538         * (pic16_countInstruction): estimate size of instructions in
4539         the_pFile list, inline assembly blocks are not counted,
4540         * (pic16_FixRegisterBanking): trace previous register usage, when
4541         banksel optimizations is greater than 0, don't emit a redudant
4542         banksel directive,
4543
4544 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
4545
4546         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
4547         * src/pic16/ralloc.c : applied same fix for pic16.
4548         * src/pic/gen.c : tidied it up a little.
4549
4550 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4551
4552         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
4553         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
4554
4555 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4556
4557         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
4558
4559 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4560
4561         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
4562         non-reentrant function __modsint in the interrupt function (thus
4563         corrupting math operations during serial I/O)
4564         * device/lib/ser_ir.c: as above, changed buffersize
4565         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
4566         256.c,d for zeroing
4567         * doc/Makefile: added option -t for rsync
4568
4569 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4570
4571         * src/SDCCast.h (struct ast),
4572         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
4573
4574 2004-10-20 Borut Razem <borut.razem AT siol.net>
4575
4576         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
4577         package
4578
4579 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
4580
4581         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
4582         makefile targets,
4583         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
4584         support functions to replace long sequences of MOVFF's from access
4585         bank registers to stack and vice versa,
4586         * src/pic16/device.h: added new field opt_flags, where optimization
4587         flags can be set to enable certain features,
4588         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
4589         * pBlock, (genFunction, genEndFunction): surroung loop for
4590         saving/loading used registers in stack with PC_INFO pCodes,
4591         INF_LREGS. Code in between can then be optimized by pCode optimizer
4592         to support function calls,
4593         * (genDataPointerSet): fixed bug which loaded float fields in
4594         structures with corrupt data,
4595         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
4596         in a standard way debug info on stderr. Feature used for developing
4597         and debugging only,
4598         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
4599         obsolete chunks of code,
4600         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
4601         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
4602         * pic16/src/pcode.c (pic16_newpCodeInfo,
4603         * (pic16_newpCodeOpLocalRegs),
4604         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
4605         feature,
4606         * (pic16_pCodeConstString): printing of the initial value of a
4607         symbol as a comment is inhibited since parsing was already done by
4608         copyStr and output is corrupt,
4609         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
4610
4611 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4612
4613         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
4614
4615 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
4616
4617         * as/mcs51/lkarea.c: removed old K&R style,
4618           (lnksect): changed check on boundary error,
4619           (lnksect2): changed check on boundary error,
4620           (lnksect2): extend XSTK to end of page if size = 1
4621         * as/mcs51/lkmain.c: removed old K&R style,
4622           (Areas51): create l_IRAM symbol
4623         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
4624         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
4625           model-mcs51-stack-auto, added model-mcs51-xstack-auto
4626         * device/lib/_mullong.c: added version to be compiled with xstack
4627         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
4628         * device/lib/mcs51/crtxclear.asm: clear pdata as well
4629         * device/lib/mcs51/crtxstack.asm: fixed comment
4630         * src/SDCCglue.c: maxInterrupts defaults to 0,
4631           (emitMaps): added pdata,
4632           (createInterruptVect): (re)moved default,
4633           (glue): added pdata,
4634           (glue): moved __start__xstack to XSTK with default size 1
4635         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
4636           and options.float_rent when options.stackAuto is set,
4637           (linkEdit): only write XDATA_NAME if provided on command line
4638         * src/SDCCmem.h,
4639         * src/SDCCmem.c: added pdata
4640         * src/port.h: added pdata_name to PORT
4641         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
4642           (saveRegisters, unsaveRegisters): removed usage of B,
4643           (genMinus): fixed accumulator clash,
4644           (genJumpTab): added comment, this needs another look
4645         * src/mcs51/gen.c: added check for "B in use" paranoia,
4646           added pushB() and popB()
4647         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
4648           chance
4649         * src/avr/main.c,
4650         * src/ds390/main.c,
4651         * src/hc08/main.c,
4652         * src/mcs51/main.c,
4653         * src/pic/main.c,
4654         * src/pic16/main.c,
4655         * src/xa51/main.c,
4656         * src/z80/main.c: (reset_regparms) made void parameter explicit and
4657           added PSEG (PAG,XDATA) or NULL to port specifier
4658         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
4659         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
4660           (_mcs51_genInitStartup): removed __start__xstack equ,
4661           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
4662         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
4663         * src/z80/gen.c (_rleAppend): fixed warnings
4664         * support/regression/tests/zeropad.c: added pdata test
4665         * .version: bumped to 2.4.6
4666
4667 2004-10-17 Borut Razem <borut.razem AT siol.net>
4668
4669         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
4670         as a part of nightly build
4671
4672 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
4673
4674         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
4675         WREG holds the first byte function parameters,
4676         * (aopForSym): take special case for symbols which are in FARSPACE
4677         but in CODESPACE too,
4678         * (assignResultValue): modified to take into account _G.useWreg,
4679         * (genCall): don't use wreg for parameter passing when function is
4680         declared as reentrant, too, added optimization INCF to stack
4681         pointer when stack parameter count is 1,
4682         * (genFunction, genEndFunction): refurnished and fixed to not using
4683         wreg for passing parameters when function has varargs or is
4684         reentrant, fixed bug with symbol name compare for generating
4685         functions in absolute address,
4686         * (pic16_storeForReturn): refurnished,
4687         * (genCmp): began writing a new version of the function, not ready
4688         yet, therefore it is disabled,
4689         * (genAssign): do not read code memory when assigning a function to
4690         a pointer function,
4691         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
4692         array of characters, not pointer,
4693         * (pic16initialComments): in debug mode emit an .ident directive for
4694         the assembler,
4695         * (_process_pragma): emit a new warning type (internal to pic16)
4696         when setting stack to default length, emit a similar warning when
4697         placing a function at absolute address and address is not word aligned
4698         * (_pic16_parseOptions): added 'return TRUE' statement,
4699         * (_pic16_linkEdit): if compiling a source, then add the source's
4700         file object, first in the list of objects to link,
4701
4702 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
4703
4704         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
4705         * src/pic/main.c : removed VC warning.
4706         * src/pic/gen.c : changed comment.
4707
4708 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
4709
4710         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
4711         reference to a deprecated symbol _GPTRREG was causing failure to
4712         link. Thanks G. M. Gallant for the info.
4713
4714 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
4715
4716         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
4717         comments for Bugs item #954788.
4718
4719 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
4720
4721         * src/pic16/device.c (pic16_dump_gsection,
4722         * pic16_groupRegistersInSection): handle symbols declared to be in
4723         access bank differently,
4724         * src/pic16/gen.c (struct _G): added field resDirect,
4725         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
4726         send values read from stack directly to result and don't allocate
4727         temporary values,
4728         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
4729         same registers,
4730         * (pic16_sameRegsOfs): NEW,
4731         * (freeAsmop): if _G.resDirect is set then do not mark registers as
4732         free because they were not allocated from temporary pool,
4733         * pic16_popRegFromString): workaround to fix a problem with
4734         allocating variables twice or never,
4735         * (genGenPointerGet): using PRODL instead of FSR0H,
4736         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
4737         instead of FSR0H,
4738         * (genAssign): take advantage of the _G.resDirect flag,
4739         * (genCast): around line 11844, use mov2f instead of directly
4740         MOVFF'ing between operands to account for literal values,
4741         * src/pic16/genutils.c: some new debug functions for gpsim have been
4742         added,
4743         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
4744         float with integer part only,
4745         * src/pic16/main.c (_process_pragma): handle pragma udata access to
4746         place variables in access bank
4747         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
4748         updated sources to reflect recent changes in gen.c
4749
4750 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
4751
4752         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
4753         sources that searched for headers in installation path, now the
4754         device/include/pic16 is used,
4755         * src/pic16/glue.c (pic16glue),
4756         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
4757         .line directives if not in debug mode, this suppresses assembler's
4758         warnings for ignored directives
4759
4760 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
4761
4762         * src/port.h: made reset_regparms prototype void parameter explicit.
4763         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
4764         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
4765         * doc/sdccman.lyx: documented warning disabling and how to use
4766           printf_large to make it print floats.
4767         * device/include/stdbool.h: NEW
4768         * device/lib/_atof.c,
4769         * device/lib/_divuint.c,
4770         * device/lib/_divulong.c,
4771         * device/lib/expf.c,
4772         * device/lib/printf_large.c,
4773         * device/lib/sincosf.c,
4774         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
4775         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
4776           a completely reentrant lib.
4777
4778 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
4779
4780         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
4781         * device/include/pic16/stdio.h: fixed bug with colon
4782
4783 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
4784
4785         * device/include/pic16/stdio.h,
4786         * device/include/pic16/stdlib.h,
4787         * device/include/pic16/math.h: NEW
4788         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
4789         declared as _naked to reduce overhead
4790         * device/lib/Makefile.in (target port-specific-objects-pic16):
4791         changed * to *.* so to ignore the CVS directory,
4792         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4793         stacked variables back in stack,
4794         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4795         corruption
4796
4797 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4798
4799         * .version: bumped version number to 2.4.5
4800         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4801         * support/Util/SDCCerr.c (messages structure): added entry for
4802         W_POSSBUG2
4803
4804         Large cumulative patch for pic16 port and libraries.
4805         * device/include/pic16/sdcc-lib.h,
4806         * device/include/pic16/stdarg.h,
4807         * device/include/asm/pic16/features.h,
4808         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4809         * device/include/pic16/float.h: changes reentrant keyword with
4810         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4811         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4812         updated target build-libraries to include objects from gptr,
4813         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4814         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4815         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4816         all function headings,
4817         * src/SDCCmain.c: added global parameter userIncDirsSet,
4818         * (parseCmdLine): when option -I is encountered add directory to
4819         userIncDirsSet too,
4820         * src/version.awk: added space between control and long,
4821         * src/pic16/NOTES: added some notes for the port,
4822         * src/pic16/gen.c: added prototype for mov2fp function,
4823         * (fReturnpic16[]): properly named return value registers,
4824         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4825         * (aopForSym): added code to handle symbols with onStack flag set,
4826         symbols onStack are allocated PTRSIZE bytes,
4827         * (aopFreeAsmop): handles special case where asmops are stack objects,
4828         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4829         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4830         added argument lock to trace flaws in allocating temporary registers
4831         when developing port,
4832         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4833         * (pic16_popRegFromString): reenabled allocating a direct register
4834         from string,
4835         * (assignResultValue): various beautifications,
4836         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4837         referenced function argument,
4838         * (genIpush): reenabled to allow stacked arguments, handles only
4839         ic->parmPush iCodes,
4840         * (genCall, genPcall): major changes to allow for variable argument
4841         functions, fixed a bug with falsely restoring stack pointer after
4842         returning from call,
4843         * (genFunction): pending code for critical function,
4844         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4845         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4846         * (genNearPointerGet): fixed bug with indirect reading, was always
4847         reading from INDF0
4848         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4849         pointers,
4850         * (genAddrOf): rewrote code to take address of a stacked function parameter
4851         * (genCast): fixed casting to generic pointer type,
4852         * src/pic16/gen.h: added AOP_STA,
4853         * (struct asmop): added field stk,
4854         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4855         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4856         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4857         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4858         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4859         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4860         generic pointers,
4861         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4862         and library paths,
4863         * (pic16_port structure): generic pointer size is set to 3,
4864         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4865         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4866         compiler warning,
4867         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4868         operand is an iTemp,
4869
4870 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4871
4872         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4873         * debugger/mcs51/simi.c: addapt new syntax of s51
4874
4875 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4876
4877         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4878         * src/pic16/pcode.c: commented out some calls to free() in order to
4879         fix bug #989576,
4880
4881 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4882
4883         * src/SDCCicode.h,
4884         * src/SDCCicode.c (isiCodeInFunctionCall),
4885         * src/avr/ralloc.c (selectSpil),
4886         * src/pic/ralloc.c (selectSpil),
4887         * src/pic16/ralloc.c (selectSpil),
4888         * src/ds390/ralloc.c (selectSpil),
4889         * src/hc08/ralloc.c (selectSpil),
4890         * src/xa51/ralloc.c (selectSpil),
4891         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4892         stack in the middle of a function call sequence (fixes bug #1020268)
4893         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4894         costs associated with the minimum switch case.
4895
4896 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4897
4898         * src/SDCC.lex: fixed bug #1030549
4899
4900 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4901
4902         * src/SDCCcse.h (struct cseDef),
4903         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4904         over a function call if the CSE is derived from a symbol whose
4905         address has been taken (fixes bug #1029883)
4906         * support/regression/tests/bug-1029883: a new regression test for
4907         this bug
4908
4909 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4910
4911         * src/hc08/gen.c (emitinline): fixed bug #1029778
4912         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4913         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4914         and starts toward RFE #905167)
4915
4916 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4917
4918         * src/pic16/gen.c (mov2f): New function to move an operand to
4919         another without considering if it is a literal or a register,
4920         * (pic16_sameRegs): don't check if they are both AOP_REG,
4921         * (AccRsh): removed andmask=0 lines,
4922         * (genLeftShift): duplicated to be improved in future versions,
4923         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4924         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4925         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4926         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4927         * (insertBankSwitch): fixed inserting banksel directives algorithm
4928         for instructions that follow a skip instruction, this fixes a report
4929         for broken subtraction code generation,
4930         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4931         iCode is a left op, just in case result and right share the same
4932         registers
4933
4934 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4935
4936         * src/hc08/main.c,
4937         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4938         preservation of HX
4939         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4940         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4941         on 2004-09-12; it was buggy
4942
4943 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4944
4945         * src/SDCCsymt.h: removed RESULT_CHECK
4946         * src/SDCCast.c,
4947         * src/SDCCglue.c,
4948         * src/SDCCval.c,
4949         * src/pic/glue.c,
4950         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4951
4952 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4953
4954         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4955         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4956         configuration values no more rejected by compiler, they are assigned
4957         to configuration registers with a warning message instead,
4958         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4959         the for-loop so last conf register is emitted too,
4960         * (_pic16_initPaths): link library libsdcc.lib by default,
4961         * (_hasNativeMulFor): modified test for multiplication according to
4962         Raphael Neider's remarks. Integer multiplication is also done with
4963         support functions,
4964         * device/include/pic16/pic18fregs.h: corrected type error in while
4965         testing and including 18f6720 header file
4966
4967 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4968
4969         * src/pic16/device.h (pic16_options): removed field use_crt,
4970         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4971         until an optimization to handle single bits is added,
4972         * (pic16_loadFSR0): moved before genUnpackBits,
4973         * (genAnd): some white lines removed,
4974         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4975         leave_reset flags in pic16_options when using crt modules,
4976
4977 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4978
4979         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4980           for bugs 898889 & 979599. Also used some safer print instructions.
4981
4982 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4983
4984         * src/pic16/device.h (pic16_options_t): added field use_crt,
4985         crt_name, no_crt,
4986         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4987         catch a probable future bug,
4988         * src/pic16/gen.c: aopIdx function commented out,
4989         * (genAssign): commented out old code which used aopIdx,
4990         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4991         code, added if conditionals to take into account the --use-crt
4992         command line options,
4993         * src/pic16/main.c (pic16_optionsTable): added new command line
4994         options, --use-crt= and --no-crt,
4995         * (_pic16_linkEdit): now the proper crt object is added in the
4996         linker command line except than when --no-crt is specified,
4997         * src/pic16/pcode.c,
4998         * src/pic16/pcode.h: added some structures and functions for a new
4999         optimization scheme to compansate for instruction overhead between
5000         same iCodes, this scheme is currently under development and is not
5001         working in any way,
5002         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
5003         to && operator,
5004         * device/lib/pic16/startup/crt0i.c,
5005         * device/lib/pic16/startup/crt0iz.c: added global char variable
5006         __uflags to force the generation of an idata section
5007
5008 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
5009
5010         * doc/Makefile,
5011         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
5012         * doc/sdccman.lyx: updated sdcc version to 2.4.4
5013
5014 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5015
5016         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
5017         Frieder) and clarified the default code optimization mode
5018
5019 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5020
5021         * src/SDCC.lex (doPragma, process_pragma),
5022         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
5023         "opt_code_size", and "opt_code_balanced"
5024         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
5025         regrouped options by category, added support for category headers
5026         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
5027         and "--opt-code-size"
5028         * doc/sdccman.lyx: documented these new options and pragmas
5029         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
5030         preference into account
5031
5032 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5033
5034         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
5035           geniCodePreDec): Fixed bug 904237 by generating a warning
5036         * src/SDCCerr.h,
5037         * src/SDCCerr.c: added warning W_SIZEOF_VOID
5038
5039 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
5040
5041         * src/pic/device.c : When no max ram set validate full memory range.
5042         * src/pic/pcode.c,
5043         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
5044
5045 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5046
5047         * device/lib/_gptrget.c,
5048         * device/lib/_gptrput.c: updated comment
5049         * device/lib/calloc.c,
5050         * device/lib/free.c,
5051         * device/lib/malloc.c,
5052         * device/lib/realloc.c: added LGPL, made them reentrant-safe
5053         * src/SDCCcse.c (cseBBlock),
5054         * src/SDCCicode.c (printOperand, geniCodeArray),
5055         * src/SDCCicode.h (struct operand): fixed bug 868103
5056         * support/regression/tests/bug-868103.c: added
5057         * src/SDCCast.c (searchLitOp),
5058         * src/SDCCcse.h (struct cseDef),
5059         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
5060         * src/SDCCicode.h (struct operand),
5061         * src/SDCCsymt.h (struct sym_link),
5062         * src/avr/gen.c (hasInc),
5063         * src/ds390/gen.c (hasInc),
5064         * src/hc08/gen.c (genPlusIncr, hasInc),
5065         * src/mcs51/gen.c (hasInc),
5066         * src/pic16/glue.c (pic16_printIvalChar),
5067         * src/pic16/ralloc.c (regWithIdx),
5068         * src/xa51/gen.c (hasInc) : removed warnings
5069         * src/SDCCast.c (createBlock): added comment ???
5070         * src/hc08/ralloc.c: updated comments
5071
5072 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5073
5074         * doc/sdccman.lyx: updated section on switch statements, added
5075         section about semaphore locking
5076         * doc/Makefile: added option -info for latex2html
5077         * device/lib/_gptrget.c,
5078         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
5079
5080 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5081
5082         * src/pic/device.h,
5083         * src/pic/device.c,
5084         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
5085          maxram is less than 0x100.
5086
5087 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5088
5089         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
5090
5091 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5092
5093         * src/port.h,
5094         * src/mcs51/main.c,
5095         * src/ds390/main.c,
5096         * src/z80/main.c,
5097         * src/hc08/main.c,
5098         * src/pic/main.c,
5099         * src/pic16/main.c,
5100         * src/avr/main.c,
5101         * src/xa51/main.c
5102         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
5103         a jump table is the best form for a switch statement, including
5104         automatic insertion of missing cases to make the case range
5105         continuous. Developed in collaboration with Frieder Ferlemann.
5106
5107 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5108
5109         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
5110         accumulator result if it needs sign extension
5111
5112 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5113
5114         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
5115
5116 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5117
5118         * device/lib/gbz80/printf.c,
5119         * device/lib/z80/printf.c: removed define for NULL
5120
5121 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5122
5123         * as/xa51/xa_link.c,
5124         * device/examples/ds390/ow390/ad26.c,
5125         * device/examples/ds390/ow390/cnt1d.c,
5126         * device/examples/ds390/ow390/counter.c,
5127         * device/examples/ds390/ow390/ds2480.h,
5128         * device/examples/ds390/ow390/ds2480ut.c,
5129         * device/examples/ds390/ow390/findtype.c,
5130         * device/examples/ds390/ow390/gethumd.c,
5131         * device/examples/ds390/ow390/owllu.c,
5132         * device/examples/ds390/ow390/ownetu.c,
5133         * device/examples/ds390/ow390/swt12.c,
5134         * device/examples/ds390/ow390/swtloop.c,
5135         * device/examples/ds390/ow390/temp.c,
5136         * device/examples/ds390/ow390/temp10.c,
5137         * device/examples/ds390/ow390/thermo21.c,
5138         * device/examples/ds390/ow390/tinilnk.c,
5139         * device/examples/ds390/ow390/tstfind.c,
5140         * device/examples/serialcomm/windows/serial.cpp,
5141         * device/examples/serialcomm/windows/test_serialcomm.cpp,
5142         * device/include/reg51.h: fixed line endings for cvs
5143
5144 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5145
5146         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
5147         packRegsForAccUse, packRegisters): new accumulator register
5148         packing algorithm
5149         * support/regression/ports/hc08/support.c (_putchar): suppress
5150         warning of unused variable
5151         * src/SDCCicode.c: added SWAP entry to codeTable
5152
5153 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
5154
5155         * device/lib/sprintf.c: forgot to add this file before previous commit
5156
5157 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
5158
5159         * src/pic16/gen.c (genPackBits): added operand right in function
5160         parameters, load result directly if p_type is POINTER (that is
5161         called by genNearPointerSet)
5162         * (genUnPackBits): added operand left in function parameters,
5163         * (genNearPointerGet, genNearPointerSet): prevent the loading of
5164         FSR0 if accessing bitfields,
5165
5166 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
5167
5168         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
5169           _print_format; updated printf, sprintf, vsprintf
5170         * device/include/asm/default/features.h: corrected comment/define
5171         * device/lib/Makefile.in: added sprintf.c
5172         * device/lib/libsdcc.lib: added sprintf module
5173         * device/lib/printf_large.c,
5174         * device/lib/vprintf.c,
5175         * device/lib/sprintf.c: totally refactored printf_large and vprintf
5176           into these 3 files
5177         * support/regression/Makefile: changed ALL_PORTS into a usefull default
5178         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
5179         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
5180           hc08 test
5181         * support/regression/tests/zeropad.c: define idata as data for hc08
5182
5183 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5184
5185         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
5186         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
5187         labels are referenced at least once (even if a reference is not found)
5188         * src/hc08/gen.c (emitcode): set isComment flag for comments
5189         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
5190         loads), rules 6a..6b (optimize jumps to return)
5191
5192 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5193
5194         * device/lib/acosf.c (acosf),
5195         * device/lib/asinf.c (asinf),
5196         * device/lib/atanf.c (atanf),
5197         * device/lib/ceilf.c (ceilf),
5198         * device/lib/cosf.c (cosf),
5199         * device/lib/coshf.c (coshf),
5200         * device/lib/cotf.c (cotf),
5201         * device/lib/fabsf.c (fabsf),
5202         * device/lib/floorf.c (floorf),
5203         * device/lib/log10f.c (log10f),
5204         * device/lib/logf.c (logf),
5205         * device/lib/sinf.c (sinf),
5206         * device/lib/sinhf.c (sinhf),
5207         * device/lib/sqrtf.c (sqrtf),
5208         * device/lib/tanf.c (tanf),
5209         * device/lib/tanhf.c (tanhf),
5210         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
5211         replaced all instances of "reentrant" in the library functions
5212         defined in math.h with this macro.
5213         * support/regression/tests/float_trans.c: reenabled test for hc08
5214
5215 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
5216
5217         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
5218         erroneously deleted
5219
5220 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5221
5222         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
5223         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
5224         multi-byte volatile operands are used
5225         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
5226         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
5227         initialization to area GSINIT0 so that it would always precede
5228         any static initializers in GSINIT
5229         * support/regression/tests/zeropad.c: fixed idata define for hc08
5230         * support/regression/tests/bug-927659.c,
5231         * support/regression/tests/float_trans.c: disabled tests for hc08
5232         pending missing library routines
5233         * .version: increased version number to 2.4.4 - hc08 port now passes
5234         regression tests
5235
5236
5237 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
5238
5239         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
5240         * Makefile.common.in,
5241         * as/Makefile,
5242         * as/hc08/Makefile.in,
5243         * as/mcs51/Makefile.in,
5244         * as/z80/Makefile.in,
5245         * debugger/mcs51/Makefile.in,
5246         * device/include/Makefile.in,
5247         * device/lib/Makefile.in,
5248         * doc/Makefile,
5249         * link/Makefile,
5250         * link/z80/Makefile.in,
5251         * packihx/Makefile.in,
5252         * sim/ucsim/main_in.mk,
5253         * sim/ucsim/avr.src/Makefile.in,
5254         * sim/ucsim/doc/Makefile.in,
5255         * sim/ucsim/gui.src/serio.src/Makefile.in,
5256         * sim/ucsim/hc08.src/Makefile.in,
5257         * sim/ucsim/s51.src/Makefile.in,
5258         * sim/ucsim/xa.src/Makefile.in,
5259         * sim/ucsim/z80.src/Makefile.in,
5260         * src/Makefile.in,
5261         * support/cpp2/Makefile.in,
5262         * support/librarian/Makefile,
5263         * support/makebin/Makefile: added DESTDIR to the install path proposed
5264         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5265         * doc/sdccman.lyx: added DESTDIR documentation
5266
5267 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5268
5269         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5270         instruction for interrupt handlers, use fast returns when returning
5271         from high priority interrupts
5272
5273 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5274
5275         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5276         code generation
5277         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5278         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5279         bugs, ported much of Bernhard's code from mcs51
5280         * src/mcs51/gen.c (genSend),
5281         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5282         than one when calling a reentrant function
5283         * device/lib/_mullong.c: defined an alternate struct layout for big
5284         endian ports (hc08)
5285
5286 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5287
5288         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5289         test
5290
5291 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5292
5293         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5294         are sane and complete before asking the port its prefered parameter
5295         passing method (fixes bug #1017633)
5296         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5297         and _ret3
5298
5299 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5300
5301         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
5302         problem in bitfields >= 8 bits.
5303
5304 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5305
5306         * src/SDCCsymt.c: undid changes that were not meant to be committed
5307
5308 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5309
5310         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
5311
5312 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5313
5314         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
5315           copied and wrong bit got inverted
5316
5317 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5318
5319         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
5320         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
5321         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
5322         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
5323         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
5324         assignments to bitfields at known addresses
5325         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
5326         reads from bitfields at known addresses
5327         * src/hc08/ralloc.c (packRegisters),
5328         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
5329         genhc08Code): optimize pointer get values used as conditionals
5330         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
5331         and branch
5332
5333 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5334
5335         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
5336         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
5337         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
5338         as conditionals
5339
5340 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5341
5342         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
5343
5344 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5345
5346         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
5347         related problems
5348
5349 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
5350
5351         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
5352
5353 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5354
5355         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
5356         mcs51 port
5357
5358 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
5359
5360         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
5361
5362 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5363
5364         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
5365         cases use more compact code.
5366
5367 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
5368
5369         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
5370
5371 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5372
5373         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
5374
5375 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5376
5377         * src/SDCCsymt.h,
5378         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
5379         parameter of changePointer() from symbol* to sym_link*
5380         * src/SDCCast.c (decorateType): call changePointer() for CAST op
5381         * src/SDCCsymt.c (compareType): void* type is castable to other
5382         pointers, but not necesarily an exact match.
5383         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
5384         is no longer blindly treated as an exact match.
5385         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
5386
5387 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
5388
5389         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
5390
5391 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
5392
5393         * src/pic/gen.c,
5394         * src/pic/pcode.c,
5395         * src/pic/ralloc.h,
5396         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
5397
5398 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
5399
5400         * src/pic/device.c,
5401         * src/pic/device.h,
5402         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
5403
5404 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5405
5406         * src/mcs51/gen.c (emitcode): fixed bug #992819
5407
5408 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
5409
5410         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
5411           there's no need to make it worse
5412
5413 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5414
5415         * src/mcs51/ralloc.c (deassignLR),
5416         * src/ds390/ralloc.c (deassignLR),
5417         * src/hc08/ralloc.c (deassignLR),
5418         * src/z80/ralloc.c (deassignLR),
5419         * src/pic/ralloc.c (deassignLR),
5420         * src/pic16/ralloc.c (deassignLR),
5421         * src/avr/ralloc.c (deassignLR),
5422         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
5423         rlivePoint): fixed another part of bug #971834
5424
5425 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5426
5427         * src/z80/main.c: enabled "critical" keyword
5428         * src/z80/mappings.i,
5429         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
5430         functions (fixes bug #979646)
5431         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
5432
5433 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5434
5435         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
5436           such as c:\mydir.
5437
5438 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
5439
5440         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
5441           doesn't disable too much optimizations
5442
5443 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5444
5445         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
5446
5447 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
5448
5449         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
5450
5451 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5452
5453         * src/pic/gen.c tidied up tabs
5454         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
5455         * src/pic/main.c tidied up tabs
5456         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
5457         * src/pic/pcoderegs.c tidied up tabs
5458         * src/pic/ralloc.c tidied up tabs
5459
5460 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
5461
5462         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
5463         to S_FIXED for pic16 port and when symbol is not in level 0,
5464         allocate for S_REGISTER storage class and pic16 port, too,
5465         * src/pic16/device.h: prototype for checkSym,
5466         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
5467         * (pic16_assignConfigWordValue): test the value and the mask to
5468         validate that the value is suitable for the configuration word,
5469         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
5470         collect extern declared symbols, don't emit symbol twice, check
5471         first if symbol is in publics set first,
5472         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
5473         * added command line '--fstack' which enables an experimental
5474         feature for stack access, too buggy to be used yet...
5475         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
5476         * (pic16_allocDirReg): when register has storage class S_REGISTER
5477         allocate in pic16_dynAccessRegs,
5478         * device/include/pic16/pic18f????.h: modified configuration word
5479         naming convention, words started as CONFIG0H but should be CONFIG1H
5480
5481 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
5482
5483         * device/include/mcs51reg.h: fixed bug 970993
5484
5485 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
5486
5487         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
5488         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
5489         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
5490         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
5491         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
5492         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
5493           error/warning numbers,
5494           added function setWarningDisabled()
5495         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
5496         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
5497           _memcmp.c _memmove.c calloc.c realloc.c free.c
5498         * support/regression/tests/malloc.c: added tests for new functionality
5499         * support/regression/tests/zeropad.c: added tests for truncated initializers
5500           and initialized char arrays starting with '\x0'
5501         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
5502
5503 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
5504
5505         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
5506
5507 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5508
5509         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
5510         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
5511         peephole 177.e. Thanks to anonymous
5512
5513 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
5514
5515         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
5516         function isn't used in the source but referenced as a
5517         variable initializer then declare it as extern in .asm file
5518
5519 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
5520
5521         * .version: increased version number to 2.4.3
5522
5523         Adding version extension according to ChangeLog CVS revision
5524         * src/Makefile.in (target all): added dependency 'version.h'
5525         * (rule version.h): added rule to create version.h from ChangeLog,
5526         * (rule dep): added dependency version.h,
5527         * src/version.awk: AWK script to create version.h
5528         * src/SDCCdwarf2.c (dwWriteModule),
5529         * src/SDCCglue.c (initialComments),
5530         * src/SDCCmain.c (printVersionInfo): modified to write after
5531         version string the version extension number,
5532         * src/SDCCutil.c: included "version.h"
5533         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
5534         number,
5535         * src/SDCCutil.h: added prototype for getBuildNumber
5536
5537         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
5538         includeDirsSet, too,
5539         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
5540         const char [] is found in function prototype...
5541
5542         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
5543         moving to WREG with source is already in WREG,
5544         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
5545         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
5546         * (aopForSym): stack'ed symbols are partially supported, added
5547         if-clause to support symbols in FARSPACE,
5548         * (sameRegs): added test for AOP_ACC to see if registers are same,
5549         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
5550         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
5551         * (pic16_popRegFromString): will not allocate a new register if it
5552         doesn't find one by name, bug may have introduced...
5553         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
5554         * (genIpush): revived to use pic16 port's stack,
5555         * (genAddrOf): added incomplete case for stack'ed operand,
5556         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
5557         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
5558         can handle multibyte operands,
5559         * src/pic16/glue.c (pic16_printIval*): some debug info added,
5560         * (pic16initialComments): added message for MPLAB compatibility
5561         mode enabled,
5562         * src/pic16/main.h: prototype for pic16_mplab_comp,
5563         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
5564         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
5565         * (_pic16_linkEdit): NEW, handles link stage, transferred here
5566         because of increased complexity of procedure,
5567         * (_process_pragma): stack pragma changed to format 'stack pos len',
5568         emit symbol '_stack_end' to conform with gplink,
5569         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
5570         to search for register,
5571         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
5572         PO_GPR_REGISTER,
5573         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
5574         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
5575         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5576         case for PO_GPR_REGISTER,
5577         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
5578         dies, the new era is ahead !...
5579         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
5580         pic16_dynInternalRegs,
5581         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
5582         * (pic16_allocDirReg): minor optimizations and bug fixes,
5583         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
5584
5585         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
5586         load stack and frame pointer with address of 'stack_end' symbol
5587
5588 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
5589
5590         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
5591         without source code but only variable initializers
5592
5593 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
5594
5595         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
5596         external are not declared as extern to reduce overhead while linking
5597
5598 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
5599
5600         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
5601
5602 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
5603
5604         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
5605           Yee Keat for the patch
5606         * src/SDCCast.c (decorateType): fixed bug #979599
5607         * src/ds390/gen.h: removed local fReturnSizeDS390
5608         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
5609         * src/ds390/gen.c (genAnd, genOr, genXor),
5610         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
5611
5612 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
5613
5614         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
5615         add relFilesSet to $3, manipulate $2 to handle linking of object
5616         files without source files in command line,
5617         * device/include/pic16 (all headers): added ID location macros,
5618         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
5619         entries for ID location bytes,
5620         * (pic16_assignIdByteValue): NEW,
5621         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
5622         added field dumpcalltree to pic16_options_t,
5623         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
5624         is used instead of pic16_Gstack_base_addr, check if (ifx) before
5625         emitting rFalseIfx label after check_carry label,
5626         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
5627         pic16_emitDIRegs), NEW
5628         * (pic16glue): dump .calltree file when option --calltree found,
5629         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
5630         * (_pic16_genAssemblerPreamble): emit ID locations after
5631         configuration registers,
5632         * (pic16_linkCmd): modifications of the link command,
5633         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
5634         * (pic16_pCodeInitRegisters): don't init stack registers,
5635         * (pic16_findPrevInstruction): fixed bug,
5636         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
5637         bug with immediate registers,
5638         * (buildCallTree): traces stack push and pop,
5639         * (pct2): dump also stack usage for each function,
5640         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
5641         * (pic16_allocDirReg): various modifications,
5642         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
5643         fixed to 1,
5644
5645 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
5646
5647         * src/pic16/pcode.c: removed buggy double colon
5648
5649 2004-07-01 Borut Razem <borut.razem AT siol.net>
5650
5651         * support/scripts/sdcc.nsi: added include/pic16 to setup
5652
5653 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
5654
5655         * device/lib/Makefile.in: fixed bug in target objects-pic16,
5656         * device/lib/pic16/Makefile: prefixed with dash (-) command under
5657         target 'clean',
5658         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
5659         specific command line arguments. Also added sample lkr script
5660         for placing a variable at a specific memory bank.
5661         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
5662         at a specific memory bank,
5663         * (pic16_dump_isection): fixed bug which caused string literals to
5664         be omitted when dumping idata section,
5665         * (pic16_groupRegistersInSection): added code to handle registers
5666         in specific memory banks,
5667         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
5668         public, all references are renamed too,
5669         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
5670         AOP_DPTR2,
5671         * (pic16_storeForReturn): added case to handle when dest is WREG,
5672         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
5673         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
5674         pic16_rel_udata, check to see if that register is marked as being
5675         a member of a specific memory bank,
5676         * (pic16_printIvalCharPtr): added code to add string literals either
5677         to code or the idata sections,
5678         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
5679         also accept the 'udata' pragma,
5680         * src/pic16/main.h: new structure types sectName and sectSym
5681         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
5682         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
5683         * (pic16_findPrevInstruction): fixed, it returned nothing,
5684         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
5685         instruction combinations,
5686         * (pic16_FixRegisterBanking): heavily reorganised,
5687         * (pic16_AnalyzeBanking): if generating banksel directives is
5688         disabled, then don't call FixRegisterBanking at all,
5689         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
5690         completely removed,
5691         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
5692
5693 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
5694
5695         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
5696         Phuah Yee Keat <yk.phuah AT nestac.com>
5697
5698 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5699
5700         * src/pic16/glue.c (pic16createInterruptVect): function now emits
5701         correctly the IVT even if it is relocated to some other location
5702
5703 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5704
5705         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
5706         * device/include/pic16/pic18f2220.h: NEW,
5707         * device/lib/pic16/libdev/pic18f2220.c: NEW,
5708         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
5709         * src/pic16/device.c (struct Pics16): added info for 18f2220,
5710         * src/pic16/device.h (struct pic16_options): added ivt_loc and
5711         nodefaultlibs, ivt_loc is the location of the interrupt vector
5712         table, and nodefaultlibs signs that default libraries should not be
5713         linked in link stage,
5714         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
5715         according to --ivt-loc argument,
5716         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
5717         when pragma stack is found,
5718
5719 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5720
5721         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
5722         256 (range check), 257 (do while), 258.a-f (bit banging
5723         f.e. on 3-wire SPI bus)
5724
5725 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5726
5727         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
5728         variables used exclusively within a loop
5729
5730 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
5731
5732         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
5733
5734 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5735
5736         * src/SDCClrange.c (computeClash): fixed bug #971834
5737
5738 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5739
5740         * src/mcs51/gen.c (genCmp): fixed bug #975903
5741         * src/hc08/gen.c (operandsEqu),
5742         * src/ds390/gen.c (operandsEqu),
5743         * src/z80/gen.c (operandsEqu),
5744         * src/pic/gen.c (operandsEqu),
5745         * src/pic16/gen.c (operandsEqu),
5746         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
5747         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
5748
5749 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5750
5751         * src/SDCCcse.c (cseBBlock): fixed bug #966963
5752
5753 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
5754
5755         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
5756         default case in switch statement,
5757         * glue.c (pic16_initPointer): expr is initialised via decoarteType
5758         to eliminate problem with initialisation of pointers, but problem
5759         still exists,
5760         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
5761         * (emitStaticSegment): removed various lines emitting debug info,
5762         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
5763         added processor registers for utilizing EEPROM,
5764         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
5765         configurable and set 8
5766
5767 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
5768
5769         * .version: increased version number to 2.4.2,
5770
5771         Cumulative patch for pic16 port
5772         * src/pic16/device.c: changed scheme to dump initial values for
5773         variables in idata segment, all print_idata* functions were removed,
5774         now the pic16_printIval* will be called,
5775         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
5776         * _pic16_printPointerType, pic16_printPointerType,
5777         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
5778         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
5779         NEW, similar to the respective functions in SDCCglue.c,
5780         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
5781         way, emitting hex bytes,
5782         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
5783
5784 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5785
5786         * src/avr/ralloc.c (serialRegAssign),
5787         * src/xa51/ralloc.c (serialRegAssign),
5788         * src/pic/ralloc.c (serialRegAssign),
5789         * src/pic16/ralloc.c (serialRegAssign),
5790         * src/hc08/ralloc.c (serialRegAssign),
5791         * src/z80/ralloc.c (serialRegAssign),
5792         * src/ds390/ralloc.c (serialRegAssign),
5793         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5794
5795 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5796
5797         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5798         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5799
5800 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5801
5802         Cumulative patch for pic16 port:
5803         * src/pic16/device.h (typedef PIC16_device) modified fields for
5804         defining microcontrollers,
5805         * src/pic16/device.c: added new info for all devices in Pics16 array,
5806         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5807         to be optimised out by the pCode optimiser,
5808         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5809         specially, bug reported by G.M. Gallant,
5810         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5811         as force'd so that cannot be optimised out by pCode optimiser,
5812         * src/pic16/pcode.c,
5813         * src/pic16/pcodepeeph.c,
5814         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5815         they are disabled by default, but can be enabled explicit with
5816         command argument --denable-peeps, for testing,
5817         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5818         --pomit-ivt in COMPILE_FLAGS
5819
5820 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5821
5822         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5823           compilation on MSVC
5824
5825 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5826
5827         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5828
5829 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5830
5831         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5832         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5833
5834 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5835
5836         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5837         would only assign 0x300001 register.
5838
5839 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5840
5841         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5842         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5843
5844 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5845
5846         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5847         for ds80c400
5848         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5849         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5850         added peephole 254 (left shift), 255 (jump table)
5851
5852 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5853
5854         * device/lib/Makefile.in: removed comment line with model-pic16,
5855         * (target port-specific-objects-pic16): the libraries and objects
5856         are copied to the build directory form the device/lib/pic16/bin
5857         directory
5858
5859         Cumulative patch concerning pic16 port:
5860         * library directory has been re-organized,
5861         * added support for PIC18F1220,
5862         * added headers and library sources for chips 18f1220,18f6520,
5863         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5864
5865         * configuration registers setting has changed, now each supported
5866         device has a complete description of the registers it uses,
5867         * all initialisations are moved to idata sections, these section
5868         can be absolute or relocatable,
5869         * fixed initialisation of codespace variables,
5870         * fixed warning about PCLATU and gpsim,
5871         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5872         * (genAssign): use table reads when assigning from variables in codespace,
5873         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5874         char/int variables placed in codespace,
5875         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5876         registers set in .asm file, no need for --pomit-config-words anymore,
5877         * (pic16glue): some 8051 legacy segments are commented out
5878         (to be removed completely),
5879         * added support for alternative assembler and linker with --asm=
5880         and --link= command line arguments,
5881         * peepholes are disabled automatically in the port, no need to
5882         specify on command line,
5883         * port supports natively char/int/long multiplication, but converts
5884         all divisions to support functions,
5885         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5886         to the file set in variable $2,
5887         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5888         strings in ASCII format and not in hex,
5889         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5890         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5891         allocate proper register if iCodes aren't temporary,
5892
5893 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5894
5895         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5896
5897 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5898
5899         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5900         is commented out
5901
5902 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5903
5904         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5905         computed address is reused
5906         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5907         multi-byte bitfields
5908
5909 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5910
5911         * src/z80/gen.c: (genArrayInit): must check for pointers too
5912
5913 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5914
5915         * support/regression/tests/zeropad.c: never meant to commit the
5916           nestedstruct test: removed, added check for GCC version
5917
5918 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5919
5920         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5921         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5922         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5923           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5924           bugs 928906 and 954082 half-empty initializers
5925         * src/SDCCsymt.h,
5926         * src/SDCCsymt.c (getAllocSize): added for above fix
5927         * src/z80/gen.c (genArrayInit): fixed bug 741044
5928         * support/regression/tests/zeropad.c: added tests
5929
5930 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5931
5932         * src/pic16/device.c (pic16_dump_section): corrected bug which
5933         caused some symbols of the libraries to be misplaced
5934
5935 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5936
5937         * src/pic16/glue.c,
5938         * src/pic16/ralloc.h,
5939         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5940         to fix conflict with pic port
5941
5942 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5943
5944         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5945         externs configuration variables,
5946         * src/pic16/ralloc.h,
5947         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5948         prototype in header, commented out some debug messages
5949
5950 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5951
5952         * src/pic16/glue.c,
5953         * src/pic16/main.c,
5954         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5955         for gpasm COFF object generation. Thanks to D. Hawkins for
5956         his patch info
5957
5958 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5959
5960         * src/ds390/main.c,
5961         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5962         Brock for spotting this)
5963         * src/ds390/gen.c (genEndFunction),
5964         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5965         interrupt handler and critical. Disable push/pop optimizations when
5966         peephole optimizations disabled.
5967
5968 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5969
5970         Updated pic16 library sources and headers.
5971         * device/lib/pic16/pic18f*/ ,
5972         * device/include/pic16/*.h: modified to handle structured SFR
5973         definitions
5974
5975 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5976
5977         * src/port.h (PORT structure): added hook initPaths, now each
5978         port can declare its own default search paths,
5979         which can been seen with the --print-search-dirs option,
5980         see pic16 port for example,
5981         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5982         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5983         * (doPrintSearchDirs): NEW, replaces in a central manner the
5984         printing of search dirs which was split in set*Paths functions,
5985         * (main): added call to port->initPaths and doPrintSearchDirs,
5986         * src/avr/main.c,
5987         * src/ds390/main.c,
5988         * src/hc08/main.c,
5989         * src/izt/i186.c,
5990         * src/izt/tlcs900h.c,
5991         * src/mcs51/main.c,
5992         * src/pic/main.c,
5993         * src/pic16/main.c: modified port structures to reflect addition of
5994         initPaths hook,
5995
5996         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5997         * (pic16_dump_section): for registers in same address reserve memory once,
5998         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5999         to no_banksel,
6000         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
6001         result is greater in size than right or left,
6002         * (pic16_genUMult8X8_8): there are some cases where the result can
6003         be 16 bits size, so handle these,
6004         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
6005         * (pic16_outBitC): modified to emit pcodes,
6006         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
6007         or not,
6008         * (genDivOneByte): implemented algorithm to divide 8-bits,
6009         * (genCmp): uncommented goto, but issues still exist,
6010         * (genAnd): fixed a bug with variables >8bits,
6011         * (genPackBits): optimization added that uses BCF/BSF to change a
6012         single bit,
6013         * (genAssign): fixed bug when assigning floating point literals,
6014         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
6015         __sdcc_gsinit_startup label,
6016         * src/pic16/main.c (_pic16_init): removed search directory
6017         initialisations,
6018         * (_pic16_initPaths): NEW, used to initialise search directories,
6019         * (_hasNativeMulFor): support functions for all except char/int
6020         multiplication, and char division,
6021         * (PIC16_port struct): modified entry for native mul support,
6022         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
6023         no_banksel option,
6024         * (buildCallTree): call to register_usage is ifdef'ed out,
6025
6026 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6027
6028         * device/include/string.h: applied Stas Sergeev's patch to make this
6029         header file compatible with the preprocessor -Wundef option
6030         * src/SDCCmain.c (main): abort compilation if preprocessor reports
6031         failure (fixes bug #941458)
6032
6033 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6034
6035         * src/SDCCopt.c (killDeadCode): fixed bug #907733
6036         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
6037         that the variable, not the function, should be static
6038         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
6039         to be consistent with non-literal case
6040
6041 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6042
6043         * src/SDCCast.c (isConformingBody): fixed bug #949967
6044         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
6045         convilong): fixed bug #952086
6046
6047 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6048
6049         * src/SDCCmem.c (allocVariables): fixed bug #955321
6050
6051 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6052
6053         * src/hc08/main.c (_hc08_genAssemblerEnd),
6054         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
6055         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
6056         completely eliminated the use of a temporary file
6057         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
6058         when more than one file linked
6059         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
6060
6061 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6062
6063         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
6064         which fixes bug #543481
6065         * support/regression/tests/bug-751703.c: fixed comments left from a
6066         cut and paste error
6067         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
6068         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
6069         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
6070         scopes
6071         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
6072         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
6073         are now changed to underscores in moduleName
6074
6075 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6076
6077         * as/mcs51/lkmem.c: better fix for bug #954173
6078
6079 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
6080         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6081
6082         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
6083         * device/include/c8051f000.h,
6084         * device/include/c8051f120.h,
6085         * device/include/c8051f300.h,
6086         * device/include/c8051f310.h,
6087         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
6088         PWM16) and detab'ed
6089
6090 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6091
6092         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
6093         and mailing lists, doc'ed --no-peep-comments, removed reference
6094         to knoppix (newest version has no LyX/LaTeX), other minor changes
6095         * src/SDCCglue.c (glue): save 2 bytes stack space with
6096         option --main-return. The ljmp could probably be avoided too
6097
6098 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6099
6100         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
6101
6102 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6103
6104         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
6105         * src/SDCCopt.c (isLocalWithoutDef),
6106         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
6107         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
6108         (credit to Maarten Brock for patch #949363, on which this is based)
6109         * support/regression/tests/bug-751703.c: some test cases of extern used
6110         within inner scopes.
6111
6112 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6113
6114         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
6115         SPEC_STRUCT
6116         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
6117         struct definitions
6118         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
6119         dwWriteLabel): fix to create valid debugger symbols even when
6120         the module name has non-alphanumeric symbols in it
6121         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
6122         when a variable's allocation has been optimized away
6123
6124
6125 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6126
6127         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
6128         * src/hc08/main.c,
6129         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
6130         * src/mcs51/main.c,
6131         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
6132         * src/ds390/main.c,
6133         * src/z80/gen.c (z80_emitDebuggerSymbol),
6134         * src/z80/main.c,
6135         * src/pic/gen.c (pic14_emitDebuggerSymbol),
6136         * src/pic/main.c,
6137         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
6138         * src/pic16/main.c,
6139         * src/avr/gen.c (avr_emitDebuggerSymbol),
6140         * src/avr/main.c,
6141         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
6142         * src/xa51/main.c,
6143         * src/SDCCdebug.c (emitDebuggerSymbol),
6144         * src/SDCCdebug.h,
6145         * src/port.h: added a debugger struct to the port struct. Added a
6146         callback for defining debugger symbols
6147
6148         * src/SDCCast.c (createLabel),
6149         * src/SDCC.y (labeled_statement): mark all compiler generated labels
6150         with isitmp = 1
6151         * src/SDCCicode.h,
6152         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
6153         iCode back to the ast for the function
6154
6155         * src/hc08/ralloc.c (hc08_assignRegisters),
6156         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
6157         unneeded fields from the regs struct.
6158         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
6159         pushReg() & pullReg() functions instead of emitcode()
6160
6161         * src/hc08/gen.c (genLabel, genhc08Code),
6162         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
6163
6164         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
6165         debugger hooks
6166
6167         * src/hc08/gen.c (genEndFunction, genhc08Code),
6168         * src/hc08/gen.h,
6169         * src/mcs51/gen.c (genEndFunction, gen51Code),
6170         * src/mcs51/gen.h,
6171         * src/ds390/gen.c (genEndFunction, gen390Code),
6172         * src/ds390/gen.h,
6173         * src/z80/gen.c (genEndFunction, genZ80Code),
6174         * src/z80/gen.h,
6175         * src/z80/z80.h,
6176         * src/pic/gen.c (genEndFunction, genpic14Code),
6177         * src/pic/gen.h,
6178         * src/pic16/gen.c (genEndFunction, genpic16Code),
6179         * src/pic16/gen.h,
6180         * src/avr/gen.c (genEndFunction, genAVRCode),
6181         * src/avr/gen.h,
6182         * src/xa51/gen.c (genEndFunction, genXA51Code),
6183         * src/xa51/gen.h,
6184         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
6185         specific code to cdbFile.c and out of the backend code generators
6186
6187         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
6188         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
6189         starting address is now 0
6190
6191         * as/hc08/asm.h,
6192         * as/hc08/m08pst.c,
6193         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
6194         assembler directive for DWARF support
6195         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
6196
6197         * src/src.dsp,
6198         * src/Makefile.in,
6199         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
6200
6201 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6202
6203         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
6204         and inappropriate peephole optimization in jump tables
6205
6206 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6207
6208         * as/hc08/m08pst.c,
6209         * src/SDCCglue.c: sdccopt works for the hc08 port now
6210
6211 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
6212
6213         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
6214
6215 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6216
6217         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
6218
6219 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6220
6221         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
6222         rules
6223         * src/SDCCmain.c,
6224         * src/SDCCglobl.h,
6225         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
6226         comments from the peephole optimizer replacement rules
6227         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
6228         symbols
6229         * src/SDCCcse.c (updateSpillLocation),
6230         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
6231         equivalents
6232         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
6233         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
6234         objects far pointers
6235
6236 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6237
6238         * src/SDCCsymt.h: a missing part of my last change
6239         * src/pic/ralloc.c (regTypeNum),
6240         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
6241
6242 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6243
6244         * src/SDCCicode.h,
6245         * src/SDCCicode.c (aggrToPtrDclType),
6246         * src/SDCCptropt.h,
6247         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
6248         ptrPseudoSymConvert),
6249         * src/pic/ralloc.c (regTypeNum),
6250         * src/pic16/ralloc.c (regTypeNum),
6251         * src/hc08/ralloc.c (regTypeNum),
6252         * src/ds390/ralloc.c (regTypeNum),
6253         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
6254         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
6255
6256 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6257
6258         * link/z80/lkmain.c (afile),
6259         * as/hc08/lkmain.c (afile),
6260         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
6261         prevent a pointer problem when a filename has no directory and
6262         no extension specified.
6263
6264 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6265
6266         * link/z80/lkmain.c (afile): allow periods in directory names
6267         * link/z80/lkmain.c (afile),
6268         * as/mcs51/lkmain.c (afile),
6269         * as/hc08/lkmain.c (afile): allow linker script file to have an
6270         extension other than ".lnk"
6271         * link/z80/lklex.c (getfid),
6272         * link/z80/lkmain.c (parse),
6273         * as/mcs51/lklex.c (getfid),
6274         * as/mcs51/lkmain.c (parse),
6275         * as/hc08/lklex.c (getfid),
6276         * as/hc08/lkmain.c (parse): Support comments in the linker script
6277         file on lines by themselves and after filenames
6278
6279 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6280
6281         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6282
6283 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6284
6285         * src/z80/peeph-z80.def: removed some peephole rules that don't
6286         work with multibyte arithmetic (fixed bug #937126)
6287         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6288         to registers and not global variables
6289         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6290         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6291         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6292         checking for assignments not internally generated (fixed bug #931895)
6293         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6294         structure member (fixed bug #930072)
6295
6296 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6297
6298         * src/SDCCmain.c (linkEdit),
6299         * src/hc08/main.c (_hc08_parseOptions),
6300         * as/hc08/Makefile.in,
6301         * as/hc08/aslink.h,
6302         * as/hc08/asm.h,
6303         * as/hc08/m08pst.c,
6304         * as/hc08/lkrloc.c (relr, rele),
6305         * as/hc08/lkarea.c (lnkarea)
6306         * as/hc08/lkmain.c (afile, parse),
6307         * as/hc08/lkelf.c: support for ELF output
6308         * as/hc08/lks19.c (s19),
6309         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
6310
6311 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6312
6313         * as/mcs51/lkihx.c: Fixed bug #899105.
6314
6315 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6316
6317         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
6318         .dsp files from Unix to DOS.
6319
6320 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6321
6322         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
6323         function pointers; we have been compliant for several months now.
6324         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
6325         change that was accidently commented out
6326         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
6327         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
6328         bug #922319
6329
6330 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6331
6332         * src/hc08/gen.c: output of all of the internal debugging information
6333         is now controlled by the D() macro; it is disabled by default
6334
6335 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6336
6337         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
6338         harder to keep the same registers during a CAST iCode
6339         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
6340         long via int can be done in a single cast, if the signedness is
6341         correct.
6342         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
6343         putchar() in tinibios.c in ds390's library
6344
6345 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
6346
6347         * src/SDCCast.c (decorateType): fixed bug #898889,
6348         cast result of a literal complement too
6349         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
6350         fixed check for bitfields
6351
6352 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
6353
6354         * src/SDCCicode.c (geniCodeLogic): made it static,
6355         (geniCodeLogicAndOr): added in order to fix bug #905492,
6356         (ast2iCode): fixed bug #905492
6357         * support/regression/tests/bug-905492.c: added
6358         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
6359         (processParms): fixed bug #927659: don't copy parms, this will clear
6360         decorated flag
6361         * support/regression/tests/bug-927659.c: added
6362
6363 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
6364
6365         * src/SDCCast.c (addCast): don't cast float to char
6366         * device/lib/libsdcc.lib: added _memmove
6367
6368 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
6369
6370         * device/lib/large/Makefile: fixed parallel execution by
6371         replacing `make` by `$(MAKE)`
6372
6373 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6374
6375         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
6376         offsets (fixes bug #923936)
6377
6378 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
6379
6380         * device/lib/small/Makefile: fixed parallel execution by
6381         replacing `make` by `$(MAKE)`
6382
6383 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6384
6385         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
6386
6387 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
6388
6389         * src/pic/gen.c (genCpl): multi-byte complements were not working.
6390         * src/regression/Makefile: Regression test was not running.
6391
6392 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6393
6394         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
6395         complement if possible
6396         * src/SDCCval.c (valComplement),
6397         * src/SDCCicode.c (operandOperation): fixed complement of literal
6398         * support/regression/tests/onebyte.c (testComplement): added
6399
6400 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
6401
6402         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
6403         return an optimized tree; actually replace actParm with the new tree
6404         * src/SDCCast.h: added some parantheses to remove side effects
6405         * support/regression/tests/bug-920866.c
6406
6407 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
6408         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
6409         Bit operands were not being handled properly in the pic14 port.
6410         (now src/regression/add.c passes again).
6411
6412 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6413
6414         * src/SDCC.y (labeled_statement): case and default no longer require
6415         a following statement (RFE #893037)
6416
6417 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6418
6419         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
6420         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
6421         disabled (fixes bug #916294)
6422         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
6423         "mov a,acc"; patch provided by Lenny Story
6424         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
6425
6426 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6427
6428         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
6429         functions
6430         * src/ds390/gen.c (genFunction, genEndFunction),
6431         * src/ds390/ralloc.c (ds390_assignRegisters),
6432         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
6433         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
6434         pushed if there are parameters passed on the stack. Also, a cleaner
6435         way to decide if r0/r1 should be pushed/popped. (Together they fix
6436         bug #918693)
6437
6438 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6439
6440         * doc/sdccman.lyx,
6441         * device/lib/mcs51/crtpagesfr.asm,
6442         * device/lib/mcs51/crtxinit.asm,
6443         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
6444         to avoid confusion with Si Lab's SFRPAGE register.
6445
6446 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6447
6448         * src/SDCCglue.c (emitMaps): allow public sfr variables
6449         * src/SDCCglue.c (initialComments): include compiler build date
6450         with compiler version and put the timestamp of the generated
6451         assembly file on a serperate line to be less confusing.
6452         * src/port.h: added genInitStartup hook
6453         * src/avr/main.c,
6454         * src/ds390/main.c,
6455         * src/hc08/main.c,
6456         * src/pic/main.c,
6457         * src/pic16/main.c,
6458         * src/xa51/main.c,
6459         * src/z80/main.c: genInitStartup initialize as NULL (default to
6460         historical behaviour)
6461         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
6462         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
6463         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
6464         library instead of hard coding it into the compiler.
6465         * support/regression/ports/mcs51-stack-auto/spec.mk,
6466         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
6467         * device/lib/mcs51/Makefile,
6468         * device/lib/small/Makefile,
6469         * device/lib/large/Makefile,
6470         * device/lib/mcs51/crtpagesfr.asm,
6471         * device/lib/mcs51/crtstart.asm,
6472         * device/lib/mcs51/crtxclear.asm,
6473         * device/lib/mcs51/crtxinit.asm,
6474         * device/lib/mcs51/crtclear.asm,
6475         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
6476         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
6477         and into user configurable files.
6478         * device/lib/clean.mk: clean mcs51 directory too
6479         * support/regression/tests/longlit.c: added static to T1 declaration
6480         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
6481         accesses in the initialization code
6482
6483 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6484
6485         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
6486         OSCTRIMVAL as noted in bug #916008
6487
6488 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6489
6490         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
6491         in loops with multiple exits (reported as incorrect registers
6492         used by Martin Helmling in Sdcc-user list)
6493
6494 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6495
6496         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
6497         made ds390 register extensions look less like error messages
6498
6499 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6500
6501         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
6502         reported by Adam Wozniak in Sdcc-user list
6503
6504 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
6505
6506         * src/SDCCast.c (decorateType): fixed with bug and promotion in
6507         arithmetic optimizations, added debug output
6508
6509 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
6510
6511         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
6512         * sdcc.spec: updated and split sdcc into 3 rpms
6513         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
6514         needed for literals of LEFT_OP and '+'
6515         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
6516         introduced RESULT_TYPE_NOPROM
6517         (geniCodeMultiply): fixed logic for decision if mul is optimized to
6518         left shift
6519         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
6520         limited promotion to int only for '*'
6521         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
6522
6523 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
6524
6525         * src/pic16/gen.c (genSkip),
6526         (genc16bit2lit), (gencjneshort): commented out
6527         (is_LitOp): new helper function, checks operand type
6528         (genCmpEq): rewritten
6529
6530 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
6531
6532         * support/regression/tests/bug-908454.c: added
6533
6534 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
6535
6536         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
6537         * src/SDCCicode.c (usualBinaryConversions): op needs int type
6538         (geniCodeCast): cosmetic, don't preserve bit storage class
6539         (geniCodeLeftShift): added promotion
6540         (geniCodeLogic): fixed regression
6541         * src/SDCCsymt.c (computeTypeOr): accept bits too
6542         (compareType): 2nd part of fix for bug #908454, needed for bitfields
6543
6544 2004-03-07  Borut Razem <borut.razem AT siol.net>
6545
6546         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
6547
6548 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
6549
6550         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
6551         version of pic16_genPackRegisters which does not check if ic is a
6552         CAST operator,
6553         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
6554         function cause string1.c regression test fails
6555
6556 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
6557
6558         * sim/ucsim/configure.in,
6559         * sim/ucsim/configure,
6560         * sim/ucsim/doc/Makefile.in: use docdir
6561         * src/SDCC.y: fixed sbit atrributes
6562         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
6563         * src/SDCCast.c (decorateType): |^& need special promotion handling
6564         * src/SDCCast.h,
6565         * src/SDCCsymt.h: moved definition of RESULT_TYPE
6566         * src/SDCCsymt.h (computeType),
6567         * src/SDCCicode.c: computeType() needs op
6568         * src/SDCCsymt.c (checkTypeSanity),
6569         * doc/sddman.lyx: "plain" bitfields are unsigned
6570         * src/SDCCsymt.c (computeTypeOr): added
6571         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
6572         |^& ops
6573         * src/SDCCval.c (val*): computeType() needs op
6574         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
6575         * support/regression/tests/onebyte.c: added tests for |^&
6576
6577 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
6578
6579         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
6580         for writing icode into asm output.
6581
6582 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
6583
6584         * src/pic16/device.c: added some debug lines enabled
6585         with macro DEBUG_CHECK,
6586         * src/pic16/genarith.c: more debug in genPlus,
6587         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
6588         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
6589         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
6590         * (aopForSym): onStack symbols are re-placed in data memspace,
6591         and onStack flag is cleared,
6592         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
6593         copy temporary pcodeop,
6594         * (genPcall): added warning for not updating PCLATU,
6595         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
6596         always true for pic16 port,
6597         * (genMultOneWord): NEW, supports integer multiplication,
6598         * (genMult): modified to call genMultOneWord,
6599         * (ifxForOp): added warning when return NULL,
6600         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
6601         flag is set before call to operandFromSymbol for implicit
6602         added structures,
6603         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
6604         options.intlong_rent are set by default,
6605         * (_hasNativeMulFor): modified to allow port generation of integer
6606         multiplication,
6607         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
6608         set regtype to REG_SFR for all registers, restricting seting the
6609         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
6610
6611 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6612
6613         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
6614         more than 500 times in the regression tests
6615
6616 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6617
6618         * support/Util/SDCCerr.h,
6619         * support/Util/SDCCerr.c,
6620         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6621         enumerator_list),
6622         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
6623         for symbol conflicts.
6624         * support/valdiags/tests/enum.c,
6625         * support/valdiags/tests/tentdecl.c,
6626         * support/valdiags/tests/struct.c: expect possible error messages
6627         referring to original symbol definitions.
6628         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
6629         * src/SDCCsymt.h,
6630         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
6631
6632 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
6633
6634         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
6635
6636 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
6637
6638         * src/pic16/ralloc.c (newReg): fixed bug #908929
6639
6640 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6641
6642         * src/ds390/gen.c: added missing #include "main.h"
6643
6644 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
6645
6646         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
6647         checking if symbol is already in set,
6648         * src/pic16/device.h: prototype for checkAddSym,
6649         * src/pic16/gen.c: (_G): added entry interruptvector,
6650         * (assignResultValue): removed some commented out lines,
6651         * (genFunction): check for ISR via sym->type, absolute section for
6652         interrupt code is created via a new pBlock, the goto instruction is
6653         placed now correctly at the interrupt vector position, changed all
6654         references from ivec to _G.interruptvector,
6655         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
6656         is the interrupt is a high priority one, same for return from ISR,
6657         * src/pic16/glue.c: changed all calls of addSetHead for publics and
6658         externs to calls of checkAddSym,
6659         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
6660         pic16_pcode_verbose flag is set,
6661         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
6662         * src/pic16/pcoderegs.c: message about how many registers are saved
6663         will only be emitted if pic16_pcode_verbose flag is set,
6664
6665 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6666
6667         * src/ds390/ralloc.h,
6668         * src/ds390/ralloc.c (ds390_regWithIdx),
6669         * src/ds390/gen.c (emitcode),
6670         * src/ds390/main.h,
6671         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
6672         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6673         ds390operandCompare, getRegsRead, getRegsWritten,
6674         initializeAsmLineNode): customized instruction size calculation for
6675         ds390, started basis for some register optimizations
6676         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
6677         corresponding assembly output
6678         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
6679         missing push/pop of r0/r1. Optimized push/pops
6680
6681 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6682
6683         * src/mcs51/main.c (instructionSize): fixed ACALL size
6684         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
6685
6686 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
6687
6688         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
6689         the sorting of rlist with NULL elements
6690         * (print_idataType, print_idata): NEW to create idata sections
6691         * src/pic16/device.h: idataSymSet new variable
6692         * src/pic16/gen.c (genFunction): fixed some bugs in string
6693         comparing, improved the absolute section creation for ISRs,
6694         added FSR0L/FSR0H in registers that are saved in an ISR,
6695         * (genInline): fixed the processing of inline snippets,
6696         now they undergo no process by the peephole optimizer
6697         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
6698         are placed in idataSymSet,
6699         * (pic16emitStaticSeg): extern symbols are added in externs,
6700         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
6701         switching when aboslute variables are placed in access bank memory
6702         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
6703         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
6704         commented out with #if,
6705         * (pic16_packRegisters): reintroduce the check for CAST because some
6706         symbols are not correctly handled,
6707         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
6708         pCodeInstruction instead of pCode,
6709         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
6710         pCodeAsmDir definition,
6711         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
6712         directive, then the argument directive is emitted without the leading
6713         tab, hack for inline labels which must be in the first column,
6714         * (compareLabel,pic16_findNextInstruction),
6715         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
6716         * (insertBankSwitch): modified for the new pCodeAsmDir,
6717
6718 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6719         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
6720
6721         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
6722         instance,
6723         * (pushSide): commented out with #if,
6724         * (assignResultValue): fixed some typos in saving
6725         registers,
6726         * (genPcall): FIXED and sync'ed with genCall,
6727         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
6728         * (genNearPointerGet): fixed to handle some more cases,
6729         implementation scheme via table reads,
6730         * (genConstPointerGet): modified to access code memory correct,
6731         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
6732         and improved to handle some cases
6733         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
6734         instead of "RETLW" for init data
6735         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
6736         not IN_DIRSPACE, work around to reduce bank switching when aboslute
6737         variables are placed in access bank memory (<0x80 and >=0xf80),
6738         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
6739         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
6740         TBLWT_POSTDEC,TBLWT_PREINC
6741         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
6742         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
6743         directives
6744         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
6745         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
6746         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
6747         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
6748
6749 2004-02-29  Borut Razem <borut.razem AT siol.net>
6750
6751         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
6752         support/Util/findme.h, support/Util/system.h: enhance binary relative
6753         search for lib and include by using findProgramPath()
6754
6755 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6756
6757         * src/SDCCpeeph.h,
6758         * src/SDCCpeeph.c (pcDistance),
6759         * src/port.h,
6760         * src/mcs51/ralloc.h,
6761         * src/mcs51/ralloc.c (mcs51_regWithIdx),
6762         * src/mcs51/main.h,
6763         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
6764         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6765         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
6766         size calculation port specific, started basis for some register
6767         optimizations
6768         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
6769         missing push/pop of r0/r1. Optimized push/pops
6770         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
6771         * device/lib/_modsint.c (_modsint),
6772         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
6773         and stack version so regression tests pass
6774
6775 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
6776
6777         * src/Makefile.in (dep): include SLIBOBJS in dependency check
6778         * src/SDCCast.c (decorateType): catch another small optimization
6779         with '?' operator
6780         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
6781         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
6782         modified to finally use computeType() all over SDCC,
6783         see Feature Request #877103
6784         * src/SDCCval.h: cosmetic
6785         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
6786         valCompare(); regression tested in muldiv.c
6787         * support/regression/tests/muldiv.c (testMod): mod sign follows
6788         dividend only
6789
6790 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
6791
6792         * src/SDCCast.c (decorateType): fixed bug #902362
6793         * doc/INSTALL.txt: fixed install instructions for win32
6794
6795 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6796
6797         * device/include/Makefile.in (install): fixed by replacing spaces
6798         by tabs
6799         * doc/README.txt,
6800         * doc/INSTALL.txt: updated for release
6801         * doc/sdccman.lyx: added warning for --xstack being buggy
6802
6803 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6804
6805         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6806         to eliminate build warnings.
6807         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6808
6809 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6810            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6811
6812         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6813         removed -penable-stack, added comment for stack pragma, added
6814         warning for not initializing the stack/frame registers, removed
6815         comment at interrupts section
6816
6817         Stack is made permanent, there is no ability to disable stack usage.
6818         * src/pic16/device.h,
6819         * src/pic16/device.c: removed all references to USE_STACK macro,
6820         * src/pic16/device.c (pic16_dump_section): when no elements in
6821         rlist, free rlist before return,
6822         * (pic16_dump_int_registers): NEW, internal registers are a new set
6823         of general purpose registers reused by each function,
6824         * (checkAddReg): returns 1 if registers is added to set,
6825         * (pic16_groupRegistersInSection): when a registers is of type
6826         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6827         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6828         SRCASECMP macro is moved here from device.c
6829         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6830         PO_PCLATU, PO_PRODL, PO_PRODH,
6831         * (pic16_pCodeOpType, genMinus,
6832         changed compares to "a" register, with AOP_ACC,
6833         * (pic16_genPlus): fixed some bugs and indented properly,
6834         * (pic16_addSign): changed size to size+offset in the MOVWF
6835         instruction,
6836         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6837         multiply 8-bit operand by literal, result is 8-bit,
6838         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6839         multiply 2 8-bit operand, result is 8-bit,
6840         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6841         genUMult8X*_16,
6842         * src/pic16/gen.c: changed accUse to contain WREG only,
6843         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6844         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6845         true, do not use immediate addressing any more unless sym is a
6846         pointer in codespace,
6847         * (aopForRemat): do not use immediate addressing when symbol not in
6848         codespace and when symbol's address is requested,
6849         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6850         accUse size (= 1),
6851         * (aopGet): added case for AOP_ACC and don't return "accumulator
6852         bug" but WREG instead,
6853         * (popGetTempReg): pushes contents of temporary register in stack,
6854         * (popReleaseTempReg): pops contents of temporary register from
6855         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6856         * (pic16_popGet): separated case AOP_ACC to return register WREG
6857         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6858         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6859         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6860         the use of immediate pointers to certain cases only.
6861
6862         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6863         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6864         * (assignResultValue, genCall, genRet): modified to use the new
6865         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6866         genPcall is still broken,
6867         * (genFunction): added code to create 'A' type pBlocks when
6868         interrupt functions are generated, code not extensively tested yet,
6869         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6870         * (genEndFunction): modified so ISRs pop stored registers from stack,
6871         * (genMultOneByte): cleanup,
6872         * (AccRsh): added flag andmask, to and result with appropriate mask,
6873         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6874         * (genDataPointerGet): fixed and reenabled its use,
6875         * (genNearDataPointerGet): bugs fixed,
6876         * (genDataPointerSet): bugs fixed,
6877         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6878         pic16_DumpSymbol, pic16_DumpOp,
6879         * src/pic16/genutils.h: function prototypes for the above functions,
6880         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6881         pointers,
6882         * (pic16emitRegularMap): many many many improvements, but needs a
6883         major cleanup,
6884         * src/pic16/main.c: enable_stack in pic16_options is removed,
6885         * (_pic16_parseOptions): removed command line options -penable-stack,
6886         * (_process_pragma): emit stack symbol only when stack pragma is
6887         processed,
6888         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6889         redirected to FSR0L/FSR0H pair,
6890         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6891         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6892         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6893         for immediates,
6894         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6895         * (dumpPicOptype): NEW,
6896         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6897         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6898         with movff instruction,
6899         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6900         added pic16_int_regs, some packRegsFor* functions are commented out,
6901         because produce errors,
6902         * src/pic16/NOTES: minor modifications
6903
6904 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6905
6906         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6907         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6908         --pack-iram.
6909         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6910         * as/mcs51/lkaomf51.c: fixed bug #895763
6911
6912 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6913
6914         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6915
6916 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6917
6918         * doc/sdccman.lyx: added details about the HC08 storage classes and
6919         interrupts, fixed the register usage info for z80 & gbz80
6920
6921 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6922
6923         * doc/sdccman.lyx: added more pic16 port documentation
6924         * device/include/pic16/: added header pic18fregs.h
6925
6926 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6927
6928         * doc/sdccman.lyx: added Vangelis' contribution
6929
6930 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6931
6932         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6933         extend to the next CALL or PCALL, not just to the next CALL.
6934
6935 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6936
6937         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6938
6939 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6940
6941         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6942         bug #895752 and a better fix for bug #716790
6943
6944 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6945
6946         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6947
6948 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6949
6950         * doc/sdccman.lyx: minor changes, minor changed
6951
6952 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6953
6954         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6955         which can't handle SDCC_NEWONEBYTEOPS,
6956         (geniCodeMultiply): removed conversion from mult to shift for pic14
6957         and pic16
6958
6959 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6960
6961         * src/hc08/gen.h,
6962         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6963         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6964         thus fixing bug #895406
6965
6966 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6967
6968         * device/lib/_modsint.c,
6969         * device/lib/_modslong.c: sign follows divisor only
6970         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6971         signs or signedness can be ignored
6972         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6973         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6974         added optimization for IFX,
6975         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6976         arguments;
6977         reenabled optimization for IFX, which was removed on 2004-01-11
6978         * src/SDCCast.h: added return type IFX
6979         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6980         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6981         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6982         SDCC_OLDONEBYTEOPS selects the old behaviour
6983         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6984         changed again and commented promotion rule
6985         * src/SDCCval.c (valDiv): promotion no longer necessary
6986         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6987         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6988         rewritten
6989         * support/regression/tests/onebyte.c: added
6990
6991 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6992
6993         * gen.c (genInline): reverted to old code for assemnling inline
6994         code because of bug reported James Chadd
6995
6996 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6997
6998         * ralloc.h: missing declarations from previous patch,
6999         seems that patch for ralloc.h was never applied, fixed
7000
7001 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7002            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7003
7004         * pcode.c,
7005         * pcode.h,
7006         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
7007         indirect addressing. Marked FSR0 as deprecated
7008         * gen.c (pointerCode): commented out, not needed now
7009         (pic16_popGet2p): new MOVFF helper function
7010         (genGenPointerGet),
7011         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
7012         (shiftRLong): removed duplicate debugging info
7013
7014 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7015
7016         * src/ds390/gen.c (genNearPointerGet),
7017         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
7018         optimization with bits, but not bitfields.
7019         * src/ds390/ralloc.c (packRegisters),
7020         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
7021
7022 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
7023
7024         * src/SDCCcse.c (algebraicOpts): copy operands before modification
7025
7026 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7027
7028         * src/SDCCsymt.h,
7029         * src/SDCCicode.c (operandFromSymbol),
7030         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
7031         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
7032         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
7033         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
7034         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
7035         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
7036         bug #892038
7037         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
7038         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
7039         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
7040         * src/SDCCsymt.c (newSymbol),
7041         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7042         enumerator_list),
7043         * src/SDCCval.h,
7044         * src/SDCCval.c (newiList): fixed bug #885705
7045
7046 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7047
7048         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
7049         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
7050
7051 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7052
7053         * device/include/c8051f120.h,
7054         * device/include/c8051f300.h,
7055         * device/include/c8051f310.h: added/updated header files for Silicon
7056         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7057         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
7058         in new section Submitting patches
7059
7060 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7061
7062         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
7063         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7064         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7065         genGenPointerSet),
7066         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
7067         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7068         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7069         genGenPointerSet),
7070         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
7071         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7072         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7073         genGenPointerSet),
7074         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
7075         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7076         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7077         genGenPointerSet): fixed bug #892400
7078         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
7079         to eliminate build warnings.
7080         * src/SDCCast.c (processParms),
7081         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
7082         fixed bug 751859
7083         * support/valdiag/valdiag.py: added GCC to the list of defines active
7084         when compiling with gcc
7085
7086 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7087
7088         * support/Util/SDCCerr.h,
7089         * support/Util/SDCCerr.c,
7090         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
7091         with an incomplete type (fixed bug #883734)
7092         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
7093
7094 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7095
7096         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
7097
7098 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7099
7100         * src/SDCCast.c (decorateType),
7101         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
7102         function pointer implementation
7103         * support/regression/tests/funptrs.c: added tests to verify both forms
7104         of function pointers work correctly. Added tests to verify parameters
7105         are passed in the correct order.
7106
7107 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
7108
7109         * device.c (regCompare): registers are sorted by ascending
7110         address and increasing size,
7111         * main.c (_pic16_finaliseOptions): removed the declaration
7112         of compiler macro MCU. Now a macro of the format pic18fxxxx
7113         will be defined from the command line
7114
7115 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7116             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7117
7118         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
7119         PCOP_RLCF was overwritten!
7120         * gen.c (genSkip): commented out calls to pic16_emitcode,
7121         * (genCmpEQ): fixed "long" compares, only high word did get compared,
7122         * (genlshTwo),
7123         * (genRRC): added debugging info,
7124         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
7125         overwritten while shifting,
7126         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
7127         overwritten while shifting,
7128         * (AccLsh),
7129         * (AccRsh),
7130         * (shiftLLeftOrResult),
7131         * (shiftRLeftOrResult),
7132         * (shiftRLong),
7133         * (shiftLLong): Implemented with pic16_emitpcode
7134         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
7135         * (genLeftShift): Fixed bug, operand for shift by variable always
7136         was "and"ed with 0x0f,
7137         * (genLeftShiftLiteral),
7138         * (genrshTwo),
7139         * (genRightShiftLiteral): added debugging info,
7140         * (genrshFour): added comment,
7141         * (genRightShift): determined signedness from operand "left"
7142         instead of "result"
7143
7144 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7145
7146         * src/SDCCicode.c (geniCodeParms),
7147         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
7148         function pointers, fixed function pointer bugs #861242 and #861896
7149
7150 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7151
7152         * device/include/c8051f000.h,
7153         * device/include/c8051f120.h,
7154         * device/include/c8051f300.h: added header files for Silicon
7155         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7156
7157 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
7158
7159         * src/SDCCast.c (processParams): added new type flow and restructured
7160         (gatherAutoInit): added new type flow
7161         (addCast): cosmetic changes
7162         (getLeftResultType): added new type flow for array indices, patch
7163         provided by Stas, see FR #877103
7164         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
7165         array index patch by Stas
7166         * src/SDCCast.h: added prototype getResultTypeFromType()
7167         * src/SDCCval.h,
7168         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
7169         * src/pic/glue.c (pic14emitStaticSeg),
7170         * src/pic16/glue.c (pic16emitStaticSeg),
7171         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
7172         for initialization of symbols
7173         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
7174         * support/Util/SDCCerr.h:
7175         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
7176         * .version: bumped version number to 2.3.8
7177         * device/include/Makefile.in (install),
7178         * doc/Makefile (install): changed to 'rm `find ...`' construct to
7179         avoid warnings
7180
7181 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
7182
7183         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
7184         Slade Rich fixed an optimization bug
7185         * src/pic/pcodepeep.c,
7186         * src/pic/pcoderegs.c
7187         * doc/Makefile (install): added test for directory
7188
7189 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7190
7191         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
7192         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
7193         * src/pic/ralloc.c (getRegPtr, getRegGpr),
7194         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
7195         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
7196         * as/mcs51/asexpr.c (term),
7197         * as/hc08/asexpr.c (term): fixed bug #887146
7198
7199 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7200
7201         * src/z80/gen.c (genMult): handle single byte result product
7202         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
7203         DUMMY_READ_VOLATILE (fixed bug #886367)
7204
7205 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7206
7207         * support/regression/tests/libmullong.c: fixed logic, on little endian
7208         hosts we ended without a mullong_wrapper()
7209
7210 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7211
7212         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
7213         virus/worm forged address usage.
7214
7215 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7216
7217         Fixed promotion, it should be done on AST level:
7218         * src/SDCCast.c (addCast): added promotion to int
7219         (decorateType): updated call to upCast()
7220         * src/SDCCicode.c (geniCodeLeftShift): removed call to
7221         usualUnaryConversions()
7222
7223 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
7224
7225         * support/regression/tests/literalop.c (mulWrapper): Added a
7226         wrapper to remove integer overflow warnings.
7227
7228         * support/regression/tests/float_trans.c: Made work on host.
7229
7230         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
7231         location of sz80.
7232
7233         * support/regression/generate-cases.py (main): Changed from inline
7234         to a main method.
7235
7236         * doc/Makefile (install): Changed to depth first to get rid of
7237         missing directory install warning.
7238
7239         * as/Makefile (install-doc): Made work on Mac.
7240
7241 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
7242
7243         * src/SDCCast.c: added an additional type flow in decorateType() of
7244         opposite direction, see feature request #860006; it's enabled at runtime
7245         by setting the environment variable SDCC_NEWTYPEFLOW
7246         * src/SDCCast.h: changed prototype of decorateType()
7247         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
7248         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
7249         'char' to 'int' can be omitted, if both operands are 'unsigned char';
7250         see feature request #877103
7251         * src/SDCCval.c: updated call of decorateType()
7252         (valBitwise): fixed bug #882876
7253         (valMinus): added promotion
7254         (valLogicAndOr): result is unsigned
7255         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
7256         * src/SDCCsymt.c (computeType),
7257         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
7258         must not cause an unsigned operation
7259         * src/pic/glue (pic14emitRegularMap),
7260         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
7261
7262 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
7263
7264         * src/pic/pcode.c (PCodeID): commented out left over debug code
7265
7266 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7267
7268         * support/valdiag/tests/overflow.c: added shift tests
7269         * src/pic/device.c,
7270         * src/pic/gen.c,
7271         * src/pic/gen.h,
7272         * src/pic/glue.c,
7273         * src/pic/main.c,
7274         * src/pic/pcode.c,
7275         * src/pic/pcode.h,
7276         * src/pic/pcodepeep.c,
7277         * src/pic/pcoderegs.c,
7278         * src/pic/ralloc.c,
7279         * src/pic/ralloc.h: applied patch from Slade Rich;
7280         added support for multiple code pages and multiple RAM banks on the
7281         PIC 14 port. The ASM files now no longer simply assume all the
7282         code / RAM are in the same page / bank. This means the linker can
7283         safely allocate code/RAM of separate ASM files to different pages/banks.
7284         * doc/sdccman.lyx: added Slade's tips
7285         * src/mcs51/peeph.def: fixed bug #880768
7286
7287 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7288
7289         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7290         * src/SDCCast.c (decorateType): fixed bug #880197
7291
7292 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7293
7294         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7295         getopt.h.
7296
7297         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7298         strtof is not part of C89 and isn't included with Mac OS X.
7299
7300 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7301
7302         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
7303         shiftL2Left2Result): fixed bug #879326
7304         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
7305         (genMultOneByte): fixed bug in signed vs unsigned multiplication
7306         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
7307         address fetch for clr instruction
7308         * device/lib/hc08/_mulint.c: created optimized assembly version
7309         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
7310
7311 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
7312
7313         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
7314         proposed in FR #877103
7315
7316 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
7317
7318         * src/SDCCval.c (cheapestVal): added missing checks
7319         * src/SDCCicode.c (usualBinaryConversions): fixed condition
7320         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
7321
7322 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
7323
7324         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
7325         equal operands
7326
7327 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
7328
7329         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
7330         loaded with the linker search paths (-L arguments) and the libraries
7331         to be linked with the current source (-l arguments). Changes
7332         currently will affect only the pic16 port.
7333         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
7334         include path the port specific paths and port specific libraries,
7335         * gplink command now contains the $3 argument,
7336         * src/pic16/device.h,
7337         * src/pic16/device.c,: structure PIC_device is made public and
7338         renamed to PIC16_device, the same for variable Pics which is renamed
7339         to Pics16. Updated all references to them.
7340         * src/pic16/glue.c (pic16glue): corrected bug with code
7341         initialization which bypassed the variable initializations block.
7342
7343         * device/lib/pic16/Makefile.rules: removed --penable-stack from
7344         COMPILE_FLAGS and added the --nostdinc option
7345
7346 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7347
7348         * device/include/mc68hc908jb8.h: Register defs for another member
7349         of the hc08 family. Contributed by Bjorn Bringert - thanks!
7350
7351 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
7352
7353         Documenting changes from previous commits.
7354         * configure.in (version 1.56),
7355         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
7356         when generating output files to configure the pic16 library,
7357         but now I've commented it out, since gputils aren't installed in the
7358         SF compile farm, so library won't compile
7359
7360         * device/lib/Makefile.in (version 1.56): initially I've added in
7361         target 'all' the prerequestive 'model-pic16' so it compiled the
7362         pic16 library, but now I've commented it out for the same reasons
7363         above,
7364         * added targets 'model-pic16' and 'objects-pic16' to compile the
7365         library
7366         * added target 'port-specific-objects-pic16' to handle the
7367         generated libraries and copy them into the build/ directory
7368         * added target 'clean-intermediate-pic16' to clean intermediate
7369         files into pic16 directory
7370         * in target 'installdirs' added line to create directory pic16 in
7371         the installation path
7372
7373         * device/include/Makefile.in (version 1.11): in target 'install'
7374         added lines to copy all header files to installation path,
7375         * in target 'installdirs' added line create directory for pic16
7376         headers in the installation path
7377
7378 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
7379
7380         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
7381          a function call
7382
7383 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
7384
7385         * configure,
7386         * device/lib/configure.in,
7387         * device/lib/configure: fixed for autoconf 2.57
7388
7389 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7390
7391         * src/z80/main.c (_parseOptions): fixed the portmode= command line
7392         option so that it actually works. Made it specific to the z80, since
7393         the gbz80 doesn't have these kinds of I/O ports.
7394
7395 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7396
7397         * device/include/z180.h,
7398         * device/lib/_memcpy.c,
7399         * device/lib/_memmove.c,
7400         * device/lib/_mulint.c,
7401         * device/lib/ser_ir.c,
7402         * device/lib/ser_ir_cts_rts.c,
7403         * device/lib/_strcmp.c,
7404         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
7405         * src/z80/main.c (_process_pragma): add support for pragmas bank and
7406         portmode; added deprecation warning for bank= and protmode= forms.
7407         Also, guard against buffer overflow.
7408         * src/z80/gen.c (aopGet): generate better code for sfr banked read
7409
7410 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7411
7412         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
7413         changed interrupt vector table generation to only emit declared vectors.
7414         * device/include/Makefile.in: added missing backslash
7415         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
7416
7417 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7418
7419         Mainly changes to support compilation of the device libraries
7420         * src/pic16/device.c: stack is allocated via symbol and not
7421         via literal number. The symbol is placed in the corresponding
7422         position of the data ram
7423         * (pic16_dump_section): relocatable and absolute uninitialized
7424         data are now emitted in sorted order to reduce section naming,
7425         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
7426         weren't marked as being in the access bank,
7427
7428 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7429
7430         Added portion of GNU PIC Library under the directory
7431         device/include/pic16 and device/lib/pic16. These files
7432         contain the declarations of SFRs for the PIC18Fxx2 devices.
7433         The directory is initialized via configure from toplevel.
7434
7435 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
7436
7437         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
7438         the spilllocations to be compared correctly
7439
7440 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7441
7442         * src/SDCCast.c (decorateType): fixed bug introduced today
7443
7444 2004-01-12  Borut Razem <borut.razem AT siol.net>
7445
7446         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
7447         doc/sdccman.lyx: upper case pragmas are deprecated
7448
7449 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7450
7451         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
7452         in simpler and even better code
7453
7454 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
7455
7456         * src/SDCCicode.c (operandOperation): fixed bug #874819
7457         * src/SDCCast.c (decorateType): fixed
7458         char foo (unsigned long ul) { return ul > 0; }
7459
7460 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7461
7462         * doc/sdccman.lyx: Moved and added some sections, small changes
7463         all over. Telling LaTeX to be less strict with word spacing
7464         to better keep the right margin. Changed some notes about
7465         maintainance of the ports in section 3.2.1 - is it OK like this?
7466
7467 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
7468
7469         SDCC source changes:
7470         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
7471         convilong): modified to inform the pic16 port that builtin functions
7472         are external
7473
7474         PIC16 PORT specific changes:
7475         * src/pic16/device.c pic16_dump_equates() added,
7476         processor registers declared internally by the port are emitted in
7477         the translation as equates,
7478         * src/pic16/gen.c: inline code is passed unprocessed to the
7479         translation,
7480         * (pic16_popGetLit2): fnuction modified to take second operand as
7481         pCodeOp pointer and not as literal,
7482         * (popRegFromIdx): prefixed with pic16_,
7483         * (pic16_popCombine2): modified to receive already allocated pCode
7484         operands,
7485         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
7486         * (genFunction): initializes local stack frame and pushes on stack
7487         all the registers used by this function,
7488         * (genEndFunction): restores all registers from stack and restores
7489         stack frame,
7490         * src/pic16/glue.c (pic16emitRegularMap): various changes and
7491         improvements,
7492         * (pic16glue): changed the program startup sequence,
7493         * added new dbName code 'A' for functions placed in absolute section
7494         * src/pic16/main.c: added function attribute _naked,
7495         * added pragma 'code' to place a fnuction at an absolute address,
7496         * added command line arguments --debug-ralloc and --pcode-verbose,
7497         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
7498         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
7499         * (pic16_newpCodeOpLit2): modified to take the second operand as
7500         pCodeOp pointer,
7501         * (pic16_printpBlock): modified to emit each function in a separate
7502         section,
7503         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
7504         UPPER for immediate operands,
7505         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
7506         instruction,
7507         * src/pic16/peeph.def: all peepholes with movff are commented out,
7508         because there is a problem in the pcode peep optimizer,
7509         * src/pic16/ralloc.c: the register allocator can now reuse local
7510         function symbols for another function. This saves register usage.
7511         * src/pic16/ralloc.h: added flag isLocal in structure regs,
7512
7513         Added file src/pic16/NOTES with information about program writing on
7514         the current port version.
7515
7516 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7517
7518         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
7519         and peephole 252 (array access)
7520
7521 2004-01-09  Borut Razem <borut.razem AT siol.net>
7522
7523         * src/SDCCmain.c : fixed #872250: -l command line defined library
7524           files are scanned before standard library files
7525
7526 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7527
7528         * src/SDCCast.c (decorateType): fixed bug #874046
7529
7530 2004-01-09  Borut Razem <borut.razem AT siol.net>
7531
7532         * support/scripts/sdcc.nsi: remove previous installation
7533
7534 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7535
7536         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
7537         bytes for last interrupt vector (mcs51)
7538         * sdcc.spec: fixed typo
7539
7540 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7541
7542         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
7543         gen51Code): more efficient parameter receive for --model-large
7544         ("bug" #845294)
7545
7546 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7547
7548         * src/ds390/main.c,
7549         * src/z80/main.c: added missed needLinkerScript flags (more than
7550         one port structure defined in these file)
7551         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
7552         bug #795325
7553
7554 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
7555
7556         * src/SDCCmain.c: removed various references to DEFAULT_PORT
7557         * src/port.h: added flag needLinkerScript in port->linker
7558         structure to inform whether to create a .lnk file or not,
7559         * src/avr/main.c,
7560         * src/ds390/main.c,
7561         * src/hc08/main.c,
7562         * src/mcs51/main.c,
7563         * src/pic/main.c,
7564         * src/pic16/main.c,
7565         * src/xa51/main.c,
7566         * src/z80/main.c: changed appropriately to configure
7567         needLinkerScript flag
7568         * src/pic/gen.c,
7569         * src/pic16/gen.c (genAddrOf): fixed bug #863624
7570         * src/pic/glue.c: added variable udata_section_name to
7571         override default uninitialized data segment definition for
7572         devices only with SHAREBANK memory (reported from Erik Epetrich)
7573         * (pic14emitOverlay): modified to emit a commented overlay segment
7574         directive when no overlay data exist
7575         * (picglue): modified to emit uninitialized data segment
7576         according to udata_section_name
7577         * src/pic/main.c (_pic14_parseOptions): added command line
7578         options --udata-section-name=[name] to override default
7579         udata definition name
7580         * modified _linkCmd and _asmCmd to include compiler passed
7581         arguments via -W option
7582         * src/pic16/main.c: added $l in _asmCmd, changed extension for
7583         object file from '.rel' to '.o' in port->linker structure,
7584         changed size of fptr from 2 to 3 in port structure
7585
7586 2004-01-07  Borut Razem <borut.razem AT siol.net>
7587
7588         * support/scripts/sdcc.nsi: update PATH
7589         * support/scripts/sdcc.ico: craeted
7590
7591 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
7592
7593         * device/include/Makefile.in: fix install
7594         * doc/Makefile: fix install
7595
7596 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7597
7598         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
7599         in bug #860505
7600         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
7601         how the function variable allocation summary is displayed; also
7602         include information about variables allocated to the overlay
7603         segment
7604
7605 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7606
7607         * as/mcs51/lkmain.c: Help about -Y option
7608         * as/mcs51/lkarea.c: Fixed gcc warnings
7609
7610 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7611
7612         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
7613         fixed warning
7614         * support/valdiag/tests/overflow.c: added
7615         * src/SDCCast.c (decorateType),
7616         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
7617         LEFT_OP (left shift)
7618
7619 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7620
7621         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
7622         (default behaviour).
7623
7624 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7625
7626         A python script to validate compiler diagnostic messages. It can be
7627         used to verify that sdcc complains about bad c source code and
7628         gives a good location of the error.
7629         * support/valdiag/Makefile,
7630         * support/valdiag/valdiag.py,
7631         * support/valdiag/tests/*
7632
7633 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7634
7635         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
7636         * src/SDCCsymt.c (newEnumType),
7637         * src/SDCCsymt.h
7638         * support/Util/SDCCerr.c,
7639         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
7640         enum related bugs.
7641         * support/regression/tests/enum.c: added test for enum values that
7642         require at least 2 bytes of storage.
7643
7644 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7645
7646         * src/common.h: added ifndef/define/endif macros
7647         around the header file.
7648         Bug reported from Jesus Calvino-Fraga
7649
7650 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7651
7652         * sdcc.spec: updated
7653         * device/include/Makefile.in: don't install CVS directories
7654         * device/lib/Makefile.in: added removal of CVS directories after install
7655         * doc/Makefile: fixed install, added local_icons
7656         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
7657         * src/mcs51/gen.c (genRightShift): fixed bug #870788
7658         * src/ds390/gen.c (genRightShift): fixed bug #870788
7659         * src/SDCCast.c (decorateType): fixed bug #870781
7660
7661 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7662
7663         PIC16 port related changes:
7664         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
7665         added variable stackPos,
7666
7667         * gen.c: genCall, assignResultValue: added support for
7668         pushing/retrieving function parameters to/from stack,
7669         genFunction,genEndFunction: setup stack frame for the
7670         generated function,
7671         genAddrOf: will be changed according to bug 863624
7672
7673         * added files genutils.c and genutils.h which contain gen*
7674         debugged and optimised functions extracted from gen.c
7675
7676         * glue.c: added variable 'externs' which holds extern symbols,
7677         pic16emitRegularMap: is modified to properly handle relocatable
7678          symbols under the new scheme,
7679         pic16createInterruptVect: is modified
7680         pic16printPublics: is modified to emit 'global' assembler directives,
7681         added pic16_printExterns to print extern symbols,
7682         pic16glue: initializes stack/frame pointer in the beginning of
7683         the assembly output. Temporary hack, will be corrected later,
7684         because gplink yet does not support stack and SDCC does not
7685         yet support a type of crt0.o object to create the final binary.
7686
7687         * Removed many lines that contain 8051 legacy code.
7688         * The code is finally placed under a 'code' directive.
7689         * Added port specific options.
7690
7691         * _process_pragma: simplified since now we do not need *special*
7692         include file to define SFR registers. But a separate header
7693         will be needed. This will be developed later.
7694         * _pic16_parseOptions: added, parses port specific options:
7695         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
7696         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
7697         --preplace-udata-with=
7698
7699         * _pic16_setDefaultOptions: modified to initialize section names,
7700         but hack is temporarly out of order since it needs improvement.
7701         * _pic16_genAssemblerPreamble: configuration words are emitted by
7702         their address instead of their name. This part is incomplete and
7703         supports only the 18Fxx2 devices. Other devices will emit an error
7704         during assembly since they do not contain the same set of config
7705         registers
7706         * _pic16_genIVT: is modified,
7707
7708         * pcode.c: added definitions for some hardware registers that are needed
7709         for stack support
7710         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
7711         All PCI entries are updated. Now LFSR is supported.
7712         * Removed pic16_pciTRIS is mentioned by mdubuc in source
7713         * added pic16_newpCodeOpLit2 to support instructions with
7714         two literal arguments
7715         * pic16_pCode2str: corrected code that emits assembler instructions
7716         with two literal operands and those that have an access bit modifier
7717         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
7718         this fixes a bug which caused some labels to be lost, when an
7719         assembler directive was added, i.e. banksel,
7720         * pic16_FixRegisterBanking: improved logic that causes the insertion
7721         of bank switching,
7722         * InlineFunction: functions that are called once, are not any more
7723         inlined. This can be a port option in the future,
7724
7725         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
7726
7727         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
7728         hold the corresponding uninitialized symbols,
7729         * pic16_allocProcessorRegister: registers have explicit marked the
7730         accessBank field,
7731         * pic16_allocInternalRegister: registers are explicit marked as
7732         not used,
7733         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
7734         processing list, so bit registers were lost,
7735         *
7736
7737         * ralloc.h: added field 'accessBank' and original symbol operand
7738         in register definition,
7739         * removed the field isMapped from register definition,
7740
7741         ** Several functions have been removed from various sources:
7742         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
7743         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
7744         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
7745         pic16_assignRelocatableRegisters
7746
7747         ** others have been introduced:
7748         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
7749         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
7750
7751 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
7752
7753         * support/scripts/inc2h.pl: changed definition of BIT_AT
7754         to emit 'sbit at' instead of 'bit at'. This was a request.
7755
7756         PIC16 port related preliminary changes:
7757         * gen.c: prefixed function popRegFromString with
7758         pic16_ and all references to it corrected
7759         * pcode.c: all pic16_pc_* hardware registers prefixed
7760         with underscore (_),
7761         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
7762         * ralloc.c: newReg(): when register is REG_SFR then
7763         set address to rIdx,
7764         pic16_allocProcessorRegister(): marks register wasUsed=0
7765         pic16_writeUsedRegs(): added a call to assign processor
7766         registers via pic16_assignFixedRegisters
7767
7768 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7769
7770         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
7771         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
7772         variables in unused register banks.  Also the SSEG is placed
7773         wherever there is enough space for it, and IDATA can be anywhere
7774         in internal RAM.  For now compile using -Wl-Y[stack_size].
7775         The mem file is different for this option as well, since it
7776         makes no sense of talking about DSEG lenght.
7777
7778 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
7779
7780         * src/SDCClrange.c: fixed bug 869095 that caused segfault
7781         in certain cases, e.g. when ROM assignment, patch provided
7782         from Albert den Haan.
7783
7784 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
7785
7786         Many signedness and type propagation fixes:
7787         * src/SDCCicode.c: made geniCodeCast() static
7788         replaced SPEC_ by IS_ (cosmetic)
7789         (operandOperation): fixed div and mod operation
7790         (usualBinaryConversions): added support for promotion of char
7791         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
7792         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7793         (geniCodeAdd): an array index will stay unsigned, even if promoted
7794         from char to int
7795         (geniCodeArray): ditto
7796         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7797         * src/SDCCsymt.c (computeType): added more support for char;
7798         promotion of char is selectable by promoteCharToInt, fixed signedness
7799         for all cases
7800         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7801         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7802         * src/SDCCval (val*): replaced signedness calculation by
7803         computeType()
7804         rearranged if-branches (cosmetic)
7805         (valShift): added warning W_SHIFT_CHANGED
7806         (valCompare): fixed problem with different types
7807         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7808         * support/regression/tests/literalop.c: added many cases
7809         * support/regression/tests/ast_constant_folding.c: changed finally to
7810         'unsigned int'
7811         * .version: new year, new version: 2.3.7
7812         * src/SDCCmain.c (main): applied patch #866468
7813         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7814         provided by Scott Bronson
7815         * doc/sdccman.lyx: updated documentation for sdcdb
7816         updated and added chapter tips
7817
7818 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7819
7820         * src/SDCCsymt.h: missing from yesterday's commits
7821
7822 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7823
7824         * src/SDCC.y (struct_or_union_specifier),
7825         * support/Util/SDCCerr.c,
7826         * support/Util/SDCCerr.h: verify that struct & union tags are used
7827         as declared.
7828
7829 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7830
7831         * src/SDCCglobl.h: missing from yesterday's commits
7832
7833 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7834
7835         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7836         sft_attributes, struct_declaration, parameter_declaration,
7837         type_name, start_block, declaration_list),
7838         * src/SDCC.lex (check_type): support redefinition of typedef names
7839
7840 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7841
7842         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7843         aligned xdata arrays. Erik helped me with the if clause.
7844
7845 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7846
7847         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7848         warning
7849
7850 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7851
7852         * src/SDCCast.h,
7853         * src/SDCCast.c (newAst_),
7854         * src/SDCCicode.h,
7855         * src/SDCCicode.c (ast2iCode, newiCode),
7856         * src/SDCCglobl.h,
7857         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7858         expr, statement, expression_statement, selection_statement,
7859         iteration_statement, expr_opt, jump_statement): foundation for tracking
7860         sequence points
7861         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7862         point code too)
7863
7864 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7865
7866         * support/Util/SDCCerr.c,
7867         * src/SDCCast.h,
7868         * src/SDCCast.c (createCase, createDefault, decorateType),
7869         * src/SDCClabel.c (labelUnreach),
7870         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7871         to error messages.
7872         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7873         (with thanks to Stas Sergeev)
7874         * device/include/time.h,
7875         * device/lib/time.c (CheckTime): suppress unreachable code warning
7876
7877 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7878
7879         * src/SDCCast.c (createIvalCharPtr),
7880         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7881         bug #753752)
7882         * support/regression/tests/nullstring.c: tests for these two bugs
7883
7884 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7885
7886         * support/Util/SDCCerr.h,
7887         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7888         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7889         about storage class and 'at' used inside struct or union
7890         * src/SDCCBBlock.c (iCodeFromeBBlock),
7891         * src/SDCCcse.c (ifxOptimize),
7892         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7893         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7894         printIval, emitStaticSeg, emitOverlay),
7895         * src/SDCClabel.c (deleteIfx),
7896         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7897         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7898         gatherAutoInit, processParms),
7899         * support/Util/SDCCerr.h,
7900         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7901         reporting for post-parse errors.
7902
7903 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7904
7905         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7906         implicit casts via union; they don't work on big endian systems
7907         (possible fix for bug #861138)
7908
7909 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7910
7911         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7912         * src/mcs51/main.c: fixed the fix for bug #737001
7913
7914 2003-12-15  Borut Razem <borut.razem AT siol.net>
7915
7916         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7917
7918 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7919
7920         * support/makebin/makebin.c: put output in binary mode
7921
7922 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7923
7924         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7925         xdata and data memory on startup. Set the environment variable
7926         SDCC_NOGENRAMCLEAR to disable this.
7927         * src/mcs51/peephole.def,
7928         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7929         (allows non-interrupt and interrupt code to safely compete for a resource
7930         without the non-interrupt code having to disable interrupts)
7931
7932 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7933
7934         * src/SDCCicode.c (geniCodeAdd),
7935         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7936         with valFromType if type might be a pointer and host is big endian).
7937         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7938         types, not just integer types.
7939         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7940         multiply defined with mismatching "at" address.
7941
7942 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7943
7944         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7945         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7946         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7947         with embedded nulls (fixed bug #753752)
7948
7949 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7950
7951         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7952         Apparently this did not see much testing (endless loop)
7953
7954 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7955
7956         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7957
7958 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7959
7960         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7961         gracefully handle NULL memmap pointers
7962
7963 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7964
7965         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7966         instead of deleting the iCode when an operand is volatile
7967         * src/z80/gen.c (genDummyRead),
7968         * src/mcs51/gen.c (genDummyRead),
7969         * src/ds390/gen.c (genDummyRead),
7970         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7971         not just IC_RIGHT
7972         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7973         * src/SDCC.y: fixed bug #850420
7974
7975 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7976
7977         Applied z80 i/o port patch from Peter Townson and fixed some operators
7978         to better handle operands in A register.
7979         * device/include/z180.h
7980         * src/SDCC.y
7981         * src/SDCCglue.c
7982         * src/z80/gen.c
7983         * src/z80/gen.h
7984         * src/z80/main.c
7985         * src/z80/peeph-z80.def
7986         * src/z80/peeph.def
7987         * src/z80/z80.h
7988
7989 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7990
7991         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7992
7993 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7994
7995         * device/lib/hc08/_mullong.c: Removed extra #endif
7996
7997 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7998
7999         * sim/ucsim/hc08.src/inst.cc,
8000         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
8001         carries from x to h
8002         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
8003         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
8004         * device/include/stdarg.h: fixed varargs for hc08
8005         * device/lib/Makefile.in,
8006         * device/lib/hc08/Makefile,
8007         * device/lib/hc08/_mulint.c,
8008         * device/lib/hc08/_mullong.c: fixed some endian problems
8009
8010 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8011
8012         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
8013         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
8014         * device/lib/_gptrget.c,
8015         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
8016
8017 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8018
8019         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
8020         * src/SDCCast.c (astErrors): fixed bug #846007
8021         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
8022
8023 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8024
8025         * src/SDCCast.c (decorateType): disabled a transformation I added in
8026         revision 1.188 (access to fields of a structure at an absolute address);
8027         it breaks with bitfields, extern declarations, and gcse analysis.
8028         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
8029         could be assigned through a pointer, so don't complain.
8030         * src/SDCCast.c (astErrors),
8031         * src/SDCCast.h,
8032         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
8033
8034 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
8035
8036         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
8037         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
8038         output of __config directives, since gpasm now supports them
8039         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
8040         pre-processor macro, i.e. -DMCU=p18f452
8041         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
8042         and modified to handle 'cast' icode similarly to '=' icode
8043         * src/pic16/device.h (typedef struct PIC_device): added field
8044         'extMIface' to indicate that chip has external memory interface
8045         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
8046         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
8047         18F8720
8048
8049 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8050
8051         * src/SDCC.y (pointer): fixed bug #846006
8052         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
8053         * src/SDCCast.c (decorateType): fixed bug #846009
8054         * src/ds390/peeph.def,
8055         * src/ds390/gen.c (genAnd, genOr),
8056         * src/mcs51/peeph.def,
8057         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
8058
8059 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8060
8061         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
8062         * src/SDCCdflow.c
8063         * src/SDCCcse.c
8064         * src/SDCCcse.h
8065         * src/SDCCBBlock.h
8066         * src/SDCCBBlock.c
8067
8068 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
8069
8070         fixed bug #845089
8071         * src/SDCCbitv.h,
8072         * src/SDCCbitv.c: added function to free a bitvector
8073         * src/SDCClrange.h,
8074         * src/SDCClrange.c: added function to recompute the liveranges
8075         * src/avr/ralloc.c,
8076         * src/ds390/ralloc.c,
8077         * src/hc08/ralloc.c,
8078         * src/mcs51/ralloc.c,
8079         * src/pic/ralloc.c,
8080         * src/pic16/ralloc.c,
8081         * src/xa51/ralloc.c,
8082         * src/z80/ralloc.c: recompute the liveranges after register packing
8083
8084 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
8085
8086         * src/SDCCloop.c (newInduction): fixed bug #845630
8087
8088 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8089
8090         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
8091         inadvertantly left behind from my 2003-11-12 change
8092
8093 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8094
8095         Updated headers I neglected to commit yesterday.
8096         * src/SDCClrange.h,
8097         * src/SDCCicode.h
8098
8099 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8100
8101         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
8102         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
8103         * src/SDCCopt.c (eBBlockFromiCode),
8104         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
8105         the creation of the key hash table from the sequencing so it can be used
8106         earlier (for some GCSE bug fixes still pending)
8107
8108 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8109
8110         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
8111         * support/regression/tests/addsub.c: testing genPlus shortcut
8112
8113 2003-11-15  Borut Razem <borut.razem AT siol.net>
8114
8115         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
8116
8117 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8118
8119         * src/SDCCcse.c (cseBBlock): fixed bug #527779
8120         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
8121         ordering is immaterial.
8122         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
8123
8124 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8125
8126         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
8127         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
8128         (SIGSEV) of bug #840381
8129         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
8130         unlink new file before rename if new and old filenames are the same)
8131
8132 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8133
8134         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
8135         uninitialized variables) for the mcs51. Set environment variable
8136         SDCC_GENRAMCLEAR to test.
8137         xdata initialization slightly shorter
8138
8139 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8140
8141         * src/SDCCsymt.h,
8142         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
8143         #838241 & 780691 (basicly the same bug)
8144         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
8145         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
8146
8147 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
8148
8149         * src/SDCCmain.c (linkEdit): "fix" #834252
8150
8151 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8152
8153         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
8154         * src/SDCCast.h,
8155         * src/SDCC.y: fixed bug #819403
8156
8157 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8158
8159         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
8160         the reentrant attribute.
8161         * src/hc08/gen.c (genPackBits): added missing stack readjustment
8162         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
8163         simulation
8164         * src/SDCCast.c (decorateType): fixed bug with storage class not being
8165         updated during pointer dereference; f.e. ~(((char *)1)*) was being
8166         erroneously reduced to a literal.
8167         * src/hc08/ralloc.c (packRegisters, rematStr),
8168         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
8169         some cases
8170
8171 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8172
8173         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
8174         * doc/sdccman.lyx: changed from 'article' to 'book'
8175         * doc/Makefile: readded test_suite_spec and cdbfileformat
8176
8177 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
8178
8179         * device/include/stdlib.h: include malloc.h to comply with ANSI
8180         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
8181
8182 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8183
8184         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
8185         * doc/clean.mk: also remove *.out files
8186         * doc/sdccman.lyx: some additions, larger top/bottom margins
8187
8188 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8189
8190         * src/SDCC.y: fixed bug #837365
8191         * support/regression/tests/bitopcse.c
8192         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
8193         a symbol (might be valop instead)
8194         * device/lib/Makefile.in: added errno.c to HC08SOURCES
8195         * device/lib/clean.mk: added hc08 to the cleaning list
8196
8197 2003-11-04  Borut Razem <borut.razem AT siol.net>
8198
8199         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
8200           made 2003-11-04
8201         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8202           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
8203           malloc is declared in standard stdlib.h
8204
8205 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8206
8207         * device/lib/hc08/Makefile: need to clean .rel not .o files
8208         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
8209
8210 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8211
8212         * src/port.h,
8213         * src/hc08/main.c,
8214         * src/mcs51/main.c,
8215         * src/ds390/main.c,
8216         * src/z80/main.c,
8217         * src/avr/main.c,
8218         * src/pic/main.c,
8219         * src/pic16/main.c,
8220         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
8221         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
8222         tests (which uses the port's oclsExpense function)
8223         * src/SDCC.y,
8224         * src/SDCCast.c,
8225         * src/SDCCicode.c,
8226         * src/hc08/gen.c,
8227         * src/ds390/gen.c,
8228         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
8229
8230 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8231
8232         * src/SDCCcse.c (ifxOptimize),
8233         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
8234         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
8235         deleting the IFX iCode.
8236         * src/hc08/ralloc.c: reduced unneeded slocs
8237         * src/hc08/gen.c: fixed bug in asmopToBoolean
8238
8239 2003-11-04  Borut Razem <borut.razem AT siol.net>
8240
8241         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
8242           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8243           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
8244           transferred to configure
8245
8246 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
8247
8248         Use headers defined in the C[++] standards:
8249         * sim/ucsim/gui.src/serio.src/fileio.cc
8250         * sim/ucsim/gui.src/serio.src/frontend.cc
8251         * sim/ucsim/gui.src/serio.src/main.cc
8252         * sim/ucsim/gui.src/serio.src/posix_signal.cc
8253         * support/Util/NewAlloc.c
8254         * as/hc08/lklibr.c
8255         * as/mcs51/lklibr.c
8256         * as/z80/aslist.c
8257         * as/z80/assym.c
8258
8259 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8260
8261         * Added MSVC projects for hc08 assembler and linker:
8262         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
8263         /as/hc08/link_hc08.dsp
8264
8265 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8266
8267         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8268
8269 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8270
8271         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8272
8273 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8274
8275         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8276
8277 2003-10-31  Borut Razem <borut.razem AT siol.net>
8278
8279         * support/cpp2/cpplib.h,
8280           support/cpp2/cpplib.c,
8281           support/cpp2/cpplex.c,
8282           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8283           to switch _asm block preprocessing on / off. Default is
8284           #pragma preproc_asm +
8285
8286 2003-10-31  Borut Razem <borut.razem AT siol.net>
8287
8288         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8289           when outputting comment blocks (when executed with -C option) and
8290           _asm (SDCPP specific) blocks
8291
8292 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8293
8294         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8295
8296 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8297
8298         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8299
8300 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
8301
8302         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
8303         * src/SDCCast.c (decorateType): fixed bug #832664
8304
8305 2003-10-31  Borut Razem <borut.razem AT siol.net>
8306
8307         * support\cpp2\cpplex.c: fixed for SDCPP:
8308           comments(when executed with -C option) and _asm blocks
8309           were included even if they where in skipped #if block.
8310           Applied solution from GCC cpp 3.3.2
8311
8312 2003-10-31  Borut Razem <borut.razem AT siol.net>
8313
8314         * src/SDCC.lex: sdcc now understands both formats:
8315           '# <line_number> <file_name>' and
8316           '#line <line_number> <file_name>'
8317         * support/cpp2/cppmain.c: sdcpp now generates the standard
8318           '# <line_number> <file_name>' instead of former
8319           '#line <line_number> <file_name>'
8320
8321 2003-10-30  Borut Razem <borut.razem AT siol.net>
8322
8323         * support/cpp2/cpphash.h,
8324         * support/cpp2/cpplib.h
8325         * support/cpp2/cpplex.c,
8326         * support/cpp2/cppmain.c,
8327         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
8328
8329 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8330
8331         Fixed a number of problems revealed by bug #827883.
8332         * src/SDCCloop.c (loopInvariants): Spill location of the
8333         result operand should be recomputed if extracted from
8334         a loop. Also, don't extract assignments of an iTemp
8335         from a literal.
8336         * src/SDCCast.c (isConformingBody): loop reversal should
8337         not occur if the control variable is involved with a
8338         relational operator.
8339
8340 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
8341
8342         * .version: bumped to 2.3.6 to reflect the big improvements
8343         made by Erik and Klaus. Thanks!
8344
8345 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
8346
8347         Replaced the livrange code.
8348         * src/SDCClrange.c: added new LR code
8349         * src/SDCCloop.c,
8350         * src/SDCCBBlock.h: removed remainig parts from old LR code
8351         * src/ds390/ralloc.c,
8352         * src/ds390/gen.c: minor fixes to make it work with new code
8353
8354 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8355
8356         * as/hc08/asm.h,
8357         * as/hc08/lkrloc.c,
8358         * src/hc08/gen.c,
8359         * src/hc08/ralloc.c: Fix various warnings related to the hc08
8360         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
8361         (tweaked fix for bug #818696)
8362
8363 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8364
8365         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
8366
8367 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8368
8369         * src/SDCCmain.c,
8370         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
8371         * src/mcs51/gen.c (gencjneshort),
8372         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
8373         more efficient (per Scott Bronson's suggestion)
8374
8375 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8376
8377         Extended the semantics of the critical keyword to include
8378         individual statements. See RFE #827755 and #799831
8379         * src/SDCC.y
8380         * src/SDCCicode.c
8381         * src/SDCCopt.c
8382         * src/SDCCast.c
8383         * support/Util/SDCCerr.c
8384         * support/Util/SDCCerr.h
8385         * src/mcs51/gen.c
8386         * src/ds390/gen.c
8387         * src/hc08/gen.c
8388
8389 2003-10-19  Borut Razem <borut.razem AT siol.net>
8390
8391         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
8392
8393 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8394
8395         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
8396         Fixed bug #818696
8397         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
8398         and predecrement operand is displayed
8399
8400 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8401
8402         * src/SDCCval.c (valMinus): fixed bug #826041
8403
8404 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8405
8406         Some hc08 related updates that I missed earlier
8407         * sim/ucsim/stypes.h
8408         * support/regression/ports/hc08/spec.mk
8409
8410 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8411
8412         New target "hc08" for the Motorola 68hc08 family of micros
8413
8414         * configure
8415         * configure.in
8416         * Makefile
8417         * src/hc08/*
8418         * src/SDCCmain.c
8419         * src/port.h
8420         * sim/ucsim/hc08.src/*
8421         * sim/ucsim/configure.in
8422         * src/ucsim/configure
8423         * sim/ucsim/packages_in.mk
8424         * as/hc08/*
8425         * as/Makefile
8426         * device/include/mc68hc908qy.h
8427         * device/lib/hc08/*
8428         * device/lib/Makefile.in
8429         * support/regression/ports/hc08/*
8430         * support/regression/Makefile
8431
8432 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8433
8434         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
8435         regression test
8436         * src/ds390/gen.c (genCast): fixed bug #821957
8437
8438 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8439
8440         * device/lib/logf.c: "fixed" overlay bug
8441         * support/regression/ports/host/spec.mk: added m library
8442         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
8443         * support/regression/tests/float_trans: added (for Eric)
8444
8445 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
8446
8447         * src/mcs51/gen.c (genCpl): fixed bug
8448         http://sf.net/mailarchive/message.php?msg_id=6263915
8449
8450 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
8451
8452         * src/SDCCast.c (decorateType): added extended constant folding
8453         * src/SDCCsymt.c (computeType): cleanup
8454         * src/SDCCval.c (valShift): minor optimization
8455         * support/regression/tests/ast_constant_folding.c: added
8456
8457 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8458
8459         * src/SDCCmain.c: removed some unintended changes
8460
8461 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8462
8463         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
8464         * src/z80/gen.c: fixed part of bug #817589
8465         * src/SDCCsymt.c (checkFunction): fixed bug #817895
8466
8467 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
8468
8469         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
8470         * src/SDCCcflow.c
8471         * src/SDCCcse.c
8472         * src/SDCCdflow.c
8473         * src/SDCClabel.c
8474         * src/SDCClrange.c
8475         * src/SDCCmem.c
8476         * src/SDCCopt.c
8477         * src/SDCCpeeph.c
8478         * src/SDCCset.c
8479         * src/avr/ralloc.c
8480         * src/ds390/ralloc.c
8481         * src/izt/ralloc.c
8482         * src/mcs51/ralloc.c
8483         * src/pic/ralloc.c
8484         * src/pic16/ralloc.c
8485         * src/xa51/ralloc.c
8486         * src/z80/ralloc.c
8487         * src/z80/gen.c: removed unused label "release:"
8488
8489 2003-10-06  Borut Razem <borut.razem AT siol.net>
8490
8491         * src/SDCC.lex: removed definition of unused variables
8492           save_optimize and save_options
8493
8494 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
8495
8496         * clean.mk: removed '=' in "-maxdepth=1"
8497         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
8498         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
8499
8500 2003-10-06  Borut Razem <borut.razem AT siol.net>
8501
8502         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
8503           my_unput() replaced by unput()
8504
8505 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
8506
8507         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
8508         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
8509         type-punned pointer will break strict-aliasing rules"
8510         Old LR behaviour is again default; Klaus' LR can be choosen by
8511         defining the environment variable LRKLAUS
8512         * src/SDCCBBlock.h
8513         * src/SDCCloop.c
8514         * src/SDCClrange.c
8515         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
8516         * clean.mk: fixed removal of files in bin/CVS/
8517         * device/lib/clean.mk: fixed removal of directories small and large
8518         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
8519         * src/SDCCicode.c,
8520         * src/SDCCval.c: removed superflous test for pedantic
8521
8522 2003-10-05  Borut Razem <borut.razem AT siol.net>
8523
8524         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
8525           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
8526           message "unmatched #pragma SAVE and #pragma RESTORE"
8527
8528 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8529
8530         * doc/sdccman.lyx: various additions and updates (interrupts, inline
8531           assembly, critical functions, atomic, nojtbound)
8532
8533 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
8534
8535         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
8536         * src/SDCCBBlock.h
8537         * src/SDCCloop.c
8538         * src/SDCCloop.h
8539         * src/SDCClrange.c
8540
8541 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8542
8543         * src/z80/gen.h,
8544         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8545         * src/mcs51/gen.h
8546         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8547         * src/ds390/gen.h
8548         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8549         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
8550         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
8551
8552 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8553
8554         * src/z80/gen.c (genRet): fixed bug #524753
8555         * src/z80/gen.c (genCast): fixed internal error on cast from
8556         pointer to long
8557         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
8558         fix for bug #477835 to the z80
8559         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
8560         for tracking iCodes in the peephole optimizer for z80
8561
8562 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8563
8564         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
8565         the other part of bug #814548
8566         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
8567
8568 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
8569
8570         * src/SDCCcse.c: fixed part of bug #814548
8571
8572 2003-09-28  Borut Razem <borut.razem AT siol.net>
8573
8574         * src/asm.c: rewrite of printILine() to use temporary file instead
8575           a pipe
8576         * src/xa51/main.c: commented out declaration of int rewinds
8577
8578 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8579
8580         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
8581
8582 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8583
8584         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
8585         * src/asm.c (printILine): Fixed bug #811015
8586
8587 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8588
8589         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
8590         freeing.
8591
8592 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8593
8594         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
8595         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
8596         to correctly handle general case of AOP_PAIRPTR
8597         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
8598
8599 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8600
8601         * src/mcs51/ralloc.c (fillGaps),
8602         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
8603         register positioning bug)
8604
8605 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
8606
8607         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
8608
8609 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8610
8611         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
8612         genCodePointerGet, genGenPointerGet, genFarPointerSet,
8613         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
8614         (ralloc doesn't intentionally do this now, but perhaps later)
8615         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
8616         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
8617         register positioning bugs (Fixed bug #762602 and #795325)
8618         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
8619         (Fixed bug #808779)
8620         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
8621         lines that --i-code-in-asm generates
8622
8623 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8624
8625         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
8626         trying to fclose a FILE* that was already closed.
8627
8628 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8629
8630         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
8631         of const struct should be treated as if const themselves)
8632
8633 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
8634
8635         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
8636
8637 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8638
8639         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
8640         Unix (/n) and DOS (/r/n) line terminations.
8641
8642 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8643
8644         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
8645         bug #613775
8646
8647 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8648
8649         * src/mcs51/gen.c (genFunction, genEndFunction),
8650         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
8651         and restore of EA so that stack offsets to parameters are
8652         correct when using both critical and reentrant/stack-auto.
8653         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
8654         size (can be triggered in error if sloc is shared between
8655         different sized objects)
8656         * device/include/float.h: fixed macros to explicitly use
8657         unsigned long where needed
8658
8659 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
8660
8661         Feature req. 799831: added code to allow nesting of critical functions
8662         * src/mcs51/gen.c (genFunction, genEndFunction)
8663         * src/ds390/gen.c (genFunction, genEndFunction)
8664
8665 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8666
8667         * src/SDCCsymt.c (sclsFromPtr),
8668         * src/SDCCsymt.h,
8669         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
8670         support for standard C idiom of memory mapped variables; for
8671         example, *((xdata int*)0x1234) = 1 is now internally equivalent
8672         to xdata int at 0x1234 tempvar = 1.
8673         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
8674         provided by Akiya ISHIDA
8675
8676 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
8677
8678         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
8679         * src/SDCCval.c (constVal): added reduction from int to char
8680         * src/SDCCval.c (valMult, valDiv): fixed sign handling
8681         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
8682         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
8683         to ignore the sign
8684         * support/regression/tests/shifts.c: fixed
8685
8686 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8687
8688         * src/z80/gen.c (genXor): Fixed bug #805445
8689
8690 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8691
8692         Fixed bug #621531 (const & volatile confusion in the type chain).
8693         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
8694         refer to the const or volatile state of the pointer itself.
8695
8696         * src/SDCCast.c
8697         * src/SDCCglue.c
8698         * src/SDCCicode.c
8699         * src/SDCCsymt.c
8700         * src/SDCCval.c
8701         * src/SDCC.y
8702         * src/SDCCsymt.h
8703         * src/pic/gen.c
8704         * src/pic/ralloc.c
8705         * src/pic16/gen.c
8706         * src/pic16/ralloc.c
8707         * support/regression/tests/const.c
8708
8709 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8710
8711         When checking for duplicated modules, use absolute paths
8712         instead of relative paths.  Files changed:
8713
8714         * as/mcs51/lklib.c
8715         * link/z80/lklib.c
8716
8717 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8718
8719         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
8720
8721 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8722
8723         * device/include/string.h: added size_t typedef, changed
8724         prototypes to use size_t, eliminated separate reentrant and
8725         non-reentrant declarations, added _memmove declaration
8726         * device/lib/_memcpy.c: changed to use size_t instead of int,
8727         changed /4 to >>2 to avoid division library call
8728         * device/lib/_memcmp.c,
8729         * device/lib/_memset.c,
8730         * device/lib/_strncat.c,
8731         * device/lib/_strncpy.c,
8732         * device/lib/_strncmp.c: changed to use size_t instead of int
8733         * device/lib/_memmove.c: new file (fixed bug #772294)
8734         * device/lib/Makefile.in: added _memmove.c
8735         * device/lib/z80/asm_strings.s: fixed bug #772290
8736         * support/regression/tests/bitfields.c: attempt to fix host assertion
8737         failure on amd64-unknown-linux2.2
8738
8739 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8740
8741         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
8742         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
8743         * as/z80/asmain.c (main): fixed bug #801766
8744
8745 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
8746
8747         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
8748         compilers
8749
8750 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8751
8752         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
8753         reported in bug #800609
8754
8755 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
8756
8757         * Top header beautifications in src/pic16 directory:
8758           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
8759           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
8760           pcoderegs.h, ralloc.c, ralloc.h
8761         * main.c: added top header and GPL license notice
8762         * pcode.c: fixed the if-conditional warning
8763
8764 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
8765
8766         * device/lib/_mullong.c: replaced int by short for gcc
8767
8768 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8769
8770         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
8771         and JUMPTABLE iCodes properly now (worked by accident before)
8772         * src/mcs51/gen.c (leftRightUseAcc),
8773         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
8774         iCode properly now. Use getSize instead of nRegs since a & b
8775         aren't part of the nRegs tally.
8776
8777 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
8778
8779         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
8780         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
8781           before instructions that use the _STATUS register
8782
8783 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
8784
8785         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
8786         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
8787         fetching of the pointer
8788         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
8789         copied from genNearPointerSet()
8790         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
8791         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
8792         If they pop r0/r1 they must be called in the opposite order than aopOp().
8793         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8794         (resp. --stack-auto), prepared for --xstack
8795
8796 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8797
8798         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8799
8800 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8801
8802         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8803         these ports have their own __sdcc_external_start()
8804
8805 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8806
8807         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8808         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8809         type for bits was changed. It resulted in bit variables becoming
8810         global, which is not permitted in PIC 14 assembly output.
8811
8812 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8813
8814         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8815
8816 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8817
8818         Z80 and MCS51 linkers complaint if a public symbol is defined
8819         in more than one library module:
8820
8821         * as/mcs51/lklib.c
8822         * link/z80/lklib.c
8823         * as/mcs51/Makefile.in
8824
8825 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8826
8827         A few small changes that speed up the peephole optimizer.
8828
8829         * src/SDCCpeeph.c
8830
8831 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8832
8833         Try to make the peephole optimizer smarter by maintaining
8834         an association between the assembly source code and the
8835         iCodes that originated them. Put this information to use
8836         with a new peephole rule condition "notVolatile" so that
8837         the rules can be aggressive yet still safe.
8838
8839         * src/SDCCpeeph.c
8840         * src/SDCCpeeph.h
8841         * src/mcs51/gen.c
8842         * src/mcs51/peeph.def
8843
8844 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8845
8846         Fixed bug #741761
8847
8848         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8849         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8850         if the left or right operand symbols have the accuse flag set.
8851
8852 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8853
8854         Changed the type of the result of the ! (NOT) operator to char;
8855         previously it returned the same type as the source. This allows
8856         us to eliminate all the genFloatNot functions (all of its target
8857         implementations were very buggy) since !float can use the same
8858         code as !long now.
8859
8860         * src/SDCCicode.c (ast2iCode): ! returns char
8861         * src/mcs51/gen.c (genNot, genNotFloat),
8862         * src/ds390/gen.c (genNot, genNotFloat),
8863         * src/z80/gen.c (genNot, genNotFloat),
8864         * src/pic/gen.c (genNot, genNotFloat),
8865         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8866
8867 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8868
8869         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8870         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8871            during interrupts. Ensure WSAVE is located at a shared bank address.
8872         2. Fixed page selection in some places
8873         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8874            the registers name strings.
8875         4. Fixed "signed / unsigned compare" compiler warnings.
8876         5. The PIC port manages its own allocation of the general purpose
8877            registers, but makes no attempt to reuse them. As a result when
8878            compiling it soon runs out of general purpose registers. Some
8879            additional code was added to the files pcode.c and device.c to walk
8880            through the function call tree and rename the registers so that they
8881            get reused.
8882
8883         * src/pic/device.c
8884         * src/pic/gen.c
8885         * src/pic/glue.c
8886         * src/pic/pcode.c
8887         * src/pic/pcode.h
8888         * src/pic/ralloc.c
8889         * src/pic/ralloc.h
8890         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8891         genPlus() & genMinus() when the result is the same as left or right
8892
8893 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8894
8895         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8896
8897 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8898
8899         Made bitfield a distinct type from bit so that bitfields
8900         convert as per ANSI C and bits retain their traditional
8901         boolean style behaviour. Implemented bitfield support in
8902         the z80 port.
8903
8904         * src/SDCCsymt.h,
8905         * src/SDCCsymt.c,
8906         * src/SDCCast.c,
8907         * src/cdbFile.c,
8908         * src/mcs51/gen.c,
8909         * src/ds390/gen.c: bit v bitfield split
8910         * src/z80/gen.c: New support for bitfields
8911         * support/regression/tests/bitfields.c: reenabled z80,
8912         added more tests
8913
8914 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8915
8916         Rules 246.x, 247.x relate to bitfields, the others speed up
8917         access to xdata mapped I/O devices.
8918
8919         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8920
8921 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8922
8923         Cleaned up genPackBits and genUnpackBits and added two helper
8924         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8925         for literal assignments in genPackBits (thanks to Frieder for
8926         reminding me).
8927
8928         * src/mcs51/gen.c
8929         * src/ds390/gen.c
8930
8931 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8932
8933         Fixed bug #748310 (pointer to function type mishandled when the
8934         function name is omitted). Also fixed a SIGSEGV when a function
8935         attribute (reentrant, etc) is used on a non-function or on a
8936         function but misplaced before the parameter list.
8937
8938         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8939         bug #748310
8940         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8941         * support/Util/SDCCerr.h,
8942         * support/Util/SDCCerr.c: Added func attr misuse error msg
8943
8944 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8945
8946         Fixed bug #787649 by anonymous
8947         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8948         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8949
8950 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8951
8952         Fixed numerous bitfield problems.
8953
8954         * src/SDCC.y: More bitfield related error checking
8955         * src/SDCCsymt.h,
8956         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8957         * support/Util/SDCCerr.h,
8958         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8959         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8960         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8961         * support/regression/tests/bitfields.c: tests added
8962
8963 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8964
8965         Made the constant following the "interrupt" keyword optional. If
8966         omitted, the function will not automatically be given an entry
8967         in the interrupt vector table (similar to #pragma NOIV, but
8968         less syntacticly kludgy). The interrupt number is also now
8969         range checked. Also fixed a bug in the high order bit example
8970         in the manual.
8971
8972         * src/SDCC.y
8973         * src/SDCCmem.c
8974         * src/SDCCglue.c
8975         * src/SDCCsymt.h
8976         * support/Util/SDCCerr.c
8977         * support/Util/SDCCerr.h
8978         * doc/sdccman.lyx
8979
8980 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8981
8982         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8983         * src/SDCCicode.c (operandOperation): rewritten some ops
8984         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8985         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8986         other type
8987         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8988         be re-activated by defining REDUCE_LITERALS)
8989         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8990         unsigned, but are signed by default
8991         * src/SDCCval.c (constVal): rearranged
8992         * src/SDCCval.c (valMod): preliminary fix
8993         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8994         * support/regression/literalop.c: added, work in progress
8995
8996 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8997
8998         Generate warnings for useless declarations like "char data;"
8999         that don't do what new users expect.
9000
9001         * src/SDCC.y
9002         * support/Util/SDCCerr.h
9003         * support/Util/SDCCerr.c
9004
9005 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
9006
9007         * src/SDCCval.c (valMult): fix overflow detection of negative int
9008
9009 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9010
9011         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
9012
9013         Changes to support big endian targets:
9014
9015         * src/ports.h
9016         * src/SDCCglue.c
9017         * src/avr/main.c
9018         * src/ds390/main.c
9019         * src/izt/i186.c
9020         * src/mcs51/main.c
9021         * src/pic/main.c
9022         * src/pic16/main.c
9023         * src/xa51/main.c
9024         * src/z80/main.c
9025
9026 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
9027
9028         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
9029         * device/lib/time.c: fixed warning "integer overflow in expression"
9030
9031 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
9032
9033         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
9034         * src/SDCCval.c (constVal): changed default to signed; hex and octal
9035         constants are unsigned; added recognition of "u" flag for unsigned
9036         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
9037         * src/SDCCval.c (valDiv, valMod): fixed signdness
9038         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
9039         signedness of modulo, left and right shift
9040         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
9041         * support/Util/SDCCerr.h: added warning W_INT_OVL
9042         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
9043         * src/SDCCast.c (ast_print): improved output of constants
9044
9045 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9046
9047         Fixed some warnings when building with MSVC:
9048
9049         * as\mcs51\asdata.c
9050         * as\z80\asdata.c
9051         * as\mcs51\asm.h
9052         * as\z80\asm.h
9053         * link\z80\aslink.h
9054         * link\z80\lkdata.c
9055         * link\z80\lkeval.c
9056         * link\z80\lkgb.c
9057         * link\z80\lkihx.c
9058         * link\z80\lks19.c
9059         * link\z80\lksym.c
9060         * support\cpp2\cpplib.c
9061         * src\ds390\gen.c
9062         * src\mcs51\gen.c
9063
9064 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
9065
9066         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
9067
9068 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9069
9070         * support\librarian\clean.mk: Do not remove Makefile.
9071         * support\librarian\Makefile: added.
9072
9073 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9074
9075         Added librarian to MSVC build:
9076         * all.dsp
9077         * sdcc.dsw
9078         * support\librarian\librarian.dsp
9079
9080         'configure' not needed for librarian, removed:
9081         * support\librarian\configure
9082         * support\librarian\configure.in
9083         * support\librarian\config_in.h
9084         * support\librarian\Makefile.in
9085
9086         Hopefully these ones built the librarian and the rest of sdcc properly:
9087         * Makefile
9088         * Makefile.common.in
9089
9090         Messed up 'configure', so revert to previous version:
9091         * configure
9092         * configure.in
9093
9094 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
9095
9096         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
9097         there, while the mantissa of a double is "only" 53 bits wide.
9098
9099 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9100
9101         Adding sdcclib to the build.  MSVC project coming soon.
9102         Files added/changed:
9103
9104         * support\librarian\clean.mk
9105         * support\librarian\configure
9106         * support\librarian\configure.in
9107         * support\librarian\config_in.h
9108         * support\librarian\Makefile.bcc
9109         * support\librarian\Makefile.in
9110         * support\librarian\sdcclib.c
9111         * Makefile.bcc
9112         * Makefile
9113         * Makefile.common.in
9114         * configure
9115         * configure.in
9116
9117 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9118
9119         Linker now complaints if linked modules have conflicting options, for
9120         example, one compiled using --model-large and another one compiled with
9121         --model-small.  The following files were modified:
9122
9123         * as\mcs51\asdata.c
9124         * as\mcs51\aslink.h
9125         * as\mcs51\asm.h
9126         * as\mcs51\asmain.c
9127         * as\mcs51\asout.c
9128         * as\mcs51\i51pst.c
9129         * as\mcs51\lkdata.c
9130         * as\mcs51\lklibr.c
9131         * as\mcs51\lkmain.c
9132         * as\z80\asdata.c
9133         * as\z80\asm.h
9134         * as\z80\asmain.c
9135         * as\z80\asout.c
9136         * as\z80\z80pst.c
9137         * link\z80\aslink.h
9138         * link\z80\lkdata.c
9139         * link\z80\lklibr.c
9140         * link\z80\lkmain.c
9141         * src\SDCCglue.c
9142
9143 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9144
9145         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
9146         as/mcs51/lklibr.c: Generate a warning when a library is not found.
9147
9148 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
9149
9150         * src/z80/mappings.i: fix _mul[us][int,long] entries
9151
9152 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9153
9154         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
9155
9156 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9157
9158         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
9159         * support/regression/tests/bitopcse.c: added
9160         fixed warning:
9161         * src/avr/gen.c:
9162         * src/pic/gen.c:
9163         * src/pic16/gen.c:
9164         * src/z80/gen.c:
9165         * src/xa51/gen.c:
9166
9167 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9168
9169         added support for new library format to z80, gbz80 linkers:
9170         *link/z80/aslink.h
9171         *link/z80/lklex.c
9172         *link/z80/lklib.c
9173         *link/z80/lklist.c
9174
9175 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9176
9177         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
9178         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
9179
9180 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
9181
9182         added DUMMY_READ_VOLATILE:
9183         * src/SDCC.y:
9184         * src/avr/gen.c:
9185         * src/xa51/gen.c:
9186         * src/z80/gen.c:
9187         * src/pic/gen.c:
9188         * src/pic16/gen.c:
9189         * src/mcs51/gen.c:
9190         * src/ds390/gen.c:
9191         * src/SDCCcse.c (algebraicOpts): many improvements
9192         * src/SDCCcse.h: removed algebraicOpts()
9193         * src/SDCCicode.c (picDummyRead): added
9194
9195 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9196
9197         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
9198         "Insufficient space in data memory".
9199
9200 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9201
9202         * src/mcs51/gen.c: fixed bug #771358
9203         * src/z80/gen.c: fixed bug #759087
9204
9205 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
9206
9207         * src/pic16/glue.c: minor cleanup by Vangelis
9208
9209 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9210
9211         * device/include/regc515c.h: fixed #758477
9212         * device/lib/_gptrget.c: saving some cycles in generic pointer get
9213         * device/lib/_gptrput.c: saved a few bytes
9214         * my tab spacing is 8, yours too?)
9215         * device/lib/_ser.c: process RX bytes earlier than TX bytes
9216         * device/lib/serial.c: process RX bytes earlier than TX bytes
9217         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
9218
9219 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9220
9221         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
9222
9223 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9224
9225     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
9226
9227 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
9228
9229         * device/lib/Makefile.in: bad fix, reverted to 1.43
9230
9231 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
9232
9233         * device/lib/Makefile.in: added missing z80 object files
9234
9235 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
9236
9237         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
9238         pic16 progress by Vangelis:
9239         * src/SDCCglobl.h:
9240         * src/SDCCmain.c:
9241         * src/pic/Makefile:
9242         * src/pic:
9243         * pic/Makefile:
9244         * pic16/device.c:
9245         * pic16/device.h:
9246         * pic16/gen.c:
9247         * pic16/gen.h:
9248         * pic16/genarith.c:
9249         * pic16/glue.c:
9250         * pic16/main.c:
9251         * pic16/pcode.c:
9252         * pic16/pcode.h:
9253         * pic16/pcodepeep.c:
9254         * pic16/peeph.def:
9255
9256 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9257
9258     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
9259
9260 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9261
9262     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
9263     added gbz80 build to MSVC project.
9264     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9265     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9266     from 8051 stuff and setup so it links using a .lnk file.
9267
9268 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9269
9270     * support/librarian/sdcclib.c: sdcc librarian.
9271     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9272     with sdcclib.
9273
9274 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9275
9276     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9277
9278 2003-07-02  Borut Razem <borut.razem AT siol.net>
9279
9280         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9281         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9282         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9283         src/xa51/main.c, src/z80/main.c:
9284         virtualization of glue() function: each port has it's own glue function,
9285         which is accessed by do_glue function pointer in PORT.general structure
9286
9287 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9288
9289         * DS800C400 fun, improved ROM interface and tinibios.
9290
9291 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9292
9293         * More support for DS80C400. Now includes beginning of interface to ROM.
9294
9295 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9296
9297         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9298
9299 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9300
9301         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
9302
9303 2003-06-19  Borut Razem <borut.razem AT siol.net>
9304
9305         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
9306
9307 2003-06-19  Borut Razem <borut.razem AT siol.net>
9308
9309         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
9310         fixed Z80 port - crt0.o: cannot open.
9311
9312 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
9313
9314         * support/Util/MySystem.c (merge_command): revert bad fix
9315
9316 2003-06-18  Borut Razem <borut.razem AT siol.net>
9317
9318         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
9319
9320 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9321
9322         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9323         option --use-stdout sends errors to stdout instead of stderr.
9324
9325 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
9326
9327         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
9328
9329 2003-06-15  Borut Razem <borut.razem AT siol.net>
9330
9331         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
9332         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
9333         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
9334         fixed width array of pointers replaced with sets;
9335         multiple include and lib paths ared transferred to preprocessor and linker
9336         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
9337         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
9338         fixed width array of pointers
9339         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
9340         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
9341         fixupPath(), getPathDifference()
9342         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
9343         fixed width array of pointers
9344
9345 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
9346
9347         * src/pic16/ralloc.c: fix warnings
9348         * src/pic16/pcode.c: fix warning
9349
9350 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
9351
9352          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
9353         know all the details, but essentially this set of changes enable
9354         the pic16 port to generate movff instructions and generate assembler
9355         directives,
9356         * src/SDCCmain.c:
9357         * src/pic16/gen.c:
9358         * src/pic16/glue.c:
9359         * src/pic16/pcode.c:
9360         * src/pic16/device.c:
9361         * src/pic16/main.c:
9362         * src/pic16/pcode.h:
9363         * src/pic16/pcoderegs.c:
9364         * src/pic16/ralloc.c:
9365         * src/pic16/ralloc.h:
9366
9367 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9368
9369         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9370         added option --vc, so sdcc errors and warnings are compatible with
9371         Microsoft Visual Studio.
9372
9373 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9374
9375         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
9376           device/lib/libfloat.lib: added atof function.
9377
9378 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
9379
9380         * doc/sdccman.lyx: updated to Lyx 1.3
9381         * doc/cdbfileformat.lyx: updated to Lyx 1.3
9382         * doc/test_suite_spec.lyx: updated to Lyx 1.3
9383         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
9384
9385 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
9386
9387         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
9388
9389 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9390
9391         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
9392           additions to the "related tools/documentation" section
9393
9394 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
9395
9396         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
9397
9398 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
9399
9400         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
9401         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
9402
9403 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
9404
9405         * doc/sdccman.lyx: fix double dash and other minor things
9406         * doc/Makefile: fix double dash
9407
9408 2003-05-28  Karl Bongers(patches from Martin Helmling)
9409         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
9410           condition and ignore commands.
9411
9412 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9413
9414         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
9415           is in parts still quite out of date, I did changes as far as I felt makes sense
9416           for a non-native english speaker.
9417           Please feel free to add to the manual or to correct my changes.
9418         * doc/Makefile: undid touching the date of intermediate tex files.
9419
9420 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9421
9422         * doc/sdccman.lyx: Manual has an index now
9423
9424 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
9425
9426         Finalize muluint/mulsint and mululong/mulslong merging:
9427         * device/lib/_mulint.c
9428         * device/lib/_mullong.c
9429         * device/lib/gbz80/mul.s
9430         * device/lib/gbz80/stubs.s
9431         * device/lib/z80/mul.s
9432         * device/lib/z80/stubs.s
9433         * src/SDCCsymt.c (initCSupport)
9434
9435 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9436
9437         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
9438         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
9439           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
9440           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
9441           instead of /Zm500.
9442
9443 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9444
9445         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
9446           the regression tests I'm not brave enough to enable 245.b, 245.c
9447         * doc/sdccman.lyx: added latex preamble for hyperref package.
9448           Using pdflatex this will give you a hyperlinked pdf file with
9449           bookmarks. (prepend '%' before /usepackage if this breaks something)
9450
9451 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9452
9453          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
9454
9455 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
9456
9457         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
9458
9459 2003-05-21    <johan AT balder>
9460
9461         * src/SDCCglue.c (printIval): fixed bug #739934
9462
9463 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9464
9465         Applied patch from bug 737905 (renamed yylineo to mylineno):
9466         * src/altlex.c
9467         * src/SDCCast.c
9468         * src/SDCglobl.h
9469         * src/SDCC.lex
9470         * src/SDCCsymt.c
9471         * src/SDCCval.c
9472         * src/pic16/pcode.c: Cleaned warnings
9473         * src/pic16/pcodeflow.c: Cleaned warnings
9474         * src/pic16/pcoderegs.c: Cleaned warnings
9475
9476 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
9477
9478         * src/pic16/pcode.c: Cleaned warnings
9479         * src/pic16/pcodepeep.c: Cleaned warnings
9480         * src/pic16/ralloc.c: Cleaned warnings
9481
9482 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9483
9484         * doc/sdccman.lyx: fixed bug 739745
9485         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
9486
9487 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
9488
9489         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
9490         it can be defined with CFLAGS when running configure
9491         * src/SDCCmain.c: fixed compiling + linking with object files
9492
9493 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
9494
9495         * configure.in: configure for pic16 port,
9496             added --disable-pic16-port
9497         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
9498         * src/SDCCmain.c: linkOptions is changed to set *,
9499             added if/endif conditional macros to remove options help
9500             messages from optionsTable when a port is not configured, added
9501             support for the PIc16 port in the ports table, when executing
9502             the compiler with no port specified on command line, a default
9503             port is selected with the new macro DEFAULT_PORT which is
9504             defined in port.h, in setDefaultOptions() linkOptions is removed
9505             from initialization assignment, since now it is a set,
9506             parseCmdLine uses setParseWithComma for linkOptions, in
9507             linkEdit() linkOptions are accessed with new function indexSet()
9508             which returns the i'th item of a set variable. See SDCCset.c, in
9509             linkEdit() when calling buildCmdLine(), added linkOptions as
9510             last argument. Now users can pass arguments to gplink via the
9511             -Wl option, main() uses pic16glue() to glue up pic16 programs
9512         * src/SDCCpeeph.c: various changes to support pic16
9513         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
9514             return the i'th item of the set
9515         * src/SDCCset.h: added function prototype for indexSet()
9516         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
9517         * src/clean.mk: added pic16 in CLEANALLPORTS variable
9518         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
9519             added macro DEFAULT_PORT
9520         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
9521         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
9522             generated
9523         * src/pic16/glue.c: commented out some error producing lines
9524         * src/pic16/main.c: __config directives are commented out to stop
9525             gpasm complaining and test the linkage with gplink, _linkCmd and
9526             _asmCmd changed to be more gplink and gpasm friendly
9527         * src/pic16/peeph.def: peep rule 3 is commented out, since it
9528             produced an error when parsed, peep rule 12 is added to utilize
9529             movff, but it is commented out since the pCode does not support
9530             yet a command with 2 address arguments
9531
9532 2003-05-18    <johan AT balder>
9533
9534         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9535         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9536 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
9537
9538         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
9539   Added feature to script commands from file.
9540
9541 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
9542
9543         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
9544         * src/SDCCutil.c: include ctype.h for win32
9545
9546 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
9547
9548         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
9549
9550 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
9551
9552         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
9553   Fixed so you can set breakpoints prior to run, run does not stop
9554   on entry now.  Add tbreak.  Other enhancements and fixes for use
9555   with ddd.
9556
9557 2003-05-12  Borut Razem <borut.razem AT siol.net>
9558
9559         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
9560
9561 2003-05-11  Borut Razem <borut.razem AT siol.net>
9562
9563         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
9564         the path of bin directory, so that PATH is the only env. variable, which has to be set
9565         in case of standard installation.
9566         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
9567         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
9568         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
9569
9570 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9571
9572         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
9573         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
9574         temp files are in the port dir; clean the gen/test directory when
9575         generating new test.c
9576         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
9577         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
9578         * support/regression/tests/zeropad.c: added
9579
9580 2003-05-09    <johan AT balder>
9581
9582         * src/SDCCglue.c: fixed bug #597940
9583
9584 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
9585
9586         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9587   cache sfr, optimize next,step, fix off by one sourceline,
9588   support ddd list function.
9589         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
9590
9591 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9592
9593         * support/regression/HTMLgen.py: added compare_s2f()
9594         * support/regression/Makefile: redo 1.27
9595         * support/regression/generate-cases.py: redo 1.5
9596
9597 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
9598
9599         * support/regression/tests/float.c: workaround 33 bit hex constant
9600         * support/regression/tests/simplefloat.c: fix division for host
9601
9602 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
9603
9604         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
9605         that tame's the PIC's over-aggressive optimizer.
9606
9607 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9608
9609          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
9610          support for MSVC.
9611
9612 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
9613
9614         Initial support for DS80C400. "Hello world" runs on TINIm400
9615         (with polled I/O).
9616
9617 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
9618
9619          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9620          * Some notes on ddd usage added in debugger/README
9621          Martin Helmling adding more features and fixes for ddd GUI debugger.
9622          Code added for nexti, stepi, up, down, and other adjustments.
9623
9624 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
9625
9626         * src/pic/pCodepeep.c non-wildcard asmops are now handled
9627         * src/pic/peeph.def Added two rules to optimize carry manipulation
9628         * src/pic/* removed debug printfs
9629
9630 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
9631
9632         * debugger/mcs51/cmd.c: added header newalloc.h
9633
9634 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
9635
9636         * as/Makefile: new EXEEXT
9637         * as/z80/Makefile: remove trailing slash of BUILDIR
9638         * as/z80/clean.mk: new EXEEXT
9639         * Makefile.common.in: add to CFLAGS (and others), don't replace it
9640         * support/cpp2/Makefile.in: new EXEEXT
9641         * src/pic/glue.c (pic14emitRegularMap): fixed warning
9642
9643 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
9644
9645         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
9646         EXEEXT was introduced to fix all related problems with targets
9647         "clean", "install" and "uninstall"; a couple of further flaws
9648         especially with "clean" have been fixed too
9649         * as/mcs51/Makefile.in
9650         * as/mcs51/clean.mk
9651         * as/z80/Makefile
9652         * Makefile
9653         * clean.mk
9654         * debugger/mcs51/Makefile.in
9655         * debugger/mcs51/clean.mk
9656         * link/z80/Makefile
9657         * link/z80/Makefile.in
9658         * link/z80/clean.mk
9659         * link/Makefile
9660         * packihx/Makefile.in
9661         * packihx/clean.mk
9662         * sim/ucsim/Makefile
9663         * sim/ucsim/clean.mk
9664         * sim/ucsim/avr.src/Makefile.in
9665         * sim/ucsim/avr.src/clean.mk
9666         * sim/ucsim/s51.src/Makefile.in
9667         * sim/ucsim/s51.src/clean.mk
9668         * sim/ucsim/xa.src/Makefile.in
9669         * sim/ucsim/xa.src/clean.mk
9670         * sim/ucsim/z80.src/Makefile.in
9671         * sim/ucsim/z80.src/clean.mk
9672         * sim/ucsim/main_in.mk
9673         * sim/ucsim/packages_in.mk
9674         * sim/ucsim/gui.src/Makefile.in
9675         * sim/ucsim/gui.src/serio.src/Makefile.in
9676         * sim/ucsim/gui.src/serio.src/clean.mk
9677         * src/Makefile.in
9678         * src/clean.mk
9679         * support/cpp2/Makefile.in
9680         * support/cpp2/clean.mk
9681         * support/makebin/Makefile
9682         * support/makebin/clean.mk
9683         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
9684         * doc/sdccman.lyx: --program-suffix no longer needed
9685
9686 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
9687
9688          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
9689          Martin Helmling added support for ddd GUI debugger.
9690          Code added to display assembly, set variables, and other commands
9691          to interface to ddd.
9692
9693 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
9694
9695         * as/Makefile: fix target clean
9696         * as/clean.mk: fix target clean
9697         * as/z80/clean.mk: fix target clean
9698
9699 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
9700
9701         * Makefile.common.in: added  AT EXEEXT AT
9702         * configure.in: removed all mingw32 stuff
9703         * configure: rebuilt from configure.in
9704         * doc/sdccman.lyx: updated section "installation"
9705         * support/scripts/sdcc_mingw32: adapted to configure
9706         * support/scripts/sdcc_cygwin_mingw32: added
9707
9708 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
9709
9710         * src/pic Added object file support for the PIC port
9711         * src/pic Applied patch from Craig Franklin (this started the object file support)
9712         * src/regression Updated the PIC regression tests for object files
9713
9714 2003-04-20  Borut Razem <borut.razem AT siol.net>
9715
9716         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
9717           lklex.c: In function `getfid':
9718           lklex.c:203: warning: array subscript has type `char'
9719         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
9720           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
9721         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
9722           stack handling macros
9723
9724 2003-04-19  Borut Razem <borut.razem AT siol.net>
9725
9726         * "handling space characters in file path" task:
9727         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
9728         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
9729         * support/Util/MySystem.h: make it self-sufficient
9730         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
9731           src/z80/main.c, sdcc/as/mcs51/lklex.c:
9732           handling space characters in file path
9733         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
9734           (it will be used by assemblers, which have their own includes, e.g. gpasm)
9735         * support/Util/MySystem.c: handling space characters in executable's path
9736
9737 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
9738
9739         * as/z80/Makefile: fix permanent rebuild of z80
9740         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
9741         * support/regression/tests/bitfields.c: added Johan's bitfields.c
9742
9743 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
9744
9745         * src/SDCCopt.c: add special case optimization to replace modulo by
9746           a power of two with a bitwise AND.
9747
9748 2003-04-18    <johan AT balder>
9749
9750         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
9751
9752 2003-04-17    <johan AT balder>
9753
9754         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
9755         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
9756
9757 2003-04-13  Borut Razem <borut.razem AT siol.net>
9758
9759         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
9760         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
9761           fixed mingw problem in adl_NORMALIZE_PATH
9762
9763 2003-04-12  Borut Razem <borut.razem AT siol.net>
9764
9765         * fixed "#pragma SAVE/RESTORE can not be nested":
9766         * src/SDCC.lex: reworked pragma handling functions
9767         * sdcc/src/SDCCglobl.h: reworked stack handling macros
9768         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
9769
9770 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9771
9772         * src/SDCCutil.c (pathEquivalent): defined but not used
9773         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
9774         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
9775         * configure: rebuilt from configure.in
9776         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9777         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9778         * device/include/Makefile.in: replace sdcc_datadir
9779         * device/lib/Makefile.in: replace sdcc_datadir
9780         * Makefile.common.in: add LDFLAGS from configure
9781         * packihx/Makefile.in: use LDFLAGS
9782         * src/Makefile.in: use LDFLAGS
9783         * support/cpp2/Makefile.in: add LDFLAGS from configure
9784         * support/makebin/Makefile: use LDFLAGS
9785         * .version: bumped version number to 2.3.5
9786
9787 2003-04-12  Borut Razem <borut.razem AT siol.net>
9788
9789         * completed "different paths" task:
9790         * src/SDCCmacro.c: fixed bug in handling quotes
9791         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
9792         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9793
9794 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9795
9796         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9797
9798 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9799
9800         * ds390/gen.c ds390/peeph.def: fix bug 706781
9801
9802 2003-04-11  Borut Razem <borut.razem AT siol.net>
9803
9804         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9805
9806 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9807
9808         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9809         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9810          set - this bit used to not be set...).
9811         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9812           bad code in PIC Port
9813         * src/regression/and2.c added to test bug 609268
9814         * src/regression/Makefile added and2.c to regression test
9815
9816
9817 2003-04-08    <johan AT CP255758-A>
9818
9819         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9820         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9821         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9822
9823 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9824
9825         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9826         fix bug #487815
9827         * support/cpp2/Makefile.in: fix bug #487815
9828         * configure: rebuilt from configure.in
9829         * Makefile.common.in: docdir changed, new path suffixes
9830         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9831         * sdcc_vc_in.h: reflect changes from sdccconf.h
9832         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9833         * src/SDCCutil.h: remove BINDIR hack
9834         * doc/sdccman.lyx: update new path hierarchy
9835
9836 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9837
9838         * src/SDCCpeeph.c: added okToRemoveSLOC test
9839
9840 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9841
9842         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9843
9844 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9845
9846         * src/SDCCpeeph.c: added labelIsReturnOnly test
9847         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9848
9849 2003-04-05    <johan AT balder>
9850
9851         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9852         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9853         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9854         * src/SDCCast.c: fixed a warning
9855         * src/SDCCast.h: fixed a warning
9856         * src/SDCCicode.c (operandFromAst): fixed a warning
9857
9858 2003-04-04    <johan AT balder>
9859
9860         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9861         * src/SDCCast.c (decorateType): fixed bug #715076
9862         * src/SDCC.y: fixed bug #702907
9863
9864 2003-04-03    <johan AT balder>
9865
9866         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9867         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9868         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9869         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9870         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9871
9872 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9873
9874         * _decdptr.c: fix return values
9875         * _gptrget.c: fix return values
9876         * _gptrgetc.c: fix return values
9877         * _gptrput.c: fix return values
9878         * _mulint.c: fix return values
9879         * as/z80/Makefile: fix 'make -j' problem
9880
9881 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9882
9883         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9884         * configure.in: big cleanup, updated to autoconf 2.5x
9885         * configure: rebuilt from configure.in
9886         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9887         * sdcc_vc_in.h: reflect changes from sdccconf.h
9888         * doc/Makefile: fixed a flaw in "make install"
9889
9890 2003-04-02    <johan AT balder>
9891
9892         * src/ds390/gen.c (genCmp): no comments
9893         * src/mcs51/gen.c (genCmp): no comments
9894         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9895         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9896
9897 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9898
9899         * support/regression/generate-cases.py: place generated file in given sub directory
9900         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9901         * support/regression/Makefile: improvements for 'make -j';
9902         side effect: it's simpler and faster now
9903
9904 2003-03-31  Borut Razem <borut.razem AT siol.net>
9905
9906         * src/z80/main.c: link-{port} and as-{port} defined without path
9907         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9908
9909 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9910
9911         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9912
9913 2003-03-30  Borut Razem <borut.razem AT siol.net>
9914
9915         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9916           changed type of list parameter to set
9917         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9918         * src/port.h: changed type of do_assemble() parameter to set
9919         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9920           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9921           definition of "cppoutfilename" macro with NULL value in preProcess()
9922         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9923         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9924         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9925           replaced with set *binPathSet
9926         * shash_add() deallocates the item, if allready exsists, before adding the new one
9927         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9928
9929 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9930
9931         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9932           a nested for loop bug in the PIC port
9933         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9934           for loops
9935
9936 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9937
9938         * support/Util/dbuf.h: remove C++ stuff to make it portable
9939
9940 2003-03-28  Borut Razem <borut.razem AT siol.net>
9941
9942         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9943           literal strings in stringLiteral()
9944         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9945         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9946           to the project
9947
9948 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9949
9950         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9951
9952 2003-03-26    <johan AT balder>
9953
9954         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9955         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9956         * src/SDCCast.c (decorateType): fixed " -v < 3"
9957
9958 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9959
9960         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9961         Added Lenny Story's debug infrastructure changes:
9962         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9963         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9964         * src/cdbFile.c: added
9965         * src/SDCCdebug.c: added
9966         * src/SDCCdebug.h: added
9967         * src/SDCCast.c (createFunction)
9968         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9969         * src/SDCCmain.c (parseCmdLine, main)
9970         * src/SDCCmem.c (redoStackOffsets)
9971         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9972         * src/SDCCsymt.h
9973         * src/common.h
9974         * src/avr/gen.c (genAVRCode)
9975         * src/ds390/gen.c (gen390Code)
9976         * src/mcs51/gen.c (gen51Code)
9977         * src/pic/gen.c (genpic14Code)
9978         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9979         * src/xa51/gen.c (genXA51Code)
9980         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9981
9982 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9983
9984         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9985         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9986
9987 2003-03-22    <johan AT balder>
9988
9989         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9990
9991 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9992
9993         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9994         * doc/cdbfileformat.lyx: added, written by Lenny Story
9995         * doc/Makefile: added cdbfileformat.lyx
9996         * doc/clean.mk: added cdbfileformat.lyx
9997
9998 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9999
10000         * src/mcs51/peeph.def: fix bug #705773
10001
10002 2003-03-20    <johan AT balder>
10003
10004         An sfr/sbit can have an "at #" AND an initializer
10005         * src/SDCCsymt.c (checkSClass):
10006         * src/SDCCmem.c (allocGlobal):
10007         * src/SDCCmem.c (allocLocal):
10008         * src/SDCCast.c (createBlock):
10009
10010 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
10011
10012         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
10013
10014 2003-03-16    <johan AT balder>
10015
10016         Undid the hackup of const and volatile, the problem is much bigger
10017         * src/SDCC.y:1.65
10018         * src/SDCCast.c:1.171
10019         * src/SDCCglue.c:1.138
10020         * src/SDCCicode.c:1.146
10021         * src/SDCCsymt.c:1.150
10022         * src/SDCCval.c:1.65
10023
10024 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
10025
10026         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
10027         * src/ds390/gen.c (genAddrOf): fixed bug #704087
10028
10029 2003-03-13    <johan AT balder>
10030
10031         Hackup const and volatile modifiers in type chains a bit:
10032         * src/SDCC.y:1.63
10033         * src/SDCCast.c:1.169
10034         * src/SDCCglue.c:1.136
10035         * src/SDCCicode.c:1.143
10036         * src/SDCCsymt.c1.146
10037         * src/SDCCsymt.h1.59
10038         * src/SDCCval.c:1.63
10039
10040 2003-03-12    <johan AT balder>
10041
10042         * src/SDCCBBlock.h: more LRH debugging junk
10043         * src/SDCCcflow.h: more LRH debugging junk
10044         * src/SDCCloop.c: more LRH debugging junk
10045         * src/SDCC.y (struct_declaration): fixed bug #697590
10046         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
10047         * src/ds390/gen.c (aopForRemat): fixed bug #700031
10048         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
10049
10050 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10051         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
10052         test function names must now match exactly).
10053         * src/SDCCcse.c: added special case in findCheaperOp to allow
10054         extending a short integer. Makes less awful code for bug 700121 test case.
10055
10056 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10057
10058         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
10059         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
10060
10061 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10062
10063         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
10064         actually called (operandsNotEqual() was called for all
10065         operandsNotEqualX tests).
10066
10067 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10068
10069         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
10070         with shorter literals. Fixes bug 700121.
10071
10072 2003-03-11    <johan AT balder>
10073
10074         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
10075
10076 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
10077
10078         * src/SDCCloop.c (mergeRegions): an evil beast is dead
10079         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
10080
10081 2003-03-10  Borut Razem <borut.razem AT siol.net>
10082
10083         * src/SDCCmain.c: pipe preprocessor's output
10084         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10085         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10086         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10087         which closes all pipes in pipeSet set
10088         * src/SDCCset.c: free deleted item in function deleteSetItem()
10089         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10090         moved from z80 to src subproject
10091         * .version: increased version number to 2.3.4
10092
10093 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
10094
10095         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
10096         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
10097         * support/regression/ports/xa51/spec.mk: fix typo
10098
10099 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
10100
10101         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
10102
10103 2003-03-09  Borut Razem <borut.razem AT siol.net>
10104
10105         * src/SDCCmain.c: pipe preprocessor's output
10106         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10107         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10108         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10109         which closes all pipes in pipeSet set
10110         * src/SDCCset.c: free deleted item in function deleteSetItem()
10111         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10112         moved from z80 to src subproject
10113
10114 2003-03-09  Borut Razem <borut.razem AT siol.net>
10115
10116         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
10117         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
10118         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
10119         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
10120         * src/SDCCglobl.h: unification of WIN32 native definitions
10121
10122 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10123
10124         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
10125
10126 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10127
10128         * src/configure.in:   check for endianess (even while cross-compiling)
10129         * src/configure:      check for endianess (even while cross-compiling)
10130         * src/configure_in.h: check for endianess (even while cross-compiling)
10131         * src/avr/gen.c:        remove old endianess stuff
10132         * src/mcs51/gen.c:      remove old endianess stuff
10133         * src/ds390/gen.c:      remove old endianess stuff
10134         * src/pic/gen.c:        remove old endianess stuff
10135         * src/pic/genarith.c:   remove old endianess stuff
10136         * src/pic/glue.c:       fix endianess check
10137         * src/pic16/gen.c:      remove old endianess stuff
10138         * src/pic16/genarith.c: remove old endianess stuff
10139         * src/pic16/glue.c:     fix endianess check
10140         * src/xa51/gen.c:       remove old endianess stuff
10141         * src/z80/gen.c:        fix endianess check
10142         * src/SDCCglue.c:       fix endianess check
10143         * src/ds390/peeph.def: fix bug 700036
10144
10145 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10146
10147         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
10148         * src/configure: find appropriate data-types on host for SDCC's int and long
10149         * src/configure.in: find appropriate data-types on host for SDCC's int and long
10150         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
10151         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
10152
10153 2003-03-07    <johan AT balder>
10154
10155         Just a big NOOP:
10156                 some minor cleanups before the big shot
10157                 OP_DEFS and OP_USES now use Kevin's protection
10158                 new option --nolabelopt
10159
10160         * src/SDCCBBlock.c:
10161         * src/SDCCast.c,:
10162         * src/SDCCcflow.c:
10163         * src/SDCCcse.c:
10164         * src/SDCCicode.c:
10165         * src/SDCCicode.h:
10166         * src/SDCClabel.c:
10167         * src/SDCCloop.c:
10168         * src/SDCCmain.c:
10169         * src/ds390/ralloc.c:
10170         * src/mcs51/ralloc.c:
10171         * src/pic/ralloc.c:
10172         * src/xa51/ralloc.c:
10173         * src/z80/ralloc.c:
10174
10175 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
10176
10177         * src/pic/pcode.c (get_op): fix 64 bit warnings
10178         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
10179         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
10180         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
10181         * support/regression/tests/malloc.c: fix 64 bit warnings
10182
10183 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
10184
10185         * src/mcs51/gen.c (genMinus): fixed bug 696436
10186
10187 2003-03-02  Borut Razem <borut.razem AT siol.net>
10188
10189         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
10190
10191 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
10192
10193         * configure.in: test for mkstemp
10194         * sdccconf_in.h: add HAVE_MKSTEMP
10195
10196 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
10197
10198         * device/include/ctype.h: removed warning while using --stack-auto
10199         * device/include/malloc.h: removed warning while using --stack-auto
10200         * device/include/string.h: removed warning while using --stack-auto
10201
10202 2003-02-23  Borut Razem <borut.razem AT siol.net>
10203
10204         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
10205         because NDEBUG is defined (see man assert)
10206         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
10207
10208 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10209
10210         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
10211         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
10212
10213 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10214
10215         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
10216         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
10217
10218 2003-02-18    <johan AT balder>
10219
10220         * as/mcs51/asmain.c (asmbl): module can start with a digit
10221         * as/z80/asmain.c (asmbl): module can start with a digit
10222
10223 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
10224
10225         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
10226         * src/asm.c: fix pipe() for Mingw32
10227
10228 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
10229
10230         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
10231         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
10232         make -V work again; --c1mode reads now from stdin
10233         * doc/sdccman.lyx: added --c1mode
10234         * support/Util/SDCCerr.c: new messages for c1 mode
10235         * support/Util/SDCCerr.h: new messages for c1 mode
10236         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
10237
10238 2003-02-15    <johan AT balder>
10239
10240         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
10241
10242 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
10243
10244         * doc/sdccman.lyx: Environment variables, -o and other minor things
10245
10246 2003-02-14    <johan AT balder>
10247
10248         * src/xa51/main.c: before anyone really tries to use it :)
10249
10250         * Install doc's in share/sdcc/doc
10251         * removed some obsolete files
10252         * Do a proper make distclean and uninstall
10253         M Makefile.common.in
10254         R sdccbuild.sh
10255         M as/Makefile
10256         M device/include/Makefile.in
10257         M device/lib/Makefile.in
10258         M doc/sdccman.lyx
10259         M link/Makefile
10260         M sim/ucsim/doc/Makefile.in
10261         M src/clean.mk
10262         R src/avr/peeph.rul
10263         R src/xa51/peeph.rul
10264         M support/cpp2/Makefile.in
10265         M support/makebin/Makefile
10266
10267
10268 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10269
10270         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10271
10272 2003-02-10  Borut Razem <borut.razem AT siol.net>
10273
10274         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10275         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10276         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10277         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10278         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10279         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10280         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10281         src/z80/Makefile.bcc: Borland Makefile cleanup
10282         * as/z80/Makefile.bcc: Added Borland Makefile
10283         * support/cpp2/borland.h: Removed
10284
10285 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10286
10287         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10288         * src/SDCC.lex: new pragma NOIV
10289         * src/SDCCglobl.h: new pragma NOIV
10290         * src/SDCCmem.c: new pragma NOIV
10291
10292 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10293
10294         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10295
10296 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10297
10298         * src/SDCCmain.c: signal handling is switched off by --debug
10299         * doc/Makefile: small fix for install; use clean.mk again
10300         * doc/clean.mk: clean *.pdf and *.html too
10301
10302 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
10303
10304         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
10305         * device/lib/printfl.c: fix a ds390 bug by making it portable
10306         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
10307         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
10308         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
10309         * debugger/mcs51/cmd.c: converted multi-line string literals
10310         * sim/ucsim/globals.cc: converted multi-line string literals
10311         * src/SDCCmain.c: introduced signal handler to remove temp files
10312         * doc/Makefile: small tweaks, implement clean
10313         * doc: removed generated files
10314
10315 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10316
10317         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
10318         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
10319         Address Record is not correctly generated for DS390."
10320
10321 2003-02-02  Borut Razem <borut.razem AT siol.net>
10322
10323         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
10324         * as/mcs51/asm.h: fixed compilation with Borland C
10325         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
10326         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
10327         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
10328         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
10329         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
10330         src/z80/Makefile.bcc: delete $(LIB) only if exist
10331         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
10332
10333 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
10334
10335         * device/include/malloc.h: introduced NULL
10336         * device/include/string.h: introduced NULL
10337         * device/include/stdlib.h: introduced NULL
10338         * device/lib/_memcpy.c: removed NULL
10339         * device/lib/_strcat.c: removed NULL
10340         * device/lib/_strchr.c: removed NULL
10341         * device/lib/_strcmp.c: removed NULL
10342         * device/lib/_strcpy.c: removed NULL
10343         * device/lib/_strcspn.c: removed NULL
10344         * device/lib/_strlen.c: removed NULL
10345         * device/lib/_strncat.c: removed NULL
10346         * device/lib/_strncmp.c: removed NULL
10347         * device/lib/_strncpy.c: removed NULL
10348         * device/lib/_strpbrk.c: removed NULL
10349         * device/lib/_strrchr.c: removed NULL
10350         * device/lib/_strspn.c: removed NULL
10351         * device/lib/_strstr.c: removed NULL
10352         * device/lib/_strtok.c: removed NULL
10353         * device/lib/malloc.c: removed NULL, include own header
10354
10355 2003-02-02    <johan AT balder>
10356
10357         * 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
10358         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
10359         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
10360         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
10361         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
10362         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
10363
10364 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10365
10366         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
10367         area 'DATA'"
10368
10369 2003-02-01    <johan AT balder>
10370
10371         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
10372
10373 2003-01-31    <johan AT CP255758-A>
10374
10375         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
10376
10377 2003-01-30    <johan AT balder>
10378
10379         * src/SDCCBBlock.c: automatic bug detection
10380         * src/SDCCicode.c: automatic bug detection
10381
10382 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10383
10384         * src/SDCCglobl.h:   now --xram-size 0 works
10385         * src/SDCCmain.c:    now --xram-size 0 works
10386
10387 2003-01-29    <johan AT balder>
10388
10389         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
10390
10391 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10392
10393         * as/mcs51/aslink.h: Added options --xram-size and --code-size
10394         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
10395         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
10396         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
10397         * src/SDCCglobl.h:   Added options --xram-size and --code-size
10398         * src/SDCCmain.c:    Added options --xram-size and --code-size
10399
10400 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
10401
10402         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
10403         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
10404
10405 2003-01-27    <johan AT balder>
10406
10407         * src/SDCC.y: fixed bug #613764
10408
10409 2003-01-26    <johan AT balder>
10410
10411         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
10412         * src/SDCCsymt.h: fixed bug #673374
10413         * src/SDCCglue.c: fixed bug #661910
10414         * src/SDCCast.c: fixed bug #458099 and 673374
10415
10416 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
10417
10418         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
10419         * as/mcs51/strcmpi.h: added
10420         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
10421         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
10422         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
10423         * as/mcs51/assym.c: strcmpi -> as_strcmpi
10424         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
10425         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
10426         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
10427         * as/mcs51/Makefile.aslink: new module strcmpi
10428         * as/mcs51/Makefile.asx8051: new module strcmpi
10429         * as/mcs51/Makefil.bcc: new module strcmpi
10430         * as/mcs51/Makefile.in: new module strcmpi
10431         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
10432
10433 2003-01-26    <johan AT balder>
10434
10435         * src/SDCCglue.c: reverted back to 1.124
10436         * src/SDCCast.c: reverted back to 1.156
10437         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
10438
10439 2003-01-25    <johan AT balder>
10440
10441         * src/SDCCglue.c: A better fix for bug #661910
10442         * src/SDCCast.c: A better fix for bug #661910
10443         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
10444
10445 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10446
10447         * src/Makefile.in: remove spawn.o
10448         * src/SDCCmain.c: remove spawn.h
10449         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
10450         * src/spawn.c: removed
10451         * src/spawn.h: removed
10452         * support/regression/ports/ds390/spec.mk: link with -r
10453
10454 2003-01-24    <johan AT CP255758-A>
10455
10456         * src/ds390/gen.c (aopOp): fixed bug #667458
10457         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
10458         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
10459         (createIvalCharPtr): an ival doesn't always have a storage class anymore
10460
10461 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10462
10463         * src/mcs51/peeph.def: better assembler identation by Frieder
10464         * src/mcs51/gen.c: better assembler identation by Frieder
10465
10466 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
10467
10468         * as/z80/string.h: removed for gcc 3.2
10469         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
10470         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
10471
10472 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10473
10474         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
10475         * src/SDCCpeeph.c (replaceRule): fix bug #663503
10476         * support/regression/Makefile: separate temp files for ports
10477         * support/regression/generate-cases.py: separate temp files for ports
10478         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10479         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10480
10481 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10482
10483         * moved tinitalk to device/examples/ds390
10484
10485 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
10486
10487         * as/mcs51/lkmem.c: rflag is for DS390
10488         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
10489         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
10490                          (linkEdit): move mem- and map-files the same way as ihx-files
10491         * src/z80/main.c (_setDefaultOptions): removed --generic
10492         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
10493         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
10494         * src/pic/glue.c (picglue): --c1mode works again
10495         * src/pic16/glue.c (pic16glue): --c1mode works again
10496         * src/asm.c (printCLine): fix #660034
10497
10498 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
10499
10500         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
10501         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
10502         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
10503         * as/mcs51/lkmem (summary): better fix for sp problem
10504         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
10505         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
10506         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
10507                                               remove --stack-after-data
10508
10509 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
10510
10511         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
10512         * src/SDCCutil.c (join): ugly bug: missing '\0'
10513         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
10514
10515 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10516
10517         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
10518         * src/port.h: typo
10519         * src/pic/main.c (_asmCmd): gpasm supports -o
10520         * src/z80/main.c: more general macros
10521         * device/lib/Makefile.in: remove intermediate files
10522
10523 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10524
10525         * .version: Bumped version number to 2.3.3
10526         * src/SDCCBBlock.c: new option -o
10527         * src/SDCCglobl.h: new option -o
10528         * src/SDCCglue.c: new option -o
10529         * src/SDCCmain.c: new option -o
10530         * src/asm.c: new option -o
10531         * src/ds390/main.c: new option -o
10532         * src/pic/glue.c: new option -o
10533         * src/pic/pcode.c: new option -o
10534         * src/pic/ralloc.c: new option -o
10535         * src/pic16/glue.c: new option -o
10536         * src/pic16/pcode.c: new option -o
10537         * src/pic16/ralloc.c: new option -o
10538         * src/z80/main.c: new option -o
10539         * device/lib/Makefile.in: use -o
10540         * support/regression/ports/ds390/spec.mk: use -o
10541         * support/regression/ports/gbz80/spec.mk: use -o
10542         * support/regression/ports/mcs51/spec.mk: use -o
10543         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
10544         * support/regression/ports/z80/spec.mk: use -o
10545         * support/regression/ports/ucz80/spec.mk: use -o
10546         * support/regression/ports/xa51/spec.mk: use -o
10547         * support/regression/fwk/lib/timeout.c: fix usage string
10548
10549 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
10550         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
10551
10552 2003-01-07    <johan AT balder>
10553
10554         * src/SDCCast.c (decorateType): fixed bug #600035
10555
10556 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
10557         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
10558         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
10559         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
10560         * src/pic/pcode.c: outcommented unused variable to remove warnings
10561         * src/pic/ralloc.c: outcommented unused variable to remove warnings
10562
10563 2003-01-06    <karl AT turbobit.com>
10564         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
10565    regression tests.
10566
10567 2003-01-06    <johan AT balder>
10568
10569         * src/SDCCicode.c: fixed array add
10570
10571 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
10572         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
10573         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
10574
10575 2003-01-04    <johan AT balder>
10576
10577         * src/SDCCval.c (getNelements): fixed the initialized array of structures
10578
10579 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10580         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
10581
10582 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10583         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
10584         * support/regression/tests/bug-524697.c: fit mem usage into 8032
10585
10586 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10587         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
10588
10589 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
10590         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
10591
10592 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
10593         * src/mcs51/main.c: removed {bindir}{sep} from aslink
10594
10595 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10596
10597     * in \sdcc\as\mcs51\ changed these files in order to create an
10598     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
10599     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
10600     following files to include the previous two files: aslink.dsp,
10601     Makefile.aslink, Makefile.bcc, and Makefile.in.
10602
10603     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
10604     .adb instead of .cdb
10605
10606 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10607
10608         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
10609         value from option --iram-size.
10610
10611 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10612
10613         * \sdcc\as\mcs51\lklist.c: added boundary check before using
10614         dram[] array.
10615
10616 2002-09-18    <wiml AT hhhh.org>
10617
10618         * SDCClrange.h: exposed setFromRange() and setToRange()
10619         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
10620           packRegsForAccUse() (bug 542397)
10621         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
10622           multiple times and emitting the fetch operations more than once
10623           added aopGetUsesAcc() function to allow binary operators to
10624           fetch their operands in the correct order; made genMinus() emit
10625           compact code for X = LITERAL - Y
10626
10627 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10628         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
10629         sprintf() in line 1267.
10630
10631 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10632         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
10633         like ports.
10634
10635 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10636         Changes to aslink (All the changes are marked with 'JCF'):
10637
10638         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
10639         summary().
10640
10641         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
10642         area BSEG.  Also moves, if possible, the DATA area down into the internal
10643         ram so more space is available.
10644
10645         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
10646         sflag.
10647
10648         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
10649         not bytes.  Function summary() which creates a memory usage summary
10650         file with extension .mem.  Reports of overlaping stack and small stack
10651         size.  If the space for the stack is less than 16 bytes aslink trows a
10652         warning.
10653
10654         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
10655         the 8051.  Option 'y' for memory summary output file.
10656
10657         Changes to sdcc (All the changes are marked with 'JCF'):
10658
10659         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
10660
10661         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
10662         overlaying area for it (uses RegBankUsed[4]).
10663
10664         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
10665         bank zero as used by default.  By default aslink locates the stack
10666         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
10667         the creation of the .mem file.  Delegates the allocation of data area
10668         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
10669         the begining of the stack area to aslink.
10670
10671         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
10672         glue() in SDCCglue.c creates an area for it.
10673
10674 2002-09-03  Borut Razem <borut.razem AT siol.net>
10675         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
10676         sdcc/src/pic/glue.c:
10677         introduced atexit() handler for teporay files removal in case of
10678         errors, assertions, ...
10679
10680 2002-08-29  Borut Razem <borut.razem AT siol.net>
10681         * sdcc/support/cpp2/auto-host_vc_in.h:
10682         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
10683         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
10684         Maybe there is a similar problem with BORLANDC? It should be checked!
10685
10686         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
10687         corrected improper use of assert: the assignment to clr variable was done inside the assert.
10688         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
10689         was not executed, and the compiler (cl) launched a warning:
10690         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
10691
10692 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10693         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
10694
10695 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
10696         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
10697
10698         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10699           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
10700           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
10701           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10702           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
10703           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
10704           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
10705         - added Release configuration in VS projects
10706         - review of compiler an linker options
10707         - VC .exe files are generated in bin_vc directory, not to interfere
10708           with binaries generated from other projects (cygwin, mingw, bcc ...)
10709
10710         * sdcc/src/yacc.dsp: added
10711
10712         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
10713         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
10714         and insert the version number definitions from .version
10715
10716         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
10717
10718         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
10719         added - genarate auto-host.h using auto-host_vc_in.h as template
10720
10721         * sdcc/sdcc_vc.h,
10722         removed from CVS, generated automatically
10723
10724 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
10725         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
10726
10727 2002-08-11  Borut Razem <borut.razem AT siol.net>
10728         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
10729
10730 2002-08-10  Borut Razem <borut.razem AT siol.net>
10731         * src/SDCCmain.c (main):
10732         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
10733         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
10734         The consequence was that some temporary files were not removed.
10735
10736         * src/SDCCglue.c:
10737         unification of code in functions tempfilename() and tempfile():
10738         function tempnam() is defined in Visual Studio 6.0 and .NET
10739
10740         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
10741
10742         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10743           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
10744         - removed compiler command line option /WX: Treats all warnings as errors
10745         - update a list of source files, included into the project
10746
10747         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10748           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
10749         changed project type to Generic Project so that can be correcly converted to VS.NET project
10750
10751         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
10752
10753         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
10754
10755         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
10756
10757         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
10758         added return 0 statements after assert() to make compiler happy
10759
10760         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
10761         added newline in the def file to keep MSC compiler satisfied
10762
10763         * sdcc/src/z80/gen.c:
10764         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
10765           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
10766         - solved MSC error in function aopDump()
10767
10768         * sdcc_vc.h: define PREFIX as "\\sdcc"
10769
10770 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
10771         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
10772
10773 2002-06-22  Scott Dattalo <scott AT dattalo.com>
10774         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
10775         - Rewrote the register banking algorithm.
10776         - Added pCode live-range analysis to registers (for now, only non-used and
10777         singly-used registers optimized away)
10778
10779         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
10780
10781         * 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.
10782
10783 2002-05-10  Scott Dattalo <scott AT dattalo.com>
10784         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
10785
10786 2002-04-22  Michael Hope  <michaelh AT vroom>
10787
10788         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
10789
10790         * configure.in (DD_COPT): Added include support required for gbdk.
10791
10792         * .version: Bumped version number just to increase it.
10793
10794         * src/SDCCmain.c: Added -nostdinc to the default options.
10795
10796 2002-04-15  Michael Hope  <michaelh AT vroom>
10797
10798         * device/lib/z80/printf.c (sprintf): Added.
10799
10800         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10801
10802         * src/z80/peeph.def: Added transpose redundent load rule.
10803
10804         * src/z80/main.c: Added force callee saves for jaune.
10805
10806         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10807
10808         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10809
10810 2002-03-28  Johan Knol  <johan AT balder>
10811
10812         * src/SDCCval.c: fixed bug #532436
10813
10814 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10815         * /src/port.h:
10816         Added "char *Processor" field to the port structure.
10817
10818         * /src/SDCCmain.c:
10819         Added -p option. Allows port dependent processor to be specified.
10820
10821         * all ports:
10822         Initialized the new field char *Processor field to NULL in all ports
10823
10824         * /src/pic/*:
10825         Compiler generated registers for interrupt context saving
10826         were not getting allocated.
10827
10828 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10829
10830         * /src/SDCCast.c:
10831         Fixed left shift. Will promote the left side of a left shift
10832         if a) left shifting more than size of operand or b) when assigned
10833         to something size > size of left side
10834
10835 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10836         * src/pic/*
10837         tons of changes. Register allocation has been
10838         rewritten. Added customization for the various PICs. Flow
10839         analysis is restructured. ...
10840
10841         * src/pic/device.h:
10842         Added
10843
10844         * src/pic/device.c:
10845         Added. device.c is a PIC port hack to accomodate variations
10846         in PIC devices.
10847
10848 2002-03-13  Michael Hope  <michaelh AT vroom>
10849
10850         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10851
10852 2002-03-04  johanknol  <johanknol AT manik>
10853
10854         * /src/SDCCval.c: fixed
10855
10856         const unsigned char arr[][2] = { { 0, 1 } };
10857         t18.c:1: error: Initializer element is not constant
10858
10859 2002-03-04  bela  <bela AT manik>
10860
10861         * /device/include/mcs51reg.h:
10862         ds89c420 register definition update
10863
10864 2002-03-03    <johan AT FRIJA>
10865
10866         * support/Util/SDCCerr.c: did something, but don't no why anymore
10867
10868         * support/regression/tests/bug-524691.c: made it a little less shy
10869
10870         * src/SDCCast.c (decorateType): fixed bug #524697
10871
10872         * src/SDCCast.c: made some lineno improvements
10873
10874         * src/SDCCval.c (getNelements): changed warning to error
10875
10876         * src/SDCCglue.c (printIvalArray): changed warning to error
10877
10878         * src/SDCCicode.c: fixed a warning for mingw
10879
10880         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10881
10882         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10883
10884 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10885
10886         * src/ds390/peeph.def:
10887         Added some more peephole rules
10888
10889         * src/ds390/gen.c: Various fixes & enhancements
10890
10891         * src/SDCClrange.c, src/SDCClrange.h:
10892         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10893
10894         * src/ds390/ralloc.c:
10895         various fixes & enhancements (ds390) specific
10896
10897         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10898         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10899         from rallocs.
10900
10901         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10902
10903 2002-03-02    <johan AT FRIJA>
10904
10905         * src/SDCCast.c (decorateType): fixed bug #524708
10906
10907         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10908
10909         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10910
10911 2002-03-01  Michael Hope  <michaelh AT vroom>
10912
10913         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10914
10915         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10916
10917 2002-03-01    <johan AT FRIJA>
10918
10919         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10920
10921         * src/SDCCast.c (decorateType): fixed bug #524209
10922
10923         * src/SDCCval.c (valNot): fixed bug #524195
10924
10925 2002-02-26    <johan AT balder>
10926
10927         * src/xa51/gen.c: fixed a warning
10928
10929         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10930
10931         * src/SDCCast.c (decorateType): fixed bug #522534
10932
10933 2002-02-23    <johan AT balder>
10934
10935         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10936
10937 2002-02-22    <johan AT balder>
10938
10939         * src/SDCCast.c: fixed bug #514865
10940
10941         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10942
10943 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10944
10945         * sdcc/src/SDCCloop.c:
10946         Previous fix was not good. basic blocks that have "break" or "return" are
10947         not really partof a loop , but live ranges used in these blocks should
10948         be live thru the entire loop, so set partOfLoop but don't add them to
10949         loop region
10950
10951 2002-02-21    <johan AT FRIJA>
10952
10953         * src/SDCCcse.c: fixed bug #514308
10954
10955 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10956
10957         * src/SDCCloop.c:
10958         Fixed BUG #519583. If a conditional block ended in a return/break
10959         statement inside a loop, it was not being considered part of the loop.
10960
10961         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10962
10963 2002-02-10  Karl Bongers <karl AT turbobit.com>
10964
10965         * debugger/*:
10966         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10967         with lots of comments and notes.
10968
10969         * device/examples/test2.c:
10970         Fix bug, "red" variable not being initialized(compiler complained).
10971
10972         * device/examples/Makefile, examples/test3.c:
10973         Add Makefile in device/examples folder, compiles test3.c
10974         for use as a multiple module SDCDB test case.
10975
10976         * sim/ucsim/cmd.src/cmdset.cc:
10977         Took out debug printfs in ucsim "next" command.
10978
10979         * sim/ucsim/xa.src:
10980         Karl and Johan start ucsim XA support.  Most dissassembly working,
10981         about 75% emulation done(plenty of work remaining).
10982
10983         * sim/ucsim/z80.src:
10984         Add Z80 support to ucsim, add test-ucz80 regression test,
10985         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10986         Notice z80 compiler fails on examples/test3.c/crc code.
10987
10988 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10989
10990         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10991         Added support for --parms-in-bank1
10992
10993         * src/ds390/peeph.def:
10994         added a few more peephole optimzations
10995
10996         * src/ds390/main.c:
10997         1) added __builtin_inp & __builtin_outp used to read in data of given length
10998            from a memory mapped port
10999         2) added __builtin_memcmp
11000         3) added __builtin_swapw swap bytes of a short
11001
11002         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
11003         1) handle multiple send & receives from register bank1
11004         2) ralloc can now allocate DPTR1 to some liveRanges
11005
11006         * src/SDCCsymt.c, src/SDCCsymt.h:
11007         changes to handle multiple sends & receives
11008
11009         * src/SDCCptropt.h:
11010         added some pointer arithmetic optimization
11011
11012         * src/SDCCptropt.c:
11013         added some pointer arithmetic optimizations but not stable yet so not
11014         called from anywhere (will get this working shortly)
11015
11016         * src/SDCCopt.c: fixed for multiple sends & receives
11017
11018         * src/SDCCmain.c:
11019         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
11020         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
11021            set preprocessor defines (depending on options)
11022
11023         * src/SDCCicode.c, src/SDCCicode.h:
11024         changes made to handle multiple sends & receives
11025
11026         * src/SDCCglobl.h:
11027         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
11028
11029         * src/SDCCcse.c, src/SDCCcse.h:
11030         added function findbackward def (to be used in upcoming optimization)
11031
11032         * src/SDCCcflow.c, src/SDCCcflow.h:
11033         added function returnAtEnd - to determine if a basic block terminates with
11034         a RETURN iCode
11035
11036         * src/SDCCast.c, src/SDCCast.h:
11037         added option parms-in-bank1
11038
11039         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
11040         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
11041         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
11042         adjusted for --parms-in-bank1 option
11043
11044         * device/include/string.h:
11045         donot redefine "reentrant" keyword
11046
11047         * device/include/ds80c390.h: Added some more SFRs
11048
11049 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
11050
11051         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
11052
11053 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
11054
11055         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
11056
11057 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
11058
11059         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
11060
11061 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
11062
11063         * Added --xram-movc option
11064
11065 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
11066
11067         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
11068
11069 2002-01-11  Johan Knol
11070
11071         * Added math lib of Jesus Calvino-Fraga
11072
11073 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
11074
11075         * src/SDCCmain.c (processFile): fix processing of ../../src.c
11076         * support/regression/Makefile: new target test-mcs51-stack-auto
11077         * support/regression/ports/mcs51-stack-auto/spec.mk: added
11078
11079 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11080
11081         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
11082
11083 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11084
11085         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
11086
11087 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
11088
11089         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
11090
11091         * src/SDCCglue.h: add definition for printIvalChar()
11092
11093 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11094
11095         * src/SDCCast.c: fix #498138 by Johan
11096
11097         * src/SDCCglue.c: fix #498138 by Johan
11098
11099 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11100
11101         * support/regression/Makefile: fix clean
11102
11103         * support/regression/ports/ds390/support.c: fix transmission of last character
11104
11105 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
11106
11107         * /sdcc/src/ds390/gen.c:
11108         a) improved computing address of stack variable
11109         b) took out some #if 0 code
11110         c) improved parmBytes adjustment
11111         d) improved genPlusIncr & genMinusIncr
11112         e) genCmp could generate bad code (when left assigned to DPTR)
11113         f) Fixed bug in hasInc
11114
11115         * /sdcc/src/ds390/ralloc.c:
11116         a) packRegsForSupport could mess up live information (Fixed)
11117         b) packRegsDPTRuse could be incorrect for left & right shift
11118
11119         * /sdcc/src/mcs51/ralloc.c:
11120         packRegsForSupport could mess up the live information (Fixed)
11121
11122         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
11123
11124         * /sdcc/src/SDCCast.c:
11125         can reverse a loop even if function call is present as long
11126         as the loop control variable is local & is not passed as parameter
11127
11128 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11129
11130         * /sdcc/ChangeLog: *** empty log message ***
11131
11132         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
11133         More builtin function additions for TININative
11134
11135         * /sdcc/src/ds390/ralloc.c:
11136         Had broken the regression testsuite
11137
11138         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
11139
11140         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
11141         Added funcattr hasStackParms will be set for reentrant functions when there
11142         are paramteres on the stack, this helps in minimizing frame pointer generation
11143         typeFromStr can handle function pointers now
11144
11145         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
11146         *** empty log message ***
11147
11148 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11149
11150         * /src/ds390/gen.c, /src/ds390/main.c:
11151         More builtin function additions for TININative
11152
11153         * /src/ds390/ralloc.c:
11154         Had broken the regression testsuite
11155
11156         * /src/SDCCast.c: Fixed a bug in dumptree
11157
11158         * /src/SDCCsymt.c, /src/SDCCsymt.h:
11159         Added funcattr hasStackParms will be set for reentrant functions when there
11160         are paramteres on the stack, this helps in minimizing frame pointer generation
11161         typeFromStr can handle function pointers now
11162
11163         * /doc/builtins.txt, /doc/TININative.txt:
11164         *** empty log message ***
11165
11166
11167 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11168
11169         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
11170         ALPHA version for -mTININative
11171
11172         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
11173         updated to reflect changes in the port structure
11174
11175         * /src/port.h:
11176         added function do_assemble (similar to do_link) if non-null this function
11177         will be called to do assembly (-mTININative) requires a multi command
11178         assembly
11179         added function genAssemblerEnd will be called to generate assembler Epilogue
11180
11181         * /src/SDCCsymt.c:
11182         added _JavaNative to debug info printing
11183
11184         * /src/SDCCmain.c: added option --tini-libid
11185         added port->do_assemble function (-mTININative) has a multi command assemble
11186
11187         * /src/SDCCglue.c: Disabled "constExpr" check
11188         added port->genAssemblerEnd function
11189
11190         * /src/SDCCglobl.h: Added option --tini-libid value
11191
11192         * /src/SDCCast.h:
11193         tookout optimizeCompare from the header (has no external references)
11194
11195         * /src/SDCCast.c: made one more function "static"
11196
11197 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
11198
11199         * src/z80/mappings.i: Added z80asm support.
11200
11201         * src/z80/main.c: Added z80asm support on --asm=z80asm
11202
11203         * src/z80/gen.c: Fixed asm portability issues.
11204
11205         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
11206
11207         * src/SDCCglue.c (printExterns): Added global/extern split.
11208
11209 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
11210
11211         * support/regression/Makefile: added test for mcs51 model large
11212
11213         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
11214
11215         * support/regression/ports/gbz80/spec.mk: added -mgbz80
11216
11217 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
11218
11219         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
11220
11221 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
11222
11223         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
11224
11225         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
11226
11227 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
11228
11229         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
11230
11231         * support/regression/tests/simplefloat.c: Port to mcs51.
11232
11233 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
11234         * support/regression/tests/bug-485362.c: Added.
11235
11236         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
11237
11238         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
11239
11240         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
11241
11242         * src/z80/gen.c (aopDump): Added a dump function.
11243
11244 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
11245         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
11246
11247         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
11248
11249         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
11250
11251         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
11252
11253         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
11254
11255         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
11256
11257         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
11258
11259         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
11260
11261         * support/regression/ports/ds390/support.c: Use tinibios.
11262
11263         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11264
11265 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11266
11267         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11268         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11269
11270         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11271
11272         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11273
11274 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11275
11276         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11277
11278         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11279         (packRegsForIYUse): Created and optimised.
11280
11281 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11282
11283         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11284 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11285
11286         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11287
11288         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11289
11290         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11291
11292 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11293
11294         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11295
11296         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11297
11298 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11299
11300         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
11301
11302         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
11303
11304         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
11305
11306 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11307
11308         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
11309         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
11310         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
11311
11312         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
11313
11314         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
11315         (genNotFloat): Added.
11316         (genUminusFloat): Added.
11317
11318         * device/lib/z80/Makefile: Added floating pt stubs.
11319
11320         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
11321
11322         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
11323
11324         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
11325
11326 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11327
11328         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
11329
11330         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
11331
11332         * sdcc/support/regression/Makefile: Add port ds390.
11333
11334         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
11335
11336         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
11337
11338         * sdcc/support/regression/ports/ds390/spec.mk: Added.
11339
11340         * sdcc/support/regression/ports/ds390/support.c: Added.
11341
11342         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
11343
11344         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
11345
11346         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
11347
11348 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11349
11350         * device/include/malloc.h: Added z80 and gbz80 support.
11351
11352         * device/lib/gbz80/heap.s: Added.
11353
11354         * device/lib/z80/heap.s: Added.
11355
11356         * device/lib/malloc.c: Added z80 and gbz80 support.
11357
11358         * support/regression/tests/malloc.c (testMalloc): Added.
11359
11360         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
11361
11362         * support/regression/tests/bug-478094.c: Added.
11363
11364         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
11365
11366 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
11367
11368         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
11369
11370         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
11371
11372         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
11373
11374         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
11375
11376         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
11377
11378 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11379
11380         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
11381
11382 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
11383
11384         * support/regression/tests/bug-477927.c: Added.
11385
11386         * src/z80/peeph.def: Added minor rules.
11387
11388         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
11389
11390         * src/z80/peeph.def: Added jump optimisation modification.
11391
11392 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
11393
11394         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
11395
11396 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
11397
11398         * support/regression/tests/funptrs.c: Added.
11399
11400 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
11401
11402         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
11403
11404 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
11405
11406         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
11407
11408         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
11409
11410         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
11411         (movLeft2ResultLong): Created.
11412
11413         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
11414         (joinPushes): Added.  Joins two char pushes into a word push.
11415
11416 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
11417
11418         * support/cpp2/Makefile.in (install): Added creation of dest dir.
11419
11420         * support/makebin/Makefile (install): Added creation of dest dir.
11421
11422 2001-10-24 Karl Bongers <karl AT turbobit.com>
11423
11424         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
11425
11426 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
11427
11428         * src/z80/ralloc.c: Turned off faulty pack for one use.
11429
11430         * src/z80/peeph-gbz80.def: Removed redundent restart options.
11431
11432         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
11433
11434 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
11435
11436         * support/regression/Makefile: Improved clean
11437
11438         * support/regression/ports/gbz80/spec.mk: Added clean
11439
11440         * support/regression/ports/host/spec.mk: Added clean
11441
11442         * support/regression/ports/z80/spec.mk: Added clean
11443
11444         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
11445
11446         * support/regression/ports/mcs51/timeout.c: little improvements
11447
11448 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
11449
11450         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
11451
11452         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
11453
11454         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
11455
11456 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
11457
11458         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
11459
11460         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
11461
11462 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
11463         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
11464
11465         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
11466
11467         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
11468
11469         * src/mcs51/main.c (_linkCmd): Added bin path to command.
11470
11471         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
11472
11473         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
11474
11475         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
11476
11477         * support/regression/tests/longor.c: Added.
11478
11479 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
11480
11481         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
11482
11483         * as/mcs51/aslink.h: define PATH_MAX
11484
11485         * as/mcs51/asm.h: define PATH_MAX
11486
11487         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
11488
11489         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
11490
11491         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
11492
11493         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
11494
11495         * src/SDCCglobl.h: define PATH_MAX
11496
11497         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
11498
11499         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
11500
11501 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
11502
11503         * src/z80/gen.c (gencjneshort): Fixed
11504
11505         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
11506
11507 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
11508
11509         * support/regression/tests/bug-469671.c: Added.
11510
11511         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
11512
11513 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
11514
11515         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
11516
11517         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
11518
11519 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
11520
11521         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
11522
11523         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
11524
11525         * src/device/lib/_mullong.c : removed hint: nooverlay bug
11526
11527         * src/device/lib/_divuint.c : removed hint: nooverlay bug
11528
11529         * src/device/lib/_divulong.c: removed hint: nooverlay bug
11530
11531         * src/device/lib/_moduint.c : removed hint: nooverlay bug
11532
11533         * src/device/lib/_modulong.c: removed hint: nooverlay bug
11534
11535 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
11536
11537         * 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.
11538
11539         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
11540
11541         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
11542
11543 2001-10-07    <johan AT FRIJA>
11544
11545         * device/lib/gets.c (gets): fixed the return value.
11546
11547 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
11548         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
11549
11550         * 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.
11551
11552         * 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.
11553
11554         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
11555
11556         * src/pic/gen.c: Removed Safe_strdup.
11557
11558         * configure.in: Added option to enable libgc support.
11559
11560         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
11561         (bitVectUnion): Optimised.
11562         (bitVectIntersect): Optimised.
11563         (bitVectBitsInCommon): Optimised.
11564         (bitVectCplAnd): Optimised.
11565
11566         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
11567
11568 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11569
11570         * src/SDCCmain.c: distinguish between assembler debug and plain options
11571
11572         * src/avr/main.c:   remove standard assembler options
11573
11574         * src/ds390/main.c: remove standard assembler options
11575
11576         * src/mcs51/main.c: remove standard assembler options
11577
11578         * src/port.h: removed "PENDING" comment
11579
11580 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11581
11582         * src/device/lib/_mulint.c  : new, with assember functions
11583
11584         * src/device/lib/_mullong.c : new, with assember functions
11585
11586         * src/device/lib/_divuint.c : with assember functions
11587
11588         * src/device/lib/_divsint.c : with assember functions
11589
11590         * src/device/lib/_divulong.c: with assember functions
11591
11592         * src/device/lib/_divslong.c: with assember functions
11593
11594         * src/device/lib/_moduint.c : with assember functions
11595
11596         * src/device/lib/_modsint.c : with assember functions
11597
11598         * src/device/lib/_modulong.c: with assember functions
11599
11600         * src/device/lib/_modslong.c: with assember functions
11601
11602         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
11603
11604         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
11605
11606         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
11607                                       replaced _mululong.c and _mulslong.c by _mullong.c
11608
11609 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11610
11611         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
11612
11613 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11614
11615         * src/SDCCglue.c: test, if win32api is available for MINGW
11616
11617 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11618
11619         * src/SDCCsymt.c: no more _modifier in printTypeChain()
11620         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
11621         * support/regression/ports/gbz80/spec.mk: removed GENERIC
11622         * support/regression/ports/host/spec.mk: removed GENERIC
11623         * support/regression/ports/mcs51/spec.mk: removed GENERIC
11624         * support/regression/ports/z80/spec.mk: removed GENERIC
11625
11626 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
11627
11628         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
11629
11630         * support/regression/tests/bug-467035.c: Created.
11631
11632 2001-10-01    <johan AT FRIJA>
11633
11634         * src/SDCC.y: fixed bug #466586 part 1
11635
11636 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
11637
11638         * SDCCicode.c: z80 has no generic pointers
11639         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
11640
11641 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
11642
11643         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
11644
11645 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
11646
11647         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
11648
11649         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
11650
11651 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
11652
11653         * configure.in: Fixed up so that ucsim is only configured once.
11654
11655         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
11656
11657         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
11658         (getPathDifference): As above.
11659
11660         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
11661
11662         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
11663
11664 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
11665         * .version: Updated to 2.3.1
11666
11667         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
11668         Added copyright header.
11669
11670         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
11671         (assemble): Added support for macro based assembler commands.
11672         (linkEdit): Added support for macro based linker commands.
11673         (preProcess): Changed the pre-processor to use macros.
11674         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
11675         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
11676
11677         * device/lib/z80/crt0.s: Added module name for debugging.
11678
11679 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
11680
11681         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11682
11683         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
11684
11685         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
11686
11687         * src/Makefile.in: Added SDCCmacro and SDCCutil
11688
11689 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
11690
11691         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11692
11693 2001-09-16    <johan AT FRIJA>
11694
11695         * 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.
11696
11697 2001-09-15    <johan AT FRIJA>
11698
11699         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
11700         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
11701
11702 2001-09-11    <johan AT FRIJA>
11703
11704         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
11705
11706 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
11707
11708         * support/regression/tests/bug-460444.c: Added test case.
11709
11710         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
11711         (genCast): Added justification for all of the asserts.
11712
11713 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
11714
11715         * support/regression/support.c: _xdata replaced by xdata
11716
11717         * support/regression/spec.mk: removed _generic
11718
11719 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
11720
11721         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
11722
11723         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
11724         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
11725
11726         * src/z80/peeph.def: Added a rule to optimise shift then compare.
11727
11728         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
11729
11730         * support/regression/tests/bug-460010.c: Added test case.
11731
11732         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
11733
11734 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
11735
11736         * support/regression/Makefile: inter-port-clean adjusted for mcs51
11737
11738         * support/regression/testfwk.c: removed workaround for bug #436344
11739
11740         * support/regression/tests/bp.c: use less memory with mcs51
11741
11742         * support/regression/tests/bug-441448.c: use less memory
11743
11744         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
11745
11746         * support/regression/collate-results.py: typo
11747
11748 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
11749
11750         * support/regression/tests/fetchoverlap.c: Added new test case.
11751
11752         * support/regression/tests/bp.c: Added new test case.
11753
11754         * support/regression/tests/bug-448984.c: Added new test case.
11755
11756         * support/regression/tests/pow2shifts.c: Added new test case.
11757
11758         * src/z80/gen.c: Turned off the noise it normally generates for the release.
11759         (genlshTwo): Fixed right shift for count > 8.
11760
11761         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
11762
11763 2001-09-08    <johan AT FRIJA>
11764
11765         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
11766
11767 2001-09-07    <johan AT FRIJA>
11768
11769         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
11770
11771         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
11772
11773 2001-09-06    <johan AT FRIJA>
11774
11775         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
11776         * bernhard noted me at this: "() equals to (void)" (1.38)
11777
11778 2001-09-05    <johan AT FRIJA>
11779
11780         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
11781
11782 2001-09-04    <johan AT FRIJA>
11783
11784         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
11785
11786
11787 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
11788
11789         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
11790
11791 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
11792
11793         * link/z80/aslink.h: Fixed path for PATH_MAX
11794
11795 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11796
11797         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11798
11799         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11800
11801         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11802
11803         * 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.
11804
11805 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11806
11807         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11808         (genCmp): Fixed up genCmp for the GB with longs.
11809
11810         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11811
11812         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11813
11814         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11815
11816         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11817
11818 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11819
11820         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11821
11822 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11823
11824         * 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.
11825
11826         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11827
11828 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11829
11830         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11831
11832         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11833
11834 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11835
11836   * sim/ucsim/configure:    little improvement of Cygwin-detection
11837   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11838   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11839   * support/regression/tests/bug-221100.c: small changes for mcs51
11840   * support/regression/tests/bug-221168.c: small changes for mcs51
11841   * support/regression/tests/bug-227710.c: small changes for mcs51
11842   * support/regression/tests/staticinit.c: small changes for mcs51
11843   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11844   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11845   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11846
11847 $Revision$