* doc/Makefile.in: two runs of makeindex seem needed to get correct page references...
[fw/sdcc] / ChangeLog
1 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2
3         * doc/Makefile.in: two runs of makeindex seem needed to get
4         correct page references in the index of sdccman.pdf 
5         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
6
7 2006-06-17 Borut Razem <borut.razem AT siol.net>
8
9         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
10
11 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
12
13         * doc/sdccman.lyx: updated, added (porting source code, debugging),
14         mentioned ec2drv and paulmon
15
16 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
17
18         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
19           consecutive abs areas
20           (find_empty_space, allocate_space): added map to handle codemap or
21            xdatamap,
22           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
23            absolute idata and xdata
24         * as/mcs51/lkmem.c (summary2): updated legend
25
26 2006-06-16 Raphael Neider <rneider AT web.de>
27
28         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
29
30 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
31
32         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
33           1208515
34         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
35
36 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
37
38         * src/port.h (struct PORT): added field gp_tags, to hold the tag
39         value of generic pointers,
40         * src/avr/main.c,
41           src/ds390/main.c,
42           src/hc08/main.c,
43           src/izt/i186.c,
44           src/izt/tlcs900h.c,
45           src/mcs51/main.c,
46           src/pic/main.c,
47           src/pic16/main.c,
48           src/xa51/main.c,
49           src/z80/main.c: PORT structure, added elements for gp_tags field,
50         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
51         fields in the PORT structure of each port,
52         * src/SDCCast.c (decorateType): allow processing of generic pointers
53         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
54         S_FIXED symbols
55
56 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
57
58         * link/z80/lkgb.c,
59         * link/z80/lkgg.c,
60         * src/pic16/gen.c,
61         * src/pic16/main.c,
62         * src/pic16/pcode.c,
63         * src/pic/main.c,
64         * src/pic/pcoderegs.c,
65         * src/SDCCicode.c,
66         * src/SDCCmain.c,
67         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
68           bug 1504689 on minGW
69
70 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
71
72         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
73
74 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
75
76         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
77
78 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
79
80         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
81           for optimization
82
83 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
84
85         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
86         to a char variable. Fixed bug #1504211
87         * device/include/pic16/adc.h,
88         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
89         and fixed bug #1364390
90
91 2006-06-10 Borut Razem <borut.razem AT siol.net>
92
93         * CVSROOT: removed the CVS left-over
94
95 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
96
97         * as/hc08/asmain.c (asexit),
98         * as/hc08/lkmain.c (lkexit),
99         * as/mcs51/asmain.c (asexit),
100         * as/mcs51/lkmain.c (lkexit),
101         * src/SDCCglue.c (DEFSETFUNC),
102         * src/SDCCmain.c (linkEdit, assemble),
103         * support/librarian/sdcclib.c (AddRel),
104           replaced unlink() by standard C remove()
105         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
106         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
107           gatherImplicitVariables): new, added to fix bug 608752,
108           (createFunction): added gatherImplicitVariables()
109         * src/SDCCast.h: added createRMW prototype
110         * src/SDCCsymt.h (struct symbol): added infertype
111         * support/regression/tests/bug608752.c: new, added
112
113 2006-06-10 Raphael Neider <rneider AT web.de>
114
115         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
116           multibyte dummy reads (fixes #1503234)
117
118 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
119
120         * device/include/mcs51/compiler.h: new, added header file to enable
121           creating common sfr definition header files for different compilers
122
123 2006-06-05 Raphael Neider <rneider AT web.de>
124
125         * src/pic16/{pcode.h,genarith.c}:
126           introduced pCodeOp combining any two pCodeOps (previously only
127           two register operands could be combined), removed pcop2 from
128           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
129         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
130         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
131           rewritten to use new PO_TWO_OPS
132         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
133         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
134           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
135           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
136           (pic16_get_op): embraced return arg to allow #define return(x),
137             added new case for combined opcodes
138           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
139           (pic16_pCode2str,pic16_getRegFrompCodeOp,
140            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
141
142 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
143
144         * src/SDCCval.c (checkConstantRange): added
145         * src/SDCCval.h: added checkConstantRange
146         * support/Util/SDCCerr.c,
147         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
148         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
149         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
150         * src/SDCCast.c (decorateType): added checkConstantRange,
151         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
152         can be emitted with the correct always true/false warning,
153         added optimization for double '!';
154         result of decorateType() must be assigned back to the tree, because
155         decorateType() can change the tree
156         * src/SDCCicode.c (geniCodeLogic),
157         (geniCodeAssign): replaced new checkConstantRange, added warnings,
158         (checkConstantRange): removed, it was only a fragment which never
159         emitted a warning
160         * src/SDCCsymt.c (computeType): fixed promotion for
161         "-1 < (unsigned bit) b"
162         * src/pic/ralloc.c (packRegsForAssign),
163         * src/pic16/ralloc.c (packRegsForAssign),
164         * src/hc08/ralloc.c (packRegsForAssign),
165         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
166         from mcs51
167         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
168         * support/regression/tests/constantRange.c: added
169         * support/valdiag/tests/constantRange.c: added
170         * support/valdiag/valdiag.py: added -DPORT_HOST=1
171
172 2006-06-02 Borut Razem <borut.razem AT siol.net>
173
174         * support/regression/ports/pic16/support.c: increase stack size
175           to 255 bytes
176         * support/regression/Makefile.in: sort tests by name so that the
177           resutlts can be compared on different machines / platforms
178
179 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
180
181         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
182         * src/ds390/gen.c (emitLabel): new, added,
183           (genDjnz): fixed stack overflow bug,
184           (throughout): cosmetic changes to sync with mcs51/gen.c,
185           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
186         * src/mcs51/gen.c (genEndFunction): small optimization,
187           (throughout): cosmetic changes to sync with ds390/gen.c
188
189 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
190
191         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
192           (_print_format): fixed printing pointers
193         * src/mcs51/gen.c (emitLabel, movb): new, added,
194           (genAssign): small optimization,
195           (genDjnz): fixed stack overflow bug,
196           (throughout): replaced sprintf with SNPRINTF,
197           replaced mcs51_regWithIdx with REG_WITH_INDEX,
198           replaced emitcode("mov", "b,...") with MOVB(...),
199           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
200           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
201         * src/mcs51/peeph.def: added rules 140 and 264
202         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
203           so they may get optimized into registers
204
205 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
206
207         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
208           immediately when encountered,
209           (printUsage): always use stderr even on windows
210
211 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
212
213         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
214         (processParms): fixed bug #1247551
215         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
216         parseCmdLine, main): print '--version' to stdout,
217         print 'help' to stdout if --help is given,
218         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
219         arguments are given; fixed --help
220
221 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
222
223         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
224         * support/regression/tests/bug-1493710.c: added
225
226 2006-05-27 Borut Razem <borut.razem AT siol.net>
227
228         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
229           static instead auto
230         * support/regression/ports/pic16/support.c: increase stack size
231           from default 64 bytes to 128 bytes
232         * support/regression/tests/staticinit.c,
233           support/regression/tests/float.c: regression tests fully enabled
234           for pic16 port by putting the initialized data arrays into the code
235           section
236         * support/regression/ports/pic16/spec.mk: don't link default libraries.
237           This was changed by mistake in the previous version.
238
239 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
240
241         * src/pic16/gen.c (genFunction, genEndFunction): some
242         beautifications, fixed bug with falsely restoring FSR2 in large
243         stack model, thanks to Beau E. Cox for reporting the bug
244
245 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
246
247         * debugger/mcs51/break.c,
248         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
249           use %p to print pointers, made address variables unsigned
250         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
251         * debugger/mcs51/symtab.c (parseSymbol): must return something
252         * src/mcs51/gen.c (aopForSym): small optimization,
253            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
254           (freeAsmop): added missing break,
255           (aopPut): removed parameter bvolatile, determine it inside the function,
256           (saveRegisters, unsaveRegisters): small optimization,
257           (genIpush): removed pointless check,
258           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
259           replaced sprintf with SNPRINTF,
260           replaced strcpy with strncpyz,
261           updated aopPut calls,
262           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
263         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
264
265 2006-05-24 Borut Razem <borut.razem AT siol.net>
266
267         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
268           modification of test for the pic16 port, put the array to the code
269           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
270
271 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
272
273         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
274         * support/Util/pstdint.h: added
275
276 2006-05-22 Borut Razem <borut.razem AT siol.net>
277
278         * src/regression/Makefile: removed bool2.c test, added -q linker option
279         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
280           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
281           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
282           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
283           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
284           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
285           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
286           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
287           define SUPPORT_BIT_TYPES 0, removed unused bit variables
288
289 2006-05-22 Raphael Neider <rneider AT web.de>
290
291         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
292           bug #1492360 (problematic due to generic pointers, see code)
293
294 2006-05-22 Borut Razem <borut.razem AT siol.net>
295
296         * support/regression/ports/pic16/specs.mk: removed stack size linker
297           directive
298         * support/regression/tests/array.c,
299           support/regression/tests/bitopcse.c,
300           support/regression/tests/bug-908454.c,
301           support/regression/tests/malloc.c: modified for pic16 regression test
302         * support/regression/tests/bitfields.c:
303           pic16 - excluded bitfileds of size > 8
304         * support/regression/tests/bp.c: pic16 - reduced data size
305         * support/regression/tests/bug-221100.c: pic16 - reduced data size
306         * support/regression/tests/bug-460010.c:
307           pic16 - used the absolute address the fits in memory
308         * support/regression/tests/bug-716242.c:
309           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
310         * support/regression/tests/float.c:
311           pic16 - excluded - data size too big
312         * support/regression/tests/onebyte.c:
313           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
314         * support/regression/tests/shifts.c:
315           pic16 - function names probably have to differ in first X characters
316           (gpasm limitation?)
317         * support/regression/tests/staticinit.c:
318           pic16 - excluded some tests due error: no target memory available for
319           section ".idata"
320
321 2006-05-22 Borut Razem <borut.razem AT siol.net>
322
323         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
324           second try. Thanks Stas Sergeev once more.
325
326 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
327
328         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
329           (genLeftShift, genRightShift): fixed bug 1491627
330         * src/hc08/peeph.def (rules 7, 8.x): added
331         * support/regression/tests/shifts.c (ShiftLeftByParam,
332           ShiftRightByParam, testShiftByParam): added to test variable shifting
333
334 2006-05-20 Raphael Neider <rneider AT web.de>
335
336         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
337         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
338           (allocReg): add only new registers to dynAllocRegs,
339           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
340             #1489055, #1445850, and probably #1483693
341
342 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
343
344         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
345         bug in for-loop that didn't emit the last of CONFIG and ID registers
346
347 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
348
349         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
350           with offset
351         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
352           1489016, 1434401 and 1490124
353         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
354           1489016, 1434401 and 1490124
355
356 2006-05-17 Borut Razem <borut.razem AT siol.net>
357
358         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
359           thanks Stas Sergeev
360
361 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
362
363         * device/include/mcs51/P89c51RD2.h,
364         * device/include/mcs51/P89LPC901.h,
365         * device/include/mcs51/P89LPC922.h,
366         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
367
368 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
369
370         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
371         to fix missing stack pragma in compiled binary object file,
372
373 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
374
375         * support/packihx/configure.in,
376         * support/packihx/configure: removed warning, autoconf >= 2.5x can
377         determine sizeof basic types even while cross compiling
378
379 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
380
381         * src/avr/gen.c (aopop),
382         * src/ds390/gen.c (aopOp),
383         * src/hc08/gen.c (aopOp),
384         * src/mcs51/gen.c (aopop),
385         * src/pic16/gen.c (pic16_aopOp),
386         * src/pic/gen.c (aopOp),
387         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
388         if size of operand is smaller than spill location
389
390 2006-05-12 Borut Razem <borut.razem AT siol.net>
391
392         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
393           have to have CR/LF line endings even if they are checked out on *nix
394           or on WIN32 in cygwin binmode
395
396 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
397
398         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
399         * device/include/ds80c390.h: added sfr16 definitions
400         * src/ds390/gen.c,
401         * src/ds390/gen.h,
402         * src/ds390/main.c,
403         * src/ds390/ralloc.c,
404         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
405           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
406           bit returning functions
407         * support/regression/tests/sfr16.c: enabled test on ds390
408
409 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
410
411         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
412         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
413
414 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
415
416         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
417         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
418           (cl_address_space constructor): removed expensive initialization,
419           (cl_address_space::get_cell): extended for late initialization,
420           (cl_address_space::*): use late initialization,
421           (cl_address_decoder::activate): removed expensive initialization,
422           This reduced regression test running time by 25%
423
424 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
425
426         * packihx/,
427         * configure.in,
428         * configure,
429         * sdcc.dsw,
430         * Makefile.bcc,
431         * Makefile.in,
432         * support/packihx/Makefile.in,
433         * support/packihx/clean.mk,
434         * support/packihx/Makefile.bcc,
435         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
436
437 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
438
439         * src/SDCCval.c (valNot): fix for regression test failure
440           of not.c on big endian hosts
441
442 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
443
444         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
445
446 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
447
448         * device/lib/mcs51/Makefile.in: changed string comparison operator
449           to = for POSIX compliance; == is bash extension
450
451 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
452
453         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
454           kosmonaut_pirx
455
456 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
457
458         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
459         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
460         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
461         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
462         bug report #1478657,
463
464 2006-05-05 Borut Razem <borut.razem AT siol.net>
465
466         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
467           making the html
468
469 2006-05-02 Borut Razem <borut.razem AT siol.net>
470
471         * doc/Makefile.in: removed *.ind dependency since there is no rule to
472           create *.ind, which made make to fail if invoked with -j 2
473
474 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
475
476         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
477           Hubert Sack for patch 1479782
478
479 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
480
481         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
482
483 2006-05-01 Raphael Neider <rneider AT web.de>
484
485         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
486           (create_pic): store only prefix-free device name,
487           (init_pic): check for device names with "16" prefix,
488           (list_valid_pics),
489         * src/pic/device.h (struct PIC_device),
490         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
491             stored device name,
492         * device/include/pic/pic12f{635,675,629,683}.h,
493         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
494         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
495         * device/include/pic/pic16f505.h,
496         * device/lib/pic/libdev/pic16f505.c: removed
497         * device/include/pic/pic14devices.txt: added support for pic12f
498             devices, removed unsupported non 16-bit devices
499             [above changes provided by patch from Zik Saleeba]
500         * src/pic/*, src/pic16/*, device/include/pic16/*,
501           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
502
503 2006-05-01 Borut Razem <borut.razem AT siol.net>
504
505         * configure.in, configure, doc/Makefile.in:
506           sync with nightly build makefile - latex, dvipdf and dvips
507           not needed any more
508
509 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
510
511         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
512         in the library source
513
514 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
515
516         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
517
518 2006-04-28 Raphael Neider <rneider AT web.de>
519
520         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
521         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
522           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
523         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
524
525 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
526
527         * device/lib/pic/libdev/Makefile.in,
528         * device/lib/hc08/Makefile.in,
529         * device/lib/gbz80/Makefile.in,
530         * device/lib/z80/Makefile.in,
531         * device/lib/ds390/Makefile.in,
532         * device/lib/ds400/Makefile.in: added srcdir to include search path,
533         thanks to Borut for the bug report
534         * configure.in,
535         * configure: always create doc/Makefile independent from --enable-doc
536         * Makefile.in: always install from directory doc independent from
537         --enable-doc
538         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
539         removed
540         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
541         * doc/Makefile.in: install *.txt if present
542         * device/include/Makefile.in (install): added installation of pic/*.inc
543         and pic/*.txt files again, they were erroneously removed
544
545 2006-04-28 Raphael Neider <rneider AT web.de>
546
547         * src/pic/{gen.c,main.h,pcode.c},
548         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
549             concerning signedness with casts
550
551 2006-04-28 Raphael Neider <rneider AT web.de>
552
553         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
554             definition of an interrupt handler,
555         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
556             interrupt handler stuff from picglue() to separate routine,
557           (picglue): enabled definition of intr handlers in files w/o main()
558
559 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
560
561         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
562           compilation with MSVC 2005 Express Edition (VC8)
563
564 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
565
566         * device/lib/Makefile: fixed build of gbz80 lib
567
568 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
569
570         * support/regression/tests/bug-460010.c,
571         * support/regression/tests/bug-524691.c,
572         * support/regression/tests/bug-716242.c: removed conditional defines
573           that are already in testfwk.h
574
575 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
576
577         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
578           (AccAXRsh1): added, shift right by 1,
579           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
580            AccAXLrl1
581         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
582
583 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
584
585         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
586         remove cast to same type
587         * src/SDCCast.c (decorateType): fix for RFE 1475742,
588         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
589         * as/z80/Makefile,
590         * link/z80/Makefile: removed, they have moved to
591         Makefile.in files
592         * configure,
593         * configure.in: replaced duplicate message about ucsim by missing sdcpp
594         * install-sh: fix bug #1204398 by setting umask 0022
595         * device/lib/Makefile: separate build of z80 and gbz80 lib
596
597 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
598
599         Enabled VPATH feature: changed nearly all Makefiles (149 files).
600         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
601
602         One basic decision: e.g. src/clean.mk includes further files. In order
603         to make this work there are two solutions:
604         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
605           run configure on them. This way they can use
606           'include $(srcdir)/port-clean.mk'
607         - always include clean.mk by the Makefile at the same level. To avoid
608           that `make clean` tries to include and build Makefile.dep the
609           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
610           implemented, because now even `make uninstall` doesn't create
611           Makefile.in. clean.mk could be eliminated by pasting it in
612           Makefile.in.
613
614         * debugger/mcs51/Makefile.in: build own objects from library sources
615         (SLIB, SDCC) in current directory
616
617         * configure, configure.in: renamed --disable-device-lib-build in
618         --disable-device-lib; added --enable-doc, the required tools are
619         searched by configure; added result message; the toolchain for the
620         belonging ports are now only built, if the port is enabled.
621
622         * support/regression/*: all output is written in directory gen, because
623         the fwk and ports directories don't livet in the build tree using vpath
624
625         * doc/sdccman.lyx: renamed --disable-device-lib-build to
626         --disable-device-lib, added --enable-doc, added section VPATH
627
628         * sim/ucsim/configure.in,
629         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
630         z80 are enabled by default
631
632 2006-04-24 Raphael Neider <rneider AT web.de>
633
634         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
635             to config word, "pic14_"-prefixed some extern functions
636           (pic14_emitConfigWord): emit __config directive(s) if assignment to
637             config word has been found
638         * src/pic/device.h: added prototypes
639         * src/pic/pcode.c: added "pic14_"-prefix where needed
640         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
641             fixup
642         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
643             words,
644           (pic14emitRegularMap): ignore config words,
645           (pic14createInterruptVect): moved generating __config directives away
646           (picglue): have __config directives emitted
647
648 2006-04-24 Borut Razem <borut.razem AT siol.net>
649
650         * doc/Makefile: sync with nightly build makefile
651
652 2006-04-24 Raphael Neider <rneider AT web.de>
653
654         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
655             registers that have not been assigned proper liveranges,
656             fixes #1469504 and #1474602,
657           (pCodeRegOptimizeRegUsage): fixed typo in comment
658
659 2006-04-24 Borut Razem <borut.razem AT siol.net>
660
661         * device/examples/main8051.c: deleted - it was removed from CVS
662           24.mar.2000 and after that modified 18.feb.2001, so it reappered
663           after the transition to Subversion
664         * src/SDCCalloc.h: deleted - it was removed  from CVS
665           3.feb.2001 and after that modified 18.feb.2001, so it reappered
666           after the transition to Subversion
667         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
668           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
669           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
670           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
671
672 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
673
674         * as/asx8051.dsp: added mcs51/strcmpi.h
675         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
676         * as/hc08/aslink.h: updated lnksect prototype
677         * as/hc08/asm.h,
678         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
679         * as/hc08/asmain.c,
680         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
681           (newdot): handle A_ABS
682         * as/hc08/asout.c,
683         * as/mcs51/asout.c (outarea): output address
684         * as/hc08/lkaomf51.c,
685         * as/mcs51/lkaomf51.c: disabled unused array UsageType
686         * as/hc08/m08pst.c,
687         * as/mcs51/i51pst.c,
688         * as/z80/z80pst.c: "ABS" is not A_OVR
689         * as/hc08/lkarea.c (newarea): read a_addr,
690           (lnkarea): added codemap array, sort absolute areas to the front,
691            combine all GSINITx/GSFINAL,
692           (find_empty_space, allocate_space): new functions,
693           (lnksect): return next address, handle absolute sections
694         * as/mcs51/lkarea.c (newarea): read a_addr,
695           lnksect2 prototype changed,
696           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
697           (find_empty_space, allocate_space): new, factored out of lnksect2,
698           (lnksect2): return next address, handle absolute sections
699         * as/hc08/lkhead.c,
700         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
701         * as/hc08/lklibr.c (addfile, fndsym),
702         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
703           index out of range and detect both '\' and '/'
704         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
705         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
706           regression tests (ds390 cannot return bool yet)
707         * doc/sdccman.lyx: changed version number, document changed --no-peep,
708           document critical interrupts on z80, document changed SDCC define
709         * src/asm.c (_asxxxx_mapping): fixed .org directive,
710           (_a390_mapping): added .org directive
711         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
712           (genMultOneByte): fixed warnings
713         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
714           ones
715         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
716         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
717           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
718         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
719         * src/pic16/main.c: removed newReg prototype
720         * src/pic16/pcode.c,
721         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
722           warnings
723         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
724           ones
725         * src/pic16/ralloc.c
726         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
727           to fix warnings
728         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
729           from short to PIC_OPTYPE
730         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
731         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
732           optype from short to PIC_OPTYPE
733         * src/port.h: made int_size unsigned to fix warnings
734         * src/SDCC.y: fixed warning on MSVC
735         * src/SDCCicode.c (getArraySizePtr): return unsigned int
736         * src/SDCCopt.c (convertToFcall): fixed warnings
737         * src/SDCCsymt.h: removed double prototype for genSymName
738         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
739           offset int to fix warnings
740
741 2006-04-22 Borut Razem <borut.razem AT siol.net>
742
743         * doc/sdccman.lyx, */Makefile, */Makefile.in:
744           references to CVS replaced with Subversion
745
746 2006-04-21 Borut Razem <borut.razem AT siol.net>
747
748         * doc/sdccman.lyx, */Makefile, */Makefile.in:
749           references to CVS replaced with Subversion
750
751 2006-04-19 Borut Razem <borut.razem AT siol.net>
752
753         * src/version.awk: adapted for svn
754         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
755           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
756           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
757           /binutils-avr/etc/*.vi, *.jin: removed all properties
758           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
759
760 2006-04-19 Borut Razem <borut.razem AT siol.net>
761
762         * CVS to Subversion migration completed
763
764 2006-04-18 Borut Razem <borut.razem AT siol.net>
765
766         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
767           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
768
769 2006-04-17 Borut Razem <borut.razem AT siol.net>
770
771         * device/include/Makefile.in: added pic/*.inc to the installation
772
773 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
774
775         * support/regression/collate-results.py: fixed output in case of
776         a valdiag error
777         * support/regression/generate-cases.py: fixed splitting of pathnames
778         with dots
779         * as/hc08/lklibr.c (addfile),
780         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
781
782 2006-04-11 Raphael Neider <rneider AT web.de>
783
784         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
785         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
786         * src/pic16/pcode.c (assignValnums): fixed #1460578
787
788 2006-04-11 Raphael Neider <rneider AT web.de>
789
790         * device/lib/pic/libdev/*.c,
791         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
792           fixes #1468739, enables compilation in --std-c99 mode
793         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
794
795 2006-04-11 Raphael Neider <rneider AT web.de>
796
797         * src/pic/device.c (find_device): removed debug output
798           (list_valid_pics): enabled verbose listing of supported devices
799         * device/include/stdbool.h: define bool as char for pic14/16 as well
800
801 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
802
803         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
804
805 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
806
807         * .version: bumped version to 2.5.6
808         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
809
810 2006-04-06 Raphael Neider <rneider AT web.de>
811
812         * .version: bumped version to 2.5.6 (pic14 ABI changed)
813         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
814         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
815           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
816             pic14_constructAbsMap
817           (pic14printPublics): declare absolute global symbols as global
818           (pic14createInterruptVect),
819         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
820           (newReg): assume new registers unused, use correct name in
821             hashtable (reg->name instead of name), more debugLog output
822         * src/pic/device.h (PIC_device): added fields for verbose output
823         * src/pic/device.c: moved device definition to pic14devices.txt,
824             added routines for runtime parsing of pic14devices.txt,
825             added support for second config word
826         * src/pic/main.c (_process_pragma): removed #pragma maxram,
827           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
828           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
829           (_pic14_parseOptions): moved pCodeInitRegisters here
830           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
831         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
832           (pCodeInitRegisters): rewrapped comments, perpared new approach to
833             handling the pseudo stack
834         * device/lib/Makefile.in: ignore failures in objects-pic16,
835         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
836         * device/lib/pic/NEWS: document new dependency on picXXX.lib
837         * device/lib/pic/Makefile.subdir,
838         * device/lib/pic16/Makefile.subdir: improved clean rules
839         * device/lib/pic/libdev/: NEW, pic14 device libraries
840         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
841         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
842         * device/include/Makefile.in: create subdir and install pic14 headers
843         * device/include/pic/p16f_common.inc: removed unused declarations
844         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
845             PICs from inc2h.pl v1.6,
846             replaced BIT_AT macros with struct declarations
847         * device/include/pic/pic14devices.txt: definition of supported devices,
848             all above improvements contributed by Zik Saleeba, thanks
849         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
850         * support/scripts/sdcc.nsi: also install pic14 device libraries and
851             headers
852
853 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
854
855         * device/include/mcs51/c8051f410.h: added interrupt numbers,
856         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
857           thanks to Charles Olds
858
859 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
860
861         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
862
863 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
864
865         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
866         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
867         * support/regression/bug1464657.c: added, new test
868
869 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
870
871         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
872           version number
873
874 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
875
876         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
877           --no-peep and --peep-file <file> are used don't use default rules but
878           do use the <file>
879
880 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
881
882         * src/mcs51/gen.c (genCall): fixed bug 1457608
883
884 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
885
886         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
887         changes seem to cause (trigger?) problems with the build system.
888
889 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
890
891         * src/SDCCpeeph.c (operandsLiteral): new, added,
892           (callFuncByName): inserted operandsLiteral
893         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
894
895 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
896
897         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
898         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
899
900 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
901
902         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
903           implemented patch 1120823 Thanks to Willy De la Court (normal
904           interrupts need an interrupt number now if they are made critical),
905           and enabled nesting of critical functions though not for gbz80
906           (genCritical, genEndCritical): added functions
907           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
908         * src/z80/mappings.i: added "ei" to all mappings
909
910 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
911
912         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
913         submitted by the Debian SDCC maintainer Aurelien Jarno:
914         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
915         archive with gcc 4.1 on mips and wrote the patch"
916
917 2006-03-16 Raphael Neider <rneider AT web.de>
918
919         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
920           the left operand is shorter than the result (c* = lit-c* + int),
921           fixes bug #1450796
922         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
923           OP_SYMBOL
924
925 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
926
927         * src/.version: increased version number to 2.5.5
928         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
929         linking is done manually in pic16 port's _linkEdit,
930         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
931         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
932         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
933         allocate asmop as AOP_ACC,
934         (aopForRemat): added parameter 'bool result' in function declaration,
935         (pic16_aopGet): return AOP_ACC when accessing WREG,
936         (pic16_popGetTempReg): minor modification,
937         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
938         'pic16_allocWithIdx',
939         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
940         calling function in absolute addresses,
941         (genAssign): take into account AOP_ACC asmop,
942         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
943         * src/pic16/pcoderegs.c: some debug functions and lines added,
944         * src/pic16/ralloc.c (decodeRegType): added but commented out,
945         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
946         register too,
947         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
948         call to allocReg, not by manually allocating a new one,
949         (pic16_assignRegisters): now before going through the register
950         allocating functions mark all registers as free. This eliminates some
951         side effects resulting from peephole parser done earlier in the backbone
952
953 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
954
955         * src/SDCCicode.c (geniCodeLogic),
956         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
957
958 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
959
960         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
961           (genSend): bugfix, do not allocate and free twice,
962           (shiftRLong): handle partially overlapping aops
963         * support/regression/tests/bitopcse.c: fixed warning redefined idata
964
965 2006-03-08 Borut Razem <borut.razem AT siol.net>
966
967         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
968           for pic16
969
970 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
971
972         * support/regression/tests/bug1409955.c: new, added
973         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
974         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
975           (aopForSym, aopOp): increment asmop.allocated if reused,
976           (freeAsmop): decrement asmop.allocated and check for zero instead of
977           using asmop.freed,
978           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
979           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
980            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
981            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
982            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
983            genSignedRightShift, genRightShift, genDataPointerGet,
984            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
985            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
986             in reverse order from allocation,
987           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
988             added swappedLR to keep track
989         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
990           pdata & code for GCC, z80, gbz80 & hc08
991         * support/regression/tests/zeropad.c: moved defines to testfwk.h
992
993 2006-03-08 Raphael Neider <rneider AT web.de>
994
995         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
996
997 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
998
999         * device/include/mcs51/c8051f410.h: new SiLabs mcu
1000         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
1001         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
1002
1003 2006-03-06 Borut Razem <borut.razem AT siol.net>
1004
1005         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
1006           made the linker quiet
1007
1008 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1009
1010         * src/pic16/gen.c (genPcall): fixed bug #1443644
1011         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
1012         which dumps before the function entry point a data byte which represents
1013         the number of the local variables used by the specified function, added
1014         'xinst' for initial support for Extended Instruction Support,
1015         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
1016         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
1017         port->fun_prefix anymore (may change later),
1018         (genFunction, genEndFunction): do not store/restore local registers for
1019         _main (this should take care the --main-return command line option in
1020         the future),
1021         (genOr): removed some legacy pic-port instructions,
1022         * src/pic16/genarith.c (genAddLit): re-enabled old code because
1023         performing operations with SFR's causes data to be written more than
1024         once to each SFR. Perhaps SFRs should be handled in special cases...
1025         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
1026         pcode.h
1027         * src/pic16/main.c (_process_pragma): stack bound checking did not take
1028         into account for stack starting position,
1029         (struct OPTIONS pic16_optionsTable): added command line argument
1030         --extended or -y for Extended Instruction Support,
1031         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
1032         (deassignLRs): *** perhaps the most important change, old 'for' code
1033         (commented out for reference), didn't account for some registers which
1034         were left marked 'not free' after a pointer operation. The change
1035         reduces register usage a lot in some cases
1036
1037 2006-03-04 Borut Razem <borut.razem AT siol.net>
1038
1039         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
1040           _clean
1041         * support/regression/tests/bug-524697.c: decreased array size for
1042           mcs51 to fit into the internal RAM
1043         * support/regression/Makefile.in: a little bit more verbose
1044
1045 2006-03-03 Borut Razem <borut.razem AT siol.net>
1046
1047         * support/regression/fwk/lib/testfwk.c,
1048           support/regression/fwk/include/testfwk.h: introduced function
1049           _prints(), nonrecursive _printn(), call _initEmu() from main()
1050         * support/regression/ports/gbz80/support.asm,
1051           support/regression/ports/ucz80/support.asm,
1052           support/regression/ports/z80/support.asm,
1053           support/regression/ports/ds390/support.c,
1054           support/regression/ports/hc08/support.c,
1055           support/regression/ports/host/support.c,
1056           support/regression/ports/mcs51/support.c,
1057           support/regression/ports/xa51/support.c: added empty _initEmu()
1058           function
1059         * support/regression/ports/pic16/gpsim.cmd,
1060           support/regression/ports/pic16/spec.mk,
1061           support/regression/ports/pic16/support.c,
1062           support/regression/Makefile.in: added pic16 regression test
1063
1064 2006-03-01 Raphael Neider <rneider AT web.de>
1065
1066         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
1067           genConstPointerGet): use safe way of generating MOVFF to cover
1068             literals as well as registers, fixes bug #1440527
1069         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
1070             dereference
1071           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
1072             more correctly, fixes bug #1232186
1073           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
1074         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
1075             gplink guess the correct processor in more cases, applied patch
1076             from Till Riedel attached to and fixing bug #1436552
1077
1078 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1079
1080         * support/regression/tests/array.c: added, contains check for #1434401
1081         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
1082
1083 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
1084
1085         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
1086         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
1087         * device/include/mcs51/c8051f326.h,
1088         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
1089         * device/include/mcs51/c8051f000.h,
1090         * device/include/mcs51/c8051f018.h,
1091         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
1092           PCON_IDLE,PCON_STOP and added sfr16 definitions
1093
1094 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1095
1096         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
1097           genGetWord): fixed bug 1409955
1098
1099 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1100
1101         * device/include/hc08/mc68hc908gp32.h,
1102         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
1103
1104 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
1105
1106         * src/SDCCast.c (constExprValue): return NULL if not a value
1107         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
1108         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
1109         * support/regression/tests/bitfields.c: enabled signed bitfield for all
1110
1111 2006-02-13 Borut Razem <borut.razem AT siol.net>
1112
1113         * src/regression/ptrarg.c: added, fails due to bug #1430967
1114         * src/regression/Makefile: ptrarg.c added, ...
1115
1116 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
1117
1118         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
1119         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
1120
1121 2006-02-11 Borut Razem <borut.razem AT siol.net>
1122
1123         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
1124           print "Processor: xxx" message to stdout only if --verbose
1125
1126 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1127
1128         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
1129         * support/regression/tests/bug1426356.c: added
1130         * support/regression/tests/bitfields.c: removed 2 tests
1131
1132 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1133
1134         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
1135         * device/include/mcs51/c8051f330.h,
1136         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
1137           PCON_IDLE,PCON_STOP and added sfr16 definitions
1138         * device/lib/_divsint.c,
1139         * device/lib/_divuint.c,
1140         * device/lib/_divulong.c,
1141         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1142           register bank bug for small stackauto
1143
1144 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1145
1146         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1147
1148 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1149
1150         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1151         * all.dsp: corrected several bin paths
1152         * device/include/mcs51/c8051f120.h,
1153         * device/include/mcs51/c8051f300.h,
1154         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1155           to PCON_IDLE,PCON_STOP
1156         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1157         * device/lib/printf_large.c (output_float): fixed bug 1388703
1158         * support/regression/tests/bug1057979.c: added test for bug 1388703
1159
1160 2006-02-08 Raphael Neider <rneider AT web.de>
1161
1162         * src/pic/pcode.c (pciTRIS): fixed typo,
1163           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1164           (LinkFlow): fixed handling of flows that end in a call,
1165           (ReuseReg): perform safety check earlier
1166         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1167             to work with flows at the beginning of a pBlock,
1168             fixes #1426557 (Symbol not previously defined),
1169           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1170             usage information
1171           (RemoveUnusedRegisters): update register usage info
1172         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1173             created, reuse existing ones instead
1174         * src/pic/gen.c (genPcall): fixed #1424719
1175
1176 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1177
1178         * link/z80/lkmain.c,
1179         * link/z80/lklex.c,
1180         * link/z80/lkdata.c,
1181         * link/z80/aslink.h: fixed build on current cygwin:
1182         replaced getline() by lk_getline()
1183
1184 2006-02-01 Borut Razem <borut.razem AT siol.net>
1185
1186         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
1187           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
1188           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
1189           src/regression/bool1.c, src/regression/bool2.c,
1190           src/regression/bool3.c, src/regression/call1.c,
1191           src/regression/compare.c, src/regression/compare10.c,
1192           src/regression/compare2.c, src/regression/compare3.c,
1193           src/regression/compare4.c, src/regression/compare5.c,
1194           src/regression/compare6.c, src/regression/compare7.c,
1195           src/regression/compare8.c, src/regression/compare9.c,
1196           src/regression/configword.c, src/regression/for.c,
1197           src/regression/inline.c, src/regression/mult1.c,
1198           src/regression/nestfor.c, src/regression/or1.c,
1199           src/regression/pointer1.c, src/regression/ptrfunc.c,
1200           src/regression/rotate1.c, src/regression/rotate2.c,
1201           src/regression/rotate3.c, src/regression/rotate4.c,
1202           src/regression/rotate5.c, src/regression/rotate6.c,
1203           src/regression/rotate7.c, src/regression/string1.c,
1204           src/regression/struct1.c, src/regression/sub.c,
1205           src/regression/sub2.c, src/regression/switch1.c,
1206           src/regression/while.c, src/regression/xor.c,
1207           src/regression/create_stc, src/regression/simulate,
1208           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
1209           regression tests
1210         * src/regression/gpsim_assert.h: added
1211
1212 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
1213
1214         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
1215         ((void (code *) (void)) 0) ();
1216         * as/hc08/aslex.c,
1217         * as/hc08/aslink.h,
1218         * as/hc08/asm.h,
1219         * as/hc08/asmain.c,
1220         * as/hc08/lkdata.c,
1221         * as/hc08/lklex.c,
1222         * as/hc08/lkmain.c,
1223         * as/mcs51/aslex.c,
1224         * as/mcs51/aslink.h,
1225         * as/mcs51/asm.h,
1226         * as/mcs51/asmain.c,
1227         * as/mcs51/lkdata.c,
1228         * as/mcs51/lklex.c,
1229         * as/mcs51/lkmain.c,
1230         * as/z80/aslex.c,
1231         * as/z80/asm.h,
1232         * as/z80/asmain.c: fixed build on current cygwin:
1233         replaced getline() by as_getline()
1234
1235 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
1236
1237         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
1238         declarator in the symbol chain
1239         * src/SDCCsymt.h,
1240         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
1241         parameter list for function pointers
1242         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
1243         * support/regression/tests/bug-716242.c: added
1244
1245 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
1246
1247         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
1248         offset if possible
1249         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
1250
1251 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
1252
1253         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
1254         inifinitely recurseable, added static
1255         * support/regression/tests/bug-1408066.c: added
1256
1257 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
1258
1259         * src/SDCCicode.h,
1260         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
1261         renamed, added possibility to create "postLoopLbl"-labels
1262         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
1263         newiTempLoopHeaderLabel
1264         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
1265         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
1266         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
1267         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
1268         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
1269         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
1270         (basicInduction): fixed bug #136564, made static,
1271         (loopInduction): changed parameter of basicInduction, made static,
1272         (addPostLoopBlock): added
1273         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
1274         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
1275         findLoopEndSeq
1276         * support/regression/tests/bug-136564.c: added
1277         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
1278         --std-sdcc99 to LIBSDCCFLAGS
1279
1280 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
1281
1282         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
1283         while loop
1284         * support/regression/tests/bug-1406131.c: added
1285
1286 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
1287
1288         * src/SDCCast.c (decorateType): fix promotion of unary minus
1289         * src/SDCCsymt.c (computeType): beautified
1290         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
1291         (valUnaryPM, valComplement): fix sign and promotion,
1292         (valNot): ANSI: result type is int (SDCC: unsigned char)
1293         * support/regression/tests/uminus.c: speedup by removing superflous
1294         test case 'int'
1295         * support/regression/tests/onebyte.c: added promotion and signedness
1296         tests for unary minus
1297         * support/regressions/tests/bug-477927.c: disable warning about
1298         uninitialized variables
1299         * support/regression/tests/not.c: added
1300
1301 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
1302
1303         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
1304         * src/mcs51/gen.c (gen51Code): show final register usage after
1305         fillGaps in asm with --i-code-in-asm
1306         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
1307         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
1308         incUsed, rliveClear, adjustIChain): made static,
1309         (setFromRange): excluded because it's unused,
1310         (findPrevUseSym, markWholeLoop): added,
1311         (findPrevUse): rewritten; fixes bug 895992; now a complete search
1312         through all branches of predecessors enables sdcc to emit the warning
1313         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
1314         (rlivePoint): made static, added parameter emitWarnings which is only
1315         true during the first run out of two,
1316         (findRecursiveSucc, findRecursivePred): removed,
1317         (computeLiveRanges): made static, added parameter emitWarnings,
1318         (dumpIcRlive): added for debugging only
1319         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
1320         removed prototype of setFromRange()
1321         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
1322         in call of computeLiveRanges()
1323         * support/regression/tests/bug-895992.c: added
1324         * support/regression/tests/bug-971834.c: added
1325         * support/valdiag/tests/bug-895992.c: added
1326         * support/valdiag/tests/bug-971834.c: added
1327
1328 2005-12-18 Raphael Neider <rneider AT web.de>
1329
1330         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
1331           (genUnpackBits): improved code for direct operands,
1332           (genPackBits): improved code for literal assignment to bitfields
1333             and for direct destination operands (no FSR indirection),
1334             prevented redundant AND, fixes #1362800,
1335           (AccLsh): added parameter to disable masking of the result
1336         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
1337           skip instructions with side-effects (like incfsz),
1338           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
1339         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
1340         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
1341           fixes #1375263
1342
1343 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
1344
1345         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
1346         volatile variables as spill location
1347
1348 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
1349
1350         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
1351         replacing literals
1352         * support/regression/tests/bug-1376320.c: added
1353
1354 2005-12-08 Raphael Neider <rneider AT web.de>
1355
1356         * src/pic/device.c: renamed is_shared to pic14_is_shared
1357         * src/pic/gen.c (genIfx): re-enabled handling of sbits
1358         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
1359           (is_valid_identifier): added for above workaround
1360
1361 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
1362
1363         * device/lib/Makefile.in: fixed to enable port-specific-objects
1364         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
1365           char, thanks Hubert Sack
1366         * doc/sdccman.lyx: documented --xstack-loc,
1367           elaborated a bit more on interrupts and pitfalls,
1368           removed "setjmp/longjmp unsupported",
1369           documented some unsupported C99 features
1370         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
1371         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
1372           if, thanks Hubert Sack
1373         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
1374         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
1375           make make_library
1376         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
1377           regression tests can report resource usage (rfe 700441)
1378         * support/regression/collate-results.py: report resource usage
1379         * support/regression/ports/ds390/spec.mk,
1380         * support/regression/ports/hc08/spec.mk,
1381         * support/regression/ports/mcs51/spec.mk,
1382         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
1383         * support/regression/ports/ds390/uCsim.cmd,
1384         * support/regression/ports/hc08/uCsim.cmd,
1385         * support/regression/ports/mcs51/uCsim.cmd,
1386         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
1387         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
1388           library, use the default one
1389         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
1390           building the library
1391
1392 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
1393
1394         * config.dsp: added dependency on .version and configure_vc.awk
1395         * device/include/setjmp.h: updated for --stack-auto and --xstack
1396         * device/include/mcs51/at89c51snd1c.h: corrected line endings
1397         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
1398         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
1399         * device/lib/libsdcc.lib: added _setjmp
1400         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
1401           (decorateType): fixed bug 1372851,
1402           (optimizeGetHbit): fixed warning
1403         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
1404           array initialisation
1405         * support/regression/tests/bug1057979.c: added test for bug 1358192
1406         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
1407
1408 2005-12-03 Borut Razem <borut.razem AT siol.net>
1409
1410         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
1411           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
1412
1413 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1414
1415         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
1416         createIval): implement symbol independant "flexible array member",
1417         (createIvalCharPtr): implemented flexible array initialisation with a
1418         string
1419         * src/SDCCsymt.c (copyStruct): removed,
1420         (getSize): fixed misleading comment,
1421         (getAllocSize): removed, the additional allocation size is now in
1422         sym->flexArrayLength,
1423         (checkStructFlexArray): new, syntax checks for flexible array members,
1424         (compStructSize): added syntax checks for "flexible array members"
1425         (copyStruct): removed,
1426         (copyLinkChain): removed inefficient fix for bug 770487
1427         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
1428         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
1429         symbol->flexArrayLength
1430         * src/SDCCerr.c,
1431         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
1432         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
1433         * support/regression/tests/structflexarray.c: added
1434         * support/valdiag/tests/structflexiblearray.c: added
1435
1436 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1437
1438         * src/SDCCast.c (decorateType): fixed bug 1368489
1439         * support/Util/SDCCerr.c,
1440         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
1441
1442 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1443
1444         * device/include/mcs51/at89c51snd1c.h: added file submitted by
1445           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
1446
1447 2005-11-27 Borut Razem <borut.razem AT siol.net>
1448
1449         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
1450           support/cpp2/mkdeps.h: added command line option
1451           -obj-ext=<extension> to SDCPP to define object file externion, used
1452           for generation of make dependencies (-M)
1453         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
1454
1455 2005-11-26 Borut Razem <borut.razem AT siol.net>
1456
1457         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
1458           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
1459           added pic and pic16 libraries
1460
1461 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1462
1463         * device/include/float.h: Corrected typo in prototype of __fsgt
1464
1465 2005-11-25 Borut Razem <borut.razem AT siol.net>
1466
1467         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
1468           added creation of model-mcs51-stack-auto libraries
1469
1470 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
1471
1472         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
1473         and fields-list too
1474         * src/SDCCast.c (createIvalArray): removed obsolete comment
1475
1476 2005-11-24 Borut Razem <borut.razem AT siol.net>
1477
1478         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
1479           added missing device/lib/mcs51/crt*.asm sources
1480
1481 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
1482
1483         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
1484
1485 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
1486
1487         * device/lib/_fs2schar.c,
1488         * device/lib/_fs2sint.c,
1489         * device/lib/_fs2slong.c: optimized inline asm
1490
1491 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1492
1493         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1494           Better handling of floats between -1.0 and 0.0.
1495
1496 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1497
1498         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
1499           (the missing "if"s prohibited removal of redundant labels)
1500
1501 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1502
1503         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1504           Properly convert floats between -1.0 and 0.0 to long, int, and char
1505           types (max integer value of negative floats tends to zero).
1506         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1507           Removed changes made so to work properly with floats between
1508           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
1509           and _fs2char.c
1510
1511 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1512
1513         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
1514         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
1515         (genCast) cosmetic change
1516         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
1517         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
1518         from mcs51
1519         * support/regression/tests/bitfields (testSignedBitfields): added
1520
1521 2005-11-18 Borut Razem <borut.razem AT siol.net>
1522
1523         * sdcc/device/lib/Makefile.in: remove all unnecessary files
1524         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
1525           introduced SILENT option to make building of pic16 libraries less
1526
1527 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1528
1529         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1530           Now they work properly with floats between -1.0 and 0.0
1531         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
1532
1533 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1534
1535         * src/SDCCicode.c (printOperand): added missing else
1536
1537 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1538
1539         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
1540         reformatted for better readability
1541         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
1542         signed bitfields
1543
1544 2005-11-17 Borut Razem <borut.razem AT siol.net>
1545
1546         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
1547           introduced SILENT option to make building of pic16 libraries less
1548           verbose - used for nightly snapshot build
1549         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
1550           available on Win32 platforms.
1551         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
1552           medium, large, pic and pic16
1553
1554 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1555
1556         * device/lib/printf_large.c: Temporary patch for bug 1358192:
1557           printf("%f"...) sets fraction to zero.
1558
1559 2005-11-16 Raphael Neider <rneider AT web.de>
1560
1561         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
1562           fixes #1357221
1563         * src/pic/gen.c (genIfx): implemented for CARRY bit
1564         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1565           to generic pointers, fixes #1357332,
1566           (pic16_movLit2f): NEW,
1567           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1568
1569 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1570
1571         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1572
1573 2005-11-11 Raphael Neider <rneider AT web.de>
1574
1575         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1576         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1577           compute pointer's type from operand,
1578           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1579           improved single bit reads, fixes bug #1353379
1580
1581 2005-11-09 Borut Razem <borut.razem AT siol.net>
1582
1583         * support/scripts/sdcc.nsi: added lib/pic to the package
1584
1585 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1586
1587         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1588
1589 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1590
1591         * support/regression/tests/bug1348008.c: added
1592         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1593         * support/regression/tests/bug1337835.c: updated comment
1594
1595 2005-11-06 Borut Razem <borut.razem AT siol.net>
1596
1597         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1598           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1599           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1600           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1601           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1602           dynamic construction of cl_error_class and derivates - 2.nd try
1603
1604 2005-11-05 Borut Razem <borut.razem AT siol.net>
1605
1606         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1607           bug, which caused Bus Errors on sparc solaris
1608
1609 2005-11-04 Borut Razem <borut.razem AT siol.net>
1610
1611         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1612           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1613           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1614           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1615           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1616           and derivates to resolve the initialization problem on OSX
1617
1618 2005-11-02 Borut Razem <borut.razem AT siol.net>
1619
1620         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1621           corrected typo - #include <winsock2.h>
1622
1623 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
1624
1625         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
1626           (_asxxxx_mapping): added org directive for future enhancements
1627
1628 2005-11-01 Borut Razem <borut.razem AT siol.net>
1629
1630         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1631           enabled sockets on WIN32
1632         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
1633
1634 2005-10-31 Borut Razem <borut.razem AT siol.net>
1635
1636         * support/regression/generate-cases.py: escape backslashes in {testcase}:
1637           WIN32 backslash path delimiters should be escaped when used in C strings
1638         * support/regression/tests/bitfields.c: exclude failing assertions for
1639           __CYGWIN32__ and __MINGW32__ hosts
1640
1641 2005-10-30 Borut Razem <borut.razem AT siol.net>
1642
1643         * src/SDCCutil.c: corrected double comparison typo
1644
1645 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
1646
1647         * device/lib/medium/Makefile: added for new memory model medium
1648         * device/include/asm/mcs51/features.h: updated for medium/pdata
1649         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
1650           added Multiply & Accumulate sbit's and MAC0_PAGE define
1651         * device/include/mcs51/c8051f300.h: added sfr16 definitions
1652         * device/include/mcs51/c8051f310.h: added sfr16 definitions
1653         * device/lib/_mullong.c: update for medium model
1654         * device/lib/incl.mk: added medium model
1655         * doc/sdccman.lyx: documented medium model
1656         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
1657         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1658         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1659         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1660           (allocParms): set SCLS and OCLS to pdata for medium model
1661         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1662           for pdata,
1663           (powof2): return <0 if not power of 2
1664         * src/avr/gen.c (genBitWise): use updated powof2
1665         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1666           (shiftR2Left2Result): small optimization in setup, save acc when storing,
1667           (shiftLLeftOrResult): use B if necessary
1668         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1669         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1670         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1671         * support/regression/Makefile.in: added test-mcs51-medium
1672         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1673
1674 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1675
1676         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1677         specifier unsigned
1678         * device/lib/time.c (mktime): fixed bug 1334315
1679
1680 2005-10-28 Raphael Neider <rneider AT web.de>
1681
1682         * device/include/pic/p16f_common.inc: added common declarations
1683         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1684
1685 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1686
1687         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1688           (aopPutUsesAcc): added to predict accumulator use,
1689           (assignResultValue): save acc if necessary,
1690           (genMinusDec): store result if indirectly addressed,
1691           (genDivOneByte):  save acc if necessary,
1692           (movLeft2Result): bugfix if left already in acc,
1693           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1694             attention to accumulator use (esp. pdata),
1695           (genReceive): receive pdata correctly
1696         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1697         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1698
1699 2005-10-27 Raphael Neider <rneider AT web.de>
1700
1701         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1702
1703 2005-10-27 Raphael Neider <rneider AT web.de>
1704
1705         * .version: changed version to 2.5.4
1706         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1707         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1708           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1709             arithmetics support routines
1710         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1711         * device/lib/Makefile.in: also create installdir for pic
1712
1713         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1714           pic14 port as well
1715         * src/pic/device.c (dump_sfr): rewritten to delegate register
1716           placement to the linker (use `extern sym' rather than sym EQU addr),
1717           (validAddress): fixed to check last specified address
1718         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1719           (popGetLit): truncate literal value to 8 bit,
1720           (popGet): moved assert to more appropriate place
1721           (popGetExternal): create pCode operand from and mark the according
1722             symbol as being `extern'
1723           (popGetAddr): added sanity check on immediate's offset, provide
1724             GPOINTER tag on demand
1725           (aopPut): fixed for immediates,
1726           (mov2w_op): move operand's address or contents to WREG (depending on
1727             operand type), safer variant of mov2w,
1728           (movwf,call_libraryfunc): NEW, handy abbreviations,
1729           (get_argument_pcop,get_return_val_pcop,pass_argument,
1730           get_returnvalue): interface for accessing function parameters and
1731             return values,
1732           (assignResultValuei,genRet): use new parameter/return value interface
1733           (pic14_getDataSize): back to old version handling generic pointers,
1734           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1735             provided implementation and/or fixed old one,
1736           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1737             calls, removed legacy 8051 reference code
1738           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1739           (loadSignToC): NEW, move the operands sign bit to CARRY,
1740           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1741             genRightShiftSigned, accepts negative shift counts,
1742           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1743           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1744             generic pointers, __data pointers and __code pointers,
1745           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1746             and signed bitfields, limit bitfields to 8 bit,
1747           (genDataPointerGet): fixed number of bytes read,
1748           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1749           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1750             pointers to constant data are no longer assumed to point to __code
1751             space, removed invalid pointer types,
1752           (bitpatternFromVal): retrieve the PICs representation of an integer
1753             or float literal,
1754           (genDataPointerSet): fixed assigning to po_immediate operands,
1755           (genGenPointerSet): implemented as library call,
1756           (genIfx): fixed incorrect condition,
1757           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1758             provide GPOINTER tag according to destination's storage class,
1759           (genCast): added code to handle casting to generic pointers, added
1760             sign-/zero extension of the result
1761           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1762         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1763         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1764           extend the result
1765         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1766           address/register resides in the shared banks
1767           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1768             put all variables into separate sections (have the linker arrange
1769             them)
1770           (picglue): put init code and interrupt handlers in separate sections
1771         * src/pic/main.c: added port specific options table, modified to PORT
1772           structure to make GPOINTERs 3 byte, added pic14_options
1773           (_pic14_do_link): private linking routine (update paths to libraries,
1774             add libsdcc.lib by default)
1775         * src/pic/main.h: declare pic14_options
1776         * src/pic/pcode.c: fixed instructions i/o relations,
1777           (RegCond): reverted to correct version,
1778           (newpCodeOpLit): truncate literals to 8 bit,
1779           (genericPrint): added debug output,
1780           (getRegFromInstruction): fixed for various operand types, simplified
1781           (BuildFlow): fixed broken handling of isntructions with labels
1782           (LinkFlow): start at last instruction in flow (skip trailing comments),
1783             pass the flow on to the next instruction after CALL
1784           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1785           (insertPCodeInstruction): fixed inserting after a skip instruction,
1786           (DoBankSelect): fixed for labeled instructions
1787           (OptimizepBlock): honor --nopeep switch
1788           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1789         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1790         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1791           (pCodeOptime2pCodes): allow disabling this optimization via
1792             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1793             but is still buggy), started implementation of a dataflow based
1794             pCode optimization (CSE + dead code elimination)
1795           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1796         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1797           names are independant of the stack location and therefore portable across
1798           devices
1799
1800 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1801
1802         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1803           (selectSpil): fixed bug 1337835 by not spilling bit variables
1804         * support/regression/tests/bug1337835.c: added test for this bug
1805         * src/mcs51/peeph.def: restart after rule 3.c,
1806           addded rules 263.x to optimize loading constants
1807
1808 2005-10-26 Raphael Neider <rneider AT web.de>
1809
1810         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1811         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1812           (genAssign): emit warning when casting literals to generic pointer
1813             type, also applies when taking the address of a fixed variable,
1814           (genCast): improved casting to generic pointers
1815         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1816           extern variables, added verbose error message
1817         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1818
1819 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1820
1821         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1822         carry must be complemented too
1823         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1824         could be emitted by genMinus
1825         * src/SDCCval.c (constVal): fixed bug 1305065
1826
1827 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1828
1829         * src/SDCCast.c (addCast): added promotion for bit variables
1830         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1831         promotion casts + optimisation
1832         (optimizeGetWord): fix warning 'i' might be used uninitialized
1833         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1834         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1835
1836 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1837
1838         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1839         all chars are promoted to int; promotion should be handled in SDCCast.c
1840
1841 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1842
1843         * device/lib/_strcmp.c: Fixed bug 1326457
1844
1845 2005-10-11 Raphael Neider <rneider AT web.de>
1846
1847         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1848         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1849
1850 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1851
1852         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1853         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1854
1855 2005-10-04 Raphael Neider <rneider AT web.de>
1856
1857         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1858           device/lib/pic16/pics.all: added pic18f1320
1859         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1860
1861 2005-09-30 Raphael Neider <rneider AT web.de>
1862
1863         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1864         * src/pic16/devices.inc: NEW, provides device descriptions
1865         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1866
1867 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1868
1869         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1870           GETHBIT
1871
1872 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1873
1874         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1875           documented Any Order Bit, Higher Order Byte and Higher Order Word
1876         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1877         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1878           (optimizeGetAbit): new, to get any bit, not only the high bit,
1879           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1880           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1881           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1882           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1883             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1884             GETABIT, GETBYTE, GETWORD: decorate them,
1885           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1886           (ast_print): added GETABIT, GETBYTE, GETWORD
1887         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1888         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1889           (geniCodeBinary): new generic binary icode,
1890           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1891         * src/port.h: updated comment for PORT.hasExtBitOp
1892         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1893           (genGetByte): new, to get a single byte,
1894           (genGetWord): new, to get a word from a long,
1895           (gen51Code): added GETABIT, GETBYTE, GETWORD
1896         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1897
1898 2005-09-23 Raphael Neider <rneider AT web.de>
1899
1900         * configure.in, configure: have device/lib/pic configured
1901         * device/lib/Makefile.in: added model-pic14
1902         * device/lib/clean.mk: added pic/ to clean rule
1903         * device/lib/pic: added rudimentary pic14 library providing support
1904           functions for multiplication/division/generic pointer access
1905         * src/SDCCopt.c (convilong): mark support functions as extern
1906           for pic14 port as well
1907         * src/pic/gen.c (genMult): added assertions,
1908           (genpic14Code): emit warning on unhandled iCodes
1909         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1910         * src/pic/pcode.c (pCodeOpCopy),
1911         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1912           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1913           SFR_REGISTER}), made safe for future extensions
1914         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1915           instructions even if preceeded by SKIP instructions (also remove
1916           them); removed unused code
1917         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1918           prevents leaving parts of the structure uninitialized after copying
1919
1920 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1921
1922         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1923           ago by me
1924         * support/regression/tests/addsub.c: added test for the bug
1925
1926 2005-09-21 Raphael Neider <rneider AT web.de>
1927
1928         * device/include/pic16/pic18f1220.h,
1929           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1930         * device/lib/pic16/Makefile.rules: added missing opening paren
1931         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1932           are provided in genutils.c,
1933           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1934           operand/result sizes,
1935           (genCmp): assert on NULL pointers first, then check deref'ed values
1936         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1937           result size
1938
1939 2005-09-18 Raphael Neider <rneider AT web.de>
1940
1941         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1942           as these are now unused,
1943           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1944         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1945           local, avoids uninitialized pointer dereference on r->name
1946         * src/pic16/ralloc.c (newReg): fixed indentation
1947
1948 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1949
1950         * src/SDCCval.c (constVal): fixed bug 730366
1951         * support/Util/SDCCerr.c,
1952         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1953
1954 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1955
1956         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1957
1958 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1959
1960         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1961
1962 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1963
1964         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1965           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1966         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1967           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1968         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1969         * packihx/packihx.c (hexDigit): made c unsigned char
1970         * as/mcs51/lklibr.c (fndsym),
1971         * link/z80/lkgb.c (gb),
1972         * link/z80/lklibr.c (fndsym),
1973         * link/z80/lkrloc.c (relr),
1974         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1975         * src/SDCC.lex (checkCurrFile, process_pragma),
1976         * src/SDCCglue.c (spacesToUnderscores),
1977         * src/SDCCmain.c (setParseWithComma, processFile),
1978         * src/asm.c (tvsprintf, printCLine),
1979         * src/avr/gen.c (emitcode, aopPut),
1980         * src/ds390/gen.c (emitcode),
1981         * src/hc08/gen.c (emitcode, emitinline),
1982         * src/mcs51/gen.c (emitcode, genInline),
1983         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1984           tokenizeLineNode),
1985         * src/pic/ralloc.c (debugLog),
1986         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1987           tokenizeLineNode),
1988         * src/pic16/ralloc.c (debugLog),
1989         * src/z80/main.c (_process_pragma):
1990            made all ctype.h function calls safe
1991         * src/SDCCopt.c: include math.h for fabs
1992         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1993           and used them throughout the code to make ctype.h function calls safe
1994         * src/ds390/main.c (asmLineNodeFromLineNode),
1995         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1996         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1997            unsigned char*
1998         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1999           (newpCodeAsmDir): made ctype.h function calls safe
2000         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
2001           pic16_emitcode):  made lbp unsigned char*
2002         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
2003           (pic16_newpCodeAsmDir): made ctype.h function calls safe
2004         * src/xa51/gen.c (emitcode),
2005         * src/z80/gen.c (_emit2): made lbp unsigned char*
2006         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
2007            char*
2008
2009 2005-09-05 Raphael Neider <rneider AT web.de>
2010
2011         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
2012           access bank splitpoint
2013
2014 2005-09-05 Raphael Neider <rneider AT web.de>
2015
2016         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
2017
2018 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
2019
2020         * .version: changed to version 2.5.3
2021         * doc/sdccman.lyx: changed version to 2.5.3,
2022           documented --codeseg and --constseg and pragma codeseg and constseg,
2023           documented bit parameters (reentrant) and bit returning
2024         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
2025            currFunc->recvSize, but is this ok for all ports?
2026           (ast2iCode): result of ~ on unsigned char must be cast to int for
2027            bool to work
2028         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
2029           function pointers in bit space
2030         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
2031           (processFuncArgs): call port.reg_parm() with reentrancy info
2032         * src/port.h,
2033         * src/avr/main.c,
2034         * src/ds390/main.c,
2035         * src/hc08/main.c,
2036         * src/pic/main.c,
2037         * src/pic16/main.c,
2038         * src/xa51/main.c,
2039         * src/z80/main.c: port.reg_parm prototype extended with
2040           "bool reentrant" parameter
2041         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
2042           options.stackAuto for allocating bit register parameters
2043         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
2044           (genSend): set BitBankUsed if it is,
2045           (selectRegBank): factored out of genCall for use in genPcall,
2046           (genCall): removed redundant dtype assignmen, use selectRegBank,
2047           (genPcall): handle returning in Carry properly, save in F0 if needed,
2048           (genReceive): handle bit register parameters
2049         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
2050           (mcs51_assignRegisters): enable bit registers for all reentrant
2051            functions and don't set BitBankUsed unconditionally
2052         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
2053         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
2054         * support/regression/tests/funptrs.c: added tests for BOOL and for return
2055
2056 2005-08-27 Borut Razem <borut.razem AT siol.net>
2057
2058         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
2059         ppc-osx (Darwin) does not support -u option. It seems that it is
2060         supported only on Linux - GNU cp
2061
2062 2005-08-25 Borut Razem <borut.razem AT siol.net>
2063
2064         * sim/ucsim/gui.src/serio.src/Makefile.in,
2065           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
2066           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2067           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
2068           install and strip, since the strip at /usr/ccs/bin should be used
2069           on solaris
2070
2071 2005-08-24 Borut Razem <borut.razem AT siol.net>
2072
2073         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
2074
2075 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
2076
2077         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
2078         ffffffffu
2079
2080 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
2081
2082         * as/mcs51/aslink.h: completed lkrloc.c prototypes
2083         * as/mcs51/lkmain.c (link_main): fixed warning
2084         * device/include/stdbool.h: ds390 has no advanced bit support yet
2085         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
2086         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
2087         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
2088           and updated their macros
2089         * src/SDCCval.c (constVal): updated comment for renamed b_long
2090
2091 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
2092
2093         * as/mcs51/asdata.c: changed ctype['['] to BINOP
2094         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
2095           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
2096           (oprio): set priority for '['
2097         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
2098            and adb_24_bit
2099         * as/mcs51/asm.h: added defines R_BIT and S_BIT
2100         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
2101         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
2102         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
2103           added overlayable BIT_BANK area
2104         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
2105           (summary2): explain 'T' in legenda
2106         * as/mcs51/lkrloc.c: replaced old K&R style,
2107           (relr): added R_BIT processing,
2108           (errmsg): added "Bit-addressable relocation error",
2109           (adb_bit): added for converting from byte- to bit-addressable space,
2110           (adb_24_bit): added for converting from byte- to bit-addressable space
2111         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
2112            used in reentrant functions now even as return value
2113         * device/lib/_gptrput.c (_gptrput): removed obsolete code
2114         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
2115           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
2116         * src/SDCCglobl.h: added indicator BitBankUsed
2117         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
2118            the bit registers b0-b7
2119         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
2120           (geniCodeCast): fixed bug 1263853,
2121           (geniCodeLogicAndOr): put result in bool or char,
2122           (geniCodeReceive): added parameter func for accessing the return type,
2123           (geniCodeFunctionBody): pass func to geniCodeReceive
2124         * src/SDCCmain.c: added indicator BitBankUsed
2125         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
2126         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
2127           (checkSClass): don't put automatic bool/bit on stack,
2128           (checkFunction): removed check on function cannot return bit
2129         * src/SDCCsymt.h: added newBoolLink prototype
2130         * src/mcs51/gen.c (rb1regs): added bit registers,
2131           (movc): created for assigning to carry,
2132           (pushReg, popReg): created for pushing registers,
2133           (sameRegs): check both AOP_REG and AOP_CRY types,
2134           (aopOp): handle bit registers,
2135           (aopPut): optimization no self-assign,
2136           (saveRegisters): push reg->base (bits) only once for bit registers,
2137            and use pushReg,
2138           (unsaveRegisters): pop reg->base only once and use popReg,
2139           (assignResultValue): added parameter func and return in carry for bits,
2140           (genIpush): optimization no reload in A if not changed,
2141           (genSend): bit parameters in reentrant functions are passed in bit
2142            registers by first assigning to bits in B, then save registers and
2143            copy B to bits,
2144           (genCall): handle returning in Carry properly, save it in F0 if needed,
2145           (genPcall): updated assignResultValue call, this is not safe yet for bit
2146            returning function !!!
2147           (genFunction): don't generate equ's for bit registers and use pushReg,
2148           (genEndFunction): take care of bit returning functions and use popReg,
2149           (genRet): return bit in Carry,
2150           (genIfx): optimize bit registers and other directly addressable bits,
2151           (genReceive): updated assignResultValue call
2152         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2153           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2154            registers when using stack-auto
2155         * src/mcs51/ralloc.c (_G): added allBitregs,
2156           (regs8051): added the bit registers,
2157           (createStackSpil): use macro IS_BIT,
2158           (getRegBit): added to allocate a bit register, else spill,
2159           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2160           (updateRegUsage): factored out to ease stepping while debugging,
2161           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2162            also allocate bit registers,
2163           (fillGaps): handle bit registers,
2164           (findAllBitregs): added to create bit vector with all bit registers,
2165           (mcs51_allBitregs): returns this bit vector,
2166           (mcs51_assignRegisters): when using stack-auto use bit registers for
2167            passing parameters and creating local variables
2168         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2169
2170 2005-08-22 Borut Razem <borut.razem AT siol.net>
2171
2172         * device/lib/Makefile.in: replaced find option -or with -o
2173           to make it run on solaris
2174
2175 2005-08-22 Raphael Neider <rneider AT web.de>
2176
2177         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
2178           fixes #1265442 (crash on Solaris)
2179
2180 2005-08-20 Borut Razem <borut.razem AT siol.net>
2181
2182         * configure, configure.in: added tests for libsocket and libnsl libraries,
2183           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
2184           from support/regression/Makefile.in
2185         * support/regression/Makefile.in: added
2186         * device/lib/pic16/Makefile.common.in: force make to use bash shell
2187         * sim/ucsim/libtool: regenerated on sparc-solaris
2188         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2189           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
2190           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
2191           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
2192           sparc-solaris, which doesn't use GNU ld linker
2193         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
2194         * as/Makefile: find on sparc-solaris does not support -maxdepth option
2195
2196 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
2197
2198         * src/mcs51/peeph.def: updated comments
2199
2200 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2201
2202         * device/lib/_gptrget.c,
2203         * device/lib/_gptrput.c: slightly shorter
2204         * doc/sdccman.lyx: incremented version
2205         * src/mcs51/peeph.def: moved peephole comments to the line of first
2206           change to better keep line correlation, reanimated 186.e
2207         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
2208
2209 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2210
2211         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
2212           David Saxton with quotes around file name.
2213
2214 2005-08-15 Borut Razem <borut.razem AT siol.net>
2215
2216         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
2217           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
2218           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
2219           make tests run on x86_64 platform
2220
2221 2005-08-13 Raphael Neider <rneider AT web.de>
2222
2223         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
2224           as it might be executed DURING a build (parallel make is wonderful)
2225
2226 2005-08-13 Raphael Neider <rneider AT web.de>
2227
2228         * device/lib/Makefile.in (port-specific-objects-pic16):
2229           revert to cp $(PORT)/bin/*.* $(PORTDIR)
2230         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
2231           dependency
2232         * device/lib/pic16/Makefile.rules: build subdirs before creating
2233           the library, removed builddir rule, create $(builddir) early in
2234           recurse rule, use empty recurse rule for leaf directories
2235         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
2236           mkdir errors (race condition), removed duplicate suffix "hex"
2237           from clean rules
2238         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
2239         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
2240           prevents mkdir -p from aborting on Alpha
2241
2242 2005-08-12 Raphael Neider <rneider AT web.de>
2243
2244         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
2245           db-statements in order to allow for arrays of pointers in code
2246           sections to be placed without interspersed 0-padding, fixes
2247           bug #1256215
2248         * (emitStatistics): fixed division by zero for pic18f1220
2249         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
2250           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
2251         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
2252         * (pic16_pCodeConstString): keep track of already emitted string
2253           literals to prevent "duplicate definitions of symbol _str_NR"
2254         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
2255           debug message
2256         * device/lib/Makefile.in: ignore failing PIC16 library builds
2257         * device/lib/pic16/Makefile: do not build if gputils are missing
2258         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
2259
2260 2005-08-10 Raphael Neider <rneider AT web.de>
2261
2262         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
2263           my last commit)
2264
2265 2005-08-10 Raphael Neider <rneider AT web.de>
2266
2267         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
2268           Rokas' patch to add the new fixed point type "__fixed16x16"
2269         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
2270           functions for __fixed16x16 arithmetics
2271         * device/lib/pic16: reimplemented the build system to support
2272           a separate build directory, better handling of libio (create
2273           the library in a separate subdir for each architecture) and
2274           easier configuration (centralized in Makefile.common)
2275
2276 2005-08-07 Raphael Neider <rneider AT web.de>
2277
2278         * src/pic16/gen.c (genrshTwo): fixed sign extension
2279         * src/pic16/device.c: added pic18f2320, 4220 and 4320
2280         * device/include/pic16/pic18f2220.h: changed some bit definitions,
2281           added T0CONbits
2282         * device/include/pic16/pic18f4220.h: NEW, header for
2283           pic18f4220 and pic18f4320
2284         * device/include/pic16/pic18fregs.h: added new devices,
2285           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
2286         * device/include/pic16/signal.h: resolved name clashes
2287           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
2288           to also allow testing for interrupt enable bits, added
2289           comments on how to use the macros
2290         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
2291         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
2292           register definitions for the devices
2293         * device/lib/pic16/pics.all: added new devices
2294         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
2295           allocated memory
2296         * device/lib/pic16/libc/stdlib/memfree: do not count
2297           the block header as free memory
2298         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
2299           simplified and added missing end-of-blocklist-marker
2300           (reported by Peter Onion, fixes #1252814)
2301         * (_mergeHeapBlock): fixed loop condition
2302         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
2303           len==0, restructured code
2304         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
2305           up a bit, reduced bitfield accesses, prevent endless loops
2306           in case of heap corruption
2307         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
2308           "unreferenced arguments/must return a value" warnings
2309         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
2310           replaced BAUDREG with SPBRG
2311         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
2312           device/lib/pic16/debug/gstack/gstack.c: replaced
2313           _naked, _asm, _endasm with __naked, __asm, __endasm
2314
2315 2005-08-05 Raphael Neider <rneider AT web.de>
2316
2317         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
2318           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
2319
2320 2005-08-05 Borut Razem <borut.razem AT siol.net>
2321
2322         * device/lib/Makefile.in: added missing ';'
2323         * configure: removed ^M characters
2324
2325 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2326
2327         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
2328           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
2329           License
2330
2331 2005-08-04 Borut Razem <borut.razem AT siol.net>
2332
2333         * configure.in: pic16 libraries build 2nd try - enable running
2334           configure in device/lib/pic16
2335         * configure: regenerated from configure.in
2336         * device/lib/Makefile.in: create $(PORT)/bin directory
2337
2338 2005-08-03 Raphael Neider <rneider AT web.de>
2339
2340         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
2341           to get/set values via pointers
2342         * (genUnpackBits,genPackBits): changed detection of
2343           ptr->bitfield vs. sym.bitfield, fixed access via generic
2344           pointers, removed dead (wrong) code for multibyte bitfields
2345         * (genNearPointerGet, genGenPointerGet): removed useless code,
2346           fixed bitfield detection, fixes #1250594
2347         * (genNearPointerSet): removed useless code
2348         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
2349           and introduced macro pic16_emitpcode that conditionally emits
2350           the origin of the following pCode (useful for debugging SDCC)
2351         * src/pic16/pcode.c: changed (and disabled) some debug outputs
2352         * (createDefmap): fixed handling of LFSR for --optimize-df
2353
2354 2005-08-02 Borut Razem <borut.razem AT siol.net>
2355
2356         * device/lib/Makefile.in: pic16 libraries build enabled since
2357           gputils-0.13.2 are now localy installed at sourceforge's compile farm
2358
2359 2005-08-02 Raphael Neider <rneider AT web.de>
2360
2361         * src/pic16/gen.c (genPackBits): removed deprecated warning
2362         * (genGenPointerSet): fixed bitfield detection
2363
2364 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2365
2366         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
2367
2368 2005-07-31 Raphael Neider <rneider AT web.de>
2369
2370         * device/lib/pic16/libdev/pic18f458.c,
2371           device/include/pic16/pic18f458.h: added missing T0CONbits
2372
2373 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2374
2375         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
2376
2377 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
2378
2379         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
2380
2381 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2382
2383         * device/include/mcs51/at89c51ed2.h: added.
2384
2385 2005-07-23 Raphael Neider <rneider AT web.de>
2386
2387         * src/pic/gen.h: added emitpcode macro for debugging
2388         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
2389           and replace by macro adding debug information on demand
2390         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
2391         * (gencjne): tried to fix; replaced with correct (slower) code
2392         * (gen{Unp,P}ackBits): fixed single bit access
2393         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
2394         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
2395           previous instruction
2396         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
2397           register has to be handled with care (forbidding movement
2398           of assignments/uses, removing assignments completely, ...)
2399         * (pCodeOptime2pCodes): make use of regIsSpecial
2400         * added lots of debugging output (commented out)
2401         * src/pic/rallloc.c (deassignLRs): prevent operand registers
2402           from being reused as result UNLESS it is known to work
2403
2404 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
2405
2406         * support/Util/dbuf.h: include <stddef.h> for size_t
2407         * .version: changed to version 2.5.2
2408
2409 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2410
2411         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
2412
2413 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2414
2415         * src/hc08/gen.c (genMinus): fixed bug #1241835,
2416           (genModOneByte): removed needless psha/pula
2417
2418 2005-07-22 Raphael Neider <rneider AT web.de>
2419
2420         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
2421           have PIC14 handled like PIC16, fixes broken pic14 linker calls
2422         * src/pic/gen.c (resolveIfx): do not "invent" labels
2423         * (genSkipc): changed to positive logic
2424         * (genSkipCond): removed as no longer needed
2425         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
2426           backport from PIC16
2427         * (genLeftShift): check operands are in different registers
2428         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
2429           INCF does not update CARRY...
2430         * src/pic/main.c: fixed _linkCmd
2431         * src/pic/pcode.c (unlinkpCode): added inactive code
2432         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
2433           alive (do not assign result and operand overlapping registers)
2434
2435 2005-07-22 Raphael Neider <rneider AT web.de>
2436
2437         * src/pic/device.c (dump_sfr): replaced register declaration with
2438           call to emitSymbolToFile() to avoid duplicate symbols
2439         * (assignRelocatableRegisters): do not declare external symbols
2440         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
2441           right (take size of type, not etype)
2442         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
2443         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
2444         * (packRegsForAccUse): disabled assignment of WREG as
2445           the result reg to prevent occurence of just fixed #1235003,
2446           fixes #1242954
2447         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
2448           symbols (avoids duplicate symbols in .asm file)
2449         * (pic14emitRegularMap): use emitSymbolToFile()
2450         * src/pic/gen.c (aopOp): fixed spillLocation handling
2451         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
2452         * (genDataPointerSet): removed unneccessary variables/output
2453
2454 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
2455
2456         * as/mcs51/lkarea.c: enlarged codemap for banked memory
2457         * device/lib/mcs51/crtbank.asm: added # to 0x0F
2458
2459 2005-07-21 Raphael Neider <rneider AT web.de>
2460
2461         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
2462           architecture cannot handle them efficiently, fixes bug #1235003
2463         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
2464           check for empty sets before using them (fixes bug #1232190)
2465
2466 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
2467
2468         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
2469           (lnksect2): generate warnings for memory overlap
2470         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
2471           constseg to set the name of these segments so you can instruct the linker
2472           to place them in banks
2473         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
2474         * src/SDCCglobl.h: added MODEL_HUGE to enum,
2475           added code_seg and const_seg to options
2476         * src/SDCCglue.c (emitMaps): use options.const_seg,
2477           (createInterruptVect): put interrupt vectors in segment HOME,
2478           (glue): put HOME before static segment and put the main glue in HOME,
2479           (glue): use options.code_seg
2480         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
2481         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
2482           these segments so you can instruct the linker to place them in banks
2483           (linkEdit): use code_loc for HOME segment which should be the first
2484           segment in code memory now
2485         * src/SDCCmem.c: fixed more stuff like bug 1238386
2486         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
2487           (changePointer): don't change function pointers to code pointers for
2488           banked functions,
2489           (compareType): added exceptional check for banked function pointers
2490         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
2491         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
2492           after static in code memory
2493         * src/mcs51/gen.c: added aopLiteralLong prototype,
2494           (aopForSym): use getSize for functions,
2495           (genCall): generate banked calls over one trampoline __sdcc_banked_call
2496           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
2497           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
2498           the segment,
2499           (genPcall): use call for literal function pointers and generate banked
2500           calls over the one trampoline so there's only one place for the user to
2501           modify according to his/hers hardware,
2502           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
2503           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
2504         * src/mcs51/main.c: added keyword banked,
2505           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
2506         * support/Util/SDCCerr.c,
2507         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
2508           needed for passing the bank and address to the trampoline
2509         * device/lib/mcs51/crtbank.asm: added for bankswitching
2510         * device/lib/mcs51/Makefile: added crtbank
2511
2512 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2513
2514         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
2515           for fields at offset 0 of a struct or union as reported
2516           on 2005-07-07 in the developer mailing list.
2517
2518 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
2519
2520         * src/SDCCmem.c: fixed bug 1238386
2521
2522 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2523
2524         * src/mcs51/peeph.def: added labelrefcounting for peepholes
2525           (patch #1144962), added peephole 300, enabled 259.x
2526         * doc/sdccman.lyx: removed screenshot and provided link instead
2527
2528 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2529
2530         * doc/sdccman.lyx: added section about debugging with ddd
2531         * doc/figures/ddd_example.eps: screenshot of debugging session
2532
2533 2005-07-04 Raphael Neider <rneider AT web.de>
2534
2535         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
2536           like CODE pointers, fixes #1115683
2537         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
2538           call, fixes bugs #1232211, #1228110,
2539           fixed wrong casts to pCodeFlow from pCodeInstructions
2540
2541 2005-07-04 Raphael Neider <rneider AT web.de>
2542
2543         * src/pic/gen.c (popGet): changed assert to allow for
2544           bit operands
2545         * (popGetAddr): changed signature to provide
2546           an additional index, patched all call sites
2547         * (genCmpEq): handle literal-like operands correctly
2548         * (genAddrOf): added sanity checks on __code/__data pointers
2549         * (genAssign): added handling of symbols from __code section
2550         * (gencjne): do not generate code for comparisons whose result
2551           is neither stored nor used, fixes bug #1171114
2552         * (AccLsh, AccRsh): operate on operand instead of WREG
2553         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
2554           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
2555           by known count
2556         * rewrote complete shift-by-literal logic, commented unused
2557           functions out
2558         * (genConstPointerGet): get multiple bytes (if result size > 1),
2559           fixed handling of non-immediate addresses
2560         * (genPointerGet): handle CODE pointers like CONST pointers
2561         * (genpic14Code): insert C-SRC lines as Cource-pCodes
2562         * ({aop,op}_isLitLike): NEW, single place to decide whether an
2563           operand is to be treated as a literal or not
2564         * (mov2w,genPcall,genCmpEq),
2565           src/pic/genarith.c: use aop_isLitLike() to decide between
2566           literal/register contents
2567         * (addSign): added missing offset
2568         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2569           only emit comment in debug-mode,
2570           use {aop,op}_isLitLike throughout the file
2571         * src/pic/glue.c: fix initializers for pointers (work in progress)
2572         * src/pic/pcode.c (get_op): honor index on _const symbols
2573         * ({reset,dump}pCodeStatistics): NEW, estimate code size
2574         * (dumppBlock): added pCode size estimation
2575         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2576           check for IS_SYMOP before OP_SYMBOL'ing
2577         * fixed indentation, compacted switch-statements
2578         * (allocReg): find free register and allocate it instead of
2579           allocating new registers all the time
2580         * (deassignLRs): prevent POINTER_GET's from being assigned the same
2581           registers as its operands (necessary only for multibyte GETs)
2582
2583 2005-07-01 Raphael Neider <rneider AT web.de>
2584
2585         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2586           debugging .asm-output macros FENTRY + FEXIT
2587         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2588           way... I wonder...
2589         * (emitpComment): NEW, printf to pCode
2590         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2591           offset handling
2592         * (popGetAddr): NEW, variant of popGet to access an immediates
2593           high(er) bytes instead of the n'th byte of memory they reference,
2594           replaced popGet with popGetAddr where neccessary
2595         * (genDataPointerGet): reactivated and fixed implementation
2596         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2597           accesses
2598         * (genDataPointerSet): fixed multibyte assignments
2599         * (genpic14Code): fixed --i-code-in-asm handling
2600         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2601         * (genPlus): fixed index-out-of-bounds error
2602         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2603         * src/pic/ralloc.c: added debugging output macro FENTRY2
2604         * (spillThis): fixed indentation, enbraced for-body for clarity
2605         * (rematStr): commented out as now unused
2606         * (regTypeNum): commented out special spill case (overwrites
2607           arbitrary values)
2608         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2609
2610 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2611
2612         * doc/sdccman.lyx: documented sfr16/sfr32,
2613           added example for using storage class with function pointers
2614         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2615
2616 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2617
2618         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
2619         * device/lib/_itoa.c,
2620         * device/lib/_ltoa.c: optimized codesize
2621         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
2622           but don't know how to suppress the double warning.
2623         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
2624         * support/Util/SDCCerr.c,
2625         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
2626
2627 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
2628
2629         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
2630           fixed old K&R prototypes
2631         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
2632         * device/lib/_gptrget.c,
2633         * device/lib/_gptrgetc.c,
2634         * device/lib/_gptrput.c: changed versions for new memory indicator values,
2635           also new versions for small generic pointers and banked generic pointers
2636         * src/port.h: added const_name
2637         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
2638         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
2639         * src/SDCCcse.c (findPrevIc): check all associative operators
2640         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
2641         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
2642         * src/SDCCmem.c: updated comments,
2643           set far-space to 0 for pdata, results in optimized code
2644         * src/SDCCmem.h: added macro CONST_NAME
2645         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
2646           moving the info into the highest bits, see also gptrget/gptrput
2647         * src/src.dsp: added sdcc.ico to project files
2648         * src/avr/gen.c (genCast): fixed bug 0x%d
2649         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
2650         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
2651           relation between ptr_type and DCL_TYPE,
2652           (genCast): fixed bug 0x%d
2653         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
2654           (CODE)" for const_name
2655         * src/hc08/gen.c (genCast): fixed bug 0x%d
2656         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
2657           (hc08_port): added "CONST (CODE)" for const_name
2658         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2659           (aopForRemat, adjustArithmeticResult): disconnected direct relation
2660           between ptr_type and DCL_TYPE,
2661           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2662           operand* and took AOP() inside function so sfr-ness can be checked,
2663           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2664           new prototype,
2665           (genFunction, genEndFunction): optimized stack setup,
2666           (genMinus): optimized for literals with ending zeroes (in bytes),
2667           (genCast): fixed bug 0x%d
2668         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2669           (mcs51_port): added "CONST (CODE)" for const_name
2670         * src/mcs51/peeph.def: made rule 226 more generic
2671         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2672         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2673         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2674         * src/z80/main.c (z80_port): added NULL for const_name,
2675           (gbz80_port): added NULL for const_name
2676         * support/regression/tests/bug663539.c,
2677         * support/regression/tests/sfr16.c: new tests
2678
2679 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2680
2681         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2682
2683 2005-06-24 Raphael Neider <rneider AT web.de>
2684
2685         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2686           corrected typos...
2687         * device/include/pic16/signal.h: added USBIF
2688           and SIG_USB
2689
2690 2005-06-24 Raphael Neider <rneider AT web.de>
2691
2692         * device/lib/pic16/libdev/pic18f2455.c,
2693           device/include/pic16/pic18f2455.h: NEW
2694         * device/include/pic16/pic18fregs.h,
2695           device/lib/pic16/pics.all,
2696           src/pic16/device.c: added 18f2455
2697         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2698           device/include/pic16/{pic18f[68][567].h,usart.h}:
2699           replaced MULTIPLE_USARTS define with more relaible
2700           compatibility sfrs (for USART access)
2701
2702 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2703
2704         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2705           and the output asm file line is printed on two lines.
2706
2707 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2708
2709         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2710           BGT, BLE, BHI, and BLS instructions
2711         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2712           genCmpEq): removed
2713         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2714           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2715           fixes bug #1216342
2716         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2717
2718 2005-06-15 Raphael Neider <rneider AT web.de>
2719
2720         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2721         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2722         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2723           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2724           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2725
2726 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2727
2728         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2729           Marcel Telka in bug #1215704
2730
2731 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2732
2733         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2734           located in shared memory bank.
2735
2736 2005-05-31 Raphael Neider <rneider AT web.de>
2737
2738         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2739           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2740           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2741
2742 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2743
2744         * device/lib/_strncpy.c: fixed the fix
2745
2746 2005-05-26 Raphael Neider <rneider AT web.de>
2747
2748         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2749           initializers with \0, bug #1208187
2750         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2751           intializers with \0, bug #1208187
2752
2753 2005-05-26 Raphael Neider <rneider AT web.de>
2754
2755         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2756           initializers with \0, bug #1208187
2757         * src/pic16/main.c (_process_pragma): added sanity checks
2758           for stack position and size, emit warnings when appropriate
2759
2760 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2761
2762         * device/lib/_strncpy.c: fixed not filling with \0
2763
2764 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2765
2766         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2767           createFunction),
2768         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2769           compound_statement),
2770         * src/SDCCsymt.h,
2771         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2772
2773 2005-05-24 Raphael Neider <rneider AT web.de>
2774
2775         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2776
2777 2005-05-24 Raphael Neider <rneider AT web.de>
2778
2779         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2780           TRISE definitions, closes bug #1162453
2781
2782 2005-05-22 Raphael Neider <rneider AT web.de>
2783
2784         * src/pic16/main.c (_process_pragma): check for missing
2785           arguments to pragmas code and udata
2786         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2787           consistency fixes to match other headers (thanks to Jim Paris)
2788         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2789
2790 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2791
2792         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2793
2794 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2795
2796         * support/regression/tests/bug1198642.c: new test
2797         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2798         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2799         * support/scripts/resource.h,
2800         * support/scripts/resource.rc,
2801         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2802         * support/scripts/sdcc.ico: added 32x32 icon
2803
2804 2005-05-18 Raphael Neider <rneider AT web.de>
2805
2806         * device/lib/pic16/libdev/pic18f*.c,
2807         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2808           keywords to "__sfr" and "__at (X)"
2809         * device/include/pic16/pic18fregs.h: added pic18f4520
2810         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2811           #1203088 (MPLAB compatibility)
2812
2813 2005-05-17 Raphael Neider <rneider AT web.de>
2814
2815         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2816         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2817         * device/lib/pic16/pics.all: added new devices
2818         * src/pic16/device.c: added support for pic18f4520
2819
2820 2005-05-16 Raphael Neider <rneider AT web.de>
2821         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2822         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2823         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2824           convenience function for bit access
2825
2826 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2827
2828         * device/lib/printf_large.c: fixed bug 1193299
2829         * support/regression/tests/bug1057979.c: added test %3.3s
2830
2831 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2832
2833         * device/include/mcs51/8051.h,
2834         * device/include/mcs51/8052.h: made parseable with lint
2835         * device/include/mcs51/lint.h: added include file for (sp)lint
2836         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2837         * doc/cdbfileformat.lyx,
2838         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2839
2840 2005-05-14 Raphael Neider <rneider AT web.de>
2841
2842         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2843         * device/lib/pic16/libc/stdlib/itoa.c (new)
2844         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2845         * device/lib/pic16/libio/Makefile: exclude subdir according to
2846           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2847         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2848         * src/pic16/gen.c (genFunction): prevent annoying warning
2849         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2850           nameclashes on BeOS
2851         * support/cpp2/cppmain.c (cpp_output_string): new
2852         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2853           fixes bug 1116802
2854
2855 2005-05-13 Borut Razem <borut.razem AT siol.net>
2856
2857         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2858
2859 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2860
2861         * .version: changed to version 2.5.1; back to bleeding edge development
2862
2863 2005-05-11 Borut Razem <borut.razem AT siol.net>
2864
2865         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2866           generate PDF version 1.3 documents
2867
2868 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2869
2870         * .version: changed to version 2.5.0
2871
2872 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2873
2874         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2875
2876 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2877
2878         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2879         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2880         well as many smaller updates.
2881         * .version: changed to version 2.5.0-pre1
2882
2883 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2884
2885         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2886
2887 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2888
2889         * support/regression/tests/bug1185672.c: added
2890         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2891           bug 1185672
2892         * src/mcs51/gen.c (genCall): added comments, made it look safer
2893         * src/mcs51/gen.c (genEndFunction): simplified
2894
2895 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2896
2897         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2898
2899 2005-04-14 Borut Razem <borut.razem AT siol.net>
2900
2901         * fixed bug 1045046 - SIGSEGV with really simple code?:
2902           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2903           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2904
2905 2005-04-14 Borut Razem <borut.razem AT siol.net>
2906
2907         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2908           src/pic16/device.h: temporarily disabled experimental #inline pragma
2909           for 2.5.0 release
2910
2911 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2912
2913         * device/include/z80/stdio.h,
2914         * device/include/z80/string.h: removed these highly incomplete files so
2915           SDCC can use the default ones in device/include/
2916
2917 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2918
2919         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2920         gcc warning.
2921         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2922         fix sdcpp warnings.
2923
2924 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2925
2926         * device/include/malloc.h: removed redundant __reentrant prototypes
2927         * device/lib/_mullong.c: added working xstack variant in asm (C version
2928           doesn't pass regression tests)
2929         * device/lib/bpx.c: used __data and made bpx char for mcs51
2930         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2931           (createFunction): fixed bug with xstackPtr
2932         * src/SDCCcse.c: corrected comments
2933         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2934           (killDeadCode, eBBlockFromiCode): removed unused code
2935         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2936           corrected comments
2937         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2938           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2939           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2940           (genModOneByte): fixed warning in MSVC
2941         * src/mcs51/main.c (): added comments
2942         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2943
2944 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2945
2946         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2947
2948 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2949
2950         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2951
2952 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2953
2954         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2955         characters arrays of larger size than the declared one.
2956
2957 2005-04-10 Borut Razem <borut.razem AT siol.net>
2958
2959         * src/pic/gen.c (genInline),
2960           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2961           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2962           (findNextInstruction), (findPrevInstruction),
2963           (findInstructionUsingLabel),
2964           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2965         * src/pic/pcode.c (findLabel): added missing '\n'
2966         * src/src.dsp: added SDCCdwarf2.c to the project
2967
2968 2005-04-09 Borut Razem <borut.razem AT siol.net>
2969
2970         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2971
2972 2005-04-08 Raphael Neider <rneider AT web.de>
2973
2974         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2975           into the chain after a given one) and mergeDefmapSymbols (combine
2976           defmap entries for each symbol per pcode)
2977         * (createDefmap): have defmap entries merged in the end
2978         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2979           a symbol before replacing one access type's symbol, merge symbols in
2980           the end (replacement symbol might already have an entry)
2981         * (assignValnums): keep reference to written WREG intact
2982
2983 2005-04-08 Raphael Neider <rneider AT web.de>
2984
2985         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2986           Alpha)
2987
2988 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2989
2990         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2991         bytes
2992
2993 2005-04-07 Raphael Neider <rneider AT web.de>
2994
2995         * device/include/pic16/usart.h: added compatibility defines for
2996           devices with more than one USART
2997         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2998
2999 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3000
3001         * device/lib/Makefile.in: updated for port specific include
3002
3003 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3004
3005         * support/regression/ports/mcs51/spec.mk: added mcs51 include
3006
3007 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3008
3009         * device/include/8051.h,
3010         * device/include/8052.h,
3011         * device/include/at89S8252.h,
3012         * device/include/at89c55.h,
3013         * device/include/at89x051.h,
3014         * device/include/at89x51.h,
3015         * device/include/at89x52.h,
3016         * device/include/mcs51reg.h,
3017         * device/include/reg51.h,
3018         * device/include/reg764.h,
3019         * device/include/regc515c.h,
3020         * device/include/sab80515.h: (re)moved these 12 files
3021         * device/include/mcs51/8051.h,
3022         * device/include/mcs51/8052.h,
3023         * device/include/mcs51/at89S8252.h,
3024         * device/include/mcs51/at89c55.h,
3025         * device/include/mcs51/at89x051.h,
3026         * device/include/mcs51/at89x51.h,
3027         * device/include/mcs51/at89x52.h,
3028         * device/include/mcs51/mcs51reg.h,
3029         * device/include/mcs51/reg51.h,
3030         * device/include/mcs51/reg764.h,
3031         * device/include/mcs51/regc515c.h,
3032         * device/include/mcs51/sab80515.h: and added them here
3033
3034 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
3035
3036         * device/include/stdarg.h: changed SDCC specific keywords to double
3037           underlined form.
3038         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
3039           mcs51 and ds390.
3040         * device/include/hc08/mc68hc908gp32.h,
3041         * device/include/hc08/mc68hc908jb8.h,
3042         * device/include/hc08/mc68hc908jkjl.h,
3043         * device/include/hc08/mc68hc908qy.h: fixed comments
3044         * device/include/mcs51/README: updated
3045         * device/include/mcs51/c8051f120.h: added PINRSF
3046         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
3047         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
3048           amidst code. Also inline is not supported.
3049
3050 2005-04-06 Raphael Neider <rneider AT web.de>
3051
3052         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
3053         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
3054           callers stack/frame pointers
3055
3056 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
3057
3058         * device/include/pic16/usart.h: added, missing in previous commit,
3059         * device/include/pic16/adc.h: fixed typo,
3060         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
3061         commit,
3062         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
3063         <p18fxxx.inc>
3064         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
3065         uninitialized because a bug appears with gplink
3066         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
3067         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
3068         complains for unrecognised option
3069
3070 2005-04-05 Raphael Neider <rneider AT web.de>
3071
3072         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
3073           structs as well (using memcpy)
3074         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
3075           on ISRs (GOTO has no label)
3076         * src/pic16/device.h: added OF_OPTIMIZE_DF
3077         * src/pic16/main.c: added compiler switch --optimize-df to enable the
3078           new data flow analysis/optimization
3079         * src/pic16/pcode.c: added (prototypes for and implementation of)
3080           dataflow analysis functions, fixed pCodeInstructions' inCond and
3081           outCond values, made RCALL a branch instruction
3082         * (pic16_unlinkpCode): keep C line if possible
3083         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
3084           C line moved if possible
3085         * (pic16_getRegFrompCodeOp): NEW, improved version of...
3086         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
3087           to use new pic16_getRegFrompCodeOp (works for more SFRs)
3088         * (pic16_BuildFlow): fixed skip instructions with label (did not start
3089           new flow)
3090         * (pic16_getJumptabpCode): NEW, needed in...
3091         * (LinkFlow): fixed handling of jumptables, calls and conditional
3092           branches
3093         * (pic16_InsertCommentAfter): NEW
3094         * (pic16_pCodeReplace): made verbose and flow preserving
3095         * (AnalyzeFlow): added call to data flow analysis
3096         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
3097         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
3098         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
3099
3100 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3101
3102         * src/SDCCast.c (decorateType): fixed bug #1105626
3103
3104 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
3105
3106         * device/include/asm/pic16/features.h,
3107         * pic18f*.h headers,
3108         * device/include/pic16/adc.h,
3109         * device/include/pic16/delay.h,
3110         * device/include/pic16/i2c.h,
3111         * device/include/pic16/malloc.h,
3112         * device/include/pic16/stdio.h,
3113         * device/include/pic16/stdlib.h,
3114         * device/include/pic16/string.h,
3115         * device/lib/pic16/libc/stdio/printf_tiny.c,
3116         * device/lib/pic16/libc/stdio/printf_small.c,
3117         * device/lib/pic16/libc/stdio/strmgpsim.c,
3118         * device/lib/pic16/libc/stdio/strmmssp.c,
3119         * device/lib/pic16/libc/stdio/strmusart.c,
3120         * device/lib/pic16/libc/stdio/vfprintf.c,
3121         * device/lib/pic16/libc/stdlib/ltoa.c,
3122         * device/lib/pic16/libc/stdlib/putchar.c,
3123         * device/lib/pic16/libc/stdlib/x_ftoa.c,
3124         * device/lib/pic16/libc/stdlib/memchrpgm.c,
3125         * device/lib/pic16/libc/stdlib/memchrram.c,
3126         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
3127         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
3128         * device/lib/pic16/libio/adc/adcbusy.c,
3129         * device/lib/pic16/libio/adc/adcread.c,
3130         * device/lib/pic16/libio/adc/adcsetch.c,
3131         * device/lib/pic16/libio/usart/ubaud.c,
3132         * device/lib/pic16/libio/usart/ubusy.c,
3133         * device/lib/pic16/libio/usart/udrdy.c,
3134         * device/lib/pic16/libio/usart/uopen.c,
3135         * device/lib/pic16/libio/usart/uputc.c,
3136         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
3137         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
3138         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
3139         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
3140         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
3141         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3142         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3143         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3144         specific keywords to double underlined form,
3145         * device/lib/pic16/libc/Makefile.rules,
3146         * device/lib/pic16/libsdcc/Makefile.rules,
3147         * device/lib/pic16/libm/Makefile,
3148         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3149         to compile with C standard set in Makefile.common
3150         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3151         rand.c and crc.c in compilation process,
3152         * device/lib/pic16/libsdcc/int/divuint.c,
3153         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3154         `c' from signed to unsigned,
3155         * device/lib/pic16/startup/crt0.c,
3156         * device/lib/pic16/startup/crt0i.c,
3157         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3158         keywords to double underlined form, bug fixes in _do_cinit function
3159         which prevented the correct initialization of the .idata segment,
3160         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3161         core to enter a infinite loop
3162         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3163
3164 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3165
3166         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3167
3168 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3169
3170         * device/include/Makefile.in: add support for hc08 subdirectory
3171         * device/include/hc08/: new subdirectory
3172         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3173         Lucas Loizaga, thanks!
3174         * device/include/hc08/mc68hc908qy.h,
3175         * device/include/hc08/mc68hc908gp32.h,
3176         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3177         their own directory. Changed internal macro names to use the compiler
3178         reserved namespace. Changed SDCC specific keywords to double
3179         underlined form.
3180         * device/include/math.h,
3181         * device/include/malloc.h,
3182         * device/include/stdarg.h,
3183         * device/include/stdbool.h
3184         * device/include/string.h,
3185         * device/include/tinibios.h,
3186         * device/include/ds400rom.h,
3187         * device/include/8051.h,
3188         * device/include/8052.h,
3189         * device/include/80c51xa.h,
3190         * device/include/at89c55.h,
3191         * device/include/at89S8252.h,
3192         * device/include/at89x51.h,
3193         * device/include/at89x52.h,
3194         * device/include/ds80c390.h,
3195         * device/include/reg764.h,
3196         * device/include/regc515c.h,
3197         * device/include/sab80515.h,
3198         * device/include/mcs51/c8051f000.h,
3199         * device/include/mcs51/c8051f018.h,
3200         * device/include/mcs51/c8051f020.h,
3201         * device/include/mcs51/c8051f040.h,
3202         * device/include/mcs51/c8051f060.h,
3203         * device/include/mcs51/c8051f120.h,
3204         * device/include/mcs51/c8051f300.h,
3205         * device/include/mcs51/c8051f310.h,
3206         * device/include/mcs51/c8051f320.h,
3207         * device/include/mcs51/c8051f330.h,
3208         * device/include/mcs51/c8051f350.h,
3209         * device/include/z180.h: Changed SDCC specific keywords to double
3210         underlined form.
3211
3212 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
3213
3214         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
3215         18F4455,
3216         * (pic16_assignConfigWordValue): disable testing of configuration
3217         register value with config mask,
3218         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
3219         function with port->fun_prefix,
3220         * (genFunction): when generating a naked interrupt function never
3221         create an absolute segment placed in interrupt vector address, place
3222         the actual interrupt function at IVA instead, when an interrupt
3223         function is generated with unspecified interrupt then do not create
3224         the absolute section,
3225         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
3226         code for generating a call to generic pointer get/put function with
3227         a call to function pic16_callGenericPointer(),
3228         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
3229         the call to the generic pointer get/put functions with prefixing the
3230         function name with port->fun_prefix,
3231         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
3232         * src/pic16/main.c (_process_pragma): prefix function with
3233         port->fun_prefix,
3234         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
3235         calling assembler, old 18Fxxxx macro is deprecated,
3236         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
3237         PC_ASMDIR in while condition,
3238         * (findInstruction): add PC_ASMDIR in while condition,
3239         * (buildCallTree): prefix main with port->fun_prefix,
3240         * (pic16_pCode2str): fixed bug that didn't emit the memory access
3241         identifier for variable with banked access in instructions BTFSS,
3242         BTFSC, BCF, BSF, BTG
3243         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
3244         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
3245         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
3246         perform optimization when enviroment variable NO_REG_OPT is set,
3247         * (insideLRBlock): NEW, return 1 if register is inside an
3248         INF_LOCALREGS block,
3249         * (RemoveRegFromLRBlock): remove a register that is completely
3250         eliminated by register optimization, but it is still left in local
3251         register store/restore in/from stack block,
3252         * (Remove2pcodes): after removing register, check to see if it
3253         should be removed from local register store/restore in/from stack
3254         block,
3255         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
3256         DUMMY_READ_VOLATILE,
3257
3258         * device/include/pic16/adc.h: minor prototype modifications and
3259         update,
3260         * device/include/pic16/malloc.h: added GPL notice various
3261         modifications,
3262         * device/include/pic16/stdint.h: NEW, standard header for ints
3263         * device/include/pic16/delay.h: NEW, header for delay functions,
3264         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
3265         delay1mtcy,
3266         * device/include/pic16/signal.h: NEW, header providing helper macros
3267         for implementing signal handlers,
3268         * device/include/pic16/stdio.h: added prototypes for functions,
3269         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
3270         prototypes for stdin and stdout, added macro PUTCHAR to
3271         automatically implement putchar function prototype,
3272         * device/include/pic16/usart.h: modified and updated USART library,
3273         * device/lib/pic16/libio/adc/,
3274         * device/lib/pic16/libio/i2c: some modifications to improve library
3275         performance,
3276         * device/lib/pic16/libc/stdio/: modifications for the new printf*
3277         family of functions,
3278         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
3279         family of functions and other sources,
3280         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
3281         of the PIC18Fxx[28] devices,
3282         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
3283         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
3284         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
3285         _do_cinit function, because the previous failed when local variables
3286         where not placed in the same memory bank,
3287         * device/lib/pic16/libsdcc/char/: various modifications to improve
3288         library performance,
3289         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
3290         information on the new functions of the c library and more...
3291
3292 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3293
3294         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
3295
3296 2005-03-26 Raphael Neider <rneider AT web.de>
3297
3298         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
3299           if condition == CARRY)
3300         * (genCmp): adapted to new genSkipc semantics
3301         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
3302           on rIfx (genCmp was broken)
3303
3304 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3305
3306         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
3307         * src/z80/main.c (_keywords[]),
3308         * src/SDCCglobal.h (struct options),
3309         * src/SDCC.y,
3310         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
3311         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
3312         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
3313         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
3314         always available in leading double underscore form. The C99 support is
3315         mostly missing, but it's a start.
3316         * support/regression/tests/bug-227710.c: fixed nonconforming use of
3317         reserved identifier "__data".
3318
3319 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
3320
3321         * src/mcs51/peeph.def: fixed bug 1170013
3322
3323 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
3324
3325         * device/include/mcs51reg.h: fixed bug 842007
3326
3327 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3328
3329         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
3330         last time.
3331
3332 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3333
3334         * src/port.h (struct PORT),
3335         * src/avr/ralloc.c (avr_assignRegisters),
3336         * src/avr/main.c,
3337         * src/ds390/ralloc.c (ds390_assignRegisters),
3338         * src/ds390/main.c,
3339         * src/hc08/ralloc.c (hc08_assignRegisters),
3340         * src/hc08/main.c,
3341         * src/mcs51/ralloc.c (mcs51_assignRegisters),
3342         * src/mcs51/main.c,
3343         * src/pic/ralloc.c (pic14_assignRegisters),
3344         * src/pic/main.c,
3345         * src/pic16/ralloc.c (pic16_assignRegisters),
3346         * src/pic16/main.c,
3347         * src/xa51/ralloc.c (xa51_assignRegisters),
3348         * src/xa51/main.c,
3349         * src/z80/ralloc.c (z80_assignRegisters),
3350         * src/z80/ralloc.h,
3351         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
3352         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
3353         * src/SDCCcse.h,
3354         * src/SDCCdflow.c (computeDataFlow),
3355         * src/SDCCdflow.h,
3356         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
3357         * src/SDCCloop.h,
3358         * src/SDCCcflow.c (*),
3359         * src/SDCCcflow.h,
3360         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
3361         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
3362         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
3363         immedDom() returning wrong block; probably fixes bug #1160833)
3364
3365 2005-03-20 Borut Razem <borut.razem AT siol.net>
3366
3367         * support/scripts/inc2h.pl: WIN32 port
3368
3369 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
3370
3371         * device/lib/makefile.in: added abs.c and labs.c
3372
3373 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
3374
3375         * device/include/stdint.h: added
3376         * device/lib/abs.c: added
3377         * device/lib/labs.c: added
3378         * device/include/stdlib.h: added abs() and labs() prototypes
3379         * device/lib/libsdcc.lib: added abs and labs
3380         * device/include/float.h,
3381         * device/lib/_fsmul.c,
3382         * device/lib/printf_fast.c,
3383         * device/lib/printf_tiny.c: updated comments
3384
3385 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3386
3387         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
3388         bug #1164313
3389
3390 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3391
3392         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
3393         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
3394
3395 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
3396
3397         * device/lib/printf_large.c: removed inline assembly for portability and
3398           readability. Use printf_fast if speed or size are more important.
3399         * src/pic16/gen.c: removed conditions around use of DEBUGpc
3400         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
3401
3402 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
3403
3404         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
3405         prevent compiler warning
3406
3407 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
3408
3409         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
3410         moved to level 0 and declared as static. Also they are explicit
3411         placed in access bank. This was necessery because some times they
3412         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
3413         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
3414         optimizations. Currently only compare to unsigned char is implemented,
3415         * src/pic16/gen.c: added fReturnIdx array,
3416         * (struct resolvedIfx) is moved to gen.h and made public,
3417         * (struct _G): added sregsAlloc and sregsAllocSet fields,
3418         * (aopForSym): added an optimization to directly store in stack of
3419         the operand of a SEND iCode,
3420         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
3421         but as registers instead (AOP_REG) using the fReturnIdx array,
3422         * (pic16_freeAsmop): remove the freed register from the
3423         _G.sregsAlloc field,
3424         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
3425         a compare of 'WREG',
3426         * (pic16_popGetTempRegCond): changed function prototype, now
3427         function takes also a bitVector argument v which holds the current
3428         set of registers that are allocated for stack access by aopForSym,
3429         registers allocated in aopForSym for accessing stack symbols are not
3430         any more part of the functions usedRegs field,
3431         * (genCall): some times aopOp is called for a stack variable to be
3432         send, aopForSym might perform the push, if this is true make sure
3433         that genCall doesn't push the variable twice by testing _G.resDirect,
3434         * (genFunction): changed testing for unspecified interrupt number
3435         from 256 to INTNO_UNSPEC,
3436         * modified selection scheme of frame pointer generation. Previously
3437         if function did use local registers a frame pointer was generated,
3438         now a frame pointer is generated only if function has arguments
3439         (that need PLUSW2 register access), or has stack arguments, or the
3440         compiler is not instructed to omit the frame pointer,
3441         * (genEndFunction): before restoring local registers that were saved
3442         in the function preamble, also restore the registers that *might*
3443         have been allocated for stack access,
3444         * (genRet): removed some old comments,
3445         * (genCmp, the active (RN's) version): added a call to the
3446         pic16_genCmp_special function to perform the compare with a more
3447         robust and optimized way,
3448         * (genInline): a feature has been added in inline code generation,
3449         which allows a wildcard variable substitution when writing inline
3450         assembly. Code is incomplete and experimental therefore undocumented,
3451         * (genCast): changed order of aopOp for result and right to allow
3452         aopForSym to directly load the result if possible,
3453         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
3454         perform an optimized compare on some selected special occasions,
3455         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
3456         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
3457         generate an IVT any more,
3458         * src/pic16/main.c (pic16_optionsTable): added command line option
3459         --optimize-cmp,
3460         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
3461         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
3462         macros,
3463         * src/pic16/NOTES: Raphael Neider added in list of active developers
3464         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
3465         jumptable_end to prevent bug #,
3466         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
3467         inCond and outCond fields,
3468         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
3469         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
3470         turn off register spilling,
3471         * (packRegsForOneUse): synced with other ports' versions although it
3472         is not used currently,
3473         * (pic16_packRegisters): added an optimization while reading
3474         structure bitfields, some registers may be saved (malloc code is
3475         decreased by 80 bytes)
3476
3477 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
3478
3479         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
3480         left is a bitfield, if yes, then don't optimize assignment. Perhaps
3481         this can be optimized more?
3482
3483 2005-03-10 Raphael Neider <rneider AT web.de>
3484
3485         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
3486           genNearPointerGet): (hopefully) fixed access to bitfields via
3487           pointers (p->bitN = x; and x = p->bitN; failed)
3488
3489 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
3490
3491         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
3492
3493 2005-03-09 Raphael Neider <rneider AT web.de>
3494
3495         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
3496
3497 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
3498
3499         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
3500         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
3501           (regTypeNum): set REG_BIT type if necessary
3502         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
3503         * support/regression/tests/critical.c: check bug 1144613
3504
3505 2005-03-02 Raphael Neider <rneider AT web.de>
3506
3507         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
3508
3509 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3510
3511         * src/avr/ralloc.c (serialRegAssign),
3512         * src/ds390/ralloc.c (serialRegAssign),
3513         * src/hc08/ralloc.c (serialRegAssign),
3514         * src/mcs51/ralloc.c (serialRegAssign),
3515         * src/pic/ralloc.c (serialRegAssign),
3516         * src/pic16/ralloc.c (serialRegAssign),
3517         * src/xa51/ralloc.c (serialRegAssign),
3518         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
3519
3520 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
3521
3522         * src/SDCCast.c (decorateType): fixed bug 1124787
3523
3524 2005-02-20 Hubert Sack <sack AT digiplan.de>
3525         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3526
3527         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
3528         patch #1121755
3529
3530 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3531
3532         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
3533         to keep the correct label reference count when adding/removing references
3534         to labels. A peephole file using this is appended to patch #1144962.
3535
3536 2005-02-14 Raphael Neider <rneider AT web.de>
3537
3538         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
3539         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
3540         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
3541           retrievals of result operand's value on assignment
3542
3543 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
3544
3545         * device/include/pic16/string.h: modified prototype for memccpy()
3546         to memccpy(void *, void *, char, size_t)
3547         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
3548         check whether to omit frame pointer or not,
3549         * (genInline): convert all occurences of "\n" to LF in inline
3550         assembler blocks, this helps formatting the inline text,
3551         * (pic16_loadFSR0): modified prototype,
3552         * (genNearPointerGet, genNearPointerSet): reorganization of code,
3553         removed some 8051 legacy code,
3554         * (genPackBits): enabled handling bitfields exceeding one byte in size,
3555         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
3556         before allocating temporary registers in functions,
3557
3558 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3559
3560         * support/regression/tests/bitvars.c: corrected the "fix"
3561
3562 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3563
3564         * support/regression/tests/bitvars.c,
3565         * support/regression/tests/bitwise.c,
3566         * support/regression/tests/rotate.c: "fixed" problems on Alpha
3567
3568 2005-02-10 Raphael Neider <rneider AT web.de>
3569
3570         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3571           different size for Alpha
3572         * src/pic16/gen.c (genCmpEq) : improved compare with 0
3573
3574 2005-02-09 Raphael Neider <rneider AT web.de>
3575
3576         * src/SDCC.lex(doPragma) : save and restore warning options as well
3577           (also added new stack plus clone- and copyAndFreeSDCCERRG())
3578         * have #pragma less_pedantic set the errorlevel to WARNING
3579           (fixes #1117001)
3580         * (cloneOptimize) : fixed wrong malloc's size
3581         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3582           facilitate correct handling of #pragma (save|restore)
3583
3584 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3585
3586         * src/mcs51/gen.c: removed non-standard C nameless struct/union
3587
3588 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3589
3590         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3591
3592 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3593
3594         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3595
3596 2005-02-02 Raphael Neider <rneider AT web.de>
3597
3598         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3599         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3600         * (pic16_storeForReturn): fixed to allow returning function pointers
3601         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3602         * device/include/pic16/{stddef.h,stdbool.h}: added
3603
3604 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3605
3606         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3607
3608 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3609
3610         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3611         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3612          appeared to be required
3613
3614 2005-01-31 Borut Razem <borut.razem AT siol.net>
3615
3616         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3617           include/mcs51 and include/z80 directories to the package
3618
3619 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3620
3621         * src/hc08/gen.c (genFunction): fixed bug #1112752
3622
3623 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3624
3625         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
3626
3627 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3628
3629         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
3630
3631 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
3632
3633         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
3634
3635 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
3636
3637         * device/include/c8051fxxx.h: removed these 6 files
3638         * device/include/mcs51/c8051fxxx.h: added these 11 new files
3639
3640 2005-01-26 Raphael Neider <rneider AT web.de>
3641
3642         * src/pic16/gen.c (genAssign): fixed assignment from longs
3643           in codespace (were cut to three bytes)
3644         * (genDummyRead): implemented (except for CODESPACE...),
3645           fixed bug #1108575
3646         * src/pic16/glue.c (emitStatistics): beautified
3647         * device/lib/pic16/libm/Makefile: added include path
3648
3649 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3650
3651         * src/z80/gen.c (aopPut): fixed bug #1103902
3652
3653 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3654
3655         * device/lib/expf.c: fixed bug #1095792
3656
3657 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3658
3659         * device/lib/pic16/libm: added Math library sources
3660
3661 2005-01-24 Raphael Neider <rneider AT web.de>
3662
3663         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3664           to enable upcast to pCodeOpReg2 (there is no type tag to
3665           differenciate the two and pic16_popGet2p cast into PCOR2)
3666         * src/pic16/main.c (_process_pragma): fixed another malloc bug
3667           (sizeof(sectNames) changed to sizeof(sectName))
3668           Both patches fix segfaults under MinGW.
3669
3670 2005-01-23 Raphael Neider <rneider AT web.de>
3671
3672         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3673           Safe_[mc]?alloc()'ed variables
3674         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3675           of (byte sized) temporaries (assign them to WREG for now)
3676         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3677           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3678           this might fix SIGSEGVs on MinGW...
3679         * src/SDCCopt.c (killDeadCode): restored original behaviour
3680           (volatile operands might get thrown away though)
3681
3682 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3683
3684         * src/pic16/gen.c: fixed bug #1106975,
3685         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3686         pointer update, INTCON is saved, global interrupts are disabled and
3687         restored after updateing TOS.
3688         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3689         * added function attribute 'shadowregs' to take advantage of shadow
3690         registers,
3691         * added function attribute 'wparam' as an alternative to the wparam
3692         pragma,
3693         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3694         user declares a non-ISR function as 'shadowregs',
3695         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3696
3697 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3698
3699         * .version: bumped version number to 2.4.8
3700         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3701         pic16 port,
3702         * device/lib/pic16/libio/i2c/: I2C module support library,
3703         * device/include/pic16/i2c.h: I2C support library header,
3704         * device/lib/pic16/libc/stdio/: standard IO support sources,
3705         * (printf_small.c): printf_small() source, supports float print,
3706         * (printf_tiny.c): printf_tiny() source, does not support floats,
3707         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3708         enable global optimizations for entire library source, other
3709         Makefiles in the source tree are also modified to reflect this,
3710         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3711         function,
3712         * doc/sdccman.lyx: updated to reflect new changes,
3713         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3714         sym->onStack if-case,
3715         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3716         sbit, idata, _idata, xdata, _xdata,
3717         * added pragma library, to link an external library, (see doc),
3718         * removed command line options, --pomit-config-words, --pomit-ivt,
3719         --pleave-reset-vector,
3720         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3721         when calling assembler to reflect memory model used, also define
3722         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3723         reflect stack model used,
3724         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3725         on stack return NULL,
3726
3727 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3728
3729         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3730           of the operands is volatile. Fixes #1020220
3731
3732 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3733
3734         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3735         * (OptimizeRegUsage): make sure that there is really no other flow where
3736           the first pCode is used
3737
3738 2005-01-22 Raphael Neider <rneider AT web.de>
3739
3740         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3741           to fix #1106967 (pCode->seq are not set up correctly)
3742
3743 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3744
3745         * src/SDCCglue.c (glue): make sure code area is declared before the
3746         static initialization area.
3747
3748 2005-01-21 Raphael Neider <rneider AT web.de>
3749
3750         * device/lib/Makefile.in: fixed test for pic16 install dir
3751         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3752           optimizations
3753         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3754           added --optimize-goto compiler switch and pragma wparam documentation
3755         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3756         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3757           and PRODH closing bug #1071770 (peephole optimizer)
3758
3759 2005-01-19 Raphael Neider <rneider AT web.de>
3760
3761         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3762           cmdLine buffers (used when calling sdcpp...) are large enough
3763           (MAX_PATH=256 truncates arguments leading to system halts when
3764           used in MinGW...)
3765         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3766         * (genUminus): rewritten to for efficiency
3767         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3768           used uninitialized in some cases)
3769         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3770           copy the third byte from the int -- now assumes 0x80 (data memory)
3771         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3772           operands (genAddLit expects the iCode's operands to swapped as
3773           well), fixed leftover bytes (crashed for short left operands)
3774         * (pic16_genMinusDec): performance improvements, removed false
3775           PIC14 emitSKPNCs
3776         * (pic16_genMinus): fixed to cope with differently sized operands
3777         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3778           for --obanksel > 1
3779         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3780         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3781           new banksel optimization
3782         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3783           analysis for temporary registers (segfaults...)
3784         * src/pic16/peeph.def: added rule
3785
3786 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3787
3788         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3789         which converts a float number to its ASCII representation
3790         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3791         functions to convert the fractional and integer part of a float to ASCII,
3792         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3793         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3794         ram
3795         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3796         _STATMEM macros,
3797         * device/include/pic16/adc.h: added GPL info,
3798         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3799         a pCodeOp as tested operand,
3800         * (genNearPointerGet): optimized bit testing, does not use
3801         intermediate register for bit value, test directly instead with
3802         BTFSS, BTFSC, works only for single bits,
3803         * (genpic16Code): dump the name of the iCode in the asm,
3804         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3805         renamed to pic16_decodeOp,
3806         * (serialRegAssign): do not allocate a temporary register for iCode
3807         sequences that test a single bit for 1/0
3808
3809 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3810
3811         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3812         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3813         access stack and frame pointers. They are initially assigned to
3814         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3815         accessing SFRs. Updated all occurences of modification of stack or
3816         frame pointer in gen.c and pcode.c,
3817         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3818         assigning of a literal value to pointers,
3819         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3820         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3821         selected
3822
3823 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3824
3825         * doc/sdccman.lyx: update documentation about stack pragma, added
3826         some info for stack memory models
3827
3828 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3829
3830         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3831
3832 2005-01-08 Raphael Neider <rneider AT web.de>
3833
3834         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3835           udata sections to fix bug #1097823
3836
3837 2005-01-05 Raphael Neider <rneider AT web.de>
3838
3839         * src/pic16/gen.c (genGenericShift): added handling of differently
3840           sized left operand and result
3841
3842 2005-01-04 Raphael Neider <rneider AT web.de>
3843
3844         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3845         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3846           to hold the condition bit)
3847         * added new version of genCmp (old code available via #define)
3848         * added new version of genShiftLeft/genShiftRight in a generic
3849           way, now supports shifting by negative values
3850         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3851           shiftCount (expected by genGenericShift)
3852         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3853         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3854           dump
3855         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3856           is an invalid literal too...)
3857
3858 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3859
3860         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3861         from Raphael Neider,
3862         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3863         for 8-bit literals. This fixes some literal operands which are sign
3864         extended to 16-bits ints when instruction needs only 8-bits.
3865
3866 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3867
3868         * device/lib/logf.c: added mcs51 assembly version
3869         * device/lib/expf.c: added mcs51 assembly version
3870         * device/lib/_logexpf.c: new shared asm code for expf and logf
3871         * device/include/math.h: add defines for assembly math library
3872         * device/lib/Makefile.in: build new _logexpf.c
3873         * device/lib/libfloat.lib: use new _logexpf.c
3874
3875 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3876
3877         * src/pic/device.c
3878         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3879           device types which have less than 0x7f registers.
3880
3881 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3882
3883         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3884
3885 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3886
3887         * device/lib/printf_fast.c: only build on supported arch.
3888         * device/lib/printf_tiny.c: only build on supported arch.
3889         * device/lib/printf_fast_f.c: only build if asm float lib
3890         * device/lib/_fsget1arg.c: only build if asm float lib
3891         * device/lib/_fsget2args.c: only build if asm float lib
3892         * device/lib/_fsnormalize.c: only build if asm float lib
3893         * device/lib/_fsreturnval.c: only build if asm float lib
3894         * device/lib/_fsrshift.c: only build if asm float lib
3895         * device/lib/_fsswapargs.c: only build if asm float lib
3896         * device/include/stdio.h: don't provide print_fast,
3897           print_fast_f, print_tiny prototypes if --xstack used
3898
3899 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3900
3901         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3902         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3903           to the SOURCES
3904
3905 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3906
3907         * device/lib/printf_fast_f.c: same as printf_fast, but
3908           with floating point enabled
3909         * device/lib/printf_fast.c: minor tweaks
3910         * device/include/stdio.h: add printf_fast_f
3911
3912 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3913
3914         * src/SDCCmain.c: make --float-reent default for mcs51
3915         * device/lib/_fsadd.c: added mcs51 assembly version
3916         * device/lib/_fssub.c: added mcs51 assembly version
3917         * device/lib/_fsmul.c: added mcs51 assembly version
3918         * device/lib/_fsdiv.c: added mcs51 assembly version
3919         * device/lib/_fseq.c: added mcs51 assembly version
3920         * device/lib/_fsneq.c: added mcs51 assembly version
3921         * device/lib/_fsgt.c: added mcs51 assembly version
3922         * device/lib/_fslt.c: added mcs51 assembly version
3923         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3924         * device/lib/Makefile.in: add _fscmp to build
3925         * device/lib/libfloat.lib: add _fscmp to build
3926
3927 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3928
3929         * device/lib/_fs2slong.c: added mcs51 assembly version
3930         * device/lib/_fs2sint.c: added mcs51 assembly version
3931         * device/lib/_fs2schar.c: added mcs51 assembly version
3932         * device/lib/_fs2ulong.c: added mcs51 assembly version
3933         * device/lib/_fs2uint.c: added mcs51 assembly version
3934         * device/lib/_fs2uchar.c: added mcs51 assembly version
3935         * device/lib/_slong2fs.c: added mcs51 assembly version
3936         * device/lib/_sint2fs.c: added mcs51 assembly version
3937         * device/lib/_schar2fs.c: added mcs51 assembly version
3938         * device/lib/_ulong2fs.c: added mcs51 assembly version
3939         * device/lib/_uint2fs.c: added mcs51 assembly version
3940         * device/lib/_uchar2fs.c: added mcs51 assembly version
3941         * device/include/float.h: added #define to select asm vs c
3942
3943 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3944
3945         * device/lib/printf_fast.c: improvements to float output
3946         * device/include/float.h: add defines for assembly float library
3947         * device/lib/_fsget1arg.c: receive 1 float arg
3948         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3949         * device/lib/_fsnormalize.c: normalize a float
3950         * device/lib/_fsreturnval.c: return float, various helper routines
3951         * device/lib/_fsrshift.c: right shift a float's mantissa
3952         * device/lib/_fsswapargs.c: swap 2 floats
3953         * device/lib/Makefile.in: build these 6 new files for mcs51
3954         * device/lib/libfloat.lib: add these 6 files to the library
3955
3956 2004-12-26 Borut Razem <borut.razem AT siol.net>
3957
3958         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3959           built by gcc 3.4.2
3960
3961 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3962
3963         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3964           and fully reentrant and register bank neutral.
3965         * device/lib/printf_fast.c: added float (not enabled by default),
3966           added compact/slower integer (also not enabled by default),
3967           improved size/speed of fast integer code, other minor changes
3968         * device/include/stdio.h, device/lib/Makefile.in,
3969           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3970
3971 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3972
3973         * src/pic16/pcode.c: declaring variables other than at the start of a
3974           block is not supported in C by VC6.
3975
3976 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3977
3978         * applied a previous patch from Raphael Neider that wasn't included
3979         in the previous commits, which fixes infinite loops within jumptable
3980         improvements,
3981         * made some fixes that previous patches introduced
3982
3983 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3984
3985         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3986         that fixes an issue with AOP_PCODE asmop's offset,
3987         * (pic16_popCopyReg): update instance field too,
3988         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3989         function of pic port,
3990         * (genCmp, genAnd, genAssign),
3991         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3992
3993 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3994
3995         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3996         variables initial values to idata section,
3997         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3998         variables in some functions. This utilizes parmBytes field of iCode
3999         structure to hold the offset of the variable in stack. (might be
4000         able to use the stack field too?)
4001         * applied patch from Raphael Neider # ### , # ###
4002         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
4003         variable initial values in idata section,
4004         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
4005         for static variables with initial value
4006         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
4007         applied fix in while loop from Raphael Neider.
4008
4009 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
4010
4011         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
4012         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
4013         * src/ds390/ralloc.c (serialRegAssign): spill bits
4014         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
4015         * support/Util/SDCCerr.c,
4016         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
4017         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
4018         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
4019
4020 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
4021
4022         * device/include/sdcc-lib.h: inserted LGPL, added includes
4023           asm/ds390/features.h and asm/mcs51/features.h
4024         * device/include/asm/default/features.h,
4025         * device/include/asm/gbz80/features.h,
4026         * device/include/asm/z80/features.h: added empty _AUTOMEM
4027           and _STATMEM
4028         * device/include/asm/ds390/features.h,
4029         * device/include/asm/mcs51/features.h: added files with defines for
4030           _AUTOMEM and _STATMEM indicating automatic and static storage class
4031         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
4032         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
4033         * src/SDCCicode.c (geniCodeCast),
4034         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
4035         * src/SDCCloop.c (loopInduction): removed unused variable lr
4036         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
4037           to convertToFcall to include char modulo (RFE 1065037), added check
4038           if left operand is unsigned and use abs of literal value
4039         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
4040           as it doesn't work after conversion from peephole.def to peephole.rul
4041         * src/mcs51/gen.c (toBoolean): added check for size,
4042           (genModOneByte): optimized code for signed char modulo a literal
4043           power of 2 (thanks to Hubert Sack),
4044           (genRRC): removed unnecessary "clr c",
4045           (genRLC): replaced "add a,acc" with cheaper "rlc a"
4046         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
4047           jump optimization,
4048           swapped rules 256.c and 256.d,
4049           extended 256.d by using new multiple checks (thanks Erik),
4050           added rules 256.e and 256.f,
4051           updated rule 261.a and 261.b to new generated code
4052         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
4053
4054 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4055
4056         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
4057           induction related bugs, including first part of bug #1074377
4058
4059 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
4060
4061         * applied patch from bug-report #1076292,
4062         * applied patches for genAnd and Goto-optimizations for Raphael
4063         Neider,
4064         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
4065         dump a less iCode information,
4066         * src/pic16/device.h (pic16_options_t): added field debgen,
4067         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
4068         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
4069         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
4070         puclic,
4071         * (various functions): added macros FENTRY and FENTRY2 to functions,
4072         to emit function prologue,
4073         * (various functions): fixed indentation,
4074         * (genNearPointerGet): fixed loading of FSR0,
4075         * (genPackBits): applied patch from Raphael Neider to fix updating
4076         of FSR0 and touching only the modified bits,
4077         * src/pic16/genarith.c (various functions): added macros FENTRY to
4078         emit function prologue in comments,
4079         * src/pic16/pcode.h: added functions debugf2, debugf3,
4080         * src/pic16/ralloc.c: partial fix for packForPush caused
4081         segmentation fault,
4082
4083 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4084
4085         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
4086           <stsp AT users.sourceforge.net> with reversed byte order
4087         * support/regression/tests/rotate.c: added (ds390 skips some tests)
4088
4089 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4090
4091         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
4092           bug #1074377
4093         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
4094         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
4095
4096 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4097
4098         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
4099
4100 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4101
4102         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
4103           conditions,
4104           (setFromConditionArgs): friendly operand parser for peephole rules,
4105           (operandBaseName, operandsNotRelated): new peephole condition
4106           "operandsNotRelated" -- similar to "operandsNotSame", but takes
4107           architecture specific register naming into account, handles n-way
4108           comparisons, and supports quoted literals
4109         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
4110
4111 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4112
4113         * src/mcs51/peeph.def: fixed bug #1076940
4114
4115 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4116
4117         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
4118
4119 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4120
4121         Adding support for replacing ljmps with sjmps in jumptables
4122         generated for switch statements. For now you need to set the
4123         environment variable SDCC_SJMP_JUMPTABLE to enable this.
4124         Now 4 algorithms for mcs51 jumptable generation are used:
4125         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
4126         addresses loaded pc-relative for up to 112 cases and stack-pushing
4127         target addresses loaded with offset from dptr for up to 256 cases.
4128
4129         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
4130         * src/mcs51/main.c: adapted constants for switch table generation
4131         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
4132
4133 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
4134
4135         * device/lib/printf_large.c (_print_format): fixed bug 1073386
4136         * support/regression/tests/bug1057979.c: added test for bug 1073386
4137
4138 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4139
4140         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
4141         compilers
4142
4143 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4144
4145         * src/pic16/device.h,
4146         * src/pic16/genarith.c,
4147         * src/pic16/glue.c,
4148         * src/pic16/main.c,
4149         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4150
4151 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4152
4153         Large cummulative patch for pic16 port.
4154         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4155         to call when a stack overflow occurs,
4156         * (malloc.h): added CVS Id tag,
4157         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4158         variable,
4159         * added libc directory. The current version of LibC contains string
4160         functions, ctype functions and macros and some functions of the
4161         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4162         be extensively tested in the future. Standard disclaimer here.
4163         Library is not automatically build yet. But one can build it by
4164         invoking 'make' inside the libc directory.
4165         * added ADC library under libio. Preliminary version yet.
4166
4167         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4168         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4169         aopForRemat() now and not by pic16_aopOp(),
4170         * (pic16_popGetTempReg): removed warning messgae when allocating
4171         temporary registers, its a buggy feature and will be removed,
4172         * (pic16_popGet): set register instance field in AOP_CRY,
4173         * (pic16_outBitC): fixed for results in size greater than 1,
4174         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4175         * (pic16_storeForReturn): optimized return of 0,
4176         * (genCmp): experimental code for new genCmp which uses PIC18's
4177         special compare&skip instructions. Initial tests fail some times
4178         with variables grater than 1 byte in size, so new code is disabled,
4179         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
4180         a single bit,
4181         * (genCast): began a fix to optimize the casting of a bit to another
4182         bit, now assigning a bitfield to another bitfield will fail, sorry,
4183         * src/pic16/main.c: disabled the use of lr-support feature,
4184         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
4185         * added some function prototypes, added function _debugf prototype,
4186         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
4187         bits with offset (case PO_GPR_BIT),
4188         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
4189         command line,
4190         * (isBankInstruction): modified to return 0 for no banking instruction,
4191         and 1 for banking instruction,
4192         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
4193         caused stop processing pCodes after a inline assembly block,
4194         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
4195         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
4196         registers when it shouldn't,
4197         * src/pic16/ralloc.c (allocReg): add preliminary support for
4198         supporting a limited set of temporary registers,
4199
4200 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4201
4202         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
4203           genDataPointerSet): ensure assignments always copy in MSB to LSB
4204           order,
4205           (loadRegFromAop): recognize CLRH optimization,
4206           (genFunction): optimize RECEIVE iCodes in reentrant functions
4207
4208 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4209
4210         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
4211           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
4212           selected.
4213         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
4214         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
4215           contiguous with data
4216
4217 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4218
4219         * device/lib/_gptrget.c (_gptrget),
4220         * device/lib/_gptrgetc.c (_gptrgetc),
4221         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
4222           instead of sjmp to ret
4223         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
4224           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
4225
4226 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
4227
4228         * .version: bumped version to 2.4.7
4229         * device/lib/_gptrget.c (_gptrget): is now _naked
4230         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
4231         * device/lib/_gptrput.c (_gptrput): is now _naked
4232         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
4233           (createFunction): fixed xstack
4234         * src/SDCCglue.c (emitMaps): set allocation required for bit area
4235         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
4236           or bit either,
4237           (geniCodeCritical): store original interrupt state in an iTemp bit
4238           var unless stack-auto
4239         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
4240         * src/SDCCmain.c (setIncludePath): added include/target to search path
4241         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
4242         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
4243           prototype,
4244           (processFuncArgs): put bit vars in bit area
4245         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
4246           unsaveRBank): fixed xstack,
4247           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
4248           (genFunction, genEndFunction): fixed xstack,
4249           (genAssign): optimization don't walk backwards through mem
4250         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
4251         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
4252         * support/regression/Makefile: also make library (for stack-auto) when
4253           making "all" and added "test-mcs51-xstack-auto"
4254         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
4255         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
4256         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
4257         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
4258         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
4259           make-library by MAKE_LIBRARY
4260         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
4261           regression tests for xstack
4262         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
4263         * support/regression/tests/critical.c: test for critical on mcs51
4264
4265 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4266
4267         * support/regression/ports/ucz80/spec.mk: use include and lib files from
4268           built version of sdcc instead of installed version
4269
4270 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
4271
4272         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
4273         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
4274           vprintf.c now
4275         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
4276         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
4277           WARNING: remove device/lib/build/z80/printf.o by hand when
4278           updating from previous build!
4279         * device/lib/z80/printf.c: updated comment
4280         * support/regression/tests/bug1057979.c: test all ports now
4281         * support/regression/tests/bug1065458.c: file added
4282
4283 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4284
4285         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
4286           *_start and *_end symbols for static functions
4287
4288 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
4289
4290         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
4291           and search crt0.o in all library paths,
4292           (setIncludePath): proper handling of --nostdinc,
4293           (setLibPath): proper handling of --nostdlib
4294         * support/regression/Makefile,
4295         * support/regression/ports/ds390/spec.mk,
4296         * support/regression/ports/gbz80/spec.mk,
4297         * support/regression/ports/hc08/spec.mk,
4298         * support/regression/ports/mcs51/spec.mk,
4299         * support/regression/ports/mcs51-large/spec.mk,
4300         * support/regression/ports/mcs51-stack-auto/spec.mk,
4301         * support/regression/ports/z80/spec.mk: use include and lib files from
4302           built version of sdcc instead of installed version
4303         * doc/sdccman.lyx: fixed typo in --nostdinc
4304
4305 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
4306
4307         * src/pic/pcode.c,
4308         * src/pic/device.c,
4309         * src/pic/ralloc.c,
4310         * src/pic/gen.c : added support to generate code for struct bit fields.
4311
4312 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
4313
4314         * as/xa51/xa_version.h,
4315         * device/include/errno.h,
4316         * device/include/regc515c.h,
4317         * device/lib/_itoa.c,
4318         * device/lib/_ltoa.c,
4319         * device/lib/ser_ir_cts_rts.c,
4320         * sim/ucsim/xa.src/glob.cc,
4321         * sim/ucsim/xa.src/inst_gen.cc,
4322         * sim/ucsim/xa.src/xa_bit.cc,
4323         * sim/ucsim/xa.src/xa_sfr.cc,
4324         * sim/ucsim/z80.src/inst_dd.cc,
4325         * sim/ucsim/z80.src/inst_fdcb.cc,
4326         * support/scripts/keil2sdcc.pl,
4327         * src/pic16/pic16.dsp,
4328         * src/pic16/pic16a.dsp: corrected cvs line endings
4329         * device/lib/printf_large.c: fixed bug 1057979
4330         * src/pic16/gen.c: fixed non-C standard code
4331         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
4332         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
4333         * support/regression/ports/mcs51/support.c: reload T1 asap
4334         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
4335           pdata use and clear idata startup behaviour
4336         * support/regression/tests/bug1057979.c: added
4337
4338 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
4339
4340         * device/examples/ds390/ow390/ad26.h,
4341         * device/examples/ds390/ow390/cnt1d.h,
4342         * device/examples/ds390/ow390/crcutil.c,
4343         * device/examples/ds390/ow390/ownet.h,
4344         * device/examples/ds390/ow390/owsesu.c,
4345         * device/examples/ds390/ow390/swt12.h,
4346         * device/examples/ds390/ow390/swtoper.c,
4347         * device/examples/ds390/ow390/temp10.h,
4348         * device/examples/ds390/ow390/thermodl.c,
4349         * device/examples/ds390/tinitalk/tinitalk.dsp,
4350         * device/examples/ds390/tinitalk/tinitalk.dsw,
4351         * device/examples/mcs51/clock/hw.h,
4352         * device/examples/mcs51/simple2/go.bat,
4353         * device/examples/serialcomm/windows/serial.h,
4354         * device/examples/xa51/dummy.c,
4355         * device/examples/xa51/hello.c,
4356         * device/include/80c51xa.h,
4357         * device/include/at89x051.h: corrected cvs line endings
4358
4359 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
4360
4361         * src/pic16/main.c (options): added command line --gstack, to trace
4362         stack over/under flows,
4363         * added pragma 'wparam' to allow passing first byte of function
4364         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
4365         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
4366         call to __gstack_test function and sets up the symbol as extern,
4367         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
4368         * popaop): added call to pic16_testStackOverflow,
4369         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
4370         wparamList list,
4371         * (genCall, genPcall): now all parameters are passed via stack
4372         except in functions that are pass to wparam pragma in which WREG is
4373         used too,
4374         * (genPcall): REENTRANT flag is checked to see if variable prototype
4375         contains reentrant keyword, don't call a non-reentrant function, via
4376         a reentrant function pointer or vice versa, functions are never
4377         passed via WREG,
4378         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
4379         D.Winkler,
4380         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
4381         SIGSEGV when accessing a NULL register stucture,
4382         * (pic16_printGPointerType): modified to handle UPPER modifier for
4383         function initializers, changed prototype of function to simpler one,
4384         * (pic16_printIvalFuncPtr): check to see if function is already
4385         added in externs list,
4386         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
4387         optimized a move from W to SFR with a move to the same register
4388         later after a CALL,
4389         * device/lib/pic16/debug: NEW directory, contains debug features
4390         which are enabled when linking with libdebug.lib, currently command
4391         line option --gstack enables stack pointer tracing for over/under
4392         flow, corresponding sources are in debug/gstack
4393
4394 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
4395
4396         * doc/sdccman.lyx: updated SDCC version,
4397         * (PIC16 port): update list of command line options,
4398         * src/pic16/device.h (structure pic16_options_t): added field gstack
4399         to enable stack overflow tracing on push/pops,
4400         * src/pic16/device.c (statistics structure): added statistics
4401         structure,
4402         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
4403         pic16_dump_int_registers): increase statistics counters for each
4404         * variable which is encountered
4405         * (pic16_dump_usection): emit each .udata variable to its own udata
4406         section,
4407         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
4408         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
4409         parameters via stack, otherwise use old scheme,
4410         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
4411         assembler output file,
4412         * src/pic16/main.c: added command line options --gstack to enable
4413         push/pop tracing for stack overflow,
4414         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
4415         instructions): added size of each instruction,
4416         * (pic16_countInstruction): estimate size of instructions in
4417         the_pFile list, inline assembly blocks are not counted,
4418         * (pic16_FixRegisterBanking): trace previous register usage, when
4419         banksel optimizations is greater than 0, don't emit a redudant
4420         banksel directive,
4421
4422 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
4423
4424         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
4425         * src/pic16/ralloc.c : applied same fix for pic16.
4426         * src/pic/gen.c : tidied it up a little.
4427
4428 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4429
4430         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
4431         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
4432
4433 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4434
4435         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
4436
4437 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4438
4439         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
4440         non-reentrant function __modsint in the interrupt function (thus
4441         corrupting math operations during serial I/O)
4442         * device/lib/ser_ir.c: as above, changed buffersize
4443         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
4444         256.c,d for zeroing
4445         * doc/Makefile: added option -t for rsync
4446
4447 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4448
4449         * src/SDCCast.h (struct ast),
4450         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
4451
4452 2004-10-20 Borut Razem <borut.razem AT siol.net>
4453
4454         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
4455         package
4456
4457 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
4458
4459         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
4460         makefile targets,
4461         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
4462         support functions to replace long sequences of MOVFF's from access
4463         bank registers to stack and vice versa,
4464         * src/pic16/device.h: added new field opt_flags, where optimization
4465         flags can be set to enable certain features,
4466         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
4467         * pBlock, (genFunction, genEndFunction): surroung loop for
4468         saving/loading used registers in stack with PC_INFO pCodes,
4469         INF_LREGS. Code in between can then be optimized by pCode optimizer
4470         to support function calls,
4471         * (genDataPointerSet): fixed bug which loaded float fields in
4472         structures with corrupt data,
4473         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
4474         in a standard way debug info on stderr. Feature used for developing
4475         and debugging only,
4476         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
4477         obsolete chunks of code,
4478         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
4479         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
4480         * pic16/src/pcode.c (pic16_newpCodeInfo,
4481         * (pic16_newpCodeOpLocalRegs),
4482         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
4483         feature,
4484         * (pic16_pCodeConstString): printing of the initial value of a
4485         symbol as a comment is inhibited since parsing was already done by
4486         copyStr and output is corrupt,
4487         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
4488
4489 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4490
4491         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
4492
4493 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
4494
4495         * as/mcs51/lkarea.c: removed old K&R style,
4496           (lnksect): changed check on boundary error,
4497           (lnksect2): changed check on boundary error,
4498           (lnksect2): extend XSTK to end of page if size = 1
4499         * as/mcs51/lkmain.c: removed old K&R style,
4500           (Areas51): create l_IRAM symbol
4501         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
4502         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
4503           model-mcs51-stack-auto, added model-mcs51-xstack-auto
4504         * device/lib/_mullong.c: added version to be compiled with xstack
4505         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
4506         * device/lib/mcs51/crtxclear.asm: clear pdata as well
4507         * device/lib/mcs51/crtxstack.asm: fixed comment
4508         * src/SDCCglue.c: maxInterrupts defaults to 0,
4509           (emitMaps): added pdata,
4510           (createInterruptVect): (re)moved default,
4511           (glue): added pdata,
4512           (glue): moved __start__xstack to XSTK with default size 1
4513         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
4514           and options.float_rent when options.stackAuto is set,
4515           (linkEdit): only write XDATA_NAME if provided on command line
4516         * src/SDCCmem.h,
4517         * src/SDCCmem.c: added pdata
4518         * src/port.h: added pdata_name to PORT
4519         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
4520           (saveRegisters, unsaveRegisters): removed usage of B,
4521           (genMinus): fixed accumulator clash,
4522           (genJumpTab): added comment, this needs another look
4523         * src/mcs51/gen.c: added check for "B in use" paranoia,
4524           added pushB() and popB()
4525         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
4526           chance
4527         * src/avr/main.c,
4528         * src/ds390/main.c,
4529         * src/hc08/main.c,
4530         * src/mcs51/main.c,
4531         * src/pic/main.c,
4532         * src/pic16/main.c,
4533         * src/xa51/main.c,
4534         * src/z80/main.c: (reset_regparms) made void parameter explicit and
4535           added PSEG (PAG,XDATA) or NULL to port specifier
4536         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
4537         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
4538           (_mcs51_genInitStartup): removed __start__xstack equ,
4539           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
4540         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
4541         * src/z80/gen.c (_rleAppend): fixed warnings
4542         * support/regression/tests/zeropad.c: added pdata test
4543         * .version: bumped to 2.4.6
4544
4545 2004-10-17 Borut Razem <borut.razem AT siol.net>
4546
4547         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
4548         as a part of nightly build
4549
4550 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
4551
4552         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
4553         WREG holds the first byte function parameters,
4554         * (aopForSym): take special case for symbols which are in FARSPACE
4555         but in CODESPACE too,
4556         * (assignResultValue): modified to take into account _G.useWreg,
4557         * (genCall): don't use wreg for parameter passing when function is
4558         declared as reentrant, too, added optimization INCF to stack
4559         pointer when stack parameter count is 1,
4560         * (genFunction, genEndFunction): refurnished and fixed to not using
4561         wreg for passing parameters when function has varargs or is
4562         reentrant, fixed bug with symbol name compare for generating
4563         functions in absolute address,
4564         * (pic16_storeForReturn): refurnished,
4565         * (genCmp): began writing a new version of the function, not ready
4566         yet, therefore it is disabled,
4567         * (genAssign): do not read code memory when assigning a function to
4568         a pointer function,
4569         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
4570         array of characters, not pointer,
4571         * (pic16initialComments): in debug mode emit an .ident directive for
4572         the assembler,
4573         * (_process_pragma): emit a new warning type (internal to pic16)
4574         when setting stack to default length, emit a similar warning when
4575         placing a function at absolute address and address is not word aligned
4576         * (_pic16_parseOptions): added 'return TRUE' statement,
4577         * (_pic16_linkEdit): if compiling a source, then add the source's
4578         file object, first in the list of objects to link,
4579
4580 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
4581
4582         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
4583         * src/pic/main.c : removed VC warning.
4584         * src/pic/gen.c : changed comment.
4585
4586 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
4587
4588         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
4589         reference to a deprecated symbol _GPTRREG was causing failure to
4590         link. Thanks G. M. Gallant for the info.
4591
4592 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
4593
4594         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
4595         comments for Bugs item #954788.
4596
4597 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
4598
4599         * src/pic16/device.c (pic16_dump_gsection,
4600         * pic16_groupRegistersInSection): handle symbols declared to be in
4601         access bank differently,
4602         * src/pic16/gen.c (struct _G): added field resDirect,
4603         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
4604         send values read from stack directly to result and don't allocate
4605         temporary values,
4606         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
4607         same registers,
4608         * (pic16_sameRegsOfs): NEW,
4609         * (freeAsmop): if _G.resDirect is set then do not mark registers as
4610         free because they were not allocated from temporary pool,
4611         * pic16_popRegFromString): workaround to fix a problem with
4612         allocating variables twice or never,
4613         * (genGenPointerGet): using PRODL instead of FSR0H,
4614         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
4615         instead of FSR0H,
4616         * (genAssign): take advantage of the _G.resDirect flag,
4617         * (genCast): around line 11844, use mov2f instead of directly
4618         MOVFF'ing between operands to account for literal values,
4619         * src/pic16/genutils.c: some new debug functions for gpsim have been
4620         added,
4621         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
4622         float with integer part only,
4623         * src/pic16/main.c (_process_pragma): handle pragma udata access to
4624         place variables in access bank
4625         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
4626         updated sources to reflect recent changes in gen.c
4627
4628 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
4629
4630         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
4631         sources that searched for headers in installation path, now the
4632         device/include/pic16 is used,
4633         * src/pic16/glue.c (pic16glue),
4634         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
4635         .line directives if not in debug mode, this suppresses assembler's
4636         warnings for ignored directives
4637
4638 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
4639
4640         * src/port.h: made reset_regparms prototype void parameter explicit.
4641         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
4642         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
4643         * doc/sdccman.lyx: documented warning disabling and how to use
4644           printf_large to make it print floats.
4645         * device/include/stdbool.h: NEW
4646         * device/lib/_atof.c,
4647         * device/lib/_divuint.c,
4648         * device/lib/_divulong.c,
4649         * device/lib/expf.c,
4650         * device/lib/printf_large.c,
4651         * device/lib/sincosf.c,
4652         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
4653         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
4654           a completely reentrant lib.
4655
4656 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
4657
4658         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
4659         * device/include/pic16/stdio.h: fixed bug with colon
4660
4661 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
4662
4663         * device/include/pic16/stdio.h,
4664         * device/include/pic16/stdlib.h,
4665         * device/include/pic16/math.h: NEW
4666         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
4667         declared as _naked to reduce overhead
4668         * device/lib/Makefile.in (target port-specific-objects-pic16):
4669         changed * to *.* so to ignore the CVS directory,
4670         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4671         stacked variables back in stack,
4672         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4673         corruption
4674
4675 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4676
4677         * .version: bumped version number to 2.4.5
4678         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4679         * support/Util/SDCCerr.c (messages structure): added entry for
4680         W_POSSBUG2
4681
4682         Large cumulative patch for pic16 port and libraries.
4683         * device/include/pic16/sdcc-lib.h,
4684         * device/include/pic16/stdarg.h,
4685         * device/include/asm/pic16/features.h,
4686         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4687         * device/include/pic16/float.h: changes reentrant keyword with
4688         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4689         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4690         updated target build-libraries to include objects from gptr,
4691         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4692         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4693         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4694         all function headings,
4695         * src/SDCCmain.c: added global parameter userIncDirsSet,
4696         * (parseCmdLine): when option -I is encountered add directory to
4697         userIncDirsSet too,
4698         * src/version.awk: added space between control and long,
4699         * src/pic16/NOTES: added some notes for the port,
4700         * src/pic16/gen.c: added prototype for mov2fp function,
4701         * (fReturnpic16[]): properly named return value registers,
4702         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4703         * (aopForSym): added code to handle symbols with onStack flag set,
4704         symbols onStack are allocated PTRSIZE bytes,
4705         * (aopFreeAsmop): handles special case where asmops are stack objects,
4706         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4707         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4708         added argument lock to trace flaws in allocating temporary registers
4709         when developing port,
4710         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4711         * (pic16_popRegFromString): reenabled allocating a direct register
4712         from string,
4713         * (assignResultValue): various beautifications,
4714         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4715         referenced function argument,
4716         * (genIpush): reenabled to allow stacked arguments, handles only
4717         ic->parmPush iCodes,
4718         * (genCall, genPcall): major changes to allow for variable argument
4719         functions, fixed a bug with falsely restoring stack pointer after
4720         returning from call,
4721         * (genFunction): pending code for critical function,
4722         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4723         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4724         * (genNearPointerGet): fixed bug with indirect reading, was always
4725         reading from INDF0
4726         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4727         pointers,
4728         * (genAddrOf): rewrote code to take address of a stacked function parameter
4729         * (genCast): fixed casting to generic pointer type,
4730         * src/pic16/gen.h: added AOP_STA,
4731         * (struct asmop): added field stk,
4732         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4733         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4734         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4735         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4736         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4737         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4738         generic pointers,
4739         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4740         and library paths,
4741         * (pic16_port structure): generic pointer size is set to 3,
4742         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4743         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4744         compiler warning,
4745         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4746         operand is an iTemp,
4747
4748 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4749
4750         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4751         * debugger/mcs51/simi.c: addapt new syntax of s51
4752
4753 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4754
4755         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4756         * src/pic16/pcode.c: commented out some calls to free() in order to
4757         fix bug #989576,
4758
4759 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4760
4761         * src/SDCCicode.h,
4762         * src/SDCCicode.c (isiCodeInFunctionCall),
4763         * src/avr/ralloc.c (selectSpil),
4764         * src/pic/ralloc.c (selectSpil),
4765         * src/pic16/ralloc.c (selectSpil),
4766         * src/ds390/ralloc.c (selectSpil),
4767         * src/hc08/ralloc.c (selectSpil),
4768         * src/xa51/ralloc.c (selectSpil),
4769         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4770         stack in the middle of a function call sequence (fixes bug #1020268)
4771         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4772         costs associated with the minimum switch case.
4773
4774 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4775
4776         * src/SDCC.lex: fixed bug #1030549
4777
4778 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4779
4780         * src/SDCCcse.h (struct cseDef),
4781         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4782         over a function call if the CSE is derived from a symbol whose
4783         address has been taken (fixes bug #1029883)
4784         * support/regression/tests/bug-1029883: a new regression test for
4785         this bug
4786
4787 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4788
4789         * src/hc08/gen.c (emitinline): fixed bug #1029778
4790         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4791         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4792         and starts toward RFE #905167)
4793
4794 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4795
4796         * src/pic16/gen.c (mov2f): New function to move an operand to
4797         another without considering if it is a literal or a register,
4798         * (pic16_sameRegs): don't check if they are both AOP_REG,
4799         * (AccRsh): removed andmask=0 lines,
4800         * (genLeftShift): duplicated to be improved in future versions,
4801         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4802         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4803         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4804         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4805         * (insertBankSwitch): fixed inserting banksel directives algorithm
4806         for instructions that follow a skip instruction, this fixes a report
4807         for broken subtraction code generation,
4808         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4809         iCode is a left op, just in case result and right share the same
4810         registers
4811
4812 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4813
4814         * src/hc08/main.c,
4815         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4816         preservation of HX
4817         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4818         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4819         on 2004-09-12; it was buggy
4820
4821 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4822
4823         * src/SDCCsymt.h: removed RESULT_CHECK
4824         * src/SDCCast.c,
4825         * src/SDCCglue.c,
4826         * src/SDCCval.c,
4827         * src/pic/glue.c,
4828         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4829
4830 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4831
4832         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4833         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4834         configuration values no more rejected by compiler, they are assigned
4835         to configuration registers with a warning message instead,
4836         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4837         the for-loop so last conf register is emitted too,
4838         * (_pic16_initPaths): link library libsdcc.lib by default,
4839         * (_hasNativeMulFor): modified test for multiplication according to
4840         Raphael Neider's remarks. Integer multiplication is also done with
4841         support functions,
4842         * device/include/pic16/pic18fregs.h: corrected type error in while
4843         testing and including 18f6720 header file
4844
4845 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4846
4847         * src/pic16/device.h (pic16_options): removed field use_crt,
4848         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4849         until an optimization to handle single bits is added,
4850         * (pic16_loadFSR0): moved before genUnpackBits,
4851         * (genAnd): some white lines removed,
4852         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4853         leave_reset flags in pic16_options when using crt modules,
4854
4855 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4856
4857         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4858           for bugs 898889 & 979599. Also used some safer print instructions.
4859
4860 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4861
4862         * src/pic16/device.h (pic16_options_t): added field use_crt,
4863         crt_name, no_crt,
4864         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4865         catch a probable future bug,
4866         * src/pic16/gen.c: aopIdx function commented out,
4867         * (genAssign): commented out old code which used aopIdx,
4868         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4869         code, added if conditionals to take into account the --use-crt
4870         command line options,
4871         * src/pic16/main.c (pic16_optionsTable): added new command line
4872         options, --use-crt= and --no-crt,
4873         * (_pic16_linkEdit): now the proper crt object is added in the
4874         linker command line except than when --no-crt is specified,
4875         * src/pic16/pcode.c,
4876         * src/pic16/pcode.h: added some structures and functions for a new
4877         optimization scheme to compansate for instruction overhead between
4878         same iCodes, this scheme is currently under development and is not
4879         working in any way,
4880         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4881         to && operator,
4882         * device/lib/pic16/startup/crt0i.c,
4883         * device/lib/pic16/startup/crt0iz.c: added global char variable
4884         __uflags to force the generation of an idata section
4885
4886 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4887
4888         * doc/Makefile,
4889         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4890         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4891
4892 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4893
4894         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4895         Frieder) and clarified the default code optimization mode
4896
4897 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4898
4899         * src/SDCC.lex (doPragma, process_pragma),
4900         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4901         "opt_code_size", and "opt_code_balanced"
4902         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4903         regrouped options by category, added support for category headers
4904         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4905         and "--opt-code-size"
4906         * doc/sdccman.lyx: documented these new options and pragmas
4907         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4908         preference into account
4909
4910 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4911
4912         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4913           geniCodePreDec): Fixed bug 904237 by generating a warning
4914         * src/SDCCerr.h,
4915         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4916
4917 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4918
4919         * src/pic/device.c : When no max ram set validate full memory range.
4920         * src/pic/pcode.c,
4921         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4922
4923 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4924
4925         * device/lib/_gptrget.c,
4926         * device/lib/_gptrput.c: updated comment
4927         * device/lib/calloc.c,
4928         * device/lib/free.c,
4929         * device/lib/malloc.c,
4930         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4931         * src/SDCCcse.c (cseBBlock),
4932         * src/SDCCicode.c (printOperand, geniCodeArray),
4933         * src/SDCCicode.h (struct operand): fixed bug 868103
4934         * support/regression/tests/bug-868103.c: added
4935         * src/SDCCast.c (searchLitOp),
4936         * src/SDCCcse.h (struct cseDef),
4937         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4938         * src/SDCCicode.h (struct operand),
4939         * src/SDCCsymt.h (struct sym_link),
4940         * src/avr/gen.c (hasInc),
4941         * src/ds390/gen.c (hasInc),
4942         * src/hc08/gen.c (genPlusIncr, hasInc),
4943         * src/mcs51/gen.c (hasInc),
4944         * src/pic16/glue.c (pic16_printIvalChar),
4945         * src/pic16/ralloc.c (regWithIdx),
4946         * src/xa51/gen.c (hasInc) : removed warnings
4947         * src/SDCCast.c (createBlock): added comment ???
4948         * src/hc08/ralloc.c: updated comments
4949
4950 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4951
4952         * doc/sdccman.lyx: updated section on switch statements, added
4953         section about semaphore locking
4954         * doc/Makefile: added option -info for latex2html
4955         * device/lib/_gptrget.c,
4956         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4957
4958 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4959
4960         * src/pic/device.h,
4961         * src/pic/device.c,
4962         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4963          maxram is less than 0x100.
4964
4965 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4966
4967         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4968
4969 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4970
4971         * src/port.h,
4972         * src/mcs51/main.c,
4973         * src/ds390/main.c,
4974         * src/z80/main.c,
4975         * src/hc08/main.c,
4976         * src/pic/main.c,
4977         * src/pic16/main.c,
4978         * src/avr/main.c,
4979         * src/xa51/main.c
4980         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4981         a jump table is the best form for a switch statement, including
4982         automatic insertion of missing cases to make the case range
4983         continuous. Developed in collaboration with Frieder Ferlemann.
4984
4985 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4986
4987         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4988         accumulator result if it needs sign extension
4989
4990 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4991
4992         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4993
4994 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4995
4996         * device/lib/gbz80/printf.c,
4997         * device/lib/z80/printf.c: removed define for NULL
4998
4999 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5000
5001         * as/xa51/xa_link.c,
5002         * device/examples/ds390/ow390/ad26.c,
5003         * device/examples/ds390/ow390/cnt1d.c,
5004         * device/examples/ds390/ow390/counter.c,
5005         * device/examples/ds390/ow390/ds2480.h,
5006         * device/examples/ds390/ow390/ds2480ut.c,
5007         * device/examples/ds390/ow390/findtype.c,
5008         * device/examples/ds390/ow390/gethumd.c,
5009         * device/examples/ds390/ow390/owllu.c,
5010         * device/examples/ds390/ow390/ownetu.c,
5011         * device/examples/ds390/ow390/swt12.c,
5012         * device/examples/ds390/ow390/swtloop.c,
5013         * device/examples/ds390/ow390/temp.c,
5014         * device/examples/ds390/ow390/temp10.c,
5015         * device/examples/ds390/ow390/thermo21.c,
5016         * device/examples/ds390/ow390/tinilnk.c,
5017         * device/examples/ds390/ow390/tstfind.c,
5018         * device/examples/serialcomm/windows/serial.cpp,
5019         * device/examples/serialcomm/windows/test_serialcomm.cpp,
5020         * device/include/reg51.h: fixed line endings for cvs
5021
5022 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5023
5024         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
5025         packRegsForAccUse, packRegisters): new accumulator register
5026         packing algorithm
5027         * support/regression/ports/hc08/support.c (_putchar): suppress
5028         warning of unused variable
5029         * src/SDCCicode.c: added SWAP entry to codeTable
5030
5031 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
5032
5033         * device/lib/sprintf.c: forgot to add this file before previous commit
5034
5035 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
5036
5037         * src/pic16/gen.c (genPackBits): added operand right in function
5038         parameters, load result directly if p_type is POINTER (that is
5039         called by genNearPointerSet)
5040         * (genUnPackBits): added operand left in function parameters,
5041         * (genNearPointerGet, genNearPointerSet): prevent the loading of
5042         FSR0 if accessing bitfields,
5043
5044 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
5045
5046         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
5047           _print_format; updated printf, sprintf, vsprintf
5048         * device/include/asm/default/features.h: corrected comment/define
5049         * device/lib/Makefile.in: added sprintf.c
5050         * device/lib/libsdcc.lib: added sprintf module
5051         * device/lib/printf_large.c,
5052         * device/lib/vprintf.c,
5053         * device/lib/sprintf.c: totally refactored printf_large and vprintf
5054           into these 3 files
5055         * support/regression/Makefile: changed ALL_PORTS into a usefull default
5056         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
5057         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
5058           hc08 test
5059         * support/regression/tests/zeropad.c: define idata as data for hc08
5060
5061 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5062
5063         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
5064         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
5065         labels are referenced at least once (even if a reference is not found)
5066         * src/hc08/gen.c (emitcode): set isComment flag for comments
5067         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
5068         loads), rules 6a..6b (optimize jumps to return)
5069
5070 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5071
5072         * device/lib/acosf.c (acosf),
5073         * device/lib/asinf.c (asinf),
5074         * device/lib/atanf.c (atanf),
5075         * device/lib/ceilf.c (ceilf),
5076         * device/lib/cosf.c (cosf),
5077         * device/lib/coshf.c (coshf),
5078         * device/lib/cotf.c (cotf),
5079         * device/lib/fabsf.c (fabsf),
5080         * device/lib/floorf.c (floorf),
5081         * device/lib/log10f.c (log10f),
5082         * device/lib/logf.c (logf),
5083         * device/lib/sinf.c (sinf),
5084         * device/lib/sinhf.c (sinhf),
5085         * device/lib/sqrtf.c (sqrtf),
5086         * device/lib/tanf.c (tanf),
5087         * device/lib/tanhf.c (tanhf),
5088         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
5089         replaced all instances of "reentrant" in the library functions
5090         defined in math.h with this macro.
5091         * support/regression/tests/float_trans.c: reenabled test for hc08
5092
5093 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
5094
5095         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
5096         erroneously deleted
5097
5098 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5099
5100         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
5101         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
5102         multi-byte volatile operands are used
5103         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
5104         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
5105         initialization to area GSINIT0 so that it would always precede
5106         any static initializers in GSINIT
5107         * support/regression/tests/zeropad.c: fixed idata define for hc08
5108         * support/regression/tests/bug-927659.c,
5109         * support/regression/tests/float_trans.c: disabled tests for hc08
5110         pending missing library routines
5111         * .version: increased version number to 2.4.4 - hc08 port now passes
5112         regression tests
5113
5114
5115 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
5116
5117         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
5118         * Makefile.common.in,
5119         * as/Makefile,
5120         * as/hc08/Makefile.in,
5121         * as/mcs51/Makefile.in,
5122         * as/z80/Makefile.in,
5123         * debugger/mcs51/Makefile.in,
5124         * device/include/Makefile.in,
5125         * device/lib/Makefile.in,
5126         * doc/Makefile,
5127         * link/Makefile,
5128         * link/z80/Makefile.in,
5129         * packihx/Makefile.in,
5130         * sim/ucsim/main_in.mk,
5131         * sim/ucsim/avr.src/Makefile.in,
5132         * sim/ucsim/doc/Makefile.in,
5133         * sim/ucsim/gui.src/serio.src/Makefile.in,
5134         * sim/ucsim/hc08.src/Makefile.in,
5135         * sim/ucsim/s51.src/Makefile.in,
5136         * sim/ucsim/xa.src/Makefile.in,
5137         * sim/ucsim/z80.src/Makefile.in,
5138         * src/Makefile.in,
5139         * support/cpp2/Makefile.in,
5140         * support/librarian/Makefile,
5141         * support/makebin/Makefile: added DESTDIR to the install path proposed
5142         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5143         * doc/sdccman.lyx: added DESTDIR documentation
5144
5145 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5146
5147         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5148         instruction for interrupt handlers, use fast returns when returning
5149         from high priority interrupts
5150
5151 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5152
5153         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5154         code generation
5155         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5156         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5157         bugs, ported much of Bernhard's code from mcs51
5158         * src/mcs51/gen.c (genSend),
5159         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5160         than one when calling a reentrant function
5161         * device/lib/_mullong.c: defined an alternate struct layout for big
5162         endian ports (hc08)
5163
5164 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5165
5166         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5167         test
5168
5169 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5170
5171         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5172         are sane and complete before asking the port its prefered parameter
5173         passing method (fixes bug #1017633)
5174         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5175         and _ret3
5176
5177 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5178
5179         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
5180         problem in bitfields >= 8 bits.
5181
5182 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5183
5184         * src/SDCCsymt.c: undid changes that were not meant to be committed
5185
5186 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5187
5188         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
5189
5190 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5191
5192         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
5193           copied and wrong bit got inverted
5194
5195 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5196
5197         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
5198         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
5199         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
5200         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
5201         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
5202         assignments to bitfields at known addresses
5203         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
5204         reads from bitfields at known addresses
5205         * src/hc08/ralloc.c (packRegisters),
5206         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
5207         genhc08Code): optimize pointer get values used as conditionals
5208         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
5209         and branch
5210
5211 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5212
5213         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
5214         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
5215         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
5216         as conditionals
5217
5218 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5219
5220         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
5221
5222 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5223
5224         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
5225         related problems
5226
5227 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
5228
5229         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
5230
5231 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5232
5233         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
5234         mcs51 port
5235
5236 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
5237
5238         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
5239
5240 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5241
5242         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
5243         cases use more compact code.
5244
5245 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
5246
5247         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
5248
5249 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5250
5251         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
5252
5253 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5254
5255         * src/SDCCsymt.h,
5256         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
5257         parameter of changePointer() from symbol* to sym_link*
5258         * src/SDCCast.c (decorateType): call changePointer() for CAST op
5259         * src/SDCCsymt.c (compareType): void* type is castable to other
5260         pointers, but not necesarily an exact match.
5261         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
5262         is no longer blindly treated as an exact match.
5263         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
5264
5265 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
5266
5267         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
5268
5269 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
5270
5271         * src/pic/gen.c,
5272         * src/pic/pcode.c,
5273         * src/pic/ralloc.h,
5274         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
5275
5276 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
5277
5278         * src/pic/device.c,
5279         * src/pic/device.h,
5280         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
5281
5282 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5283
5284         * src/mcs51/gen.c (emitcode): fixed bug #992819
5285
5286 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
5287
5288         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
5289           there's no need to make it worse
5290
5291 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5292
5293         * src/mcs51/ralloc.c (deassignLR),
5294         * src/ds390/ralloc.c (deassignLR),
5295         * src/hc08/ralloc.c (deassignLR),
5296         * src/z80/ralloc.c (deassignLR),
5297         * src/pic/ralloc.c (deassignLR),
5298         * src/pic16/ralloc.c (deassignLR),
5299         * src/avr/ralloc.c (deassignLR),
5300         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
5301         rlivePoint): fixed another part of bug #971834
5302
5303 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5304
5305         * src/z80/main.c: enabled "critical" keyword
5306         * src/z80/mappings.i,
5307         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
5308         functions (fixes bug #979646)
5309         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
5310
5311 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5312
5313         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
5314           such as c:\mydir.
5315
5316 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
5317
5318         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
5319           doesn't disable too much optimizations
5320
5321 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5322
5323         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
5324
5325 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
5326
5327         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
5328
5329 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5330
5331         * src/pic/gen.c tidied up tabs
5332         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
5333         * src/pic/main.c tidied up tabs
5334         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
5335         * src/pic/pcoderegs.c tidied up tabs
5336         * src/pic/ralloc.c tidied up tabs
5337
5338 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
5339
5340         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
5341         to S_FIXED for pic16 port and when symbol is not in level 0,
5342         allocate for S_REGISTER storage class and pic16 port, too,
5343         * src/pic16/device.h: prototype for checkSym,
5344         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
5345         * (pic16_assignConfigWordValue): test the value and the mask to
5346         validate that the value is suitable for the configuration word,
5347         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
5348         collect extern declared symbols, don't emit symbol twice, check
5349         first if symbol is in publics set first,
5350         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
5351         * added command line '--fstack' which enables an experimental
5352         feature for stack access, too buggy to be used yet...
5353         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
5354         * (pic16_allocDirReg): when register has storage class S_REGISTER
5355         allocate in pic16_dynAccessRegs,
5356         * device/include/pic16/pic18f????.h: modified configuration word
5357         naming convention, words started as CONFIG0H but should be CONFIG1H
5358
5359 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
5360
5361         * device/include/mcs51reg.h: fixed bug 970993
5362
5363 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
5364
5365         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
5366         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
5367         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
5368         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
5369         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
5370         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
5371           error/warning numbers,
5372           added function setWarningDisabled()
5373         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
5374         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
5375           _memcmp.c _memmove.c calloc.c realloc.c free.c
5376         * support/regression/tests/malloc.c: added tests for new functionality
5377         * support/regression/tests/zeropad.c: added tests for truncated initializers
5378           and initialized char arrays starting with '\x0'
5379         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
5380
5381 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
5382
5383         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
5384
5385 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5386
5387         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
5388         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
5389         peephole 177.e. Thanks to anonymous
5390
5391 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
5392
5393         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
5394         function isn't used in the source but referenced as a
5395         variable initializer then declare it as extern in .asm file
5396
5397 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
5398
5399         * .version: increased version number to 2.4.3
5400
5401         Adding version extension according to ChangeLog CVS revision
5402         * src/Makefile.in (target all): added dependency 'version.h'
5403         * (rule version.h): added rule to create version.h from ChangeLog,
5404         * (rule dep): added dependency version.h,
5405         * src/version.awk: AWK script to create version.h
5406         * src/SDCCdwarf2.c (dwWriteModule),
5407         * src/SDCCglue.c (initialComments),
5408         * src/SDCCmain.c (printVersionInfo): modified to write after
5409         version string the version extension number,
5410         * src/SDCCutil.c: included "version.h"
5411         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
5412         number,
5413         * src/SDCCutil.h: added prototype for getBuildNumber
5414
5415         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
5416         includeDirsSet, too,
5417         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
5418         const char [] is found in function prototype...
5419
5420         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
5421         moving to WREG with source is already in WREG,
5422         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
5423         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
5424         * (aopForSym): stack'ed symbols are partially supported, added
5425         if-clause to support symbols in FARSPACE,
5426         * (sameRegs): added test for AOP_ACC to see if registers are same,
5427         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
5428         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
5429         * (pic16_popRegFromString): will not allocate a new register if it
5430         doesn't find one by name, bug may have introduced...
5431         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
5432         * (genIpush): revived to use pic16 port's stack,
5433         * (genAddrOf): added incomplete case for stack'ed operand,
5434         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
5435         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
5436         can handle multibyte operands,
5437         * src/pic16/glue.c (pic16_printIval*): some debug info added,
5438         * (pic16initialComments): added message for MPLAB compatibility
5439         mode enabled,
5440         * src/pic16/main.h: prototype for pic16_mplab_comp,
5441         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
5442         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
5443         * (_pic16_linkEdit): NEW, handles link stage, transferred here
5444         because of increased complexity of procedure,
5445         * (_process_pragma): stack pragma changed to format 'stack pos len',
5446         emit symbol '_stack_end' to conform with gplink,
5447         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
5448         to search for register,
5449         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
5450         PO_GPR_REGISTER,
5451         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
5452         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
5453         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5454         case for PO_GPR_REGISTER,
5455         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
5456         dies, the new era is ahead !...
5457         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
5458         pic16_dynInternalRegs,
5459         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
5460         * (pic16_allocDirReg): minor optimizations and bug fixes,
5461         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
5462
5463         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
5464         load stack and frame pointer with address of 'stack_end' symbol
5465
5466 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
5467
5468         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
5469         without source code but only variable initializers
5470
5471 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
5472
5473         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
5474         external are not declared as extern to reduce overhead while linking
5475
5476 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
5477
5478         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
5479
5480 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
5481
5482         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
5483           Yee Keat for the patch
5484         * src/SDCCast.c (decorateType): fixed bug #979599
5485         * src/ds390/gen.h: removed local fReturnSizeDS390
5486         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
5487         * src/ds390/gen.c (genAnd, genOr, genXor),
5488         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
5489
5490 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
5491
5492         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
5493         add relFilesSet to $3, manipulate $2 to handle linking of object
5494         files without source files in command line,
5495         * device/include/pic16 (all headers): added ID location macros,
5496         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
5497         entries for ID location bytes,
5498         * (pic16_assignIdByteValue): NEW,
5499         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
5500         added field dumpcalltree to pic16_options_t,
5501         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
5502         is used instead of pic16_Gstack_base_addr, check if (ifx) before
5503         emitting rFalseIfx label after check_carry label,
5504         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
5505         pic16_emitDIRegs), NEW
5506         * (pic16glue): dump .calltree file when option --calltree found,
5507         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
5508         * (_pic16_genAssemblerPreamble): emit ID locations after
5509         configuration registers,
5510         * (pic16_linkCmd): modifications of the link command,
5511         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
5512         * (pic16_pCodeInitRegisters): don't init stack registers,
5513         * (pic16_findPrevInstruction): fixed bug,
5514         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
5515         bug with immediate registers,
5516         * (buildCallTree): traces stack push and pop,
5517         * (pct2): dump also stack usage for each function,
5518         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
5519         * (pic16_allocDirReg): various modifications,
5520         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
5521         fixed to 1,
5522
5523 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
5524
5525         * src/pic16/pcode.c: removed buggy double colon
5526
5527 2004-07-01 Borut Razem <borut.razem AT siol.net>
5528
5529         * support/scripts/sdcc.nsi: added include/pic16 to setup
5530
5531 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
5532
5533         * device/lib/Makefile.in: fixed bug in target objects-pic16,
5534         * device/lib/pic16/Makefile: prefixed with dash (-) command under
5535         target 'clean',
5536         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
5537         specific command line arguments. Also added sample lkr script
5538         for placing a variable at a specific memory bank.
5539         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
5540         at a specific memory bank,
5541         * (pic16_dump_isection): fixed bug which caused string literals to
5542         be omitted when dumping idata section,
5543         * (pic16_groupRegistersInSection): added code to handle registers
5544         in specific memory banks,
5545         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
5546         public, all references are renamed too,
5547         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
5548         AOP_DPTR2,
5549         * (pic16_storeForReturn): added case to handle when dest is WREG,
5550         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
5551         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
5552         pic16_rel_udata, check to see if that register is marked as being
5553         a member of a specific memory bank,
5554         * (pic16_printIvalCharPtr): added code to add string literals either
5555         to code or the idata sections,
5556         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
5557         also accept the 'udata' pragma,
5558         * src/pic16/main.h: new structure types sectName and sectSym
5559         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
5560         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
5561         * (pic16_findPrevInstruction): fixed, it returned nothing,
5562         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
5563         instruction combinations,
5564         * (pic16_FixRegisterBanking): heavily reorganised,
5565         * (pic16_AnalyzeBanking): if generating banksel directives is
5566         disabled, then don't call FixRegisterBanking at all,
5567         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
5568         completely removed,
5569         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
5570
5571 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
5572
5573         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
5574         Phuah Yee Keat <yk.phuah AT nestac.com>
5575
5576 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5577
5578         * src/pic16/glue.c (pic16createInterruptVect): function now emits
5579         correctly the IVT even if it is relocated to some other location
5580
5581 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5582
5583         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
5584         * device/include/pic16/pic18f2220.h: NEW,
5585         * device/lib/pic16/libdev/pic18f2220.c: NEW,
5586         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
5587         * src/pic16/device.c (struct Pics16): added info for 18f2220,
5588         * src/pic16/device.h (struct pic16_options): added ivt_loc and
5589         nodefaultlibs, ivt_loc is the location of the interrupt vector
5590         table, and nodefaultlibs signs that default libraries should not be
5591         linked in link stage,
5592         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
5593         according to --ivt-loc argument,
5594         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
5595         when pragma stack is found,
5596
5597 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5598
5599         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
5600         256 (range check), 257 (do while), 258.a-f (bit banging
5601         f.e. on 3-wire SPI bus)
5602
5603 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5604
5605         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
5606         variables used exclusively within a loop
5607
5608 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
5609
5610         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
5611
5612 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5613
5614         * src/SDCClrange.c (computeClash): fixed bug #971834
5615
5616 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5617
5618         * src/mcs51/gen.c (genCmp): fixed bug #975903
5619         * src/hc08/gen.c (operandsEqu),
5620         * src/ds390/gen.c (operandsEqu),
5621         * src/z80/gen.c (operandsEqu),
5622         * src/pic/gen.c (operandsEqu),
5623         * src/pic16/gen.c (operandsEqu),
5624         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
5625         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
5626
5627 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5628
5629         * src/SDCCcse.c (cseBBlock): fixed bug #966963
5630
5631 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
5632
5633         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
5634         default case in switch statement,
5635         * glue.c (pic16_initPointer): expr is initialised via decoarteType
5636         to eliminate problem with initialisation of pointers, but problem
5637         still exists,
5638         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
5639         * (emitStaticSegment): removed various lines emitting debug info,
5640         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
5641         added processor registers for utilizing EEPROM,
5642         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
5643         configurable and set 8
5644
5645 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
5646
5647         * .version: increased version number to 2.4.2,
5648
5649         Cumulative patch for pic16 port
5650         * src/pic16/device.c: changed scheme to dump initial values for
5651         variables in idata segment, all print_idata* functions were removed,
5652         now the pic16_printIval* will be called,
5653         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
5654         * _pic16_printPointerType, pic16_printPointerType,
5655         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
5656         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
5657         NEW, similar to the respective functions in SDCCglue.c,
5658         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
5659         way, emitting hex bytes,
5660         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
5661
5662 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5663
5664         * src/avr/ralloc.c (serialRegAssign),
5665         * src/xa51/ralloc.c (serialRegAssign),
5666         * src/pic/ralloc.c (serialRegAssign),
5667         * src/pic16/ralloc.c (serialRegAssign),
5668         * src/hc08/ralloc.c (serialRegAssign),
5669         * src/z80/ralloc.c (serialRegAssign),
5670         * src/ds390/ralloc.c (serialRegAssign),
5671         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5672
5673 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5674
5675         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5676         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5677
5678 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5679
5680         Cumulative patch for pic16 port:
5681         * src/pic16/device.h (typedef PIC16_device) modified fields for
5682         defining microcontrollers,
5683         * src/pic16/device.c: added new info for all devices in Pics16 array,
5684         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5685         to be optimised out by the pCode optimiser,
5686         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5687         specially, bug reported by G.M. Gallant,
5688         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5689         as force'd so that cannot be optimised out by pCode optimiser,
5690         * src/pic16/pcode.c,
5691         * src/pic16/pcodepeeph.c,
5692         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5693         they are disabled by default, but can be enabled explicit with
5694         command argument --denable-peeps, for testing,
5695         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5696         --pomit-ivt in COMPILE_FLAGS
5697
5698 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5699
5700         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5701           compilation on MSVC
5702
5703 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5704
5705         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5706
5707 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5708
5709         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5710         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5711
5712 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5713
5714         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5715         would only assign 0x300001 register.
5716
5717 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5718
5719         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5720         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5721
5722 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5723
5724         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5725         for ds80c400
5726         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5727         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5728         added peephole 254 (left shift), 255 (jump table)
5729
5730 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5731
5732         * device/lib/Makefile.in: removed comment line with model-pic16,
5733         * (target port-specific-objects-pic16): the libraries and objects
5734         are copied to the build directory form the device/lib/pic16/bin
5735         directory
5736
5737         Cumulative patch concerning pic16 port:
5738         * library directory has been re-organized,
5739         * added support for PIC18F1220,
5740         * added headers and library sources for chips 18f1220,18f6520,
5741         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5742
5743         * configuration registers setting has changed, now each supported
5744         device has a complete description of the registers it uses,
5745         * all initialisations are moved to idata sections, these section
5746         can be absolute or relocatable,
5747         * fixed initialisation of codespace variables,
5748         * fixed warning about PCLATU and gpsim,
5749         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5750         * (genAssign): use table reads when assigning from variables in codespace,
5751         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5752         char/int variables placed in codespace,
5753         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5754         registers set in .asm file, no need for --pomit-config-words anymore,
5755         * (pic16glue): some 8051 legacy segments are commented out
5756         (to be removed completely),
5757         * added support for alternative assembler and linker with --asm=
5758         and --link= command line arguments,
5759         * peepholes are disabled automatically in the port, no need to
5760         specify on command line,
5761         * port supports natively char/int/long multiplication, but converts
5762         all divisions to support functions,
5763         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5764         to the file set in variable $2,
5765         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5766         strings in ASCII format and not in hex,
5767         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5768         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5769         allocate proper register if iCodes aren't temporary,
5770
5771 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5772
5773         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5774
5775 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5776
5777         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5778         is commented out
5779
5780 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5781
5782         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5783         computed address is reused
5784         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5785         multi-byte bitfields
5786
5787 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5788
5789         * src/z80/gen.c: (genArrayInit): must check for pointers too
5790
5791 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5792
5793         * support/regression/tests/zeropad.c: never meant to commit the
5794           nestedstruct test: removed, added check for GCC version
5795
5796 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5797
5798         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5799         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5800         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5801           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5802           bugs 928906 and 954082 half-empty initializers
5803         * src/SDCCsymt.h,
5804         * src/SDCCsymt.c (getAllocSize): added for above fix
5805         * src/z80/gen.c (genArrayInit): fixed bug 741044
5806         * support/regression/tests/zeropad.c: added tests
5807
5808 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5809
5810         * src/pic16/device.c (pic16_dump_section): corrected bug which
5811         caused some symbols of the libraries to be misplaced
5812
5813 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5814
5815         * src/pic16/glue.c,
5816         * src/pic16/ralloc.h,
5817         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5818         to fix conflict with pic port
5819
5820 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5821
5822         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5823         externs configuration variables,
5824         * src/pic16/ralloc.h,
5825         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5826         prototype in header, commented out some debug messages
5827
5828 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5829
5830         * src/pic16/glue.c,
5831         * src/pic16/main.c,
5832         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5833         for gpasm COFF object generation. Thanks to D. Hawkins for
5834         his patch info
5835
5836 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5837
5838         * src/ds390/main.c,
5839         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5840         Brock for spotting this)
5841         * src/ds390/gen.c (genEndFunction),
5842         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5843         interrupt handler and critical. Disable push/pop optimizations when
5844         peephole optimizations disabled.
5845
5846 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5847
5848         Updated pic16 library sources and headers.
5849         * device/lib/pic16/pic18f*/ ,
5850         * device/include/pic16/*.h: modified to handle structured SFR
5851         definitions
5852
5853 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5854
5855         * src/port.h (PORT structure): added hook initPaths, now each
5856         port can declare its own default search paths,
5857         which can been seen with the --print-search-dirs option,
5858         see pic16 port for example,
5859         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5860         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5861         * (doPrintSearchDirs): NEW, replaces in a central manner the
5862         printing of search dirs which was split in set*Paths functions,
5863         * (main): added call to port->initPaths and doPrintSearchDirs,
5864         * src/avr/main.c,
5865         * src/ds390/main.c,
5866         * src/hc08/main.c,
5867         * src/izt/i186.c,
5868         * src/izt/tlcs900h.c,
5869         * src/mcs51/main.c,
5870         * src/pic/main.c,
5871         * src/pic16/main.c: modified port structures to reflect addition of
5872         initPaths hook,
5873
5874         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5875         * (pic16_dump_section): for registers in same address reserve memory once,
5876         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5877         to no_banksel,
5878         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5879         result is greater in size than right or left,
5880         * (pic16_genUMult8X8_8): there are some cases where the result can
5881         be 16 bits size, so handle these,
5882         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5883         * (pic16_outBitC): modified to emit pcodes,
5884         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5885         or not,
5886         * (genDivOneByte): implemented algorithm to divide 8-bits,
5887         * (genCmp): uncommented goto, but issues still exist,
5888         * (genAnd): fixed a bug with variables >8bits,
5889         * (genPackBits): optimization added that uses BCF/BSF to change a
5890         single bit,
5891         * (genAssign): fixed bug when assigning floating point literals,
5892         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5893         __sdcc_gsinit_startup label,
5894         * src/pic16/main.c (_pic16_init): removed search directory
5895         initialisations,
5896         * (_pic16_initPaths): NEW, used to initialise search directories,
5897         * (_hasNativeMulFor): support functions for all except char/int
5898         multiplication, and char division,
5899         * (PIC16_port struct): modified entry for native mul support,
5900         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5901         no_banksel option,
5902         * (buildCallTree): call to register_usage is ifdef'ed out,
5903
5904 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5905
5906         * device/include/string.h: applied Stas Sergeev's patch to make this
5907         header file compatible with the preprocessor -Wundef option
5908         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5909         failure (fixes bug #941458)
5910
5911 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5912
5913         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5914         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5915         that the variable, not the function, should be static
5916         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5917         to be consistent with non-literal case
5918
5919 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5920
5921         * src/SDCCast.c (isConformingBody): fixed bug #949967
5922         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5923         convilong): fixed bug #952086
5924
5925 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5926
5927         * src/SDCCmem.c (allocVariables): fixed bug #955321
5928
5929 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5930
5931         * src/hc08/main.c (_hc08_genAssemblerEnd),
5932         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5933         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5934         completely eliminated the use of a temporary file
5935         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5936         when more than one file linked
5937         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5938
5939 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5940
5941         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5942         which fixes bug #543481
5943         * support/regression/tests/bug-751703.c: fixed comments left from a
5944         cut and paste error
5945         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5946         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5947         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5948         scopes
5949         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5950         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5951         are now changed to underscores in moduleName
5952
5953 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5954
5955         * as/mcs51/lkmem.c: better fix for bug #954173
5956
5957 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5958         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5959
5960         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5961         * device/include/c8051f000.h,
5962         * device/include/c8051f120.h,
5963         * device/include/c8051f300.h,
5964         * device/include/c8051f310.h,
5965         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5966         PWM16) and detab'ed
5967
5968 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5969
5970         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5971         and mailing lists, doc'ed --no-peep-comments, removed reference
5972         to knoppix (newest version has no LyX/LaTeX), other minor changes
5973         * src/SDCCglue.c (glue): save 2 bytes stack space with
5974         option --main-return. The ljmp could probably be avoided too
5975
5976 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5977
5978         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5979
5980 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5981
5982         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5983         * src/SDCCopt.c (isLocalWithoutDef),
5984         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5985         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5986         (credit to Maarten Brock for patch #949363, on which this is based)
5987         * support/regression/tests/bug-751703.c: some test cases of extern used
5988         within inner scopes.
5989
5990 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5991
5992         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5993         SPEC_STRUCT
5994         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5995         struct definitions
5996         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5997         dwWriteLabel): fix to create valid debugger symbols even when
5998         the module name has non-alphanumeric symbols in it
5999         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
6000         when a variable's allocation has been optimized away
6001
6002
6003 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6004
6005         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
6006         * src/hc08/main.c,
6007         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
6008         * src/mcs51/main.c,
6009         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
6010         * src/ds390/main.c,
6011         * src/z80/gen.c (z80_emitDebuggerSymbol),
6012         * src/z80/main.c,
6013         * src/pic/gen.c (pic14_emitDebuggerSymbol),
6014         * src/pic/main.c,
6015         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
6016         * src/pic16/main.c,
6017         * src/avr/gen.c (avr_emitDebuggerSymbol),
6018         * src/avr/main.c,
6019         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
6020         * src/xa51/main.c,
6021         * src/SDCCdebug.c (emitDebuggerSymbol),
6022         * src/SDCCdebug.h,
6023         * src/port.h: added a debugger struct to the port struct. Added a
6024         callback for defining debugger symbols
6025
6026         * src/SDCCast.c (createLabel),
6027         * src/SDCC.y (labeled_statement): mark all compiler generated labels
6028         with isitmp = 1
6029         * src/SDCCicode.h,
6030         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
6031         iCode back to the ast for the function
6032
6033         * src/hc08/ralloc.c (hc08_assignRegisters),
6034         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
6035         unneeded fields from the regs struct.
6036         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
6037         pushReg() & pullReg() functions instead of emitcode()
6038
6039         * src/hc08/gen.c (genLabel, genhc08Code),
6040         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
6041
6042         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
6043         debugger hooks
6044
6045         * src/hc08/gen.c (genEndFunction, genhc08Code),
6046         * src/hc08/gen.h,
6047         * src/mcs51/gen.c (genEndFunction, gen51Code),
6048         * src/mcs51/gen.h,
6049         * src/ds390/gen.c (genEndFunction, gen390Code),
6050         * src/ds390/gen.h,
6051         * src/z80/gen.c (genEndFunction, genZ80Code),
6052         * src/z80/gen.h,
6053         * src/z80/z80.h,
6054         * src/pic/gen.c (genEndFunction, genpic14Code),
6055         * src/pic/gen.h,
6056         * src/pic16/gen.c (genEndFunction, genpic16Code),
6057         * src/pic16/gen.h,
6058         * src/avr/gen.c (genEndFunction, genAVRCode),
6059         * src/avr/gen.h,
6060         * src/xa51/gen.c (genEndFunction, genXA51Code),
6061         * src/xa51/gen.h,
6062         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
6063         specific code to cdbFile.c and out of the backend code generators
6064
6065         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
6066         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
6067         starting address is now 0
6068
6069         * as/hc08/asm.h,
6070         * as/hc08/m08pst.c,
6071         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
6072         assembler directive for DWARF support
6073         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
6074
6075         * src/src.dsp,
6076         * src/Makefile.in,
6077         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
6078
6079 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6080
6081         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
6082         and inappropriate peephole optimization in jump tables
6083
6084 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6085
6086         * as/hc08/m08pst.c,
6087         * src/SDCCglue.c: sdccopt works for the hc08 port now
6088
6089 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
6090
6091         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
6092
6093 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6094
6095         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
6096
6097 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6098
6099         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
6100         rules
6101         * src/SDCCmain.c,
6102         * src/SDCCglobl.h,
6103         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
6104         comments from the peephole optimizer replacement rules
6105         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
6106         symbols
6107         * src/SDCCcse.c (updateSpillLocation),
6108         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
6109         equivalents
6110         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
6111         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
6112         objects far pointers
6113
6114 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6115
6116         * src/SDCCsymt.h: a missing part of my last change
6117         * src/pic/ralloc.c (regTypeNum),
6118         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
6119
6120 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6121
6122         * src/SDCCicode.h,
6123         * src/SDCCicode.c (aggrToPtrDclType),
6124         * src/SDCCptropt.h,
6125         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
6126         ptrPseudoSymConvert),
6127         * src/pic/ralloc.c (regTypeNum),
6128         * src/pic16/ralloc.c (regTypeNum),
6129         * src/hc08/ralloc.c (regTypeNum),
6130         * src/ds390/ralloc.c (regTypeNum),
6131         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
6132         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
6133
6134 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6135
6136         * link/z80/lkmain.c (afile),
6137         * as/hc08/lkmain.c (afile),
6138         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
6139         prevent a pointer problem when a filename has no directory and
6140         no extension specified.
6141
6142 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6143
6144         * link/z80/lkmain.c (afile): allow periods in directory names
6145         * link/z80/lkmain.c (afile),
6146         * as/mcs51/lkmain.c (afile),
6147         * as/hc08/lkmain.c (afile): allow linker script file to have an
6148         extension other than ".lnk"
6149         * link/z80/lklex.c (getfid),
6150         * link/z80/lkmain.c (parse),
6151         * as/mcs51/lklex.c (getfid),
6152         * as/mcs51/lkmain.c (parse),
6153         * as/hc08/lklex.c (getfid),
6154         * as/hc08/lkmain.c (parse): Support comments in the linker script
6155         file on lines by themselves and after filenames
6156
6157 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6158
6159         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6160
6161 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6162
6163         * src/z80/peeph-z80.def: removed some peephole rules that don't
6164         work with multibyte arithmetic (fixed bug #937126)
6165         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6166         to registers and not global variables
6167         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6168         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6169         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6170         checking for assignments not internally generated (fixed bug #931895)
6171         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6172         structure member (fixed bug #930072)
6173
6174 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6175
6176         * src/SDCCmain.c (linkEdit),
6177         * src/hc08/main.c (_hc08_parseOptions),
6178         * as/hc08/Makefile.in,
6179         * as/hc08/aslink.h,
6180         * as/hc08/asm.h,
6181         * as/hc08/m08pst.c,
6182         * as/hc08/lkrloc.c (relr, rele),
6183         * as/hc08/lkarea.c (lnkarea)
6184         * as/hc08/lkmain.c (afile, parse),
6185         * as/hc08/lkelf.c: support for ELF output
6186         * as/hc08/lks19.c (s19),
6187         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
6188
6189 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6190
6191         * as/mcs51/lkihx.c: Fixed bug #899105.
6192
6193 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6194
6195         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
6196         .dsp files from Unix to DOS.
6197
6198 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6199
6200         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
6201         function pointers; we have been compliant for several months now.
6202         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
6203         change that was accidently commented out
6204         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
6205         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
6206         bug #922319
6207
6208 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6209
6210         * src/hc08/gen.c: output of all of the internal debugging information
6211         is now controlled by the D() macro; it is disabled by default
6212
6213 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6214
6215         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
6216         harder to keep the same registers during a CAST iCode
6217         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
6218         long via int can be done in a single cast, if the signedness is
6219         correct.
6220         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
6221         putchar() in tinibios.c in ds390's library
6222
6223 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
6224
6225         * src/SDCCast.c (decorateType): fixed bug #898889,
6226         cast result of a literal complement too
6227         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
6228         fixed check for bitfields
6229
6230 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
6231
6232         * src/SDCCicode.c (geniCodeLogic): made it static,
6233         (geniCodeLogicAndOr): added in order to fix bug #905492,
6234         (ast2iCode): fixed bug #905492
6235         * support/regression/tests/bug-905492.c: added
6236         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
6237         (processParms): fixed bug #927659: don't copy parms, this will clear
6238         decorated flag
6239         * support/regression/tests/bug-927659.c: added
6240
6241 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
6242
6243         * src/SDCCast.c (addCast): don't cast float to char
6244         * device/lib/libsdcc.lib: added _memmove
6245
6246 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
6247
6248         * device/lib/large/Makefile: fixed parallel execution by
6249         replacing `make` by `$(MAKE)`
6250
6251 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6252
6253         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
6254         offsets (fixes bug #923936)
6255
6256 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
6257
6258         * device/lib/small/Makefile: fixed parallel execution by
6259         replacing `make` by `$(MAKE)`
6260
6261 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6262
6263         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
6264
6265 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
6266
6267         * src/pic/gen.c (genCpl): multi-byte complements were not working.
6268         * src/regression/Makefile: Regression test was not running.
6269
6270 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6271
6272         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
6273         complement if possible
6274         * src/SDCCval.c (valComplement),
6275         * src/SDCCicode.c (operandOperation): fixed complement of literal
6276         * support/regression/tests/onebyte.c (testComplement): added
6277
6278 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
6279
6280         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
6281         return an optimized tree; actually replace actParm with the new tree
6282         * src/SDCCast.h: added some parantheses to remove side effects
6283         * support/regression/tests/bug-920866.c
6284
6285 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
6286         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
6287         Bit operands were not being handled properly in the pic14 port.
6288         (now src/regression/add.c passes again).
6289
6290 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6291
6292         * src/SDCC.y (labeled_statement): case and default no longer require
6293         a following statement (RFE #893037)
6294
6295 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6296
6297         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
6298         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
6299         disabled (fixes bug #916294)
6300         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
6301         "mov a,acc"; patch provided by Lenny Story
6302         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
6303
6304 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6305
6306         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
6307         functions
6308         * src/ds390/gen.c (genFunction, genEndFunction),
6309         * src/ds390/ralloc.c (ds390_assignRegisters),
6310         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
6311         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
6312         pushed if there are parameters passed on the stack. Also, a cleaner
6313         way to decide if r0/r1 should be pushed/popped. (Together they fix
6314         bug #918693)
6315
6316 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6317
6318         * doc/sdccman.lyx,
6319         * device/lib/mcs51/crtpagesfr.asm,
6320         * device/lib/mcs51/crtxinit.asm,
6321         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
6322         to avoid confusion with Si Lab's SFRPAGE register.
6323
6324 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6325
6326         * src/SDCCglue.c (emitMaps): allow public sfr variables
6327         * src/SDCCglue.c (initialComments): include compiler build date
6328         with compiler version and put the timestamp of the generated
6329         assembly file on a serperate line to be less confusing.
6330         * src/port.h: added genInitStartup hook
6331         * src/avr/main.c,
6332         * src/ds390/main.c,
6333         * src/hc08/main.c,
6334         * src/pic/main.c,
6335         * src/pic16/main.c,
6336         * src/xa51/main.c,
6337         * src/z80/main.c: genInitStartup initialize as NULL (default to
6338         historical behaviour)
6339         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
6340         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
6341         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
6342         library instead of hard coding it into the compiler.
6343         * support/regression/ports/mcs51-stack-auto/spec.mk,
6344         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
6345         * device/lib/mcs51/Makefile,
6346         * device/lib/small/Makefile,
6347         * device/lib/large/Makefile,
6348         * device/lib/mcs51/crtpagesfr.asm,
6349         * device/lib/mcs51/crtstart.asm,
6350         * device/lib/mcs51/crtxclear.asm,
6351         * device/lib/mcs51/crtxinit.asm,
6352         * device/lib/mcs51/crtclear.asm,
6353         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
6354         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
6355         and into user configurable files.
6356         * device/lib/clean.mk: clean mcs51 directory too
6357         * support/regression/tests/longlit.c: added static to T1 declaration
6358         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
6359         accesses in the initialization code
6360
6361 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6362
6363         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
6364         OSCTRIMVAL as noted in bug #916008
6365
6366 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6367
6368         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
6369         in loops with multiple exits (reported as incorrect registers
6370         used by Martin Helmling in Sdcc-user list)
6371
6372 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6373
6374         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
6375         made ds390 register extensions look less like error messages
6376
6377 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6378
6379         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
6380         reported by Adam Wozniak in Sdcc-user list
6381
6382 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
6383
6384         * src/SDCCast.c (decorateType): fixed with bug and promotion in
6385         arithmetic optimizations, added debug output
6386
6387 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
6388
6389         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
6390         * sdcc.spec: updated and split sdcc into 3 rpms
6391         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
6392         needed for literals of LEFT_OP and '+'
6393         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
6394         introduced RESULT_TYPE_NOPROM
6395         (geniCodeMultiply): fixed logic for decision if mul is optimized to
6396         left shift
6397         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
6398         limited promotion to int only for '*'
6399         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
6400
6401 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
6402
6403         * src/pic16/gen.c (genSkip),
6404         (genc16bit2lit), (gencjneshort): commented out
6405         (is_LitOp): new helper function, checks operand type
6406         (genCmpEq): rewritten
6407
6408 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
6409
6410         * support/regression/tests/bug-908454.c: added
6411
6412 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
6413
6414         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
6415         * src/SDCCicode.c (usualBinaryConversions): op needs int type
6416         (geniCodeCast): cosmetic, don't preserve bit storage class
6417         (geniCodeLeftShift): added promotion
6418         (geniCodeLogic): fixed regression
6419         * src/SDCCsymt.c (computeTypeOr): accept bits too
6420         (compareType): 2nd part of fix for bug #908454, needed for bitfields
6421
6422 2004-03-07  Borut Razem <borut.razem AT siol.net>
6423
6424         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
6425
6426 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
6427
6428         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
6429         version of pic16_genPackRegisters which does not check if ic is a
6430         CAST operator,
6431         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
6432         function cause string1.c regression test fails
6433
6434 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
6435
6436         * sim/ucsim/configure.in,
6437         * sim/ucsim/configure,
6438         * sim/ucsim/doc/Makefile.in: use docdir
6439         * src/SDCC.y: fixed sbit atrributes
6440         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
6441         * src/SDCCast.c (decorateType): |^& need special promotion handling
6442         * src/SDCCast.h,
6443         * src/SDCCsymt.h: moved definition of RESULT_TYPE
6444         * src/SDCCsymt.h (computeType),
6445         * src/SDCCicode.c: computeType() needs op
6446         * src/SDCCsymt.c (checkTypeSanity),
6447         * doc/sddman.lyx: "plain" bitfields are unsigned
6448         * src/SDCCsymt.c (computeTypeOr): added
6449         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
6450         |^& ops
6451         * src/SDCCval.c (val*): computeType() needs op
6452         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
6453         * support/regression/tests/onebyte.c: added tests for |^&
6454
6455 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
6456
6457         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
6458         for writing icode into asm output.
6459
6460 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
6461
6462         * src/pic16/device.c: added some debug lines enabled
6463         with macro DEBUG_CHECK,
6464         * src/pic16/genarith.c: more debug in genPlus,
6465         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
6466         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
6467         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
6468         * (aopForSym): onStack symbols are re-placed in data memspace,
6469         and onStack flag is cleared,
6470         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
6471         copy temporary pcodeop,
6472         * (genPcall): added warning for not updating PCLATU,
6473         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
6474         always true for pic16 port,
6475         * (genMultOneWord): NEW, supports integer multiplication,
6476         * (genMult): modified to call genMultOneWord,
6477         * (ifxForOp): added warning when return NULL,
6478         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
6479         flag is set before call to operandFromSymbol for implicit
6480         added structures,
6481         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
6482         options.intlong_rent are set by default,
6483         * (_hasNativeMulFor): modified to allow port generation of integer
6484         multiplication,
6485         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
6486         set regtype to REG_SFR for all registers, restricting seting the
6487         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
6488
6489 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6490
6491         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
6492         more than 500 times in the regression tests
6493
6494 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6495
6496         * support/Util/SDCCerr.h,
6497         * support/Util/SDCCerr.c,
6498         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6499         enumerator_list),
6500         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
6501         for symbol conflicts.
6502         * support/valdiags/tests/enum.c,
6503         * support/valdiags/tests/tentdecl.c,
6504         * support/valdiags/tests/struct.c: expect possible error messages
6505         referring to original symbol definitions.
6506         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
6507         * src/SDCCsymt.h,
6508         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
6509
6510 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
6511
6512         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
6513
6514 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
6515
6516         * src/pic16/ralloc.c (newReg): fixed bug #908929
6517
6518 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6519
6520         * src/ds390/gen.c: added missing #include "main.h"
6521
6522 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
6523
6524         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
6525         checking if symbol is already in set,
6526         * src/pic16/device.h: prototype for checkAddSym,
6527         * src/pic16/gen.c: (_G): added entry interruptvector,
6528         * (assignResultValue): removed some commented out lines,
6529         * (genFunction): check for ISR via sym->type, absolute section for
6530         interrupt code is created via a new pBlock, the goto instruction is
6531         placed now correctly at the interrupt vector position, changed all
6532         references from ivec to _G.interruptvector,
6533         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
6534         is the interrupt is a high priority one, same for return from ISR,
6535         * src/pic16/glue.c: changed all calls of addSetHead for publics and
6536         externs to calls of checkAddSym,
6537         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
6538         pic16_pcode_verbose flag is set,
6539         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
6540         * src/pic16/pcoderegs.c: message about how many registers are saved
6541         will only be emitted if pic16_pcode_verbose flag is set,
6542
6543 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6544
6545         * src/ds390/ralloc.h,
6546         * src/ds390/ralloc.c (ds390_regWithIdx),
6547         * src/ds390/gen.c (emitcode),
6548         * src/ds390/main.h,
6549         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
6550         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6551         ds390operandCompare, getRegsRead, getRegsWritten,
6552         initializeAsmLineNode): customized instruction size calculation for
6553         ds390, started basis for some register optimizations
6554         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
6555         corresponding assembly output
6556         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
6557         missing push/pop of r0/r1. Optimized push/pops
6558
6559 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6560
6561         * src/mcs51/main.c (instructionSize): fixed ACALL size
6562         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
6563
6564 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
6565
6566         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
6567         the sorting of rlist with NULL elements
6568         * (print_idataType, print_idata): NEW to create idata sections
6569         * src/pic16/device.h: idataSymSet new variable
6570         * src/pic16/gen.c (genFunction): fixed some bugs in string
6571         comparing, improved the absolute section creation for ISRs,
6572         added FSR0L/FSR0H in registers that are saved in an ISR,
6573         * (genInline): fixed the processing of inline snippets,
6574         now they undergo no process by the peephole optimizer
6575         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
6576         are placed in idataSymSet,
6577         * (pic16emitStaticSeg): extern symbols are added in externs,
6578         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
6579         switching when aboslute variables are placed in access bank memory
6580         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
6581         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
6582         commented out with #if,
6583         * (pic16_packRegisters): reintroduce the check for CAST because some
6584         symbols are not correctly handled,
6585         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
6586         pCodeInstruction instead of pCode,
6587         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
6588         pCodeAsmDir definition,
6589         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
6590         directive, then the argument directive is emitted without the leading
6591         tab, hack for inline labels which must be in the first column,
6592         * (compareLabel,pic16_findNextInstruction),
6593         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
6594         * (insertBankSwitch): modified for the new pCodeAsmDir,
6595
6596 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6597         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
6598
6599         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
6600         instance,
6601         * (pushSide): commented out with #if,
6602         * (assignResultValue): fixed some typos in saving
6603         registers,
6604         * (genPcall): FIXED and sync'ed with genCall,
6605         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
6606         * (genNearPointerGet): fixed to handle some more cases,
6607         implementation scheme via table reads,
6608         * (genConstPointerGet): modified to access code memory correct,
6609         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
6610         and improved to handle some cases
6611         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
6612         instead of "RETLW" for init data
6613         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
6614         not IN_DIRSPACE, work around to reduce bank switching when aboslute
6615         variables are placed in access bank memory (<0x80 and >=0xf80),
6616         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
6617         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
6618         TBLWT_POSTDEC,TBLWT_PREINC
6619         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
6620         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
6621         directives
6622         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
6623         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
6624         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
6625         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
6626
6627 2004-02-29  Borut Razem <borut.razem AT siol.net>
6628
6629         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
6630         support/Util/findme.h, support/Util/system.h: enhance binary relative
6631         search for lib and include by using findProgramPath()
6632
6633 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6634
6635         * src/SDCCpeeph.h,
6636         * src/SDCCpeeph.c (pcDistance),
6637         * src/port.h,
6638         * src/mcs51/ralloc.h,
6639         * src/mcs51/ralloc.c (mcs51_regWithIdx),
6640         * src/mcs51/main.h,
6641         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
6642         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6643         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
6644         size calculation port specific, started basis for some register
6645         optimizations
6646         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
6647         missing push/pop of r0/r1. Optimized push/pops
6648         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
6649         * device/lib/_modsint.c (_modsint),
6650         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
6651         and stack version so regression tests pass
6652
6653 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
6654
6655         * src/Makefile.in (dep): include SLIBOBJS in dependency check
6656         * src/SDCCast.c (decorateType): catch another small optimization
6657         with '?' operator
6658         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
6659         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
6660         modified to finally use computeType() all over SDCC,
6661         see Feature Request #877103
6662         * src/SDCCval.h: cosmetic
6663         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
6664         valCompare(); regression tested in muldiv.c
6665         * support/regression/tests/muldiv.c (testMod): mod sign follows
6666         dividend only
6667
6668 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
6669
6670         * src/SDCCast.c (decorateType): fixed bug #902362
6671         * doc/INSTALL.txt: fixed install instructions for win32
6672
6673 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6674
6675         * device/include/Makefile.in (install): fixed by replacing spaces
6676         by tabs
6677         * doc/README.txt,
6678         * doc/INSTALL.txt: updated for release
6679         * doc/sdccman.lyx: added warning for --xstack being buggy
6680
6681 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6682
6683         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6684         to eliminate build warnings.
6685         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6686
6687 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6688            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6689
6690         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6691         removed -penable-stack, added comment for stack pragma, added
6692         warning for not initializing the stack/frame registers, removed
6693         comment at interrupts section
6694
6695         Stack is made permanent, there is no ability to disable stack usage.
6696         * src/pic16/device.h,
6697         * src/pic16/device.c: removed all references to USE_STACK macro,
6698         * src/pic16/device.c (pic16_dump_section): when no elements in
6699         rlist, free rlist before return,
6700         * (pic16_dump_int_registers): NEW, internal registers are a new set
6701         of general purpose registers reused by each function,
6702         * (checkAddReg): returns 1 if registers is added to set,
6703         * (pic16_groupRegistersInSection): when a registers is of type
6704         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6705         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6706         SRCASECMP macro is moved here from device.c
6707         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6708         PO_PCLATU, PO_PRODL, PO_PRODH,
6709         * (pic16_pCodeOpType, genMinus,
6710         changed compares to "a" register, with AOP_ACC,
6711         * (pic16_genPlus): fixed some bugs and indented properly,
6712         * (pic16_addSign): changed size to size+offset in the MOVWF
6713         instruction,
6714         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6715         multiply 8-bit operand by literal, result is 8-bit,
6716         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6717         multiply 2 8-bit operand, result is 8-bit,
6718         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6719         genUMult8X*_16,
6720         * src/pic16/gen.c: changed accUse to contain WREG only,
6721         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6722         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6723         true, do not use immediate addressing any more unless sym is a
6724         pointer in codespace,
6725         * (aopForRemat): do not use immediate addressing when symbol not in
6726         codespace and when symbol's address is requested,
6727         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6728         accUse size (= 1),
6729         * (aopGet): added case for AOP_ACC and don't return "accumulator
6730         bug" but WREG instead,
6731         * (popGetTempReg): pushes contents of temporary register in stack,
6732         * (popReleaseTempReg): pops contents of temporary register from
6733         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6734         * (pic16_popGet): separated case AOP_ACC to return register WREG
6735         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6736         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6737         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6738         the use of immediate pointers to certain cases only.
6739
6740         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6741         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6742         * (assignResultValue, genCall, genRet): modified to use the new
6743         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6744         genPcall is still broken,
6745         * (genFunction): added code to create 'A' type pBlocks when
6746         interrupt functions are generated, code not extensively tested yet,
6747         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6748         * (genEndFunction): modified so ISRs pop stored registers from stack,
6749         * (genMultOneByte): cleanup,
6750         * (AccRsh): added flag andmask, to and result with appropriate mask,
6751         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6752         * (genDataPointerGet): fixed and reenabled its use,
6753         * (genNearDataPointerGet): bugs fixed,
6754         * (genDataPointerSet): bugs fixed,
6755         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6756         pic16_DumpSymbol, pic16_DumpOp,
6757         * src/pic16/genutils.h: function prototypes for the above functions,
6758         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6759         pointers,
6760         * (pic16emitRegularMap): many many many improvements, but needs a
6761         major cleanup,
6762         * src/pic16/main.c: enable_stack in pic16_options is removed,
6763         * (_pic16_parseOptions): removed command line options -penable-stack,
6764         * (_process_pragma): emit stack symbol only when stack pragma is
6765         processed,
6766         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6767         redirected to FSR0L/FSR0H pair,
6768         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6769         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6770         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6771         for immediates,
6772         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6773         * (dumpPicOptype): NEW,
6774         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6775         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6776         with movff instruction,
6777         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6778         added pic16_int_regs, some packRegsFor* functions are commented out,
6779         because produce errors,
6780         * src/pic16/NOTES: minor modifications
6781
6782 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6783
6784         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6785         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6786         --pack-iram.
6787         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6788         * as/mcs51/lkaomf51.c: fixed bug #895763
6789
6790 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6791
6792         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6793
6794 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6795
6796         * doc/sdccman.lyx: added details about the HC08 storage classes and
6797         interrupts, fixed the register usage info for z80 & gbz80
6798
6799 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6800
6801         * doc/sdccman.lyx: added more pic16 port documentation
6802         * device/include/pic16/: added header pic18fregs.h
6803
6804 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6805
6806         * doc/sdccman.lyx: added Vangelis' contribution
6807
6808 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6809
6810         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6811         extend to the next CALL or PCALL, not just to the next CALL.
6812
6813 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6814
6815         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6816
6817 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6818
6819         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6820         bug #895752 and a better fix for bug #716790
6821
6822 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6823
6824         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6825
6826 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6827
6828         * doc/sdccman.lyx: minor changes, minor changed
6829
6830 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6831
6832         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6833         which can't handle SDCC_NEWONEBYTEOPS,
6834         (geniCodeMultiply): removed conversion from mult to shift for pic14
6835         and pic16
6836
6837 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6838
6839         * src/hc08/gen.h,
6840         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6841         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6842         thus fixing bug #895406
6843
6844 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6845
6846         * device/lib/_modsint.c,
6847         * device/lib/_modslong.c: sign follows divisor only
6848         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6849         signs or signedness can be ignored
6850         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6851         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6852         added optimization for IFX,
6853         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6854         arguments;
6855         reenabled optimization for IFX, which was removed on 2004-01-11
6856         * src/SDCCast.h: added return type IFX
6857         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6858         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6859         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6860         SDCC_OLDONEBYTEOPS selects the old behaviour
6861         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6862         changed again and commented promotion rule
6863         * src/SDCCval.c (valDiv): promotion no longer necessary
6864         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6865         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6866         rewritten
6867         * support/regression/tests/onebyte.c: added
6868
6869 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6870
6871         * gen.c (genInline): reverted to old code for assemnling inline
6872         code because of bug reported James Chadd
6873
6874 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6875
6876         * ralloc.h: missing declarations from previous patch,
6877         seems that patch for ralloc.h was never applied, fixed
6878
6879 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6880            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6881
6882         * pcode.c,
6883         * pcode.h,
6884         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6885         indirect addressing. Marked FSR0 as deprecated
6886         * gen.c (pointerCode): commented out, not needed now
6887         (pic16_popGet2p): new MOVFF helper function
6888         (genGenPointerGet),
6889         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6890         (shiftRLong): removed duplicate debugging info
6891
6892 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6893
6894         * src/ds390/gen.c (genNearPointerGet),
6895         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6896         optimization with bits, but not bitfields.
6897         * src/ds390/ralloc.c (packRegisters),
6898         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6899
6900 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6901
6902         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6903
6904 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6905
6906         * src/SDCCsymt.h,
6907         * src/SDCCicode.c (operandFromSymbol),
6908         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6909         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6910         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6911         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6912         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6913         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6914         bug #892038
6915         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6916         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6917         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6918         * src/SDCCsymt.c (newSymbol),
6919         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6920         enumerator_list),
6921         * src/SDCCval.h,
6922         * src/SDCCval.c (newiList): fixed bug #885705
6923
6924 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6925
6926         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6927         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6928
6929 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6930
6931         * device/include/c8051f120.h,
6932         * device/include/c8051f300.h,
6933         * device/include/c8051f310.h: added/updated header files for Silicon
6934         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6935         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6936         in new section Submitting patches
6937
6938 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6939
6940         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6941         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6942         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6943         genGenPointerSet),
6944         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6945         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6946         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6947         genGenPointerSet),
6948         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6949         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6950         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6951         genGenPointerSet),
6952         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6953         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6954         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6955         genGenPointerSet): fixed bug #892400
6956         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6957         to eliminate build warnings.
6958         * src/SDCCast.c (processParms),
6959         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6960         fixed bug 751859
6961         * support/valdiag/valdiag.py: added GCC to the list of defines active
6962         when compiling with gcc
6963
6964 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6965
6966         * support/Util/SDCCerr.h,
6967         * support/Util/SDCCerr.c,
6968         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6969         with an incomplete type (fixed bug #883734)
6970         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6971
6972 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6973
6974         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6975
6976 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6977
6978         * src/SDCCast.c (decorateType),
6979         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6980         function pointer implementation
6981         * support/regression/tests/funptrs.c: added tests to verify both forms
6982         of function pointers work correctly. Added tests to verify parameters
6983         are passed in the correct order.
6984
6985 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6986
6987         * device.c (regCompare): registers are sorted by ascending
6988         address and increasing size,
6989         * main.c (_pic16_finaliseOptions): removed the declaration
6990         of compiler macro MCU. Now a macro of the format pic18fxxxx
6991         will be defined from the command line
6992
6993 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6994             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6995
6996         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6997         PCOP_RLCF was overwritten!
6998         * gen.c (genSkip): commented out calls to pic16_emitcode,
6999         * (genCmpEQ): fixed "long" compares, only high word did get compared,
7000         * (genlshTwo),
7001         * (genRRC): added debugging info,
7002         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
7003         overwritten while shifting,
7004         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
7005         overwritten while shifting,
7006         * (AccLsh),
7007         * (AccRsh),
7008         * (shiftLLeftOrResult),
7009         * (shiftRLeftOrResult),
7010         * (shiftRLong),
7011         * (shiftLLong): Implemented with pic16_emitpcode
7012         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
7013         * (genLeftShift): Fixed bug, operand for shift by variable always
7014         was "and"ed with 0x0f,
7015         * (genLeftShiftLiteral),
7016         * (genrshTwo),
7017         * (genRightShiftLiteral): added debugging info,
7018         * (genrshFour): added comment,
7019         * (genRightShift): determined signedness from operand "left"
7020         instead of "result"
7021
7022 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7023
7024         * src/SDCCicode.c (geniCodeParms),
7025         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
7026         function pointers, fixed function pointer bugs #861242 and #861896
7027
7028 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7029
7030         * device/include/c8051f000.h,
7031         * device/include/c8051f120.h,
7032         * device/include/c8051f300.h: added header files for Silicon
7033         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7034
7035 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
7036
7037         * src/SDCCast.c (processParams): added new type flow and restructured
7038         (gatherAutoInit): added new type flow
7039         (addCast): cosmetic changes
7040         (getLeftResultType): added new type flow for array indices, patch
7041         provided by Stas, see FR #877103
7042         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
7043         array index patch by Stas
7044         * src/SDCCast.h: added prototype getResultTypeFromType()
7045         * src/SDCCval.h,
7046         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
7047         * src/pic/glue.c (pic14emitStaticSeg),
7048         * src/pic16/glue.c (pic16emitStaticSeg),
7049         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
7050         for initialization of symbols
7051         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
7052         * support/Util/SDCCerr.h:
7053         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
7054         * .version: bumped version number to 2.3.8
7055         * device/include/Makefile.in (install),
7056         * doc/Makefile (install): changed to 'rm `find ...`' construct to
7057         avoid warnings
7058
7059 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
7060
7061         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
7062         Slade Rich fixed an optimization bug
7063         * src/pic/pcodepeep.c,
7064         * src/pic/pcoderegs.c
7065         * doc/Makefile (install): added test for directory
7066
7067 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7068
7069         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
7070         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
7071         * src/pic/ralloc.c (getRegPtr, getRegGpr),
7072         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
7073         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
7074         * as/mcs51/asexpr.c (term),
7075         * as/hc08/asexpr.c (term): fixed bug #887146
7076
7077 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7078
7079         * src/z80/gen.c (genMult): handle single byte result product
7080         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
7081         DUMMY_READ_VOLATILE (fixed bug #886367)
7082
7083 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7084
7085         * support/regression/tests/libmullong.c: fixed logic, on little endian
7086         hosts we ended without a mullong_wrapper()
7087
7088 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7089
7090         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
7091         virus/worm forged address usage.
7092
7093 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7094
7095         Fixed promotion, it should be done on AST level:
7096         * src/SDCCast.c (addCast): added promotion to int
7097         (decorateType): updated call to upCast()
7098         * src/SDCCicode.c (geniCodeLeftShift): removed call to
7099         usualUnaryConversions()
7100
7101 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
7102
7103         * support/regression/tests/literalop.c (mulWrapper): Added a
7104         wrapper to remove integer overflow warnings.
7105
7106         * support/regression/tests/float_trans.c: Made work on host.
7107
7108         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
7109         location of sz80.
7110
7111         * support/regression/generate-cases.py (main): Changed from inline
7112         to a main method.
7113
7114         * doc/Makefile (install): Changed to depth first to get rid of
7115         missing directory install warning.
7116
7117         * as/Makefile (install-doc): Made work on Mac.
7118
7119 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
7120
7121         * src/SDCCast.c: added an additional type flow in decorateType() of
7122         opposite direction, see feature request #860006; it's enabled at runtime
7123         by setting the environment variable SDCC_NEWTYPEFLOW
7124         * src/SDCCast.h: changed prototype of decorateType()
7125         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
7126         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
7127         'char' to 'int' can be omitted, if both operands are 'unsigned char';
7128         see feature request #877103
7129         * src/SDCCval.c: updated call of decorateType()
7130         (valBitwise): fixed bug #882876
7131         (valMinus): added promotion
7132         (valLogicAndOr): result is unsigned
7133         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
7134         * src/SDCCsymt.c (computeType),
7135         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
7136         must not cause an unsigned operation
7137         * src/pic/glue (pic14emitRegularMap),
7138         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
7139
7140 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
7141
7142         * src/pic/pcode.c (PCodeID): commented out left over debug code
7143
7144 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7145
7146         * support/valdiag/tests/overflow.c: added shift tests
7147         * src/pic/device.c,
7148         * src/pic/gen.c,
7149         * src/pic/gen.h,
7150         * src/pic/glue.c,
7151         * src/pic/main.c,
7152         * src/pic/pcode.c,
7153         * src/pic/pcode.h,
7154         * src/pic/pcodepeep.c,
7155         * src/pic/pcoderegs.c,
7156         * src/pic/ralloc.c,
7157         * src/pic/ralloc.h: applied patch from Slade Rich;
7158         added support for multiple code pages and multiple RAM banks on the
7159         PIC 14 port. The ASM files now no longer simply assume all the
7160         code / RAM are in the same page / bank. This means the linker can
7161         safely allocate code/RAM of separate ASM files to different pages/banks.
7162         * doc/sdccman.lyx: added Slade's tips
7163         * src/mcs51/peeph.def: fixed bug #880768
7164
7165 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7166
7167         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7168         * src/SDCCast.c (decorateType): fixed bug #880197
7169
7170 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7171
7172         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7173         getopt.h.
7174
7175         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7176         strtof is not part of C89 and isn't included with Mac OS X.
7177
7178 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7179
7180         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
7181         shiftL2Left2Result): fixed bug #879326
7182         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
7183         (genMultOneByte): fixed bug in signed vs unsigned multiplication
7184         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
7185         address fetch for clr instruction
7186         * device/lib/hc08/_mulint.c: created optimized assembly version
7187         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
7188
7189 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
7190
7191         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
7192         proposed in FR #877103
7193
7194 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
7195
7196         * src/SDCCval.c (cheapestVal): added missing checks
7197         * src/SDCCicode.c (usualBinaryConversions): fixed condition
7198         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
7199
7200 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
7201
7202         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
7203         equal operands
7204
7205 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
7206
7207         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
7208         loaded with the linker search paths (-L arguments) and the libraries
7209         to be linked with the current source (-l arguments). Changes
7210         currently will affect only the pic16 port.
7211         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
7212         include path the port specific paths and port specific libraries,
7213         * gplink command now contains the $3 argument,
7214         * src/pic16/device.h,
7215         * src/pic16/device.c,: structure PIC_device is made public and
7216         renamed to PIC16_device, the same for variable Pics which is renamed
7217         to Pics16. Updated all references to them.
7218         * src/pic16/glue.c (pic16glue): corrected bug with code
7219         initialization which bypassed the variable initializations block.
7220
7221         * device/lib/pic16/Makefile.rules: removed --penable-stack from
7222         COMPILE_FLAGS and added the --nostdinc option
7223
7224 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7225
7226         * device/include/mc68hc908jb8.h: Register defs for another member
7227         of the hc08 family. Contributed by Bjorn Bringert - thanks!
7228
7229 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
7230
7231         Documenting changes from previous commits.
7232         * configure.in (version 1.56),
7233         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
7234         when generating output files to configure the pic16 library,
7235         but now I've commented it out, since gputils aren't installed in the
7236         SF compile farm, so library won't compile
7237
7238         * device/lib/Makefile.in (version 1.56): initially I've added in
7239         target 'all' the prerequestive 'model-pic16' so it compiled the
7240         pic16 library, but now I've commented it out for the same reasons
7241         above,
7242         * added targets 'model-pic16' and 'objects-pic16' to compile the
7243         library
7244         * added target 'port-specific-objects-pic16' to handle the
7245         generated libraries and copy them into the build/ directory
7246         * added target 'clean-intermediate-pic16' to clean intermediate
7247         files into pic16 directory
7248         * in target 'installdirs' added line to create directory pic16 in
7249         the installation path
7250
7251         * device/include/Makefile.in (version 1.11): in target 'install'
7252         added lines to copy all header files to installation path,
7253         * in target 'installdirs' added line create directory for pic16
7254         headers in the installation path
7255
7256 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
7257
7258         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
7259          a function call
7260
7261 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
7262
7263         * configure,
7264         * device/lib/configure.in,
7265         * device/lib/configure: fixed for autoconf 2.57
7266
7267 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7268
7269         * src/z80/main.c (_parseOptions): fixed the portmode= command line
7270         option so that it actually works. Made it specific to the z80, since
7271         the gbz80 doesn't have these kinds of I/O ports.
7272
7273 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7274
7275         * device/include/z180.h,
7276         * device/lib/_memcpy.c,
7277         * device/lib/_memmove.c,
7278         * device/lib/_mulint.c,
7279         * device/lib/ser_ir.c,
7280         * device/lib/ser_ir_cts_rts.c,
7281         * device/lib/_strcmp.c,
7282         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
7283         * src/z80/main.c (_process_pragma): add support for pragmas bank and
7284         portmode; added deprecation warning for bank= and protmode= forms.
7285         Also, guard against buffer overflow.
7286         * src/z80/gen.c (aopGet): generate better code for sfr banked read
7287
7288 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7289
7290         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
7291         changed interrupt vector table generation to only emit declared vectors.
7292         * device/include/Makefile.in: added missing backslash
7293         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
7294
7295 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7296
7297         Mainly changes to support compilation of the device libraries
7298         * src/pic16/device.c: stack is allocated via symbol and not
7299         via literal number. The symbol is placed in the corresponding
7300         position of the data ram
7301         * (pic16_dump_section): relocatable and absolute uninitialized
7302         data are now emitted in sorted order to reduce section naming,
7303         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
7304         weren't marked as being in the access bank,
7305
7306 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7307
7308         Added portion of GNU PIC Library under the directory
7309         device/include/pic16 and device/lib/pic16. These files
7310         contain the declarations of SFRs for the PIC18Fxx2 devices.
7311         The directory is initialized via configure from toplevel.
7312
7313 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
7314
7315         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
7316         the spilllocations to be compared correctly
7317
7318 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7319
7320         * src/SDCCast.c (decorateType): fixed bug introduced today
7321
7322 2004-01-12  Borut Razem <borut.razem AT siol.net>
7323
7324         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
7325         doc/sdccman.lyx: upper case pragmas are deprecated
7326
7327 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7328
7329         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
7330         in simpler and even better code
7331
7332 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
7333
7334         * src/SDCCicode.c (operandOperation): fixed bug #874819
7335         * src/SDCCast.c (decorateType): fixed
7336         char foo (unsigned long ul) { return ul > 0; }
7337
7338 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7339
7340         * doc/sdccman.lyx: Moved and added some sections, small changes
7341         all over. Telling LaTeX to be less strict with word spacing
7342         to better keep the right margin. Changed some notes about
7343         maintainance of the ports in section 3.2.1 - is it OK like this?
7344
7345 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
7346
7347         SDCC source changes:
7348         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
7349         convilong): modified to inform the pic16 port that builtin functions
7350         are external
7351
7352         PIC16 PORT specific changes:
7353         * src/pic16/device.c pic16_dump_equates() added,
7354         processor registers declared internally by the port are emitted in
7355         the translation as equates,
7356         * src/pic16/gen.c: inline code is passed unprocessed to the
7357         translation,
7358         * (pic16_popGetLit2): fnuction modified to take second operand as
7359         pCodeOp pointer and not as literal,
7360         * (popRegFromIdx): prefixed with pic16_,
7361         * (pic16_popCombine2): modified to receive already allocated pCode
7362         operands,
7363         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
7364         * (genFunction): initializes local stack frame and pushes on stack
7365         all the registers used by this function,
7366         * (genEndFunction): restores all registers from stack and restores
7367         stack frame,
7368         * src/pic16/glue.c (pic16emitRegularMap): various changes and
7369         improvements,
7370         * (pic16glue): changed the program startup sequence,
7371         * added new dbName code 'A' for functions placed in absolute section
7372         * src/pic16/main.c: added function attribute _naked,
7373         * added pragma 'code' to place a fnuction at an absolute address,
7374         * added command line arguments --debug-ralloc and --pcode-verbose,
7375         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
7376         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
7377         * (pic16_newpCodeOpLit2): modified to take the second operand as
7378         pCodeOp pointer,
7379         * (pic16_printpBlock): modified to emit each function in a separate
7380         section,
7381         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
7382         UPPER for immediate operands,
7383         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
7384         instruction,
7385         * src/pic16/peeph.def: all peepholes with movff are commented out,
7386         because there is a problem in the pcode peep optimizer,
7387         * src/pic16/ralloc.c: the register allocator can now reuse local
7388         function symbols for another function. This saves register usage.
7389         * src/pic16/ralloc.h: added flag isLocal in structure regs,
7390
7391         Added file src/pic16/NOTES with information about program writing on
7392         the current port version.
7393
7394 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7395
7396         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
7397         and peephole 252 (array access)
7398
7399 2004-01-09  Borut Razem <borut.razem AT siol.net>
7400
7401         * src/SDCCmain.c : fixed #872250: -l command line defined library
7402           files are scanned before standard library files
7403
7404 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7405
7406         * src/SDCCast.c (decorateType): fixed bug #874046
7407
7408 2004-01-09  Borut Razem <borut.razem AT siol.net>
7409
7410         * support/scripts/sdcc.nsi: remove previous installation
7411
7412 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7413
7414         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
7415         bytes for last interrupt vector (mcs51)
7416         * sdcc.spec: fixed typo
7417
7418 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7419
7420         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
7421         gen51Code): more efficient parameter receive for --model-large
7422         ("bug" #845294)
7423
7424 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7425
7426         * src/ds390/main.c,
7427         * src/z80/main.c: added missed needLinkerScript flags (more than
7428         one port structure defined in these file)
7429         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
7430         bug #795325
7431
7432 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
7433
7434         * src/SDCCmain.c: removed various references to DEFAULT_PORT
7435         * src/port.h: added flag needLinkerScript in port->linker
7436         structure to inform whether to create a .lnk file or not,
7437         * src/avr/main.c,
7438         * src/ds390/main.c,
7439         * src/hc08/main.c,
7440         * src/mcs51/main.c,
7441         * src/pic/main.c,
7442         * src/pic16/main.c,
7443         * src/xa51/main.c,
7444         * src/z80/main.c: changed appropriately to configure
7445         needLinkerScript flag
7446         * src/pic/gen.c,
7447         * src/pic16/gen.c (genAddrOf): fixed bug #863624
7448         * src/pic/glue.c: added variable udata_section_name to
7449         override default uninitialized data segment definition for
7450         devices only with SHAREBANK memory (reported from Erik Epetrich)
7451         * (pic14emitOverlay): modified to emit a commented overlay segment
7452         directive when no overlay data exist
7453         * (picglue): modified to emit uninitialized data segment
7454         according to udata_section_name
7455         * src/pic/main.c (_pic14_parseOptions): added command line
7456         options --udata-section-name=[name] to override default
7457         udata definition name
7458         * modified _linkCmd and _asmCmd to include compiler passed
7459         arguments via -W option
7460         * src/pic16/main.c: added $l in _asmCmd, changed extension for
7461         object file from '.rel' to '.o' in port->linker structure,
7462         changed size of fptr from 2 to 3 in port structure
7463
7464 2004-01-07  Borut Razem <borut.razem AT siol.net>
7465
7466         * support/scripts/sdcc.nsi: update PATH
7467         * support/scripts/sdcc.ico: craeted
7468
7469 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
7470
7471         * device/include/Makefile.in: fix install
7472         * doc/Makefile: fix install
7473
7474 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7475
7476         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
7477         in bug #860505
7478         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
7479         how the function variable allocation summary is displayed; also
7480         include information about variables allocated to the overlay
7481         segment
7482
7483 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7484
7485         * as/mcs51/lkmain.c: Help about -Y option
7486         * as/mcs51/lkarea.c: Fixed gcc warnings
7487
7488 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7489
7490         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
7491         fixed warning
7492         * support/valdiag/tests/overflow.c: added
7493         * src/SDCCast.c (decorateType),
7494         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
7495         LEFT_OP (left shift)
7496
7497 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7498
7499         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
7500         (default behaviour).
7501
7502 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7503
7504         A python script to validate compiler diagnostic messages. It can be
7505         used to verify that sdcc complains about bad c source code and
7506         gives a good location of the error.
7507         * support/valdiag/Makefile,
7508         * support/valdiag/valdiag.py,
7509         * support/valdiag/tests/*
7510
7511 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7512
7513         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
7514         * src/SDCCsymt.c (newEnumType),
7515         * src/SDCCsymt.h
7516         * support/Util/SDCCerr.c,
7517         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
7518         enum related bugs.
7519         * support/regression/tests/enum.c: added test for enum values that
7520         require at least 2 bytes of storage.
7521
7522 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7523
7524         * src/common.h: added ifndef/define/endif macros
7525         around the header file.
7526         Bug reported from Jesus Calvino-Fraga
7527
7528 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7529
7530         * sdcc.spec: updated
7531         * device/include/Makefile.in: don't install CVS directories
7532         * device/lib/Makefile.in: added removal of CVS directories after install
7533         * doc/Makefile: fixed install, added local_icons
7534         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
7535         * src/mcs51/gen.c (genRightShift): fixed bug #870788
7536         * src/ds390/gen.c (genRightShift): fixed bug #870788
7537         * src/SDCCast.c (decorateType): fixed bug #870781
7538
7539 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7540
7541         PIC16 port related changes:
7542         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
7543         added variable stackPos,
7544
7545         * gen.c: genCall, assignResultValue: added support for
7546         pushing/retrieving function parameters to/from stack,
7547         genFunction,genEndFunction: setup stack frame for the
7548         generated function,
7549         genAddrOf: will be changed according to bug 863624
7550
7551         * added files genutils.c and genutils.h which contain gen*
7552         debugged and optimised functions extracted from gen.c
7553
7554         * glue.c: added variable 'externs' which holds extern symbols,
7555         pic16emitRegularMap: is modified to properly handle relocatable
7556          symbols under the new scheme,
7557         pic16createInterruptVect: is modified
7558         pic16printPublics: is modified to emit 'global' assembler directives,
7559         added pic16_printExterns to print extern symbols,
7560         pic16glue: initializes stack/frame pointer in the beginning of
7561         the assembly output. Temporary hack, will be corrected later,
7562         because gplink yet does not support stack and SDCC does not
7563         yet support a type of crt0.o object to create the final binary.
7564
7565         * Removed many lines that contain 8051 legacy code.
7566         * The code is finally placed under a 'code' directive.
7567         * Added port specific options.
7568
7569         * _process_pragma: simplified since now we do not need *special*
7570         include file to define SFR registers. But a separate header
7571         will be needed. This will be developed later.
7572         * _pic16_parseOptions: added, parses port specific options:
7573         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
7574         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
7575         --preplace-udata-with=
7576
7577         * _pic16_setDefaultOptions: modified to initialize section names,
7578         but hack is temporarly out of order since it needs improvement.
7579         * _pic16_genAssemblerPreamble: configuration words are emitted by
7580         their address instead of their name. This part is incomplete and
7581         supports only the 18Fxx2 devices. Other devices will emit an error
7582         during assembly since they do not contain the same set of config
7583         registers
7584         * _pic16_genIVT: is modified,
7585
7586         * pcode.c: added definitions for some hardware registers that are needed
7587         for stack support
7588         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
7589         All PCI entries are updated. Now LFSR is supported.
7590         * Removed pic16_pciTRIS is mentioned by mdubuc in source
7591         * added pic16_newpCodeOpLit2 to support instructions with
7592         two literal arguments
7593         * pic16_pCode2str: corrected code that emits assembler instructions
7594         with two literal operands and those that have an access bit modifier
7595         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
7596         this fixes a bug which caused some labels to be lost, when an
7597         assembler directive was added, i.e. banksel,
7598         * pic16_FixRegisterBanking: improved logic that causes the insertion
7599         of bank switching,
7600         * InlineFunction: functions that are called once, are not any more
7601         inlined. This can be a port option in the future,
7602
7603         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
7604
7605         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
7606         hold the corresponding uninitialized symbols,
7607         * pic16_allocProcessorRegister: registers have explicit marked the
7608         accessBank field,
7609         * pic16_allocInternalRegister: registers are explicit marked as
7610         not used,
7611         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
7612         processing list, so bit registers were lost,
7613         *
7614
7615         * ralloc.h: added field 'accessBank' and original symbol operand
7616         in register definition,
7617         * removed the field isMapped from register definition,
7618
7619         ** Several functions have been removed from various sources:
7620         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
7621         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
7622         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
7623         pic16_assignRelocatableRegisters
7624
7625         ** others have been introduced:
7626         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
7627         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
7628
7629 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
7630
7631         * support/scripts/inc2h.pl: changed definition of BIT_AT
7632         to emit 'sbit at' instead of 'bit at'. This was a request.
7633
7634         PIC16 port related preliminary changes:
7635         * gen.c: prefixed function popRegFromString with
7636         pic16_ and all references to it corrected
7637         * pcode.c: all pic16_pc_* hardware registers prefixed
7638         with underscore (_),
7639         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
7640         * ralloc.c: newReg(): when register is REG_SFR then
7641         set address to rIdx,
7642         pic16_allocProcessorRegister(): marks register wasUsed=0
7643         pic16_writeUsedRegs(): added a call to assign processor
7644         registers via pic16_assignFixedRegisters
7645
7646 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7647
7648         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
7649         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
7650         variables in unused register banks.  Also the SSEG is placed
7651         wherever there is enough space for it, and IDATA can be anywhere
7652         in internal RAM.  For now compile using -Wl-Y[stack_size].
7653         The mem file is different for this option as well, since it
7654         makes no sense of talking about DSEG lenght.
7655
7656 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
7657
7658         * src/SDCClrange.c: fixed bug 869095 that caused segfault
7659         in certain cases, e.g. when ROM assignment, patch provided
7660         from Albert den Haan.
7661
7662 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
7663
7664         Many signedness and type propagation fixes:
7665         * src/SDCCicode.c: made geniCodeCast() static
7666         replaced SPEC_ by IS_ (cosmetic)
7667         (operandOperation): fixed div and mod operation
7668         (usualBinaryConversions): added support for promotion of char
7669         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
7670         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7671         (geniCodeAdd): an array index will stay unsigned, even if promoted
7672         from char to int
7673         (geniCodeArray): ditto
7674         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7675         * src/SDCCsymt.c (computeType): added more support for char;
7676         promotion of char is selectable by promoteCharToInt, fixed signedness
7677         for all cases
7678         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7679         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7680         * src/SDCCval (val*): replaced signedness calculation by
7681         computeType()
7682         rearranged if-branches (cosmetic)
7683         (valShift): added warning W_SHIFT_CHANGED
7684         (valCompare): fixed problem with different types
7685         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7686         * support/regression/tests/literalop.c: added many cases
7687         * support/regression/tests/ast_constant_folding.c: changed finally to
7688         'unsigned int'
7689         * .version: new year, new version: 2.3.7
7690         * src/SDCCmain.c (main): applied patch #866468
7691         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7692         provided by Scott Bronson
7693         * doc/sdccman.lyx: updated documentation for sdcdb
7694         updated and added chapter tips
7695
7696 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7697
7698         * src/SDCCsymt.h: missing from yesterday's commits
7699
7700 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7701
7702         * src/SDCC.y (struct_or_union_specifier),
7703         * support/Util/SDCCerr.c,
7704         * support/Util/SDCCerr.h: verify that struct & union tags are used
7705         as declared.
7706
7707 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7708
7709         * src/SDCCglobl.h: missing from yesterday's commits
7710
7711 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7712
7713         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7714         sft_attributes, struct_declaration, parameter_declaration,
7715         type_name, start_block, declaration_list),
7716         * src/SDCC.lex (check_type): support redefinition of typedef names
7717
7718 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7719
7720         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7721         aligned xdata arrays. Erik helped me with the if clause.
7722
7723 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7724
7725         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7726         warning
7727
7728 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7729
7730         * src/SDCCast.h,
7731         * src/SDCCast.c (newAst_),
7732         * src/SDCCicode.h,
7733         * src/SDCCicode.c (ast2iCode, newiCode),
7734         * src/SDCCglobl.h,
7735         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7736         expr, statement, expression_statement, selection_statement,
7737         iteration_statement, expr_opt, jump_statement): foundation for tracking
7738         sequence points
7739         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7740         point code too)
7741
7742 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7743
7744         * support/Util/SDCCerr.c,
7745         * src/SDCCast.h,
7746         * src/SDCCast.c (createCase, createDefault, decorateType),
7747         * src/SDCClabel.c (labelUnreach),
7748         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7749         to error messages.
7750         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7751         (with thanks to Stas Sergeev)
7752         * device/include/time.h,
7753         * device/lib/time.c (CheckTime): suppress unreachable code warning
7754
7755 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7756
7757         * src/SDCCast.c (createIvalCharPtr),
7758         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7759         bug #753752)
7760         * support/regression/tests/nullstring.c: tests for these two bugs
7761
7762 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7763
7764         * support/Util/SDCCerr.h,
7765         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7766         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7767         about storage class and 'at' used inside struct or union
7768         * src/SDCCBBlock.c (iCodeFromeBBlock),
7769         * src/SDCCcse.c (ifxOptimize),
7770         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7771         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7772         printIval, emitStaticSeg, emitOverlay),
7773         * src/SDCClabel.c (deleteIfx),
7774         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7775         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7776         gatherAutoInit, processParms),
7777         * support/Util/SDCCerr.h,
7778         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7779         reporting for post-parse errors.
7780
7781 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7782
7783         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7784         implicit casts via union; they don't work on big endian systems
7785         (possible fix for bug #861138)
7786
7787 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7788
7789         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7790         * src/mcs51/main.c: fixed the fix for bug #737001
7791
7792 2003-12-15  Borut Razem <borut.razem AT siol.net>
7793
7794         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7795
7796 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7797
7798         * support/makebin/makebin.c: put output in binary mode
7799
7800 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7801
7802         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7803         xdata and data memory on startup. Set the environment variable
7804         SDCC_NOGENRAMCLEAR to disable this.
7805         * src/mcs51/peephole.def,
7806         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7807         (allows non-interrupt and interrupt code to safely compete for a resource
7808         without the non-interrupt code having to disable interrupts)
7809
7810 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7811
7812         * src/SDCCicode.c (geniCodeAdd),
7813         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7814         with valFromType if type might be a pointer and host is big endian).
7815         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7816         types, not just integer types.
7817         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7818         multiply defined with mismatching "at" address.
7819
7820 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7821
7822         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7823         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7824         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7825         with embedded nulls (fixed bug #753752)
7826
7827 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7828
7829         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7830         Apparently this did not see much testing (endless loop)
7831
7832 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7833
7834         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7835
7836 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7837
7838         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7839         gracefully handle NULL memmap pointers
7840
7841 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7842
7843         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7844         instead of deleting the iCode when an operand is volatile
7845         * src/z80/gen.c (genDummyRead),
7846         * src/mcs51/gen.c (genDummyRead),
7847         * src/ds390/gen.c (genDummyRead),
7848         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7849         not just IC_RIGHT
7850         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7851         * src/SDCC.y: fixed bug #850420
7852
7853 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7854
7855         Applied z80 i/o port patch from Peter Townson and fixed some operators
7856         to better handle operands in A register.
7857         * device/include/z180.h
7858         * src/SDCC.y
7859         * src/SDCCglue.c
7860         * src/z80/gen.c
7861         * src/z80/gen.h
7862         * src/z80/main.c
7863         * src/z80/peeph-z80.def
7864         * src/z80/peeph.def
7865         * src/z80/z80.h
7866
7867 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7868
7869         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7870
7871 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7872
7873         * device/lib/hc08/_mullong.c: Removed extra #endif
7874
7875 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7876
7877         * sim/ucsim/hc08.src/inst.cc,
7878         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7879         carries from x to h
7880         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7881         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7882         * device/include/stdarg.h: fixed varargs for hc08
7883         * device/lib/Makefile.in,
7884         * device/lib/hc08/Makefile,
7885         * device/lib/hc08/_mulint.c,
7886         * device/lib/hc08/_mullong.c: fixed some endian problems
7887
7888 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7889
7890         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7891         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7892         * device/lib/_gptrget.c,
7893         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7894
7895 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7896
7897         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7898         * src/SDCCast.c (astErrors): fixed bug #846007
7899         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7900
7901 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7902
7903         * src/SDCCast.c (decorateType): disabled a transformation I added in
7904         revision 1.188 (access to fields of a structure at an absolute address);
7905         it breaks with bitfields, extern declarations, and gcse analysis.
7906         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7907         could be assigned through a pointer, so don't complain.
7908         * src/SDCCast.c (astErrors),
7909         * src/SDCCast.h,
7910         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7911
7912 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7913
7914         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7915         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7916         output of __config directives, since gpasm now supports them
7917         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7918         pre-processor macro, i.e. -DMCU=p18f452
7919         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7920         and modified to handle 'cast' icode similarly to '=' icode
7921         * src/pic16/device.h (typedef struct PIC_device): added field
7922         'extMIface' to indicate that chip has external memory interface
7923         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7924         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7925         18F8720
7926
7927 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7928
7929         * src/SDCC.y (pointer): fixed bug #846006
7930         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7931         * src/SDCCast.c (decorateType): fixed bug #846009
7932         * src/ds390/peeph.def,
7933         * src/ds390/gen.c (genAnd, genOr),
7934         * src/mcs51/peeph.def,
7935         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7936
7937 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7938
7939         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7940         * src/SDCCdflow.c
7941         * src/SDCCcse.c
7942         * src/SDCCcse.h
7943         * src/SDCCBBlock.h
7944         * src/SDCCBBlock.c
7945
7946 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7947
7948         fixed bug #845089
7949         * src/SDCCbitv.h,
7950         * src/SDCCbitv.c: added function to free a bitvector
7951         * src/SDCClrange.h,
7952         * src/SDCClrange.c: added function to recompute the liveranges
7953         * src/avr/ralloc.c,
7954         * src/ds390/ralloc.c,
7955         * src/hc08/ralloc.c,
7956         * src/mcs51/ralloc.c,
7957         * src/pic/ralloc.c,
7958         * src/pic16/ralloc.c,
7959         * src/xa51/ralloc.c,
7960         * src/z80/ralloc.c: recompute the liveranges after register packing
7961
7962 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7963
7964         * src/SDCCloop.c (newInduction): fixed bug #845630
7965
7966 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7967
7968         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7969         inadvertantly left behind from my 2003-11-12 change
7970
7971 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7972
7973         Updated headers I neglected to commit yesterday.
7974         * src/SDCClrange.h,
7975         * src/SDCCicode.h
7976
7977 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7978
7979         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7980         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7981         * src/SDCCopt.c (eBBlockFromiCode),
7982         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7983         the creation of the key hash table from the sequencing so it can be used
7984         earlier (for some GCSE bug fixes still pending)
7985
7986 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7987
7988         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7989         * support/regression/tests/addsub.c: testing genPlus shortcut
7990
7991 2003-11-15  Borut Razem <borut.razem AT siol.net>
7992
7993         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7994
7995 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7996
7997         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7998         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7999         ordering is immaterial.
8000         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
8001
8002 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8003
8004         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
8005         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
8006         (SIGSEV) of bug #840381
8007         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
8008         unlink new file before rename if new and old filenames are the same)
8009
8010 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8011
8012         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
8013         uninitialized variables) for the mcs51. Set environment variable
8014         SDCC_GENRAMCLEAR to test.
8015         xdata initialization slightly shorter
8016
8017 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8018
8019         * src/SDCCsymt.h,
8020         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
8021         #838241 & 780691 (basicly the same bug)
8022         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
8023         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
8024
8025 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
8026
8027         * src/SDCCmain.c (linkEdit): "fix" #834252
8028
8029 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8030
8031         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
8032         * src/SDCCast.h,
8033         * src/SDCC.y: fixed bug #819403
8034
8035 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8036
8037         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
8038         the reentrant attribute.
8039         * src/hc08/gen.c (genPackBits): added missing stack readjustment
8040         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
8041         simulation
8042         * src/SDCCast.c (decorateType): fixed bug with storage class not being
8043         updated during pointer dereference; f.e. ~(((char *)1)*) was being
8044         erroneously reduced to a literal.
8045         * src/hc08/ralloc.c (packRegisters, rematStr),
8046         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
8047         some cases
8048
8049 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8050
8051         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
8052         * doc/sdccman.lyx: changed from 'article' to 'book'
8053         * doc/Makefile: readded test_suite_spec and cdbfileformat
8054
8055 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
8056
8057         * device/include/stdlib.h: include malloc.h to comply with ANSI
8058         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
8059
8060 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8061
8062         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
8063         * doc/clean.mk: also remove *.out files
8064         * doc/sdccman.lyx: some additions, larger top/bottom margins
8065
8066 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8067
8068         * src/SDCC.y: fixed bug #837365
8069         * support/regression/tests/bitopcse.c
8070         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
8071         a symbol (might be valop instead)
8072         * device/lib/Makefile.in: added errno.c to HC08SOURCES
8073         * device/lib/clean.mk: added hc08 to the cleaning list
8074
8075 2003-11-04  Borut Razem <borut.razem AT siol.net>
8076
8077         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
8078           made 2003-11-04
8079         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8080           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
8081           malloc is declared in standard stdlib.h
8082
8083 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8084
8085         * device/lib/hc08/Makefile: need to clean .rel not .o files
8086         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
8087
8088 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8089
8090         * src/port.h,
8091         * src/hc08/main.c,
8092         * src/mcs51/main.c,
8093         * src/ds390/main.c,
8094         * src/z80/main.c,
8095         * src/avr/main.c,
8096         * src/pic/main.c,
8097         * src/pic16/main.c,
8098         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
8099         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
8100         tests (which uses the port's oclsExpense function)
8101         * src/SDCC.y,
8102         * src/SDCCast.c,
8103         * src/SDCCicode.c,
8104         * src/hc08/gen.c,
8105         * src/ds390/gen.c,
8106         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
8107
8108 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8109
8110         * src/SDCCcse.c (ifxOptimize),
8111         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
8112         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
8113         deleting the IFX iCode.
8114         * src/hc08/ralloc.c: reduced unneeded slocs
8115         * src/hc08/gen.c: fixed bug in asmopToBoolean
8116
8117 2003-11-04  Borut Razem <borut.razem AT siol.net>
8118
8119         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
8120           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8121           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
8122           transferred to configure
8123
8124 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
8125
8126         Use headers defined in the C[++] standards:
8127         * sim/ucsim/gui.src/serio.src/fileio.cc
8128         * sim/ucsim/gui.src/serio.src/frontend.cc
8129         * sim/ucsim/gui.src/serio.src/main.cc
8130         * sim/ucsim/gui.src/serio.src/posix_signal.cc
8131         * support/Util/NewAlloc.c
8132         * as/hc08/lklibr.c
8133         * as/mcs51/lklibr.c
8134         * as/z80/aslist.c
8135         * as/z80/assym.c
8136
8137 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8138
8139         * Added MSVC projects for hc08 assembler and linker:
8140         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
8141         /as/hc08/link_hc08.dsp
8142
8143 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8144
8145         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8146
8147 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8148
8149         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8150
8151 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8152
8153         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8154
8155 2003-10-31  Borut Razem <borut.razem AT siol.net>
8156
8157         * support/cpp2/cpplib.h,
8158           support/cpp2/cpplib.c,
8159           support/cpp2/cpplex.c,
8160           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8161           to switch _asm block preprocessing on / off. Default is
8162           #pragma preproc_asm +
8163
8164 2003-10-31  Borut Razem <borut.razem AT siol.net>
8165
8166         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8167           when outputting comment blocks (when executed with -C option) and
8168           _asm (SDCPP specific) blocks
8169
8170 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8171
8172         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8173
8174 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8175
8176         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8177
8178 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
8179
8180         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
8181         * src/SDCCast.c (decorateType): fixed bug #832664
8182
8183 2003-10-31  Borut Razem <borut.razem AT siol.net>
8184
8185         * support\cpp2\cpplex.c: fixed for SDCPP:
8186           comments(when executed with -C option) and _asm blocks
8187           were included even if they where in skipped #if block.
8188           Applied solution from GCC cpp 3.3.2
8189
8190 2003-10-31  Borut Razem <borut.razem AT siol.net>
8191
8192         * src/SDCC.lex: sdcc now understands both formats:
8193           '# <line_number> <file_name>' and
8194           '#line <line_number> <file_name>'
8195         * support/cpp2/cppmain.c: sdcpp now generates the standard
8196           '# <line_number> <file_name>' instead of former
8197           '#line <line_number> <file_name>'
8198
8199 2003-10-30  Borut Razem <borut.razem AT siol.net>
8200
8201         * support/cpp2/cpphash.h,
8202         * support/cpp2/cpplib.h
8203         * support/cpp2/cpplex.c,
8204         * support/cpp2/cppmain.c,
8205         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
8206
8207 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8208
8209         Fixed a number of problems revealed by bug #827883.
8210         * src/SDCCloop.c (loopInvariants): Spill location of the
8211         result operand should be recomputed if extracted from
8212         a loop. Also, don't extract assignments of an iTemp
8213         from a literal.
8214         * src/SDCCast.c (isConformingBody): loop reversal should
8215         not occur if the control variable is involved with a
8216         relational operator.
8217
8218 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
8219
8220         * .version: bumped to 2.3.6 to reflect the big improvements
8221         made by Erik and Klaus. Thanks!
8222
8223 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
8224
8225         Replaced the livrange code.
8226         * src/SDCClrange.c: added new LR code
8227         * src/SDCCloop.c,
8228         * src/SDCCBBlock.h: removed remainig parts from old LR code
8229         * src/ds390/ralloc.c,
8230         * src/ds390/gen.c: minor fixes to make it work with new code
8231
8232 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8233
8234         * as/hc08/asm.h,
8235         * as/hc08/lkrloc.c,
8236         * src/hc08/gen.c,
8237         * src/hc08/ralloc.c: Fix various warnings related to the hc08
8238         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
8239         (tweaked fix for bug #818696)
8240
8241 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8242
8243         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
8244
8245 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8246
8247         * src/SDCCmain.c,
8248         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
8249         * src/mcs51/gen.c (gencjneshort),
8250         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
8251         more efficient (per Scott Bronson's suggestion)
8252
8253 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8254
8255         Extended the semantics of the critical keyword to include
8256         individual statements. See RFE #827755 and #799831
8257         * src/SDCC.y
8258         * src/SDCCicode.c
8259         * src/SDCCopt.c
8260         * src/SDCCast.c
8261         * support/Util/SDCCerr.c
8262         * support/Util/SDCCerr.h
8263         * src/mcs51/gen.c
8264         * src/ds390/gen.c
8265         * src/hc08/gen.c
8266
8267 2003-10-19  Borut Razem <borut.razem AT siol.net>
8268
8269         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
8270
8271 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8272
8273         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
8274         Fixed bug #818696
8275         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
8276         and predecrement operand is displayed
8277
8278 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8279
8280         * src/SDCCval.c (valMinus): fixed bug #826041
8281
8282 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8283
8284         Some hc08 related updates that I missed earlier
8285         * sim/ucsim/stypes.h
8286         * support/regression/ports/hc08/spec.mk
8287
8288 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8289
8290         New target "hc08" for the Motorola 68hc08 family of micros
8291
8292         * configure
8293         * configure.in
8294         * Makefile
8295         * src/hc08/*
8296         * src/SDCCmain.c
8297         * src/port.h
8298         * sim/ucsim/hc08.src/*
8299         * sim/ucsim/configure.in
8300         * src/ucsim/configure
8301         * sim/ucsim/packages_in.mk
8302         * as/hc08/*
8303         * as/Makefile
8304         * device/include/mc68hc908qy.h
8305         * device/lib/hc08/*
8306         * device/lib/Makefile.in
8307         * support/regression/ports/hc08/*
8308         * support/regression/Makefile
8309
8310 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8311
8312         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
8313         regression test
8314         * src/ds390/gen.c (genCast): fixed bug #821957
8315
8316 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8317
8318         * device/lib/logf.c: "fixed" overlay bug
8319         * support/regression/ports/host/spec.mk: added m library
8320         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
8321         * support/regression/tests/float_trans: added (for Eric)
8322
8323 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
8324
8325         * src/mcs51/gen.c (genCpl): fixed bug
8326         http://sf.net/mailarchive/message.php?msg_id=6263915
8327
8328 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
8329
8330         * src/SDCCast.c (decorateType): added extended constant folding
8331         * src/SDCCsymt.c (computeType): cleanup
8332         * src/SDCCval.c (valShift): minor optimization
8333         * support/regression/tests/ast_constant_folding.c: added
8334
8335 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8336
8337         * src/SDCCmain.c: removed some unintended changes
8338
8339 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8340
8341         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
8342         * src/z80/gen.c: fixed part of bug #817589
8343         * src/SDCCsymt.c (checkFunction): fixed bug #817895
8344
8345 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
8346
8347         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
8348         * src/SDCCcflow.c
8349         * src/SDCCcse.c
8350         * src/SDCCdflow.c
8351         * src/SDCClabel.c
8352         * src/SDCClrange.c
8353         * src/SDCCmem.c
8354         * src/SDCCopt.c
8355         * src/SDCCpeeph.c
8356         * src/SDCCset.c
8357         * src/avr/ralloc.c
8358         * src/ds390/ralloc.c
8359         * src/izt/ralloc.c
8360         * src/mcs51/ralloc.c
8361         * src/pic/ralloc.c
8362         * src/pic16/ralloc.c
8363         * src/xa51/ralloc.c
8364         * src/z80/ralloc.c
8365         * src/z80/gen.c: removed unused label "release:"
8366
8367 2003-10-06  Borut Razem <borut.razem AT siol.net>
8368
8369         * src/SDCC.lex: removed definition of unused variables
8370           save_optimize and save_options
8371
8372 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
8373
8374         * clean.mk: removed '=' in "-maxdepth=1"
8375         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
8376         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
8377
8378 2003-10-06  Borut Razem <borut.razem AT siol.net>
8379
8380         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
8381           my_unput() replaced by unput()
8382
8383 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
8384
8385         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
8386         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
8387         type-punned pointer will break strict-aliasing rules"
8388         Old LR behaviour is again default; Klaus' LR can be choosen by
8389         defining the environment variable LRKLAUS
8390         * src/SDCCBBlock.h
8391         * src/SDCCloop.c
8392         * src/SDCClrange.c
8393         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
8394         * clean.mk: fixed removal of files in bin/CVS/
8395         * device/lib/clean.mk: fixed removal of directories small and large
8396         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
8397         * src/SDCCicode.c,
8398         * src/SDCCval.c: removed superflous test for pedantic
8399
8400 2003-10-05  Borut Razem <borut.razem AT siol.net>
8401
8402         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
8403           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
8404           message "unmatched #pragma SAVE and #pragma RESTORE"
8405
8406 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8407
8408         * doc/sdccman.lyx: various additions and updates (interrupts, inline
8409           assembly, critical functions, atomic, nojtbound)
8410
8411 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
8412
8413         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
8414         * src/SDCCBBlock.h
8415         * src/SDCCloop.c
8416         * src/SDCCloop.h
8417         * src/SDCClrange.c
8418
8419 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8420
8421         * src/z80/gen.h,
8422         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8423         * src/mcs51/gen.h
8424         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8425         * src/ds390/gen.h
8426         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8427         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
8428         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
8429
8430 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8431
8432         * src/z80/gen.c (genRet): fixed bug #524753
8433         * src/z80/gen.c (genCast): fixed internal error on cast from
8434         pointer to long
8435         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
8436         fix for bug #477835 to the z80
8437         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
8438         for tracking iCodes in the peephole optimizer for z80
8439
8440 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8441
8442         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
8443         the other part of bug #814548
8444         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
8445
8446 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
8447
8448         * src/SDCCcse.c: fixed part of bug #814548
8449
8450 2003-09-28  Borut Razem <borut.razem AT siol.net>
8451
8452         * src/asm.c: rewrite of printILine() to use temporary file instead
8453           a pipe
8454         * src/xa51/main.c: commented out declaration of int rewinds
8455
8456 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8457
8458         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
8459
8460 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8461
8462         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
8463         * src/asm.c (printILine): Fixed bug #811015
8464
8465 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8466
8467         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
8468         freeing.
8469
8470 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8471
8472         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
8473         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
8474         to correctly handle general case of AOP_PAIRPTR
8475         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
8476
8477 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8478
8479         * src/mcs51/ralloc.c (fillGaps),
8480         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
8481         register positioning bug)
8482
8483 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
8484
8485         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
8486
8487 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8488
8489         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
8490         genCodePointerGet, genGenPointerGet, genFarPointerSet,
8491         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
8492         (ralloc doesn't intentionally do this now, but perhaps later)
8493         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
8494         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
8495         register positioning bugs (Fixed bug #762602 and #795325)
8496         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
8497         (Fixed bug #808779)
8498         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
8499         lines that --i-code-in-asm generates
8500
8501 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8502
8503         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
8504         trying to fclose a FILE* that was already closed.
8505
8506 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8507
8508         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
8509         of const struct should be treated as if const themselves)
8510
8511 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
8512
8513         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
8514
8515 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8516
8517         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
8518         Unix (/n) and DOS (/r/n) line terminations.
8519
8520 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8521
8522         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
8523         bug #613775
8524
8525 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8526
8527         * src/mcs51/gen.c (genFunction, genEndFunction),
8528         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
8529         and restore of EA so that stack offsets to parameters are
8530         correct when using both critical and reentrant/stack-auto.
8531         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
8532         size (can be triggered in error if sloc is shared between
8533         different sized objects)
8534         * device/include/float.h: fixed macros to explicitly use
8535         unsigned long where needed
8536
8537 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
8538
8539         Feature req. 799831: added code to allow nesting of critical functions
8540         * src/mcs51/gen.c (genFunction, genEndFunction)
8541         * src/ds390/gen.c (genFunction, genEndFunction)
8542
8543 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8544
8545         * src/SDCCsymt.c (sclsFromPtr),
8546         * src/SDCCsymt.h,
8547         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
8548         support for standard C idiom of memory mapped variables; for
8549         example, *((xdata int*)0x1234) = 1 is now internally equivalent
8550         to xdata int at 0x1234 tempvar = 1.
8551         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
8552         provided by Akiya ISHIDA
8553
8554 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
8555
8556         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
8557         * src/SDCCval.c (constVal): added reduction from int to char
8558         * src/SDCCval.c (valMult, valDiv): fixed sign handling
8559         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
8560         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
8561         to ignore the sign
8562         * support/regression/tests/shifts.c: fixed
8563
8564 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8565
8566         * src/z80/gen.c (genXor): Fixed bug #805445
8567
8568 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8569
8570         Fixed bug #621531 (const & volatile confusion in the type chain).
8571         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
8572         refer to the const or volatile state of the pointer itself.
8573
8574         * src/SDCCast.c
8575         * src/SDCCglue.c
8576         * src/SDCCicode.c
8577         * src/SDCCsymt.c
8578         * src/SDCCval.c
8579         * src/SDCC.y
8580         * src/SDCCsymt.h
8581         * src/pic/gen.c
8582         * src/pic/ralloc.c
8583         * src/pic16/gen.c
8584         * src/pic16/ralloc.c
8585         * support/regression/tests/const.c
8586
8587 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8588
8589         When checking for duplicated modules, use absolute paths
8590         instead of relative paths.  Files changed:
8591
8592         * as/mcs51/lklib.c
8593         * link/z80/lklib.c
8594
8595 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8596
8597         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
8598
8599 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8600
8601         * device/include/string.h: added size_t typedef, changed
8602         prototypes to use size_t, eliminated separate reentrant and
8603         non-reentrant declarations, added _memmove declaration
8604         * device/lib/_memcpy.c: changed to use size_t instead of int,
8605         changed /4 to >>2 to avoid division library call
8606         * device/lib/_memcmp.c,
8607         * device/lib/_memset.c,
8608         * device/lib/_strncat.c,
8609         * device/lib/_strncpy.c,
8610         * device/lib/_strncmp.c: changed to use size_t instead of int
8611         * device/lib/_memmove.c: new file (fixed bug #772294)
8612         * device/lib/Makefile.in: added _memmove.c
8613         * device/lib/z80/asm_strings.s: fixed bug #772290
8614         * support/regression/tests/bitfields.c: attempt to fix host assertion
8615         failure on amd64-unknown-linux2.2
8616
8617 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8618
8619         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
8620         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
8621         * as/z80/asmain.c (main): fixed bug #801766
8622
8623 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
8624
8625         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
8626         compilers
8627
8628 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8629
8630         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
8631         reported in bug #800609
8632
8633 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
8634
8635         * Top header beautifications in src/pic16 directory:
8636           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
8637           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
8638           pcoderegs.h, ralloc.c, ralloc.h
8639         * main.c: added top header and GPL license notice
8640         * pcode.c: fixed the if-conditional warning
8641
8642 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
8643
8644         * device/lib/_mullong.c: replaced int by short for gcc
8645
8646 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8647
8648         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
8649         and JUMPTABLE iCodes properly now (worked by accident before)
8650         * src/mcs51/gen.c (leftRightUseAcc),
8651         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
8652         iCode properly now. Use getSize instead of nRegs since a & b
8653         aren't part of the nRegs tally.
8654
8655 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
8656
8657         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
8658         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
8659           before instructions that use the _STATUS register
8660
8661 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
8662
8663         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
8664         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
8665         fetching of the pointer
8666         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
8667         copied from genNearPointerSet()
8668         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
8669         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
8670         If they pop r0/r1 they must be called in the opposite order than aopOp().
8671         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8672         (resp. --stack-auto), prepared for --xstack
8673
8674 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8675
8676         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8677
8678 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8679
8680         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8681         these ports have their own __sdcc_external_start()
8682
8683 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8684
8685         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8686         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8687         type for bits was changed. It resulted in bit variables becoming
8688         global, which is not permitted in PIC 14 assembly output.
8689
8690 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8691
8692         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8693
8694 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8695
8696         Z80 and MCS51 linkers complaint if a public symbol is defined
8697         in more than one library module:
8698
8699         * as/mcs51/lklib.c
8700         * link/z80/lklib.c
8701         * as/mcs51/Makefile.in
8702
8703 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8704
8705         A few small changes that speed up the peephole optimizer.
8706
8707         * src/SDCCpeeph.c
8708
8709 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8710
8711         Try to make the peephole optimizer smarter by maintaining
8712         an association between the assembly source code and the
8713         iCodes that originated them. Put this information to use
8714         with a new peephole rule condition "notVolatile" so that
8715         the rules can be aggressive yet still safe.
8716
8717         * src/SDCCpeeph.c
8718         * src/SDCCpeeph.h
8719         * src/mcs51/gen.c
8720         * src/mcs51/peeph.def
8721
8722 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8723
8724         Fixed bug #741761
8725
8726         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8727         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8728         if the left or right operand symbols have the accuse flag set.
8729
8730 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8731
8732         Changed the type of the result of the ! (NOT) operator to char;
8733         previously it returned the same type as the source. This allows
8734         us to eliminate all the genFloatNot functions (all of its target
8735         implementations were very buggy) since !float can use the same
8736         code as !long now.
8737
8738         * src/SDCCicode.c (ast2iCode): ! returns char
8739         * src/mcs51/gen.c (genNot, genNotFloat),
8740         * src/ds390/gen.c (genNot, genNotFloat),
8741         * src/z80/gen.c (genNot, genNotFloat),
8742         * src/pic/gen.c (genNot, genNotFloat),
8743         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8744
8745 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8746
8747         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8748         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8749            during interrupts. Ensure WSAVE is located at a shared bank address.
8750         2. Fixed page selection in some places
8751         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8752            the registers name strings.
8753         4. Fixed "signed / unsigned compare" compiler warnings.
8754         5. The PIC port manages its own allocation of the general purpose
8755            registers, but makes no attempt to reuse them. As a result when
8756            compiling it soon runs out of general purpose registers. Some
8757            additional code was added to the files pcode.c and device.c to walk
8758            through the function call tree and rename the registers so that they
8759            get reused.
8760
8761         * src/pic/device.c
8762         * src/pic/gen.c
8763         * src/pic/glue.c
8764         * src/pic/pcode.c
8765         * src/pic/pcode.h
8766         * src/pic/ralloc.c
8767         * src/pic/ralloc.h
8768         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8769         genPlus() & genMinus() when the result is the same as left or right
8770
8771 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8772
8773         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8774
8775 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8776
8777         Made bitfield a distinct type from bit so that bitfields
8778         convert as per ANSI C and bits retain their traditional
8779         boolean style behaviour. Implemented bitfield support in
8780         the z80 port.
8781
8782         * src/SDCCsymt.h,
8783         * src/SDCCsymt.c,
8784         * src/SDCCast.c,
8785         * src/cdbFile.c,
8786         * src/mcs51/gen.c,
8787         * src/ds390/gen.c: bit v bitfield split
8788         * src/z80/gen.c: New support for bitfields
8789         * support/regression/tests/bitfields.c: reenabled z80,
8790         added more tests
8791
8792 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8793
8794         Rules 246.x, 247.x relate to bitfields, the others speed up
8795         access to xdata mapped I/O devices.
8796
8797         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8798
8799 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8800
8801         Cleaned up genPackBits and genUnpackBits and added two helper
8802         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8803         for literal assignments in genPackBits (thanks to Frieder for
8804         reminding me).
8805
8806         * src/mcs51/gen.c
8807         * src/ds390/gen.c
8808
8809 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8810
8811         Fixed bug #748310 (pointer to function type mishandled when the
8812         function name is omitted). Also fixed a SIGSEGV when a function
8813         attribute (reentrant, etc) is used on a non-function or on a
8814         function but misplaced before the parameter list.
8815
8816         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8817         bug #748310
8818         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8819         * support/Util/SDCCerr.h,
8820         * support/Util/SDCCerr.c: Added func attr misuse error msg
8821
8822 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8823
8824         Fixed bug #787649 by anonymous
8825         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8826         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8827
8828 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8829
8830         Fixed numerous bitfield problems.
8831
8832         * src/SDCC.y: More bitfield related error checking
8833         * src/SDCCsymt.h,
8834         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8835         * support/Util/SDCCerr.h,
8836         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8837         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8838         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8839         * support/regression/tests/bitfields.c: tests added
8840
8841 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8842
8843         Made the constant following the "interrupt" keyword optional. If
8844         omitted, the function will not automatically be given an entry
8845         in the interrupt vector table (similar to #pragma NOIV, but
8846         less syntacticly kludgy). The interrupt number is also now
8847         range checked. Also fixed a bug in the high order bit example
8848         in the manual.
8849
8850         * src/SDCC.y
8851         * src/SDCCmem.c
8852         * src/SDCCglue.c
8853         * src/SDCCsymt.h
8854         * support/Util/SDCCerr.c
8855         * support/Util/SDCCerr.h
8856         * doc/sdccman.lyx
8857
8858 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8859
8860         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8861         * src/SDCCicode.c (operandOperation): rewritten some ops
8862         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8863         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8864         other type
8865         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8866         be re-activated by defining REDUCE_LITERALS)
8867         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8868         unsigned, but are signed by default
8869         * src/SDCCval.c (constVal): rearranged
8870         * src/SDCCval.c (valMod): preliminary fix
8871         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8872         * support/regression/literalop.c: added, work in progress
8873
8874 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8875
8876         Generate warnings for useless declarations like "char data;"
8877         that don't do what new users expect.
8878
8879         * src/SDCC.y
8880         * support/Util/SDCCerr.h
8881         * support/Util/SDCCerr.c
8882
8883 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8884
8885         * src/SDCCval.c (valMult): fix overflow detection of negative int
8886
8887 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8888
8889         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8890
8891         Changes to support big endian targets:
8892
8893         * src/ports.h
8894         * src/SDCCglue.c
8895         * src/avr/main.c
8896         * src/ds390/main.c
8897         * src/izt/i186.c
8898         * src/mcs51/main.c
8899         * src/pic/main.c
8900         * src/pic16/main.c
8901         * src/xa51/main.c
8902         * src/z80/main.c
8903
8904 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8905
8906         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8907         * device/lib/time.c: fixed warning "integer overflow in expression"
8908
8909 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8910
8911         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8912         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8913         constants are unsigned; added recognition of "u" flag for unsigned
8914         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8915         * src/SDCCval.c (valDiv, valMod): fixed signdness
8916         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8917         signedness of modulo, left and right shift
8918         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8919         * support/Util/SDCCerr.h: added warning W_INT_OVL
8920         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8921         * src/SDCCast.c (ast_print): improved output of constants
8922
8923 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8924
8925         Fixed some warnings when building with MSVC:
8926
8927         * as\mcs51\asdata.c
8928         * as\z80\asdata.c
8929         * as\mcs51\asm.h
8930         * as\z80\asm.h
8931         * link\z80\aslink.h
8932         * link\z80\lkdata.c
8933         * link\z80\lkeval.c
8934         * link\z80\lkgb.c
8935         * link\z80\lkihx.c
8936         * link\z80\lks19.c
8937         * link\z80\lksym.c
8938         * support\cpp2\cpplib.c
8939         * src\ds390\gen.c
8940         * src\mcs51\gen.c
8941
8942 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8943
8944         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8945
8946 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8947
8948         * support\librarian\clean.mk: Do not remove Makefile.
8949         * support\librarian\Makefile: added.
8950
8951 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8952
8953         Added librarian to MSVC build:
8954         * all.dsp
8955         * sdcc.dsw
8956         * support\librarian\librarian.dsp
8957
8958         'configure' not needed for librarian, removed:
8959         * support\librarian\configure
8960         * support\librarian\configure.in
8961         * support\librarian\config_in.h
8962         * support\librarian\Makefile.in
8963
8964         Hopefully these ones built the librarian and the rest of sdcc properly:
8965         * Makefile
8966         * Makefile.common.in
8967
8968         Messed up 'configure', so revert to previous version:
8969         * configure
8970         * configure.in
8971
8972 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8973
8974         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8975         there, while the mantissa of a double is "only" 53 bits wide.
8976
8977 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8978
8979         Adding sdcclib to the build.  MSVC project coming soon.
8980         Files added/changed:
8981
8982         * support\librarian\clean.mk
8983         * support\librarian\configure
8984         * support\librarian\configure.in
8985         * support\librarian\config_in.h
8986         * support\librarian\Makefile.bcc
8987         * support\librarian\Makefile.in
8988         * support\librarian\sdcclib.c
8989         * Makefile.bcc
8990         * Makefile
8991         * Makefile.common.in
8992         * configure
8993         * configure.in
8994
8995 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8996
8997         Linker now complaints if linked modules have conflicting options, for
8998         example, one compiled using --model-large and another one compiled with
8999         --model-small.  The following files were modified:
9000
9001         * as\mcs51\asdata.c
9002         * as\mcs51\aslink.h
9003         * as\mcs51\asm.h
9004         * as\mcs51\asmain.c
9005         * as\mcs51\asout.c
9006         * as\mcs51\i51pst.c
9007         * as\mcs51\lkdata.c
9008         * as\mcs51\lklibr.c
9009         * as\mcs51\lkmain.c
9010         * as\z80\asdata.c
9011         * as\z80\asm.h
9012         * as\z80\asmain.c
9013         * as\z80\asout.c
9014         * as\z80\z80pst.c
9015         * link\z80\aslink.h
9016         * link\z80\lkdata.c
9017         * link\z80\lklibr.c
9018         * link\z80\lkmain.c
9019         * src\SDCCglue.c
9020
9021 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9022
9023         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
9024         as/mcs51/lklibr.c: Generate a warning when a library is not found.
9025
9026 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
9027
9028         * src/z80/mappings.i: fix _mul[us][int,long] entries
9029
9030 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9031
9032         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
9033
9034 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9035
9036         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
9037         * support/regression/tests/bitopcse.c: added
9038         fixed warning:
9039         * src/avr/gen.c:
9040         * src/pic/gen.c:
9041         * src/pic16/gen.c:
9042         * src/z80/gen.c:
9043         * src/xa51/gen.c:
9044
9045 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9046
9047         added support for new library format to z80, gbz80 linkers:
9048         *link/z80/aslink.h
9049         *link/z80/lklex.c
9050         *link/z80/lklib.c
9051         *link/z80/lklist.c
9052
9053 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9054
9055         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
9056         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
9057
9058 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
9059
9060         added DUMMY_READ_VOLATILE:
9061         * src/SDCC.y:
9062         * src/avr/gen.c:
9063         * src/xa51/gen.c:
9064         * src/z80/gen.c:
9065         * src/pic/gen.c:
9066         * src/pic16/gen.c:
9067         * src/mcs51/gen.c:
9068         * src/ds390/gen.c:
9069         * src/SDCCcse.c (algebraicOpts): many improvements
9070         * src/SDCCcse.h: removed algebraicOpts()
9071         * src/SDCCicode.c (picDummyRead): added
9072
9073 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9074
9075         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
9076         "Insufficient space in data memory".
9077
9078 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9079
9080         * src/mcs51/gen.c: fixed bug #771358
9081         * src/z80/gen.c: fixed bug #759087
9082
9083 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
9084
9085         * src/pic16/glue.c: minor cleanup by Vangelis
9086
9087 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9088
9089         * device/include/regc515c.h: fixed #758477
9090         * device/lib/_gptrget.c: saving some cycles in generic pointer get
9091         * device/lib/_gptrput.c: saved a few bytes
9092         * my tab spacing is 8, yours too?)
9093         * device/lib/_ser.c: process RX bytes earlier than TX bytes
9094         * device/lib/serial.c: process RX bytes earlier than TX bytes
9095         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
9096
9097 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9098
9099         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
9100
9101 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9102
9103     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
9104
9105 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
9106
9107         * device/lib/Makefile.in: bad fix, reverted to 1.43
9108
9109 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
9110
9111         * device/lib/Makefile.in: added missing z80 object files
9112
9113 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
9114
9115         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
9116         pic16 progress by Vangelis:
9117         * src/SDCCglobl.h:
9118         * src/SDCCmain.c:
9119         * src/pic/Makefile:
9120         * src/pic:
9121         * pic/Makefile:
9122         * pic16/device.c:
9123         * pic16/device.h:
9124         * pic16/gen.c:
9125         * pic16/gen.h:
9126         * pic16/genarith.c:
9127         * pic16/glue.c:
9128         * pic16/main.c:
9129         * pic16/pcode.c:
9130         * pic16/pcode.h:
9131         * pic16/pcodepeep.c:
9132         * pic16/peeph.def:
9133
9134 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9135
9136     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
9137
9138 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9139
9140     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
9141     added gbz80 build to MSVC project.
9142     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9143     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9144     from 8051 stuff and setup so it links using a .lnk file.
9145
9146 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9147
9148     * support/librarian/sdcclib.c: sdcc librarian.
9149     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9150     with sdcclib.
9151
9152 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9153
9154     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9155
9156 2003-07-02  Borut Razem <borut.razem AT siol.net>
9157
9158         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9159         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9160         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9161         src/xa51/main.c, src/z80/main.c:
9162         virtualization of glue() function: each port has it's own glue function,
9163         which is accessed by do_glue function pointer in PORT.general structure
9164
9165 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9166
9167         * DS800C400 fun, improved ROM interface and tinibios.
9168
9169 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9170
9171         * More support for DS80C400. Now includes beginning of interface to ROM.
9172
9173 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9174
9175         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9176
9177 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9178
9179         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
9180
9181 2003-06-19  Borut Razem <borut.razem AT siol.net>
9182
9183         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
9184
9185 2003-06-19  Borut Razem <borut.razem AT siol.net>
9186
9187         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
9188         fixed Z80 port - crt0.o: cannot open.
9189
9190 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
9191
9192         * support/Util/MySystem.c (merge_command): revert bad fix
9193
9194 2003-06-18  Borut Razem <borut.razem AT siol.net>
9195
9196         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
9197
9198 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9199
9200         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9201         option --use-stdout sends errors to stdout instead of stderr.
9202
9203 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
9204
9205         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
9206
9207 2003-06-15  Borut Razem <borut.razem AT siol.net>
9208
9209         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
9210         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
9211         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
9212         fixed width array of pointers replaced with sets;
9213         multiple include and lib paths ared transferred to preprocessor and linker
9214         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
9215         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
9216         fixed width array of pointers
9217         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
9218         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
9219         fixupPath(), getPathDifference()
9220         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
9221         fixed width array of pointers
9222
9223 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
9224
9225         * src/pic16/ralloc.c: fix warnings
9226         * src/pic16/pcode.c: fix warning
9227
9228 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
9229
9230          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
9231         know all the details, but essentially this set of changes enable
9232         the pic16 port to generate movff instructions and generate assembler
9233         directives,
9234         * src/SDCCmain.c:
9235         * src/pic16/gen.c:
9236         * src/pic16/glue.c:
9237         * src/pic16/pcode.c:
9238         * src/pic16/device.c:
9239         * src/pic16/main.c:
9240         * src/pic16/pcode.h:
9241         * src/pic16/pcoderegs.c:
9242         * src/pic16/ralloc.c:
9243         * src/pic16/ralloc.h:
9244
9245 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9246
9247         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9248         added option --vc, so sdcc errors and warnings are compatible with
9249         Microsoft Visual Studio.
9250
9251 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9252
9253         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
9254           device/lib/libfloat.lib: added atof function.
9255
9256 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
9257
9258         * doc/sdccman.lyx: updated to Lyx 1.3
9259         * doc/cdbfileformat.lyx: updated to Lyx 1.3
9260         * doc/test_suite_spec.lyx: updated to Lyx 1.3
9261         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
9262
9263 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
9264
9265         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
9266
9267 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9268
9269         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
9270           additions to the "related tools/documentation" section
9271
9272 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
9273
9274         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
9275
9276 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
9277
9278         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
9279         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
9280
9281 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
9282
9283         * doc/sdccman.lyx: fix double dash and other minor things
9284         * doc/Makefile: fix double dash
9285
9286 2003-05-28  Karl Bongers(patches from Martin Helmling)
9287         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
9288           condition and ignore commands.
9289
9290 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9291
9292         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
9293           is in parts still quite out of date, I did changes as far as I felt makes sense
9294           for a non-native english speaker.
9295           Please feel free to add to the manual or to correct my changes.
9296         * doc/Makefile: undid touching the date of intermediate tex files.
9297
9298 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9299
9300         * doc/sdccman.lyx: Manual has an index now
9301
9302 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
9303
9304         Finalize muluint/mulsint and mululong/mulslong merging:
9305         * device/lib/_mulint.c
9306         * device/lib/_mullong.c
9307         * device/lib/gbz80/mul.s
9308         * device/lib/gbz80/stubs.s
9309         * device/lib/z80/mul.s
9310         * device/lib/z80/stubs.s
9311         * src/SDCCsymt.c (initCSupport)
9312
9313 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9314
9315         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
9316         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
9317           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
9318           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
9319           instead of /Zm500.
9320
9321 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9322
9323         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
9324           the regression tests I'm not brave enough to enable 245.b, 245.c
9325         * doc/sdccman.lyx: added latex preamble for hyperref package.
9326           Using pdflatex this will give you a hyperlinked pdf file with
9327           bookmarks. (prepend '%' before /usepackage if this breaks something)
9328
9329 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9330
9331          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
9332
9333 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
9334
9335         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
9336
9337 2003-05-21    <johan AT balder>
9338
9339         * src/SDCCglue.c (printIval): fixed bug #739934
9340
9341 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9342
9343         Applied patch from bug 737905 (renamed yylineo to mylineno):
9344         * src/altlex.c
9345         * src/SDCCast.c
9346         * src/SDCglobl.h
9347         * src/SDCC.lex
9348         * src/SDCCsymt.c
9349         * src/SDCCval.c
9350         * src/pic16/pcode.c: Cleaned warnings
9351         * src/pic16/pcodeflow.c: Cleaned warnings
9352         * src/pic16/pcoderegs.c: Cleaned warnings
9353
9354 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
9355
9356         * src/pic16/pcode.c: Cleaned warnings
9357         * src/pic16/pcodepeep.c: Cleaned warnings
9358         * src/pic16/ralloc.c: Cleaned warnings
9359
9360 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9361
9362         * doc/sdccman.lyx: fixed bug 739745
9363         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
9364
9365 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
9366
9367         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
9368         it can be defined with CFLAGS when running configure
9369         * src/SDCCmain.c: fixed compiling + linking with object files
9370
9371 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
9372
9373         * configure.in: configure for pic16 port,
9374             added --disable-pic16-port
9375         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
9376         * src/SDCCmain.c: linkOptions is changed to set *,
9377             added if/endif conditional macros to remove options help
9378             messages from optionsTable when a port is not configured, added
9379             support for the PIc16 port in the ports table, when executing
9380             the compiler with no port specified on command line, a default
9381             port is selected with the new macro DEFAULT_PORT which is
9382             defined in port.h, in setDefaultOptions() linkOptions is removed
9383             from initialization assignment, since now it is a set,
9384             parseCmdLine uses setParseWithComma for linkOptions, in
9385             linkEdit() linkOptions are accessed with new function indexSet()
9386             which returns the i'th item of a set variable. See SDCCset.c, in
9387             linkEdit() when calling buildCmdLine(), added linkOptions as
9388             last argument. Now users can pass arguments to gplink via the
9389             -Wl option, main() uses pic16glue() to glue up pic16 programs
9390         * src/SDCCpeeph.c: various changes to support pic16
9391         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
9392             return the i'th item of the set
9393         * src/SDCCset.h: added function prototype for indexSet()
9394         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
9395         * src/clean.mk: added pic16 in CLEANALLPORTS variable
9396         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
9397             added macro DEFAULT_PORT
9398         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
9399         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
9400             generated
9401         * src/pic16/glue.c: commented out some error producing lines
9402         * src/pic16/main.c: __config directives are commented out to stop
9403             gpasm complaining and test the linkage with gplink, _linkCmd and
9404             _asmCmd changed to be more gplink and gpasm friendly
9405         * src/pic16/peeph.def: peep rule 3 is commented out, since it
9406             produced an error when parsed, peep rule 12 is added to utilize
9407             movff, but it is commented out since the pCode does not support
9408             yet a command with 2 address arguments
9409
9410 2003-05-18    <johan AT balder>
9411
9412         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9413         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9414 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
9415
9416         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
9417   Added feature to script commands from file.
9418
9419 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
9420
9421         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
9422         * src/SDCCutil.c: include ctype.h for win32
9423
9424 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
9425
9426         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
9427
9428 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
9429
9430         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
9431   Fixed so you can set breakpoints prior to run, run does not stop
9432   on entry now.  Add tbreak.  Other enhancements and fixes for use
9433   with ddd.
9434
9435 2003-05-12  Borut Razem <borut.razem AT siol.net>
9436
9437         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
9438
9439 2003-05-11  Borut Razem <borut.razem AT siol.net>
9440
9441         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
9442         the path of bin directory, so that PATH is the only env. variable, which has to be set
9443         in case of standard installation.
9444         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
9445         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
9446         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
9447
9448 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9449
9450         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
9451         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
9452         temp files are in the port dir; clean the gen/test directory when
9453         generating new test.c
9454         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
9455         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
9456         * support/regression/tests/zeropad.c: added
9457
9458 2003-05-09    <johan AT balder>
9459
9460         * src/SDCCglue.c: fixed bug #597940
9461
9462 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
9463
9464         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9465   cache sfr, optimize next,step, fix off by one sourceline,
9466   support ddd list function.
9467         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
9468
9469 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9470
9471         * support/regression/HTMLgen.py: added compare_s2f()
9472         * support/regression/Makefile: redo 1.27
9473         * support/regression/generate-cases.py: redo 1.5
9474
9475 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
9476
9477         * support/regression/tests/float.c: workaround 33 bit hex constant
9478         * support/regression/tests/simplefloat.c: fix division for host
9479
9480 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
9481
9482         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
9483         that tame's the PIC's over-aggressive optimizer.
9484
9485 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9486
9487          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
9488          support for MSVC.
9489
9490 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
9491
9492         Initial support for DS80C400. "Hello world" runs on TINIm400
9493         (with polled I/O).
9494
9495 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
9496
9497          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9498          * Some notes on ddd usage added in debugger/README
9499          Martin Helmling adding more features and fixes for ddd GUI debugger.
9500          Code added for nexti, stepi, up, down, and other adjustments.
9501
9502 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
9503
9504         * src/pic/pCodepeep.c non-wildcard asmops are now handled
9505         * src/pic/peeph.def Added two rules to optimize carry manipulation
9506         * src/pic/* removed debug printfs
9507
9508 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
9509
9510         * debugger/mcs51/cmd.c: added header newalloc.h
9511
9512 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
9513
9514         * as/Makefile: new EXEEXT
9515         * as/z80/Makefile: remove trailing slash of BUILDIR
9516         * as/z80/clean.mk: new EXEEXT
9517         * Makefile.common.in: add to CFLAGS (and others), don't replace it
9518         * support/cpp2/Makefile.in: new EXEEXT
9519         * src/pic/glue.c (pic14emitRegularMap): fixed warning
9520
9521 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
9522
9523         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
9524         EXEEXT was introduced to fix all related problems with targets
9525         "clean", "install" and "uninstall"; a couple of further flaws
9526         especially with "clean" have been fixed too
9527         * as/mcs51/Makefile.in
9528         * as/mcs51/clean.mk
9529         * as/z80/Makefile
9530         * Makefile
9531         * clean.mk
9532         * debugger/mcs51/Makefile.in
9533         * debugger/mcs51/clean.mk
9534         * link/z80/Makefile
9535         * link/z80/Makefile.in
9536         * link/z80/clean.mk
9537         * link/Makefile
9538         * packihx/Makefile.in
9539         * packihx/clean.mk
9540         * sim/ucsim/Makefile
9541         * sim/ucsim/clean.mk
9542         * sim/ucsim/avr.src/Makefile.in
9543         * sim/ucsim/avr.src/clean.mk
9544         * sim/ucsim/s51.src/Makefile.in
9545         * sim/ucsim/s51.src/clean.mk
9546         * sim/ucsim/xa.src/Makefile.in
9547         * sim/ucsim/xa.src/clean.mk
9548         * sim/ucsim/z80.src/Makefile.in
9549         * sim/ucsim/z80.src/clean.mk
9550         * sim/ucsim/main_in.mk
9551         * sim/ucsim/packages_in.mk
9552         * sim/ucsim/gui.src/Makefile.in
9553         * sim/ucsim/gui.src/serio.src/Makefile.in
9554         * sim/ucsim/gui.src/serio.src/clean.mk
9555         * src/Makefile.in
9556         * src/clean.mk
9557         * support/cpp2/Makefile.in
9558         * support/cpp2/clean.mk
9559         * support/makebin/Makefile
9560         * support/makebin/clean.mk
9561         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
9562         * doc/sdccman.lyx: --program-suffix no longer needed
9563
9564 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
9565
9566          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
9567          Martin Helmling added support for ddd GUI debugger.
9568          Code added to display assembly, set variables, and other commands
9569          to interface to ddd.
9570
9571 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
9572
9573         * as/Makefile: fix target clean
9574         * as/clean.mk: fix target clean
9575         * as/z80/clean.mk: fix target clean
9576
9577 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
9578
9579         * Makefile.common.in: added  AT EXEEXT AT
9580         * configure.in: removed all mingw32 stuff
9581         * configure: rebuilt from configure.in
9582         * doc/sdccman.lyx: updated section "installation"
9583         * support/scripts/sdcc_mingw32: adapted to configure
9584         * support/scripts/sdcc_cygwin_mingw32: added
9585
9586 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
9587
9588         * src/pic Added object file support for the PIC port
9589         * src/pic Applied patch from Craig Franklin (this started the object file support)
9590         * src/regression Updated the PIC regression tests for object files
9591
9592 2003-04-20  Borut Razem <borut.razem AT siol.net>
9593
9594         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
9595           lklex.c: In function `getfid':
9596           lklex.c:203: warning: array subscript has type `char'
9597         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
9598           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
9599         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
9600           stack handling macros
9601
9602 2003-04-19  Borut Razem <borut.razem AT siol.net>
9603
9604         * "handling space characters in file path" task:
9605         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
9606         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
9607         * support/Util/MySystem.h: make it self-sufficient
9608         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
9609           src/z80/main.c, sdcc/as/mcs51/lklex.c:
9610           handling space characters in file path
9611         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
9612           (it will be used by assemblers, which have their own includes, e.g. gpasm)
9613         * support/Util/MySystem.c: handling space characters in executable's path
9614
9615 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
9616
9617         * as/z80/Makefile: fix permanent rebuild of z80
9618         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
9619         * support/regression/tests/bitfields.c: added Johan's bitfields.c
9620
9621 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
9622
9623         * src/SDCCopt.c: add special case optimization to replace modulo by
9624           a power of two with a bitwise AND.
9625
9626 2003-04-18    <johan AT balder>
9627
9628         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
9629
9630 2003-04-17    <johan AT balder>
9631
9632         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
9633         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
9634
9635 2003-04-13  Borut Razem <borut.razem AT siol.net>
9636
9637         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
9638         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
9639           fixed mingw problem in adl_NORMALIZE_PATH
9640
9641 2003-04-12  Borut Razem <borut.razem AT siol.net>
9642
9643         * fixed "#pragma SAVE/RESTORE can not be nested":
9644         * src/SDCC.lex: reworked pragma handling functions
9645         * sdcc/src/SDCCglobl.h: reworked stack handling macros
9646         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
9647
9648 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9649
9650         * src/SDCCutil.c (pathEquivalent): defined but not used
9651         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
9652         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
9653         * configure: rebuilt from configure.in
9654         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9655         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9656         * device/include/Makefile.in: replace sdcc_datadir
9657         * device/lib/Makefile.in: replace sdcc_datadir
9658         * Makefile.common.in: add LDFLAGS from configure
9659         * packihx/Makefile.in: use LDFLAGS
9660         * src/Makefile.in: use LDFLAGS
9661         * support/cpp2/Makefile.in: add LDFLAGS from configure
9662         * support/makebin/Makefile: use LDFLAGS
9663         * .version: bumped version number to 2.3.5
9664
9665 2003-04-12  Borut Razem <borut.razem AT siol.net>
9666
9667         * completed "different paths" task:
9668         * src/SDCCmacro.c: fixed bug in handling quotes
9669         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
9670         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9671
9672 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9673
9674         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9675
9676 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9677
9678         * ds390/gen.c ds390/peeph.def: fix bug 706781
9679
9680 2003-04-11  Borut Razem <borut.razem AT siol.net>
9681
9682         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9683
9684 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9685
9686         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9687         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9688          set - this bit used to not be set...).
9689         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9690           bad code in PIC Port
9691         * src/regression/and2.c added to test bug 609268
9692         * src/regression/Makefile added and2.c to regression test
9693
9694
9695 2003-04-08    <johan AT CP255758-A>
9696
9697         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9698         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9699         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9700
9701 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9702
9703         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9704         fix bug #487815
9705         * support/cpp2/Makefile.in: fix bug #487815
9706         * configure: rebuilt from configure.in
9707         * Makefile.common.in: docdir changed, new path suffixes
9708         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9709         * sdcc_vc_in.h: reflect changes from sdccconf.h
9710         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9711         * src/SDCCutil.h: remove BINDIR hack
9712         * doc/sdccman.lyx: update new path hierarchy
9713
9714 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9715
9716         * src/SDCCpeeph.c: added okToRemoveSLOC test
9717
9718 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9719
9720         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9721
9722 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9723
9724         * src/SDCCpeeph.c: added labelIsReturnOnly test
9725         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9726
9727 2003-04-05    <johan AT balder>
9728
9729         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9730         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9731         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9732         * src/SDCCast.c: fixed a warning
9733         * src/SDCCast.h: fixed a warning
9734         * src/SDCCicode.c (operandFromAst): fixed a warning
9735
9736 2003-04-04    <johan AT balder>
9737
9738         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9739         * src/SDCCast.c (decorateType): fixed bug #715076
9740         * src/SDCC.y: fixed bug #702907
9741
9742 2003-04-03    <johan AT balder>
9743
9744         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9745         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9746         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9747         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9748         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9749
9750 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9751
9752         * _decdptr.c: fix return values
9753         * _gptrget.c: fix return values
9754         * _gptrgetc.c: fix return values
9755         * _gptrput.c: fix return values
9756         * _mulint.c: fix return values
9757         * as/z80/Makefile: fix 'make -j' problem
9758
9759 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9760
9761         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9762         * configure.in: big cleanup, updated to autoconf 2.5x
9763         * configure: rebuilt from configure.in
9764         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9765         * sdcc_vc_in.h: reflect changes from sdccconf.h
9766         * doc/Makefile: fixed a flaw in "make install"
9767
9768 2003-04-02    <johan AT balder>
9769
9770         * src/ds390/gen.c (genCmp): no comments
9771         * src/mcs51/gen.c (genCmp): no comments
9772         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9773         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9774
9775 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9776
9777         * support/regression/generate-cases.py: place generated file in given sub directory
9778         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9779         * support/regression/Makefile: improvements for 'make -j';
9780         side effect: it's simpler and faster now
9781
9782 2003-03-31  Borut Razem <borut.razem AT siol.net>
9783
9784         * src/z80/main.c: link-{port} and as-{port} defined without path
9785         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9786
9787 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9788
9789         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9790
9791 2003-03-30  Borut Razem <borut.razem AT siol.net>
9792
9793         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9794           changed type of list parameter to set
9795         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9796         * src/port.h: changed type of do_assemble() parameter to set
9797         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9798           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9799           definition of "cppoutfilename" macro with NULL value in preProcess()
9800         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9801         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9802         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9803           replaced with set *binPathSet
9804         * shash_add() deallocates the item, if allready exsists, before adding the new one
9805         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9806
9807 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9808
9809         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9810           a nested for loop bug in the PIC port
9811         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9812           for loops
9813
9814 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9815
9816         * support/Util/dbuf.h: remove C++ stuff to make it portable
9817
9818 2003-03-28  Borut Razem <borut.razem AT siol.net>
9819
9820         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9821           literal strings in stringLiteral()
9822         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9823         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9824           to the project
9825
9826 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9827
9828         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9829
9830 2003-03-26    <johan AT balder>
9831
9832         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9833         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9834         * src/SDCCast.c (decorateType): fixed " -v < 3"
9835
9836 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9837
9838         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9839         Added Lenny Story's debug infrastructure changes:
9840         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9841         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9842         * src/cdbFile.c: added
9843         * src/SDCCdebug.c: added
9844         * src/SDCCdebug.h: added
9845         * src/SDCCast.c (createFunction)
9846         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9847         * src/SDCCmain.c (parseCmdLine, main)
9848         * src/SDCCmem.c (redoStackOffsets)
9849         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9850         * src/SDCCsymt.h
9851         * src/common.h
9852         * src/avr/gen.c (genAVRCode)
9853         * src/ds390/gen.c (gen390Code)
9854         * src/mcs51/gen.c (gen51Code)
9855         * src/pic/gen.c (genpic14Code)
9856         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9857         * src/xa51/gen.c (genXA51Code)
9858         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9859
9860 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9861
9862         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9863         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9864
9865 2003-03-22    <johan AT balder>
9866
9867         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9868
9869 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9870
9871         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9872         * doc/cdbfileformat.lyx: added, written by Lenny Story
9873         * doc/Makefile: added cdbfileformat.lyx
9874         * doc/clean.mk: added cdbfileformat.lyx
9875
9876 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9877
9878         * src/mcs51/peeph.def: fix bug #705773
9879
9880 2003-03-20    <johan AT balder>
9881
9882         An sfr/sbit can have an "at #" AND an initializer
9883         * src/SDCCsymt.c (checkSClass):
9884         * src/SDCCmem.c (allocGlobal):
9885         * src/SDCCmem.c (allocLocal):
9886         * src/SDCCast.c (createBlock):
9887
9888 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9889
9890         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9891
9892 2003-03-16    <johan AT balder>
9893
9894         Undid the hackup of const and volatile, the problem is much bigger
9895         * src/SDCC.y:1.65
9896         * src/SDCCast.c:1.171
9897         * src/SDCCglue.c:1.138
9898         * src/SDCCicode.c:1.146
9899         * src/SDCCsymt.c:1.150
9900         * src/SDCCval.c:1.65
9901
9902 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9903
9904         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9905         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9906
9907 2003-03-13    <johan AT balder>
9908
9909         Hackup const and volatile modifiers in type chains a bit:
9910         * src/SDCC.y:1.63
9911         * src/SDCCast.c:1.169
9912         * src/SDCCglue.c:1.136
9913         * src/SDCCicode.c:1.143
9914         * src/SDCCsymt.c1.146
9915         * src/SDCCsymt.h1.59
9916         * src/SDCCval.c:1.63
9917
9918 2003-03-12    <johan AT balder>
9919
9920         * src/SDCCBBlock.h: more LRH debugging junk
9921         * src/SDCCcflow.h: more LRH debugging junk
9922         * src/SDCCloop.c: more LRH debugging junk
9923         * src/SDCC.y (struct_declaration): fixed bug #697590
9924         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9925         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9926         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9927
9928 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9929         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9930         test function names must now match exactly).
9931         * src/SDCCcse.c: added special case in findCheaperOp to allow
9932         extending a short integer. Makes less awful code for bug 700121 test case.
9933
9934 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9935
9936         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9937         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9938
9939 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9940
9941         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9942         actually called (operandsNotEqual() was called for all
9943         operandsNotEqualX tests).
9944
9945 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9946
9947         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9948         with shorter literals. Fixes bug 700121.
9949
9950 2003-03-11    <johan AT balder>
9951
9952         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9953
9954 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9955
9956         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9957         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9958
9959 2003-03-10  Borut Razem <borut.razem AT siol.net>
9960
9961         * src/SDCCmain.c: pipe preprocessor's output
9962         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9963         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9964         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9965         which closes all pipes in pipeSet set
9966         * src/SDCCset.c: free deleted item in function deleteSetItem()
9967         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9968         moved from z80 to src subproject
9969         * .version: increased version number to 2.3.4
9970
9971 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9972
9973         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9974         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9975         * support/regression/ports/xa51/spec.mk: fix typo
9976
9977 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9978
9979         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9980
9981 2003-03-09  Borut Razem <borut.razem AT siol.net>
9982
9983         * src/SDCCmain.c: pipe preprocessor's output
9984         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9985         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9986         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9987         which closes all pipes in pipeSet set
9988         * src/SDCCset.c: free deleted item in function deleteSetItem()
9989         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9990         moved from z80 to src subproject
9991
9992 2003-03-09  Borut Razem <borut.razem AT siol.net>
9993
9994         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9995         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9996         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9997         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9998         * src/SDCCglobl.h: unification of WIN32 native definitions
9999
10000 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10001
10002         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
10003
10004 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10005
10006         * src/configure.in:   check for endianess (even while cross-compiling)
10007         * src/configure:      check for endianess (even while cross-compiling)
10008         * src/configure_in.h: check for endianess (even while cross-compiling)
10009         * src/avr/gen.c:        remove old endianess stuff
10010         * src/mcs51/gen.c:      remove old endianess stuff
10011         * src/ds390/gen.c:      remove old endianess stuff
10012         * src/pic/gen.c:        remove old endianess stuff
10013         * src/pic/genarith.c:   remove old endianess stuff
10014         * src/pic/glue.c:       fix endianess check
10015         * src/pic16/gen.c:      remove old endianess stuff
10016         * src/pic16/genarith.c: remove old endianess stuff
10017         * src/pic16/glue.c:     fix endianess check
10018         * src/xa51/gen.c:       remove old endianess stuff
10019         * src/z80/gen.c:        fix endianess check
10020         * src/SDCCglue.c:       fix endianess check
10021         * src/ds390/peeph.def: fix bug 700036
10022
10023 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10024
10025         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
10026         * src/configure: find appropriate data-types on host for SDCC's int and long
10027         * src/configure.in: find appropriate data-types on host for SDCC's int and long
10028         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
10029         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
10030
10031 2003-03-07    <johan AT balder>
10032
10033         Just a big NOOP:
10034                 some minor cleanups before the big shot
10035                 OP_DEFS and OP_USES now use Kevin's protection
10036                 new option --nolabelopt
10037
10038         * src/SDCCBBlock.c:
10039         * src/SDCCast.c,:
10040         * src/SDCCcflow.c:
10041         * src/SDCCcse.c:
10042         * src/SDCCicode.c:
10043         * src/SDCCicode.h:
10044         * src/SDCClabel.c:
10045         * src/SDCCloop.c:
10046         * src/SDCCmain.c:
10047         * src/ds390/ralloc.c:
10048         * src/mcs51/ralloc.c:
10049         * src/pic/ralloc.c:
10050         * src/xa51/ralloc.c:
10051         * src/z80/ralloc.c:
10052
10053 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
10054
10055         * src/pic/pcode.c (get_op): fix 64 bit warnings
10056         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
10057         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
10058         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
10059         * support/regression/tests/malloc.c: fix 64 bit warnings
10060
10061 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
10062
10063         * src/mcs51/gen.c (genMinus): fixed bug 696436
10064
10065 2003-03-02  Borut Razem <borut.razem AT siol.net>
10066
10067         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
10068
10069 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
10070
10071         * configure.in: test for mkstemp
10072         * sdccconf_in.h: add HAVE_MKSTEMP
10073
10074 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
10075
10076         * device/include/ctype.h: removed warning while using --stack-auto
10077         * device/include/malloc.h: removed warning while using --stack-auto
10078         * device/include/string.h: removed warning while using --stack-auto
10079
10080 2003-02-23  Borut Razem <borut.razem AT siol.net>
10081
10082         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
10083         because NDEBUG is defined (see man assert)
10084         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
10085
10086 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10087
10088         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
10089         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
10090
10091 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10092
10093         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
10094         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
10095
10096 2003-02-18    <johan AT balder>
10097
10098         * as/mcs51/asmain.c (asmbl): module can start with a digit
10099         * as/z80/asmain.c (asmbl): module can start with a digit
10100
10101 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
10102
10103         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
10104         * src/asm.c: fix pipe() for Mingw32
10105
10106 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
10107
10108         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
10109         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
10110         make -V work again; --c1mode reads now from stdin
10111         * doc/sdccman.lyx: added --c1mode
10112         * support/Util/SDCCerr.c: new messages for c1 mode
10113         * support/Util/SDCCerr.h: new messages for c1 mode
10114         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
10115
10116 2003-02-15    <johan AT balder>
10117
10118         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
10119
10120 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
10121
10122         * doc/sdccman.lyx: Environment variables, -o and other minor things
10123
10124 2003-02-14    <johan AT balder>
10125
10126         * src/xa51/main.c: before anyone really tries to use it :)
10127
10128         * Install doc's in share/sdcc/doc
10129         * removed some obsolete files
10130         * Do a proper make distclean and uninstall
10131         M Makefile.common.in
10132         R sdccbuild.sh
10133         M as/Makefile
10134         M device/include/Makefile.in
10135         M device/lib/Makefile.in
10136         M doc/sdccman.lyx
10137         M link/Makefile
10138         M sim/ucsim/doc/Makefile.in
10139         M src/clean.mk
10140         R src/avr/peeph.rul
10141         R src/xa51/peeph.rul
10142         M support/cpp2/Makefile.in
10143         M support/makebin/Makefile
10144
10145
10146 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10147
10148         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10149
10150 2003-02-10  Borut Razem <borut.razem AT siol.net>
10151
10152         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10153         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10154         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10155         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10156         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10157         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10158         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10159         src/z80/Makefile.bcc: Borland Makefile cleanup
10160         * as/z80/Makefile.bcc: Added Borland Makefile
10161         * support/cpp2/borland.h: Removed
10162
10163 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10164
10165         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10166         * src/SDCC.lex: new pragma NOIV
10167         * src/SDCCglobl.h: new pragma NOIV
10168         * src/SDCCmem.c: new pragma NOIV
10169
10170 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10171
10172         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10173
10174 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10175
10176         * src/SDCCmain.c: signal handling is switched off by --debug
10177         * doc/Makefile: small fix for install; use clean.mk again
10178         * doc/clean.mk: clean *.pdf and *.html too
10179
10180 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
10181
10182         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
10183         * device/lib/printfl.c: fix a ds390 bug by making it portable
10184         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
10185         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
10186         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
10187         * debugger/mcs51/cmd.c: converted multi-line string literals
10188         * sim/ucsim/globals.cc: converted multi-line string literals
10189         * src/SDCCmain.c: introduced signal handler to remove temp files
10190         * doc/Makefile: small tweaks, implement clean
10191         * doc: removed generated files
10192
10193 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10194
10195         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
10196         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
10197         Address Record is not correctly generated for DS390."
10198
10199 2003-02-02  Borut Razem <borut.razem AT siol.net>
10200
10201         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
10202         * as/mcs51/asm.h: fixed compilation with Borland C
10203         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
10204         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
10205         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
10206         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
10207         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
10208         src/z80/Makefile.bcc: delete $(LIB) only if exist
10209         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
10210
10211 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
10212
10213         * device/include/malloc.h: introduced NULL
10214         * device/include/string.h: introduced NULL
10215         * device/include/stdlib.h: introduced NULL
10216         * device/lib/_memcpy.c: removed NULL
10217         * device/lib/_strcat.c: removed NULL
10218         * device/lib/_strchr.c: removed NULL
10219         * device/lib/_strcmp.c: removed NULL
10220         * device/lib/_strcpy.c: removed NULL
10221         * device/lib/_strcspn.c: removed NULL
10222         * device/lib/_strlen.c: removed NULL
10223         * device/lib/_strncat.c: removed NULL
10224         * device/lib/_strncmp.c: removed NULL
10225         * device/lib/_strncpy.c: removed NULL
10226         * device/lib/_strpbrk.c: removed NULL
10227         * device/lib/_strrchr.c: removed NULL
10228         * device/lib/_strspn.c: removed NULL
10229         * device/lib/_strstr.c: removed NULL
10230         * device/lib/_strtok.c: removed NULL
10231         * device/lib/malloc.c: removed NULL, include own header
10232
10233 2003-02-02    <johan AT balder>
10234
10235         * 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
10236         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
10237         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
10238         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
10239         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
10240         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
10241
10242 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10243
10244         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
10245         area 'DATA'"
10246
10247 2003-02-01    <johan AT balder>
10248
10249         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
10250
10251 2003-01-31    <johan AT CP255758-A>
10252
10253         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
10254
10255 2003-01-30    <johan AT balder>
10256
10257         * src/SDCCBBlock.c: automatic bug detection
10258         * src/SDCCicode.c: automatic bug detection
10259
10260 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10261
10262         * src/SDCCglobl.h:   now --xram-size 0 works
10263         * src/SDCCmain.c:    now --xram-size 0 works
10264
10265 2003-01-29    <johan AT balder>
10266
10267         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
10268
10269 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10270
10271         * as/mcs51/aslink.h: Added options --xram-size and --code-size
10272         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
10273         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
10274         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
10275         * src/SDCCglobl.h:   Added options --xram-size and --code-size
10276         * src/SDCCmain.c:    Added options --xram-size and --code-size
10277
10278 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
10279
10280         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
10281         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
10282
10283 2003-01-27    <johan AT balder>
10284
10285         * src/SDCC.y: fixed bug #613764
10286
10287 2003-01-26    <johan AT balder>
10288
10289         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
10290         * src/SDCCsymt.h: fixed bug #673374
10291         * src/SDCCglue.c: fixed bug #661910
10292         * src/SDCCast.c: fixed bug #458099 and 673374
10293
10294 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
10295
10296         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
10297         * as/mcs51/strcmpi.h: added
10298         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
10299         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
10300         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
10301         * as/mcs51/assym.c: strcmpi -> as_strcmpi
10302         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
10303         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
10304         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
10305         * as/mcs51/Makefile.aslink: new module strcmpi
10306         * as/mcs51/Makefile.asx8051: new module strcmpi
10307         * as/mcs51/Makefil.bcc: new module strcmpi
10308         * as/mcs51/Makefile.in: new module strcmpi
10309         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
10310
10311 2003-01-26    <johan AT balder>
10312
10313         * src/SDCCglue.c: reverted back to 1.124
10314         * src/SDCCast.c: reverted back to 1.156
10315         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
10316
10317 2003-01-25    <johan AT balder>
10318
10319         * src/SDCCglue.c: A better fix for bug #661910
10320         * src/SDCCast.c: A better fix for bug #661910
10321         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
10322
10323 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10324
10325         * src/Makefile.in: remove spawn.o
10326         * src/SDCCmain.c: remove spawn.h
10327         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
10328         * src/spawn.c: removed
10329         * src/spawn.h: removed
10330         * support/regression/ports/ds390/spec.mk: link with -r
10331
10332 2003-01-24    <johan AT CP255758-A>
10333
10334         * src/ds390/gen.c (aopOp): fixed bug #667458
10335         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
10336         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
10337         (createIvalCharPtr): an ival doesn't always have a storage class anymore
10338
10339 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10340
10341         * src/mcs51/peeph.def: better assembler identation by Frieder
10342         * src/mcs51/gen.c: better assembler identation by Frieder
10343
10344 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
10345
10346         * as/z80/string.h: removed for gcc 3.2
10347         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
10348         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
10349
10350 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10351
10352         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
10353         * src/SDCCpeeph.c (replaceRule): fix bug #663503
10354         * support/regression/Makefile: separate temp files for ports
10355         * support/regression/generate-cases.py: separate temp files for ports
10356         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10357         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10358
10359 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10360
10361         * moved tinitalk to device/examples/ds390
10362
10363 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
10364
10365         * as/mcs51/lkmem.c: rflag is for DS390
10366         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
10367         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
10368                          (linkEdit): move mem- and map-files the same way as ihx-files
10369         * src/z80/main.c (_setDefaultOptions): removed --generic
10370         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
10371         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
10372         * src/pic/glue.c (picglue): --c1mode works again
10373         * src/pic16/glue.c (pic16glue): --c1mode works again
10374         * src/asm.c (printCLine): fix #660034
10375
10376 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
10377
10378         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
10379         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
10380         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
10381         * as/mcs51/lkmem (summary): better fix for sp problem
10382         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
10383         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
10384         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
10385                                               remove --stack-after-data
10386
10387 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
10388
10389         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
10390         * src/SDCCutil.c (join): ugly bug: missing '\0'
10391         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
10392
10393 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10394
10395         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
10396         * src/port.h: typo
10397         * src/pic/main.c (_asmCmd): gpasm supports -o
10398         * src/z80/main.c: more general macros
10399         * device/lib/Makefile.in: remove intermediate files
10400
10401 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10402
10403         * .version: Bumped version number to 2.3.3
10404         * src/SDCCBBlock.c: new option -o
10405         * src/SDCCglobl.h: new option -o
10406         * src/SDCCglue.c: new option -o
10407         * src/SDCCmain.c: new option -o
10408         * src/asm.c: new option -o
10409         * src/ds390/main.c: new option -o
10410         * src/pic/glue.c: new option -o
10411         * src/pic/pcode.c: new option -o
10412         * src/pic/ralloc.c: new option -o
10413         * src/pic16/glue.c: new option -o
10414         * src/pic16/pcode.c: new option -o
10415         * src/pic16/ralloc.c: new option -o
10416         * src/z80/main.c: new option -o
10417         * device/lib/Makefile.in: use -o
10418         * support/regression/ports/ds390/spec.mk: use -o
10419         * support/regression/ports/gbz80/spec.mk: use -o
10420         * support/regression/ports/mcs51/spec.mk: use -o
10421         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
10422         * support/regression/ports/z80/spec.mk: use -o
10423         * support/regression/ports/ucz80/spec.mk: use -o
10424         * support/regression/ports/xa51/spec.mk: use -o
10425         * support/regression/fwk/lib/timeout.c: fix usage string
10426
10427 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
10428         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
10429
10430 2003-01-07    <johan AT balder>
10431
10432         * src/SDCCast.c (decorateType): fixed bug #600035
10433
10434 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
10435         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
10436         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
10437         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
10438         * src/pic/pcode.c: outcommented unused variable to remove warnings
10439         * src/pic/ralloc.c: outcommented unused variable to remove warnings
10440
10441 2003-01-06    <karl AT turbobit.com>
10442         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
10443    regression tests.
10444
10445 2003-01-06    <johan AT balder>
10446
10447         * src/SDCCicode.c: fixed array add
10448
10449 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
10450         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
10451         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
10452
10453 2003-01-04    <johan AT balder>
10454
10455         * src/SDCCval.c (getNelements): fixed the initialized array of structures
10456
10457 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10458         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
10459
10460 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10461         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
10462         * support/regression/tests/bug-524697.c: fit mem usage into 8032
10463
10464 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10465         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
10466
10467 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
10468         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
10469
10470 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
10471         * src/mcs51/main.c: removed {bindir}{sep} from aslink
10472
10473 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10474
10475     * in \sdcc\as\mcs51\ changed these files in order to create an
10476     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
10477     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
10478     following files to include the previous two files: aslink.dsp,
10479     Makefile.aslink, Makefile.bcc, and Makefile.in.
10480
10481     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
10482     .adb instead of .cdb
10483
10484 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10485
10486         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
10487         value from option --iram-size.
10488
10489 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10490
10491         * \sdcc\as\mcs51\lklist.c: added boundary check before using
10492         dram[] array.
10493
10494 2002-09-18    <wiml AT hhhh.org>
10495
10496         * SDCClrange.h: exposed setFromRange() and setToRange()
10497         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
10498           packRegsForAccUse() (bug 542397)
10499         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
10500           multiple times and emitting the fetch operations more than once
10501           added aopGetUsesAcc() function to allow binary operators to
10502           fetch their operands in the correct order; made genMinus() emit
10503           compact code for X = LITERAL - Y
10504
10505 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10506         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
10507         sprintf() in line 1267.
10508
10509 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10510         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
10511         like ports.
10512
10513 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10514         Changes to aslink (All the changes are marked with 'JCF'):
10515
10516         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
10517         summary().
10518
10519         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
10520         area BSEG.  Also moves, if possible, the DATA area down into the internal
10521         ram so more space is available.
10522
10523         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
10524         sflag.
10525
10526         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
10527         not bytes.  Function summary() which creates a memory usage summary
10528         file with extension .mem.  Reports of overlaping stack and small stack
10529         size.  If the space for the stack is less than 16 bytes aslink trows a
10530         warning.
10531
10532         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
10533         the 8051.  Option 'y' for memory summary output file.
10534
10535         Changes to sdcc (All the changes are marked with 'JCF'):
10536
10537         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
10538
10539         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
10540         overlaying area for it (uses RegBankUsed[4]).
10541
10542         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
10543         bank zero as used by default.  By default aslink locates the stack
10544         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
10545         the creation of the .mem file.  Delegates the allocation of data area
10546         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
10547         the begining of the stack area to aslink.
10548
10549         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
10550         glue() in SDCCglue.c creates an area for it.
10551
10552 2002-09-03  Borut Razem <borut.razem AT siol.net>
10553         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
10554         sdcc/src/pic/glue.c:
10555         introduced atexit() handler for teporay files removal in case of
10556         errors, assertions, ...
10557
10558 2002-08-29  Borut Razem <borut.razem AT siol.net>
10559         * sdcc/support/cpp2/auto-host_vc_in.h:
10560         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
10561         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
10562         Maybe there is a similar problem with BORLANDC? It should be checked!
10563
10564         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
10565         corrected improper use of assert: the assignment to clr variable was done inside the assert.
10566         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
10567         was not executed, and the compiler (cl) launched a warning:
10568         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
10569
10570 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10571         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
10572
10573 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
10574         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
10575
10576         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10577           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
10578           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
10579           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10580           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
10581           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
10582           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
10583         - added Release configuration in VS projects
10584         - review of compiler an linker options
10585         - VC .exe files are generated in bin_vc directory, not to interfere
10586           with binaries generated from other projects (cygwin, mingw, bcc ...)
10587
10588         * sdcc/src/yacc.dsp: added
10589
10590         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
10591         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
10592         and insert the version number definitions from .version
10593
10594         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
10595
10596         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
10597         added - genarate auto-host.h using auto-host_vc_in.h as template
10598
10599         * sdcc/sdcc_vc.h,
10600         removed from CVS, generated automatically
10601
10602 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
10603         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
10604
10605 2002-08-11  Borut Razem <borut.razem AT siol.net>
10606         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
10607
10608 2002-08-10  Borut Razem <borut.razem AT siol.net>
10609         * src/SDCCmain.c (main):
10610         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
10611         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
10612         The consequence was that some temporary files were not removed.
10613
10614         * src/SDCCglue.c:
10615         unification of code in functions tempfilename() and tempfile():
10616         function tempnam() is defined in Visual Studio 6.0 and .NET
10617
10618         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
10619
10620         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10621           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
10622         - removed compiler command line option /WX: Treats all warnings as errors
10623         - update a list of source files, included into the project
10624
10625         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10626           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
10627         changed project type to Generic Project so that can be correcly converted to VS.NET project
10628
10629         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
10630
10631         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
10632
10633         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
10634
10635         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
10636         added return 0 statements after assert() to make compiler happy
10637
10638         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
10639         added newline in the def file to keep MSC compiler satisfied
10640
10641         * sdcc/src/z80/gen.c:
10642         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
10643           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
10644         - solved MSC error in function aopDump()
10645
10646         * sdcc_vc.h: define PREFIX as "\\sdcc"
10647
10648 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
10649         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
10650
10651 2002-06-22  Scott Dattalo <scott AT dattalo.com>
10652         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
10653         - Rewrote the register banking algorithm.
10654         - Added pCode live-range analysis to registers (for now, only non-used and
10655         singly-used registers optimized away)
10656
10657         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
10658
10659         * 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.
10660
10661 2002-05-10  Scott Dattalo <scott AT dattalo.com>
10662         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
10663
10664 2002-04-22  Michael Hope  <michaelh AT vroom>
10665
10666         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
10667
10668         * configure.in (DD_COPT): Added include support required for gbdk.
10669
10670         * .version: Bumped version number just to increase it.
10671
10672         * src/SDCCmain.c: Added -nostdinc to the default options.
10673
10674 2002-04-15  Michael Hope  <michaelh AT vroom>
10675
10676         * device/lib/z80/printf.c (sprintf): Added.
10677
10678         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10679
10680         * src/z80/peeph.def: Added transpose redundent load rule.
10681
10682         * src/z80/main.c: Added force callee saves for jaune.
10683
10684         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10685
10686         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10687
10688 2002-03-28  Johan Knol  <johan AT balder>
10689
10690         * src/SDCCval.c: fixed bug #532436
10691
10692 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10693         * /src/port.h:
10694         Added "char *Processor" field to the port structure.
10695
10696         * /src/SDCCmain.c:
10697         Added -p option. Allows port dependent processor to be specified.
10698
10699         * all ports:
10700         Initialized the new field char *Processor field to NULL in all ports
10701
10702         * /src/pic/*:
10703         Compiler generated registers for interrupt context saving
10704         were not getting allocated.
10705
10706 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10707
10708         * /src/SDCCast.c:
10709         Fixed left shift. Will promote the left side of a left shift
10710         if a) left shifting more than size of operand or b) when assigned
10711         to something size > size of left side
10712
10713 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10714         * src/pic/*
10715         tons of changes. Register allocation has been
10716         rewritten. Added customization for the various PICs. Flow
10717         analysis is restructured. ...
10718
10719         * src/pic/device.h:
10720         Added
10721
10722         * src/pic/device.c:
10723         Added. device.c is a PIC port hack to accomodate variations
10724         in PIC devices.
10725
10726 2002-03-13  Michael Hope  <michaelh AT vroom>
10727
10728         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10729
10730 2002-03-04  johanknol  <johanknol AT manik>
10731
10732         * /src/SDCCval.c: fixed
10733
10734         const unsigned char arr[][2] = { { 0, 1 } };
10735         t18.c:1: error: Initializer element is not constant
10736
10737 2002-03-04  bela  <bela AT manik>
10738
10739         * /device/include/mcs51reg.h:
10740         ds89c420 register definition update
10741
10742 2002-03-03    <johan AT FRIJA>
10743
10744         * support/Util/SDCCerr.c: did something, but don't no why anymore
10745
10746         * support/regression/tests/bug-524691.c: made it a little less shy
10747
10748         * src/SDCCast.c (decorateType): fixed bug #524697
10749
10750         * src/SDCCast.c: made some lineno improvements
10751
10752         * src/SDCCval.c (getNelements): changed warning to error
10753
10754         * src/SDCCglue.c (printIvalArray): changed warning to error
10755
10756         * src/SDCCicode.c: fixed a warning for mingw
10757
10758         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10759
10760         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10761
10762 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10763
10764         * src/ds390/peeph.def:
10765         Added some more peephole rules
10766
10767         * src/ds390/gen.c: Various fixes & enhancements
10768
10769         * src/SDCClrange.c, src/SDCClrange.h:
10770         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10771
10772         * src/ds390/ralloc.c:
10773         various fixes & enhancements (ds390) specific
10774
10775         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10776         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10777         from rallocs.
10778
10779         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10780
10781 2002-03-02    <johan AT FRIJA>
10782
10783         * src/SDCCast.c (decorateType): fixed bug #524708
10784
10785         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10786
10787         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10788
10789 2002-03-01  Michael Hope  <michaelh AT vroom>
10790
10791         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10792
10793         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10794
10795 2002-03-01    <johan AT FRIJA>
10796
10797         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10798
10799         * src/SDCCast.c (decorateType): fixed bug #524209
10800
10801         * src/SDCCval.c (valNot): fixed bug #524195
10802
10803 2002-02-26    <johan AT balder>
10804
10805         * src/xa51/gen.c: fixed a warning
10806
10807         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10808
10809         * src/SDCCast.c (decorateType): fixed bug #522534
10810
10811 2002-02-23    <johan AT balder>
10812
10813         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10814
10815 2002-02-22    <johan AT balder>
10816
10817         * src/SDCCast.c: fixed bug #514865
10818
10819         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10820
10821 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10822
10823         * sdcc/src/SDCCloop.c:
10824         Previous fix was not good. basic blocks that have "break" or "return" are
10825         not really partof a loop , but live ranges used in these blocks should
10826         be live thru the entire loop, so set partOfLoop but don't add them to
10827         loop region
10828
10829 2002-02-21    <johan AT FRIJA>
10830
10831         * src/SDCCcse.c: fixed bug #514308
10832
10833 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10834
10835         * src/SDCCloop.c:
10836         Fixed BUG #519583. If a conditional block ended in a return/break
10837         statement inside a loop, it was not being considered part of the loop.
10838
10839         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10840
10841 2002-02-10  Karl Bongers <karl AT turbobit.com>
10842
10843         * debugger/*:
10844         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10845         with lots of comments and notes.
10846
10847         * device/examples/test2.c:
10848         Fix bug, "red" variable not being initialized(compiler complained).
10849
10850         * device/examples/Makefile, examples/test3.c:
10851         Add Makefile in device/examples folder, compiles test3.c
10852         for use as a multiple module SDCDB test case.
10853
10854         * sim/ucsim/cmd.src/cmdset.cc:
10855         Took out debug printfs in ucsim "next" command.
10856
10857         * sim/ucsim/xa.src:
10858         Karl and Johan start ucsim XA support.  Most dissassembly working,
10859         about 75% emulation done(plenty of work remaining).
10860
10861         * sim/ucsim/z80.src:
10862         Add Z80 support to ucsim, add test-ucz80 regression test,
10863         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10864         Notice z80 compiler fails on examples/test3.c/crc code.
10865
10866 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10867
10868         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10869         Added support for --parms-in-bank1
10870
10871         * src/ds390/peeph.def:
10872         added a few more peephole optimzations
10873
10874         * src/ds390/main.c:
10875         1) added __builtin_inp & __builtin_outp used to read in data of given length
10876            from a memory mapped port
10877         2) added __builtin_memcmp
10878         3) added __builtin_swapw swap bytes of a short
10879
10880         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10881         1) handle multiple send & receives from register bank1
10882         2) ralloc can now allocate DPTR1 to some liveRanges
10883
10884         * src/SDCCsymt.c, src/SDCCsymt.h:
10885         changes to handle multiple sends & receives
10886
10887         * src/SDCCptropt.h:
10888         added some pointer arithmetic optimization
10889
10890         * src/SDCCptropt.c:
10891         added some pointer arithmetic optimizations but not stable yet so not
10892         called from anywhere (will get this working shortly)
10893
10894         * src/SDCCopt.c: fixed for multiple sends & receives
10895
10896         * src/SDCCmain.c:
10897         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10898         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10899            set preprocessor defines (depending on options)
10900
10901         * src/SDCCicode.c, src/SDCCicode.h:
10902         changes made to handle multiple sends & receives
10903
10904         * src/SDCCglobl.h:
10905         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10906
10907         * src/SDCCcse.c, src/SDCCcse.h:
10908         added function findbackward def (to be used in upcoming optimization)
10909
10910         * src/SDCCcflow.c, src/SDCCcflow.h:
10911         added function returnAtEnd - to determine if a basic block terminates with
10912         a RETURN iCode
10913
10914         * src/SDCCast.c, src/SDCCast.h:
10915         added option parms-in-bank1
10916
10917         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10918         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10919         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10920         adjusted for --parms-in-bank1 option
10921
10922         * device/include/string.h:
10923         donot redefine "reentrant" keyword
10924
10925         * device/include/ds80c390.h: Added some more SFRs
10926
10927 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10928
10929         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10930
10931 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10932
10933         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10934
10935 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10936
10937         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10938
10939 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10940
10941         * Added --xram-movc option
10942
10943 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10944
10945         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10946
10947 2002-01-11  Johan Knol
10948
10949         * Added math lib of Jesus Calvino-Fraga
10950
10951 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10952
10953         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10954         * support/regression/Makefile: new target test-mcs51-stack-auto
10955         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10956
10957 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10958
10959         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10960
10961 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10962
10963         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10964
10965 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10966
10967         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10968
10969         * src/SDCCglue.h: add definition for printIvalChar()
10970
10971 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10972
10973         * src/SDCCast.c: fix #498138 by Johan
10974
10975         * src/SDCCglue.c: fix #498138 by Johan
10976
10977 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10978
10979         * support/regression/Makefile: fix clean
10980
10981         * support/regression/ports/ds390/support.c: fix transmission of last character
10982
10983 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10984
10985         * /sdcc/src/ds390/gen.c:
10986         a) improved computing address of stack variable
10987         b) took out some #if 0 code
10988         c) improved parmBytes adjustment
10989         d) improved genPlusIncr & genMinusIncr
10990         e) genCmp could generate bad code (when left assigned to DPTR)
10991         f) Fixed bug in hasInc
10992
10993         * /sdcc/src/ds390/ralloc.c:
10994         a) packRegsForSupport could mess up live information (Fixed)
10995         b) packRegsDPTRuse could be incorrect for left & right shift
10996
10997         * /sdcc/src/mcs51/ralloc.c:
10998         packRegsForSupport could mess up the live information (Fixed)
10999
11000         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
11001
11002         * /sdcc/src/SDCCast.c:
11003         can reverse a loop even if function call is present as long
11004         as the loop control variable is local & is not passed as parameter
11005
11006 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11007
11008         * /sdcc/ChangeLog: *** empty log message ***
11009
11010         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
11011         More builtin function additions for TININative
11012
11013         * /sdcc/src/ds390/ralloc.c:
11014         Had broken the regression testsuite
11015
11016         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
11017
11018         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
11019         Added funcattr hasStackParms will be set for reentrant functions when there
11020         are paramteres on the stack, this helps in minimizing frame pointer generation
11021         typeFromStr can handle function pointers now
11022
11023         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
11024         *** empty log message ***
11025
11026 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11027
11028         * /src/ds390/gen.c, /src/ds390/main.c:
11029         More builtin function additions for TININative
11030
11031         * /src/ds390/ralloc.c:
11032         Had broken the regression testsuite
11033
11034         * /src/SDCCast.c: Fixed a bug in dumptree
11035
11036         * /src/SDCCsymt.c, /src/SDCCsymt.h:
11037         Added funcattr hasStackParms will be set for reentrant functions when there
11038         are paramteres on the stack, this helps in minimizing frame pointer generation
11039         typeFromStr can handle function pointers now
11040
11041         * /doc/builtins.txt, /doc/TININative.txt:
11042         *** empty log message ***
11043
11044
11045 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11046
11047         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
11048         ALPHA version for -mTININative
11049
11050         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
11051         updated to reflect changes in the port structure
11052
11053         * /src/port.h:
11054         added function do_assemble (similar to do_link) if non-null this function
11055         will be called to do assembly (-mTININative) requires a multi command
11056         assembly
11057         added function genAssemblerEnd will be called to generate assembler Epilogue
11058
11059         * /src/SDCCsymt.c:
11060         added _JavaNative to debug info printing
11061
11062         * /src/SDCCmain.c: added option --tini-libid
11063         added port->do_assemble function (-mTININative) has a multi command assemble
11064
11065         * /src/SDCCglue.c: Disabled "constExpr" check
11066         added port->genAssemblerEnd function
11067
11068         * /src/SDCCglobl.h: Added option --tini-libid value
11069
11070         * /src/SDCCast.h:
11071         tookout optimizeCompare from the header (has no external references)
11072
11073         * /src/SDCCast.c: made one more function "static"
11074
11075 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
11076
11077         * src/z80/mappings.i: Added z80asm support.
11078
11079         * src/z80/main.c: Added z80asm support on --asm=z80asm
11080
11081         * src/z80/gen.c: Fixed asm portability issues.
11082
11083         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
11084
11085         * src/SDCCglue.c (printExterns): Added global/extern split.
11086
11087 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
11088
11089         * support/regression/Makefile: added test for mcs51 model large
11090
11091         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
11092
11093         * support/regression/ports/gbz80/spec.mk: added -mgbz80
11094
11095 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
11096
11097         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
11098
11099 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
11100
11101         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
11102
11103         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
11104
11105 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
11106
11107         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
11108
11109         * support/regression/tests/simplefloat.c: Port to mcs51.
11110
11111 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
11112         * support/regression/tests/bug-485362.c: Added.
11113
11114         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
11115
11116         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
11117
11118         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
11119
11120         * src/z80/gen.c (aopDump): Added a dump function.
11121
11122 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
11123         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
11124
11125         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
11126
11127         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
11128
11129         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
11130
11131         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
11132
11133         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
11134
11135         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
11136
11137         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
11138
11139         * support/regression/ports/ds390/support.c: Use tinibios.
11140
11141         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11142
11143 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11144
11145         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11146         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11147
11148         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11149
11150         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11151
11152 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11153
11154         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11155
11156         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11157         (packRegsForIYUse): Created and optimised.
11158
11159 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11160
11161         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11162 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11163
11164         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11165
11166         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11167
11168         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11169
11170 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11171
11172         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11173
11174         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11175
11176 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11177
11178         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
11179
11180         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
11181
11182         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
11183
11184 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11185
11186         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
11187         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
11188         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
11189
11190         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
11191
11192         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
11193         (genNotFloat): Added.
11194         (genUminusFloat): Added.
11195
11196         * device/lib/z80/Makefile: Added floating pt stubs.
11197
11198         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
11199
11200         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
11201
11202         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
11203
11204 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11205
11206         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
11207
11208         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
11209
11210         * sdcc/support/regression/Makefile: Add port ds390.
11211
11212         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
11213
11214         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
11215
11216         * sdcc/support/regression/ports/ds390/spec.mk: Added.
11217
11218         * sdcc/support/regression/ports/ds390/support.c: Added.
11219
11220         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
11221
11222         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
11223
11224         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
11225
11226 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11227
11228         * device/include/malloc.h: Added z80 and gbz80 support.
11229
11230         * device/lib/gbz80/heap.s: Added.
11231
11232         * device/lib/z80/heap.s: Added.
11233
11234         * device/lib/malloc.c: Added z80 and gbz80 support.
11235
11236         * support/regression/tests/malloc.c (testMalloc): Added.
11237
11238         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
11239
11240         * support/regression/tests/bug-478094.c: Added.
11241
11242         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
11243
11244 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
11245
11246         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
11247
11248         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
11249
11250         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
11251
11252         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
11253
11254         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
11255
11256 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11257
11258         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
11259
11260 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
11261
11262         * support/regression/tests/bug-477927.c: Added.
11263
11264         * src/z80/peeph.def: Added minor rules.
11265
11266         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
11267
11268         * src/z80/peeph.def: Added jump optimisation modification.
11269
11270 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
11271
11272         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
11273
11274 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
11275
11276         * support/regression/tests/funptrs.c: Added.
11277
11278 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
11279
11280         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
11281
11282 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
11283
11284         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
11285
11286         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
11287
11288         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
11289         (movLeft2ResultLong): Created.
11290
11291         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
11292         (joinPushes): Added.  Joins two char pushes into a word push.
11293
11294 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
11295
11296         * support/cpp2/Makefile.in (install): Added creation of dest dir.
11297
11298         * support/makebin/Makefile (install): Added creation of dest dir.
11299
11300 2001-10-24 Karl Bongers <karl AT turbobit.com>
11301
11302         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
11303
11304 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
11305
11306         * src/z80/ralloc.c: Turned off faulty pack for one use.
11307
11308         * src/z80/peeph-gbz80.def: Removed redundent restart options.
11309
11310         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
11311
11312 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
11313
11314         * support/regression/Makefile: Improved clean
11315
11316         * support/regression/ports/gbz80/spec.mk: Added clean
11317
11318         * support/regression/ports/host/spec.mk: Added clean
11319
11320         * support/regression/ports/z80/spec.mk: Added clean
11321
11322         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
11323
11324         * support/regression/ports/mcs51/timeout.c: little improvements
11325
11326 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
11327
11328         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
11329
11330         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
11331
11332         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
11333
11334 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
11335
11336         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
11337
11338         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
11339
11340 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
11341         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
11342
11343         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
11344
11345         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
11346
11347         * src/mcs51/main.c (_linkCmd): Added bin path to command.
11348
11349         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
11350
11351         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
11352
11353         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
11354
11355         * support/regression/tests/longor.c: Added.
11356
11357 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
11358
11359         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
11360
11361         * as/mcs51/aslink.h: define PATH_MAX
11362
11363         * as/mcs51/asm.h: define PATH_MAX
11364
11365         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
11366
11367         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
11368
11369         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
11370
11371         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
11372
11373         * src/SDCCglobl.h: define PATH_MAX
11374
11375         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
11376
11377         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
11378
11379 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
11380
11381         * src/z80/gen.c (gencjneshort): Fixed
11382
11383         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
11384
11385 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
11386
11387         * support/regression/tests/bug-469671.c: Added.
11388
11389         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
11390
11391 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
11392
11393         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
11394
11395         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
11396
11397 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
11398
11399         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
11400
11401         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
11402
11403         * src/device/lib/_mullong.c : removed hint: nooverlay bug
11404
11405         * src/device/lib/_divuint.c : removed hint: nooverlay bug
11406
11407         * src/device/lib/_divulong.c: removed hint: nooverlay bug
11408
11409         * src/device/lib/_moduint.c : removed hint: nooverlay bug
11410
11411         * src/device/lib/_modulong.c: removed hint: nooverlay bug
11412
11413 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
11414
11415         * 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.
11416
11417         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
11418
11419         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
11420
11421 2001-10-07    <johan AT FRIJA>
11422
11423         * device/lib/gets.c (gets): fixed the return value.
11424
11425 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
11426         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
11427
11428         * 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.
11429
11430         * 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.
11431
11432         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
11433
11434         * src/pic/gen.c: Removed Safe_strdup.
11435
11436         * configure.in: Added option to enable libgc support.
11437
11438         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
11439         (bitVectUnion): Optimised.
11440         (bitVectIntersect): Optimised.
11441         (bitVectBitsInCommon): Optimised.
11442         (bitVectCplAnd): Optimised.
11443
11444         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
11445
11446 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11447
11448         * src/SDCCmain.c: distinguish between assembler debug and plain options
11449
11450         * src/avr/main.c:   remove standard assembler options
11451
11452         * src/ds390/main.c: remove standard assembler options
11453
11454         * src/mcs51/main.c: remove standard assembler options
11455
11456         * src/port.h: removed "PENDING" comment
11457
11458 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11459
11460         * src/device/lib/_mulint.c  : new, with assember functions
11461
11462         * src/device/lib/_mullong.c : new, with assember functions
11463
11464         * src/device/lib/_divuint.c : with assember functions
11465
11466         * src/device/lib/_divsint.c : with assember functions
11467
11468         * src/device/lib/_divulong.c: with assember functions
11469
11470         * src/device/lib/_divslong.c: with assember functions
11471
11472         * src/device/lib/_moduint.c : with assember functions
11473
11474         * src/device/lib/_modsint.c : with assember functions
11475
11476         * src/device/lib/_modulong.c: with assember functions
11477
11478         * src/device/lib/_modslong.c: with assember functions
11479
11480         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
11481
11482         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
11483
11484         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
11485                                       replaced _mululong.c and _mulslong.c by _mullong.c
11486
11487 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11488
11489         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
11490
11491 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11492
11493         * src/SDCCglue.c: test, if win32api is available for MINGW
11494
11495 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11496
11497         * src/SDCCsymt.c: no more _modifier in printTypeChain()
11498         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
11499         * support/regression/ports/gbz80/spec.mk: removed GENERIC
11500         * support/regression/ports/host/spec.mk: removed GENERIC
11501         * support/regression/ports/mcs51/spec.mk: removed GENERIC
11502         * support/regression/ports/z80/spec.mk: removed GENERIC
11503
11504 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
11505
11506         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
11507
11508         * support/regression/tests/bug-467035.c: Created.
11509
11510 2001-10-01    <johan AT FRIJA>
11511
11512         * src/SDCC.y: fixed bug #466586 part 1
11513
11514 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
11515
11516         * SDCCicode.c: z80 has no generic pointers
11517         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
11518
11519 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
11520
11521         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
11522
11523 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
11524
11525         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
11526
11527         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
11528
11529 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
11530
11531         * configure.in: Fixed up so that ucsim is only configured once.
11532
11533         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
11534
11535         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
11536         (getPathDifference): As above.
11537
11538         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
11539
11540         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
11541
11542 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
11543         * .version: Updated to 2.3.1
11544
11545         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
11546         Added copyright header.
11547
11548         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
11549         (assemble): Added support for macro based assembler commands.
11550         (linkEdit): Added support for macro based linker commands.
11551         (preProcess): Changed the pre-processor to use macros.
11552         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
11553         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
11554
11555         * device/lib/z80/crt0.s: Added module name for debugging.
11556
11557 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
11558
11559         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11560
11561         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
11562
11563         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
11564
11565         * src/Makefile.in: Added SDCCmacro and SDCCutil
11566
11567 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
11568
11569         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11570
11571 2001-09-16    <johan AT FRIJA>
11572
11573         * 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.
11574
11575 2001-09-15    <johan AT FRIJA>
11576
11577         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
11578         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
11579
11580 2001-09-11    <johan AT FRIJA>
11581
11582         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
11583
11584 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
11585
11586         * support/regression/tests/bug-460444.c: Added test case.
11587
11588         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
11589         (genCast): Added justification for all of the asserts.
11590
11591 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
11592
11593         * support/regression/support.c: _xdata replaced by xdata
11594
11595         * support/regression/spec.mk: removed _generic
11596
11597 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
11598
11599         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
11600
11601         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
11602         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
11603
11604         * src/z80/peeph.def: Added a rule to optimise shift then compare.
11605
11606         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
11607
11608         * support/regression/tests/bug-460010.c: Added test case.
11609
11610         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
11611
11612 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
11613
11614         * support/regression/Makefile: inter-port-clean adjusted for mcs51
11615
11616         * support/regression/testfwk.c: removed workaround for bug #436344
11617
11618         * support/regression/tests/bp.c: use less memory with mcs51
11619
11620         * support/regression/tests/bug-441448.c: use less memory
11621
11622         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
11623
11624         * support/regression/collate-results.py: typo
11625
11626 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
11627
11628         * support/regression/tests/fetchoverlap.c: Added new test case.
11629
11630         * support/regression/tests/bp.c: Added new test case.
11631
11632         * support/regression/tests/bug-448984.c: Added new test case.
11633
11634         * support/regression/tests/pow2shifts.c: Added new test case.
11635
11636         * src/z80/gen.c: Turned off the noise it normally generates for the release.
11637         (genlshTwo): Fixed right shift for count > 8.
11638
11639         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
11640
11641 2001-09-08    <johan AT FRIJA>
11642
11643         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
11644
11645 2001-09-07    <johan AT FRIJA>
11646
11647         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
11648
11649         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
11650
11651 2001-09-06    <johan AT FRIJA>
11652
11653         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
11654         * bernhard noted me at this: "() equals to (void)" (1.38)
11655
11656 2001-09-05    <johan AT FRIJA>
11657
11658         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
11659
11660 2001-09-04    <johan AT FRIJA>
11661
11662         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
11663
11664
11665 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
11666
11667         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
11668
11669 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
11670
11671         * link/z80/aslink.h: Fixed path for PATH_MAX
11672
11673 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11674
11675         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11676
11677         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11678
11679         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11680
11681         * 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.
11682
11683 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11684
11685         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11686         (genCmp): Fixed up genCmp for the GB with longs.
11687
11688         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11689
11690         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11691
11692         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11693
11694         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11695
11696 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11697
11698         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11699
11700 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11701
11702         * 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.
11703
11704         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11705
11706 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11707
11708         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11709
11710         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11711
11712 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11713
11714   * sim/ucsim/configure:    little improvement of Cygwin-detection
11715   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11716   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11717   * support/regression/tests/bug-221100.c: small changes for mcs51
11718   * support/regression/tests/bug-221168.c: small changes for mcs51
11719   * support/regression/tests/bug-227710.c: small changes for mcs51
11720   * support/regression/tests/staticinit.c: small changes for mcs51
11721   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11722   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11723   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11724
11725 $Revision$