* support/regression/ports/pic16/support.c: use gpsim usart module from
[fw/sdcc] / ChangeLog
1 2006-06-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
2
3         * device/include/mcs51/at89c51ed2.h: Fixed bug 1510144 changed
4         IP0H to IPH0.
5
6 2006-06-19 Raphael Neider <rneider AT web.de>
7
8         * src/pic/glue.h,src/pic16/glue.h: added prototypes
9         * src/pic/glue.c,src/pic16/glue.c (pic1x_stringInSet,
10           pic1x_emitSymbolIfNew): NEW, check for a string in a set,
11           (pic14printExterns,pic14printPublics,pic16printPublics,
12           pic16_printExterns): use new functions to emit symbols
13           (picglue,pic16glue): emit publics before emitting externs
14         * src/pic/gen.c,src/pic16/gen.c (genFunction): remember the names of
15           locally defined functions to avoid bug #1443651
16         * support/regression/tests/bug-716242.c: removed pic16 workaround
17         * support/regression/ports/pic16/spec.mk: ignore errors during build
18
19 2006-06-19 Raphael Neider <rneider AT web.de>
20
21         * src/pic/glue.h: added pic14aopLiteral prototype
22         * src/pic/glue.c (pic14aopLiteral): return unsigned int
23         * src/pic/gen.c: removed stdint.h dependency
24           (aopGet): use Safe_strdup()
25           (bitpatternFromVal): removed, replaced use with pic14aopLiteral
26           (genDataPointerSet): use pic14aopLiteral()
27         * src/pic16/glue.h, src/pic16/glue.c, src/pic16/gen.c: similar changes
28           for pic16; thanks to Bernhard and Maarten
29
30 2006-06-18 Borut Razem <borut.razem AT siol.net>
31
32         * support/regression/tests/structflexarray.c: flexible array members
33           not supported by gcc < 3
34         * sim/ucsim/configure, sim/ucsim/configure.in: do not compile serio
35           GUI tool by default
36         * src/pic/gen.c: don't include [p]strdin.h on solaris
37         * support/Util/pstdint.h: addad svn attributes
38         * support/regression/tests/constantRange.c,
39           support/regression/tests/rotate.c: include inttypes.h instead
40           stdint.h on solaris, addad svn attributes
41
42 2006-06-18 Raphael Neider <rneider AT web.de>
43
44         * src/SDCCsymt.c (initCSupport): change return type of divschar to
45           int for PIC16
46         * src/pic16/genarith.c (genAddLit): sign-extend via standard routine
47           (pic16_genMinusBits): simplified sign-extension
48           (pic16_genUMult8XLit_8,pic16_genUMult8X8_8): renamed to
49             pic16_genMult8XLit_n resp. pic16_genMult8X8_n, fixed and
50             adjusted to correctly handle mixed-signed operands, disabled
51             now unused multiplciation routines
52         * src/pic16/gen.c (pic16_pushpCodeOp): fixed to handle literals
53           (assignResultValue): added argument denoting the size of the result
54             as returned by the function (fixes upcasts in assigning from
55             function calls: char foo(); int i = foo();)
56           (genCall,genPcall,genGenPointerGet,genReceive): pass size of
57             function result to assignResultValue
58           (genMult): disabled inlined multiplication code
59           (genDiv): augmented to also handle the modulus operator, fixed to
60             handle mixed-signed operands correctly
61           (genMod): simply call genDiv, disabled unused code
62           (genAssign): fixed missing (sign-)extension on result
63         * src/pic16/main.c (_hasNativeMulFor): accept literals [-128..256) as
64             valid char operands, allow signed operands for native code, added
65             division and modulo operator handling
66         * device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
67         
68         As a consequence, onebyte.c (if split into two files) and muldiv.c
69         pass regression tests.
70
71 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
72
73         * doc/Makefile.in: two runs of makeindex seem needed to get
74         correct page references in the index of sdccman.pdf 
75         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
76
77 2006-06-17 Borut Razem <borut.razem AT siol.net>
78
79         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
80
81 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
82
83         * doc/sdccman.lyx: updated, added (porting source code, debugging),
84         mentioned ec2drv and paulmon
85
86 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
87
88         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
89           consecutive abs areas
90           (find_empty_space, allocate_space): added map to handle codemap or
91            xdatamap,
92           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
93            absolute idata and xdata
94         * as/mcs51/lkmem.c (summary2): updated legend
95
96 2006-06-16 Raphael Neider <rneider AT web.de>
97
98         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
99
100 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
101
102         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
103           1208515
104         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
105
106 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
107
108         * src/port.h (struct PORT): added field gp_tags, to hold the tag
109         value of generic pointers,
110         * src/avr/main.c,
111           src/ds390/main.c,
112           src/hc08/main.c,
113           src/izt/i186.c,
114           src/izt/tlcs900h.c,
115           src/mcs51/main.c,
116           src/pic/main.c,
117           src/pic16/main.c,
118           src/xa51/main.c,
119           src/z80/main.c: PORT structure, added elements for gp_tags field,
120         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
121         fields in the PORT structure of each port,
122         * src/SDCCast.c (decorateType): allow processing of generic pointers
123         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
124         S_FIXED symbols
125
126 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
127
128         * link/z80/lkgb.c,
129         * link/z80/lkgg.c,
130         * src/pic16/gen.c,
131         * src/pic16/main.c,
132         * src/pic16/pcode.c,
133         * src/pic/main.c,
134         * src/pic/pcoderegs.c,
135         * src/SDCCicode.c,
136         * src/SDCCmain.c,
137         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
138           bug 1504689 on minGW
139
140 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
141
142         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
143
144 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
145
146         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
147
148 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
149
150         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
151           for optimization
152
153 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
154
155         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
156         to a char variable. Fixed bug #1504211
157         * device/include/pic16/adc.h,
158         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
159         and fixed bug #1364390
160
161 2006-06-10 Borut Razem <borut.razem AT siol.net>
162
163         * CVSROOT: removed the CVS left-over
164
165 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
166
167         * as/hc08/asmain.c (asexit),
168         * as/hc08/lkmain.c (lkexit),
169         * as/mcs51/asmain.c (asexit),
170         * as/mcs51/lkmain.c (lkexit),
171         * src/SDCCglue.c (DEFSETFUNC),
172         * src/SDCCmain.c (linkEdit, assemble),
173         * support/librarian/sdcclib.c (AddRel),
174           replaced unlink() by standard C remove()
175         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
176         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
177           gatherImplicitVariables): new, added to fix bug 608752,
178           (createFunction): added gatherImplicitVariables()
179         * src/SDCCast.h: added createRMW prototype
180         * src/SDCCsymt.h (struct symbol): added infertype
181         * support/regression/tests/bug608752.c: new, added
182
183 2006-06-10 Raphael Neider <rneider AT web.de>
184
185         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
186           multibyte dummy reads (fixes #1503234)
187
188 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
189
190         * device/include/mcs51/compiler.h: new, added header file to enable
191           creating common sfr definition header files for different compilers
192
193 2006-06-05 Raphael Neider <rneider AT web.de>
194
195         * src/pic16/{pcode.h,genarith.c}:
196           introduced pCodeOp combining any two pCodeOps (previously only
197           two register operands could be combined), removed pcop2 from
198           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
199         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
200         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
201           rewritten to use new PO_TWO_OPS
202         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
203         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
204           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
205           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
206           (pic16_get_op): embraced return arg to allow #define return(x),
207             added new case for combined opcodes
208           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
209           (pic16_pCode2str,pic16_getRegFrompCodeOp,
210            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
211
212 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
213
214         * src/SDCCval.c (checkConstantRange): added
215         * src/SDCCval.h: added checkConstantRange
216         * support/Util/SDCCerr.c,
217         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
218         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
219         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
220         * src/SDCCast.c (decorateType): added checkConstantRange,
221         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
222         can be emitted with the correct always true/false warning,
223         added optimization for double '!';
224         result of decorateType() must be assigned back to the tree, because
225         decorateType() can change the tree
226         * src/SDCCicode.c (geniCodeLogic),
227         (geniCodeAssign): replaced new checkConstantRange, added warnings,
228         (checkConstantRange): removed, it was only a fragment which never
229         emitted a warning
230         * src/SDCCsymt.c (computeType): fixed promotion for
231         "-1 < (unsigned bit) b"
232         * src/pic/ralloc.c (packRegsForAssign),
233         * src/pic16/ralloc.c (packRegsForAssign),
234         * src/hc08/ralloc.c (packRegsForAssign),
235         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
236         from mcs51
237         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
238         * support/regression/tests/constantRange.c: added
239         * support/valdiag/tests/constantRange.c: added
240         * support/valdiag/valdiag.py: added -DPORT_HOST=1
241
242 2006-06-02 Borut Razem <borut.razem AT siol.net>
243
244         * support/regression/ports/pic16/support.c: increase stack size
245           to 255 bytes
246         * support/regression/Makefile.in: sort tests by name so that the
247           resutlts can be compared on different machines / platforms
248
249 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
250
251         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
252         * src/ds390/gen.c (emitLabel): new, added,
253           (genDjnz): fixed stack overflow bug,
254           (throughout): cosmetic changes to sync with mcs51/gen.c,
255           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
256         * src/mcs51/gen.c (genEndFunction): small optimization,
257           (throughout): cosmetic changes to sync with ds390/gen.c
258
259 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
260
261         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
262           (_print_format): fixed printing pointers
263         * src/mcs51/gen.c (emitLabel, movb): new, added,
264           (genAssign): small optimization,
265           (genDjnz): fixed stack overflow bug,
266           (throughout): replaced sprintf with SNPRINTF,
267           replaced mcs51_regWithIdx with REG_WITH_INDEX,
268           replaced emitcode("mov", "b,...") with MOVB(...),
269           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
270           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
271         * src/mcs51/peeph.def: added rules 140 and 264
272         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
273           so they may get optimized into registers
274
275 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
276
277         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
278           immediately when encountered,
279           (printUsage): always use stderr even on windows
280
281 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
282
283         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
284         (processParms): fixed bug #1247551
285         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
286         parseCmdLine, main): print '--version' to stdout,
287         print 'help' to stdout if --help is given,
288         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
289         arguments are given; fixed --help
290
291 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
292
293         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
294         * support/regression/tests/bug-1493710.c: added
295
296 2006-05-27 Borut Razem <borut.razem AT siol.net>
297
298         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
299           static instead auto
300         * support/regression/ports/pic16/support.c: increase stack size
301           from default 64 bytes to 128 bytes
302         * support/regression/tests/staticinit.c,
303           support/regression/tests/float.c: regression tests fully enabled
304           for pic16 port by putting the initialized data arrays into the code
305           section
306         * support/regression/ports/pic16/spec.mk: don't link default libraries.
307           This was changed by mistake in the previous version.
308
309 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
310
311         * src/pic16/gen.c (genFunction, genEndFunction): some
312         beautifications, fixed bug with falsely restoring FSR2 in large
313         stack model, thanks to Beau E. Cox for reporting the bug
314
315 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
316
317         * debugger/mcs51/break.c,
318         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
319           use %p to print pointers, made address variables unsigned
320         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
321         * debugger/mcs51/symtab.c (parseSymbol): must return something
322         * src/mcs51/gen.c (aopForSym): small optimization,
323            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
324           (freeAsmop): added missing break,
325           (aopPut): removed parameter bvolatile, determine it inside the function,
326           (saveRegisters, unsaveRegisters): small optimization,
327           (genIpush): removed pointless check,
328           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
329           replaced sprintf with SNPRINTF,
330           replaced strcpy with strncpyz,
331           updated aopPut calls,
332           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
333         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
334
335 2006-05-24 Borut Razem <borut.razem AT siol.net>
336
337         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
338           modification of test for the pic16 port, put the array to the code
339           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
340
341 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
342
343         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
344         * support/Util/pstdint.h: added
345
346 2006-05-22 Borut Razem <borut.razem AT siol.net>
347
348         * src/regression/Makefile: removed bool2.c test, added -q linker option
349         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
350           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
351           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
352           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
353           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
354           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
355           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
356           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
357           define SUPPORT_BIT_TYPES 0, removed unused bit variables
358
359 2006-05-22 Raphael Neider <rneider AT web.de>
360
361         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
362           bug #1492360 (problematic due to generic pointers, see code)
363
364 2006-05-22 Borut Razem <borut.razem AT siol.net>
365
366         * support/regression/ports/pic16/specs.mk: removed stack size linker
367           directive
368         * support/regression/tests/array.c,
369           support/regression/tests/bitopcse.c,
370           support/regression/tests/bug-908454.c,
371           support/regression/tests/malloc.c: modified for pic16 regression test
372         * support/regression/tests/bitfields.c:
373           pic16 - excluded bitfileds of size > 8
374         * support/regression/tests/bp.c: pic16 - reduced data size
375         * support/regression/tests/bug-221100.c: pic16 - reduced data size
376         * support/regression/tests/bug-460010.c:
377           pic16 - used the absolute address the fits in memory
378         * support/regression/tests/bug-716242.c:
379           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
380         * support/regression/tests/float.c:
381           pic16 - excluded - data size too big
382         * support/regression/tests/onebyte.c:
383           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
384         * support/regression/tests/shifts.c:
385           pic16 - function names probably have to differ in first X characters
386           (gpasm limitation?)
387         * support/regression/tests/staticinit.c:
388           pic16 - excluded some tests due error: no target memory available for
389           section ".idata"
390
391 2006-05-22 Borut Razem <borut.razem AT siol.net>
392
393         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
394           second try. Thanks Stas Sergeev once more.
395
396 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
397
398         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
399           (genLeftShift, genRightShift): fixed bug 1491627
400         * src/hc08/peeph.def (rules 7, 8.x): added
401         * support/regression/tests/shifts.c (ShiftLeftByParam,
402           ShiftRightByParam, testShiftByParam): added to test variable shifting
403
404 2006-05-20 Raphael Neider <rneider AT web.de>
405
406         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
407         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
408           (allocReg): add only new registers to dynAllocRegs,
409           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
410             #1489055, #1445850, and probably #1483693
411
412 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
413
414         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
415         bug in for-loop that didn't emit the last of CONFIG and ID registers
416
417 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
418
419         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
420           with offset
421         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
422           1489016, 1434401 and 1490124
423         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
424           1489016, 1434401 and 1490124
425
426 2006-05-17 Borut Razem <borut.razem AT siol.net>
427
428         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
429           thanks Stas Sergeev
430
431 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
432
433         * device/include/mcs51/P89c51RD2.h,
434         * device/include/mcs51/P89LPC901.h,
435         * device/include/mcs51/P89LPC922.h,
436         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
437
438 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
439
440         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
441         to fix missing stack pragma in compiled binary object file,
442
443 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
444
445         * support/packihx/configure.in,
446         * support/packihx/configure: removed warning, autoconf >= 2.5x can
447         determine sizeof basic types even while cross compiling
448
449 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
450
451         * src/avr/gen.c (aopop),
452         * src/ds390/gen.c (aopOp),
453         * src/hc08/gen.c (aopOp),
454         * src/mcs51/gen.c (aopop),
455         * src/pic16/gen.c (pic16_aopOp),
456         * src/pic/gen.c (aopOp),
457         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
458         if size of operand is smaller than spill location
459
460 2006-05-12 Borut Razem <borut.razem AT siol.net>
461
462         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
463           have to have CR/LF line endings even if they are checked out on *nix
464           or on WIN32 in cygwin binmode
465
466 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
467
468         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
469         * device/include/ds80c390.h: added sfr16 definitions
470         * src/ds390/gen.c,
471         * src/ds390/gen.h,
472         * src/ds390/main.c,
473         * src/ds390/ralloc.c,
474         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
475           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
476           bit returning functions
477         * support/regression/tests/sfr16.c: enabled test on ds390
478
479 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
480
481         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
482         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
483
484 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
485
486         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
487         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
488           (cl_address_space constructor): removed expensive initialization,
489           (cl_address_space::get_cell): extended for late initialization,
490           (cl_address_space::*): use late initialization,
491           (cl_address_decoder::activate): removed expensive initialization,
492           This reduced regression test running time by 25%
493
494 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
495
496         * packihx/,
497         * configure.in,
498         * configure,
499         * sdcc.dsw,
500         * Makefile.bcc,
501         * Makefile.in,
502         * support/packihx/Makefile.in,
503         * support/packihx/clean.mk,
504         * support/packihx/Makefile.bcc,
505         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
506
507 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
508
509         * src/SDCCval.c (valNot): fix for regression test failure
510           of not.c on big endian hosts
511
512 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
513
514         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
515
516 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
517
518         * device/lib/mcs51/Makefile.in: changed string comparison operator
519           to = for POSIX compliance; == is bash extension
520
521 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
522
523         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
524           kosmonaut_pirx
525
526 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
527
528         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
529         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
530         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
531         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
532         bug report #1478657,
533
534 2006-05-05 Borut Razem <borut.razem AT siol.net>
535
536         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
537           making the html
538
539 2006-05-02 Borut Razem <borut.razem AT siol.net>
540
541         * doc/Makefile.in: removed *.ind dependency since there is no rule to
542           create *.ind, which made make to fail if invoked with -j 2
543
544 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
545
546         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
547           Hubert Sack for patch 1479782
548
549 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
550
551         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
552
553 2006-05-01 Raphael Neider <rneider AT web.de>
554
555         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
556           (create_pic): store only prefix-free device name,
557           (init_pic): check for device names with "16" prefix,
558           (list_valid_pics),
559         * src/pic/device.h (struct PIC_device),
560         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
561             stored device name,
562         * device/include/pic/pic12f{635,675,629,683}.h,
563         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
564         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
565         * device/include/pic/pic16f505.h,
566         * device/lib/pic/libdev/pic16f505.c: removed
567         * device/include/pic/pic14devices.txt: added support for pic12f
568             devices, removed unsupported non 16-bit devices
569             [above changes provided by patch from Zik Saleeba]
570         * src/pic/*, src/pic16/*, device/include/pic16/*,
571           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
572
573 2006-05-01 Borut Razem <borut.razem AT siol.net>
574
575         * configure.in, configure, doc/Makefile.in:
576           sync with nightly build makefile - latex, dvipdf and dvips
577           not needed any more
578
579 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
580
581         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
582         in the library source
583
584 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
585
586         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
587
588 2006-04-28 Raphael Neider <rneider AT web.de>
589
590         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
591         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
592           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
593         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
594
595 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
596
597         * device/lib/pic/libdev/Makefile.in,
598         * device/lib/hc08/Makefile.in,
599         * device/lib/gbz80/Makefile.in,
600         * device/lib/z80/Makefile.in,
601         * device/lib/ds390/Makefile.in,
602         * device/lib/ds400/Makefile.in: added srcdir to include search path,
603         thanks to Borut for the bug report
604         * configure.in,
605         * configure: always create doc/Makefile independent from --enable-doc
606         * Makefile.in: always install from directory doc independent from
607         --enable-doc
608         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
609         removed
610         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
611         * doc/Makefile.in: install *.txt if present
612         * device/include/Makefile.in (install): added installation of pic/*.inc
613         and pic/*.txt files again, they were erroneously removed
614
615 2006-04-28 Raphael Neider <rneider AT web.de>
616
617         * src/pic/{gen.c,main.h,pcode.c},
618         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
619             concerning signedness with casts
620
621 2006-04-28 Raphael Neider <rneider AT web.de>
622
623         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
624             definition of an interrupt handler,
625         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
626             interrupt handler stuff from picglue() to separate routine,
627           (picglue): enabled definition of intr handlers in files w/o main()
628
629 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
630
631         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
632           compilation with MSVC 2005 Express Edition (VC8)
633
634 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
635
636         * device/lib/Makefile: fixed build of gbz80 lib
637
638 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
639
640         * support/regression/tests/bug-460010.c,
641         * support/regression/tests/bug-524691.c,
642         * support/regression/tests/bug-716242.c: removed conditional defines
643           that are already in testfwk.h
644
645 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
646
647         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
648           (AccAXRsh1): added, shift right by 1,
649           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
650            AccAXLrl1
651         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
652
653 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
654
655         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
656         remove cast to same type
657         * src/SDCCast.c (decorateType): fix for RFE 1475742,
658         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
659         * as/z80/Makefile,
660         * link/z80/Makefile: removed, they have moved to
661         Makefile.in files
662         * configure,
663         * configure.in: replaced duplicate message about ucsim by missing sdcpp
664         * install-sh: fix bug #1204398 by setting umask 0022
665         * device/lib/Makefile: separate build of z80 and gbz80 lib
666
667 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
668
669         Enabled VPATH feature: changed nearly all Makefiles (149 files).
670         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
671
672         One basic decision: e.g. src/clean.mk includes further files. In order
673         to make this work there are two solutions:
674         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
675           run configure on them. This way they can use
676           'include $(srcdir)/port-clean.mk'
677         - always include clean.mk by the Makefile at the same level. To avoid
678           that `make clean` tries to include and build Makefile.dep the
679           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
680           implemented, because now even `make uninstall` doesn't create
681           Makefile.in. clean.mk could be eliminated by pasting it in
682           Makefile.in.
683
684         * debugger/mcs51/Makefile.in: build own objects from library sources
685         (SLIB, SDCC) in current directory
686
687         * configure, configure.in: renamed --disable-device-lib-build in
688         --disable-device-lib; added --enable-doc, the required tools are
689         searched by configure; added result message; the toolchain for the
690         belonging ports are now only built, if the port is enabled.
691
692         * support/regression/*: all output is written in directory gen, because
693         the fwk and ports directories don't livet in the build tree using vpath
694
695         * doc/sdccman.lyx: renamed --disable-device-lib-build to
696         --disable-device-lib, added --enable-doc, added section VPATH
697
698         * sim/ucsim/configure.in,
699         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
700         z80 are enabled by default
701
702 2006-04-24 Raphael Neider <rneider AT web.de>
703
704         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
705             to config word, "pic14_"-prefixed some extern functions
706           (pic14_emitConfigWord): emit __config directive(s) if assignment to
707             config word has been found
708         * src/pic/device.h: added prototypes
709         * src/pic/pcode.c: added "pic14_"-prefix where needed
710         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
711             fixup
712         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
713             words,
714           (pic14emitRegularMap): ignore config words,
715           (pic14createInterruptVect): moved generating __config directives away
716           (picglue): have __config directives emitted
717
718 2006-04-24 Borut Razem <borut.razem AT siol.net>
719
720         * doc/Makefile: sync with nightly build makefile
721
722 2006-04-24 Raphael Neider <rneider AT web.de>
723
724         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
725             registers that have not been assigned proper liveranges,
726             fixes #1469504 and #1474602,
727           (pCodeRegOptimizeRegUsage): fixed typo in comment
728
729 2006-04-24 Borut Razem <borut.razem AT siol.net>
730
731         * device/examples/main8051.c: deleted - it was removed from CVS
732           24.mar.2000 and after that modified 18.feb.2001, so it reappered
733           after the transition to Subversion
734         * src/SDCCalloc.h: deleted - it was removed  from CVS
735           3.feb.2001 and after that modified 18.feb.2001, so it reappered
736           after the transition to Subversion
737         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
738           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
739           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
740           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
741
742 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
743
744         * as/asx8051.dsp: added mcs51/strcmpi.h
745         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
746         * as/hc08/aslink.h: updated lnksect prototype
747         * as/hc08/asm.h,
748         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
749         * as/hc08/asmain.c,
750         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
751           (newdot): handle A_ABS
752         * as/hc08/asout.c,
753         * as/mcs51/asout.c (outarea): output address
754         * as/hc08/lkaomf51.c,
755         * as/mcs51/lkaomf51.c: disabled unused array UsageType
756         * as/hc08/m08pst.c,
757         * as/mcs51/i51pst.c,
758         * as/z80/z80pst.c: "ABS" is not A_OVR
759         * as/hc08/lkarea.c (newarea): read a_addr,
760           (lnkarea): added codemap array, sort absolute areas to the front,
761            combine all GSINITx/GSFINAL,
762           (find_empty_space, allocate_space): new functions,
763           (lnksect): return next address, handle absolute sections
764         * as/mcs51/lkarea.c (newarea): read a_addr,
765           lnksect2 prototype changed,
766           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
767           (find_empty_space, allocate_space): new, factored out of lnksect2,
768           (lnksect2): return next address, handle absolute sections
769         * as/hc08/lkhead.c,
770         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
771         * as/hc08/lklibr.c (addfile, fndsym),
772         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
773           index out of range and detect both '\' and '/'
774         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
775         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
776           regression tests (ds390 cannot return bool yet)
777         * doc/sdccman.lyx: changed version number, document changed --no-peep,
778           document critical interrupts on z80, document changed SDCC define
779         * src/asm.c (_asxxxx_mapping): fixed .org directive,
780           (_a390_mapping): added .org directive
781         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
782           (genMultOneByte): fixed warnings
783         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
784           ones
785         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
786         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
787           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
788         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
789         * src/pic16/main.c: removed newReg prototype
790         * src/pic16/pcode.c,
791         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
792           warnings
793         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
794           ones
795         * src/pic16/ralloc.c
796         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
797           to fix warnings
798         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
799           from short to PIC_OPTYPE
800         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
801         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
802           optype from short to PIC_OPTYPE
803         * src/port.h: made int_size unsigned to fix warnings
804         * src/SDCC.y: fixed warning on MSVC
805         * src/SDCCicode.c (getArraySizePtr): return unsigned int
806         * src/SDCCopt.c (convertToFcall): fixed warnings
807         * src/SDCCsymt.h: removed double prototype for genSymName
808         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
809           offset int to fix warnings
810
811 2006-04-22 Borut Razem <borut.razem AT siol.net>
812
813         * doc/sdccman.lyx, */Makefile, */Makefile.in:
814           references to CVS replaced with Subversion
815
816 2006-04-21 Borut Razem <borut.razem AT siol.net>
817
818         * doc/sdccman.lyx, */Makefile, */Makefile.in:
819           references to CVS replaced with Subversion
820
821 2006-04-19 Borut Razem <borut.razem AT siol.net>
822
823         * src/version.awk: adapted for svn
824         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
825           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
826           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
827           /binutils-avr/etc/*.vi, *.jin: removed all properties
828           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
829
830 2006-04-19 Borut Razem <borut.razem AT siol.net>
831
832         * CVS to Subversion migration completed
833
834 2006-04-18 Borut Razem <borut.razem AT siol.net>
835
836         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
837           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
838
839 2006-04-17 Borut Razem <borut.razem AT siol.net>
840
841         * device/include/Makefile.in: added pic/*.inc to the installation
842
843 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
844
845         * support/regression/collate-results.py: fixed output in case of
846         a valdiag error
847         * support/regression/generate-cases.py: fixed splitting of pathnames
848         with dots
849         * as/hc08/lklibr.c (addfile),
850         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
851
852 2006-04-11 Raphael Neider <rneider AT web.de>
853
854         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
855         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
856         * src/pic16/pcode.c (assignValnums): fixed #1460578
857
858 2006-04-11 Raphael Neider <rneider AT web.de>
859
860         * device/lib/pic/libdev/*.c,
861         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
862           fixes #1468739, enables compilation in --std-c99 mode
863         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
864
865 2006-04-11 Raphael Neider <rneider AT web.de>
866
867         * src/pic/device.c (find_device): removed debug output
868           (list_valid_pics): enabled verbose listing of supported devices
869         * device/include/stdbool.h: define bool as char for pic14/16 as well
870
871 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
872
873         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
874
875 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
876
877         * .version: bumped version to 2.5.6
878         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
879
880 2006-04-06 Raphael Neider <rneider AT web.de>
881
882         * .version: bumped version to 2.5.6 (pic14 ABI changed)
883         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
884         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
885           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
886             pic14_constructAbsMap
887           (pic14printPublics): declare absolute global symbols as global
888           (pic14createInterruptVect),
889         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
890           (newReg): assume new registers unused, use correct name in
891             hashtable (reg->name instead of name), more debugLog output
892         * src/pic/device.h (PIC_device): added fields for verbose output
893         * src/pic/device.c: moved device definition to pic14devices.txt,
894             added routines for runtime parsing of pic14devices.txt,
895             added support for second config word
896         * src/pic/main.c (_process_pragma): removed #pragma maxram,
897           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
898           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
899           (_pic14_parseOptions): moved pCodeInitRegisters here
900           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
901         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
902           (pCodeInitRegisters): rewrapped comments, perpared new approach to
903             handling the pseudo stack
904         * device/lib/Makefile.in: ignore failures in objects-pic16,
905         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
906         * device/lib/pic/NEWS: document new dependency on picXXX.lib
907         * device/lib/pic/Makefile.subdir,
908         * device/lib/pic16/Makefile.subdir: improved clean rules
909         * device/lib/pic/libdev/: NEW, pic14 device libraries
910         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
911         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
912         * device/include/Makefile.in: create subdir and install pic14 headers
913         * device/include/pic/p16f_common.inc: removed unused declarations
914         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
915             PICs from inc2h.pl v1.6,
916             replaced BIT_AT macros with struct declarations
917         * device/include/pic/pic14devices.txt: definition of supported devices,
918             all above improvements contributed by Zik Saleeba, thanks
919         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
920         * support/scripts/sdcc.nsi: also install pic14 device libraries and
921             headers
922
923 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
924
925         * device/include/mcs51/c8051f410.h: added interrupt numbers,
926         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
927           thanks to Charles Olds
928
929 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
930
931         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
932
933 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
934
935         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
936         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
937         * support/regression/bug1464657.c: added, new test
938
939 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
940
941         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
942           version number
943
944 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
945
946         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
947           --no-peep and --peep-file <file> are used don't use default rules but
948           do use the <file>
949
950 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
951
952         * src/mcs51/gen.c (genCall): fixed bug 1457608
953
954 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
955
956         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
957         changes seem to cause (trigger?) problems with the build system.
958
959 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
960
961         * src/SDCCpeeph.c (operandsLiteral): new, added,
962           (callFuncByName): inserted operandsLiteral
963         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
964
965 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
966
967         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
968         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
969
970 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
971
972         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
973           implemented patch 1120823 Thanks to Willy De la Court (normal
974           interrupts need an interrupt number now if they are made critical),
975           and enabled nesting of critical functions though not for gbz80
976           (genCritical, genEndCritical): added functions
977           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
978         * src/z80/mappings.i: added "ei" to all mappings
979
980 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
981
982         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
983         submitted by the Debian SDCC maintainer Aurelien Jarno:
984         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
985         archive with gcc 4.1 on mips and wrote the patch"
986
987 2006-03-16 Raphael Neider <rneider AT web.de>
988
989         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
990           the left operand is shorter than the result (c* = lit-c* + int),
991           fixes bug #1450796
992         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
993           OP_SYMBOL
994
995 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
996
997         * src/.version: increased version number to 2.5.5
998         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
999         linking is done manually in pic16 port's _linkEdit,
1000         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
1001         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
1002         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
1003         allocate asmop as AOP_ACC,
1004         (aopForRemat): added parameter 'bool result' in function declaration,
1005         (pic16_aopGet): return AOP_ACC when accessing WREG,
1006         (pic16_popGetTempReg): minor modification,
1007         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
1008         'pic16_allocWithIdx',
1009         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
1010         calling function in absolute addresses,
1011         (genAssign): take into account AOP_ACC asmop,
1012         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
1013         * src/pic16/pcoderegs.c: some debug functions and lines added,
1014         * src/pic16/ralloc.c (decodeRegType): added but commented out,
1015         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
1016         register too,
1017         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
1018         call to allocReg, not by manually allocating a new one,
1019         (pic16_assignRegisters): now before going through the register
1020         allocating functions mark all registers as free. This eliminates some
1021         side effects resulting from peephole parser done earlier in the backbone
1022
1023 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
1024
1025         * src/SDCCicode.c (geniCodeLogic),
1026         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
1027
1028 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
1029
1030         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
1031           (genSend): bugfix, do not allocate and free twice,
1032           (shiftRLong): handle partially overlapping aops
1033         * support/regression/tests/bitopcse.c: fixed warning redefined idata
1034
1035 2006-03-08 Borut Razem <borut.razem AT siol.net>
1036
1037         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
1038           for pic16
1039
1040 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
1041
1042         * support/regression/tests/bug1409955.c: new, added
1043         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
1044         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
1045           (aopForSym, aopOp): increment asmop.allocated if reused,
1046           (freeAsmop): decrement asmop.allocated and check for zero instead of
1047           using asmop.freed,
1048           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
1049           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
1050            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
1051            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
1052            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
1053            genSignedRightShift, genRightShift, genDataPointerGet,
1054            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
1055            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
1056             in reverse order from allocation,
1057           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
1058             added swappedLR to keep track
1059         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
1060           pdata & code for GCC, z80, gbz80 & hc08
1061         * support/regression/tests/zeropad.c: moved defines to testfwk.h
1062
1063 2006-03-08 Raphael Neider <rneider AT web.de>
1064
1065         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
1066
1067 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
1068
1069         * device/include/mcs51/c8051f410.h: new SiLabs mcu
1070         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
1071         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
1072
1073 2006-03-06 Borut Razem <borut.razem AT siol.net>
1074
1075         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
1076           made the linker quiet
1077
1078 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1079
1080         * src/pic16/gen.c (genPcall): fixed bug #1443644
1081         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
1082         which dumps before the function entry point a data byte which represents
1083         the number of the local variables used by the specified function, added
1084         'xinst' for initial support for Extended Instruction Support,
1085         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
1086         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
1087         port->fun_prefix anymore (may change later),
1088         (genFunction, genEndFunction): do not store/restore local registers for
1089         _main (this should take care the --main-return command line option in
1090         the future),
1091         (genOr): removed some legacy pic-port instructions,
1092         * src/pic16/genarith.c (genAddLit): re-enabled old code because
1093         performing operations with SFR's causes data to be written more than
1094         once to each SFR. Perhaps SFRs should be handled in special cases...
1095         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
1096         pcode.h
1097         * src/pic16/main.c (_process_pragma): stack bound checking did not take
1098         into account for stack starting position,
1099         (struct OPTIONS pic16_optionsTable): added command line argument
1100         --extended or -y for Extended Instruction Support,
1101         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
1102         (deassignLRs): *** perhaps the most important change, old 'for' code
1103         (commented out for reference), didn't account for some registers which
1104         were left marked 'not free' after a pointer operation. The change
1105         reduces register usage a lot in some cases
1106
1107 2006-03-04 Borut Razem <borut.razem AT siol.net>
1108
1109         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
1110           _clean
1111         * support/regression/tests/bug-524697.c: decreased array size for
1112           mcs51 to fit into the internal RAM
1113         * support/regression/Makefile.in: a little bit more verbose
1114
1115 2006-03-03 Borut Razem <borut.razem AT siol.net>
1116
1117         * support/regression/fwk/lib/testfwk.c,
1118           support/regression/fwk/include/testfwk.h: introduced function
1119           _prints(), nonrecursive _printn(), call _initEmu() from main()
1120         * support/regression/ports/gbz80/support.asm,
1121           support/regression/ports/ucz80/support.asm,
1122           support/regression/ports/z80/support.asm,
1123           support/regression/ports/ds390/support.c,
1124           support/regression/ports/hc08/support.c,
1125           support/regression/ports/host/support.c,
1126           support/regression/ports/mcs51/support.c,
1127           support/regression/ports/xa51/support.c: added empty _initEmu()
1128           function
1129         * support/regression/ports/pic16/gpsim.cmd,
1130           support/regression/ports/pic16/spec.mk,
1131           support/regression/ports/pic16/support.c,
1132           support/regression/Makefile.in: added pic16 regression test
1133
1134 2006-03-01 Raphael Neider <rneider AT web.de>
1135
1136         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
1137           genConstPointerGet): use safe way of generating MOVFF to cover
1138             literals as well as registers, fixes bug #1440527
1139         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
1140             dereference
1141           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
1142             more correctly, fixes bug #1232186
1143           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
1144         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
1145             gplink guess the correct processor in more cases, applied patch
1146             from Till Riedel attached to and fixing bug #1436552
1147
1148 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1149
1150         * support/regression/tests/array.c: added, contains check for #1434401
1151         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
1152
1153 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
1154
1155         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
1156         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
1157         * device/include/mcs51/c8051f326.h,
1158         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
1159         * device/include/mcs51/c8051f000.h,
1160         * device/include/mcs51/c8051f018.h,
1161         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
1162           PCON_IDLE,PCON_STOP and added sfr16 definitions
1163
1164 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1165
1166         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
1167           genGetWord): fixed bug 1409955
1168
1169 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1170
1171         * device/include/hc08/mc68hc908gp32.h,
1172         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
1173
1174 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
1175
1176         * src/SDCCast.c (constExprValue): return NULL if not a value
1177         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
1178         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
1179         * support/regression/tests/bitfields.c: enabled signed bitfield for all
1180
1181 2006-02-13 Borut Razem <borut.razem AT siol.net>
1182
1183         * src/regression/ptrarg.c: added, fails due to bug #1430967
1184         * src/regression/Makefile: ptrarg.c added, ...
1185
1186 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
1187
1188         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
1189         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
1190
1191 2006-02-11 Borut Razem <borut.razem AT siol.net>
1192
1193         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
1194           print "Processor: xxx" message to stdout only if --verbose
1195
1196 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1197
1198         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
1199         * support/regression/tests/bug1426356.c: added
1200         * support/regression/tests/bitfields.c: removed 2 tests
1201
1202 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1203
1204         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
1205         * device/include/mcs51/c8051f330.h,
1206         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
1207           PCON_IDLE,PCON_STOP and added sfr16 definitions
1208         * device/lib/_divsint.c,
1209         * device/lib/_divuint.c,
1210         * device/lib/_divulong.c,
1211         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1212           register bank bug for small stackauto
1213
1214 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1215
1216         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1217
1218 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1219
1220         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1221         * all.dsp: corrected several bin paths
1222         * device/include/mcs51/c8051f120.h,
1223         * device/include/mcs51/c8051f300.h,
1224         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1225           to PCON_IDLE,PCON_STOP
1226         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1227         * device/lib/printf_large.c (output_float): fixed bug 1388703
1228         * support/regression/tests/bug1057979.c: added test for bug 1388703
1229
1230 2006-02-08 Raphael Neider <rneider AT web.de>
1231
1232         * src/pic/pcode.c (pciTRIS): fixed typo,
1233           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1234           (LinkFlow): fixed handling of flows that end in a call,
1235           (ReuseReg): perform safety check earlier
1236         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1237             to work with flows at the beginning of a pBlock,
1238             fixes #1426557 (Symbol not previously defined),
1239           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1240             usage information
1241           (RemoveUnusedRegisters): update register usage info
1242         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1243             created, reuse existing ones instead
1244         * src/pic/gen.c (genPcall): fixed #1424719
1245
1246 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1247
1248         * link/z80/lkmain.c,
1249         * link/z80/lklex.c,
1250         * link/z80/lkdata.c,
1251         * link/z80/aslink.h: fixed build on current cygwin:
1252         replaced getline() by lk_getline()
1253
1254 2006-02-01 Borut Razem <borut.razem AT siol.net>
1255
1256         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
1257           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
1258           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
1259           src/regression/bool1.c, src/regression/bool2.c,
1260           src/regression/bool3.c, src/regression/call1.c,
1261           src/regression/compare.c, src/regression/compare10.c,
1262           src/regression/compare2.c, src/regression/compare3.c,
1263           src/regression/compare4.c, src/regression/compare5.c,
1264           src/regression/compare6.c, src/regression/compare7.c,
1265           src/regression/compare8.c, src/regression/compare9.c,
1266           src/regression/configword.c, src/regression/for.c,
1267           src/regression/inline.c, src/regression/mult1.c,
1268           src/regression/nestfor.c, src/regression/or1.c,
1269           src/regression/pointer1.c, src/regression/ptrfunc.c,
1270           src/regression/rotate1.c, src/regression/rotate2.c,
1271           src/regression/rotate3.c, src/regression/rotate4.c,
1272           src/regression/rotate5.c, src/regression/rotate6.c,
1273           src/regression/rotate7.c, src/regression/string1.c,
1274           src/regression/struct1.c, src/regression/sub.c,
1275           src/regression/sub2.c, src/regression/switch1.c,
1276           src/regression/while.c, src/regression/xor.c,
1277           src/regression/create_stc, src/regression/simulate,
1278           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
1279           regression tests
1280         * src/regression/gpsim_assert.h: added
1281
1282 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
1283
1284         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
1285         ((void (code *) (void)) 0) ();
1286         * as/hc08/aslex.c,
1287         * as/hc08/aslink.h,
1288         * as/hc08/asm.h,
1289         * as/hc08/asmain.c,
1290         * as/hc08/lkdata.c,
1291         * as/hc08/lklex.c,
1292         * as/hc08/lkmain.c,
1293         * as/mcs51/aslex.c,
1294         * as/mcs51/aslink.h,
1295         * as/mcs51/asm.h,
1296         * as/mcs51/asmain.c,
1297         * as/mcs51/lkdata.c,
1298         * as/mcs51/lklex.c,
1299         * as/mcs51/lkmain.c,
1300         * as/z80/aslex.c,
1301         * as/z80/asm.h,
1302         * as/z80/asmain.c: fixed build on current cygwin:
1303         replaced getline() by as_getline()
1304
1305 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
1306
1307         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
1308         declarator in the symbol chain
1309         * src/SDCCsymt.h,
1310         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
1311         parameter list for function pointers
1312         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
1313         * support/regression/tests/bug-716242.c: added
1314
1315 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
1316
1317         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
1318         offset if possible
1319         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
1320
1321 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
1322
1323         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
1324         inifinitely recurseable, added static
1325         * support/regression/tests/bug-1408066.c: added
1326
1327 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
1328
1329         * src/SDCCicode.h,
1330         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
1331         renamed, added possibility to create "postLoopLbl"-labels
1332         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
1333         newiTempLoopHeaderLabel
1334         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
1335         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
1336         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
1337         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
1338         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
1339         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
1340         (basicInduction): fixed bug #136564, made static,
1341         (loopInduction): changed parameter of basicInduction, made static,
1342         (addPostLoopBlock): added
1343         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
1344         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
1345         findLoopEndSeq
1346         * support/regression/tests/bug-136564.c: added
1347         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
1348         --std-sdcc99 to LIBSDCCFLAGS
1349
1350 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
1351
1352         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
1353         while loop
1354         * support/regression/tests/bug-1406131.c: added
1355
1356 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
1357
1358         * src/SDCCast.c (decorateType): fix promotion of unary minus
1359         * src/SDCCsymt.c (computeType): beautified
1360         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
1361         (valUnaryPM, valComplement): fix sign and promotion,
1362         (valNot): ANSI: result type is int (SDCC: unsigned char)
1363         * support/regression/tests/uminus.c: speedup by removing superflous
1364         test case 'int'
1365         * support/regression/tests/onebyte.c: added promotion and signedness
1366         tests for unary minus
1367         * support/regressions/tests/bug-477927.c: disable warning about
1368         uninitialized variables
1369         * support/regression/tests/not.c: added
1370
1371 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
1372
1373         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
1374         * src/mcs51/gen.c (gen51Code): show final register usage after
1375         fillGaps in asm with --i-code-in-asm
1376         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
1377         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
1378         incUsed, rliveClear, adjustIChain): made static,
1379         (setFromRange): excluded because it's unused,
1380         (findPrevUseSym, markWholeLoop): added,
1381         (findPrevUse): rewritten; fixes bug 895992; now a complete search
1382         through all branches of predecessors enables sdcc to emit the warning
1383         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
1384         (rlivePoint): made static, added parameter emitWarnings which is only
1385         true during the first run out of two,
1386         (findRecursiveSucc, findRecursivePred): removed,
1387         (computeLiveRanges): made static, added parameter emitWarnings,
1388         (dumpIcRlive): added for debugging only
1389         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
1390         removed prototype of setFromRange()
1391         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
1392         in call of computeLiveRanges()
1393         * support/regression/tests/bug-895992.c: added
1394         * support/regression/tests/bug-971834.c: added
1395         * support/valdiag/tests/bug-895992.c: added
1396         * support/valdiag/tests/bug-971834.c: added
1397
1398 2005-12-18 Raphael Neider <rneider AT web.de>
1399
1400         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
1401           (genUnpackBits): improved code for direct operands,
1402           (genPackBits): improved code for literal assignment to bitfields
1403             and for direct destination operands (no FSR indirection),
1404             prevented redundant AND, fixes #1362800,
1405           (AccLsh): added parameter to disable masking of the result
1406         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
1407           skip instructions with side-effects (like incfsz),
1408           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
1409         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
1410         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
1411           fixes #1375263
1412
1413 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
1414
1415         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
1416         volatile variables as spill location
1417
1418 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
1419
1420         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
1421         replacing literals
1422         * support/regression/tests/bug-1376320.c: added
1423
1424 2005-12-08 Raphael Neider <rneider AT web.de>
1425
1426         * src/pic/device.c: renamed is_shared to pic14_is_shared
1427         * src/pic/gen.c (genIfx): re-enabled handling of sbits
1428         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
1429           (is_valid_identifier): added for above workaround
1430
1431 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
1432
1433         * device/lib/Makefile.in: fixed to enable port-specific-objects
1434         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
1435           char, thanks Hubert Sack
1436         * doc/sdccman.lyx: documented --xstack-loc,
1437           elaborated a bit more on interrupts and pitfalls,
1438           removed "setjmp/longjmp unsupported",
1439           documented some unsupported C99 features
1440         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
1441         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
1442           if, thanks Hubert Sack
1443         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
1444         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
1445           make make_library
1446         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
1447           regression tests can report resource usage (rfe 700441)
1448         * support/regression/collate-results.py: report resource usage
1449         * support/regression/ports/ds390/spec.mk,
1450         * support/regression/ports/hc08/spec.mk,
1451         * support/regression/ports/mcs51/spec.mk,
1452         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
1453         * support/regression/ports/ds390/uCsim.cmd,
1454         * support/regression/ports/hc08/uCsim.cmd,
1455         * support/regression/ports/mcs51/uCsim.cmd,
1456         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
1457         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
1458           library, use the default one
1459         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
1460           building the library
1461
1462 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
1463
1464         * config.dsp: added dependency on .version and configure_vc.awk
1465         * device/include/setjmp.h: updated for --stack-auto and --xstack
1466         * device/include/mcs51/at89c51snd1c.h: corrected line endings
1467         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
1468         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
1469         * device/lib/libsdcc.lib: added _setjmp
1470         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
1471           (decorateType): fixed bug 1372851,
1472           (optimizeGetHbit): fixed warning
1473         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
1474           array initialisation
1475         * support/regression/tests/bug1057979.c: added test for bug 1358192
1476         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
1477
1478 2005-12-03 Borut Razem <borut.razem AT siol.net>
1479
1480         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
1481           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
1482
1483 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1484
1485         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
1486         createIval): implement symbol independant "flexible array member",
1487         (createIvalCharPtr): implemented flexible array initialisation with a
1488         string
1489         * src/SDCCsymt.c (copyStruct): removed,
1490         (getSize): fixed misleading comment,
1491         (getAllocSize): removed, the additional allocation size is now in
1492         sym->flexArrayLength,
1493         (checkStructFlexArray): new, syntax checks for flexible array members,
1494         (compStructSize): added syntax checks for "flexible array members"
1495         (copyStruct): removed,
1496         (copyLinkChain): removed inefficient fix for bug 770487
1497         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
1498         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
1499         symbol->flexArrayLength
1500         * src/SDCCerr.c,
1501         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
1502         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
1503         * support/regression/tests/structflexarray.c: added
1504         * support/valdiag/tests/structflexiblearray.c: added
1505
1506 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1507
1508         * src/SDCCast.c (decorateType): fixed bug 1368489
1509         * support/Util/SDCCerr.c,
1510         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
1511
1512 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1513
1514         * device/include/mcs51/at89c51snd1c.h: added file submitted by
1515           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
1516
1517 2005-11-27 Borut Razem <borut.razem AT siol.net>
1518
1519         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
1520           support/cpp2/mkdeps.h: added command line option
1521           -obj-ext=<extension> to SDCPP to define object file externion, used
1522           for generation of make dependencies (-M)
1523         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
1524
1525 2005-11-26 Borut Razem <borut.razem AT siol.net>
1526
1527         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
1528           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
1529           added pic and pic16 libraries
1530
1531 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1532
1533         * device/include/float.h: Corrected typo in prototype of __fsgt
1534
1535 2005-11-25 Borut Razem <borut.razem AT siol.net>
1536
1537         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
1538           added creation of model-mcs51-stack-auto libraries
1539
1540 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
1541
1542         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
1543         and fields-list too
1544         * src/SDCCast.c (createIvalArray): removed obsolete comment
1545
1546 2005-11-24 Borut Razem <borut.razem AT siol.net>
1547
1548         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
1549           added missing device/lib/mcs51/crt*.asm sources
1550
1551 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
1552
1553         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
1554
1555 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
1556
1557         * device/lib/_fs2schar.c,
1558         * device/lib/_fs2sint.c,
1559         * device/lib/_fs2slong.c: optimized inline asm
1560
1561 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1562
1563         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1564           Better handling of floats between -1.0 and 0.0.
1565
1566 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1567
1568         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
1569           (the missing "if"s prohibited removal of redundant labels)
1570
1571 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1572
1573         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1574           Properly convert floats between -1.0 and 0.0 to long, int, and char
1575           types (max integer value of negative floats tends to zero).
1576         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1577           Removed changes made so to work properly with floats between
1578           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
1579           and _fs2char.c
1580
1581 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1582
1583         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
1584         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
1585         (genCast) cosmetic change
1586         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
1587         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
1588         from mcs51
1589         * support/regression/tests/bitfields (testSignedBitfields): added
1590
1591 2005-11-18 Borut Razem <borut.razem AT siol.net>
1592
1593         * sdcc/device/lib/Makefile.in: remove all unnecessary files
1594         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
1595           introduced SILENT option to make building of pic16 libraries less
1596
1597 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1598
1599         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1600           Now they work properly with floats between -1.0 and 0.0
1601         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
1602
1603 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1604
1605         * src/SDCCicode.c (printOperand): added missing else
1606
1607 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1608
1609         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
1610         reformatted for better readability
1611         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
1612         signed bitfields
1613
1614 2005-11-17 Borut Razem <borut.razem AT siol.net>
1615
1616         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
1617           introduced SILENT option to make building of pic16 libraries less
1618           verbose - used for nightly snapshot build
1619         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
1620           available on Win32 platforms.
1621         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
1622           medium, large, pic and pic16
1623
1624 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1625
1626         * device/lib/printf_large.c: Temporary patch for bug 1358192:
1627           printf("%f"...) sets fraction to zero.
1628
1629 2005-11-16 Raphael Neider <rneider AT web.de>
1630
1631         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
1632           fixes #1357221
1633         * src/pic/gen.c (genIfx): implemented for CARRY bit
1634         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1635           to generic pointers, fixes #1357332,
1636           (pic16_movLit2f): NEW,
1637           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1638
1639 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1640
1641         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1642
1643 2005-11-11 Raphael Neider <rneider AT web.de>
1644
1645         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1646         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1647           compute pointer's type from operand,
1648           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1649           improved single bit reads, fixes bug #1353379
1650
1651 2005-11-09 Borut Razem <borut.razem AT siol.net>
1652
1653         * support/scripts/sdcc.nsi: added lib/pic to the package
1654
1655 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1656
1657         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1658
1659 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1660
1661         * support/regression/tests/bug1348008.c: added
1662         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1663         * support/regression/tests/bug1337835.c: updated comment
1664
1665 2005-11-06 Borut Razem <borut.razem AT siol.net>
1666
1667         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1668           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1669           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1670           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1671           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1672           dynamic construction of cl_error_class and derivates - 2.nd try
1673
1674 2005-11-05 Borut Razem <borut.razem AT siol.net>
1675
1676         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1677           bug, which caused Bus Errors on sparc solaris
1678
1679 2005-11-04 Borut Razem <borut.razem AT siol.net>
1680
1681         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1682           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1683           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1684           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1685           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1686           and derivates to resolve the initialization problem on OSX
1687
1688 2005-11-02 Borut Razem <borut.razem AT siol.net>
1689
1690         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1691           corrected typo - #include <winsock2.h>
1692
1693 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
1694
1695         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
1696           (_asxxxx_mapping): added org directive for future enhancements
1697
1698 2005-11-01 Borut Razem <borut.razem AT siol.net>
1699
1700         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1701           enabled sockets on WIN32
1702         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
1703
1704 2005-10-31 Borut Razem <borut.razem AT siol.net>
1705
1706         * support/regression/generate-cases.py: escape backslashes in {testcase}:
1707           WIN32 backslash path delimiters should be escaped when used in C strings
1708         * support/regression/tests/bitfields.c: exclude failing assertions for
1709           __CYGWIN32__ and __MINGW32__ hosts
1710
1711 2005-10-30 Borut Razem <borut.razem AT siol.net>
1712
1713         * src/SDCCutil.c: corrected double comparison typo
1714
1715 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
1716
1717         * device/lib/medium/Makefile: added for new memory model medium
1718         * device/include/asm/mcs51/features.h: updated for medium/pdata
1719         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
1720           added Multiply & Accumulate sbit's and MAC0_PAGE define
1721         * device/include/mcs51/c8051f300.h: added sfr16 definitions
1722         * device/include/mcs51/c8051f310.h: added sfr16 definitions
1723         * device/lib/_mullong.c: update for medium model
1724         * device/lib/incl.mk: added medium model
1725         * doc/sdccman.lyx: documented medium model
1726         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
1727         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1728         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1729         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1730           (allocParms): set SCLS and OCLS to pdata for medium model
1731         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1732           for pdata,
1733           (powof2): return <0 if not power of 2
1734         * src/avr/gen.c (genBitWise): use updated powof2
1735         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1736           (shiftR2Left2Result): small optimization in setup, save acc when storing,
1737           (shiftLLeftOrResult): use B if necessary
1738         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1739         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1740         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1741         * support/regression/Makefile.in: added test-mcs51-medium
1742         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1743
1744 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1745
1746         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1747         specifier unsigned
1748         * device/lib/time.c (mktime): fixed bug 1334315
1749
1750 2005-10-28 Raphael Neider <rneider AT web.de>
1751
1752         * device/include/pic/p16f_common.inc: added common declarations
1753         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1754
1755 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1756
1757         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1758           (aopPutUsesAcc): added to predict accumulator use,
1759           (assignResultValue): save acc if necessary,
1760           (genMinusDec): store result if indirectly addressed,
1761           (genDivOneByte):  save acc if necessary,
1762           (movLeft2Result): bugfix if left already in acc,
1763           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1764             attention to accumulator use (esp. pdata),
1765           (genReceive): receive pdata correctly
1766         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1767         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1768
1769 2005-10-27 Raphael Neider <rneider AT web.de>
1770
1771         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1772
1773 2005-10-27 Raphael Neider <rneider AT web.de>
1774
1775         * .version: changed version to 2.5.4
1776         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1777         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1778           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1779             arithmetics support routines
1780         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1781         * device/lib/Makefile.in: also create installdir for pic
1782
1783         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1784           pic14 port as well
1785         * src/pic/device.c (dump_sfr): rewritten to delegate register
1786           placement to the linker (use `extern sym' rather than sym EQU addr),
1787           (validAddress): fixed to check last specified address
1788         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1789           (popGetLit): truncate literal value to 8 bit,
1790           (popGet): moved assert to more appropriate place
1791           (popGetExternal): create pCode operand from and mark the according
1792             symbol as being `extern'
1793           (popGetAddr): added sanity check on immediate's offset, provide
1794             GPOINTER tag on demand
1795           (aopPut): fixed for immediates,
1796           (mov2w_op): move operand's address or contents to WREG (depending on
1797             operand type), safer variant of mov2w,
1798           (movwf,call_libraryfunc): NEW, handy abbreviations,
1799           (get_argument_pcop,get_return_val_pcop,pass_argument,
1800           get_returnvalue): interface for accessing function parameters and
1801             return values,
1802           (assignResultValuei,genRet): use new parameter/return value interface
1803           (pic14_getDataSize): back to old version handling generic pointers,
1804           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1805             provided implementation and/or fixed old one,
1806           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1807             calls, removed legacy 8051 reference code
1808           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1809           (loadSignToC): NEW, move the operands sign bit to CARRY,
1810           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1811             genRightShiftSigned, accepts negative shift counts,
1812           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1813           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1814             generic pointers, __data pointers and __code pointers,
1815           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1816             and signed bitfields, limit bitfields to 8 bit,
1817           (genDataPointerGet): fixed number of bytes read,
1818           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1819           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1820             pointers to constant data are no longer assumed to point to __code
1821             space, removed invalid pointer types,
1822           (bitpatternFromVal): retrieve the PICs representation of an integer
1823             or float literal,
1824           (genDataPointerSet): fixed assigning to po_immediate operands,
1825           (genGenPointerSet): implemented as library call,
1826           (genIfx): fixed incorrect condition,
1827           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1828             provide GPOINTER tag according to destination's storage class,
1829           (genCast): added code to handle casting to generic pointers, added
1830             sign-/zero extension of the result
1831           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1832         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1833         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1834           extend the result
1835         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1836           address/register resides in the shared banks
1837           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1838             put all variables into separate sections (have the linker arrange
1839             them)
1840           (picglue): put init code and interrupt handlers in separate sections
1841         * src/pic/main.c: added port specific options table, modified to PORT
1842           structure to make GPOINTERs 3 byte, added pic14_options
1843           (_pic14_do_link): private linking routine (update paths to libraries,
1844             add libsdcc.lib by default)
1845         * src/pic/main.h: declare pic14_options
1846         * src/pic/pcode.c: fixed instructions i/o relations,
1847           (RegCond): reverted to correct version,
1848           (newpCodeOpLit): truncate literals to 8 bit,
1849           (genericPrint): added debug output,
1850           (getRegFromInstruction): fixed for various operand types, simplified
1851           (BuildFlow): fixed broken handling of isntructions with labels
1852           (LinkFlow): start at last instruction in flow (skip trailing comments),
1853             pass the flow on to the next instruction after CALL
1854           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1855           (insertPCodeInstruction): fixed inserting after a skip instruction,
1856           (DoBankSelect): fixed for labeled instructions
1857           (OptimizepBlock): honor --nopeep switch
1858           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1859         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1860         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1861           (pCodeOptime2pCodes): allow disabling this optimization via
1862             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1863             but is still buggy), started implementation of a dataflow based
1864             pCode optimization (CSE + dead code elimination)
1865           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1866         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1867           names are independant of the stack location and therefore portable across
1868           devices
1869
1870 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1871
1872         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1873           (selectSpil): fixed bug 1337835 by not spilling bit variables
1874         * support/regression/tests/bug1337835.c: added test for this bug
1875         * src/mcs51/peeph.def: restart after rule 3.c,
1876           addded rules 263.x to optimize loading constants
1877
1878 2005-10-26 Raphael Neider <rneider AT web.de>
1879
1880         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1881         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1882           (genAssign): emit warning when casting literals to generic pointer
1883             type, also applies when taking the address of a fixed variable,
1884           (genCast): improved casting to generic pointers
1885         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1886           extern variables, added verbose error message
1887         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1888
1889 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1890
1891         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1892         carry must be complemented too
1893         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1894         could be emitted by genMinus
1895         * src/SDCCval.c (constVal): fixed bug 1305065
1896
1897 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1898
1899         * src/SDCCast.c (addCast): added promotion for bit variables
1900         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1901         promotion casts + optimisation
1902         (optimizeGetWord): fix warning 'i' might be used uninitialized
1903         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1904         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1905
1906 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1907
1908         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1909         all chars are promoted to int; promotion should be handled in SDCCast.c
1910
1911 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1912
1913         * device/lib/_strcmp.c: Fixed bug 1326457
1914
1915 2005-10-11 Raphael Neider <rneider AT web.de>
1916
1917         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1918         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1919
1920 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1921
1922         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1923         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1924
1925 2005-10-04 Raphael Neider <rneider AT web.de>
1926
1927         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1928           device/lib/pic16/pics.all: added pic18f1320
1929         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1930
1931 2005-09-30 Raphael Neider <rneider AT web.de>
1932
1933         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1934         * src/pic16/devices.inc: NEW, provides device descriptions
1935         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1936
1937 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1938
1939         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1940           GETHBIT
1941
1942 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1943
1944         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1945           documented Any Order Bit, Higher Order Byte and Higher Order Word
1946         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1947         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1948           (optimizeGetAbit): new, to get any bit, not only the high bit,
1949           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1950           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1951           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1952           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1953             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1954             GETABIT, GETBYTE, GETWORD: decorate them,
1955           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1956           (ast_print): added GETABIT, GETBYTE, GETWORD
1957         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1958         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1959           (geniCodeBinary): new generic binary icode,
1960           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1961         * src/port.h: updated comment for PORT.hasExtBitOp
1962         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1963           (genGetByte): new, to get a single byte,
1964           (genGetWord): new, to get a word from a long,
1965           (gen51Code): added GETABIT, GETBYTE, GETWORD
1966         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1967
1968 2005-09-23 Raphael Neider <rneider AT web.de>
1969
1970         * configure.in, configure: have device/lib/pic configured
1971         * device/lib/Makefile.in: added model-pic14
1972         * device/lib/clean.mk: added pic/ to clean rule
1973         * device/lib/pic: added rudimentary pic14 library providing support
1974           functions for multiplication/division/generic pointer access
1975         * src/SDCCopt.c (convilong): mark support functions as extern
1976           for pic14 port as well
1977         * src/pic/gen.c (genMult): added assertions,
1978           (genpic14Code): emit warning on unhandled iCodes
1979         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1980         * src/pic/pcode.c (pCodeOpCopy),
1981         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1982           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1983           SFR_REGISTER}), made safe for future extensions
1984         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1985           instructions even if preceeded by SKIP instructions (also remove
1986           them); removed unused code
1987         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1988           prevents leaving parts of the structure uninitialized after copying
1989
1990 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1991
1992         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1993           ago by me
1994         * support/regression/tests/addsub.c: added test for the bug
1995
1996 2005-09-21 Raphael Neider <rneider AT web.de>
1997
1998         * device/include/pic16/pic18f1220.h,
1999           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
2000         * device/lib/pic16/Makefile.rules: added missing opening paren
2001         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
2002           are provided in genutils.c,
2003           (genUminusFloat,genUminus,genCmpEq): added asserts on different
2004           operand/result sizes,
2005           (genCmp): assert on NULL pointers first, then check deref'ed values
2006         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
2007           result size
2008
2009 2005-09-18 Raphael Neider <rneider AT web.de>
2010
2011         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
2012           as these are now unused,
2013           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
2014         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
2015           local, avoids uninitialized pointer dereference on r->name
2016         * src/pic16/ralloc.c (newReg): fixed indentation
2017
2018 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
2019
2020         * src/SDCCval.c (constVal): fixed bug 730366
2021         * support/Util/SDCCerr.c,
2022         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
2023
2024 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
2025
2026         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
2027
2028 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
2029
2030         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
2031
2032 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2033
2034         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
2035           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2036         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
2037           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2038         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
2039         * packihx/packihx.c (hexDigit): made c unsigned char
2040         * as/mcs51/lklibr.c (fndsym),
2041         * link/z80/lkgb.c (gb),
2042         * link/z80/lklibr.c (fndsym),
2043         * link/z80/lkrloc.c (relr),
2044         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
2045         * src/SDCC.lex (checkCurrFile, process_pragma),
2046         * src/SDCCglue.c (spacesToUnderscores),
2047         * src/SDCCmain.c (setParseWithComma, processFile),
2048         * src/asm.c (tvsprintf, printCLine),
2049         * src/avr/gen.c (emitcode, aopPut),
2050         * src/ds390/gen.c (emitcode),
2051         * src/hc08/gen.c (emitcode, emitinline),
2052         * src/mcs51/gen.c (emitcode, genInline),
2053         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2054           tokenizeLineNode),
2055         * src/pic/ralloc.c (debugLog),
2056         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2057           tokenizeLineNode),
2058         * src/pic16/ralloc.c (debugLog),
2059         * src/z80/main.c (_process_pragma):
2060            made all ctype.h function calls safe
2061         * src/SDCCopt.c: include math.h for fabs
2062         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
2063           and used them throughout the code to make ctype.h function calls safe
2064         * src/ds390/main.c (asmLineNodeFromLineNode),
2065         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
2066         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
2067            unsigned char*
2068         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
2069           (newpCodeAsmDir): made ctype.h function calls safe
2070         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
2071           pic16_emitcode):  made lbp unsigned char*
2072         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
2073           (pic16_newpCodeAsmDir): made ctype.h function calls safe
2074         * src/xa51/gen.c (emitcode),
2075         * src/z80/gen.c (_emit2): made lbp unsigned char*
2076         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
2077            char*
2078
2079 2005-09-05 Raphael Neider <rneider AT web.de>
2080
2081         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
2082           access bank splitpoint
2083
2084 2005-09-05 Raphael Neider <rneider AT web.de>
2085
2086         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
2087
2088 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
2089
2090         * .version: changed to version 2.5.3
2091         * doc/sdccman.lyx: changed version to 2.5.3,
2092           documented --codeseg and --constseg and pragma codeseg and constseg,
2093           documented bit parameters (reentrant) and bit returning
2094         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
2095            currFunc->recvSize, but is this ok for all ports?
2096           (ast2iCode): result of ~ on unsigned char must be cast to int for
2097            bool to work
2098         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
2099           function pointers in bit space
2100         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
2101           (processFuncArgs): call port.reg_parm() with reentrancy info
2102         * src/port.h,
2103         * src/avr/main.c,
2104         * src/ds390/main.c,
2105         * src/hc08/main.c,
2106         * src/pic/main.c,
2107         * src/pic16/main.c,
2108         * src/xa51/main.c,
2109         * src/z80/main.c: port.reg_parm prototype extended with
2110           "bool reentrant" parameter
2111         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
2112           options.stackAuto for allocating bit register parameters
2113         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
2114           (genSend): set BitBankUsed if it is,
2115           (selectRegBank): factored out of genCall for use in genPcall,
2116           (genCall): removed redundant dtype assignmen, use selectRegBank,
2117           (genPcall): handle returning in Carry properly, save in F0 if needed,
2118           (genReceive): handle bit register parameters
2119         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
2120           (mcs51_assignRegisters): enable bit registers for all reentrant
2121            functions and don't set BitBankUsed unconditionally
2122         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
2123         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
2124         * support/regression/tests/funptrs.c: added tests for BOOL and for return
2125
2126 2005-08-27 Borut Razem <borut.razem AT siol.net>
2127
2128         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
2129         ppc-osx (Darwin) does not support -u option. It seems that it is
2130         supported only on Linux - GNU cp
2131
2132 2005-08-25 Borut Razem <borut.razem AT siol.net>
2133
2134         * sim/ucsim/gui.src/serio.src/Makefile.in,
2135           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
2136           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2137           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
2138           install and strip, since the strip at /usr/ccs/bin should be used
2139           on solaris
2140
2141 2005-08-24 Borut Razem <borut.razem AT siol.net>
2142
2143         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
2144
2145 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
2146
2147         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
2148         ffffffffu
2149
2150 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
2151
2152         * as/mcs51/aslink.h: completed lkrloc.c prototypes
2153         * as/mcs51/lkmain.c (link_main): fixed warning
2154         * device/include/stdbool.h: ds390 has no advanced bit support yet
2155         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
2156         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
2157         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
2158           and updated their macros
2159         * src/SDCCval.c (constVal): updated comment for renamed b_long
2160
2161 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
2162
2163         * as/mcs51/asdata.c: changed ctype['['] to BINOP
2164         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
2165           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
2166           (oprio): set priority for '['
2167         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
2168            and adb_24_bit
2169         * as/mcs51/asm.h: added defines R_BIT and S_BIT
2170         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
2171         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
2172         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
2173           added overlayable BIT_BANK area
2174         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
2175           (summary2): explain 'T' in legenda
2176         * as/mcs51/lkrloc.c: replaced old K&R style,
2177           (relr): added R_BIT processing,
2178           (errmsg): added "Bit-addressable relocation error",
2179           (adb_bit): added for converting from byte- to bit-addressable space,
2180           (adb_24_bit): added for converting from byte- to bit-addressable space
2181         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
2182            used in reentrant functions now even as return value
2183         * device/lib/_gptrput.c (_gptrput): removed obsolete code
2184         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
2185           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
2186         * src/SDCCglobl.h: added indicator BitBankUsed
2187         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
2188            the bit registers b0-b7
2189         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
2190           (geniCodeCast): fixed bug 1263853,
2191           (geniCodeLogicAndOr): put result in bool or char,
2192           (geniCodeReceive): added parameter func for accessing the return type,
2193           (geniCodeFunctionBody): pass func to geniCodeReceive
2194         * src/SDCCmain.c: added indicator BitBankUsed
2195         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
2196         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
2197           (checkSClass): don't put automatic bool/bit on stack,
2198           (checkFunction): removed check on function cannot return bit
2199         * src/SDCCsymt.h: added newBoolLink prototype
2200         * src/mcs51/gen.c (rb1regs): added bit registers,
2201           (movc): created for assigning to carry,
2202           (pushReg, popReg): created for pushing registers,
2203           (sameRegs): check both AOP_REG and AOP_CRY types,
2204           (aopOp): handle bit registers,
2205           (aopPut): optimization no self-assign,
2206           (saveRegisters): push reg->base (bits) only once for bit registers,
2207            and use pushReg,
2208           (unsaveRegisters): pop reg->base only once and use popReg,
2209           (assignResultValue): added parameter func and return in carry for bits,
2210           (genIpush): optimization no reload in A if not changed,
2211           (genSend): bit parameters in reentrant functions are passed in bit
2212            registers by first assigning to bits in B, then save registers and
2213            copy B to bits,
2214           (genCall): handle returning in Carry properly, save it in F0 if needed,
2215           (genPcall): updated assignResultValue call, this is not safe yet for bit
2216            returning function !!!
2217           (genFunction): don't generate equ's for bit registers and use pushReg,
2218           (genEndFunction): take care of bit returning functions and use popReg,
2219           (genRet): return bit in Carry,
2220           (genIfx): optimize bit registers and other directly addressable bits,
2221           (genReceive): updated assignResultValue call
2222         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2223           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2224            registers when using stack-auto
2225         * src/mcs51/ralloc.c (_G): added allBitregs,
2226           (regs8051): added the bit registers,
2227           (createStackSpil): use macro IS_BIT,
2228           (getRegBit): added to allocate a bit register, else spill,
2229           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2230           (updateRegUsage): factored out to ease stepping while debugging,
2231           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2232            also allocate bit registers,
2233           (fillGaps): handle bit registers,
2234           (findAllBitregs): added to create bit vector with all bit registers,
2235           (mcs51_allBitregs): returns this bit vector,
2236           (mcs51_assignRegisters): when using stack-auto use bit registers for
2237            passing parameters and creating local variables
2238         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2239
2240 2005-08-22 Borut Razem <borut.razem AT siol.net>
2241
2242         * device/lib/Makefile.in: replaced find option -or with -o
2243           to make it run on solaris
2244
2245 2005-08-22 Raphael Neider <rneider AT web.de>
2246
2247         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
2248           fixes #1265442 (crash on Solaris)
2249
2250 2005-08-20 Borut Razem <borut.razem AT siol.net>
2251
2252         * configure, configure.in: added tests for libsocket and libnsl libraries,
2253           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
2254           from support/regression/Makefile.in
2255         * support/regression/Makefile.in: added
2256         * device/lib/pic16/Makefile.common.in: force make to use bash shell
2257         * sim/ucsim/libtool: regenerated on sparc-solaris
2258         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2259           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
2260           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
2261           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
2262           sparc-solaris, which doesn't use GNU ld linker
2263         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
2264         * as/Makefile: find on sparc-solaris does not support -maxdepth option
2265
2266 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
2267
2268         * src/mcs51/peeph.def: updated comments
2269
2270 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2271
2272         * device/lib/_gptrget.c,
2273         * device/lib/_gptrput.c: slightly shorter
2274         * doc/sdccman.lyx: incremented version
2275         * src/mcs51/peeph.def: moved peephole comments to the line of first
2276           change to better keep line correlation, reanimated 186.e
2277         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
2278
2279 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2280
2281         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
2282           David Saxton with quotes around file name.
2283
2284 2005-08-15 Borut Razem <borut.razem AT siol.net>
2285
2286         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
2287           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
2288           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
2289           make tests run on x86_64 platform
2290
2291 2005-08-13 Raphael Neider <rneider AT web.de>
2292
2293         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
2294           as it might be executed DURING a build (parallel make is wonderful)
2295
2296 2005-08-13 Raphael Neider <rneider AT web.de>
2297
2298         * device/lib/Makefile.in (port-specific-objects-pic16):
2299           revert to cp $(PORT)/bin/*.* $(PORTDIR)
2300         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
2301           dependency
2302         * device/lib/pic16/Makefile.rules: build subdirs before creating
2303           the library, removed builddir rule, create $(builddir) early in
2304           recurse rule, use empty recurse rule for leaf directories
2305         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
2306           mkdir errors (race condition), removed duplicate suffix "hex"
2307           from clean rules
2308         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
2309         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
2310           prevents mkdir -p from aborting on Alpha
2311
2312 2005-08-12 Raphael Neider <rneider AT web.de>
2313
2314         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
2315           db-statements in order to allow for arrays of pointers in code
2316           sections to be placed without interspersed 0-padding, fixes
2317           bug #1256215
2318         * (emitStatistics): fixed division by zero for pic18f1220
2319         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
2320           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
2321         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
2322         * (pic16_pCodeConstString): keep track of already emitted string
2323           literals to prevent "duplicate definitions of symbol _str_NR"
2324         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
2325           debug message
2326         * device/lib/Makefile.in: ignore failing PIC16 library builds
2327         * device/lib/pic16/Makefile: do not build if gputils are missing
2328         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
2329
2330 2005-08-10 Raphael Neider <rneider AT web.de>
2331
2332         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
2333           my last commit)
2334
2335 2005-08-10 Raphael Neider <rneider AT web.de>
2336
2337         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
2338           Rokas' patch to add the new fixed point type "__fixed16x16"
2339         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
2340           functions for __fixed16x16 arithmetics
2341         * device/lib/pic16: reimplemented the build system to support
2342           a separate build directory, better handling of libio (create
2343           the library in a separate subdir for each architecture) and
2344           easier configuration (centralized in Makefile.common)
2345
2346 2005-08-07 Raphael Neider <rneider AT web.de>
2347
2348         * src/pic16/gen.c (genrshTwo): fixed sign extension
2349         * src/pic16/device.c: added pic18f2320, 4220 and 4320
2350         * device/include/pic16/pic18f2220.h: changed some bit definitions,
2351           added T0CONbits
2352         * device/include/pic16/pic18f4220.h: NEW, header for
2353           pic18f4220 and pic18f4320
2354         * device/include/pic16/pic18fregs.h: added new devices,
2355           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
2356         * device/include/pic16/signal.h: resolved name clashes
2357           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
2358           to also allow testing for interrupt enable bits, added
2359           comments on how to use the macros
2360         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
2361         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
2362           register definitions for the devices
2363         * device/lib/pic16/pics.all: added new devices
2364         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
2365           allocated memory
2366         * device/lib/pic16/libc/stdlib/memfree: do not count
2367           the block header as free memory
2368         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
2369           simplified and added missing end-of-blocklist-marker
2370           (reported by Peter Onion, fixes #1252814)
2371         * (_mergeHeapBlock): fixed loop condition
2372         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
2373           len==0, restructured code
2374         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
2375           up a bit, reduced bitfield accesses, prevent endless loops
2376           in case of heap corruption
2377         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
2378           "unreferenced arguments/must return a value" warnings
2379         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
2380           replaced BAUDREG with SPBRG
2381         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
2382           device/lib/pic16/debug/gstack/gstack.c: replaced
2383           _naked, _asm, _endasm with __naked, __asm, __endasm
2384
2385 2005-08-05 Raphael Neider <rneider AT web.de>
2386
2387         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
2388           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
2389
2390 2005-08-05 Borut Razem <borut.razem AT siol.net>
2391
2392         * device/lib/Makefile.in: added missing ';'
2393         * configure: removed ^M characters
2394
2395 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2396
2397         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
2398           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
2399           License
2400
2401 2005-08-04 Borut Razem <borut.razem AT siol.net>
2402
2403         * configure.in: pic16 libraries build 2nd try - enable running
2404           configure in device/lib/pic16
2405         * configure: regenerated from configure.in
2406         * device/lib/Makefile.in: create $(PORT)/bin directory
2407
2408 2005-08-03 Raphael Neider <rneider AT web.de>
2409
2410         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
2411           to get/set values via pointers
2412         * (genUnpackBits,genPackBits): changed detection of
2413           ptr->bitfield vs. sym.bitfield, fixed access via generic
2414           pointers, removed dead (wrong) code for multibyte bitfields
2415         * (genNearPointerGet, genGenPointerGet): removed useless code,
2416           fixed bitfield detection, fixes #1250594
2417         * (genNearPointerSet): removed useless code
2418         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
2419           and introduced macro pic16_emitpcode that conditionally emits
2420           the origin of the following pCode (useful for debugging SDCC)
2421         * src/pic16/pcode.c: changed (and disabled) some debug outputs
2422         * (createDefmap): fixed handling of LFSR for --optimize-df
2423
2424 2005-08-02 Borut Razem <borut.razem AT siol.net>
2425
2426         * device/lib/Makefile.in: pic16 libraries build enabled since
2427           gputils-0.13.2 are now localy installed at sourceforge's compile farm
2428
2429 2005-08-02 Raphael Neider <rneider AT web.de>
2430
2431         * src/pic16/gen.c (genPackBits): removed deprecated warning
2432         * (genGenPointerSet): fixed bitfield detection
2433
2434 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2435
2436         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
2437
2438 2005-07-31 Raphael Neider <rneider AT web.de>
2439
2440         * device/lib/pic16/libdev/pic18f458.c,
2441           device/include/pic16/pic18f458.h: added missing T0CONbits
2442
2443 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2444
2445         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
2446
2447 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
2448
2449         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
2450
2451 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2452
2453         * device/include/mcs51/at89c51ed2.h: added.
2454
2455 2005-07-23 Raphael Neider <rneider AT web.de>
2456
2457         * src/pic/gen.h: added emitpcode macro for debugging
2458         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
2459           and replace by macro adding debug information on demand
2460         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
2461         * (gencjne): tried to fix; replaced with correct (slower) code
2462         * (gen{Unp,P}ackBits): fixed single bit access
2463         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
2464         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
2465           previous instruction
2466         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
2467           register has to be handled with care (forbidding movement
2468           of assignments/uses, removing assignments completely, ...)
2469         * (pCodeOptime2pCodes): make use of regIsSpecial
2470         * added lots of debugging output (commented out)
2471         * src/pic/rallloc.c (deassignLRs): prevent operand registers
2472           from being reused as result UNLESS it is known to work
2473
2474 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
2475
2476         * support/Util/dbuf.h: include <stddef.h> for size_t
2477         * .version: changed to version 2.5.2
2478
2479 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2480
2481         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
2482
2483 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2484
2485         * src/hc08/gen.c (genMinus): fixed bug #1241835,
2486           (genModOneByte): removed needless psha/pula
2487
2488 2005-07-22 Raphael Neider <rneider AT web.de>
2489
2490         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
2491           have PIC14 handled like PIC16, fixes broken pic14 linker calls
2492         * src/pic/gen.c (resolveIfx): do not "invent" labels
2493         * (genSkipc): changed to positive logic
2494         * (genSkipCond): removed as no longer needed
2495         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
2496           backport from PIC16
2497         * (genLeftShift): check operands are in different registers
2498         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
2499           INCF does not update CARRY...
2500         * src/pic/main.c: fixed _linkCmd
2501         * src/pic/pcode.c (unlinkpCode): added inactive code
2502         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
2503           alive (do not assign result and operand overlapping registers)
2504
2505 2005-07-22 Raphael Neider <rneider AT web.de>
2506
2507         * src/pic/device.c (dump_sfr): replaced register declaration with
2508           call to emitSymbolToFile() to avoid duplicate symbols
2509         * (assignRelocatableRegisters): do not declare external symbols
2510         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
2511           right (take size of type, not etype)
2512         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
2513         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
2514         * (packRegsForAccUse): disabled assignment of WREG as
2515           the result reg to prevent occurence of just fixed #1235003,
2516           fixes #1242954
2517         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
2518           symbols (avoids duplicate symbols in .asm file)
2519         * (pic14emitRegularMap): use emitSymbolToFile()
2520         * src/pic/gen.c (aopOp): fixed spillLocation handling
2521         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
2522         * (genDataPointerSet): removed unneccessary variables/output
2523
2524 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
2525
2526         * as/mcs51/lkarea.c: enlarged codemap for banked memory
2527         * device/lib/mcs51/crtbank.asm: added # to 0x0F
2528
2529 2005-07-21 Raphael Neider <rneider AT web.de>
2530
2531         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
2532           architecture cannot handle them efficiently, fixes bug #1235003
2533         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
2534           check for empty sets before using them (fixes bug #1232190)
2535
2536 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
2537
2538         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
2539           (lnksect2): generate warnings for memory overlap
2540         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
2541           constseg to set the name of these segments so you can instruct the linker
2542           to place them in banks
2543         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
2544         * src/SDCCglobl.h: added MODEL_HUGE to enum,
2545           added code_seg and const_seg to options
2546         * src/SDCCglue.c (emitMaps): use options.const_seg,
2547           (createInterruptVect): put interrupt vectors in segment HOME,
2548           (glue): put HOME before static segment and put the main glue in HOME,
2549           (glue): use options.code_seg
2550         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
2551         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
2552           these segments so you can instruct the linker to place them in banks
2553           (linkEdit): use code_loc for HOME segment which should be the first
2554           segment in code memory now
2555         * src/SDCCmem.c: fixed more stuff like bug 1238386
2556         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
2557           (changePointer): don't change function pointers to code pointers for
2558           banked functions,
2559           (compareType): added exceptional check for banked function pointers
2560         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
2561         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
2562           after static in code memory
2563         * src/mcs51/gen.c: added aopLiteralLong prototype,
2564           (aopForSym): use getSize for functions,
2565           (genCall): generate banked calls over one trampoline __sdcc_banked_call
2566           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
2567           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
2568           the segment,
2569           (genPcall): use call for literal function pointers and generate banked
2570           calls over the one trampoline so there's only one place for the user to
2571           modify according to his/hers hardware,
2572           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
2573           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
2574         * src/mcs51/main.c: added keyword banked,
2575           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
2576         * support/Util/SDCCerr.c,
2577         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
2578           needed for passing the bank and address to the trampoline
2579         * device/lib/mcs51/crtbank.asm: added for bankswitching
2580         * device/lib/mcs51/Makefile: added crtbank
2581
2582 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2583
2584         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
2585           for fields at offset 0 of a struct or union as reported
2586           on 2005-07-07 in the developer mailing list.
2587
2588 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
2589
2590         * src/SDCCmem.c: fixed bug 1238386
2591
2592 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2593
2594         * src/mcs51/peeph.def: added labelrefcounting for peepholes
2595           (patch #1144962), added peephole 300, enabled 259.x
2596         * doc/sdccman.lyx: removed screenshot and provided link instead
2597
2598 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2599
2600         * doc/sdccman.lyx: added section about debugging with ddd
2601         * doc/figures/ddd_example.eps: screenshot of debugging session
2602
2603 2005-07-04 Raphael Neider <rneider AT web.de>
2604
2605         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
2606           like CODE pointers, fixes #1115683
2607         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
2608           call, fixes bugs #1232211, #1228110,
2609           fixed wrong casts to pCodeFlow from pCodeInstructions
2610
2611 2005-07-04 Raphael Neider <rneider AT web.de>
2612
2613         * src/pic/gen.c (popGet): changed assert to allow for
2614           bit operands
2615         * (popGetAddr): changed signature to provide
2616           an additional index, patched all call sites
2617         * (genCmpEq): handle literal-like operands correctly
2618         * (genAddrOf): added sanity checks on __code/__data pointers
2619         * (genAssign): added handling of symbols from __code section
2620         * (gencjne): do not generate code for comparisons whose result
2621           is neither stored nor used, fixes bug #1171114
2622         * (AccLsh, AccRsh): operate on operand instead of WREG
2623         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
2624           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
2625           by known count
2626         * rewrote complete shift-by-literal logic, commented unused
2627           functions out
2628         * (genConstPointerGet): get multiple bytes (if result size > 1),
2629           fixed handling of non-immediate addresses
2630         * (genPointerGet): handle CODE pointers like CONST pointers
2631         * (genpic14Code): insert C-SRC lines as Cource-pCodes
2632         * ({aop,op}_isLitLike): NEW, single place to decide whether an
2633           operand is to be treated as a literal or not
2634         * (mov2w,genPcall,genCmpEq),
2635           src/pic/genarith.c: use aop_isLitLike() to decide between
2636           literal/register contents
2637         * (addSign): added missing offset
2638         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2639           only emit comment in debug-mode,
2640           use {aop,op}_isLitLike throughout the file
2641         * src/pic/glue.c: fix initializers for pointers (work in progress)
2642         * src/pic/pcode.c (get_op): honor index on _const symbols
2643         * ({reset,dump}pCodeStatistics): NEW, estimate code size
2644         * (dumppBlock): added pCode size estimation
2645         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2646           check for IS_SYMOP before OP_SYMBOL'ing
2647         * fixed indentation, compacted switch-statements
2648         * (allocReg): find free register and allocate it instead of
2649           allocating new registers all the time
2650         * (deassignLRs): prevent POINTER_GET's from being assigned the same
2651           registers as its operands (necessary only for multibyte GETs)
2652
2653 2005-07-01 Raphael Neider <rneider AT web.de>
2654
2655         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2656           debugging .asm-output macros FENTRY + FEXIT
2657         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2658           way... I wonder...
2659         * (emitpComment): NEW, printf to pCode
2660         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2661           offset handling
2662         * (popGetAddr): NEW, variant of popGet to access an immediates
2663           high(er) bytes instead of the n'th byte of memory they reference,
2664           replaced popGet with popGetAddr where neccessary
2665         * (genDataPointerGet): reactivated and fixed implementation
2666         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2667           accesses
2668         * (genDataPointerSet): fixed multibyte assignments
2669         * (genpic14Code): fixed --i-code-in-asm handling
2670         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2671         * (genPlus): fixed index-out-of-bounds error
2672         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2673         * src/pic/ralloc.c: added debugging output macro FENTRY2
2674         * (spillThis): fixed indentation, enbraced for-body for clarity
2675         * (rematStr): commented out as now unused
2676         * (regTypeNum): commented out special spill case (overwrites
2677           arbitrary values)
2678         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2679
2680 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2681
2682         * doc/sdccman.lyx: documented sfr16/sfr32,
2683           added example for using storage class with function pointers
2684         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2685
2686 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2687
2688         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
2689         * device/lib/_itoa.c,
2690         * device/lib/_ltoa.c: optimized codesize
2691         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
2692           but don't know how to suppress the double warning.
2693         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
2694         * support/Util/SDCCerr.c,
2695         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
2696
2697 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
2698
2699         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
2700           fixed old K&R prototypes
2701         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
2702         * device/lib/_gptrget.c,
2703         * device/lib/_gptrgetc.c,
2704         * device/lib/_gptrput.c: changed versions for new memory indicator values,
2705           also new versions for small generic pointers and banked generic pointers
2706         * src/port.h: added const_name
2707         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
2708         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
2709         * src/SDCCcse.c (findPrevIc): check all associative operators
2710         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
2711         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
2712         * src/SDCCmem.c: updated comments,
2713           set far-space to 0 for pdata, results in optimized code
2714         * src/SDCCmem.h: added macro CONST_NAME
2715         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
2716           moving the info into the highest bits, see also gptrget/gptrput
2717         * src/src.dsp: added sdcc.ico to project files
2718         * src/avr/gen.c (genCast): fixed bug 0x%d
2719         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
2720         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
2721           relation between ptr_type and DCL_TYPE,
2722           (genCast): fixed bug 0x%d
2723         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
2724           (CODE)" for const_name
2725         * src/hc08/gen.c (genCast): fixed bug 0x%d
2726         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
2727           (hc08_port): added "CONST (CODE)" for const_name
2728         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2729           (aopForRemat, adjustArithmeticResult): disconnected direct relation
2730           between ptr_type and DCL_TYPE,
2731           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2732           operand* and took AOP() inside function so sfr-ness can be checked,
2733           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2734           new prototype,
2735           (genFunction, genEndFunction): optimized stack setup,
2736           (genMinus): optimized for literals with ending zeroes (in bytes),
2737           (genCast): fixed bug 0x%d
2738         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2739           (mcs51_port): added "CONST (CODE)" for const_name
2740         * src/mcs51/peeph.def: made rule 226 more generic
2741         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2742         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2743         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2744         * src/z80/main.c (z80_port): added NULL for const_name,
2745           (gbz80_port): added NULL for const_name
2746         * support/regression/tests/bug663539.c,
2747         * support/regression/tests/sfr16.c: new tests
2748
2749 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2750
2751         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2752
2753 2005-06-24 Raphael Neider <rneider AT web.de>
2754
2755         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2756           corrected typos...
2757         * device/include/pic16/signal.h: added USBIF
2758           and SIG_USB
2759
2760 2005-06-24 Raphael Neider <rneider AT web.de>
2761
2762         * device/lib/pic16/libdev/pic18f2455.c,
2763           device/include/pic16/pic18f2455.h: NEW
2764         * device/include/pic16/pic18fregs.h,
2765           device/lib/pic16/pics.all,
2766           src/pic16/device.c: added 18f2455
2767         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2768           device/include/pic16/{pic18f[68][567].h,usart.h}:
2769           replaced MULTIPLE_USARTS define with more relaible
2770           compatibility sfrs (for USART access)
2771
2772 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2773
2774         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2775           and the output asm file line is printed on two lines.
2776
2777 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2778
2779         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2780           BGT, BLE, BHI, and BLS instructions
2781         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2782           genCmpEq): removed
2783         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2784           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2785           fixes bug #1216342
2786         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2787
2788 2005-06-15 Raphael Neider <rneider AT web.de>
2789
2790         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2791         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2792         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2793           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2794           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2795
2796 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2797
2798         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2799           Marcel Telka in bug #1215704
2800
2801 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2802
2803         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2804           located in shared memory bank.
2805
2806 2005-05-31 Raphael Neider <rneider AT web.de>
2807
2808         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2809           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2810           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2811
2812 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2813
2814         * device/lib/_strncpy.c: fixed the fix
2815
2816 2005-05-26 Raphael Neider <rneider AT web.de>
2817
2818         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2819           initializers with \0, bug #1208187
2820         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2821           intializers with \0, bug #1208187
2822
2823 2005-05-26 Raphael Neider <rneider AT web.de>
2824
2825         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2826           initializers with \0, bug #1208187
2827         * src/pic16/main.c (_process_pragma): added sanity checks
2828           for stack position and size, emit warnings when appropriate
2829
2830 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2831
2832         * device/lib/_strncpy.c: fixed not filling with \0
2833
2834 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2835
2836         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2837           createFunction),
2838         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2839           compound_statement),
2840         * src/SDCCsymt.h,
2841         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2842
2843 2005-05-24 Raphael Neider <rneider AT web.de>
2844
2845         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2846
2847 2005-05-24 Raphael Neider <rneider AT web.de>
2848
2849         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2850           TRISE definitions, closes bug #1162453
2851
2852 2005-05-22 Raphael Neider <rneider AT web.de>
2853
2854         * src/pic16/main.c (_process_pragma): check for missing
2855           arguments to pragmas code and udata
2856         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2857           consistency fixes to match other headers (thanks to Jim Paris)
2858         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2859
2860 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2861
2862         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2863
2864 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2865
2866         * support/regression/tests/bug1198642.c: new test
2867         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2868         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2869         * support/scripts/resource.h,
2870         * support/scripts/resource.rc,
2871         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2872         * support/scripts/sdcc.ico: added 32x32 icon
2873
2874 2005-05-18 Raphael Neider <rneider AT web.de>
2875
2876         * device/lib/pic16/libdev/pic18f*.c,
2877         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2878           keywords to "__sfr" and "__at (X)"
2879         * device/include/pic16/pic18fregs.h: added pic18f4520
2880         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2881           #1203088 (MPLAB compatibility)
2882
2883 2005-05-17 Raphael Neider <rneider AT web.de>
2884
2885         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2886         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2887         * device/lib/pic16/pics.all: added new devices
2888         * src/pic16/device.c: added support for pic18f4520
2889
2890 2005-05-16 Raphael Neider <rneider AT web.de>
2891         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2892         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2893         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2894           convenience function for bit access
2895
2896 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2897
2898         * device/lib/printf_large.c: fixed bug 1193299
2899         * support/regression/tests/bug1057979.c: added test %3.3s
2900
2901 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2902
2903         * device/include/mcs51/8051.h,
2904         * device/include/mcs51/8052.h: made parseable with lint
2905         * device/include/mcs51/lint.h: added include file for (sp)lint
2906         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2907         * doc/cdbfileformat.lyx,
2908         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2909
2910 2005-05-14 Raphael Neider <rneider AT web.de>
2911
2912         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2913         * device/lib/pic16/libc/stdlib/itoa.c (new)
2914         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2915         * device/lib/pic16/libio/Makefile: exclude subdir according to
2916           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2917         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2918         * src/pic16/gen.c (genFunction): prevent annoying warning
2919         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2920           nameclashes on BeOS
2921         * support/cpp2/cppmain.c (cpp_output_string): new
2922         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2923           fixes bug 1116802
2924
2925 2005-05-13 Borut Razem <borut.razem AT siol.net>
2926
2927         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2928
2929 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2930
2931         * .version: changed to version 2.5.1; back to bleeding edge development
2932
2933 2005-05-11 Borut Razem <borut.razem AT siol.net>
2934
2935         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2936           generate PDF version 1.3 documents
2937
2938 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2939
2940         * .version: changed to version 2.5.0
2941
2942 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2943
2944         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2945
2946 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2947
2948         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2949         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2950         well as many smaller updates.
2951         * .version: changed to version 2.5.0-pre1
2952
2953 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2954
2955         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2956
2957 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2958
2959         * support/regression/tests/bug1185672.c: added
2960         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2961           bug 1185672
2962         * src/mcs51/gen.c (genCall): added comments, made it look safer
2963         * src/mcs51/gen.c (genEndFunction): simplified
2964
2965 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2966
2967         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2968
2969 2005-04-14 Borut Razem <borut.razem AT siol.net>
2970
2971         * fixed bug 1045046 - SIGSEGV with really simple code?:
2972           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2973           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2974
2975 2005-04-14 Borut Razem <borut.razem AT siol.net>
2976
2977         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2978           src/pic16/device.h: temporarily disabled experimental #inline pragma
2979           for 2.5.0 release
2980
2981 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2982
2983         * device/include/z80/stdio.h,
2984         * device/include/z80/string.h: removed these highly incomplete files so
2985           SDCC can use the default ones in device/include/
2986
2987 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2988
2989         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2990         gcc warning.
2991         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2992         fix sdcpp warnings.
2993
2994 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2995
2996         * device/include/malloc.h: removed redundant __reentrant prototypes
2997         * device/lib/_mullong.c: added working xstack variant in asm (C version
2998           doesn't pass regression tests)
2999         * device/lib/bpx.c: used __data and made bpx char for mcs51
3000         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
3001           (createFunction): fixed bug with xstackPtr
3002         * src/SDCCcse.c: corrected comments
3003         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
3004           (killDeadCode, eBBlockFromiCode): removed unused code
3005         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
3006           corrected comments
3007         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
3008           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
3009           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
3010           (genModOneByte): fixed warning in MSVC
3011         * src/mcs51/main.c (): added comments
3012         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
3013
3014 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3015
3016         * src/SDCCmain.c (linkEdit): oops, changed one line too many
3017
3018 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
3019
3020         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
3021
3022 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
3023
3024         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
3025         characters arrays of larger size than the declared one.
3026
3027 2005-04-10 Borut Razem <borut.razem AT siol.net>
3028
3029         * src/pic/gen.c (genInline),
3030           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
3031           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
3032           (findNextInstruction), (findPrevInstruction),
3033           (findInstructionUsingLabel),
3034           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
3035         * src/pic/pcode.c (findLabel): added missing '\n'
3036         * src/src.dsp: added SDCCdwarf2.c to the project
3037
3038 2005-04-09 Borut Razem <borut.razem AT siol.net>
3039
3040         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
3041
3042 2005-04-08 Raphael Neider <rneider AT web.de>
3043
3044         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
3045           into the chain after a given one) and mergeDefmapSymbols (combine
3046           defmap entries for each symbol per pcode)
3047         * (createDefmap): have defmap entries merged in the end
3048         * (defmapReplaceSymRef): split defmap entries covering two accesses to
3049           a symbol before replacing one access type's symbol, merge symbols in
3050           the end (replacement symbol might already have an entry)
3051         * (assignValnums): keep reference to written WREG intact
3052
3053 2005-04-08 Raphael Neider <rneider AT web.de>
3054
3055         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
3056           Alpha)
3057
3058 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
3059
3060         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
3061         bytes
3062
3063 2005-04-07 Raphael Neider <rneider AT web.de>
3064
3065         * device/include/pic16/usart.h: added compatibility defines for
3066           devices with more than one USART
3067         * device/include/pic16/pic18f[68][567]20.h: activated above defines
3068
3069 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3070
3071         * device/lib/Makefile.in: updated for port specific include
3072
3073 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3074
3075         * support/regression/ports/mcs51/spec.mk: added mcs51 include
3076
3077 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3078
3079         * device/include/8051.h,
3080         * device/include/8052.h,
3081         * device/include/at89S8252.h,
3082         * device/include/at89c55.h,
3083         * device/include/at89x051.h,
3084         * device/include/at89x51.h,
3085         * device/include/at89x52.h,
3086         * device/include/mcs51reg.h,
3087         * device/include/reg51.h,
3088         * device/include/reg764.h,
3089         * device/include/regc515c.h,
3090         * device/include/sab80515.h: (re)moved these 12 files
3091         * device/include/mcs51/8051.h,
3092         * device/include/mcs51/8052.h,
3093         * device/include/mcs51/at89S8252.h,
3094         * device/include/mcs51/at89c55.h,
3095         * device/include/mcs51/at89x051.h,
3096         * device/include/mcs51/at89x51.h,
3097         * device/include/mcs51/at89x52.h,
3098         * device/include/mcs51/mcs51reg.h,
3099         * device/include/mcs51/reg51.h,
3100         * device/include/mcs51/reg764.h,
3101         * device/include/mcs51/regc515c.h,
3102         * device/include/mcs51/sab80515.h: and added them here
3103
3104 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
3105
3106         * device/include/stdarg.h: changed SDCC specific keywords to double
3107           underlined form.
3108         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
3109           mcs51 and ds390.
3110         * device/include/hc08/mc68hc908gp32.h,
3111         * device/include/hc08/mc68hc908jb8.h,
3112         * device/include/hc08/mc68hc908jkjl.h,
3113         * device/include/hc08/mc68hc908qy.h: fixed comments
3114         * device/include/mcs51/README: updated
3115         * device/include/mcs51/c8051f120.h: added PINRSF
3116         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
3117         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
3118           amidst code. Also inline is not supported.
3119
3120 2005-04-06 Raphael Neider <rneider AT web.de>
3121
3122         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
3123         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
3124           callers stack/frame pointers
3125
3126 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
3127
3128         * device/include/pic16/usart.h: added, missing in previous commit,
3129         * device/include/pic16/adc.h: fixed typo,
3130         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
3131         commit,
3132         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
3133         <p18fxxx.inc>
3134         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
3135         uninitialized because a bug appears with gplink
3136         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
3137         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
3138         complains for unrecognised option
3139
3140 2005-04-05 Raphael Neider <rneider AT web.de>
3141
3142         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
3143           structs as well (using memcpy)
3144         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
3145           on ISRs (GOTO has no label)
3146         * src/pic16/device.h: added OF_OPTIMIZE_DF
3147         * src/pic16/main.c: added compiler switch --optimize-df to enable the
3148           new data flow analysis/optimization
3149         * src/pic16/pcode.c: added (prototypes for and implementation of)
3150           dataflow analysis functions, fixed pCodeInstructions' inCond and
3151           outCond values, made RCALL a branch instruction
3152         * (pic16_unlinkpCode): keep C line if possible
3153         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
3154           C line moved if possible
3155         * (pic16_getRegFrompCodeOp): NEW, improved version of...
3156         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
3157           to use new pic16_getRegFrompCodeOp (works for more SFRs)
3158         * (pic16_BuildFlow): fixed skip instructions with label (did not start
3159           new flow)
3160         * (pic16_getJumptabpCode): NEW, needed in...
3161         * (LinkFlow): fixed handling of jumptables, calls and conditional
3162           branches
3163         * (pic16_InsertCommentAfter): NEW
3164         * (pic16_pCodeReplace): made verbose and flow preserving
3165         * (AnalyzeFlow): added call to data flow analysis
3166         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
3167         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
3168         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
3169
3170 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3171
3172         * src/SDCCast.c (decorateType): fixed bug #1105626
3173
3174 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
3175
3176         * device/include/asm/pic16/features.h,
3177         * pic18f*.h headers,
3178         * device/include/pic16/adc.h,
3179         * device/include/pic16/delay.h,
3180         * device/include/pic16/i2c.h,
3181         * device/include/pic16/malloc.h,
3182         * device/include/pic16/stdio.h,
3183         * device/include/pic16/stdlib.h,
3184         * device/include/pic16/string.h,
3185         * device/lib/pic16/libc/stdio/printf_tiny.c,
3186         * device/lib/pic16/libc/stdio/printf_small.c,
3187         * device/lib/pic16/libc/stdio/strmgpsim.c,
3188         * device/lib/pic16/libc/stdio/strmmssp.c,
3189         * device/lib/pic16/libc/stdio/strmusart.c,
3190         * device/lib/pic16/libc/stdio/vfprintf.c,
3191         * device/lib/pic16/libc/stdlib/ltoa.c,
3192         * device/lib/pic16/libc/stdlib/putchar.c,
3193         * device/lib/pic16/libc/stdlib/x_ftoa.c,
3194         * device/lib/pic16/libc/stdlib/memchrpgm.c,
3195         * device/lib/pic16/libc/stdlib/memchrram.c,
3196         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
3197         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
3198         * device/lib/pic16/libio/adc/adcbusy.c,
3199         * device/lib/pic16/libio/adc/adcread.c,
3200         * device/lib/pic16/libio/adc/adcsetch.c,
3201         * device/lib/pic16/libio/usart/ubaud.c,
3202         * device/lib/pic16/libio/usart/ubusy.c,
3203         * device/lib/pic16/libio/usart/udrdy.c,
3204         * device/lib/pic16/libio/usart/uopen.c,
3205         * device/lib/pic16/libio/usart/uputc.c,
3206         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
3207         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
3208         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
3209         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
3210         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
3211         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3212         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3213         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3214         specific keywords to double underlined form,
3215         * device/lib/pic16/libc/Makefile.rules,
3216         * device/lib/pic16/libsdcc/Makefile.rules,
3217         * device/lib/pic16/libm/Makefile,
3218         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3219         to compile with C standard set in Makefile.common
3220         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3221         rand.c and crc.c in compilation process,
3222         * device/lib/pic16/libsdcc/int/divuint.c,
3223         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3224         `c' from signed to unsigned,
3225         * device/lib/pic16/startup/crt0.c,
3226         * device/lib/pic16/startup/crt0i.c,
3227         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3228         keywords to double underlined form, bug fixes in _do_cinit function
3229         which prevented the correct initialization of the .idata segment,
3230         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3231         core to enter a infinite loop
3232         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3233
3234 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3235
3236         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3237
3238 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3239
3240         * device/include/Makefile.in: add support for hc08 subdirectory
3241         * device/include/hc08/: new subdirectory
3242         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3243         Lucas Loizaga, thanks!
3244         * device/include/hc08/mc68hc908qy.h,
3245         * device/include/hc08/mc68hc908gp32.h,
3246         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3247         their own directory. Changed internal macro names to use the compiler
3248         reserved namespace. Changed SDCC specific keywords to double
3249         underlined form.
3250         * device/include/math.h,
3251         * device/include/malloc.h,
3252         * device/include/stdarg.h,
3253         * device/include/stdbool.h
3254         * device/include/string.h,
3255         * device/include/tinibios.h,
3256         * device/include/ds400rom.h,
3257         * device/include/8051.h,
3258         * device/include/8052.h,
3259         * device/include/80c51xa.h,
3260         * device/include/at89c55.h,
3261         * device/include/at89S8252.h,
3262         * device/include/at89x51.h,
3263         * device/include/at89x52.h,
3264         * device/include/ds80c390.h,
3265         * device/include/reg764.h,
3266         * device/include/regc515c.h,
3267         * device/include/sab80515.h,
3268         * device/include/mcs51/c8051f000.h,
3269         * device/include/mcs51/c8051f018.h,
3270         * device/include/mcs51/c8051f020.h,
3271         * device/include/mcs51/c8051f040.h,
3272         * device/include/mcs51/c8051f060.h,
3273         * device/include/mcs51/c8051f120.h,
3274         * device/include/mcs51/c8051f300.h,
3275         * device/include/mcs51/c8051f310.h,
3276         * device/include/mcs51/c8051f320.h,
3277         * device/include/mcs51/c8051f330.h,
3278         * device/include/mcs51/c8051f350.h,
3279         * device/include/z180.h: Changed SDCC specific keywords to double
3280         underlined form.
3281
3282 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
3283
3284         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
3285         18F4455,
3286         * (pic16_assignConfigWordValue): disable testing of configuration
3287         register value with config mask,
3288         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
3289         function with port->fun_prefix,
3290         * (genFunction): when generating a naked interrupt function never
3291         create an absolute segment placed in interrupt vector address, place
3292         the actual interrupt function at IVA instead, when an interrupt
3293         function is generated with unspecified interrupt then do not create
3294         the absolute section,
3295         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
3296         code for generating a call to generic pointer get/put function with
3297         a call to function pic16_callGenericPointer(),
3298         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
3299         the call to the generic pointer get/put functions with prefixing the
3300         function name with port->fun_prefix,
3301         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
3302         * src/pic16/main.c (_process_pragma): prefix function with
3303         port->fun_prefix,
3304         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
3305         calling assembler, old 18Fxxxx macro is deprecated,
3306         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
3307         PC_ASMDIR in while condition,
3308         * (findInstruction): add PC_ASMDIR in while condition,
3309         * (buildCallTree): prefix main with port->fun_prefix,
3310         * (pic16_pCode2str): fixed bug that didn't emit the memory access
3311         identifier for variable with banked access in instructions BTFSS,
3312         BTFSC, BCF, BSF, BTG
3313         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
3314         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
3315         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
3316         perform optimization when enviroment variable NO_REG_OPT is set,
3317         * (insideLRBlock): NEW, return 1 if register is inside an
3318         INF_LOCALREGS block,
3319         * (RemoveRegFromLRBlock): remove a register that is completely
3320         eliminated by register optimization, but it is still left in local
3321         register store/restore in/from stack block,
3322         * (Remove2pcodes): after removing register, check to see if it
3323         should be removed from local register store/restore in/from stack
3324         block,
3325         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
3326         DUMMY_READ_VOLATILE,
3327
3328         * device/include/pic16/adc.h: minor prototype modifications and
3329         update,
3330         * device/include/pic16/malloc.h: added GPL notice various
3331         modifications,
3332         * device/include/pic16/stdint.h: NEW, standard header for ints
3333         * device/include/pic16/delay.h: NEW, header for delay functions,
3334         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
3335         delay1mtcy,
3336         * device/include/pic16/signal.h: NEW, header providing helper macros
3337         for implementing signal handlers,
3338         * device/include/pic16/stdio.h: added prototypes for functions,
3339         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
3340         prototypes for stdin and stdout, added macro PUTCHAR to
3341         automatically implement putchar function prototype,
3342         * device/include/pic16/usart.h: modified and updated USART library,
3343         * device/lib/pic16/libio/adc/,
3344         * device/lib/pic16/libio/i2c: some modifications to improve library
3345         performance,
3346         * device/lib/pic16/libc/stdio/: modifications for the new printf*
3347         family of functions,
3348         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
3349         family of functions and other sources,
3350         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
3351         of the PIC18Fxx[28] devices,
3352         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
3353         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
3354         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
3355         _do_cinit function, because the previous failed when local variables
3356         where not placed in the same memory bank,
3357         * device/lib/pic16/libsdcc/char/: various modifications to improve
3358         library performance,
3359         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
3360         information on the new functions of the c library and more...
3361
3362 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3363
3364         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
3365
3366 2005-03-26 Raphael Neider <rneider AT web.de>
3367
3368         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
3369           if condition == CARRY)
3370         * (genCmp): adapted to new genSkipc semantics
3371         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
3372           on rIfx (genCmp was broken)
3373
3374 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3375
3376         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
3377         * src/z80/main.c (_keywords[]),
3378         * src/SDCCglobal.h (struct options),
3379         * src/SDCC.y,
3380         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
3381         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
3382         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
3383         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
3384         always available in leading double underscore form. The C99 support is
3385         mostly missing, but it's a start.
3386         * support/regression/tests/bug-227710.c: fixed nonconforming use of
3387         reserved identifier "__data".
3388
3389 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
3390
3391         * src/mcs51/peeph.def: fixed bug 1170013
3392
3393 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
3394
3395         * device/include/mcs51reg.h: fixed bug 842007
3396
3397 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3398
3399         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
3400         last time.
3401
3402 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3403
3404         * src/port.h (struct PORT),
3405         * src/avr/ralloc.c (avr_assignRegisters),
3406         * src/avr/main.c,
3407         * src/ds390/ralloc.c (ds390_assignRegisters),
3408         * src/ds390/main.c,
3409         * src/hc08/ralloc.c (hc08_assignRegisters),
3410         * src/hc08/main.c,
3411         * src/mcs51/ralloc.c (mcs51_assignRegisters),
3412         * src/mcs51/main.c,
3413         * src/pic/ralloc.c (pic14_assignRegisters),
3414         * src/pic/main.c,
3415         * src/pic16/ralloc.c (pic16_assignRegisters),
3416         * src/pic16/main.c,
3417         * src/xa51/ralloc.c (xa51_assignRegisters),
3418         * src/xa51/main.c,
3419         * src/z80/ralloc.c (z80_assignRegisters),
3420         * src/z80/ralloc.h,
3421         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
3422         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
3423         * src/SDCCcse.h,
3424         * src/SDCCdflow.c (computeDataFlow),
3425         * src/SDCCdflow.h,
3426         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
3427         * src/SDCCloop.h,
3428         * src/SDCCcflow.c (*),
3429         * src/SDCCcflow.h,
3430         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
3431         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
3432         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
3433         immedDom() returning wrong block; probably fixes bug #1160833)
3434
3435 2005-03-20 Borut Razem <borut.razem AT siol.net>
3436
3437         * support/scripts/inc2h.pl: WIN32 port
3438
3439 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
3440
3441         * device/lib/makefile.in: added abs.c and labs.c
3442
3443 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
3444
3445         * device/include/stdint.h: added
3446         * device/lib/abs.c: added
3447         * device/lib/labs.c: added
3448         * device/include/stdlib.h: added abs() and labs() prototypes
3449         * device/lib/libsdcc.lib: added abs and labs
3450         * device/include/float.h,
3451         * device/lib/_fsmul.c,
3452         * device/lib/printf_fast.c,
3453         * device/lib/printf_tiny.c: updated comments
3454
3455 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3456
3457         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
3458         bug #1164313
3459
3460 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3461
3462         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
3463         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
3464
3465 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
3466
3467         * device/lib/printf_large.c: removed inline assembly for portability and
3468           readability. Use printf_fast if speed or size are more important.
3469         * src/pic16/gen.c: removed conditions around use of DEBUGpc
3470         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
3471
3472 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
3473
3474         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
3475         prevent compiler warning
3476
3477 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
3478
3479         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
3480         moved to level 0 and declared as static. Also they are explicit
3481         placed in access bank. This was necessery because some times they
3482         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
3483         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
3484         optimizations. Currently only compare to unsigned char is implemented,
3485         * src/pic16/gen.c: added fReturnIdx array,
3486         * (struct resolvedIfx) is moved to gen.h and made public,
3487         * (struct _G): added sregsAlloc and sregsAllocSet fields,
3488         * (aopForSym): added an optimization to directly store in stack of
3489         the operand of a SEND iCode,
3490         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
3491         but as registers instead (AOP_REG) using the fReturnIdx array,
3492         * (pic16_freeAsmop): remove the freed register from the
3493         _G.sregsAlloc field,
3494         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
3495         a compare of 'WREG',
3496         * (pic16_popGetTempRegCond): changed function prototype, now
3497         function takes also a bitVector argument v which holds the current
3498         set of registers that are allocated for stack access by aopForSym,
3499         registers allocated in aopForSym for accessing stack symbols are not
3500         any more part of the functions usedRegs field,
3501         * (genCall): some times aopOp is called for a stack variable to be
3502         send, aopForSym might perform the push, if this is true make sure
3503         that genCall doesn't push the variable twice by testing _G.resDirect,
3504         * (genFunction): changed testing for unspecified interrupt number
3505         from 256 to INTNO_UNSPEC,
3506         * modified selection scheme of frame pointer generation. Previously
3507         if function did use local registers a frame pointer was generated,
3508         now a frame pointer is generated only if function has arguments
3509         (that need PLUSW2 register access), or has stack arguments, or the
3510         compiler is not instructed to omit the frame pointer,
3511         * (genEndFunction): before restoring local registers that were saved
3512         in the function preamble, also restore the registers that *might*
3513         have been allocated for stack access,
3514         * (genRet): removed some old comments,
3515         * (genCmp, the active (RN's) version): added a call to the
3516         pic16_genCmp_special function to perform the compare with a more
3517         robust and optimized way,
3518         * (genInline): a feature has been added in inline code generation,
3519         which allows a wildcard variable substitution when writing inline
3520         assembly. Code is incomplete and experimental therefore undocumented,
3521         * (genCast): changed order of aopOp for result and right to allow
3522         aopForSym to directly load the result if possible,
3523         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
3524         perform an optimized compare on some selected special occasions,
3525         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
3526         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
3527         generate an IVT any more,
3528         * src/pic16/main.c (pic16_optionsTable): added command line option
3529         --optimize-cmp,
3530         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
3531         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
3532         macros,
3533         * src/pic16/NOTES: Raphael Neider added in list of active developers
3534         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
3535         jumptable_end to prevent bug #,
3536         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
3537         inCond and outCond fields,
3538         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
3539         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
3540         turn off register spilling,
3541         * (packRegsForOneUse): synced with other ports' versions although it
3542         is not used currently,
3543         * (pic16_packRegisters): added an optimization while reading
3544         structure bitfields, some registers may be saved (malloc code is
3545         decreased by 80 bytes)
3546
3547 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
3548
3549         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
3550         left is a bitfield, if yes, then don't optimize assignment. Perhaps
3551         this can be optimized more?
3552
3553 2005-03-10 Raphael Neider <rneider AT web.de>
3554
3555         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
3556           genNearPointerGet): (hopefully) fixed access to bitfields via
3557           pointers (p->bitN = x; and x = p->bitN; failed)
3558
3559 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
3560
3561         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
3562
3563 2005-03-09 Raphael Neider <rneider AT web.de>
3564
3565         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
3566
3567 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
3568
3569         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
3570         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
3571           (regTypeNum): set REG_BIT type if necessary
3572         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
3573         * support/regression/tests/critical.c: check bug 1144613
3574
3575 2005-03-02 Raphael Neider <rneider AT web.de>
3576
3577         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
3578
3579 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3580
3581         * src/avr/ralloc.c (serialRegAssign),
3582         * src/ds390/ralloc.c (serialRegAssign),
3583         * src/hc08/ralloc.c (serialRegAssign),
3584         * src/mcs51/ralloc.c (serialRegAssign),
3585         * src/pic/ralloc.c (serialRegAssign),
3586         * src/pic16/ralloc.c (serialRegAssign),
3587         * src/xa51/ralloc.c (serialRegAssign),
3588         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
3589
3590 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
3591
3592         * src/SDCCast.c (decorateType): fixed bug 1124787
3593
3594 2005-02-20 Hubert Sack <sack AT digiplan.de>
3595         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3596
3597         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
3598         patch #1121755
3599
3600 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3601
3602         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
3603         to keep the correct label reference count when adding/removing references
3604         to labels. A peephole file using this is appended to patch #1144962.
3605
3606 2005-02-14 Raphael Neider <rneider AT web.de>
3607
3608         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
3609         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
3610         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
3611           retrievals of result operand's value on assignment
3612
3613 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
3614
3615         * device/include/pic16/string.h: modified prototype for memccpy()
3616         to memccpy(void *, void *, char, size_t)
3617         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
3618         check whether to omit frame pointer or not,
3619         * (genInline): convert all occurences of "\n" to LF in inline
3620         assembler blocks, this helps formatting the inline text,
3621         * (pic16_loadFSR0): modified prototype,
3622         * (genNearPointerGet, genNearPointerSet): reorganization of code,
3623         removed some 8051 legacy code,
3624         * (genPackBits): enabled handling bitfields exceeding one byte in size,
3625         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
3626         before allocating temporary registers in functions,
3627
3628 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3629
3630         * support/regression/tests/bitvars.c: corrected the "fix"
3631
3632 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3633
3634         * support/regression/tests/bitvars.c,
3635         * support/regression/tests/bitwise.c,
3636         * support/regression/tests/rotate.c: "fixed" problems on Alpha
3637
3638 2005-02-10 Raphael Neider <rneider AT web.de>
3639
3640         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3641           different size for Alpha
3642         * src/pic16/gen.c (genCmpEq) : improved compare with 0
3643
3644 2005-02-09 Raphael Neider <rneider AT web.de>
3645
3646         * src/SDCC.lex(doPragma) : save and restore warning options as well
3647           (also added new stack plus clone- and copyAndFreeSDCCERRG())
3648         * have #pragma less_pedantic set the errorlevel to WARNING
3649           (fixes #1117001)
3650         * (cloneOptimize) : fixed wrong malloc's size
3651         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3652           facilitate correct handling of #pragma (save|restore)
3653
3654 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3655
3656         * src/mcs51/gen.c: removed non-standard C nameless struct/union
3657
3658 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3659
3660         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3661
3662 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3663
3664         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3665
3666 2005-02-02 Raphael Neider <rneider AT web.de>
3667
3668         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3669         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3670         * (pic16_storeForReturn): fixed to allow returning function pointers
3671         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3672         * device/include/pic16/{stddef.h,stdbool.h}: added
3673
3674 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3675
3676         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3677
3678 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3679
3680         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3681         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3682          appeared to be required
3683
3684 2005-01-31 Borut Razem <borut.razem AT siol.net>
3685
3686         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3687           include/mcs51 and include/z80 directories to the package
3688
3689 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3690
3691         * src/hc08/gen.c (genFunction): fixed bug #1112752
3692
3693 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3694
3695         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
3696
3697 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3698
3699         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
3700
3701 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
3702
3703         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
3704
3705 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
3706
3707         * device/include/c8051fxxx.h: removed these 6 files
3708         * device/include/mcs51/c8051fxxx.h: added these 11 new files
3709
3710 2005-01-26 Raphael Neider <rneider AT web.de>
3711
3712         * src/pic16/gen.c (genAssign): fixed assignment from longs
3713           in codespace (were cut to three bytes)
3714         * (genDummyRead): implemented (except for CODESPACE...),
3715           fixed bug #1108575
3716         * src/pic16/glue.c (emitStatistics): beautified
3717         * device/lib/pic16/libm/Makefile: added include path
3718
3719 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3720
3721         * src/z80/gen.c (aopPut): fixed bug #1103902
3722
3723 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3724
3725         * device/lib/expf.c: fixed bug #1095792
3726
3727 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3728
3729         * device/lib/pic16/libm: added Math library sources
3730
3731 2005-01-24 Raphael Neider <rneider AT web.de>
3732
3733         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3734           to enable upcast to pCodeOpReg2 (there is no type tag to
3735           differenciate the two and pic16_popGet2p cast into PCOR2)
3736         * src/pic16/main.c (_process_pragma): fixed another malloc bug
3737           (sizeof(sectNames) changed to sizeof(sectName))
3738           Both patches fix segfaults under MinGW.
3739
3740 2005-01-23 Raphael Neider <rneider AT web.de>
3741
3742         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3743           Safe_[mc]?alloc()'ed variables
3744         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3745           of (byte sized) temporaries (assign them to WREG for now)
3746         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3747           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3748           this might fix SIGSEGVs on MinGW...
3749         * src/SDCCopt.c (killDeadCode): restored original behaviour
3750           (volatile operands might get thrown away though)
3751
3752 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3753
3754         * src/pic16/gen.c: fixed bug #1106975,
3755         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3756         pointer update, INTCON is saved, global interrupts are disabled and
3757         restored after updateing TOS.
3758         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3759         * added function attribute 'shadowregs' to take advantage of shadow
3760         registers,
3761         * added function attribute 'wparam' as an alternative to the wparam
3762         pragma,
3763         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3764         user declares a non-ISR function as 'shadowregs',
3765         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3766
3767 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3768
3769         * .version: bumped version number to 2.4.8
3770         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3771         pic16 port,
3772         * device/lib/pic16/libio/i2c/: I2C module support library,
3773         * device/include/pic16/i2c.h: I2C support library header,
3774         * device/lib/pic16/libc/stdio/: standard IO support sources,
3775         * (printf_small.c): printf_small() source, supports float print,
3776         * (printf_tiny.c): printf_tiny() source, does not support floats,
3777         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3778         enable global optimizations for entire library source, other
3779         Makefiles in the source tree are also modified to reflect this,
3780         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3781         function,
3782         * doc/sdccman.lyx: updated to reflect new changes,
3783         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3784         sym->onStack if-case,
3785         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3786         sbit, idata, _idata, xdata, _xdata,
3787         * added pragma library, to link an external library, (see doc),
3788         * removed command line options, --pomit-config-words, --pomit-ivt,
3789         --pleave-reset-vector,
3790         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3791         when calling assembler to reflect memory model used, also define
3792         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3793         reflect stack model used,
3794         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3795         on stack return NULL,
3796
3797 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3798
3799         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3800           of the operands is volatile. Fixes #1020220
3801
3802 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3803
3804         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3805         * (OptimizeRegUsage): make sure that there is really no other flow where
3806           the first pCode is used
3807
3808 2005-01-22 Raphael Neider <rneider AT web.de>
3809
3810         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3811           to fix #1106967 (pCode->seq are not set up correctly)
3812
3813 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3814
3815         * src/SDCCglue.c (glue): make sure code area is declared before the
3816         static initialization area.
3817
3818 2005-01-21 Raphael Neider <rneider AT web.de>
3819
3820         * device/lib/Makefile.in: fixed test for pic16 install dir
3821         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3822           optimizations
3823         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3824           added --optimize-goto compiler switch and pragma wparam documentation
3825         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3826         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3827           and PRODH closing bug #1071770 (peephole optimizer)
3828
3829 2005-01-19 Raphael Neider <rneider AT web.de>
3830
3831         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3832           cmdLine buffers (used when calling sdcpp...) are large enough
3833           (MAX_PATH=256 truncates arguments leading to system halts when
3834           used in MinGW...)
3835         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3836         * (genUminus): rewritten to for efficiency
3837         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3838           used uninitialized in some cases)
3839         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3840           copy the third byte from the int -- now assumes 0x80 (data memory)
3841         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3842           operands (genAddLit expects the iCode's operands to swapped as
3843           well), fixed leftover bytes (crashed for short left operands)
3844         * (pic16_genMinusDec): performance improvements, removed false
3845           PIC14 emitSKPNCs
3846         * (pic16_genMinus): fixed to cope with differently sized operands
3847         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3848           for --obanksel > 1
3849         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3850         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3851           new banksel optimization
3852         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3853           analysis for temporary registers (segfaults...)
3854         * src/pic16/peeph.def: added rule
3855
3856 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3857
3858         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3859         which converts a float number to its ASCII representation
3860         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3861         functions to convert the fractional and integer part of a float to ASCII,
3862         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3863         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3864         ram
3865         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3866         _STATMEM macros,
3867         * device/include/pic16/adc.h: added GPL info,
3868         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3869         a pCodeOp as tested operand,
3870         * (genNearPointerGet): optimized bit testing, does not use
3871         intermediate register for bit value, test directly instead with
3872         BTFSS, BTFSC, works only for single bits,
3873         * (genpic16Code): dump the name of the iCode in the asm,
3874         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3875         renamed to pic16_decodeOp,
3876         * (serialRegAssign): do not allocate a temporary register for iCode
3877         sequences that test a single bit for 1/0
3878
3879 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3880
3881         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3882         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3883         access stack and frame pointers. They are initially assigned to
3884         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3885         accessing SFRs. Updated all occurences of modification of stack or
3886         frame pointer in gen.c and pcode.c,
3887         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3888         assigning of a literal value to pointers,
3889         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3890         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3891         selected
3892
3893 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3894
3895         * doc/sdccman.lyx: update documentation about stack pragma, added
3896         some info for stack memory models
3897
3898 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3899
3900         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3901
3902 2005-01-08 Raphael Neider <rneider AT web.de>
3903
3904         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3905           udata sections to fix bug #1097823
3906
3907 2005-01-05 Raphael Neider <rneider AT web.de>
3908
3909         * src/pic16/gen.c (genGenericShift): added handling of differently
3910           sized left operand and result
3911
3912 2005-01-04 Raphael Neider <rneider AT web.de>
3913
3914         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3915         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3916           to hold the condition bit)
3917         * added new version of genCmp (old code available via #define)
3918         * added new version of genShiftLeft/genShiftRight in a generic
3919           way, now supports shifting by negative values
3920         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3921           shiftCount (expected by genGenericShift)
3922         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3923         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3924           dump
3925         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3926           is an invalid literal too...)
3927
3928 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3929
3930         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3931         from Raphael Neider,
3932         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3933         for 8-bit literals. This fixes some literal operands which are sign
3934         extended to 16-bits ints when instruction needs only 8-bits.
3935
3936 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3937
3938         * device/lib/logf.c: added mcs51 assembly version
3939         * device/lib/expf.c: added mcs51 assembly version
3940         * device/lib/_logexpf.c: new shared asm code for expf and logf
3941         * device/include/math.h: add defines for assembly math library
3942         * device/lib/Makefile.in: build new _logexpf.c
3943         * device/lib/libfloat.lib: use new _logexpf.c
3944
3945 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3946
3947         * src/pic/device.c
3948         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3949           device types which have less than 0x7f registers.
3950
3951 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3952
3953         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3954
3955 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3956
3957         * device/lib/printf_fast.c: only build on supported arch.
3958         * device/lib/printf_tiny.c: only build on supported arch.
3959         * device/lib/printf_fast_f.c: only build if asm float lib
3960         * device/lib/_fsget1arg.c: only build if asm float lib
3961         * device/lib/_fsget2args.c: only build if asm float lib
3962         * device/lib/_fsnormalize.c: only build if asm float lib
3963         * device/lib/_fsreturnval.c: only build if asm float lib
3964         * device/lib/_fsrshift.c: only build if asm float lib
3965         * device/lib/_fsswapargs.c: only build if asm float lib
3966         * device/include/stdio.h: don't provide print_fast,
3967           print_fast_f, print_tiny prototypes if --xstack used
3968
3969 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3970
3971         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3972         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3973           to the SOURCES
3974
3975 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3976
3977         * device/lib/printf_fast_f.c: same as printf_fast, but
3978           with floating point enabled
3979         * device/lib/printf_fast.c: minor tweaks
3980         * device/include/stdio.h: add printf_fast_f
3981
3982 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3983
3984         * src/SDCCmain.c: make --float-reent default for mcs51
3985         * device/lib/_fsadd.c: added mcs51 assembly version
3986         * device/lib/_fssub.c: added mcs51 assembly version
3987         * device/lib/_fsmul.c: added mcs51 assembly version
3988         * device/lib/_fsdiv.c: added mcs51 assembly version
3989         * device/lib/_fseq.c: added mcs51 assembly version
3990         * device/lib/_fsneq.c: added mcs51 assembly version
3991         * device/lib/_fsgt.c: added mcs51 assembly version
3992         * device/lib/_fslt.c: added mcs51 assembly version
3993         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3994         * device/lib/Makefile.in: add _fscmp to build
3995         * device/lib/libfloat.lib: add _fscmp to build
3996
3997 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3998
3999         * device/lib/_fs2slong.c: added mcs51 assembly version
4000         * device/lib/_fs2sint.c: added mcs51 assembly version
4001         * device/lib/_fs2schar.c: added mcs51 assembly version
4002         * device/lib/_fs2ulong.c: added mcs51 assembly version
4003         * device/lib/_fs2uint.c: added mcs51 assembly version
4004         * device/lib/_fs2uchar.c: added mcs51 assembly version
4005         * device/lib/_slong2fs.c: added mcs51 assembly version
4006         * device/lib/_sint2fs.c: added mcs51 assembly version
4007         * device/lib/_schar2fs.c: added mcs51 assembly version
4008         * device/lib/_ulong2fs.c: added mcs51 assembly version
4009         * device/lib/_uint2fs.c: added mcs51 assembly version
4010         * device/lib/_uchar2fs.c: added mcs51 assembly version
4011         * device/include/float.h: added #define to select asm vs c
4012
4013 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
4014
4015         * device/lib/printf_fast.c: improvements to float output
4016         * device/include/float.h: add defines for assembly float library
4017         * device/lib/_fsget1arg.c: receive 1 float arg
4018         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
4019         * device/lib/_fsnormalize.c: normalize a float
4020         * device/lib/_fsreturnval.c: return float, various helper routines
4021         * device/lib/_fsrshift.c: right shift a float's mantissa
4022         * device/lib/_fsswapargs.c: swap 2 floats
4023         * device/lib/Makefile.in: build these 6 new files for mcs51
4024         * device/lib/libfloat.lib: add these 6 files to the library
4025
4026 2004-12-26 Borut Razem <borut.razem AT siol.net>
4027
4028         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
4029           built by gcc 3.4.2
4030
4031 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
4032
4033         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
4034           and fully reentrant and register bank neutral.
4035         * device/lib/printf_fast.c: added float (not enabled by default),
4036           added compact/slower integer (also not enabled by default),
4037           improved size/speed of fast integer code, other minor changes
4038         * device/include/stdio.h, device/lib/Makefile.in,
4039           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
4040
4041 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
4042
4043         * src/pic16/pcode.c: declaring variables other than at the start of a
4044           block is not supported in C by VC6.
4045
4046 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
4047
4048         * applied a previous patch from Raphael Neider that wasn't included
4049         in the previous commits, which fixes infinite loops within jumptable
4050         improvements,
4051         * made some fixes that previous patches introduced
4052
4053 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
4054
4055         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
4056         that fixes an issue with AOP_PCODE asmop's offset,
4057         * (pic16_popCopyReg): update instance field too,
4058         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
4059         function of pic port,
4060         * (genCmp, genAnd, genAssign),
4061         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
4062
4063 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
4064
4065         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
4066         variables initial values to idata section,
4067         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
4068         variables in some functions. This utilizes parmBytes field of iCode
4069         structure to hold the offset of the variable in stack. (might be
4070         able to use the stack field too?)
4071         * applied patch from Raphael Neider # ### , # ###
4072         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
4073         variable initial values in idata section,
4074         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
4075         for static variables with initial value
4076         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
4077         applied fix in while loop from Raphael Neider.
4078
4079 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
4080
4081         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
4082         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
4083         * src/ds390/ralloc.c (serialRegAssign): spill bits
4084         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
4085         * support/Util/SDCCerr.c,
4086         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
4087         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
4088         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
4089
4090 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
4091
4092         * device/include/sdcc-lib.h: inserted LGPL, added includes
4093           asm/ds390/features.h and asm/mcs51/features.h
4094         * device/include/asm/default/features.h,
4095         * device/include/asm/gbz80/features.h,
4096         * device/include/asm/z80/features.h: added empty _AUTOMEM
4097           and _STATMEM
4098         * device/include/asm/ds390/features.h,
4099         * device/include/asm/mcs51/features.h: added files with defines for
4100           _AUTOMEM and _STATMEM indicating automatic and static storage class
4101         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
4102         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
4103         * src/SDCCicode.c (geniCodeCast),
4104         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
4105         * src/SDCCloop.c (loopInduction): removed unused variable lr
4106         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
4107           to convertToFcall to include char modulo (RFE 1065037), added check
4108           if left operand is unsigned and use abs of literal value
4109         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
4110           as it doesn't work after conversion from peephole.def to peephole.rul
4111         * src/mcs51/gen.c (toBoolean): added check for size,
4112           (genModOneByte): optimized code for signed char modulo a literal
4113           power of 2 (thanks to Hubert Sack),
4114           (genRRC): removed unnecessary "clr c",
4115           (genRLC): replaced "add a,acc" with cheaper "rlc a"
4116         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
4117           jump optimization,
4118           swapped rules 256.c and 256.d,
4119           extended 256.d by using new multiple checks (thanks Erik),
4120           added rules 256.e and 256.f,
4121           updated rule 261.a and 261.b to new generated code
4122         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
4123
4124 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4125
4126         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
4127           induction related bugs, including first part of bug #1074377
4128
4129 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
4130
4131         * applied patch from bug-report #1076292,
4132         * applied patches for genAnd and Goto-optimizations for Raphael
4133         Neider,
4134         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
4135         dump a less iCode information,
4136         * src/pic16/device.h (pic16_options_t): added field debgen,
4137         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
4138         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
4139         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
4140         puclic,
4141         * (various functions): added macros FENTRY and FENTRY2 to functions,
4142         to emit function prologue,
4143         * (various functions): fixed indentation,
4144         * (genNearPointerGet): fixed loading of FSR0,
4145         * (genPackBits): applied patch from Raphael Neider to fix updating
4146         of FSR0 and touching only the modified bits,
4147         * src/pic16/genarith.c (various functions): added macros FENTRY to
4148         emit function prologue in comments,
4149         * src/pic16/pcode.h: added functions debugf2, debugf3,
4150         * src/pic16/ralloc.c: partial fix for packForPush caused
4151         segmentation fault,
4152
4153 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4154
4155         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
4156           <stsp AT users.sourceforge.net> with reversed byte order
4157         * support/regression/tests/rotate.c: added (ds390 skips some tests)
4158
4159 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4160
4161         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
4162           bug #1074377
4163         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
4164         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
4165
4166 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4167
4168         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
4169
4170 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4171
4172         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
4173           conditions,
4174           (setFromConditionArgs): friendly operand parser for peephole rules,
4175           (operandBaseName, operandsNotRelated): new peephole condition
4176           "operandsNotRelated" -- similar to "operandsNotSame", but takes
4177           architecture specific register naming into account, handles n-way
4178           comparisons, and supports quoted literals
4179         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
4180
4181 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4182
4183         * src/mcs51/peeph.def: fixed bug #1076940
4184
4185 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4186
4187         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
4188
4189 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4190
4191         Adding support for replacing ljmps with sjmps in jumptables
4192         generated for switch statements. For now you need to set the
4193         environment variable SDCC_SJMP_JUMPTABLE to enable this.
4194         Now 4 algorithms for mcs51 jumptable generation are used:
4195         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
4196         addresses loaded pc-relative for up to 112 cases and stack-pushing
4197         target addresses loaded with offset from dptr for up to 256 cases.
4198
4199         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
4200         * src/mcs51/main.c: adapted constants for switch table generation
4201         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
4202
4203 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
4204
4205         * device/lib/printf_large.c (_print_format): fixed bug 1073386
4206         * support/regression/tests/bug1057979.c: added test for bug 1073386
4207
4208 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4209
4210         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
4211         compilers
4212
4213 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4214
4215         * src/pic16/device.h,
4216         * src/pic16/genarith.c,
4217         * src/pic16/glue.c,
4218         * src/pic16/main.c,
4219         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4220
4221 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4222
4223         Large cummulative patch for pic16 port.
4224         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4225         to call when a stack overflow occurs,
4226         * (malloc.h): added CVS Id tag,
4227         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4228         variable,
4229         * added libc directory. The current version of LibC contains string
4230         functions, ctype functions and macros and some functions of the
4231         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4232         be extensively tested in the future. Standard disclaimer here.
4233         Library is not automatically build yet. But one can build it by
4234         invoking 'make' inside the libc directory.
4235         * added ADC library under libio. Preliminary version yet.
4236
4237         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4238         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4239         aopForRemat() now and not by pic16_aopOp(),
4240         * (pic16_popGetTempReg): removed warning messgae when allocating
4241         temporary registers, its a buggy feature and will be removed,
4242         * (pic16_popGet): set register instance field in AOP_CRY,
4243         * (pic16_outBitC): fixed for results in size greater than 1,
4244         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4245         * (pic16_storeForReturn): optimized return of 0,
4246         * (genCmp): experimental code for new genCmp which uses PIC18's
4247         special compare&skip instructions. Initial tests fail some times
4248         with variables grater than 1 byte in size, so new code is disabled,
4249         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
4250         a single bit,
4251         * (genCast): began a fix to optimize the casting of a bit to another
4252         bit, now assigning a bitfield to another bitfield will fail, sorry,
4253         * src/pic16/main.c: disabled the use of lr-support feature,
4254         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
4255         * added some function prototypes, added function _debugf prototype,
4256         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
4257         bits with offset (case PO_GPR_BIT),
4258         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
4259         command line,
4260         * (isBankInstruction): modified to return 0 for no banking instruction,
4261         and 1 for banking instruction,
4262         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
4263         caused stop processing pCodes after a inline assembly block,
4264         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
4265         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
4266         registers when it shouldn't,
4267         * src/pic16/ralloc.c (allocReg): add preliminary support for
4268         supporting a limited set of temporary registers,
4269
4270 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4271
4272         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
4273           genDataPointerSet): ensure assignments always copy in MSB to LSB
4274           order,
4275           (loadRegFromAop): recognize CLRH optimization,
4276           (genFunction): optimize RECEIVE iCodes in reentrant functions
4277
4278 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4279
4280         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
4281           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
4282           selected.
4283         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
4284         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
4285           contiguous with data
4286
4287 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4288
4289         * device/lib/_gptrget.c (_gptrget),
4290         * device/lib/_gptrgetc.c (_gptrgetc),
4291         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
4292           instead of sjmp to ret
4293         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
4294           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
4295
4296 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
4297
4298         * .version: bumped version to 2.4.7
4299         * device/lib/_gptrget.c (_gptrget): is now _naked
4300         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
4301         * device/lib/_gptrput.c (_gptrput): is now _naked
4302         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
4303           (createFunction): fixed xstack
4304         * src/SDCCglue.c (emitMaps): set allocation required for bit area
4305         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
4306           or bit either,
4307           (geniCodeCritical): store original interrupt state in an iTemp bit
4308           var unless stack-auto
4309         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
4310         * src/SDCCmain.c (setIncludePath): added include/target to search path
4311         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
4312         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
4313           prototype,
4314           (processFuncArgs): put bit vars in bit area
4315         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
4316           unsaveRBank): fixed xstack,
4317           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
4318           (genFunction, genEndFunction): fixed xstack,
4319           (genAssign): optimization don't walk backwards through mem
4320         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
4321         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
4322         * support/regression/Makefile: also make library (for stack-auto) when
4323           making "all" and added "test-mcs51-xstack-auto"
4324         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
4325         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
4326         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
4327         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
4328         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
4329           make-library by MAKE_LIBRARY
4330         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
4331           regression tests for xstack
4332         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
4333         * support/regression/tests/critical.c: test for critical on mcs51
4334
4335 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4336
4337         * support/regression/ports/ucz80/spec.mk: use include and lib files from
4338           built version of sdcc instead of installed version
4339
4340 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
4341
4342         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
4343         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
4344           vprintf.c now
4345         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
4346         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
4347           WARNING: remove device/lib/build/z80/printf.o by hand when
4348           updating from previous build!
4349         * device/lib/z80/printf.c: updated comment
4350         * support/regression/tests/bug1057979.c: test all ports now
4351         * support/regression/tests/bug1065458.c: file added
4352
4353 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4354
4355         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
4356           *_start and *_end symbols for static functions
4357
4358 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
4359
4360         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
4361           and search crt0.o in all library paths,
4362           (setIncludePath): proper handling of --nostdinc,
4363           (setLibPath): proper handling of --nostdlib
4364         * support/regression/Makefile,
4365         * support/regression/ports/ds390/spec.mk,
4366         * support/regression/ports/gbz80/spec.mk,
4367         * support/regression/ports/hc08/spec.mk,
4368         * support/regression/ports/mcs51/spec.mk,
4369         * support/regression/ports/mcs51-large/spec.mk,
4370         * support/regression/ports/mcs51-stack-auto/spec.mk,
4371         * support/regression/ports/z80/spec.mk: use include and lib files from
4372           built version of sdcc instead of installed version
4373         * doc/sdccman.lyx: fixed typo in --nostdinc
4374
4375 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
4376
4377         * src/pic/pcode.c,
4378         * src/pic/device.c,
4379         * src/pic/ralloc.c,
4380         * src/pic/gen.c : added support to generate code for struct bit fields.
4381
4382 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
4383
4384         * as/xa51/xa_version.h,
4385         * device/include/errno.h,
4386         * device/include/regc515c.h,
4387         * device/lib/_itoa.c,
4388         * device/lib/_ltoa.c,
4389         * device/lib/ser_ir_cts_rts.c,
4390         * sim/ucsim/xa.src/glob.cc,
4391         * sim/ucsim/xa.src/inst_gen.cc,
4392         * sim/ucsim/xa.src/xa_bit.cc,
4393         * sim/ucsim/xa.src/xa_sfr.cc,
4394         * sim/ucsim/z80.src/inst_dd.cc,
4395         * sim/ucsim/z80.src/inst_fdcb.cc,
4396         * support/scripts/keil2sdcc.pl,
4397         * src/pic16/pic16.dsp,
4398         * src/pic16/pic16a.dsp: corrected cvs line endings
4399         * device/lib/printf_large.c: fixed bug 1057979
4400         * src/pic16/gen.c: fixed non-C standard code
4401         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
4402         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
4403         * support/regression/ports/mcs51/support.c: reload T1 asap
4404         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
4405           pdata use and clear idata startup behaviour
4406         * support/regression/tests/bug1057979.c: added
4407
4408 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
4409
4410         * device/examples/ds390/ow390/ad26.h,
4411         * device/examples/ds390/ow390/cnt1d.h,
4412         * device/examples/ds390/ow390/crcutil.c,
4413         * device/examples/ds390/ow390/ownet.h,
4414         * device/examples/ds390/ow390/owsesu.c,
4415         * device/examples/ds390/ow390/swt12.h,
4416         * device/examples/ds390/ow390/swtoper.c,
4417         * device/examples/ds390/ow390/temp10.h,
4418         * device/examples/ds390/ow390/thermodl.c,
4419         * device/examples/ds390/tinitalk/tinitalk.dsp,
4420         * device/examples/ds390/tinitalk/tinitalk.dsw,
4421         * device/examples/mcs51/clock/hw.h,
4422         * device/examples/mcs51/simple2/go.bat,
4423         * device/examples/serialcomm/windows/serial.h,
4424         * device/examples/xa51/dummy.c,
4425         * device/examples/xa51/hello.c,
4426         * device/include/80c51xa.h,
4427         * device/include/at89x051.h: corrected cvs line endings
4428
4429 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
4430
4431         * src/pic16/main.c (options): added command line --gstack, to trace
4432         stack over/under flows,
4433         * added pragma 'wparam' to allow passing first byte of function
4434         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
4435         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
4436         call to __gstack_test function and sets up the symbol as extern,
4437         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
4438         * popaop): added call to pic16_testStackOverflow,
4439         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
4440         wparamList list,
4441         * (genCall, genPcall): now all parameters are passed via stack
4442         except in functions that are pass to wparam pragma in which WREG is
4443         used too,
4444         * (genPcall): REENTRANT flag is checked to see if variable prototype
4445         contains reentrant keyword, don't call a non-reentrant function, via
4446         a reentrant function pointer or vice versa, functions are never
4447         passed via WREG,
4448         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
4449         D.Winkler,
4450         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
4451         SIGSEGV when accessing a NULL register stucture,
4452         * (pic16_printGPointerType): modified to handle UPPER modifier for
4453         function initializers, changed prototype of function to simpler one,
4454         * (pic16_printIvalFuncPtr): check to see if function is already
4455         added in externs list,
4456         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
4457         optimized a move from W to SFR with a move to the same register
4458         later after a CALL,
4459         * device/lib/pic16/debug: NEW directory, contains debug features
4460         which are enabled when linking with libdebug.lib, currently command
4461         line option --gstack enables stack pointer tracing for over/under
4462         flow, corresponding sources are in debug/gstack
4463
4464 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
4465
4466         * doc/sdccman.lyx: updated SDCC version,
4467         * (PIC16 port): update list of command line options,
4468         * src/pic16/device.h (structure pic16_options_t): added field gstack
4469         to enable stack overflow tracing on push/pops,
4470         * src/pic16/device.c (statistics structure): added statistics
4471         structure,
4472         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
4473         pic16_dump_int_registers): increase statistics counters for each
4474         * variable which is encountered
4475         * (pic16_dump_usection): emit each .udata variable to its own udata
4476         section,
4477         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
4478         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
4479         parameters via stack, otherwise use old scheme,
4480         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
4481         assembler output file,
4482         * src/pic16/main.c: added command line options --gstack to enable
4483         push/pop tracing for stack overflow,
4484         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
4485         instructions): added size of each instruction,
4486         * (pic16_countInstruction): estimate size of instructions in
4487         the_pFile list, inline assembly blocks are not counted,
4488         * (pic16_FixRegisterBanking): trace previous register usage, when
4489         banksel optimizations is greater than 0, don't emit a redudant
4490         banksel directive,
4491
4492 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
4493
4494         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
4495         * src/pic16/ralloc.c : applied same fix for pic16.
4496         * src/pic/gen.c : tidied it up a little.
4497
4498 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4499
4500         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
4501         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
4502
4503 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4504
4505         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
4506
4507 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4508
4509         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
4510         non-reentrant function __modsint in the interrupt function (thus
4511         corrupting math operations during serial I/O)
4512         * device/lib/ser_ir.c: as above, changed buffersize
4513         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
4514         256.c,d for zeroing
4515         * doc/Makefile: added option -t for rsync
4516
4517 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4518
4519         * src/SDCCast.h (struct ast),
4520         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
4521
4522 2004-10-20 Borut Razem <borut.razem AT siol.net>
4523
4524         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
4525         package
4526
4527 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
4528
4529         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
4530         makefile targets,
4531         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
4532         support functions to replace long sequences of MOVFF's from access
4533         bank registers to stack and vice versa,
4534         * src/pic16/device.h: added new field opt_flags, where optimization
4535         flags can be set to enable certain features,
4536         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
4537         * pBlock, (genFunction, genEndFunction): surroung loop for
4538         saving/loading used registers in stack with PC_INFO pCodes,
4539         INF_LREGS. Code in between can then be optimized by pCode optimizer
4540         to support function calls,
4541         * (genDataPointerSet): fixed bug which loaded float fields in
4542         structures with corrupt data,
4543         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
4544         in a standard way debug info on stderr. Feature used for developing
4545         and debugging only,
4546         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
4547         obsolete chunks of code,
4548         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
4549         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
4550         * pic16/src/pcode.c (pic16_newpCodeInfo,
4551         * (pic16_newpCodeOpLocalRegs),
4552         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
4553         feature,
4554         * (pic16_pCodeConstString): printing of the initial value of a
4555         symbol as a comment is inhibited since parsing was already done by
4556         copyStr and output is corrupt,
4557         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
4558
4559 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4560
4561         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
4562
4563 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
4564
4565         * as/mcs51/lkarea.c: removed old K&R style,
4566           (lnksect): changed check on boundary error,
4567           (lnksect2): changed check on boundary error,
4568           (lnksect2): extend XSTK to end of page if size = 1
4569         * as/mcs51/lkmain.c: removed old K&R style,
4570           (Areas51): create l_IRAM symbol
4571         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
4572         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
4573           model-mcs51-stack-auto, added model-mcs51-xstack-auto
4574         * device/lib/_mullong.c: added version to be compiled with xstack
4575         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
4576         * device/lib/mcs51/crtxclear.asm: clear pdata as well
4577         * device/lib/mcs51/crtxstack.asm: fixed comment
4578         * src/SDCCglue.c: maxInterrupts defaults to 0,
4579           (emitMaps): added pdata,
4580           (createInterruptVect): (re)moved default,
4581           (glue): added pdata,
4582           (glue): moved __start__xstack to XSTK with default size 1
4583         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
4584           and options.float_rent when options.stackAuto is set,
4585           (linkEdit): only write XDATA_NAME if provided on command line
4586         * src/SDCCmem.h,
4587         * src/SDCCmem.c: added pdata
4588         * src/port.h: added pdata_name to PORT
4589         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
4590           (saveRegisters, unsaveRegisters): removed usage of B,
4591           (genMinus): fixed accumulator clash,
4592           (genJumpTab): added comment, this needs another look
4593         * src/mcs51/gen.c: added check for "B in use" paranoia,
4594           added pushB() and popB()
4595         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
4596           chance
4597         * src/avr/main.c,
4598         * src/ds390/main.c,
4599         * src/hc08/main.c,
4600         * src/mcs51/main.c,
4601         * src/pic/main.c,
4602         * src/pic16/main.c,
4603         * src/xa51/main.c,
4604         * src/z80/main.c: (reset_regparms) made void parameter explicit and
4605           added PSEG (PAG,XDATA) or NULL to port specifier
4606         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
4607         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
4608           (_mcs51_genInitStartup): removed __start__xstack equ,
4609           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
4610         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
4611         * src/z80/gen.c (_rleAppend): fixed warnings
4612         * support/regression/tests/zeropad.c: added pdata test
4613         * .version: bumped to 2.4.6
4614
4615 2004-10-17 Borut Razem <borut.razem AT siol.net>
4616
4617         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
4618         as a part of nightly build
4619
4620 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
4621
4622         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
4623         WREG holds the first byte function parameters,
4624         * (aopForSym): take special case for symbols which are in FARSPACE
4625         but in CODESPACE too,
4626         * (assignResultValue): modified to take into account _G.useWreg,
4627         * (genCall): don't use wreg for parameter passing when function is
4628         declared as reentrant, too, added optimization INCF to stack
4629         pointer when stack parameter count is 1,
4630         * (genFunction, genEndFunction): refurnished and fixed to not using
4631         wreg for passing parameters when function has varargs or is
4632         reentrant, fixed bug with symbol name compare for generating
4633         functions in absolute address,
4634         * (pic16_storeForReturn): refurnished,
4635         * (genCmp): began writing a new version of the function, not ready
4636         yet, therefore it is disabled,
4637         * (genAssign): do not read code memory when assigning a function to
4638         a pointer function,
4639         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
4640         array of characters, not pointer,
4641         * (pic16initialComments): in debug mode emit an .ident directive for
4642         the assembler,
4643         * (_process_pragma): emit a new warning type (internal to pic16)
4644         when setting stack to default length, emit a similar warning when
4645         placing a function at absolute address and address is not word aligned
4646         * (_pic16_parseOptions): added 'return TRUE' statement,
4647         * (_pic16_linkEdit): if compiling a source, then add the source's
4648         file object, first in the list of objects to link,
4649
4650 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
4651
4652         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
4653         * src/pic/main.c : removed VC warning.
4654         * src/pic/gen.c : changed comment.
4655
4656 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
4657
4658         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
4659         reference to a deprecated symbol _GPTRREG was causing failure to
4660         link. Thanks G. M. Gallant for the info.
4661
4662 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
4663
4664         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
4665         comments for Bugs item #954788.
4666
4667 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
4668
4669         * src/pic16/device.c (pic16_dump_gsection,
4670         * pic16_groupRegistersInSection): handle symbols declared to be in
4671         access bank differently,
4672         * src/pic16/gen.c (struct _G): added field resDirect,
4673         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
4674         send values read from stack directly to result and don't allocate
4675         temporary values,
4676         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
4677         same registers,
4678         * (pic16_sameRegsOfs): NEW,
4679         * (freeAsmop): if _G.resDirect is set then do not mark registers as
4680         free because they were not allocated from temporary pool,
4681         * pic16_popRegFromString): workaround to fix a problem with
4682         allocating variables twice or never,
4683         * (genGenPointerGet): using PRODL instead of FSR0H,
4684         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
4685         instead of FSR0H,
4686         * (genAssign): take advantage of the _G.resDirect flag,
4687         * (genCast): around line 11844, use mov2f instead of directly
4688         MOVFF'ing between operands to account for literal values,
4689         * src/pic16/genutils.c: some new debug functions for gpsim have been
4690         added,
4691         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
4692         float with integer part only,
4693         * src/pic16/main.c (_process_pragma): handle pragma udata access to
4694         place variables in access bank
4695         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
4696         updated sources to reflect recent changes in gen.c
4697
4698 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
4699
4700         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
4701         sources that searched for headers in installation path, now the
4702         device/include/pic16 is used,
4703         * src/pic16/glue.c (pic16glue),
4704         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
4705         .line directives if not in debug mode, this suppresses assembler's
4706         warnings for ignored directives
4707
4708 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
4709
4710         * src/port.h: made reset_regparms prototype void parameter explicit.
4711         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
4712         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
4713         * doc/sdccman.lyx: documented warning disabling and how to use
4714           printf_large to make it print floats.
4715         * device/include/stdbool.h: NEW
4716         * device/lib/_atof.c,
4717         * device/lib/_divuint.c,
4718         * device/lib/_divulong.c,
4719         * device/lib/expf.c,
4720         * device/lib/printf_large.c,
4721         * device/lib/sincosf.c,
4722         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
4723         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
4724           a completely reentrant lib.
4725
4726 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
4727
4728         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
4729         * device/include/pic16/stdio.h: fixed bug with colon
4730
4731 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
4732
4733         * device/include/pic16/stdio.h,
4734         * device/include/pic16/stdlib.h,
4735         * device/include/pic16/math.h: NEW
4736         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
4737         declared as _naked to reduce overhead
4738         * device/lib/Makefile.in (target port-specific-objects-pic16):
4739         changed * to *.* so to ignore the CVS directory,
4740         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4741         stacked variables back in stack,
4742         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4743         corruption
4744
4745 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4746
4747         * .version: bumped version number to 2.4.5
4748         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4749         * support/Util/SDCCerr.c (messages structure): added entry for
4750         W_POSSBUG2
4751
4752         Large cumulative patch for pic16 port and libraries.
4753         * device/include/pic16/sdcc-lib.h,
4754         * device/include/pic16/stdarg.h,
4755         * device/include/asm/pic16/features.h,
4756         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4757         * device/include/pic16/float.h: changes reentrant keyword with
4758         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4759         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4760         updated target build-libraries to include objects from gptr,
4761         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4762         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4763         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4764         all function headings,
4765         * src/SDCCmain.c: added global parameter userIncDirsSet,
4766         * (parseCmdLine): when option -I is encountered add directory to
4767         userIncDirsSet too,
4768         * src/version.awk: added space between control and long,
4769         * src/pic16/NOTES: added some notes for the port,
4770         * src/pic16/gen.c: added prototype for mov2fp function,
4771         * (fReturnpic16[]): properly named return value registers,
4772         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4773         * (aopForSym): added code to handle symbols with onStack flag set,
4774         symbols onStack are allocated PTRSIZE bytes,
4775         * (aopFreeAsmop): handles special case where asmops are stack objects,
4776         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4777         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4778         added argument lock to trace flaws in allocating temporary registers
4779         when developing port,
4780         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4781         * (pic16_popRegFromString): reenabled allocating a direct register
4782         from string,
4783         * (assignResultValue): various beautifications,
4784         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4785         referenced function argument,
4786         * (genIpush): reenabled to allow stacked arguments, handles only
4787         ic->parmPush iCodes,
4788         * (genCall, genPcall): major changes to allow for variable argument
4789         functions, fixed a bug with falsely restoring stack pointer after
4790         returning from call,
4791         * (genFunction): pending code for critical function,
4792         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4793         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4794         * (genNearPointerGet): fixed bug with indirect reading, was always
4795         reading from INDF0
4796         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4797         pointers,
4798         * (genAddrOf): rewrote code to take address of a stacked function parameter
4799         * (genCast): fixed casting to generic pointer type,
4800         * src/pic16/gen.h: added AOP_STA,
4801         * (struct asmop): added field stk,
4802         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4803         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4804         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4805         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4806         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4807         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4808         generic pointers,
4809         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4810         and library paths,
4811         * (pic16_port structure): generic pointer size is set to 3,
4812         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4813         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4814         compiler warning,
4815         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4816         operand is an iTemp,
4817
4818 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4819
4820         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4821         * debugger/mcs51/simi.c: addapt new syntax of s51
4822
4823 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4824
4825         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4826         * src/pic16/pcode.c: commented out some calls to free() in order to
4827         fix bug #989576,
4828
4829 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4830
4831         * src/SDCCicode.h,
4832         * src/SDCCicode.c (isiCodeInFunctionCall),
4833         * src/avr/ralloc.c (selectSpil),
4834         * src/pic/ralloc.c (selectSpil),
4835         * src/pic16/ralloc.c (selectSpil),
4836         * src/ds390/ralloc.c (selectSpil),
4837         * src/hc08/ralloc.c (selectSpil),
4838         * src/xa51/ralloc.c (selectSpil),
4839         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4840         stack in the middle of a function call sequence (fixes bug #1020268)
4841         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4842         costs associated with the minimum switch case.
4843
4844 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4845
4846         * src/SDCC.lex: fixed bug #1030549
4847
4848 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4849
4850         * src/SDCCcse.h (struct cseDef),
4851         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4852         over a function call if the CSE is derived from a symbol whose
4853         address has been taken (fixes bug #1029883)
4854         * support/regression/tests/bug-1029883: a new regression test for
4855         this bug
4856
4857 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4858
4859         * src/hc08/gen.c (emitinline): fixed bug #1029778
4860         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4861         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4862         and starts toward RFE #905167)
4863
4864 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4865
4866         * src/pic16/gen.c (mov2f): New function to move an operand to
4867         another without considering if it is a literal or a register,
4868         * (pic16_sameRegs): don't check if they are both AOP_REG,
4869         * (AccRsh): removed andmask=0 lines,
4870         * (genLeftShift): duplicated to be improved in future versions,
4871         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4872         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4873         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4874         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4875         * (insertBankSwitch): fixed inserting banksel directives algorithm
4876         for instructions that follow a skip instruction, this fixes a report
4877         for broken subtraction code generation,
4878         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4879         iCode is a left op, just in case result and right share the same
4880         registers
4881
4882 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4883
4884         * src/hc08/main.c,
4885         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4886         preservation of HX
4887         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4888         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4889         on 2004-09-12; it was buggy
4890
4891 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4892
4893         * src/SDCCsymt.h: removed RESULT_CHECK
4894         * src/SDCCast.c,
4895         * src/SDCCglue.c,
4896         * src/SDCCval.c,
4897         * src/pic/glue.c,
4898         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4899
4900 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4901
4902         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4903         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4904         configuration values no more rejected by compiler, they are assigned
4905         to configuration registers with a warning message instead,
4906         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4907         the for-loop so last conf register is emitted too,
4908         * (_pic16_initPaths): link library libsdcc.lib by default,
4909         * (_hasNativeMulFor): modified test for multiplication according to
4910         Raphael Neider's remarks. Integer multiplication is also done with
4911         support functions,
4912         * device/include/pic16/pic18fregs.h: corrected type error in while
4913         testing and including 18f6720 header file
4914
4915 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4916
4917         * src/pic16/device.h (pic16_options): removed field use_crt,
4918         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4919         until an optimization to handle single bits is added,
4920         * (pic16_loadFSR0): moved before genUnpackBits,
4921         * (genAnd): some white lines removed,
4922         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4923         leave_reset flags in pic16_options when using crt modules,
4924
4925 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4926
4927         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4928           for bugs 898889 & 979599. Also used some safer print instructions.
4929
4930 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4931
4932         * src/pic16/device.h (pic16_options_t): added field use_crt,
4933         crt_name, no_crt,
4934         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4935         catch a probable future bug,
4936         * src/pic16/gen.c: aopIdx function commented out,
4937         * (genAssign): commented out old code which used aopIdx,
4938         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4939         code, added if conditionals to take into account the --use-crt
4940         command line options,
4941         * src/pic16/main.c (pic16_optionsTable): added new command line
4942         options, --use-crt= and --no-crt,
4943         * (_pic16_linkEdit): now the proper crt object is added in the
4944         linker command line except than when --no-crt is specified,
4945         * src/pic16/pcode.c,
4946         * src/pic16/pcode.h: added some structures and functions for a new
4947         optimization scheme to compansate for instruction overhead between
4948         same iCodes, this scheme is currently under development and is not
4949         working in any way,
4950         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4951         to && operator,
4952         * device/lib/pic16/startup/crt0i.c,
4953         * device/lib/pic16/startup/crt0iz.c: added global char variable
4954         __uflags to force the generation of an idata section
4955
4956 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4957
4958         * doc/Makefile,
4959         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4960         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4961
4962 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4963
4964         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4965         Frieder) and clarified the default code optimization mode
4966
4967 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4968
4969         * src/SDCC.lex (doPragma, process_pragma),
4970         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4971         "opt_code_size", and "opt_code_balanced"
4972         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4973         regrouped options by category, added support for category headers
4974         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4975         and "--opt-code-size"
4976         * doc/sdccman.lyx: documented these new options and pragmas
4977         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4978         preference into account
4979
4980 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4981
4982         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4983           geniCodePreDec): Fixed bug 904237 by generating a warning
4984         * src/SDCCerr.h,
4985         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4986
4987 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4988
4989         * src/pic/device.c : When no max ram set validate full memory range.
4990         * src/pic/pcode.c,
4991         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4992
4993 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4994
4995         * device/lib/_gptrget.c,
4996         * device/lib/_gptrput.c: updated comment
4997         * device/lib/calloc.c,
4998         * device/lib/free.c,
4999         * device/lib/malloc.c,
5000         * device/lib/realloc.c: added LGPL, made them reentrant-safe
5001         * src/SDCCcse.c (cseBBlock),
5002         * src/SDCCicode.c (printOperand, geniCodeArray),
5003         * src/SDCCicode.h (struct operand): fixed bug 868103
5004         * support/regression/tests/bug-868103.c: added
5005         * src/SDCCast.c (searchLitOp),
5006         * src/SDCCcse.h (struct cseDef),
5007         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
5008         * src/SDCCicode.h (struct operand),
5009         * src/SDCCsymt.h (struct sym_link),
5010         * src/avr/gen.c (hasInc),
5011         * src/ds390/gen.c (hasInc),
5012         * src/hc08/gen.c (genPlusIncr, hasInc),
5013         * src/mcs51/gen.c (hasInc),
5014         * src/pic16/glue.c (pic16_printIvalChar),
5015         * src/pic16/ralloc.c (regWithIdx),
5016         * src/xa51/gen.c (hasInc) : removed warnings
5017         * src/SDCCast.c (createBlock): added comment ???
5018         * src/hc08/ralloc.c: updated comments
5019
5020 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5021
5022         * doc/sdccman.lyx: updated section on switch statements, added
5023         section about semaphore locking
5024         * doc/Makefile: added option -info for latex2html
5025         * device/lib/_gptrget.c,
5026         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
5027
5028 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5029
5030         * src/pic/device.h,
5031         * src/pic/device.c,
5032         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
5033          maxram is less than 0x100.
5034
5035 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5036
5037         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
5038
5039 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5040
5041         * src/port.h,
5042         * src/mcs51/main.c,
5043         * src/ds390/main.c,
5044         * src/z80/main.c,
5045         * src/hc08/main.c,
5046         * src/pic/main.c,
5047         * src/pic16/main.c,
5048         * src/avr/main.c,
5049         * src/xa51/main.c
5050         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
5051         a jump table is the best form for a switch statement, including
5052         automatic insertion of missing cases to make the case range
5053         continuous. Developed in collaboration with Frieder Ferlemann.
5054
5055 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5056
5057         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
5058         accumulator result if it needs sign extension
5059
5060 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5061
5062         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
5063
5064 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5065
5066         * device/lib/gbz80/printf.c,
5067         * device/lib/z80/printf.c: removed define for NULL
5068
5069 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5070
5071         * as/xa51/xa_link.c,
5072         * device/examples/ds390/ow390/ad26.c,
5073         * device/examples/ds390/ow390/cnt1d.c,
5074         * device/examples/ds390/ow390/counter.c,
5075         * device/examples/ds390/ow390/ds2480.h,
5076         * device/examples/ds390/ow390/ds2480ut.c,
5077         * device/examples/ds390/ow390/findtype.c,
5078         * device/examples/ds390/ow390/gethumd.c,
5079         * device/examples/ds390/ow390/owllu.c,
5080         * device/examples/ds390/ow390/ownetu.c,
5081         * device/examples/ds390/ow390/swt12.c,
5082         * device/examples/ds390/ow390/swtloop.c,
5083         * device/examples/ds390/ow390/temp.c,
5084         * device/examples/ds390/ow390/temp10.c,
5085         * device/examples/ds390/ow390/thermo21.c,
5086         * device/examples/ds390/ow390/tinilnk.c,
5087         * device/examples/ds390/ow390/tstfind.c,
5088         * device/examples/serialcomm/windows/serial.cpp,
5089         * device/examples/serialcomm/windows/test_serialcomm.cpp,
5090         * device/include/reg51.h: fixed line endings for cvs
5091
5092 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5093
5094         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
5095         packRegsForAccUse, packRegisters): new accumulator register
5096         packing algorithm
5097         * support/regression/ports/hc08/support.c (_putchar): suppress
5098         warning of unused variable
5099         * src/SDCCicode.c: added SWAP entry to codeTable
5100
5101 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
5102
5103         * device/lib/sprintf.c: forgot to add this file before previous commit
5104
5105 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
5106
5107         * src/pic16/gen.c (genPackBits): added operand right in function
5108         parameters, load result directly if p_type is POINTER (that is
5109         called by genNearPointerSet)
5110         * (genUnPackBits): added operand left in function parameters,
5111         * (genNearPointerGet, genNearPointerSet): prevent the loading of
5112         FSR0 if accessing bitfields,
5113
5114 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
5115
5116         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
5117           _print_format; updated printf, sprintf, vsprintf
5118         * device/include/asm/default/features.h: corrected comment/define
5119         * device/lib/Makefile.in: added sprintf.c
5120         * device/lib/libsdcc.lib: added sprintf module
5121         * device/lib/printf_large.c,
5122         * device/lib/vprintf.c,
5123         * device/lib/sprintf.c: totally refactored printf_large and vprintf
5124           into these 3 files
5125         * support/regression/Makefile: changed ALL_PORTS into a usefull default
5126         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
5127         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
5128           hc08 test
5129         * support/regression/tests/zeropad.c: define idata as data for hc08
5130
5131 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5132
5133         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
5134         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
5135         labels are referenced at least once (even if a reference is not found)
5136         * src/hc08/gen.c (emitcode): set isComment flag for comments
5137         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
5138         loads), rules 6a..6b (optimize jumps to return)
5139
5140 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5141
5142         * device/lib/acosf.c (acosf),
5143         * device/lib/asinf.c (asinf),
5144         * device/lib/atanf.c (atanf),
5145         * device/lib/ceilf.c (ceilf),
5146         * device/lib/cosf.c (cosf),
5147         * device/lib/coshf.c (coshf),
5148         * device/lib/cotf.c (cotf),
5149         * device/lib/fabsf.c (fabsf),
5150         * device/lib/floorf.c (floorf),
5151         * device/lib/log10f.c (log10f),
5152         * device/lib/logf.c (logf),
5153         * device/lib/sinf.c (sinf),
5154         * device/lib/sinhf.c (sinhf),
5155         * device/lib/sqrtf.c (sqrtf),
5156         * device/lib/tanf.c (tanf),
5157         * device/lib/tanhf.c (tanhf),
5158         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
5159         replaced all instances of "reentrant" in the library functions
5160         defined in math.h with this macro.
5161         * support/regression/tests/float_trans.c: reenabled test for hc08
5162
5163 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
5164
5165         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
5166         erroneously deleted
5167
5168 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5169
5170         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
5171         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
5172         multi-byte volatile operands are used
5173         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
5174         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
5175         initialization to area GSINIT0 so that it would always precede
5176         any static initializers in GSINIT
5177         * support/regression/tests/zeropad.c: fixed idata define for hc08
5178         * support/regression/tests/bug-927659.c,
5179         * support/regression/tests/float_trans.c: disabled tests for hc08
5180         pending missing library routines
5181         * .version: increased version number to 2.4.4 - hc08 port now passes
5182         regression tests
5183
5184
5185 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
5186
5187         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
5188         * Makefile.common.in,
5189         * as/Makefile,
5190         * as/hc08/Makefile.in,
5191         * as/mcs51/Makefile.in,
5192         * as/z80/Makefile.in,
5193         * debugger/mcs51/Makefile.in,
5194         * device/include/Makefile.in,
5195         * device/lib/Makefile.in,
5196         * doc/Makefile,
5197         * link/Makefile,
5198         * link/z80/Makefile.in,
5199         * packihx/Makefile.in,
5200         * sim/ucsim/main_in.mk,
5201         * sim/ucsim/avr.src/Makefile.in,
5202         * sim/ucsim/doc/Makefile.in,
5203         * sim/ucsim/gui.src/serio.src/Makefile.in,
5204         * sim/ucsim/hc08.src/Makefile.in,
5205         * sim/ucsim/s51.src/Makefile.in,
5206         * sim/ucsim/xa.src/Makefile.in,
5207         * sim/ucsim/z80.src/Makefile.in,
5208         * src/Makefile.in,
5209         * support/cpp2/Makefile.in,
5210         * support/librarian/Makefile,
5211         * support/makebin/Makefile: added DESTDIR to the install path proposed
5212         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5213         * doc/sdccman.lyx: added DESTDIR documentation
5214
5215 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5216
5217         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5218         instruction for interrupt handlers, use fast returns when returning
5219         from high priority interrupts
5220
5221 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5222
5223         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5224         code generation
5225         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5226         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5227         bugs, ported much of Bernhard's code from mcs51
5228         * src/mcs51/gen.c (genSend),
5229         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5230         than one when calling a reentrant function
5231         * device/lib/_mullong.c: defined an alternate struct layout for big
5232         endian ports (hc08)
5233
5234 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5235
5236         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5237         test
5238
5239 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5240
5241         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5242         are sane and complete before asking the port its prefered parameter
5243         passing method (fixes bug #1017633)
5244         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5245         and _ret3
5246
5247 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5248
5249         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
5250         problem in bitfields >= 8 bits.
5251
5252 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5253
5254         * src/SDCCsymt.c: undid changes that were not meant to be committed
5255
5256 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5257
5258         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
5259
5260 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5261
5262         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
5263           copied and wrong bit got inverted
5264
5265 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5266
5267         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
5268         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
5269         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
5270         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
5271         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
5272         assignments to bitfields at known addresses
5273         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
5274         reads from bitfields at known addresses
5275         * src/hc08/ralloc.c (packRegisters),
5276         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
5277         genhc08Code): optimize pointer get values used as conditionals
5278         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
5279         and branch
5280
5281 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5282
5283         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
5284         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
5285         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
5286         as conditionals
5287
5288 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5289
5290         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
5291
5292 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5293
5294         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
5295         related problems
5296
5297 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
5298
5299         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
5300
5301 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5302
5303         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
5304         mcs51 port
5305
5306 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
5307
5308         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
5309
5310 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5311
5312         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
5313         cases use more compact code.
5314
5315 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
5316
5317         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
5318
5319 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5320
5321         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
5322
5323 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5324
5325         * src/SDCCsymt.h,
5326         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
5327         parameter of changePointer() from symbol* to sym_link*
5328         * src/SDCCast.c (decorateType): call changePointer() for CAST op
5329         * src/SDCCsymt.c (compareType): void* type is castable to other
5330         pointers, but not necesarily an exact match.
5331         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
5332         is no longer blindly treated as an exact match.
5333         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
5334
5335 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
5336
5337         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
5338
5339 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
5340
5341         * src/pic/gen.c,
5342         * src/pic/pcode.c,
5343         * src/pic/ralloc.h,
5344         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
5345
5346 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
5347
5348         * src/pic/device.c,
5349         * src/pic/device.h,
5350         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
5351
5352 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5353
5354         * src/mcs51/gen.c (emitcode): fixed bug #992819
5355
5356 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
5357
5358         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
5359           there's no need to make it worse
5360
5361 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5362
5363         * src/mcs51/ralloc.c (deassignLR),
5364         * src/ds390/ralloc.c (deassignLR),
5365         * src/hc08/ralloc.c (deassignLR),
5366         * src/z80/ralloc.c (deassignLR),
5367         * src/pic/ralloc.c (deassignLR),
5368         * src/pic16/ralloc.c (deassignLR),
5369         * src/avr/ralloc.c (deassignLR),
5370         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
5371         rlivePoint): fixed another part of bug #971834
5372
5373 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5374
5375         * src/z80/main.c: enabled "critical" keyword
5376         * src/z80/mappings.i,
5377         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
5378         functions (fixes bug #979646)
5379         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
5380
5381 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5382
5383         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
5384           such as c:\mydir.
5385
5386 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
5387
5388         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
5389           doesn't disable too much optimizations
5390
5391 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5392
5393         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
5394
5395 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
5396
5397         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
5398
5399 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5400
5401         * src/pic/gen.c tidied up tabs
5402         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
5403         * src/pic/main.c tidied up tabs
5404         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
5405         * src/pic/pcoderegs.c tidied up tabs
5406         * src/pic/ralloc.c tidied up tabs
5407
5408 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
5409
5410         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
5411         to S_FIXED for pic16 port and when symbol is not in level 0,
5412         allocate for S_REGISTER storage class and pic16 port, too,
5413         * src/pic16/device.h: prototype for checkSym,
5414         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
5415         * (pic16_assignConfigWordValue): test the value and the mask to
5416         validate that the value is suitable for the configuration word,
5417         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
5418         collect extern declared symbols, don't emit symbol twice, check
5419         first if symbol is in publics set first,
5420         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
5421         * added command line '--fstack' which enables an experimental
5422         feature for stack access, too buggy to be used yet...
5423         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
5424         * (pic16_allocDirReg): when register has storage class S_REGISTER
5425         allocate in pic16_dynAccessRegs,
5426         * device/include/pic16/pic18f????.h: modified configuration word
5427         naming convention, words started as CONFIG0H but should be CONFIG1H
5428
5429 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
5430
5431         * device/include/mcs51reg.h: fixed bug 970993
5432
5433 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
5434
5435         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
5436         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
5437         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
5438         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
5439         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
5440         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
5441           error/warning numbers,
5442           added function setWarningDisabled()
5443         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
5444         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
5445           _memcmp.c _memmove.c calloc.c realloc.c free.c
5446         * support/regression/tests/malloc.c: added tests for new functionality
5447         * support/regression/tests/zeropad.c: added tests for truncated initializers
5448           and initialized char arrays starting with '\x0'
5449         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
5450
5451 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
5452
5453         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
5454
5455 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5456
5457         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
5458         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
5459         peephole 177.e. Thanks to anonymous
5460
5461 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
5462
5463         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
5464         function isn't used in the source but referenced as a
5465         variable initializer then declare it as extern in .asm file
5466
5467 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
5468
5469         * .version: increased version number to 2.4.3
5470
5471         Adding version extension according to ChangeLog CVS revision
5472         * src/Makefile.in (target all): added dependency 'version.h'
5473         * (rule version.h): added rule to create version.h from ChangeLog,
5474         * (rule dep): added dependency version.h,
5475         * src/version.awk: AWK script to create version.h
5476         * src/SDCCdwarf2.c (dwWriteModule),
5477         * src/SDCCglue.c (initialComments),
5478         * src/SDCCmain.c (printVersionInfo): modified to write after
5479         version string the version extension number,
5480         * src/SDCCutil.c: included "version.h"
5481         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
5482         number,
5483         * src/SDCCutil.h: added prototype for getBuildNumber
5484
5485         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
5486         includeDirsSet, too,
5487         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
5488         const char [] is found in function prototype...
5489
5490         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
5491         moving to WREG with source is already in WREG,
5492         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
5493         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
5494         * (aopForSym): stack'ed symbols are partially supported, added
5495         if-clause to support symbols in FARSPACE,
5496         * (sameRegs): added test for AOP_ACC to see if registers are same,
5497         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
5498         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
5499         * (pic16_popRegFromString): will not allocate a new register if it
5500         doesn't find one by name, bug may have introduced...
5501         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
5502         * (genIpush): revived to use pic16 port's stack,
5503         * (genAddrOf): added incomplete case for stack'ed operand,
5504         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
5505         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
5506         can handle multibyte operands,
5507         * src/pic16/glue.c (pic16_printIval*): some debug info added,
5508         * (pic16initialComments): added message for MPLAB compatibility
5509         mode enabled,
5510         * src/pic16/main.h: prototype for pic16_mplab_comp,
5511         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
5512         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
5513         * (_pic16_linkEdit): NEW, handles link stage, transferred here
5514         because of increased complexity of procedure,
5515         * (_process_pragma): stack pragma changed to format 'stack pos len',
5516         emit symbol '_stack_end' to conform with gplink,
5517         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
5518         to search for register,
5519         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
5520         PO_GPR_REGISTER,
5521         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
5522         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
5523         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5524         case for PO_GPR_REGISTER,
5525         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
5526         dies, the new era is ahead !...
5527         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
5528         pic16_dynInternalRegs,
5529         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
5530         * (pic16_allocDirReg): minor optimizations and bug fixes,
5531         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
5532
5533         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
5534         load stack and frame pointer with address of 'stack_end' symbol
5535
5536 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
5537
5538         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
5539         without source code but only variable initializers
5540
5541 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
5542
5543         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
5544         external are not declared as extern to reduce overhead while linking
5545
5546 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
5547
5548         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
5549
5550 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
5551
5552         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
5553           Yee Keat for the patch
5554         * src/SDCCast.c (decorateType): fixed bug #979599
5555         * src/ds390/gen.h: removed local fReturnSizeDS390
5556         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
5557         * src/ds390/gen.c (genAnd, genOr, genXor),
5558         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
5559
5560 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
5561
5562         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
5563         add relFilesSet to $3, manipulate $2 to handle linking of object
5564         files without source files in command line,
5565         * device/include/pic16 (all headers): added ID location macros,
5566         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
5567         entries for ID location bytes,
5568         * (pic16_assignIdByteValue): NEW,
5569         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
5570         added field dumpcalltree to pic16_options_t,
5571         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
5572         is used instead of pic16_Gstack_base_addr, check if (ifx) before
5573         emitting rFalseIfx label after check_carry label,
5574         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
5575         pic16_emitDIRegs), NEW
5576         * (pic16glue): dump .calltree file when option --calltree found,
5577         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
5578         * (_pic16_genAssemblerPreamble): emit ID locations after
5579         configuration registers,
5580         * (pic16_linkCmd): modifications of the link command,
5581         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
5582         * (pic16_pCodeInitRegisters): don't init stack registers,
5583         * (pic16_findPrevInstruction): fixed bug,
5584         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
5585         bug with immediate registers,
5586         * (buildCallTree): traces stack push and pop,
5587         * (pct2): dump also stack usage for each function,
5588         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
5589         * (pic16_allocDirReg): various modifications,
5590         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
5591         fixed to 1,
5592
5593 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
5594
5595         * src/pic16/pcode.c: removed buggy double colon
5596
5597 2004-07-01 Borut Razem <borut.razem AT siol.net>
5598
5599         * support/scripts/sdcc.nsi: added include/pic16 to setup
5600
5601 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
5602
5603         * device/lib/Makefile.in: fixed bug in target objects-pic16,
5604         * device/lib/pic16/Makefile: prefixed with dash (-) command under
5605         target 'clean',
5606         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
5607         specific command line arguments. Also added sample lkr script
5608         for placing a variable at a specific memory bank.
5609         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
5610         at a specific memory bank,
5611         * (pic16_dump_isection): fixed bug which caused string literals to
5612         be omitted when dumping idata section,
5613         * (pic16_groupRegistersInSection): added code to handle registers
5614         in specific memory banks,
5615         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
5616         public, all references are renamed too,
5617         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
5618         AOP_DPTR2,
5619         * (pic16_storeForReturn): added case to handle when dest is WREG,
5620         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
5621         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
5622         pic16_rel_udata, check to see if that register is marked as being
5623         a member of a specific memory bank,
5624         * (pic16_printIvalCharPtr): added code to add string literals either
5625         to code or the idata sections,
5626         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
5627         also accept the 'udata' pragma,
5628         * src/pic16/main.h: new structure types sectName and sectSym
5629         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
5630         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
5631         * (pic16_findPrevInstruction): fixed, it returned nothing,
5632         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
5633         instruction combinations,
5634         * (pic16_FixRegisterBanking): heavily reorganised,
5635         * (pic16_AnalyzeBanking): if generating banksel directives is
5636         disabled, then don't call FixRegisterBanking at all,
5637         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
5638         completely removed,
5639         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
5640
5641 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
5642
5643         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
5644         Phuah Yee Keat <yk.phuah AT nestac.com>
5645
5646 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5647
5648         * src/pic16/glue.c (pic16createInterruptVect): function now emits
5649         correctly the IVT even if it is relocated to some other location
5650
5651 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5652
5653         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
5654         * device/include/pic16/pic18f2220.h: NEW,
5655         * device/lib/pic16/libdev/pic18f2220.c: NEW,
5656         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
5657         * src/pic16/device.c (struct Pics16): added info for 18f2220,
5658         * src/pic16/device.h (struct pic16_options): added ivt_loc and
5659         nodefaultlibs, ivt_loc is the location of the interrupt vector
5660         table, and nodefaultlibs signs that default libraries should not be
5661         linked in link stage,
5662         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
5663         according to --ivt-loc argument,
5664         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
5665         when pragma stack is found,
5666
5667 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5668
5669         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
5670         256 (range check), 257 (do while), 258.a-f (bit banging
5671         f.e. on 3-wire SPI bus)
5672
5673 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5674
5675         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
5676         variables used exclusively within a loop
5677
5678 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
5679
5680         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
5681
5682 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5683
5684         * src/SDCClrange.c (computeClash): fixed bug #971834
5685
5686 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5687
5688         * src/mcs51/gen.c (genCmp): fixed bug #975903
5689         * src/hc08/gen.c (operandsEqu),
5690         * src/ds390/gen.c (operandsEqu),
5691         * src/z80/gen.c (operandsEqu),
5692         * src/pic/gen.c (operandsEqu),
5693         * src/pic16/gen.c (operandsEqu),
5694         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
5695         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
5696
5697 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5698
5699         * src/SDCCcse.c (cseBBlock): fixed bug #966963
5700
5701 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
5702
5703         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
5704         default case in switch statement,
5705         * glue.c (pic16_initPointer): expr is initialised via decoarteType
5706         to eliminate problem with initialisation of pointers, but problem
5707         still exists,
5708         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
5709         * (emitStaticSegment): removed various lines emitting debug info,
5710         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
5711         added processor registers for utilizing EEPROM,
5712         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
5713         configurable and set 8
5714
5715 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
5716
5717         * .version: increased version number to 2.4.2,
5718
5719         Cumulative patch for pic16 port
5720         * src/pic16/device.c: changed scheme to dump initial values for
5721         variables in idata segment, all print_idata* functions were removed,
5722         now the pic16_printIval* will be called,
5723         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
5724         * _pic16_printPointerType, pic16_printPointerType,
5725         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
5726         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
5727         NEW, similar to the respective functions in SDCCglue.c,
5728         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
5729         way, emitting hex bytes,
5730         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
5731
5732 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5733
5734         * src/avr/ralloc.c (serialRegAssign),
5735         * src/xa51/ralloc.c (serialRegAssign),
5736         * src/pic/ralloc.c (serialRegAssign),
5737         * src/pic16/ralloc.c (serialRegAssign),
5738         * src/hc08/ralloc.c (serialRegAssign),
5739         * src/z80/ralloc.c (serialRegAssign),
5740         * src/ds390/ralloc.c (serialRegAssign),
5741         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5742
5743 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5744
5745         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5746         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5747
5748 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5749
5750         Cumulative patch for pic16 port:
5751         * src/pic16/device.h (typedef PIC16_device) modified fields for
5752         defining microcontrollers,
5753         * src/pic16/device.c: added new info for all devices in Pics16 array,
5754         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5755         to be optimised out by the pCode optimiser,
5756         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5757         specially, bug reported by G.M. Gallant,
5758         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5759         as force'd so that cannot be optimised out by pCode optimiser,
5760         * src/pic16/pcode.c,
5761         * src/pic16/pcodepeeph.c,
5762         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5763         they are disabled by default, but can be enabled explicit with
5764         command argument --denable-peeps, for testing,
5765         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5766         --pomit-ivt in COMPILE_FLAGS
5767
5768 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5769
5770         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5771           compilation on MSVC
5772
5773 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5774
5775         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5776
5777 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5778
5779         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5780         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5781
5782 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5783
5784         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5785         would only assign 0x300001 register.
5786
5787 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5788
5789         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5790         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5791
5792 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5793
5794         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5795         for ds80c400
5796         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5797         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5798         added peephole 254 (left shift), 255 (jump table)
5799
5800 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5801
5802         * device/lib/Makefile.in: removed comment line with model-pic16,
5803         * (target port-specific-objects-pic16): the libraries and objects
5804         are copied to the build directory form the device/lib/pic16/bin
5805         directory
5806
5807         Cumulative patch concerning pic16 port:
5808         * library directory has been re-organized,
5809         * added support for PIC18F1220,
5810         * added headers and library sources for chips 18f1220,18f6520,
5811         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5812
5813         * configuration registers setting has changed, now each supported
5814         device has a complete description of the registers it uses,
5815         * all initialisations are moved to idata sections, these section
5816         can be absolute or relocatable,
5817         * fixed initialisation of codespace variables,
5818         * fixed warning about PCLATU and gpsim,
5819         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5820         * (genAssign): use table reads when assigning from variables in codespace,
5821         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5822         char/int variables placed in codespace,
5823         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5824         registers set in .asm file, no need for --pomit-config-words anymore,
5825         * (pic16glue): some 8051 legacy segments are commented out
5826         (to be removed completely),
5827         * added support for alternative assembler and linker with --asm=
5828         and --link= command line arguments,
5829         * peepholes are disabled automatically in the port, no need to
5830         specify on command line,
5831         * port supports natively char/int/long multiplication, but converts
5832         all divisions to support functions,
5833         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5834         to the file set in variable $2,
5835         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5836         strings in ASCII format and not in hex,
5837         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5838         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5839         allocate proper register if iCodes aren't temporary,
5840
5841 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5842
5843         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5844
5845 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5846
5847         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5848         is commented out
5849
5850 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5851
5852         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5853         computed address is reused
5854         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5855         multi-byte bitfields
5856
5857 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5858
5859         * src/z80/gen.c: (genArrayInit): must check for pointers too
5860
5861 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5862
5863         * support/regression/tests/zeropad.c: never meant to commit the
5864           nestedstruct test: removed, added check for GCC version
5865
5866 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5867
5868         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5869         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5870         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5871           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5872           bugs 928906 and 954082 half-empty initializers
5873         * src/SDCCsymt.h,
5874         * src/SDCCsymt.c (getAllocSize): added for above fix
5875         * src/z80/gen.c (genArrayInit): fixed bug 741044
5876         * support/regression/tests/zeropad.c: added tests
5877
5878 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5879
5880         * src/pic16/device.c (pic16_dump_section): corrected bug which
5881         caused some symbols of the libraries to be misplaced
5882
5883 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5884
5885         * src/pic16/glue.c,
5886         * src/pic16/ralloc.h,
5887         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5888         to fix conflict with pic port
5889
5890 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5891
5892         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5893         externs configuration variables,
5894         * src/pic16/ralloc.h,
5895         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5896         prototype in header, commented out some debug messages
5897
5898 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5899
5900         * src/pic16/glue.c,
5901         * src/pic16/main.c,
5902         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5903         for gpasm COFF object generation. Thanks to D. Hawkins for
5904         his patch info
5905
5906 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5907
5908         * src/ds390/main.c,
5909         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5910         Brock for spotting this)
5911         * src/ds390/gen.c (genEndFunction),
5912         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5913         interrupt handler and critical. Disable push/pop optimizations when
5914         peephole optimizations disabled.
5915
5916 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5917
5918         Updated pic16 library sources and headers.
5919         * device/lib/pic16/pic18f*/ ,
5920         * device/include/pic16/*.h: modified to handle structured SFR
5921         definitions
5922
5923 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5924
5925         * src/port.h (PORT structure): added hook initPaths, now each
5926         port can declare its own default search paths,
5927         which can been seen with the --print-search-dirs option,
5928         see pic16 port for example,
5929         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5930         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5931         * (doPrintSearchDirs): NEW, replaces in a central manner the
5932         printing of search dirs which was split in set*Paths functions,
5933         * (main): added call to port->initPaths and doPrintSearchDirs,
5934         * src/avr/main.c,
5935         * src/ds390/main.c,
5936         * src/hc08/main.c,
5937         * src/izt/i186.c,
5938         * src/izt/tlcs900h.c,
5939         * src/mcs51/main.c,
5940         * src/pic/main.c,
5941         * src/pic16/main.c: modified port structures to reflect addition of
5942         initPaths hook,
5943
5944         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5945         * (pic16_dump_section): for registers in same address reserve memory once,
5946         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5947         to no_banksel,
5948         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5949         result is greater in size than right or left,
5950         * (pic16_genUMult8X8_8): there are some cases where the result can
5951         be 16 bits size, so handle these,
5952         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5953         * (pic16_outBitC): modified to emit pcodes,
5954         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5955         or not,
5956         * (genDivOneByte): implemented algorithm to divide 8-bits,
5957         * (genCmp): uncommented goto, but issues still exist,
5958         * (genAnd): fixed a bug with variables >8bits,
5959         * (genPackBits): optimization added that uses BCF/BSF to change a
5960         single bit,
5961         * (genAssign): fixed bug when assigning floating point literals,
5962         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5963         __sdcc_gsinit_startup label,
5964         * src/pic16/main.c (_pic16_init): removed search directory
5965         initialisations,
5966         * (_pic16_initPaths): NEW, used to initialise search directories,
5967         * (_hasNativeMulFor): support functions for all except char/int
5968         multiplication, and char division,
5969         * (PIC16_port struct): modified entry for native mul support,
5970         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5971         no_banksel option,
5972         * (buildCallTree): call to register_usage is ifdef'ed out,
5973
5974 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5975
5976         * device/include/string.h: applied Stas Sergeev's patch to make this
5977         header file compatible with the preprocessor -Wundef option
5978         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5979         failure (fixes bug #941458)
5980
5981 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5982
5983         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5984         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5985         that the variable, not the function, should be static
5986         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5987         to be consistent with non-literal case
5988
5989 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5990
5991         * src/SDCCast.c (isConformingBody): fixed bug #949967
5992         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5993         convilong): fixed bug #952086
5994
5995 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5996
5997         * src/SDCCmem.c (allocVariables): fixed bug #955321
5998
5999 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6000
6001         * src/hc08/main.c (_hc08_genAssemblerEnd),
6002         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
6003         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
6004         completely eliminated the use of a temporary file
6005         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
6006         when more than one file linked
6007         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
6008
6009 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6010
6011         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
6012         which fixes bug #543481
6013         * support/regression/tests/bug-751703.c: fixed comments left from a
6014         cut and paste error
6015         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
6016         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
6017         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
6018         scopes
6019         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
6020         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
6021         are now changed to underscores in moduleName
6022
6023 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6024
6025         * as/mcs51/lkmem.c: better fix for bug #954173
6026
6027 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
6028         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6029
6030         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
6031         * device/include/c8051f000.h,
6032         * device/include/c8051f120.h,
6033         * device/include/c8051f300.h,
6034         * device/include/c8051f310.h,
6035         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
6036         PWM16) and detab'ed
6037
6038 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6039
6040         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
6041         and mailing lists, doc'ed --no-peep-comments, removed reference
6042         to knoppix (newest version has no LyX/LaTeX), other minor changes
6043         * src/SDCCglue.c (glue): save 2 bytes stack space with
6044         option --main-return. The ljmp could probably be avoided too
6045
6046 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6047
6048         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
6049
6050 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6051
6052         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
6053         * src/SDCCopt.c (isLocalWithoutDef),
6054         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
6055         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
6056         (credit to Maarten Brock for patch #949363, on which this is based)
6057         * support/regression/tests/bug-751703.c: some test cases of extern used
6058         within inner scopes.
6059
6060 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6061
6062         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
6063         SPEC_STRUCT
6064         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
6065         struct definitions
6066         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
6067         dwWriteLabel): fix to create valid debugger symbols even when
6068         the module name has non-alphanumeric symbols in it
6069         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
6070         when a variable's allocation has been optimized away
6071
6072
6073 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6074
6075         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
6076         * src/hc08/main.c,
6077         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
6078         * src/mcs51/main.c,
6079         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
6080         * src/ds390/main.c,
6081         * src/z80/gen.c (z80_emitDebuggerSymbol),
6082         * src/z80/main.c,
6083         * src/pic/gen.c (pic14_emitDebuggerSymbol),
6084         * src/pic/main.c,
6085         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
6086         * src/pic16/main.c,
6087         * src/avr/gen.c (avr_emitDebuggerSymbol),
6088         * src/avr/main.c,
6089         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
6090         * src/xa51/main.c,
6091         * src/SDCCdebug.c (emitDebuggerSymbol),
6092         * src/SDCCdebug.h,
6093         * src/port.h: added a debugger struct to the port struct. Added a
6094         callback for defining debugger symbols
6095
6096         * src/SDCCast.c (createLabel),
6097         * src/SDCC.y (labeled_statement): mark all compiler generated labels
6098         with isitmp = 1
6099         * src/SDCCicode.h,
6100         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
6101         iCode back to the ast for the function
6102
6103         * src/hc08/ralloc.c (hc08_assignRegisters),
6104         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
6105         unneeded fields from the regs struct.
6106         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
6107         pushReg() & pullReg() functions instead of emitcode()
6108
6109         * src/hc08/gen.c (genLabel, genhc08Code),
6110         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
6111
6112         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
6113         debugger hooks
6114
6115         * src/hc08/gen.c (genEndFunction, genhc08Code),
6116         * src/hc08/gen.h,
6117         * src/mcs51/gen.c (genEndFunction, gen51Code),
6118         * src/mcs51/gen.h,
6119         * src/ds390/gen.c (genEndFunction, gen390Code),
6120         * src/ds390/gen.h,
6121         * src/z80/gen.c (genEndFunction, genZ80Code),
6122         * src/z80/gen.h,
6123         * src/z80/z80.h,
6124         * src/pic/gen.c (genEndFunction, genpic14Code),
6125         * src/pic/gen.h,
6126         * src/pic16/gen.c (genEndFunction, genpic16Code),
6127         * src/pic16/gen.h,
6128         * src/avr/gen.c (genEndFunction, genAVRCode),
6129         * src/avr/gen.h,
6130         * src/xa51/gen.c (genEndFunction, genXA51Code),
6131         * src/xa51/gen.h,
6132         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
6133         specific code to cdbFile.c and out of the backend code generators
6134
6135         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
6136         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
6137         starting address is now 0
6138
6139         * as/hc08/asm.h,
6140         * as/hc08/m08pst.c,
6141         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
6142         assembler directive for DWARF support
6143         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
6144
6145         * src/src.dsp,
6146         * src/Makefile.in,
6147         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
6148
6149 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6150
6151         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
6152         and inappropriate peephole optimization in jump tables
6153
6154 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6155
6156         * as/hc08/m08pst.c,
6157         * src/SDCCglue.c: sdccopt works for the hc08 port now
6158
6159 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
6160
6161         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
6162
6163 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6164
6165         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
6166
6167 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6168
6169         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
6170         rules
6171         * src/SDCCmain.c,
6172         * src/SDCCglobl.h,
6173         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
6174         comments from the peephole optimizer replacement rules
6175         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
6176         symbols
6177         * src/SDCCcse.c (updateSpillLocation),
6178         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
6179         equivalents
6180         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
6181         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
6182         objects far pointers
6183
6184 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6185
6186         * src/SDCCsymt.h: a missing part of my last change
6187         * src/pic/ralloc.c (regTypeNum),
6188         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
6189
6190 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6191
6192         * src/SDCCicode.h,
6193         * src/SDCCicode.c (aggrToPtrDclType),
6194         * src/SDCCptropt.h,
6195         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
6196         ptrPseudoSymConvert),
6197         * src/pic/ralloc.c (regTypeNum),
6198         * src/pic16/ralloc.c (regTypeNum),
6199         * src/hc08/ralloc.c (regTypeNum),
6200         * src/ds390/ralloc.c (regTypeNum),
6201         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
6202         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
6203
6204 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6205
6206         * link/z80/lkmain.c (afile),
6207         * as/hc08/lkmain.c (afile),
6208         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
6209         prevent a pointer problem when a filename has no directory and
6210         no extension specified.
6211
6212 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6213
6214         * link/z80/lkmain.c (afile): allow periods in directory names
6215         * link/z80/lkmain.c (afile),
6216         * as/mcs51/lkmain.c (afile),
6217         * as/hc08/lkmain.c (afile): allow linker script file to have an
6218         extension other than ".lnk"
6219         * link/z80/lklex.c (getfid),
6220         * link/z80/lkmain.c (parse),
6221         * as/mcs51/lklex.c (getfid),
6222         * as/mcs51/lkmain.c (parse),
6223         * as/hc08/lklex.c (getfid),
6224         * as/hc08/lkmain.c (parse): Support comments in the linker script
6225         file on lines by themselves and after filenames
6226
6227 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6228
6229         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6230
6231 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6232
6233         * src/z80/peeph-z80.def: removed some peephole rules that don't
6234         work with multibyte arithmetic (fixed bug #937126)
6235         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6236         to registers and not global variables
6237         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6238         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6239         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6240         checking for assignments not internally generated (fixed bug #931895)
6241         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6242         structure member (fixed bug #930072)
6243
6244 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6245
6246         * src/SDCCmain.c (linkEdit),
6247         * src/hc08/main.c (_hc08_parseOptions),
6248         * as/hc08/Makefile.in,
6249         * as/hc08/aslink.h,
6250         * as/hc08/asm.h,
6251         * as/hc08/m08pst.c,
6252         * as/hc08/lkrloc.c (relr, rele),
6253         * as/hc08/lkarea.c (lnkarea)
6254         * as/hc08/lkmain.c (afile, parse),
6255         * as/hc08/lkelf.c: support for ELF output
6256         * as/hc08/lks19.c (s19),
6257         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
6258
6259 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6260
6261         * as/mcs51/lkihx.c: Fixed bug #899105.
6262
6263 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6264
6265         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
6266         .dsp files from Unix to DOS.
6267
6268 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6269
6270         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
6271         function pointers; we have been compliant for several months now.
6272         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
6273         change that was accidently commented out
6274         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
6275         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
6276         bug #922319
6277
6278 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6279
6280         * src/hc08/gen.c: output of all of the internal debugging information
6281         is now controlled by the D() macro; it is disabled by default
6282
6283 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6284
6285         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
6286         harder to keep the same registers during a CAST iCode
6287         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
6288         long via int can be done in a single cast, if the signedness is
6289         correct.
6290         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
6291         putchar() in tinibios.c in ds390's library
6292
6293 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
6294
6295         * src/SDCCast.c (decorateType): fixed bug #898889,
6296         cast result of a literal complement too
6297         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
6298         fixed check for bitfields
6299
6300 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
6301
6302         * src/SDCCicode.c (geniCodeLogic): made it static,
6303         (geniCodeLogicAndOr): added in order to fix bug #905492,
6304         (ast2iCode): fixed bug #905492
6305         * support/regression/tests/bug-905492.c: added
6306         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
6307         (processParms): fixed bug #927659: don't copy parms, this will clear
6308         decorated flag
6309         * support/regression/tests/bug-927659.c: added
6310
6311 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
6312
6313         * src/SDCCast.c (addCast): don't cast float to char
6314         * device/lib/libsdcc.lib: added _memmove
6315
6316 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
6317
6318         * device/lib/large/Makefile: fixed parallel execution by
6319         replacing `make` by `$(MAKE)`
6320
6321 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6322
6323         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
6324         offsets (fixes bug #923936)
6325
6326 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
6327
6328         * device/lib/small/Makefile: fixed parallel execution by
6329         replacing `make` by `$(MAKE)`
6330
6331 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6332
6333         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
6334
6335 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
6336
6337         * src/pic/gen.c (genCpl): multi-byte complements were not working.
6338         * src/regression/Makefile: Regression test was not running.
6339
6340 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6341
6342         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
6343         complement if possible
6344         * src/SDCCval.c (valComplement),
6345         * src/SDCCicode.c (operandOperation): fixed complement of literal
6346         * support/regression/tests/onebyte.c (testComplement): added
6347
6348 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
6349
6350         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
6351         return an optimized tree; actually replace actParm with the new tree
6352         * src/SDCCast.h: added some parantheses to remove side effects
6353         * support/regression/tests/bug-920866.c
6354
6355 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
6356         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
6357         Bit operands were not being handled properly in the pic14 port.
6358         (now src/regression/add.c passes again).
6359
6360 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6361
6362         * src/SDCC.y (labeled_statement): case and default no longer require
6363         a following statement (RFE #893037)
6364
6365 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6366
6367         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
6368         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
6369         disabled (fixes bug #916294)
6370         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
6371         "mov a,acc"; patch provided by Lenny Story
6372         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
6373
6374 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6375
6376         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
6377         functions
6378         * src/ds390/gen.c (genFunction, genEndFunction),
6379         * src/ds390/ralloc.c (ds390_assignRegisters),
6380         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
6381         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
6382         pushed if there are parameters passed on the stack. Also, a cleaner
6383         way to decide if r0/r1 should be pushed/popped. (Together they fix
6384         bug #918693)
6385
6386 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6387
6388         * doc/sdccman.lyx,
6389         * device/lib/mcs51/crtpagesfr.asm,
6390         * device/lib/mcs51/crtxinit.asm,
6391         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
6392         to avoid confusion with Si Lab's SFRPAGE register.
6393
6394 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6395
6396         * src/SDCCglue.c (emitMaps): allow public sfr variables
6397         * src/SDCCglue.c (initialComments): include compiler build date
6398         with compiler version and put the timestamp of the generated
6399         assembly file on a serperate line to be less confusing.
6400         * src/port.h: added genInitStartup hook
6401         * src/avr/main.c,
6402         * src/ds390/main.c,
6403         * src/hc08/main.c,
6404         * src/pic/main.c,
6405         * src/pic16/main.c,
6406         * src/xa51/main.c,
6407         * src/z80/main.c: genInitStartup initialize as NULL (default to
6408         historical behaviour)
6409         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
6410         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
6411         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
6412         library instead of hard coding it into the compiler.
6413         * support/regression/ports/mcs51-stack-auto/spec.mk,
6414         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
6415         * device/lib/mcs51/Makefile,
6416         * device/lib/small/Makefile,
6417         * device/lib/large/Makefile,
6418         * device/lib/mcs51/crtpagesfr.asm,
6419         * device/lib/mcs51/crtstart.asm,
6420         * device/lib/mcs51/crtxclear.asm,
6421         * device/lib/mcs51/crtxinit.asm,
6422         * device/lib/mcs51/crtclear.asm,
6423         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
6424         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
6425         and into user configurable files.
6426         * device/lib/clean.mk: clean mcs51 directory too
6427         * support/regression/tests/longlit.c: added static to T1 declaration
6428         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
6429         accesses in the initialization code
6430
6431 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6432
6433         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
6434         OSCTRIMVAL as noted in bug #916008
6435
6436 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6437
6438         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
6439         in loops with multiple exits (reported as incorrect registers
6440         used by Martin Helmling in Sdcc-user list)
6441
6442 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6443
6444         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
6445         made ds390 register extensions look less like error messages
6446
6447 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6448
6449         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
6450         reported by Adam Wozniak in Sdcc-user list
6451
6452 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
6453
6454         * src/SDCCast.c (decorateType): fixed with bug and promotion in
6455         arithmetic optimizations, added debug output
6456
6457 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
6458
6459         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
6460         * sdcc.spec: updated and split sdcc into 3 rpms
6461         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
6462         needed for literals of LEFT_OP and '+'
6463         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
6464         introduced RESULT_TYPE_NOPROM
6465         (geniCodeMultiply): fixed logic for decision if mul is optimized to
6466         left shift
6467         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
6468         limited promotion to int only for '*'
6469         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
6470
6471 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
6472
6473         * src/pic16/gen.c (genSkip),
6474         (genc16bit2lit), (gencjneshort): commented out
6475         (is_LitOp): new helper function, checks operand type
6476         (genCmpEq): rewritten
6477
6478 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
6479
6480         * support/regression/tests/bug-908454.c: added
6481
6482 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
6483
6484         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
6485         * src/SDCCicode.c (usualBinaryConversions): op needs int type
6486         (geniCodeCast): cosmetic, don't preserve bit storage class
6487         (geniCodeLeftShift): added promotion
6488         (geniCodeLogic): fixed regression
6489         * src/SDCCsymt.c (computeTypeOr): accept bits too
6490         (compareType): 2nd part of fix for bug #908454, needed for bitfields
6491
6492 2004-03-07  Borut Razem <borut.razem AT siol.net>
6493
6494         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
6495
6496 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
6497
6498         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
6499         version of pic16_genPackRegisters which does not check if ic is a
6500         CAST operator,
6501         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
6502         function cause string1.c regression test fails
6503
6504 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
6505
6506         * sim/ucsim/configure.in,
6507         * sim/ucsim/configure,
6508         * sim/ucsim/doc/Makefile.in: use docdir
6509         * src/SDCC.y: fixed sbit atrributes
6510         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
6511         * src/SDCCast.c (decorateType): |^& need special promotion handling
6512         * src/SDCCast.h,
6513         * src/SDCCsymt.h: moved definition of RESULT_TYPE
6514         * src/SDCCsymt.h (computeType),
6515         * src/SDCCicode.c: computeType() needs op
6516         * src/SDCCsymt.c (checkTypeSanity),
6517         * doc/sddman.lyx: "plain" bitfields are unsigned
6518         * src/SDCCsymt.c (computeTypeOr): added
6519         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
6520         |^& ops
6521         * src/SDCCval.c (val*): computeType() needs op
6522         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
6523         * support/regression/tests/onebyte.c: added tests for |^&
6524
6525 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
6526
6527         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
6528         for writing icode into asm output.
6529
6530 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
6531
6532         * src/pic16/device.c: added some debug lines enabled
6533         with macro DEBUG_CHECK,
6534         * src/pic16/genarith.c: more debug in genPlus,
6535         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
6536         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
6537         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
6538         * (aopForSym): onStack symbols are re-placed in data memspace,
6539         and onStack flag is cleared,
6540         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
6541         copy temporary pcodeop,
6542         * (genPcall): added warning for not updating PCLATU,
6543         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
6544         always true for pic16 port,
6545         * (genMultOneWord): NEW, supports integer multiplication,
6546         * (genMult): modified to call genMultOneWord,
6547         * (ifxForOp): added warning when return NULL,
6548         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
6549         flag is set before call to operandFromSymbol for implicit
6550         added structures,
6551         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
6552         options.intlong_rent are set by default,
6553         * (_hasNativeMulFor): modified to allow port generation of integer
6554         multiplication,
6555         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
6556         set regtype to REG_SFR for all registers, restricting seting the
6557         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
6558
6559 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6560
6561         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
6562         more than 500 times in the regression tests
6563
6564 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6565
6566         * support/Util/SDCCerr.h,
6567         * support/Util/SDCCerr.c,
6568         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6569         enumerator_list),
6570         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
6571         for symbol conflicts.
6572         * support/valdiags/tests/enum.c,
6573         * support/valdiags/tests/tentdecl.c,
6574         * support/valdiags/tests/struct.c: expect possible error messages
6575         referring to original symbol definitions.
6576         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
6577         * src/SDCCsymt.h,
6578         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
6579
6580 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
6581
6582         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
6583
6584 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
6585
6586         * src/pic16/ralloc.c (newReg): fixed bug #908929
6587
6588 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6589
6590         * src/ds390/gen.c: added missing #include "main.h"
6591
6592 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
6593
6594         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
6595         checking if symbol is already in set,
6596         * src/pic16/device.h: prototype for checkAddSym,
6597         * src/pic16/gen.c: (_G): added entry interruptvector,
6598         * (assignResultValue): removed some commented out lines,
6599         * (genFunction): check for ISR via sym->type, absolute section for
6600         interrupt code is created via a new pBlock, the goto instruction is
6601         placed now correctly at the interrupt vector position, changed all
6602         references from ivec to _G.interruptvector,
6603         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
6604         is the interrupt is a high priority one, same for return from ISR,
6605         * src/pic16/glue.c: changed all calls of addSetHead for publics and
6606         externs to calls of checkAddSym,
6607         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
6608         pic16_pcode_verbose flag is set,
6609         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
6610         * src/pic16/pcoderegs.c: message about how many registers are saved
6611         will only be emitted if pic16_pcode_verbose flag is set,
6612
6613 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6614
6615         * src/ds390/ralloc.h,
6616         * src/ds390/ralloc.c (ds390_regWithIdx),
6617         * src/ds390/gen.c (emitcode),
6618         * src/ds390/main.h,
6619         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
6620         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6621         ds390operandCompare, getRegsRead, getRegsWritten,
6622         initializeAsmLineNode): customized instruction size calculation for
6623         ds390, started basis for some register optimizations
6624         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
6625         corresponding assembly output
6626         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
6627         missing push/pop of r0/r1. Optimized push/pops
6628
6629 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6630
6631         * src/mcs51/main.c (instructionSize): fixed ACALL size
6632         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
6633
6634 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
6635
6636         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
6637         the sorting of rlist with NULL elements
6638         * (print_idataType, print_idata): NEW to create idata sections
6639         * src/pic16/device.h: idataSymSet new variable
6640         * src/pic16/gen.c (genFunction): fixed some bugs in string
6641         comparing, improved the absolute section creation for ISRs,
6642         added FSR0L/FSR0H in registers that are saved in an ISR,
6643         * (genInline): fixed the processing of inline snippets,
6644         now they undergo no process by the peephole optimizer
6645         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
6646         are placed in idataSymSet,
6647         * (pic16emitStaticSeg): extern symbols are added in externs,
6648         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
6649         switching when aboslute variables are placed in access bank memory
6650         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
6651         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
6652         commented out with #if,
6653         * (pic16_packRegisters): reintroduce the check for CAST because some
6654         symbols are not correctly handled,
6655         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
6656         pCodeInstruction instead of pCode,
6657         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
6658         pCodeAsmDir definition,
6659         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
6660         directive, then the argument directive is emitted without the leading
6661         tab, hack for inline labels which must be in the first column,
6662         * (compareLabel,pic16_findNextInstruction),
6663         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
6664         * (insertBankSwitch): modified for the new pCodeAsmDir,
6665
6666 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6667         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
6668
6669         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
6670         instance,
6671         * (pushSide): commented out with #if,
6672         * (assignResultValue): fixed some typos in saving
6673         registers,
6674         * (genPcall): FIXED and sync'ed with genCall,
6675         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
6676         * (genNearPointerGet): fixed to handle some more cases,
6677         implementation scheme via table reads,
6678         * (genConstPointerGet): modified to access code memory correct,
6679         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
6680         and improved to handle some cases
6681         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
6682         instead of "RETLW" for init data
6683         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
6684         not IN_DIRSPACE, work around to reduce bank switching when aboslute
6685         variables are placed in access bank memory (<0x80 and >=0xf80),
6686         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
6687         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
6688         TBLWT_POSTDEC,TBLWT_PREINC
6689         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
6690         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
6691         directives
6692         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
6693         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
6694         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
6695         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
6696
6697 2004-02-29  Borut Razem <borut.razem AT siol.net>
6698
6699         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
6700         support/Util/findme.h, support/Util/system.h: enhance binary relative
6701         search for lib and include by using findProgramPath()
6702
6703 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6704
6705         * src/SDCCpeeph.h,
6706         * src/SDCCpeeph.c (pcDistance),
6707         * src/port.h,
6708         * src/mcs51/ralloc.h,
6709         * src/mcs51/ralloc.c (mcs51_regWithIdx),
6710         * src/mcs51/main.h,
6711         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
6712         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6713         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
6714         size calculation port specific, started basis for some register
6715         optimizations
6716         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
6717         missing push/pop of r0/r1. Optimized push/pops
6718         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
6719         * device/lib/_modsint.c (_modsint),
6720         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
6721         and stack version so regression tests pass
6722
6723 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
6724
6725         * src/Makefile.in (dep): include SLIBOBJS in dependency check
6726         * src/SDCCast.c (decorateType): catch another small optimization
6727         with '?' operator
6728         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
6729         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
6730         modified to finally use computeType() all over SDCC,
6731         see Feature Request #877103
6732         * src/SDCCval.h: cosmetic
6733         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
6734         valCompare(); regression tested in muldiv.c
6735         * support/regression/tests/muldiv.c (testMod): mod sign follows
6736         dividend only
6737
6738 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
6739
6740         * src/SDCCast.c (decorateType): fixed bug #902362
6741         * doc/INSTALL.txt: fixed install instructions for win32
6742
6743 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6744
6745         * device/include/Makefile.in (install): fixed by replacing spaces
6746         by tabs
6747         * doc/README.txt,
6748         * doc/INSTALL.txt: updated for release
6749         * doc/sdccman.lyx: added warning for --xstack being buggy
6750
6751 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6752
6753         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6754         to eliminate build warnings.
6755         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6756
6757 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6758            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6759
6760         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6761         removed -penable-stack, added comment for stack pragma, added
6762         warning for not initializing the stack/frame registers, removed
6763         comment at interrupts section
6764
6765         Stack is made permanent, there is no ability to disable stack usage.
6766         * src/pic16/device.h,
6767         * src/pic16/device.c: removed all references to USE_STACK macro,
6768         * src/pic16/device.c (pic16_dump_section): when no elements in
6769         rlist, free rlist before return,
6770         * (pic16_dump_int_registers): NEW, internal registers are a new set
6771         of general purpose registers reused by each function,
6772         * (checkAddReg): returns 1 if registers is added to set,
6773         * (pic16_groupRegistersInSection): when a registers is of type
6774         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6775         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6776         SRCASECMP macro is moved here from device.c
6777         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6778         PO_PCLATU, PO_PRODL, PO_PRODH,
6779         * (pic16_pCodeOpType, genMinus,
6780         changed compares to "a" register, with AOP_ACC,
6781         * (pic16_genPlus): fixed some bugs and indented properly,
6782         * (pic16_addSign): changed size to size+offset in the MOVWF
6783         instruction,
6784         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6785         multiply 8-bit operand by literal, result is 8-bit,
6786         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6787         multiply 2 8-bit operand, result is 8-bit,
6788         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6789         genUMult8X*_16,
6790         * src/pic16/gen.c: changed accUse to contain WREG only,
6791         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6792         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6793         true, do not use immediate addressing any more unless sym is a
6794         pointer in codespace,
6795         * (aopForRemat): do not use immediate addressing when symbol not in
6796         codespace and when symbol's address is requested,
6797         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6798         accUse size (= 1),
6799         * (aopGet): added case for AOP_ACC and don't return "accumulator
6800         bug" but WREG instead,
6801         * (popGetTempReg): pushes contents of temporary register in stack,
6802         * (popReleaseTempReg): pops contents of temporary register from
6803         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6804         * (pic16_popGet): separated case AOP_ACC to return register WREG
6805         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6806         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6807         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6808         the use of immediate pointers to certain cases only.
6809
6810         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6811         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6812         * (assignResultValue, genCall, genRet): modified to use the new
6813         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6814         genPcall is still broken,
6815         * (genFunction): added code to create 'A' type pBlocks when
6816         interrupt functions are generated, code not extensively tested yet,
6817         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6818         * (genEndFunction): modified so ISRs pop stored registers from stack,
6819         * (genMultOneByte): cleanup,
6820         * (AccRsh): added flag andmask, to and result with appropriate mask,
6821         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6822         * (genDataPointerGet): fixed and reenabled its use,
6823         * (genNearDataPointerGet): bugs fixed,
6824         * (genDataPointerSet): bugs fixed,
6825         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6826         pic16_DumpSymbol, pic16_DumpOp,
6827         * src/pic16/genutils.h: function prototypes for the above functions,
6828         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6829         pointers,
6830         * (pic16emitRegularMap): many many many improvements, but needs a
6831         major cleanup,
6832         * src/pic16/main.c: enable_stack in pic16_options is removed,
6833         * (_pic16_parseOptions): removed command line options -penable-stack,
6834         * (_process_pragma): emit stack symbol only when stack pragma is
6835         processed,
6836         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6837         redirected to FSR0L/FSR0H pair,
6838         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6839         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6840         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6841         for immediates,
6842         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6843         * (dumpPicOptype): NEW,
6844         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6845         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6846         with movff instruction,
6847         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6848         added pic16_int_regs, some packRegsFor* functions are commented out,
6849         because produce errors,
6850         * src/pic16/NOTES: minor modifications
6851
6852 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6853
6854         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6855         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6856         --pack-iram.
6857         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6858         * as/mcs51/lkaomf51.c: fixed bug #895763
6859
6860 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6861
6862         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6863
6864 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6865
6866         * doc/sdccman.lyx: added details about the HC08 storage classes and
6867         interrupts, fixed the register usage info for z80 & gbz80
6868
6869 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6870
6871         * doc/sdccman.lyx: added more pic16 port documentation
6872         * device/include/pic16/: added header pic18fregs.h
6873
6874 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6875
6876         * doc/sdccman.lyx: added Vangelis' contribution
6877
6878 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6879
6880         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6881         extend to the next CALL or PCALL, not just to the next CALL.
6882
6883 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6884
6885         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6886
6887 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6888
6889         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6890         bug #895752 and a better fix for bug #716790
6891
6892 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6893
6894         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6895
6896 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6897
6898         * doc/sdccman.lyx: minor changes, minor changed
6899
6900 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6901
6902         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6903         which can't handle SDCC_NEWONEBYTEOPS,
6904         (geniCodeMultiply): removed conversion from mult to shift for pic14
6905         and pic16
6906
6907 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6908
6909         * src/hc08/gen.h,
6910         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6911         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6912         thus fixing bug #895406
6913
6914 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6915
6916         * device/lib/_modsint.c,
6917         * device/lib/_modslong.c: sign follows divisor only
6918         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6919         signs or signedness can be ignored
6920         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6921         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6922         added optimization for IFX,
6923         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6924         arguments;
6925         reenabled optimization for IFX, which was removed on 2004-01-11
6926         * src/SDCCast.h: added return type IFX
6927         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6928         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6929         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6930         SDCC_OLDONEBYTEOPS selects the old behaviour
6931         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6932         changed again and commented promotion rule
6933         * src/SDCCval.c (valDiv): promotion no longer necessary
6934         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6935         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6936         rewritten
6937         * support/regression/tests/onebyte.c: added
6938
6939 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6940
6941         * gen.c (genInline): reverted to old code for assemnling inline
6942         code because of bug reported James Chadd
6943
6944 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6945
6946         * ralloc.h: missing declarations from previous patch,
6947         seems that patch for ralloc.h was never applied, fixed
6948
6949 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6950            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6951
6952         * pcode.c,
6953         * pcode.h,
6954         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6955         indirect addressing. Marked FSR0 as deprecated
6956         * gen.c (pointerCode): commented out, not needed now
6957         (pic16_popGet2p): new MOVFF helper function
6958         (genGenPointerGet),
6959         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6960         (shiftRLong): removed duplicate debugging info
6961
6962 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6963
6964         * src/ds390/gen.c (genNearPointerGet),
6965         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6966         optimization with bits, but not bitfields.
6967         * src/ds390/ralloc.c (packRegisters),
6968         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6969
6970 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6971
6972         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6973
6974 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6975
6976         * src/SDCCsymt.h,
6977         * src/SDCCicode.c (operandFromSymbol),
6978         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6979         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6980         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6981         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6982         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6983         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6984         bug #892038
6985         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6986         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6987         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6988         * src/SDCCsymt.c (newSymbol),
6989         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6990         enumerator_list),
6991         * src/SDCCval.h,
6992         * src/SDCCval.c (newiList): fixed bug #885705
6993
6994 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6995
6996         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6997         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6998
6999 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7000
7001         * device/include/c8051f120.h,
7002         * device/include/c8051f300.h,
7003         * device/include/c8051f310.h: added/updated header files for Silicon
7004         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7005         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
7006         in new section Submitting patches
7007
7008 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7009
7010         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
7011         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7012         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7013         genGenPointerSet),
7014         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
7015         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7016         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7017         genGenPointerSet),
7018         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
7019         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7020         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7021         genGenPointerSet),
7022         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
7023         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7024         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7025         genGenPointerSet): fixed bug #892400
7026         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
7027         to eliminate build warnings.
7028         * src/SDCCast.c (processParms),
7029         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
7030         fixed bug 751859
7031         * support/valdiag/valdiag.py: added GCC to the list of defines active
7032         when compiling with gcc
7033
7034 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7035
7036         * support/Util/SDCCerr.h,
7037         * support/Util/SDCCerr.c,
7038         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
7039         with an incomplete type (fixed bug #883734)
7040         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
7041
7042 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7043
7044         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
7045
7046 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7047
7048         * src/SDCCast.c (decorateType),
7049         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
7050         function pointer implementation
7051         * support/regression/tests/funptrs.c: added tests to verify both forms
7052         of function pointers work correctly. Added tests to verify parameters
7053         are passed in the correct order.
7054
7055 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
7056
7057         * device.c (regCompare): registers are sorted by ascending
7058         address and increasing size,
7059         * main.c (_pic16_finaliseOptions): removed the declaration
7060         of compiler macro MCU. Now a macro of the format pic18fxxxx
7061         will be defined from the command line
7062
7063 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7064             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7065
7066         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
7067         PCOP_RLCF was overwritten!
7068         * gen.c (genSkip): commented out calls to pic16_emitcode,
7069         * (genCmpEQ): fixed "long" compares, only high word did get compared,
7070         * (genlshTwo),
7071         * (genRRC): added debugging info,
7072         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
7073         overwritten while shifting,
7074         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
7075         overwritten while shifting,
7076         * (AccLsh),
7077         * (AccRsh),
7078         * (shiftLLeftOrResult),
7079         * (shiftRLeftOrResult),
7080         * (shiftRLong),
7081         * (shiftLLong): Implemented with pic16_emitpcode
7082         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
7083         * (genLeftShift): Fixed bug, operand for shift by variable always
7084         was "and"ed with 0x0f,
7085         * (genLeftShiftLiteral),
7086         * (genrshTwo),
7087         * (genRightShiftLiteral): added debugging info,
7088         * (genrshFour): added comment,
7089         * (genRightShift): determined signedness from operand "left"
7090         instead of "result"
7091
7092 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7093
7094         * src/SDCCicode.c (geniCodeParms),
7095         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
7096         function pointers, fixed function pointer bugs #861242 and #861896
7097
7098 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7099
7100         * device/include/c8051f000.h,
7101         * device/include/c8051f120.h,
7102         * device/include/c8051f300.h: added header files for Silicon
7103         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7104
7105 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
7106
7107         * src/SDCCast.c (processParams): added new type flow and restructured
7108         (gatherAutoInit): added new type flow
7109         (addCast): cosmetic changes
7110         (getLeftResultType): added new type flow for array indices, patch
7111         provided by Stas, see FR #877103
7112         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
7113         array index patch by Stas
7114         * src/SDCCast.h: added prototype getResultTypeFromType()
7115         * src/SDCCval.h,
7116         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
7117         * src/pic/glue.c (pic14emitStaticSeg),
7118         * src/pic16/glue.c (pic16emitStaticSeg),
7119         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
7120         for initialization of symbols
7121         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
7122         * support/Util/SDCCerr.h:
7123         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
7124         * .version: bumped version number to 2.3.8
7125         * device/include/Makefile.in (install),
7126         * doc/Makefile (install): changed to 'rm `find ...`' construct to
7127         avoid warnings
7128
7129 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
7130
7131         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
7132         Slade Rich fixed an optimization bug
7133         * src/pic/pcodepeep.c,
7134         * src/pic/pcoderegs.c
7135         * doc/Makefile (install): added test for directory
7136
7137 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7138
7139         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
7140         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
7141         * src/pic/ralloc.c (getRegPtr, getRegGpr),
7142         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
7143         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
7144         * as/mcs51/asexpr.c (term),
7145         * as/hc08/asexpr.c (term): fixed bug #887146
7146
7147 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7148
7149         * src/z80/gen.c (genMult): handle single byte result product
7150         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
7151         DUMMY_READ_VOLATILE (fixed bug #886367)
7152
7153 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7154
7155         * support/regression/tests/libmullong.c: fixed logic, on little endian
7156         hosts we ended without a mullong_wrapper()
7157
7158 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7159
7160         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
7161         virus/worm forged address usage.
7162
7163 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7164
7165         Fixed promotion, it should be done on AST level:
7166         * src/SDCCast.c (addCast): added promotion to int
7167         (decorateType): updated call to upCast()
7168         * src/SDCCicode.c (geniCodeLeftShift): removed call to
7169         usualUnaryConversions()
7170
7171 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
7172
7173         * support/regression/tests/literalop.c (mulWrapper): Added a
7174         wrapper to remove integer overflow warnings.
7175
7176         * support/regression/tests/float_trans.c: Made work on host.
7177
7178         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
7179         location of sz80.
7180
7181         * support/regression/generate-cases.py (main): Changed from inline
7182         to a main method.
7183
7184         * doc/Makefile (install): Changed to depth first to get rid of
7185         missing directory install warning.
7186
7187         * as/Makefile (install-doc): Made work on Mac.
7188
7189 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
7190
7191         * src/SDCCast.c: added an additional type flow in decorateType() of
7192         opposite direction, see feature request #860006; it's enabled at runtime
7193         by setting the environment variable SDCC_NEWTYPEFLOW
7194         * src/SDCCast.h: changed prototype of decorateType()
7195         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
7196         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
7197         'char' to 'int' can be omitted, if both operands are 'unsigned char';
7198         see feature request #877103
7199         * src/SDCCval.c: updated call of decorateType()
7200         (valBitwise): fixed bug #882876
7201         (valMinus): added promotion
7202         (valLogicAndOr): result is unsigned
7203         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
7204         * src/SDCCsymt.c (computeType),
7205         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
7206         must not cause an unsigned operation
7207         * src/pic/glue (pic14emitRegularMap),
7208         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
7209
7210 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
7211
7212         * src/pic/pcode.c (PCodeID): commented out left over debug code
7213
7214 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7215
7216         * support/valdiag/tests/overflow.c: added shift tests
7217         * src/pic/device.c,
7218         * src/pic/gen.c,
7219         * src/pic/gen.h,
7220         * src/pic/glue.c,
7221         * src/pic/main.c,
7222         * src/pic/pcode.c,
7223         * src/pic/pcode.h,
7224         * src/pic/pcodepeep.c,
7225         * src/pic/pcoderegs.c,
7226         * src/pic/ralloc.c,
7227         * src/pic/ralloc.h: applied patch from Slade Rich;
7228         added support for multiple code pages and multiple RAM banks on the
7229         PIC 14 port. The ASM files now no longer simply assume all the
7230         code / RAM are in the same page / bank. This means the linker can
7231         safely allocate code/RAM of separate ASM files to different pages/banks.
7232         * doc/sdccman.lyx: added Slade's tips
7233         * src/mcs51/peeph.def: fixed bug #880768
7234
7235 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7236
7237         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7238         * src/SDCCast.c (decorateType): fixed bug #880197
7239
7240 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7241
7242         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7243         getopt.h.
7244
7245         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7246         strtof is not part of C89 and isn't included with Mac OS X.
7247
7248 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7249
7250         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
7251         shiftL2Left2Result): fixed bug #879326
7252         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
7253         (genMultOneByte): fixed bug in signed vs unsigned multiplication
7254         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
7255         address fetch for clr instruction
7256         * device/lib/hc08/_mulint.c: created optimized assembly version
7257         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
7258
7259 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
7260
7261         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
7262         proposed in FR #877103
7263
7264 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
7265
7266         * src/SDCCval.c (cheapestVal): added missing checks
7267         * src/SDCCicode.c (usualBinaryConversions): fixed condition
7268         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
7269
7270 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
7271
7272         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
7273         equal operands
7274
7275 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
7276
7277         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
7278         loaded with the linker search paths (-L arguments) and the libraries
7279         to be linked with the current source (-l arguments). Changes
7280         currently will affect only the pic16 port.
7281         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
7282         include path the port specific paths and port specific libraries,
7283         * gplink command now contains the $3 argument,
7284         * src/pic16/device.h,
7285         * src/pic16/device.c,: structure PIC_device is made public and
7286         renamed to PIC16_device, the same for variable Pics which is renamed
7287         to Pics16. Updated all references to them.
7288         * src/pic16/glue.c (pic16glue): corrected bug with code
7289         initialization which bypassed the variable initializations block.
7290
7291         * device/lib/pic16/Makefile.rules: removed --penable-stack from
7292         COMPILE_FLAGS and added the --nostdinc option
7293
7294 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7295
7296         * device/include/mc68hc908jb8.h: Register defs for another member
7297         of the hc08 family. Contributed by Bjorn Bringert - thanks!
7298
7299 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
7300
7301         Documenting changes from previous commits.
7302         * configure.in (version 1.56),
7303         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
7304         when generating output files to configure the pic16 library,
7305         but now I've commented it out, since gputils aren't installed in the
7306         SF compile farm, so library won't compile
7307
7308         * device/lib/Makefile.in (version 1.56): initially I've added in
7309         target 'all' the prerequestive 'model-pic16' so it compiled the
7310         pic16 library, but now I've commented it out for the same reasons
7311         above,
7312         * added targets 'model-pic16' and 'objects-pic16' to compile the
7313         library
7314         * added target 'port-specific-objects-pic16' to handle the
7315         generated libraries and copy them into the build/ directory
7316         * added target 'clean-intermediate-pic16' to clean intermediate
7317         files into pic16 directory
7318         * in target 'installdirs' added line to create directory pic16 in
7319         the installation path
7320
7321         * device/include/Makefile.in (version 1.11): in target 'install'
7322         added lines to copy all header files to installation path,
7323         * in target 'installdirs' added line create directory for pic16
7324         headers in the installation path
7325
7326 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
7327
7328         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
7329          a function call
7330
7331 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
7332
7333         * configure,
7334         * device/lib/configure.in,
7335         * device/lib/configure: fixed for autoconf 2.57
7336
7337 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7338
7339         * src/z80/main.c (_parseOptions): fixed the portmode= command line
7340         option so that it actually works. Made it specific to the z80, since
7341         the gbz80 doesn't have these kinds of I/O ports.
7342
7343 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7344
7345         * device/include/z180.h,
7346         * device/lib/_memcpy.c,
7347         * device/lib/_memmove.c,
7348         * device/lib/_mulint.c,
7349         * device/lib/ser_ir.c,
7350         * device/lib/ser_ir_cts_rts.c,
7351         * device/lib/_strcmp.c,
7352         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
7353         * src/z80/main.c (_process_pragma): add support for pragmas bank and
7354         portmode; added deprecation warning for bank= and protmode= forms.
7355         Also, guard against buffer overflow.
7356         * src/z80/gen.c (aopGet): generate better code for sfr banked read
7357
7358 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7359
7360         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
7361         changed interrupt vector table generation to only emit declared vectors.
7362         * device/include/Makefile.in: added missing backslash
7363         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
7364
7365 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7366
7367         Mainly changes to support compilation of the device libraries
7368         * src/pic16/device.c: stack is allocated via symbol and not
7369         via literal number. The symbol is placed in the corresponding
7370         position of the data ram
7371         * (pic16_dump_section): relocatable and absolute uninitialized
7372         data are now emitted in sorted order to reduce section naming,
7373         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
7374         weren't marked as being in the access bank,
7375
7376 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7377
7378         Added portion of GNU PIC Library under the directory
7379         device/include/pic16 and device/lib/pic16. These files
7380         contain the declarations of SFRs for the PIC18Fxx2 devices.
7381         The directory is initialized via configure from toplevel.
7382
7383 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
7384
7385         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
7386         the spilllocations to be compared correctly
7387
7388 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7389
7390         * src/SDCCast.c (decorateType): fixed bug introduced today
7391
7392 2004-01-12  Borut Razem <borut.razem AT siol.net>
7393
7394         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
7395         doc/sdccman.lyx: upper case pragmas are deprecated
7396
7397 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7398
7399         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
7400         in simpler and even better code
7401
7402 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
7403
7404         * src/SDCCicode.c (operandOperation): fixed bug #874819
7405         * src/SDCCast.c (decorateType): fixed
7406         char foo (unsigned long ul) { return ul > 0; }
7407
7408 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7409
7410         * doc/sdccman.lyx: Moved and added some sections, small changes
7411         all over. Telling LaTeX to be less strict with word spacing
7412         to better keep the right margin. Changed some notes about
7413         maintainance of the ports in section 3.2.1 - is it OK like this?
7414
7415 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
7416
7417         SDCC source changes:
7418         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
7419         convilong): modified to inform the pic16 port that builtin functions
7420         are external
7421
7422         PIC16 PORT specific changes:
7423         * src/pic16/device.c pic16_dump_equates() added,
7424         processor registers declared internally by the port are emitted in
7425         the translation as equates,
7426         * src/pic16/gen.c: inline code is passed unprocessed to the
7427         translation,
7428         * (pic16_popGetLit2): fnuction modified to take second operand as
7429         pCodeOp pointer and not as literal,
7430         * (popRegFromIdx): prefixed with pic16_,
7431         * (pic16_popCombine2): modified to receive already allocated pCode
7432         operands,
7433         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
7434         * (genFunction): initializes local stack frame and pushes on stack
7435         all the registers used by this function,
7436         * (genEndFunction): restores all registers from stack and restores
7437         stack frame,
7438         * src/pic16/glue.c (pic16emitRegularMap): various changes and
7439         improvements,
7440         * (pic16glue): changed the program startup sequence,
7441         * added new dbName code 'A' for functions placed in absolute section
7442         * src/pic16/main.c: added function attribute _naked,
7443         * added pragma 'code' to place a fnuction at an absolute address,
7444         * added command line arguments --debug-ralloc and --pcode-verbose,
7445         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
7446         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
7447         * (pic16_newpCodeOpLit2): modified to take the second operand as
7448         pCodeOp pointer,
7449         * (pic16_printpBlock): modified to emit each function in a separate
7450         section,
7451         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
7452         UPPER for immediate operands,
7453         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
7454         instruction,
7455         * src/pic16/peeph.def: all peepholes with movff are commented out,
7456         because there is a problem in the pcode peep optimizer,
7457         * src/pic16/ralloc.c: the register allocator can now reuse local
7458         function symbols for another function. This saves register usage.
7459         * src/pic16/ralloc.h: added flag isLocal in structure regs,
7460
7461         Added file src/pic16/NOTES with information about program writing on
7462         the current port version.
7463
7464 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7465
7466         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
7467         and peephole 252 (array access)
7468
7469 2004-01-09  Borut Razem <borut.razem AT siol.net>
7470
7471         * src/SDCCmain.c : fixed #872250: -l command line defined library
7472           files are scanned before standard library files
7473
7474 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7475
7476         * src/SDCCast.c (decorateType): fixed bug #874046
7477
7478 2004-01-09  Borut Razem <borut.razem AT siol.net>
7479
7480         * support/scripts/sdcc.nsi: remove previous installation
7481
7482 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7483
7484         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
7485         bytes for last interrupt vector (mcs51)
7486         * sdcc.spec: fixed typo
7487
7488 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7489
7490         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
7491         gen51Code): more efficient parameter receive for --model-large
7492         ("bug" #845294)
7493
7494 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7495
7496         * src/ds390/main.c,
7497         * src/z80/main.c: added missed needLinkerScript flags (more than
7498         one port structure defined in these file)
7499         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
7500         bug #795325
7501
7502 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
7503
7504         * src/SDCCmain.c: removed various references to DEFAULT_PORT
7505         * src/port.h: added flag needLinkerScript in port->linker
7506         structure to inform whether to create a .lnk file or not,
7507         * src/avr/main.c,
7508         * src/ds390/main.c,
7509         * src/hc08/main.c,
7510         * src/mcs51/main.c,
7511         * src/pic/main.c,
7512         * src/pic16/main.c,
7513         * src/xa51/main.c,
7514         * src/z80/main.c: changed appropriately to configure
7515         needLinkerScript flag
7516         * src/pic/gen.c,
7517         * src/pic16/gen.c (genAddrOf): fixed bug #863624
7518         * src/pic/glue.c: added variable udata_section_name to
7519         override default uninitialized data segment definition for
7520         devices only with SHAREBANK memory (reported from Erik Epetrich)
7521         * (pic14emitOverlay): modified to emit a commented overlay segment
7522         directive when no overlay data exist
7523         * (picglue): modified to emit uninitialized data segment
7524         according to udata_section_name
7525         * src/pic/main.c (_pic14_parseOptions): added command line
7526         options --udata-section-name=[name] to override default
7527         udata definition name
7528         * modified _linkCmd and _asmCmd to include compiler passed
7529         arguments via -W option
7530         * src/pic16/main.c: added $l in _asmCmd, changed extension for
7531         object file from '.rel' to '.o' in port->linker structure,
7532         changed size of fptr from 2 to 3 in port structure
7533
7534 2004-01-07  Borut Razem <borut.razem AT siol.net>
7535
7536         * support/scripts/sdcc.nsi: update PATH
7537         * support/scripts/sdcc.ico: craeted
7538
7539 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
7540
7541         * device/include/Makefile.in: fix install
7542         * doc/Makefile: fix install
7543
7544 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7545
7546         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
7547         in bug #860505
7548         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
7549         how the function variable allocation summary is displayed; also
7550         include information about variables allocated to the overlay
7551         segment
7552
7553 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7554
7555         * as/mcs51/lkmain.c: Help about -Y option
7556         * as/mcs51/lkarea.c: Fixed gcc warnings
7557
7558 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7559
7560         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
7561         fixed warning
7562         * support/valdiag/tests/overflow.c: added
7563         * src/SDCCast.c (decorateType),
7564         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
7565         LEFT_OP (left shift)
7566
7567 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7568
7569         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
7570         (default behaviour).
7571
7572 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7573
7574         A python script to validate compiler diagnostic messages. It can be
7575         used to verify that sdcc complains about bad c source code and
7576         gives a good location of the error.
7577         * support/valdiag/Makefile,
7578         * support/valdiag/valdiag.py,
7579         * support/valdiag/tests/*
7580
7581 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7582
7583         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
7584         * src/SDCCsymt.c (newEnumType),
7585         * src/SDCCsymt.h
7586         * support/Util/SDCCerr.c,
7587         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
7588         enum related bugs.
7589         * support/regression/tests/enum.c: added test for enum values that
7590         require at least 2 bytes of storage.
7591
7592 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7593
7594         * src/common.h: added ifndef/define/endif macros
7595         around the header file.
7596         Bug reported from Jesus Calvino-Fraga
7597
7598 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7599
7600         * sdcc.spec: updated
7601         * device/include/Makefile.in: don't install CVS directories
7602         * device/lib/Makefile.in: added removal of CVS directories after install
7603         * doc/Makefile: fixed install, added local_icons
7604         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
7605         * src/mcs51/gen.c (genRightShift): fixed bug #870788
7606         * src/ds390/gen.c (genRightShift): fixed bug #870788
7607         * src/SDCCast.c (decorateType): fixed bug #870781
7608
7609 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7610
7611         PIC16 port related changes:
7612         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
7613         added variable stackPos,
7614
7615         * gen.c: genCall, assignResultValue: added support for
7616         pushing/retrieving function parameters to/from stack,
7617         genFunction,genEndFunction: setup stack frame for the
7618         generated function,
7619         genAddrOf: will be changed according to bug 863624
7620
7621         * added files genutils.c and genutils.h which contain gen*
7622         debugged and optimised functions extracted from gen.c
7623
7624         * glue.c: added variable 'externs' which holds extern symbols,
7625         pic16emitRegularMap: is modified to properly handle relocatable
7626          symbols under the new scheme,
7627         pic16createInterruptVect: is modified
7628         pic16printPublics: is modified to emit 'global' assembler directives,
7629         added pic16_printExterns to print extern symbols,
7630         pic16glue: initializes stack/frame pointer in the beginning of
7631         the assembly output. Temporary hack, will be corrected later,
7632         because gplink yet does not support stack and SDCC does not
7633         yet support a type of crt0.o object to create the final binary.
7634
7635         * Removed many lines that contain 8051 legacy code.
7636         * The code is finally placed under a 'code' directive.
7637         * Added port specific options.
7638
7639         * _process_pragma: simplified since now we do not need *special*
7640         include file to define SFR registers. But a separate header
7641         will be needed. This will be developed later.
7642         * _pic16_parseOptions: added, parses port specific options:
7643         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
7644         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
7645         --preplace-udata-with=
7646
7647         * _pic16_setDefaultOptions: modified to initialize section names,
7648         but hack is temporarly out of order since it needs improvement.
7649         * _pic16_genAssemblerPreamble: configuration words are emitted by
7650         their address instead of their name. This part is incomplete and
7651         supports only the 18Fxx2 devices. Other devices will emit an error
7652         during assembly since they do not contain the same set of config
7653         registers
7654         * _pic16_genIVT: is modified,
7655
7656         * pcode.c: added definitions for some hardware registers that are needed
7657         for stack support
7658         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
7659         All PCI entries are updated. Now LFSR is supported.
7660         * Removed pic16_pciTRIS is mentioned by mdubuc in source
7661         * added pic16_newpCodeOpLit2 to support instructions with
7662         two literal arguments
7663         * pic16_pCode2str: corrected code that emits assembler instructions
7664         with two literal operands and those that have an access bit modifier
7665         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
7666         this fixes a bug which caused some labels to be lost, when an
7667         assembler directive was added, i.e. banksel,
7668         * pic16_FixRegisterBanking: improved logic that causes the insertion
7669         of bank switching,
7670         * InlineFunction: functions that are called once, are not any more
7671         inlined. This can be a port option in the future,
7672
7673         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
7674
7675         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
7676         hold the corresponding uninitialized symbols,
7677         * pic16_allocProcessorRegister: registers have explicit marked the
7678         accessBank field,
7679         * pic16_allocInternalRegister: registers are explicit marked as
7680         not used,
7681         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
7682         processing list, so bit registers were lost,
7683         *
7684
7685         * ralloc.h: added field 'accessBank' and original symbol operand
7686         in register definition,
7687         * removed the field isMapped from register definition,
7688
7689         ** Several functions have been removed from various sources:
7690         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
7691         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
7692         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
7693         pic16_assignRelocatableRegisters
7694
7695         ** others have been introduced:
7696         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
7697         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
7698
7699 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
7700
7701         * support/scripts/inc2h.pl: changed definition of BIT_AT
7702         to emit 'sbit at' instead of 'bit at'. This was a request.
7703
7704         PIC16 port related preliminary changes:
7705         * gen.c: prefixed function popRegFromString with
7706         pic16_ and all references to it corrected
7707         * pcode.c: all pic16_pc_* hardware registers prefixed
7708         with underscore (_),
7709         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
7710         * ralloc.c: newReg(): when register is REG_SFR then
7711         set address to rIdx,
7712         pic16_allocProcessorRegister(): marks register wasUsed=0
7713         pic16_writeUsedRegs(): added a call to assign processor
7714         registers via pic16_assignFixedRegisters
7715
7716 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7717
7718         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
7719         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
7720         variables in unused register banks.  Also the SSEG is placed
7721         wherever there is enough space for it, and IDATA can be anywhere
7722         in internal RAM.  For now compile using -Wl-Y[stack_size].
7723         The mem file is different for this option as well, since it
7724         makes no sense of talking about DSEG lenght.
7725
7726 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
7727
7728         * src/SDCClrange.c: fixed bug 869095 that caused segfault
7729         in certain cases, e.g. when ROM assignment, patch provided
7730         from Albert den Haan.
7731
7732 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
7733
7734         Many signedness and type propagation fixes:
7735         * src/SDCCicode.c: made geniCodeCast() static
7736         replaced SPEC_ by IS_ (cosmetic)
7737         (operandOperation): fixed div and mod operation
7738         (usualBinaryConversions): added support for promotion of char
7739         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
7740         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7741         (geniCodeAdd): an array index will stay unsigned, even if promoted
7742         from char to int
7743         (geniCodeArray): ditto
7744         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7745         * src/SDCCsymt.c (computeType): added more support for char;
7746         promotion of char is selectable by promoteCharToInt, fixed signedness
7747         for all cases
7748         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7749         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7750         * src/SDCCval (val*): replaced signedness calculation by
7751         computeType()
7752         rearranged if-branches (cosmetic)
7753         (valShift): added warning W_SHIFT_CHANGED
7754         (valCompare): fixed problem with different types
7755         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7756         * support/regression/tests/literalop.c: added many cases
7757         * support/regression/tests/ast_constant_folding.c: changed finally to
7758         'unsigned int'
7759         * .version: new year, new version: 2.3.7
7760         * src/SDCCmain.c (main): applied patch #866468
7761         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7762         provided by Scott Bronson
7763         * doc/sdccman.lyx: updated documentation for sdcdb
7764         updated and added chapter tips
7765
7766 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7767
7768         * src/SDCCsymt.h: missing from yesterday's commits
7769
7770 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7771
7772         * src/SDCC.y (struct_or_union_specifier),
7773         * support/Util/SDCCerr.c,
7774         * support/Util/SDCCerr.h: verify that struct & union tags are used
7775         as declared.
7776
7777 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7778
7779         * src/SDCCglobl.h: missing from yesterday's commits
7780
7781 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7782
7783         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7784         sft_attributes, struct_declaration, parameter_declaration,
7785         type_name, start_block, declaration_list),
7786         * src/SDCC.lex (check_type): support redefinition of typedef names
7787
7788 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7789
7790         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7791         aligned xdata arrays. Erik helped me with the if clause.
7792
7793 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7794
7795         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7796         warning
7797
7798 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7799
7800         * src/SDCCast.h,
7801         * src/SDCCast.c (newAst_),
7802         * src/SDCCicode.h,
7803         * src/SDCCicode.c (ast2iCode, newiCode),
7804         * src/SDCCglobl.h,
7805         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7806         expr, statement, expression_statement, selection_statement,
7807         iteration_statement, expr_opt, jump_statement): foundation for tracking
7808         sequence points
7809         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7810         point code too)
7811
7812 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7813
7814         * support/Util/SDCCerr.c,
7815         * src/SDCCast.h,
7816         * src/SDCCast.c (createCase, createDefault, decorateType),
7817         * src/SDCClabel.c (labelUnreach),
7818         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7819         to error messages.
7820         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7821         (with thanks to Stas Sergeev)
7822         * device/include/time.h,
7823         * device/lib/time.c (CheckTime): suppress unreachable code warning
7824
7825 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7826
7827         * src/SDCCast.c (createIvalCharPtr),
7828         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7829         bug #753752)
7830         * support/regression/tests/nullstring.c: tests for these two bugs
7831
7832 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7833
7834         * support/Util/SDCCerr.h,
7835         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7836         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7837         about storage class and 'at' used inside struct or union
7838         * src/SDCCBBlock.c (iCodeFromeBBlock),
7839         * src/SDCCcse.c (ifxOptimize),
7840         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7841         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7842         printIval, emitStaticSeg, emitOverlay),
7843         * src/SDCClabel.c (deleteIfx),
7844         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7845         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7846         gatherAutoInit, processParms),
7847         * support/Util/SDCCerr.h,
7848         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7849         reporting for post-parse errors.
7850
7851 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7852
7853         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7854         implicit casts via union; they don't work on big endian systems
7855         (possible fix for bug #861138)
7856
7857 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7858
7859         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7860         * src/mcs51/main.c: fixed the fix for bug #737001
7861
7862 2003-12-15  Borut Razem <borut.razem AT siol.net>
7863
7864         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7865
7866 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7867
7868         * support/makebin/makebin.c: put output in binary mode
7869
7870 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7871
7872         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7873         xdata and data memory on startup. Set the environment variable
7874         SDCC_NOGENRAMCLEAR to disable this.
7875         * src/mcs51/peephole.def,
7876         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7877         (allows non-interrupt and interrupt code to safely compete for a resource
7878         without the non-interrupt code having to disable interrupts)
7879
7880 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7881
7882         * src/SDCCicode.c (geniCodeAdd),
7883         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7884         with valFromType if type might be a pointer and host is big endian).
7885         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7886         types, not just integer types.
7887         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7888         multiply defined with mismatching "at" address.
7889
7890 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7891
7892         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7893         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7894         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7895         with embedded nulls (fixed bug #753752)
7896
7897 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7898
7899         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7900         Apparently this did not see much testing (endless loop)
7901
7902 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7903
7904         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7905
7906 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7907
7908         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7909         gracefully handle NULL memmap pointers
7910
7911 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7912
7913         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7914         instead of deleting the iCode when an operand is volatile
7915         * src/z80/gen.c (genDummyRead),
7916         * src/mcs51/gen.c (genDummyRead),
7917         * src/ds390/gen.c (genDummyRead),
7918         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7919         not just IC_RIGHT
7920         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7921         * src/SDCC.y: fixed bug #850420
7922
7923 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7924
7925         Applied z80 i/o port patch from Peter Townson and fixed some operators
7926         to better handle operands in A register.
7927         * device/include/z180.h
7928         * src/SDCC.y
7929         * src/SDCCglue.c
7930         * src/z80/gen.c
7931         * src/z80/gen.h
7932         * src/z80/main.c
7933         * src/z80/peeph-z80.def
7934         * src/z80/peeph.def
7935         * src/z80/z80.h
7936
7937 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7938
7939         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7940
7941 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7942
7943         * device/lib/hc08/_mullong.c: Removed extra #endif
7944
7945 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7946
7947         * sim/ucsim/hc08.src/inst.cc,
7948         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7949         carries from x to h
7950         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7951         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7952         * device/include/stdarg.h: fixed varargs for hc08
7953         * device/lib/Makefile.in,
7954         * device/lib/hc08/Makefile,
7955         * device/lib/hc08/_mulint.c,
7956         * device/lib/hc08/_mullong.c: fixed some endian problems
7957
7958 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7959
7960         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7961         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7962         * device/lib/_gptrget.c,
7963         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7964
7965 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7966
7967         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7968         * src/SDCCast.c (astErrors): fixed bug #846007
7969         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7970
7971 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7972
7973         * src/SDCCast.c (decorateType): disabled a transformation I added in
7974         revision 1.188 (access to fields of a structure at an absolute address);
7975         it breaks with bitfields, extern declarations, and gcse analysis.
7976         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7977         could be assigned through a pointer, so don't complain.
7978         * src/SDCCast.c (astErrors),
7979         * src/SDCCast.h,
7980         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7981
7982 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7983
7984         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7985         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7986         output of __config directives, since gpasm now supports them
7987         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7988         pre-processor macro, i.e. -DMCU=p18f452
7989         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7990         and modified to handle 'cast' icode similarly to '=' icode
7991         * src/pic16/device.h (typedef struct PIC_device): added field
7992         'extMIface' to indicate that chip has external memory interface
7993         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7994         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7995         18F8720
7996
7997 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7998
7999         * src/SDCC.y (pointer): fixed bug #846006
8000         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
8001         * src/SDCCast.c (decorateType): fixed bug #846009
8002         * src/ds390/peeph.def,
8003         * src/ds390/gen.c (genAnd, genOr),
8004         * src/mcs51/peeph.def,
8005         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
8006
8007 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8008
8009         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
8010         * src/SDCCdflow.c
8011         * src/SDCCcse.c
8012         * src/SDCCcse.h
8013         * src/SDCCBBlock.h
8014         * src/SDCCBBlock.c
8015
8016 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
8017
8018         fixed bug #845089
8019         * src/SDCCbitv.h,
8020         * src/SDCCbitv.c: added function to free a bitvector
8021         * src/SDCClrange.h,
8022         * src/SDCClrange.c: added function to recompute the liveranges
8023         * src/avr/ralloc.c,
8024         * src/ds390/ralloc.c,
8025         * src/hc08/ralloc.c,
8026         * src/mcs51/ralloc.c,
8027         * src/pic/ralloc.c,
8028         * src/pic16/ralloc.c,
8029         * src/xa51/ralloc.c,
8030         * src/z80/ralloc.c: recompute the liveranges after register packing
8031
8032 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
8033
8034         * src/SDCCloop.c (newInduction): fixed bug #845630
8035
8036 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8037
8038         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
8039         inadvertantly left behind from my 2003-11-12 change
8040
8041 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8042
8043         Updated headers I neglected to commit yesterday.
8044         * src/SDCClrange.h,
8045         * src/SDCCicode.h
8046
8047 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8048
8049         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
8050         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
8051         * src/SDCCopt.c (eBBlockFromiCode),
8052         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
8053         the creation of the key hash table from the sequencing so it can be used
8054         earlier (for some GCSE bug fixes still pending)
8055
8056 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8057
8058         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
8059         * support/regression/tests/addsub.c: testing genPlus shortcut
8060
8061 2003-11-15  Borut Razem <borut.razem AT siol.net>
8062
8063         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
8064
8065 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8066
8067         * src/SDCCcse.c (cseBBlock): fixed bug #527779
8068         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
8069         ordering is immaterial.
8070         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
8071
8072 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8073
8074         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
8075         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
8076         (SIGSEV) of bug #840381
8077         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
8078         unlink new file before rename if new and old filenames are the same)
8079
8080 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8081
8082         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
8083         uninitialized variables) for the mcs51. Set environment variable
8084         SDCC_GENRAMCLEAR to test.
8085         xdata initialization slightly shorter
8086
8087 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8088
8089         * src/SDCCsymt.h,
8090         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
8091         #838241 & 780691 (basicly the same bug)
8092         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
8093         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
8094
8095 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
8096
8097         * src/SDCCmain.c (linkEdit): "fix" #834252
8098
8099 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8100
8101         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
8102         * src/SDCCast.h,
8103         * src/SDCC.y: fixed bug #819403
8104
8105 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8106
8107         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
8108         the reentrant attribute.
8109         * src/hc08/gen.c (genPackBits): added missing stack readjustment
8110         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
8111         simulation
8112         * src/SDCCast.c (decorateType): fixed bug with storage class not being
8113         updated during pointer dereference; f.e. ~(((char *)1)*) was being
8114         erroneously reduced to a literal.
8115         * src/hc08/ralloc.c (packRegisters, rematStr),
8116         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
8117         some cases
8118
8119 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8120
8121         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
8122         * doc/sdccman.lyx: changed from 'article' to 'book'
8123         * doc/Makefile: readded test_suite_spec and cdbfileformat
8124
8125 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
8126
8127         * device/include/stdlib.h: include malloc.h to comply with ANSI
8128         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
8129
8130 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8131
8132         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
8133         * doc/clean.mk: also remove *.out files
8134         * doc/sdccman.lyx: some additions, larger top/bottom margins
8135
8136 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8137
8138         * src/SDCC.y: fixed bug #837365
8139         * support/regression/tests/bitopcse.c
8140         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
8141         a symbol (might be valop instead)
8142         * device/lib/Makefile.in: added errno.c to HC08SOURCES
8143         * device/lib/clean.mk: added hc08 to the cleaning list
8144
8145 2003-11-04  Borut Razem <borut.razem AT siol.net>
8146
8147         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
8148           made 2003-11-04
8149         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8150           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
8151           malloc is declared in standard stdlib.h
8152
8153 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8154
8155         * device/lib/hc08/Makefile: need to clean .rel not .o files
8156         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
8157
8158 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8159
8160         * src/port.h,
8161         * src/hc08/main.c,
8162         * src/mcs51/main.c,
8163         * src/ds390/main.c,
8164         * src/z80/main.c,
8165         * src/avr/main.c,
8166         * src/pic/main.c,
8167         * src/pic16/main.c,
8168         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
8169         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
8170         tests (which uses the port's oclsExpense function)
8171         * src/SDCC.y,
8172         * src/SDCCast.c,
8173         * src/SDCCicode.c,
8174         * src/hc08/gen.c,
8175         * src/ds390/gen.c,
8176         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
8177
8178 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8179
8180         * src/SDCCcse.c (ifxOptimize),
8181         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
8182         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
8183         deleting the IFX iCode.
8184         * src/hc08/ralloc.c: reduced unneeded slocs
8185         * src/hc08/gen.c: fixed bug in asmopToBoolean
8186
8187 2003-11-04  Borut Razem <borut.razem AT siol.net>
8188
8189         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
8190           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8191           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
8192           transferred to configure
8193
8194 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
8195
8196         Use headers defined in the C[++] standards:
8197         * sim/ucsim/gui.src/serio.src/fileio.cc
8198         * sim/ucsim/gui.src/serio.src/frontend.cc
8199         * sim/ucsim/gui.src/serio.src/main.cc
8200         * sim/ucsim/gui.src/serio.src/posix_signal.cc
8201         * support/Util/NewAlloc.c
8202         * as/hc08/lklibr.c
8203         * as/mcs51/lklibr.c
8204         * as/z80/aslist.c
8205         * as/z80/assym.c
8206
8207 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8208
8209         * Added MSVC projects for hc08 assembler and linker:
8210         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
8211         /as/hc08/link_hc08.dsp
8212
8213 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8214
8215         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8216
8217 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8218
8219         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8220
8221 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8222
8223         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8224
8225 2003-10-31  Borut Razem <borut.razem AT siol.net>
8226
8227         * support/cpp2/cpplib.h,
8228           support/cpp2/cpplib.c,
8229           support/cpp2/cpplex.c,
8230           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8231           to switch _asm block preprocessing on / off. Default is
8232           #pragma preproc_asm +
8233
8234 2003-10-31  Borut Razem <borut.razem AT siol.net>
8235
8236         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8237           when outputting comment blocks (when executed with -C option) and
8238           _asm (SDCPP specific) blocks
8239
8240 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8241
8242         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8243
8244 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8245
8246         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8247
8248 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
8249
8250         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
8251         * src/SDCCast.c (decorateType): fixed bug #832664
8252
8253 2003-10-31  Borut Razem <borut.razem AT siol.net>
8254
8255         * support\cpp2\cpplex.c: fixed for SDCPP:
8256           comments(when executed with -C option) and _asm blocks
8257           were included even if they where in skipped #if block.
8258           Applied solution from GCC cpp 3.3.2
8259
8260 2003-10-31  Borut Razem <borut.razem AT siol.net>
8261
8262         * src/SDCC.lex: sdcc now understands both formats:
8263           '# <line_number> <file_name>' and
8264           '#line <line_number> <file_name>'
8265         * support/cpp2/cppmain.c: sdcpp now generates the standard
8266           '# <line_number> <file_name>' instead of former
8267           '#line <line_number> <file_name>'
8268
8269 2003-10-30  Borut Razem <borut.razem AT siol.net>
8270
8271         * support/cpp2/cpphash.h,
8272         * support/cpp2/cpplib.h
8273         * support/cpp2/cpplex.c,
8274         * support/cpp2/cppmain.c,
8275         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
8276
8277 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8278
8279         Fixed a number of problems revealed by bug #827883.
8280         * src/SDCCloop.c (loopInvariants): Spill location of the
8281         result operand should be recomputed if extracted from
8282         a loop. Also, don't extract assignments of an iTemp
8283         from a literal.
8284         * src/SDCCast.c (isConformingBody): loop reversal should
8285         not occur if the control variable is involved with a
8286         relational operator.
8287
8288 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
8289
8290         * .version: bumped to 2.3.6 to reflect the big improvements
8291         made by Erik and Klaus. Thanks!
8292
8293 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
8294
8295         Replaced the livrange code.
8296         * src/SDCClrange.c: added new LR code
8297         * src/SDCCloop.c,
8298         * src/SDCCBBlock.h: removed remainig parts from old LR code
8299         * src/ds390/ralloc.c,
8300         * src/ds390/gen.c: minor fixes to make it work with new code
8301
8302 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8303
8304         * as/hc08/asm.h,
8305         * as/hc08/lkrloc.c,
8306         * src/hc08/gen.c,
8307         * src/hc08/ralloc.c: Fix various warnings related to the hc08
8308         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
8309         (tweaked fix for bug #818696)
8310
8311 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8312
8313         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
8314
8315 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8316
8317         * src/SDCCmain.c,
8318         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
8319         * src/mcs51/gen.c (gencjneshort),
8320         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
8321         more efficient (per Scott Bronson's suggestion)
8322
8323 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8324
8325         Extended the semantics of the critical keyword to include
8326         individual statements. See RFE #827755 and #799831
8327         * src/SDCC.y
8328         * src/SDCCicode.c
8329         * src/SDCCopt.c
8330         * src/SDCCast.c
8331         * support/Util/SDCCerr.c
8332         * support/Util/SDCCerr.h
8333         * src/mcs51/gen.c
8334         * src/ds390/gen.c
8335         * src/hc08/gen.c
8336
8337 2003-10-19  Borut Razem <borut.razem AT siol.net>
8338
8339         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
8340
8341 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8342
8343         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
8344         Fixed bug #818696
8345         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
8346         and predecrement operand is displayed
8347
8348 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8349
8350         * src/SDCCval.c (valMinus): fixed bug #826041
8351
8352 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8353
8354         Some hc08 related updates that I missed earlier
8355         * sim/ucsim/stypes.h
8356         * support/regression/ports/hc08/spec.mk
8357
8358 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8359
8360         New target "hc08" for the Motorola 68hc08 family of micros
8361
8362         * configure
8363         * configure.in
8364         * Makefile
8365         * src/hc08/*
8366         * src/SDCCmain.c
8367         * src/port.h
8368         * sim/ucsim/hc08.src/*
8369         * sim/ucsim/configure.in
8370         * src/ucsim/configure
8371         * sim/ucsim/packages_in.mk
8372         * as/hc08/*
8373         * as/Makefile
8374         * device/include/mc68hc908qy.h
8375         * device/lib/hc08/*
8376         * device/lib/Makefile.in
8377         * support/regression/ports/hc08/*
8378         * support/regression/Makefile
8379
8380 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8381
8382         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
8383         regression test
8384         * src/ds390/gen.c (genCast): fixed bug #821957
8385
8386 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8387
8388         * device/lib/logf.c: "fixed" overlay bug
8389         * support/regression/ports/host/spec.mk: added m library
8390         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
8391         * support/regression/tests/float_trans: added (for Eric)
8392
8393 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
8394
8395         * src/mcs51/gen.c (genCpl): fixed bug
8396         http://sf.net/mailarchive/message.php?msg_id=6263915
8397
8398 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
8399
8400         * src/SDCCast.c (decorateType): added extended constant folding
8401         * src/SDCCsymt.c (computeType): cleanup
8402         * src/SDCCval.c (valShift): minor optimization
8403         * support/regression/tests/ast_constant_folding.c: added
8404
8405 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8406
8407         * src/SDCCmain.c: removed some unintended changes
8408
8409 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8410
8411         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
8412         * src/z80/gen.c: fixed part of bug #817589
8413         * src/SDCCsymt.c (checkFunction): fixed bug #817895
8414
8415 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
8416
8417         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
8418         * src/SDCCcflow.c
8419         * src/SDCCcse.c
8420         * src/SDCCdflow.c
8421         * src/SDCClabel.c
8422         * src/SDCClrange.c
8423         * src/SDCCmem.c
8424         * src/SDCCopt.c
8425         * src/SDCCpeeph.c
8426         * src/SDCCset.c
8427         * src/avr/ralloc.c
8428         * src/ds390/ralloc.c
8429         * src/izt/ralloc.c
8430         * src/mcs51/ralloc.c
8431         * src/pic/ralloc.c
8432         * src/pic16/ralloc.c
8433         * src/xa51/ralloc.c
8434         * src/z80/ralloc.c
8435         * src/z80/gen.c: removed unused label "release:"
8436
8437 2003-10-06  Borut Razem <borut.razem AT siol.net>
8438
8439         * src/SDCC.lex: removed definition of unused variables
8440           save_optimize and save_options
8441
8442 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
8443
8444         * clean.mk: removed '=' in "-maxdepth=1"
8445         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
8446         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
8447
8448 2003-10-06  Borut Razem <borut.razem AT siol.net>
8449
8450         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
8451           my_unput() replaced by unput()
8452
8453 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
8454
8455         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
8456         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
8457         type-punned pointer will break strict-aliasing rules"
8458         Old LR behaviour is again default; Klaus' LR can be choosen by
8459         defining the environment variable LRKLAUS
8460         * src/SDCCBBlock.h
8461         * src/SDCCloop.c
8462         * src/SDCClrange.c
8463         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
8464         * clean.mk: fixed removal of files in bin/CVS/
8465         * device/lib/clean.mk: fixed removal of directories small and large
8466         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
8467         * src/SDCCicode.c,
8468         * src/SDCCval.c: removed superflous test for pedantic
8469
8470 2003-10-05  Borut Razem <borut.razem AT siol.net>
8471
8472         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
8473           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
8474           message "unmatched #pragma SAVE and #pragma RESTORE"
8475
8476 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8477
8478         * doc/sdccman.lyx: various additions and updates (interrupts, inline
8479           assembly, critical functions, atomic, nojtbound)
8480
8481 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
8482
8483         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
8484         * src/SDCCBBlock.h
8485         * src/SDCCloop.c
8486         * src/SDCCloop.h
8487         * src/SDCClrange.c
8488
8489 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8490
8491         * src/z80/gen.h,
8492         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8493         * src/mcs51/gen.h
8494         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8495         * src/ds390/gen.h
8496         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8497         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
8498         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
8499
8500 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8501
8502         * src/z80/gen.c (genRet): fixed bug #524753
8503         * src/z80/gen.c (genCast): fixed internal error on cast from
8504         pointer to long
8505         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
8506         fix for bug #477835 to the z80
8507         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
8508         for tracking iCodes in the peephole optimizer for z80
8509
8510 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8511
8512         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
8513         the other part of bug #814548
8514         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
8515
8516 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
8517
8518         * src/SDCCcse.c: fixed part of bug #814548
8519
8520 2003-09-28  Borut Razem <borut.razem AT siol.net>
8521
8522         * src/asm.c: rewrite of printILine() to use temporary file instead
8523           a pipe
8524         * src/xa51/main.c: commented out declaration of int rewinds
8525
8526 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8527
8528         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
8529
8530 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8531
8532         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
8533         * src/asm.c (printILine): Fixed bug #811015
8534
8535 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8536
8537         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
8538         freeing.
8539
8540 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8541
8542         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
8543         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
8544         to correctly handle general case of AOP_PAIRPTR
8545         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
8546
8547 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8548
8549         * src/mcs51/ralloc.c (fillGaps),
8550         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
8551         register positioning bug)
8552
8553 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
8554
8555         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
8556
8557 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8558
8559         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
8560         genCodePointerGet, genGenPointerGet, genFarPointerSet,
8561         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
8562         (ralloc doesn't intentionally do this now, but perhaps later)
8563         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
8564         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
8565         register positioning bugs (Fixed bug #762602 and #795325)
8566         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
8567         (Fixed bug #808779)
8568         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
8569         lines that --i-code-in-asm generates
8570
8571 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8572
8573         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
8574         trying to fclose a FILE* that was already closed.
8575
8576 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8577
8578         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
8579         of const struct should be treated as if const themselves)
8580
8581 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
8582
8583         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
8584
8585 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8586
8587         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
8588         Unix (/n) and DOS (/r/n) line terminations.
8589
8590 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8591
8592         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
8593         bug #613775
8594
8595 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8596
8597         * src/mcs51/gen.c (genFunction, genEndFunction),
8598         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
8599         and restore of EA so that stack offsets to parameters are
8600         correct when using both critical and reentrant/stack-auto.
8601         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
8602         size (can be triggered in error if sloc is shared between
8603         different sized objects)
8604         * device/include/float.h: fixed macros to explicitly use
8605         unsigned long where needed
8606
8607 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
8608
8609         Feature req. 799831: added code to allow nesting of critical functions
8610         * src/mcs51/gen.c (genFunction, genEndFunction)
8611         * src/ds390/gen.c (genFunction, genEndFunction)
8612
8613 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8614
8615         * src/SDCCsymt.c (sclsFromPtr),
8616         * src/SDCCsymt.h,
8617         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
8618         support for standard C idiom of memory mapped variables; for
8619         example, *((xdata int*)0x1234) = 1 is now internally equivalent
8620         to xdata int at 0x1234 tempvar = 1.
8621         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
8622         provided by Akiya ISHIDA
8623
8624 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
8625
8626         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
8627         * src/SDCCval.c (constVal): added reduction from int to char
8628         * src/SDCCval.c (valMult, valDiv): fixed sign handling
8629         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
8630         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
8631         to ignore the sign
8632         * support/regression/tests/shifts.c: fixed
8633
8634 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8635
8636         * src/z80/gen.c (genXor): Fixed bug #805445
8637
8638 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8639
8640         Fixed bug #621531 (const & volatile confusion in the type chain).
8641         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
8642         refer to the const or volatile state of the pointer itself.
8643
8644         * src/SDCCast.c
8645         * src/SDCCglue.c
8646         * src/SDCCicode.c
8647         * src/SDCCsymt.c
8648         * src/SDCCval.c
8649         * src/SDCC.y
8650         * src/SDCCsymt.h
8651         * src/pic/gen.c
8652         * src/pic/ralloc.c
8653         * src/pic16/gen.c
8654         * src/pic16/ralloc.c
8655         * support/regression/tests/const.c
8656
8657 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8658
8659         When checking for duplicated modules, use absolute paths
8660         instead of relative paths.  Files changed:
8661
8662         * as/mcs51/lklib.c
8663         * link/z80/lklib.c
8664
8665 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8666
8667         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
8668
8669 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8670
8671         * device/include/string.h: added size_t typedef, changed
8672         prototypes to use size_t, eliminated separate reentrant and
8673         non-reentrant declarations, added _memmove declaration
8674         * device/lib/_memcpy.c: changed to use size_t instead of int,
8675         changed /4 to >>2 to avoid division library call
8676         * device/lib/_memcmp.c,
8677         * device/lib/_memset.c,
8678         * device/lib/_strncat.c,
8679         * device/lib/_strncpy.c,
8680         * device/lib/_strncmp.c: changed to use size_t instead of int
8681         * device/lib/_memmove.c: new file (fixed bug #772294)
8682         * device/lib/Makefile.in: added _memmove.c
8683         * device/lib/z80/asm_strings.s: fixed bug #772290
8684         * support/regression/tests/bitfields.c: attempt to fix host assertion
8685         failure on amd64-unknown-linux2.2
8686
8687 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8688
8689         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
8690         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
8691         * as/z80/asmain.c (main): fixed bug #801766
8692
8693 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
8694
8695         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
8696         compilers
8697
8698 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8699
8700         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
8701         reported in bug #800609
8702
8703 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
8704
8705         * Top header beautifications in src/pic16 directory:
8706           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
8707           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
8708           pcoderegs.h, ralloc.c, ralloc.h
8709         * main.c: added top header and GPL license notice
8710         * pcode.c: fixed the if-conditional warning
8711
8712 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
8713
8714         * device/lib/_mullong.c: replaced int by short for gcc
8715
8716 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8717
8718         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
8719         and JUMPTABLE iCodes properly now (worked by accident before)
8720         * src/mcs51/gen.c (leftRightUseAcc),
8721         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
8722         iCode properly now. Use getSize instead of nRegs since a & b
8723         aren't part of the nRegs tally.
8724
8725 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
8726
8727         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
8728         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
8729           before instructions that use the _STATUS register
8730
8731 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
8732
8733         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
8734         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
8735         fetching of the pointer
8736         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
8737         copied from genNearPointerSet()
8738         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
8739         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
8740         If they pop r0/r1 they must be called in the opposite order than aopOp().
8741         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8742         (resp. --stack-auto), prepared for --xstack
8743
8744 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8745
8746         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8747
8748 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8749
8750         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8751         these ports have their own __sdcc_external_start()
8752
8753 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8754
8755         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8756         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8757         type for bits was changed. It resulted in bit variables becoming
8758         global, which is not permitted in PIC 14 assembly output.
8759
8760 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8761
8762         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8763
8764 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8765
8766         Z80 and MCS51 linkers complaint if a public symbol is defined
8767         in more than one library module:
8768
8769         * as/mcs51/lklib.c
8770         * link/z80/lklib.c
8771         * as/mcs51/Makefile.in
8772
8773 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8774
8775         A few small changes that speed up the peephole optimizer.
8776
8777         * src/SDCCpeeph.c
8778
8779 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8780
8781         Try to make the peephole optimizer smarter by maintaining
8782         an association between the assembly source code and the
8783         iCodes that originated them. Put this information to use
8784         with a new peephole rule condition "notVolatile" so that
8785         the rules can be aggressive yet still safe.
8786
8787         * src/SDCCpeeph.c
8788         * src/SDCCpeeph.h
8789         * src/mcs51/gen.c
8790         * src/mcs51/peeph.def
8791
8792 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8793
8794         Fixed bug #741761
8795
8796         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8797         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8798         if the left or right operand symbols have the accuse flag set.
8799
8800 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8801
8802         Changed the type of the result of the ! (NOT) operator to char;
8803         previously it returned the same type as the source. This allows
8804         us to eliminate all the genFloatNot functions (all of its target
8805         implementations were very buggy) since !float can use the same
8806         code as !long now.
8807
8808         * src/SDCCicode.c (ast2iCode): ! returns char
8809         * src/mcs51/gen.c (genNot, genNotFloat),
8810         * src/ds390/gen.c (genNot, genNotFloat),
8811         * src/z80/gen.c (genNot, genNotFloat),
8812         * src/pic/gen.c (genNot, genNotFloat),
8813         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8814
8815 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8816
8817         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8818         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8819            during interrupts. Ensure WSAVE is located at a shared bank address.
8820         2. Fixed page selection in some places
8821         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8822            the registers name strings.
8823         4. Fixed "signed / unsigned compare" compiler warnings.
8824         5. The PIC port manages its own allocation of the general purpose
8825            registers, but makes no attempt to reuse them. As a result when
8826            compiling it soon runs out of general purpose registers. Some
8827            additional code was added to the files pcode.c and device.c to walk
8828            through the function call tree and rename the registers so that they
8829            get reused.
8830
8831         * src/pic/device.c
8832         * src/pic/gen.c
8833         * src/pic/glue.c
8834         * src/pic/pcode.c
8835         * src/pic/pcode.h
8836         * src/pic/ralloc.c
8837         * src/pic/ralloc.h
8838         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8839         genPlus() & genMinus() when the result is the same as left or right
8840
8841 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8842
8843         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8844
8845 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8846
8847         Made bitfield a distinct type from bit so that bitfields
8848         convert as per ANSI C and bits retain their traditional
8849         boolean style behaviour. Implemented bitfield support in
8850         the z80 port.
8851
8852         * src/SDCCsymt.h,
8853         * src/SDCCsymt.c,
8854         * src/SDCCast.c,
8855         * src/cdbFile.c,
8856         * src/mcs51/gen.c,
8857         * src/ds390/gen.c: bit v bitfield split
8858         * src/z80/gen.c: New support for bitfields
8859         * support/regression/tests/bitfields.c: reenabled z80,
8860         added more tests
8861
8862 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8863
8864         Rules 246.x, 247.x relate to bitfields, the others speed up
8865         access to xdata mapped I/O devices.
8866
8867         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8868
8869 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8870
8871         Cleaned up genPackBits and genUnpackBits and added two helper
8872         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8873         for literal assignments in genPackBits (thanks to Frieder for
8874         reminding me).
8875
8876         * src/mcs51/gen.c
8877         * src/ds390/gen.c
8878
8879 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8880
8881         Fixed bug #748310 (pointer to function type mishandled when the
8882         function name is omitted). Also fixed a SIGSEGV when a function
8883         attribute (reentrant, etc) is used on a non-function or on a
8884         function but misplaced before the parameter list.
8885
8886         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8887         bug #748310
8888         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8889         * support/Util/SDCCerr.h,
8890         * support/Util/SDCCerr.c: Added func attr misuse error msg
8891
8892 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8893
8894         Fixed bug #787649 by anonymous
8895         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8896         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8897
8898 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8899
8900         Fixed numerous bitfield problems.
8901
8902         * src/SDCC.y: More bitfield related error checking
8903         * src/SDCCsymt.h,
8904         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8905         * support/Util/SDCCerr.h,
8906         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8907         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8908         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8909         * support/regression/tests/bitfields.c: tests added
8910
8911 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8912
8913         Made the constant following the "interrupt" keyword optional. If
8914         omitted, the function will not automatically be given an entry
8915         in the interrupt vector table (similar to #pragma NOIV, but
8916         less syntacticly kludgy). The interrupt number is also now
8917         range checked. Also fixed a bug in the high order bit example
8918         in the manual.
8919
8920         * src/SDCC.y
8921         * src/SDCCmem.c
8922         * src/SDCCglue.c
8923         * src/SDCCsymt.h
8924         * support/Util/SDCCerr.c
8925         * support/Util/SDCCerr.h
8926         * doc/sdccman.lyx
8927
8928 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8929
8930         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8931         * src/SDCCicode.c (operandOperation): rewritten some ops
8932         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8933         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8934         other type
8935         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8936         be re-activated by defining REDUCE_LITERALS)
8937         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8938         unsigned, but are signed by default
8939         * src/SDCCval.c (constVal): rearranged
8940         * src/SDCCval.c (valMod): preliminary fix
8941         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8942         * support/regression/literalop.c: added, work in progress
8943
8944 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8945
8946         Generate warnings for useless declarations like "char data;"
8947         that don't do what new users expect.
8948
8949         * src/SDCC.y
8950         * support/Util/SDCCerr.h
8951         * support/Util/SDCCerr.c
8952
8953 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8954
8955         * src/SDCCval.c (valMult): fix overflow detection of negative int
8956
8957 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8958
8959         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8960
8961         Changes to support big endian targets:
8962
8963         * src/ports.h
8964         * src/SDCCglue.c
8965         * src/avr/main.c
8966         * src/ds390/main.c
8967         * src/izt/i186.c
8968         * src/mcs51/main.c
8969         * src/pic/main.c
8970         * src/pic16/main.c
8971         * src/xa51/main.c
8972         * src/z80/main.c
8973
8974 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8975
8976         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8977         * device/lib/time.c: fixed warning "integer overflow in expression"
8978
8979 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8980
8981         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8982         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8983         constants are unsigned; added recognition of "u" flag for unsigned
8984         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8985         * src/SDCCval.c (valDiv, valMod): fixed signdness
8986         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8987         signedness of modulo, left and right shift
8988         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8989         * support/Util/SDCCerr.h: added warning W_INT_OVL
8990         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8991         * src/SDCCast.c (ast_print): improved output of constants
8992
8993 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8994
8995         Fixed some warnings when building with MSVC:
8996
8997         * as\mcs51\asdata.c
8998         * as\z80\asdata.c
8999         * as\mcs51\asm.h
9000         * as\z80\asm.h
9001         * link\z80\aslink.h
9002         * link\z80\lkdata.c
9003         * link\z80\lkeval.c
9004         * link\z80\lkgb.c
9005         * link\z80\lkihx.c
9006         * link\z80\lks19.c
9007         * link\z80\lksym.c
9008         * support\cpp2\cpplib.c
9009         * src\ds390\gen.c
9010         * src\mcs51\gen.c
9011
9012 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
9013
9014         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
9015
9016 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9017
9018         * support\librarian\clean.mk: Do not remove Makefile.
9019         * support\librarian\Makefile: added.
9020
9021 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9022
9023         Added librarian to MSVC build:
9024         * all.dsp
9025         * sdcc.dsw
9026         * support\librarian\librarian.dsp
9027
9028         'configure' not needed for librarian, removed:
9029         * support\librarian\configure
9030         * support\librarian\configure.in
9031         * support\librarian\config_in.h
9032         * support\librarian\Makefile.in
9033
9034         Hopefully these ones built the librarian and the rest of sdcc properly:
9035         * Makefile
9036         * Makefile.common.in
9037
9038         Messed up 'configure', so revert to previous version:
9039         * configure
9040         * configure.in
9041
9042 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
9043
9044         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
9045         there, while the mantissa of a double is "only" 53 bits wide.
9046
9047 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9048
9049         Adding sdcclib to the build.  MSVC project coming soon.
9050         Files added/changed:
9051
9052         * support\librarian\clean.mk
9053         * support\librarian\configure
9054         * support\librarian\configure.in
9055         * support\librarian\config_in.h
9056         * support\librarian\Makefile.bcc
9057         * support\librarian\Makefile.in
9058         * support\librarian\sdcclib.c
9059         * Makefile.bcc
9060         * Makefile
9061         * Makefile.common.in
9062         * configure
9063         * configure.in
9064
9065 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9066
9067         Linker now complaints if linked modules have conflicting options, for
9068         example, one compiled using --model-large and another one compiled with
9069         --model-small.  The following files were modified:
9070
9071         * as\mcs51\asdata.c
9072         * as\mcs51\aslink.h
9073         * as\mcs51\asm.h
9074         * as\mcs51\asmain.c
9075         * as\mcs51\asout.c
9076         * as\mcs51\i51pst.c
9077         * as\mcs51\lkdata.c
9078         * as\mcs51\lklibr.c
9079         * as\mcs51\lkmain.c
9080         * as\z80\asdata.c
9081         * as\z80\asm.h
9082         * as\z80\asmain.c
9083         * as\z80\asout.c
9084         * as\z80\z80pst.c
9085         * link\z80\aslink.h
9086         * link\z80\lkdata.c
9087         * link\z80\lklibr.c
9088         * link\z80\lkmain.c
9089         * src\SDCCglue.c
9090
9091 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9092
9093         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
9094         as/mcs51/lklibr.c: Generate a warning when a library is not found.
9095
9096 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
9097
9098         * src/z80/mappings.i: fix _mul[us][int,long] entries
9099
9100 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9101
9102         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
9103
9104 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9105
9106         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
9107         * support/regression/tests/bitopcse.c: added
9108         fixed warning:
9109         * src/avr/gen.c:
9110         * src/pic/gen.c:
9111         * src/pic16/gen.c:
9112         * src/z80/gen.c:
9113         * src/xa51/gen.c:
9114
9115 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9116
9117         added support for new library format to z80, gbz80 linkers:
9118         *link/z80/aslink.h
9119         *link/z80/lklex.c
9120         *link/z80/lklib.c
9121         *link/z80/lklist.c
9122
9123 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9124
9125         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
9126         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
9127
9128 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
9129
9130         added DUMMY_READ_VOLATILE:
9131         * src/SDCC.y:
9132         * src/avr/gen.c:
9133         * src/xa51/gen.c:
9134         * src/z80/gen.c:
9135         * src/pic/gen.c:
9136         * src/pic16/gen.c:
9137         * src/mcs51/gen.c:
9138         * src/ds390/gen.c:
9139         * src/SDCCcse.c (algebraicOpts): many improvements
9140         * src/SDCCcse.h: removed algebraicOpts()
9141         * src/SDCCicode.c (picDummyRead): added
9142
9143 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9144
9145         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
9146         "Insufficient space in data memory".
9147
9148 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9149
9150         * src/mcs51/gen.c: fixed bug #771358
9151         * src/z80/gen.c: fixed bug #759087
9152
9153 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
9154
9155         * src/pic16/glue.c: minor cleanup by Vangelis
9156
9157 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9158
9159         * device/include/regc515c.h: fixed #758477
9160         * device/lib/_gptrget.c: saving some cycles in generic pointer get
9161         * device/lib/_gptrput.c: saved a few bytes
9162         * my tab spacing is 8, yours too?)
9163         * device/lib/_ser.c: process RX bytes earlier than TX bytes
9164         * device/lib/serial.c: process RX bytes earlier than TX bytes
9165         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
9166
9167 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9168
9169         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
9170
9171 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9172
9173     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
9174
9175 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
9176
9177         * device/lib/Makefile.in: bad fix, reverted to 1.43
9178
9179 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
9180
9181         * device/lib/Makefile.in: added missing z80 object files
9182
9183 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
9184
9185         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
9186         pic16 progress by Vangelis:
9187         * src/SDCCglobl.h:
9188         * src/SDCCmain.c:
9189         * src/pic/Makefile:
9190         * src/pic:
9191         * pic/Makefile:
9192         * pic16/device.c:
9193         * pic16/device.h:
9194         * pic16/gen.c:
9195         * pic16/gen.h:
9196         * pic16/genarith.c:
9197         * pic16/glue.c:
9198         * pic16/main.c:
9199         * pic16/pcode.c:
9200         * pic16/pcode.h:
9201         * pic16/pcodepeep.c:
9202         * pic16/peeph.def:
9203
9204 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9205
9206     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
9207
9208 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9209
9210     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
9211     added gbz80 build to MSVC project.
9212     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9213     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9214     from 8051 stuff and setup so it links using a .lnk file.
9215
9216 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9217
9218     * support/librarian/sdcclib.c: sdcc librarian.
9219     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9220     with sdcclib.
9221
9222 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9223
9224     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9225
9226 2003-07-02  Borut Razem <borut.razem AT siol.net>
9227
9228         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9229         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9230         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9231         src/xa51/main.c, src/z80/main.c:
9232         virtualization of glue() function: each port has it's own glue function,
9233         which is accessed by do_glue function pointer in PORT.general structure
9234
9235 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9236
9237         * DS800C400 fun, improved ROM interface and tinibios.
9238
9239 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9240
9241         * More support for DS80C400. Now includes beginning of interface to ROM.
9242
9243 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9244
9245         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9246
9247 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9248
9249         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
9250
9251 2003-06-19  Borut Razem <borut.razem AT siol.net>
9252
9253         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
9254
9255 2003-06-19  Borut Razem <borut.razem AT siol.net>
9256
9257         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
9258         fixed Z80 port - crt0.o: cannot open.
9259
9260 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
9261
9262         * support/Util/MySystem.c (merge_command): revert bad fix
9263
9264 2003-06-18  Borut Razem <borut.razem AT siol.net>
9265
9266         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
9267
9268 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9269
9270         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9271         option --use-stdout sends errors to stdout instead of stderr.
9272
9273 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
9274
9275         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
9276
9277 2003-06-15  Borut Razem <borut.razem AT siol.net>
9278
9279         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
9280         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
9281         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
9282         fixed width array of pointers replaced with sets;
9283         multiple include and lib paths ared transferred to preprocessor and linker
9284         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
9285         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
9286         fixed width array of pointers
9287         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
9288         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
9289         fixupPath(), getPathDifference()
9290         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
9291         fixed width array of pointers
9292
9293 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
9294
9295         * src/pic16/ralloc.c: fix warnings
9296         * src/pic16/pcode.c: fix warning
9297
9298 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
9299
9300          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
9301         know all the details, but essentially this set of changes enable
9302         the pic16 port to generate movff instructions and generate assembler
9303         directives,
9304         * src/SDCCmain.c:
9305         * src/pic16/gen.c:
9306         * src/pic16/glue.c:
9307         * src/pic16/pcode.c:
9308         * src/pic16/device.c:
9309         * src/pic16/main.c:
9310         * src/pic16/pcode.h:
9311         * src/pic16/pcoderegs.c:
9312         * src/pic16/ralloc.c:
9313         * src/pic16/ralloc.h:
9314
9315 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9316
9317         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9318         added option --vc, so sdcc errors and warnings are compatible with
9319         Microsoft Visual Studio.
9320
9321 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9322
9323         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
9324           device/lib/libfloat.lib: added atof function.
9325
9326 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
9327
9328         * doc/sdccman.lyx: updated to Lyx 1.3
9329         * doc/cdbfileformat.lyx: updated to Lyx 1.3
9330         * doc/test_suite_spec.lyx: updated to Lyx 1.3
9331         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
9332
9333 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
9334
9335         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
9336
9337 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9338
9339         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
9340           additions to the "related tools/documentation" section
9341
9342 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
9343
9344         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
9345
9346 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
9347
9348         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
9349         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
9350
9351 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
9352
9353         * doc/sdccman.lyx: fix double dash and other minor things
9354         * doc/Makefile: fix double dash
9355
9356 2003-05-28  Karl Bongers(patches from Martin Helmling)
9357         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
9358           condition and ignore commands.
9359
9360 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9361
9362         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
9363           is in parts still quite out of date, I did changes as far as I felt makes sense
9364           for a non-native english speaker.
9365           Please feel free to add to the manual or to correct my changes.
9366         * doc/Makefile: undid touching the date of intermediate tex files.
9367
9368 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9369
9370         * doc/sdccman.lyx: Manual has an index now
9371
9372 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
9373
9374         Finalize muluint/mulsint and mululong/mulslong merging:
9375         * device/lib/_mulint.c
9376         * device/lib/_mullong.c
9377         * device/lib/gbz80/mul.s
9378         * device/lib/gbz80/stubs.s
9379         * device/lib/z80/mul.s
9380         * device/lib/z80/stubs.s
9381         * src/SDCCsymt.c (initCSupport)
9382
9383 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9384
9385         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
9386         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
9387           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
9388           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
9389           instead of /Zm500.
9390
9391 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9392
9393         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
9394           the regression tests I'm not brave enough to enable 245.b, 245.c
9395         * doc/sdccman.lyx: added latex preamble for hyperref package.
9396           Using pdflatex this will give you a hyperlinked pdf file with
9397           bookmarks. (prepend '%' before /usepackage if this breaks something)
9398
9399 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9400
9401          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
9402
9403 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
9404
9405         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
9406
9407 2003-05-21    <johan AT balder>
9408
9409         * src/SDCCglue.c (printIval): fixed bug #739934
9410
9411 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9412
9413         Applied patch from bug 737905 (renamed yylineo to mylineno):
9414         * src/altlex.c
9415         * src/SDCCast.c
9416         * src/SDCglobl.h
9417         * src/SDCC.lex
9418         * src/SDCCsymt.c
9419         * src/SDCCval.c
9420         * src/pic16/pcode.c: Cleaned warnings
9421         * src/pic16/pcodeflow.c: Cleaned warnings
9422         * src/pic16/pcoderegs.c: Cleaned warnings
9423
9424 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
9425
9426         * src/pic16/pcode.c: Cleaned warnings
9427         * src/pic16/pcodepeep.c: Cleaned warnings
9428         * src/pic16/ralloc.c: Cleaned warnings
9429
9430 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9431
9432         * doc/sdccman.lyx: fixed bug 739745
9433         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
9434
9435 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
9436
9437         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
9438         it can be defined with CFLAGS when running configure
9439         * src/SDCCmain.c: fixed compiling + linking with object files
9440
9441 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
9442
9443         * configure.in: configure for pic16 port,
9444             added --disable-pic16-port
9445         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
9446         * src/SDCCmain.c: linkOptions is changed to set *,
9447             added if/endif conditional macros to remove options help
9448             messages from optionsTable when a port is not configured, added
9449             support for the PIc16 port in the ports table, when executing
9450             the compiler with no port specified on command line, a default
9451             port is selected with the new macro DEFAULT_PORT which is
9452             defined in port.h, in setDefaultOptions() linkOptions is removed
9453             from initialization assignment, since now it is a set,
9454             parseCmdLine uses setParseWithComma for linkOptions, in
9455             linkEdit() linkOptions are accessed with new function indexSet()
9456             which returns the i'th item of a set variable. See SDCCset.c, in
9457             linkEdit() when calling buildCmdLine(), added linkOptions as
9458             last argument. Now users can pass arguments to gplink via the
9459             -Wl option, main() uses pic16glue() to glue up pic16 programs
9460         * src/SDCCpeeph.c: various changes to support pic16
9461         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
9462             return the i'th item of the set
9463         * src/SDCCset.h: added function prototype for indexSet()
9464         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
9465         * src/clean.mk: added pic16 in CLEANALLPORTS variable
9466         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
9467             added macro DEFAULT_PORT
9468         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
9469         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
9470             generated
9471         * src/pic16/glue.c: commented out some error producing lines
9472         * src/pic16/main.c: __config directives are commented out to stop
9473             gpasm complaining and test the linkage with gplink, _linkCmd and
9474             _asmCmd changed to be more gplink and gpasm friendly
9475         * src/pic16/peeph.def: peep rule 3 is commented out, since it
9476             produced an error when parsed, peep rule 12 is added to utilize
9477             movff, but it is commented out since the pCode does not support
9478             yet a command with 2 address arguments
9479
9480 2003-05-18    <johan AT balder>
9481
9482         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9483         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9484 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
9485
9486         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
9487   Added feature to script commands from file.
9488
9489 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
9490
9491         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
9492         * src/SDCCutil.c: include ctype.h for win32
9493
9494 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
9495
9496         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
9497
9498 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
9499
9500         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
9501   Fixed so you can set breakpoints prior to run, run does not stop
9502   on entry now.  Add tbreak.  Other enhancements and fixes for use
9503   with ddd.
9504
9505 2003-05-12  Borut Razem <borut.razem AT siol.net>
9506
9507         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
9508
9509 2003-05-11  Borut Razem <borut.razem AT siol.net>
9510
9511         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
9512         the path of bin directory, so that PATH is the only env. variable, which has to be set
9513         in case of standard installation.
9514         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
9515         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
9516         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
9517
9518 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9519
9520         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
9521         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
9522         temp files are in the port dir; clean the gen/test directory when
9523         generating new test.c
9524         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
9525         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
9526         * support/regression/tests/zeropad.c: added
9527
9528 2003-05-09    <johan AT balder>
9529
9530         * src/SDCCglue.c: fixed bug #597940
9531
9532 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
9533
9534         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9535   cache sfr, optimize next,step, fix off by one sourceline,
9536   support ddd list function.
9537         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
9538
9539 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9540
9541         * support/regression/HTMLgen.py: added compare_s2f()
9542         * support/regression/Makefile: redo 1.27
9543         * support/regression/generate-cases.py: redo 1.5
9544
9545 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
9546
9547         * support/regression/tests/float.c: workaround 33 bit hex constant
9548         * support/regression/tests/simplefloat.c: fix division for host
9549
9550 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
9551
9552         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
9553         that tame's the PIC's over-aggressive optimizer.
9554
9555 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9556
9557          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
9558          support for MSVC.
9559
9560 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
9561
9562         Initial support for DS80C400. "Hello world" runs on TINIm400
9563         (with polled I/O).
9564
9565 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
9566
9567          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9568          * Some notes on ddd usage added in debugger/README
9569          Martin Helmling adding more features and fixes for ddd GUI debugger.
9570          Code added for nexti, stepi, up, down, and other adjustments.
9571
9572 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
9573
9574         * src/pic/pCodepeep.c non-wildcard asmops are now handled
9575         * src/pic/peeph.def Added two rules to optimize carry manipulation
9576         * src/pic/* removed debug printfs
9577
9578 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
9579
9580         * debugger/mcs51/cmd.c: added header newalloc.h
9581
9582 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
9583
9584         * as/Makefile: new EXEEXT
9585         * as/z80/Makefile: remove trailing slash of BUILDIR
9586         * as/z80/clean.mk: new EXEEXT
9587         * Makefile.common.in: add to CFLAGS (and others), don't replace it
9588         * support/cpp2/Makefile.in: new EXEEXT
9589         * src/pic/glue.c (pic14emitRegularMap): fixed warning
9590
9591 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
9592
9593         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
9594         EXEEXT was introduced to fix all related problems with targets
9595         "clean", "install" and "uninstall"; a couple of further flaws
9596         especially with "clean" have been fixed too
9597         * as/mcs51/Makefile.in
9598         * as/mcs51/clean.mk
9599         * as/z80/Makefile
9600         * Makefile
9601         * clean.mk
9602         * debugger/mcs51/Makefile.in
9603         * debugger/mcs51/clean.mk
9604         * link/z80/Makefile
9605         * link/z80/Makefile.in
9606         * link/z80/clean.mk
9607         * link/Makefile
9608         * packihx/Makefile.in
9609         * packihx/clean.mk
9610         * sim/ucsim/Makefile
9611         * sim/ucsim/clean.mk
9612         * sim/ucsim/avr.src/Makefile.in
9613         * sim/ucsim/avr.src/clean.mk
9614         * sim/ucsim/s51.src/Makefile.in
9615         * sim/ucsim/s51.src/clean.mk
9616         * sim/ucsim/xa.src/Makefile.in
9617         * sim/ucsim/xa.src/clean.mk
9618         * sim/ucsim/z80.src/Makefile.in
9619         * sim/ucsim/z80.src/clean.mk
9620         * sim/ucsim/main_in.mk
9621         * sim/ucsim/packages_in.mk
9622         * sim/ucsim/gui.src/Makefile.in
9623         * sim/ucsim/gui.src/serio.src/Makefile.in
9624         * sim/ucsim/gui.src/serio.src/clean.mk
9625         * src/Makefile.in
9626         * src/clean.mk
9627         * support/cpp2/Makefile.in
9628         * support/cpp2/clean.mk
9629         * support/makebin/Makefile
9630         * support/makebin/clean.mk
9631         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
9632         * doc/sdccman.lyx: --program-suffix no longer needed
9633
9634 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
9635
9636          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
9637          Martin Helmling added support for ddd GUI debugger.
9638          Code added to display assembly, set variables, and other commands
9639          to interface to ddd.
9640
9641 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
9642
9643         * as/Makefile: fix target clean
9644         * as/clean.mk: fix target clean
9645         * as/z80/clean.mk: fix target clean
9646
9647 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
9648
9649         * Makefile.common.in: added  AT EXEEXT AT
9650         * configure.in: removed all mingw32 stuff
9651         * configure: rebuilt from configure.in
9652         * doc/sdccman.lyx: updated section "installation"
9653         * support/scripts/sdcc_mingw32: adapted to configure
9654         * support/scripts/sdcc_cygwin_mingw32: added
9655
9656 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
9657
9658         * src/pic Added object file support for the PIC port
9659         * src/pic Applied patch from Craig Franklin (this started the object file support)
9660         * src/regression Updated the PIC regression tests for object files
9661
9662 2003-04-20  Borut Razem <borut.razem AT siol.net>
9663
9664         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
9665           lklex.c: In function `getfid':
9666           lklex.c:203: warning: array subscript has type `char'
9667         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
9668           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
9669         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
9670           stack handling macros
9671
9672 2003-04-19  Borut Razem <borut.razem AT siol.net>
9673
9674         * "handling space characters in file path" task:
9675         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
9676         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
9677         * support/Util/MySystem.h: make it self-sufficient
9678         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
9679           src/z80/main.c, sdcc/as/mcs51/lklex.c:
9680           handling space characters in file path
9681         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
9682           (it will be used by assemblers, which have their own includes, e.g. gpasm)
9683         * support/Util/MySystem.c: handling space characters in executable's path
9684
9685 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
9686
9687         * as/z80/Makefile: fix permanent rebuild of z80
9688         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
9689         * support/regression/tests/bitfields.c: added Johan's bitfields.c
9690
9691 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
9692
9693         * src/SDCCopt.c: add special case optimization to replace modulo by
9694           a power of two with a bitwise AND.
9695
9696 2003-04-18    <johan AT balder>
9697
9698         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
9699
9700 2003-04-17    <johan AT balder>
9701
9702         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
9703         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
9704
9705 2003-04-13  Borut Razem <borut.razem AT siol.net>
9706
9707         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
9708         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
9709           fixed mingw problem in adl_NORMALIZE_PATH
9710
9711 2003-04-12  Borut Razem <borut.razem AT siol.net>
9712
9713         * fixed "#pragma SAVE/RESTORE can not be nested":
9714         * src/SDCC.lex: reworked pragma handling functions
9715         * sdcc/src/SDCCglobl.h: reworked stack handling macros
9716         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
9717
9718 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9719
9720         * src/SDCCutil.c (pathEquivalent): defined but not used
9721         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
9722         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
9723         * configure: rebuilt from configure.in
9724         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9725         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9726         * device/include/Makefile.in: replace sdcc_datadir
9727         * device/lib/Makefile.in: replace sdcc_datadir
9728         * Makefile.common.in: add LDFLAGS from configure
9729         * packihx/Makefile.in: use LDFLAGS
9730         * src/Makefile.in: use LDFLAGS
9731         * support/cpp2/Makefile.in: add LDFLAGS from configure
9732         * support/makebin/Makefile: use LDFLAGS
9733         * .version: bumped version number to 2.3.5
9734
9735 2003-04-12  Borut Razem <borut.razem AT siol.net>
9736
9737         * completed "different paths" task:
9738         * src/SDCCmacro.c: fixed bug in handling quotes
9739         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
9740         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9741
9742 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9743
9744         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9745
9746 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9747
9748         * ds390/gen.c ds390/peeph.def: fix bug 706781
9749
9750 2003-04-11  Borut Razem <borut.razem AT siol.net>
9751
9752         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9753
9754 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9755
9756         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9757         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9758          set - this bit used to not be set...).
9759         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9760           bad code in PIC Port
9761         * src/regression/and2.c added to test bug 609268
9762         * src/regression/Makefile added and2.c to regression test
9763
9764
9765 2003-04-08    <johan AT CP255758-A>
9766
9767         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9768         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9769         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9770
9771 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9772
9773         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9774         fix bug #487815
9775         * support/cpp2/Makefile.in: fix bug #487815
9776         * configure: rebuilt from configure.in
9777         * Makefile.common.in: docdir changed, new path suffixes
9778         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9779         * sdcc_vc_in.h: reflect changes from sdccconf.h
9780         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9781         * src/SDCCutil.h: remove BINDIR hack
9782         * doc/sdccman.lyx: update new path hierarchy
9783
9784 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9785
9786         * src/SDCCpeeph.c: added okToRemoveSLOC test
9787
9788 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9789
9790         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9791
9792 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9793
9794         * src/SDCCpeeph.c: added labelIsReturnOnly test
9795         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9796
9797 2003-04-05    <johan AT balder>
9798
9799         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9800         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9801         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9802         * src/SDCCast.c: fixed a warning
9803         * src/SDCCast.h: fixed a warning
9804         * src/SDCCicode.c (operandFromAst): fixed a warning
9805
9806 2003-04-04    <johan AT balder>
9807
9808         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9809         * src/SDCCast.c (decorateType): fixed bug #715076
9810         * src/SDCC.y: fixed bug #702907
9811
9812 2003-04-03    <johan AT balder>
9813
9814         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9815         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9816         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9817         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9818         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9819
9820 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9821
9822         * _decdptr.c: fix return values
9823         * _gptrget.c: fix return values
9824         * _gptrgetc.c: fix return values
9825         * _gptrput.c: fix return values
9826         * _mulint.c: fix return values
9827         * as/z80/Makefile: fix 'make -j' problem
9828
9829 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9830
9831         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9832         * configure.in: big cleanup, updated to autoconf 2.5x
9833         * configure: rebuilt from configure.in
9834         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9835         * sdcc_vc_in.h: reflect changes from sdccconf.h
9836         * doc/Makefile: fixed a flaw in "make install"
9837
9838 2003-04-02    <johan AT balder>
9839
9840         * src/ds390/gen.c (genCmp): no comments
9841         * src/mcs51/gen.c (genCmp): no comments
9842         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9843         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9844
9845 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9846
9847         * support/regression/generate-cases.py: place generated file in given sub directory
9848         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9849         * support/regression/Makefile: improvements for 'make -j';
9850         side effect: it's simpler and faster now
9851
9852 2003-03-31  Borut Razem <borut.razem AT siol.net>
9853
9854         * src/z80/main.c: link-{port} and as-{port} defined without path
9855         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9856
9857 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9858
9859         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9860
9861 2003-03-30  Borut Razem <borut.razem AT siol.net>
9862
9863         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9864           changed type of list parameter to set
9865         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9866         * src/port.h: changed type of do_assemble() parameter to set
9867         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9868           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9869           definition of "cppoutfilename" macro with NULL value in preProcess()
9870         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9871         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9872         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9873           replaced with set *binPathSet
9874         * shash_add() deallocates the item, if allready exsists, before adding the new one
9875         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9876
9877 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9878
9879         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9880           a nested for loop bug in the PIC port
9881         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9882           for loops
9883
9884 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9885
9886         * support/Util/dbuf.h: remove C++ stuff to make it portable
9887
9888 2003-03-28  Borut Razem <borut.razem AT siol.net>
9889
9890         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9891           literal strings in stringLiteral()
9892         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9893         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9894           to the project
9895
9896 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9897
9898         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9899
9900 2003-03-26    <johan AT balder>
9901
9902         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9903         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9904         * src/SDCCast.c (decorateType): fixed " -v < 3"
9905
9906 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9907
9908         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9909         Added Lenny Story's debug infrastructure changes:
9910         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9911         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9912         * src/cdbFile.c: added
9913         * src/SDCCdebug.c: added
9914         * src/SDCCdebug.h: added
9915         * src/SDCCast.c (createFunction)
9916         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9917         * src/SDCCmain.c (parseCmdLine, main)
9918         * src/SDCCmem.c (redoStackOffsets)
9919         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9920         * src/SDCCsymt.h
9921         * src/common.h
9922         * src/avr/gen.c (genAVRCode)
9923         * src/ds390/gen.c (gen390Code)
9924         * src/mcs51/gen.c (gen51Code)
9925         * src/pic/gen.c (genpic14Code)
9926         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9927         * src/xa51/gen.c (genXA51Code)
9928         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9929
9930 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9931
9932         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9933         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9934
9935 2003-03-22    <johan AT balder>
9936
9937         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9938
9939 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9940
9941         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9942         * doc/cdbfileformat.lyx: added, written by Lenny Story
9943         * doc/Makefile: added cdbfileformat.lyx
9944         * doc/clean.mk: added cdbfileformat.lyx
9945
9946 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9947
9948         * src/mcs51/peeph.def: fix bug #705773
9949
9950 2003-03-20    <johan AT balder>
9951
9952         An sfr/sbit can have an "at #" AND an initializer
9953         * src/SDCCsymt.c (checkSClass):
9954         * src/SDCCmem.c (allocGlobal):
9955         * src/SDCCmem.c (allocLocal):
9956         * src/SDCCast.c (createBlock):
9957
9958 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9959
9960         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9961
9962 2003-03-16    <johan AT balder>
9963
9964         Undid the hackup of const and volatile, the problem is much bigger
9965         * src/SDCC.y:1.65
9966         * src/SDCCast.c:1.171
9967         * src/SDCCglue.c:1.138
9968         * src/SDCCicode.c:1.146
9969         * src/SDCCsymt.c:1.150
9970         * src/SDCCval.c:1.65
9971
9972 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9973
9974         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9975         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9976
9977 2003-03-13    <johan AT balder>
9978
9979         Hackup const and volatile modifiers in type chains a bit:
9980         * src/SDCC.y:1.63
9981         * src/SDCCast.c:1.169
9982         * src/SDCCglue.c:1.136
9983         * src/SDCCicode.c:1.143
9984         * src/SDCCsymt.c1.146
9985         * src/SDCCsymt.h1.59
9986         * src/SDCCval.c:1.63
9987
9988 2003-03-12    <johan AT balder>
9989
9990         * src/SDCCBBlock.h: more LRH debugging junk
9991         * src/SDCCcflow.h: more LRH debugging junk
9992         * src/SDCCloop.c: more LRH debugging junk
9993         * src/SDCC.y (struct_declaration): fixed bug #697590
9994         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9995         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9996         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9997
9998 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9999         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
10000         test function names must now match exactly).
10001         * src/SDCCcse.c: added special case in findCheaperOp to allow
10002         extending a short integer. Makes less awful code for bug 700121 test case.
10003
10004 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10005
10006         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
10007         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
10008
10009 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10010
10011         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
10012         actually called (operandsNotEqual() was called for all
10013         operandsNotEqualX tests).
10014
10015 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10016
10017         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
10018         with shorter literals. Fixes bug 700121.
10019
10020 2003-03-11    <johan AT balder>
10021
10022         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
10023
10024 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
10025
10026         * src/SDCCloop.c (mergeRegions): an evil beast is dead
10027         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
10028
10029 2003-03-10  Borut Razem <borut.razem AT siol.net>
10030
10031         * src/SDCCmain.c: pipe preprocessor's output
10032         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10033         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10034         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10035         which closes all pipes in pipeSet set
10036         * src/SDCCset.c: free deleted item in function deleteSetItem()
10037         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10038         moved from z80 to src subproject
10039         * .version: increased version number to 2.3.4
10040
10041 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
10042
10043         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
10044         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
10045         * support/regression/ports/xa51/spec.mk: fix typo
10046
10047 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
10048
10049         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
10050
10051 2003-03-09  Borut Razem <borut.razem AT siol.net>
10052
10053         * src/SDCCmain.c: pipe preprocessor's output
10054         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10055         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10056         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10057         which closes all pipes in pipeSet set
10058         * src/SDCCset.c: free deleted item in function deleteSetItem()
10059         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10060         moved from z80 to src subproject
10061
10062 2003-03-09  Borut Razem <borut.razem AT siol.net>
10063
10064         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
10065         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
10066         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
10067         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
10068         * src/SDCCglobl.h: unification of WIN32 native definitions
10069
10070 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10071
10072         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
10073
10074 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10075
10076         * src/configure.in:   check for endianess (even while cross-compiling)
10077         * src/configure:      check for endianess (even while cross-compiling)
10078         * src/configure_in.h: check for endianess (even while cross-compiling)
10079         * src/avr/gen.c:        remove old endianess stuff
10080         * src/mcs51/gen.c:      remove old endianess stuff
10081         * src/ds390/gen.c:      remove old endianess stuff
10082         * src/pic/gen.c:        remove old endianess stuff
10083         * src/pic/genarith.c:   remove old endianess stuff
10084         * src/pic/glue.c:       fix endianess check
10085         * src/pic16/gen.c:      remove old endianess stuff
10086         * src/pic16/genarith.c: remove old endianess stuff
10087         * src/pic16/glue.c:     fix endianess check
10088         * src/xa51/gen.c:       remove old endianess stuff
10089         * src/z80/gen.c:        fix endianess check
10090         * src/SDCCglue.c:       fix endianess check
10091         * src/ds390/peeph.def: fix bug 700036
10092
10093 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10094
10095         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
10096         * src/configure: find appropriate data-types on host for SDCC's int and long
10097         * src/configure.in: find appropriate data-types on host for SDCC's int and long
10098         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
10099         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
10100
10101 2003-03-07    <johan AT balder>
10102
10103         Just a big NOOP:
10104                 some minor cleanups before the big shot
10105                 OP_DEFS and OP_USES now use Kevin's protection
10106                 new option --nolabelopt
10107
10108         * src/SDCCBBlock.c:
10109         * src/SDCCast.c,:
10110         * src/SDCCcflow.c:
10111         * src/SDCCcse.c:
10112         * src/SDCCicode.c:
10113         * src/SDCCicode.h:
10114         * src/SDCClabel.c:
10115         * src/SDCCloop.c:
10116         * src/SDCCmain.c:
10117         * src/ds390/ralloc.c:
10118         * src/mcs51/ralloc.c:
10119         * src/pic/ralloc.c:
10120         * src/xa51/ralloc.c:
10121         * src/z80/ralloc.c:
10122
10123 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
10124
10125         * src/pic/pcode.c (get_op): fix 64 bit warnings
10126         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
10127         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
10128         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
10129         * support/regression/tests/malloc.c: fix 64 bit warnings
10130
10131 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
10132
10133         * src/mcs51/gen.c (genMinus): fixed bug 696436
10134
10135 2003-03-02  Borut Razem <borut.razem AT siol.net>
10136
10137         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
10138
10139 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
10140
10141         * configure.in: test for mkstemp
10142         * sdccconf_in.h: add HAVE_MKSTEMP
10143
10144 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
10145
10146         * device/include/ctype.h: removed warning while using --stack-auto
10147         * device/include/malloc.h: removed warning while using --stack-auto
10148         * device/include/string.h: removed warning while using --stack-auto
10149
10150 2003-02-23  Borut Razem <borut.razem AT siol.net>
10151
10152         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
10153         because NDEBUG is defined (see man assert)
10154         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
10155
10156 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10157
10158         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
10159         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
10160
10161 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10162
10163         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
10164         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
10165
10166 2003-02-18    <johan AT balder>
10167
10168         * as/mcs51/asmain.c (asmbl): module can start with a digit
10169         * as/z80/asmain.c (asmbl): module can start with a digit
10170
10171 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
10172
10173         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
10174         * src/asm.c: fix pipe() for Mingw32
10175
10176 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
10177
10178         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
10179         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
10180         make -V work again; --c1mode reads now from stdin
10181         * doc/sdccman.lyx: added --c1mode
10182         * support/Util/SDCCerr.c: new messages for c1 mode
10183         * support/Util/SDCCerr.h: new messages for c1 mode
10184         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
10185
10186 2003-02-15    <johan AT balder>
10187
10188         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
10189
10190 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
10191
10192         * doc/sdccman.lyx: Environment variables, -o and other minor things
10193
10194 2003-02-14    <johan AT balder>
10195
10196         * src/xa51/main.c: before anyone really tries to use it :)
10197
10198         * Install doc's in share/sdcc/doc
10199         * removed some obsolete files
10200         * Do a proper make distclean and uninstall
10201         M Makefile.common.in
10202         R sdccbuild.sh
10203         M as/Makefile
10204         M device/include/Makefile.in
10205         M device/lib/Makefile.in
10206         M doc/sdccman.lyx
10207         M link/Makefile
10208         M sim/ucsim/doc/Makefile.in
10209         M src/clean.mk
10210         R src/avr/peeph.rul
10211         R src/xa51/peeph.rul
10212         M support/cpp2/Makefile.in
10213         M support/makebin/Makefile
10214
10215
10216 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10217
10218         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10219
10220 2003-02-10  Borut Razem <borut.razem AT siol.net>
10221
10222         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10223         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10224         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10225         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10226         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10227         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10228         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10229         src/z80/Makefile.bcc: Borland Makefile cleanup
10230         * as/z80/Makefile.bcc: Added Borland Makefile
10231         * support/cpp2/borland.h: Removed
10232
10233 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10234
10235         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10236         * src/SDCC.lex: new pragma NOIV
10237         * src/SDCCglobl.h: new pragma NOIV
10238         * src/SDCCmem.c: new pragma NOIV
10239
10240 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10241
10242         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10243
10244 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10245
10246         * src/SDCCmain.c: signal handling is switched off by --debug
10247         * doc/Makefile: small fix for install; use clean.mk again
10248         * doc/clean.mk: clean *.pdf and *.html too
10249
10250 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
10251
10252         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
10253         * device/lib/printfl.c: fix a ds390 bug by making it portable
10254         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
10255         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
10256         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
10257         * debugger/mcs51/cmd.c: converted multi-line string literals
10258         * sim/ucsim/globals.cc: converted multi-line string literals
10259         * src/SDCCmain.c: introduced signal handler to remove temp files
10260         * doc/Makefile: small tweaks, implement clean
10261         * doc: removed generated files
10262
10263 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10264
10265         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
10266         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
10267         Address Record is not correctly generated for DS390."
10268
10269 2003-02-02  Borut Razem <borut.razem AT siol.net>
10270
10271         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
10272         * as/mcs51/asm.h: fixed compilation with Borland C
10273         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
10274         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
10275         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
10276         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
10277         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
10278         src/z80/Makefile.bcc: delete $(LIB) only if exist
10279         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
10280
10281 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
10282
10283         * device/include/malloc.h: introduced NULL
10284         * device/include/string.h: introduced NULL
10285         * device/include/stdlib.h: introduced NULL
10286         * device/lib/_memcpy.c: removed NULL
10287         * device/lib/_strcat.c: removed NULL
10288         * device/lib/_strchr.c: removed NULL
10289         * device/lib/_strcmp.c: removed NULL
10290         * device/lib/_strcpy.c: removed NULL
10291         * device/lib/_strcspn.c: removed NULL
10292         * device/lib/_strlen.c: removed NULL
10293         * device/lib/_strncat.c: removed NULL
10294         * device/lib/_strncmp.c: removed NULL
10295         * device/lib/_strncpy.c: removed NULL
10296         * device/lib/_strpbrk.c: removed NULL
10297         * device/lib/_strrchr.c: removed NULL
10298         * device/lib/_strspn.c: removed NULL
10299         * device/lib/_strstr.c: removed NULL
10300         * device/lib/_strtok.c: removed NULL
10301         * device/lib/malloc.c: removed NULL, include own header
10302
10303 2003-02-02    <johan AT balder>
10304
10305         * 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
10306         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
10307         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
10308         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
10309         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
10310         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
10311
10312 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10313
10314         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
10315         area 'DATA'"
10316
10317 2003-02-01    <johan AT balder>
10318
10319         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
10320
10321 2003-01-31    <johan AT CP255758-A>
10322
10323         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
10324
10325 2003-01-30    <johan AT balder>
10326
10327         * src/SDCCBBlock.c: automatic bug detection
10328         * src/SDCCicode.c: automatic bug detection
10329
10330 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10331
10332         * src/SDCCglobl.h:   now --xram-size 0 works
10333         * src/SDCCmain.c:    now --xram-size 0 works
10334
10335 2003-01-29    <johan AT balder>
10336
10337         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
10338
10339 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10340
10341         * as/mcs51/aslink.h: Added options --xram-size and --code-size
10342         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
10343         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
10344         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
10345         * src/SDCCglobl.h:   Added options --xram-size and --code-size
10346         * src/SDCCmain.c:    Added options --xram-size and --code-size
10347
10348 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
10349
10350         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
10351         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
10352
10353 2003-01-27    <johan AT balder>
10354
10355         * src/SDCC.y: fixed bug #613764
10356
10357 2003-01-26    <johan AT balder>
10358
10359         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
10360         * src/SDCCsymt.h: fixed bug #673374
10361         * src/SDCCglue.c: fixed bug #661910
10362         * src/SDCCast.c: fixed bug #458099 and 673374
10363
10364 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
10365
10366         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
10367         * as/mcs51/strcmpi.h: added
10368         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
10369         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
10370         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
10371         * as/mcs51/assym.c: strcmpi -> as_strcmpi
10372         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
10373         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
10374         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
10375         * as/mcs51/Makefile.aslink: new module strcmpi
10376         * as/mcs51/Makefile.asx8051: new module strcmpi
10377         * as/mcs51/Makefil.bcc: new module strcmpi
10378         * as/mcs51/Makefile.in: new module strcmpi
10379         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
10380
10381 2003-01-26    <johan AT balder>
10382
10383         * src/SDCCglue.c: reverted back to 1.124
10384         * src/SDCCast.c: reverted back to 1.156
10385         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
10386
10387 2003-01-25    <johan AT balder>
10388
10389         * src/SDCCglue.c: A better fix for bug #661910
10390         * src/SDCCast.c: A better fix for bug #661910
10391         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
10392
10393 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10394
10395         * src/Makefile.in: remove spawn.o
10396         * src/SDCCmain.c: remove spawn.h
10397         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
10398         * src/spawn.c: removed
10399         * src/spawn.h: removed
10400         * support/regression/ports/ds390/spec.mk: link with -r
10401
10402 2003-01-24    <johan AT CP255758-A>
10403
10404         * src/ds390/gen.c (aopOp): fixed bug #667458
10405         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
10406         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
10407         (createIvalCharPtr): an ival doesn't always have a storage class anymore
10408
10409 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10410
10411         * src/mcs51/peeph.def: better assembler identation by Frieder
10412         * src/mcs51/gen.c: better assembler identation by Frieder
10413
10414 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
10415
10416         * as/z80/string.h: removed for gcc 3.2
10417         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
10418         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
10419
10420 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10421
10422         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
10423         * src/SDCCpeeph.c (replaceRule): fix bug #663503
10424         * support/regression/Makefile: separate temp files for ports
10425         * support/regression/generate-cases.py: separate temp files for ports
10426         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10427         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10428
10429 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10430
10431         * moved tinitalk to device/examples/ds390
10432
10433 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
10434
10435         * as/mcs51/lkmem.c: rflag is for DS390
10436         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
10437         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
10438                          (linkEdit): move mem- and map-files the same way as ihx-files
10439         * src/z80/main.c (_setDefaultOptions): removed --generic
10440         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
10441         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
10442         * src/pic/glue.c (picglue): --c1mode works again
10443         * src/pic16/glue.c (pic16glue): --c1mode works again
10444         * src/asm.c (printCLine): fix #660034
10445
10446 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
10447
10448         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
10449         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
10450         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
10451         * as/mcs51/lkmem (summary): better fix for sp problem
10452         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
10453         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
10454         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
10455                                               remove --stack-after-data
10456
10457 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
10458
10459         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
10460         * src/SDCCutil.c (join): ugly bug: missing '\0'
10461         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
10462
10463 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10464
10465         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
10466         * src/port.h: typo
10467         * src/pic/main.c (_asmCmd): gpasm supports -o
10468         * src/z80/main.c: more general macros
10469         * device/lib/Makefile.in: remove intermediate files
10470
10471 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10472
10473         * .version: Bumped version number to 2.3.3
10474         * src/SDCCBBlock.c: new option -o
10475         * src/SDCCglobl.h: new option -o
10476         * src/SDCCglue.c: new option -o
10477         * src/SDCCmain.c: new option -o
10478         * src/asm.c: new option -o
10479         * src/ds390/main.c: new option -o
10480         * src/pic/glue.c: new option -o
10481         * src/pic/pcode.c: new option -o
10482         * src/pic/ralloc.c: new option -o
10483         * src/pic16/glue.c: new option -o
10484         * src/pic16/pcode.c: new option -o
10485         * src/pic16/ralloc.c: new option -o
10486         * src/z80/main.c: new option -o
10487         * device/lib/Makefile.in: use -o
10488         * support/regression/ports/ds390/spec.mk: use -o
10489         * support/regression/ports/gbz80/spec.mk: use -o
10490         * support/regression/ports/mcs51/spec.mk: use -o
10491         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
10492         * support/regression/ports/z80/spec.mk: use -o
10493         * support/regression/ports/ucz80/spec.mk: use -o
10494         * support/regression/ports/xa51/spec.mk: use -o
10495         * support/regression/fwk/lib/timeout.c: fix usage string
10496
10497 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
10498         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
10499
10500 2003-01-07    <johan AT balder>
10501
10502         * src/SDCCast.c (decorateType): fixed bug #600035
10503
10504 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
10505         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
10506         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
10507         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
10508         * src/pic/pcode.c: outcommented unused variable to remove warnings
10509         * src/pic/ralloc.c: outcommented unused variable to remove warnings
10510
10511 2003-01-06    <karl AT turbobit.com>
10512         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
10513    regression tests.
10514
10515 2003-01-06    <johan AT balder>
10516
10517         * src/SDCCicode.c: fixed array add
10518
10519 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
10520         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
10521         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
10522
10523 2003-01-04    <johan AT balder>
10524
10525         * src/SDCCval.c (getNelements): fixed the initialized array of structures
10526
10527 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10528         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
10529
10530 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10531         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
10532         * support/regression/tests/bug-524697.c: fit mem usage into 8032
10533
10534 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10535         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
10536
10537 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
10538         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
10539
10540 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
10541         * src/mcs51/main.c: removed {bindir}{sep} from aslink
10542
10543 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10544
10545     * in \sdcc\as\mcs51\ changed these files in order to create an
10546     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
10547     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
10548     following files to include the previous two files: aslink.dsp,
10549     Makefile.aslink, Makefile.bcc, and Makefile.in.
10550
10551     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
10552     .adb instead of .cdb
10553
10554 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10555
10556         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
10557         value from option --iram-size.
10558
10559 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10560
10561         * \sdcc\as\mcs51\lklist.c: added boundary check before using
10562         dram[] array.
10563
10564 2002-09-18    <wiml AT hhhh.org>
10565
10566         * SDCClrange.h: exposed setFromRange() and setToRange()
10567         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
10568           packRegsForAccUse() (bug 542397)
10569         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
10570           multiple times and emitting the fetch operations more than once
10571           added aopGetUsesAcc() function to allow binary operators to
10572           fetch their operands in the correct order; made genMinus() emit
10573           compact code for X = LITERAL - Y
10574
10575 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10576         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
10577         sprintf() in line 1267.
10578
10579 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10580         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
10581         like ports.
10582
10583 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10584         Changes to aslink (All the changes are marked with 'JCF'):
10585
10586         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
10587         summary().
10588
10589         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
10590         area BSEG.  Also moves, if possible, the DATA area down into the internal
10591         ram so more space is available.
10592
10593         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
10594         sflag.
10595
10596         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
10597         not bytes.  Function summary() which creates a memory usage summary
10598         file with extension .mem.  Reports of overlaping stack and small stack
10599         size.  If the space for the stack is less than 16 bytes aslink trows a
10600         warning.
10601
10602         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
10603         the 8051.  Option 'y' for memory summary output file.
10604
10605         Changes to sdcc (All the changes are marked with 'JCF'):
10606
10607         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
10608
10609         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
10610         overlaying area for it (uses RegBankUsed[4]).
10611
10612         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
10613         bank zero as used by default.  By default aslink locates the stack
10614         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
10615         the creation of the .mem file.  Delegates the allocation of data area
10616         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
10617         the begining of the stack area to aslink.
10618
10619         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
10620         glue() in SDCCglue.c creates an area for it.
10621
10622 2002-09-03  Borut Razem <borut.razem AT siol.net>
10623         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
10624         sdcc/src/pic/glue.c:
10625         introduced atexit() handler for teporay files removal in case of
10626         errors, assertions, ...
10627
10628 2002-08-29  Borut Razem <borut.razem AT siol.net>
10629         * sdcc/support/cpp2/auto-host_vc_in.h:
10630         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
10631         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
10632         Maybe there is a similar problem with BORLANDC? It should be checked!
10633
10634         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
10635         corrected improper use of assert: the assignment to clr variable was done inside the assert.
10636         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
10637         was not executed, and the compiler (cl) launched a warning:
10638         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
10639
10640 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10641         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
10642
10643 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
10644         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
10645
10646         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10647           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
10648           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
10649           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10650           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
10651           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
10652           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
10653         - added Release configuration in VS projects
10654         - review of compiler an linker options
10655         - VC .exe files are generated in bin_vc directory, not to interfere
10656           with binaries generated from other projects (cygwin, mingw, bcc ...)
10657
10658         * sdcc/src/yacc.dsp: added
10659
10660         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
10661         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
10662         and insert the version number definitions from .version
10663
10664         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
10665
10666         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
10667         added - genarate auto-host.h using auto-host_vc_in.h as template
10668
10669         * sdcc/sdcc_vc.h,
10670         removed from CVS, generated automatically
10671
10672 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
10673         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
10674
10675 2002-08-11  Borut Razem <borut.razem AT siol.net>
10676         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
10677
10678 2002-08-10  Borut Razem <borut.razem AT siol.net>
10679         * src/SDCCmain.c (main):
10680         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
10681         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
10682         The consequence was that some temporary files were not removed.
10683
10684         * src/SDCCglue.c:
10685         unification of code in functions tempfilename() and tempfile():
10686         function tempnam() is defined in Visual Studio 6.0 and .NET
10687
10688         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
10689
10690         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10691           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
10692         - removed compiler command line option /WX: Treats all warnings as errors
10693         - update a list of source files, included into the project
10694
10695         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10696           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
10697         changed project type to Generic Project so that can be correcly converted to VS.NET project
10698
10699         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
10700
10701         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
10702
10703         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
10704
10705         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
10706         added return 0 statements after assert() to make compiler happy
10707
10708         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
10709         added newline in the def file to keep MSC compiler satisfied
10710
10711         * sdcc/src/z80/gen.c:
10712         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
10713           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
10714         - solved MSC error in function aopDump()
10715
10716         * sdcc_vc.h: define PREFIX as "\\sdcc"
10717
10718 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
10719         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
10720
10721 2002-06-22  Scott Dattalo <scott AT dattalo.com>
10722         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
10723         - Rewrote the register banking algorithm.
10724         - Added pCode live-range analysis to registers (for now, only non-used and
10725         singly-used registers optimized away)
10726
10727         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
10728
10729         * 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.
10730
10731 2002-05-10  Scott Dattalo <scott AT dattalo.com>
10732         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
10733
10734 2002-04-22  Michael Hope  <michaelh AT vroom>
10735
10736         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
10737
10738         * configure.in (DD_COPT): Added include support required for gbdk.
10739
10740         * .version: Bumped version number just to increase it.
10741
10742         * src/SDCCmain.c: Added -nostdinc to the default options.
10743
10744 2002-04-15  Michael Hope  <michaelh AT vroom>
10745
10746         * device/lib/z80/printf.c (sprintf): Added.
10747
10748         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10749
10750         * src/z80/peeph.def: Added transpose redundent load rule.
10751
10752         * src/z80/main.c: Added force callee saves for jaune.
10753
10754         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10755
10756         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10757
10758 2002-03-28  Johan Knol  <johan AT balder>
10759
10760         * src/SDCCval.c: fixed bug #532436
10761
10762 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10763         * /src/port.h:
10764         Added "char *Processor" field to the port structure.
10765
10766         * /src/SDCCmain.c:
10767         Added -p option. Allows port dependent processor to be specified.
10768
10769         * all ports:
10770         Initialized the new field char *Processor field to NULL in all ports
10771
10772         * /src/pic/*:
10773         Compiler generated registers for interrupt context saving
10774         were not getting allocated.
10775
10776 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10777
10778         * /src/SDCCast.c:
10779         Fixed left shift. Will promote the left side of a left shift
10780         if a) left shifting more than size of operand or b) when assigned
10781         to something size > size of left side
10782
10783 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10784         * src/pic/*
10785         tons of changes. Register allocation has been
10786         rewritten. Added customization for the various PICs. Flow
10787         analysis is restructured. ...
10788
10789         * src/pic/device.h:
10790         Added
10791
10792         * src/pic/device.c:
10793         Added. device.c is a PIC port hack to accomodate variations
10794         in PIC devices.
10795
10796 2002-03-13  Michael Hope  <michaelh AT vroom>
10797
10798         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10799
10800 2002-03-04  johanknol  <johanknol AT manik>
10801
10802         * /src/SDCCval.c: fixed
10803
10804         const unsigned char arr[][2] = { { 0, 1 } };
10805         t18.c:1: error: Initializer element is not constant
10806
10807 2002-03-04  bela  <bela AT manik>
10808
10809         * /device/include/mcs51reg.h:
10810         ds89c420 register definition update
10811
10812 2002-03-03    <johan AT FRIJA>
10813
10814         * support/Util/SDCCerr.c: did something, but don't no why anymore
10815
10816         * support/regression/tests/bug-524691.c: made it a little less shy
10817
10818         * src/SDCCast.c (decorateType): fixed bug #524697
10819
10820         * src/SDCCast.c: made some lineno improvements
10821
10822         * src/SDCCval.c (getNelements): changed warning to error
10823
10824         * src/SDCCglue.c (printIvalArray): changed warning to error
10825
10826         * src/SDCCicode.c: fixed a warning for mingw
10827
10828         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10829
10830         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10831
10832 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10833
10834         * src/ds390/peeph.def:
10835         Added some more peephole rules
10836
10837         * src/ds390/gen.c: Various fixes & enhancements
10838
10839         * src/SDCClrange.c, src/SDCClrange.h:
10840         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10841
10842         * src/ds390/ralloc.c:
10843         various fixes & enhancements (ds390) specific
10844
10845         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10846         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10847         from rallocs.
10848
10849         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10850
10851 2002-03-02    <johan AT FRIJA>
10852
10853         * src/SDCCast.c (decorateType): fixed bug #524708
10854
10855         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10856
10857         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10858
10859 2002-03-01  Michael Hope  <michaelh AT vroom>
10860
10861         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10862
10863         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10864
10865 2002-03-01    <johan AT FRIJA>
10866
10867         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10868
10869         * src/SDCCast.c (decorateType): fixed bug #524209
10870
10871         * src/SDCCval.c (valNot): fixed bug #524195
10872
10873 2002-02-26    <johan AT balder>
10874
10875         * src/xa51/gen.c: fixed a warning
10876
10877         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10878
10879         * src/SDCCast.c (decorateType): fixed bug #522534
10880
10881 2002-02-23    <johan AT balder>
10882
10883         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10884
10885 2002-02-22    <johan AT balder>
10886
10887         * src/SDCCast.c: fixed bug #514865
10888
10889         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10890
10891 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10892
10893         * sdcc/src/SDCCloop.c:
10894         Previous fix was not good. basic blocks that have "break" or "return" are
10895         not really partof a loop , but live ranges used in these blocks should
10896         be live thru the entire loop, so set partOfLoop but don't add them to
10897         loop region
10898
10899 2002-02-21    <johan AT FRIJA>
10900
10901         * src/SDCCcse.c: fixed bug #514308
10902
10903 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10904
10905         * src/SDCCloop.c:
10906         Fixed BUG #519583. If a conditional block ended in a return/break
10907         statement inside a loop, it was not being considered part of the loop.
10908
10909         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10910
10911 2002-02-10  Karl Bongers <karl AT turbobit.com>
10912
10913         * debugger/*:
10914         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10915         with lots of comments and notes.
10916
10917         * device/examples/test2.c:
10918         Fix bug, "red" variable not being initialized(compiler complained).
10919
10920         * device/examples/Makefile, examples/test3.c:
10921         Add Makefile in device/examples folder, compiles test3.c
10922         for use as a multiple module SDCDB test case.
10923
10924         * sim/ucsim/cmd.src/cmdset.cc:
10925         Took out debug printfs in ucsim "next" command.
10926
10927         * sim/ucsim/xa.src:
10928         Karl and Johan start ucsim XA support.  Most dissassembly working,
10929         about 75% emulation done(plenty of work remaining).
10930
10931         * sim/ucsim/z80.src:
10932         Add Z80 support to ucsim, add test-ucz80 regression test,
10933         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10934         Notice z80 compiler fails on examples/test3.c/crc code.
10935
10936 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10937
10938         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10939         Added support for --parms-in-bank1
10940
10941         * src/ds390/peeph.def:
10942         added a few more peephole optimzations
10943
10944         * src/ds390/main.c:
10945         1) added __builtin_inp & __builtin_outp used to read in data of given length
10946            from a memory mapped port
10947         2) added __builtin_memcmp
10948         3) added __builtin_swapw swap bytes of a short
10949
10950         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10951         1) handle multiple send & receives from register bank1
10952         2) ralloc can now allocate DPTR1 to some liveRanges
10953
10954         * src/SDCCsymt.c, src/SDCCsymt.h:
10955         changes to handle multiple sends & receives
10956
10957         * src/SDCCptropt.h:
10958         added some pointer arithmetic optimization
10959
10960         * src/SDCCptropt.c:
10961         added some pointer arithmetic optimizations but not stable yet so not
10962         called from anywhere (will get this working shortly)
10963
10964         * src/SDCCopt.c: fixed for multiple sends & receives
10965
10966         * src/SDCCmain.c:
10967         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10968         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10969            set preprocessor defines (depending on options)
10970
10971         * src/SDCCicode.c, src/SDCCicode.h:
10972         changes made to handle multiple sends & receives
10973
10974         * src/SDCCglobl.h:
10975         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10976
10977         * src/SDCCcse.c, src/SDCCcse.h:
10978         added function findbackward def (to be used in upcoming optimization)
10979
10980         * src/SDCCcflow.c, src/SDCCcflow.h:
10981         added function returnAtEnd - to determine if a basic block terminates with
10982         a RETURN iCode
10983
10984         * src/SDCCast.c, src/SDCCast.h:
10985         added option parms-in-bank1
10986
10987         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10988         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10989         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10990         adjusted for --parms-in-bank1 option
10991
10992         * device/include/string.h:
10993         donot redefine "reentrant" keyword
10994
10995         * device/include/ds80c390.h: Added some more SFRs
10996
10997 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10998
10999         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
11000
11001 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
11002
11003         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
11004
11005 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
11006
11007         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
11008
11009 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
11010
11011         * Added --xram-movc option
11012
11013 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
11014
11015         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
11016
11017 2002-01-11  Johan Knol
11018
11019         * Added math lib of Jesus Calvino-Fraga
11020
11021 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
11022
11023         * src/SDCCmain.c (processFile): fix processing of ../../src.c
11024         * support/regression/Makefile: new target test-mcs51-stack-auto
11025         * support/regression/ports/mcs51-stack-auto/spec.mk: added
11026
11027 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11028
11029         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
11030
11031 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11032
11033         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
11034
11035 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
11036
11037         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
11038
11039         * src/SDCCglue.h: add definition for printIvalChar()
11040
11041 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11042
11043         * src/SDCCast.c: fix #498138 by Johan
11044
11045         * src/SDCCglue.c: fix #498138 by Johan
11046
11047 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11048
11049         * support/regression/Makefile: fix clean
11050
11051         * support/regression/ports/ds390/support.c: fix transmission of last character
11052
11053 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
11054
11055         * /sdcc/src/ds390/gen.c:
11056         a) improved computing address of stack variable
11057         b) took out some #if 0 code
11058         c) improved parmBytes adjustment
11059         d) improved genPlusIncr & genMinusIncr
11060         e) genCmp could generate bad code (when left assigned to DPTR)
11061         f) Fixed bug in hasInc
11062
11063         * /sdcc/src/ds390/ralloc.c:
11064         a) packRegsForSupport could mess up live information (Fixed)
11065         b) packRegsDPTRuse could be incorrect for left & right shift
11066
11067         * /sdcc/src/mcs51/ralloc.c:
11068         packRegsForSupport could mess up the live information (Fixed)
11069
11070         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
11071
11072         * /sdcc/src/SDCCast.c:
11073         can reverse a loop even if function call is present as long
11074         as the loop control variable is local & is not passed as parameter
11075
11076 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11077
11078         * /sdcc/ChangeLog: *** empty log message ***
11079
11080         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
11081         More builtin function additions for TININative
11082
11083         * /sdcc/src/ds390/ralloc.c:
11084         Had broken the regression testsuite
11085
11086         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
11087
11088         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
11089         Added funcattr hasStackParms will be set for reentrant functions when there
11090         are paramteres on the stack, this helps in minimizing frame pointer generation
11091         typeFromStr can handle function pointers now
11092
11093         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
11094         *** empty log message ***
11095
11096 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11097
11098         * /src/ds390/gen.c, /src/ds390/main.c:
11099         More builtin function additions for TININative
11100
11101         * /src/ds390/ralloc.c:
11102         Had broken the regression testsuite
11103
11104         * /src/SDCCast.c: Fixed a bug in dumptree
11105
11106         * /src/SDCCsymt.c, /src/SDCCsymt.h:
11107         Added funcattr hasStackParms will be set for reentrant functions when there
11108         are paramteres on the stack, this helps in minimizing frame pointer generation
11109         typeFromStr can handle function pointers now
11110
11111         * /doc/builtins.txt, /doc/TININative.txt:
11112         *** empty log message ***
11113
11114
11115 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11116
11117         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
11118         ALPHA version for -mTININative
11119
11120         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
11121         updated to reflect changes in the port structure
11122
11123         * /src/port.h:
11124         added function do_assemble (similar to do_link) if non-null this function
11125         will be called to do assembly (-mTININative) requires a multi command
11126         assembly
11127         added function genAssemblerEnd will be called to generate assembler Epilogue
11128
11129         * /src/SDCCsymt.c:
11130         added _JavaNative to debug info printing
11131
11132         * /src/SDCCmain.c: added option --tini-libid
11133         added port->do_assemble function (-mTININative) has a multi command assemble
11134
11135         * /src/SDCCglue.c: Disabled "constExpr" check
11136         added port->genAssemblerEnd function
11137
11138         * /src/SDCCglobl.h: Added option --tini-libid value
11139
11140         * /src/SDCCast.h:
11141         tookout optimizeCompare from the header (has no external references)
11142
11143         * /src/SDCCast.c: made one more function "static"
11144
11145 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
11146
11147         * src/z80/mappings.i: Added z80asm support.
11148
11149         * src/z80/main.c: Added z80asm support on --asm=z80asm
11150
11151         * src/z80/gen.c: Fixed asm portability issues.
11152
11153         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
11154
11155         * src/SDCCglue.c (printExterns): Added global/extern split.
11156
11157 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
11158
11159         * support/regression/Makefile: added test for mcs51 model large
11160
11161         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
11162
11163         * support/regression/ports/gbz80/spec.mk: added -mgbz80
11164
11165 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
11166
11167         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
11168
11169 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
11170
11171         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
11172
11173         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
11174
11175 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
11176
11177         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
11178
11179         * support/regression/tests/simplefloat.c: Port to mcs51.
11180
11181 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
11182         * support/regression/tests/bug-485362.c: Added.
11183
11184         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
11185
11186         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
11187
11188         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
11189
11190         * src/z80/gen.c (aopDump): Added a dump function.
11191
11192 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
11193         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
11194
11195         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
11196
11197         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
11198
11199         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
11200
11201         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
11202
11203         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
11204
11205         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
11206
11207         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
11208
11209         * support/regression/ports/ds390/support.c: Use tinibios.
11210
11211         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11212
11213 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11214
11215         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11216         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11217
11218         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11219
11220         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11221
11222 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11223
11224         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11225
11226         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11227         (packRegsForIYUse): Created and optimised.
11228
11229 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11230
11231         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11232 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11233
11234         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11235
11236         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11237
11238         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11239
11240 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11241
11242         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11243
11244         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11245
11246 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11247
11248         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
11249
11250         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
11251
11252         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
11253
11254 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11255
11256         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
11257         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
11258         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
11259
11260         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
11261
11262         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
11263         (genNotFloat): Added.
11264         (genUminusFloat): Added.
11265
11266         * device/lib/z80/Makefile: Added floating pt stubs.
11267
11268         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
11269
11270         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
11271
11272         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
11273
11274 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11275
11276         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
11277
11278         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
11279
11280         * sdcc/support/regression/Makefile: Add port ds390.
11281
11282         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
11283
11284         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
11285
11286         * sdcc/support/regression/ports/ds390/spec.mk: Added.
11287
11288         * sdcc/support/regression/ports/ds390/support.c: Added.
11289
11290         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
11291
11292         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
11293
11294         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
11295
11296 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11297
11298         * device/include/malloc.h: Added z80 and gbz80 support.
11299
11300         * device/lib/gbz80/heap.s: Added.
11301
11302         * device/lib/z80/heap.s: Added.
11303
11304         * device/lib/malloc.c: Added z80 and gbz80 support.
11305
11306         * support/regression/tests/malloc.c (testMalloc): Added.
11307
11308         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
11309
11310         * support/regression/tests/bug-478094.c: Added.
11311
11312         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
11313
11314 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
11315
11316         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
11317
11318         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
11319
11320         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
11321
11322         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
11323
11324         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
11325
11326 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11327
11328         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
11329
11330 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
11331
11332         * support/regression/tests/bug-477927.c: Added.
11333
11334         * src/z80/peeph.def: Added minor rules.
11335
11336         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
11337
11338         * src/z80/peeph.def: Added jump optimisation modification.
11339
11340 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
11341
11342         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
11343
11344 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
11345
11346         * support/regression/tests/funptrs.c: Added.
11347
11348 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
11349
11350         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
11351
11352 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
11353
11354         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
11355
11356         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
11357
11358         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
11359         (movLeft2ResultLong): Created.
11360
11361         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
11362         (joinPushes): Added.  Joins two char pushes into a word push.
11363
11364 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
11365
11366         * support/cpp2/Makefile.in (install): Added creation of dest dir.
11367
11368         * support/makebin/Makefile (install): Added creation of dest dir.
11369
11370 2001-10-24 Karl Bongers <karl AT turbobit.com>
11371
11372         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
11373
11374 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
11375
11376         * src/z80/ralloc.c: Turned off faulty pack for one use.
11377
11378         * src/z80/peeph-gbz80.def: Removed redundent restart options.
11379
11380         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
11381
11382 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
11383
11384         * support/regression/Makefile: Improved clean
11385
11386         * support/regression/ports/gbz80/spec.mk: Added clean
11387
11388         * support/regression/ports/host/spec.mk: Added clean
11389
11390         * support/regression/ports/z80/spec.mk: Added clean
11391
11392         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
11393
11394         * support/regression/ports/mcs51/timeout.c: little improvements
11395
11396 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
11397
11398         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
11399
11400         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
11401
11402         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
11403
11404 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
11405
11406         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
11407
11408         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
11409
11410 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
11411         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
11412
11413         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
11414
11415         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
11416
11417         * src/mcs51/main.c (_linkCmd): Added bin path to command.
11418
11419         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
11420
11421         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
11422
11423         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
11424
11425         * support/regression/tests/longor.c: Added.
11426
11427 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
11428
11429         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
11430
11431         * as/mcs51/aslink.h: define PATH_MAX
11432
11433         * as/mcs51/asm.h: define PATH_MAX
11434
11435         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
11436
11437         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
11438
11439         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
11440
11441         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
11442
11443         * src/SDCCglobl.h: define PATH_MAX
11444
11445         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
11446
11447         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
11448
11449 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
11450
11451         * src/z80/gen.c (gencjneshort): Fixed
11452
11453         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
11454
11455 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
11456
11457         * support/regression/tests/bug-469671.c: Added.
11458
11459         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
11460
11461 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
11462
11463         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
11464
11465         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
11466
11467 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
11468
11469         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
11470
11471         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
11472
11473         * src/device/lib/_mullong.c : removed hint: nooverlay bug
11474
11475         * src/device/lib/_divuint.c : removed hint: nooverlay bug
11476
11477         * src/device/lib/_divulong.c: removed hint: nooverlay bug
11478
11479         * src/device/lib/_moduint.c : removed hint: nooverlay bug
11480
11481         * src/device/lib/_modulong.c: removed hint: nooverlay bug
11482
11483 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
11484
11485         * 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.
11486
11487         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
11488
11489         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
11490
11491 2001-10-07    <johan AT FRIJA>
11492
11493         * device/lib/gets.c (gets): fixed the return value.
11494
11495 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
11496         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
11497
11498         * 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.
11499
11500         * 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.
11501
11502         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
11503
11504         * src/pic/gen.c: Removed Safe_strdup.
11505
11506         * configure.in: Added option to enable libgc support.
11507
11508         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
11509         (bitVectUnion): Optimised.
11510         (bitVectIntersect): Optimised.
11511         (bitVectBitsInCommon): Optimised.
11512         (bitVectCplAnd): Optimised.
11513
11514         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
11515
11516 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11517
11518         * src/SDCCmain.c: distinguish between assembler debug and plain options
11519
11520         * src/avr/main.c:   remove standard assembler options
11521
11522         * src/ds390/main.c: remove standard assembler options
11523
11524         * src/mcs51/main.c: remove standard assembler options
11525
11526         * src/port.h: removed "PENDING" comment
11527
11528 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11529
11530         * src/device/lib/_mulint.c  : new, with assember functions
11531
11532         * src/device/lib/_mullong.c : new, with assember functions
11533
11534         * src/device/lib/_divuint.c : with assember functions
11535
11536         * src/device/lib/_divsint.c : with assember functions
11537
11538         * src/device/lib/_divulong.c: with assember functions
11539
11540         * src/device/lib/_divslong.c: with assember functions
11541
11542         * src/device/lib/_moduint.c : with assember functions
11543
11544         * src/device/lib/_modsint.c : with assember functions
11545
11546         * src/device/lib/_modulong.c: with assember functions
11547
11548         * src/device/lib/_modslong.c: with assember functions
11549
11550         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
11551
11552         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
11553
11554         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
11555                                       replaced _mululong.c and _mulslong.c by _mullong.c
11556
11557 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11558
11559         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
11560
11561 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11562
11563         * src/SDCCglue.c: test, if win32api is available for MINGW
11564
11565 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11566
11567         * src/SDCCsymt.c: no more _modifier in printTypeChain()
11568         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
11569         * support/regression/ports/gbz80/spec.mk: removed GENERIC
11570         * support/regression/ports/host/spec.mk: removed GENERIC
11571         * support/regression/ports/mcs51/spec.mk: removed GENERIC
11572         * support/regression/ports/z80/spec.mk: removed GENERIC
11573
11574 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
11575
11576         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
11577
11578         * support/regression/tests/bug-467035.c: Created.
11579
11580 2001-10-01    <johan AT FRIJA>
11581
11582         * src/SDCC.y: fixed bug #466586 part 1
11583
11584 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
11585
11586         * SDCCicode.c: z80 has no generic pointers
11587         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
11588
11589 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
11590
11591         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
11592
11593 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
11594
11595         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
11596
11597         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
11598
11599 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
11600
11601         * configure.in: Fixed up so that ucsim is only configured once.
11602
11603         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
11604
11605         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
11606         (getPathDifference): As above.
11607
11608         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
11609
11610         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
11611
11612 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
11613         * .version: Updated to 2.3.1
11614
11615         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
11616         Added copyright header.
11617
11618         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
11619         (assemble): Added support for macro based assembler commands.
11620         (linkEdit): Added support for macro based linker commands.
11621         (preProcess): Changed the pre-processor to use macros.
11622         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
11623         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
11624
11625         * device/lib/z80/crt0.s: Added module name for debugging.
11626
11627 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
11628
11629         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11630
11631         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
11632
11633         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
11634
11635         * src/Makefile.in: Added SDCCmacro and SDCCutil
11636
11637 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
11638
11639         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11640
11641 2001-09-16    <johan AT FRIJA>
11642
11643         * 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.
11644
11645 2001-09-15    <johan AT FRIJA>
11646
11647         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
11648         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
11649
11650 2001-09-11    <johan AT FRIJA>
11651
11652         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
11653
11654 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
11655
11656         * support/regression/tests/bug-460444.c: Added test case.
11657
11658         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
11659         (genCast): Added justification for all of the asserts.
11660
11661 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
11662
11663         * support/regression/support.c: _xdata replaced by xdata
11664
11665         * support/regression/spec.mk: removed _generic
11666
11667 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
11668
11669         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
11670
11671         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
11672         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
11673
11674         * src/z80/peeph.def: Added a rule to optimise shift then compare.
11675
11676         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
11677
11678         * support/regression/tests/bug-460010.c: Added test case.
11679
11680         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
11681
11682 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
11683
11684         * support/regression/Makefile: inter-port-clean adjusted for mcs51
11685
11686         * support/regression/testfwk.c: removed workaround for bug #436344
11687
11688         * support/regression/tests/bp.c: use less memory with mcs51
11689
11690         * support/regression/tests/bug-441448.c: use less memory
11691
11692         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
11693
11694         * support/regression/collate-results.py: typo
11695
11696 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
11697
11698         * support/regression/tests/fetchoverlap.c: Added new test case.
11699
11700         * support/regression/tests/bp.c: Added new test case.
11701
11702         * support/regression/tests/bug-448984.c: Added new test case.
11703
11704         * support/regression/tests/pow2shifts.c: Added new test case.
11705
11706         * src/z80/gen.c: Turned off the noise it normally generates for the release.
11707         (genlshTwo): Fixed right shift for count > 8.
11708
11709         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
11710
11711 2001-09-08    <johan AT FRIJA>
11712
11713         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
11714
11715 2001-09-07    <johan AT FRIJA>
11716
11717         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
11718
11719         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
11720
11721 2001-09-06    <johan AT FRIJA>
11722
11723         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
11724         * bernhard noted me at this: "() equals to (void)" (1.38)
11725
11726 2001-09-05    <johan AT FRIJA>
11727
11728         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
11729
11730 2001-09-04    <johan AT FRIJA>
11731
11732         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
11733
11734
11735 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
11736
11737         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
11738
11739 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
11740
11741         * link/z80/aslink.h: Fixed path for PATH_MAX
11742
11743 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11744
11745         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11746
11747         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11748
11749         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11750
11751         * 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.
11752
11753 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11754
11755         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11756         (genCmp): Fixed up genCmp for the GB with longs.
11757
11758         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11759
11760         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11761
11762         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11763
11764         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11765
11766 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11767
11768         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11769
11770 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11771
11772         * 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.
11773
11774         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11775
11776 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11777
11778         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11779
11780         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11781
11782 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11783
11784   * sim/ucsim/configure:    little improvement of Cygwin-detection
11785   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11786   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11787   * support/regression/tests/bug-221100.c: small changes for mcs51
11788   * support/regression/tests/bug-221168.c: small changes for mcs51
11789   * support/regression/tests/bug-227710.c: small changes for mcs51
11790   * support/regression/tests/staticinit.c: small changes for mcs51
11791   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11792   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11793   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11794
11795 $Revision$