* support/regression/tests/structflexarray.c: flexible array members
[fw/sdcc] / ChangeLog
1 2006-06-18 Borut Razem <borut.razem AT siol.net>
2
3         * support/regression/tests/structflexarray.c: flexible array members
4           not supported by gcc < 3
5
6 2006-06-18 Raphael Neider <rneider AT web.de>
7
8         * src/SDCCsymt.c (initCSupport): change return type of divschar to
9           int for PIC16
10         * src/pic16/genarith.c (genAddLit): sign-extend via standard routine
11           (pic16_genMinusBits): simplified sign-extension
12           (pic16_genUMult8XLit_8,pic16_genUMult8X8_8): renamed to
13             pic16_genMult8XLit_n resp. pic16_genMult8X8_n, fixed and
14             adjusted to correctly handle mixed-signed operands, disabled
15             now unused multiplciation routines
16         * src/pic16/gen.c (pic16_pushpCodeOp): fixed to handle literals
17           (assignResultValue): added argument denoting the size of the result
18             as returned by the function (fixes upcasts in assigning from
19             function calls: char foo(); int i = foo();)
20           (genCall,genPcall,genGenPointerGet,genReceive): pass size of
21             function result to assignResultValue
22           (genMult): disabled inlined multiplication code
23           (genDiv): augmented to also handle the modulus operator, fixed to
24             handle mixed-signed operands correctly
25           (genMod): simply call genDiv, disabled unused code
26           (genAssign): fixed missing (sign-)extension on result
27         * src/pic16/main.c (_hasNativeMulFor): accept literals [-128..256) as
28             valid char operands, allow signed operands for native code, added
29             division and modulo operator handling
30         * device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
31         
32         As a consequence, onebyte.c (if split into two files) and muldiv.c
33         pass regression tests.
34
35 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
36
37         * doc/Makefile.in: two runs of makeindex seem needed to get
38         correct page references in the index of sdccman.pdf 
39         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
40
41 2006-06-17 Borut Razem <borut.razem AT siol.net>
42
43         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
44
45 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
46
47         * doc/sdccman.lyx: updated, added (porting source code, debugging),
48         mentioned ec2drv and paulmon
49
50 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
51
52         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
53           consecutive abs areas
54           (find_empty_space, allocate_space): added map to handle codemap or
55            xdatamap,
56           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
57            absolute idata and xdata
58         * as/mcs51/lkmem.c (summary2): updated legend
59
60 2006-06-16 Raphael Neider <rneider AT web.de>
61
62         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
63
64 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
65
66         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
67           1208515
68         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
69
70 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
71
72         * src/port.h (struct PORT): added field gp_tags, to hold the tag
73         value of generic pointers,
74         * src/avr/main.c,
75           src/ds390/main.c,
76           src/hc08/main.c,
77           src/izt/i186.c,
78           src/izt/tlcs900h.c,
79           src/mcs51/main.c,
80           src/pic/main.c,
81           src/pic16/main.c,
82           src/xa51/main.c,
83           src/z80/main.c: PORT structure, added elements for gp_tags field,
84         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
85         fields in the PORT structure of each port,
86         * src/SDCCast.c (decorateType): allow processing of generic pointers
87         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
88         S_FIXED symbols
89
90 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
91
92         * link/z80/lkgb.c,
93         * link/z80/lkgg.c,
94         * src/pic16/gen.c,
95         * src/pic16/main.c,
96         * src/pic16/pcode.c,
97         * src/pic/main.c,
98         * src/pic/pcoderegs.c,
99         * src/SDCCicode.c,
100         * src/SDCCmain.c,
101         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
102           bug 1504689 on minGW
103
104 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
105
106         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
107
108 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
109
110         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
111
112 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
113
114         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
115           for optimization
116
117 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
118
119         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
120         to a char variable. Fixed bug #1504211
121         * device/include/pic16/adc.h,
122         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
123         and fixed bug #1364390
124
125 2006-06-10 Borut Razem <borut.razem AT siol.net>
126
127         * CVSROOT: removed the CVS left-over
128
129 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
130
131         * as/hc08/asmain.c (asexit),
132         * as/hc08/lkmain.c (lkexit),
133         * as/mcs51/asmain.c (asexit),
134         * as/mcs51/lkmain.c (lkexit),
135         * src/SDCCglue.c (DEFSETFUNC),
136         * src/SDCCmain.c (linkEdit, assemble),
137         * support/librarian/sdcclib.c (AddRel),
138           replaced unlink() by standard C remove()
139         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
140         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
141           gatherImplicitVariables): new, added to fix bug 608752,
142           (createFunction): added gatherImplicitVariables()
143         * src/SDCCast.h: added createRMW prototype
144         * src/SDCCsymt.h (struct symbol): added infertype
145         * support/regression/tests/bug608752.c: new, added
146
147 2006-06-10 Raphael Neider <rneider AT web.de>
148
149         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
150           multibyte dummy reads (fixes #1503234)
151
152 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
153
154         * device/include/mcs51/compiler.h: new, added header file to enable
155           creating common sfr definition header files for different compilers
156
157 2006-06-05 Raphael Neider <rneider AT web.de>
158
159         * src/pic16/{pcode.h,genarith.c}:
160           introduced pCodeOp combining any two pCodeOps (previously only
161           two register operands could be combined), removed pcop2 from
162           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
163         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
164         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
165           rewritten to use new PO_TWO_OPS
166         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
167         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
168           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
169           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
170           (pic16_get_op): embraced return arg to allow #define return(x),
171             added new case for combined opcodes
172           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
173           (pic16_pCode2str,pic16_getRegFrompCodeOp,
174            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
175
176 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
177
178         * src/SDCCval.c (checkConstantRange): added
179         * src/SDCCval.h: added checkConstantRange
180         * support/Util/SDCCerr.c,
181         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
182         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
183         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
184         * src/SDCCast.c (decorateType): added checkConstantRange,
185         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
186         can be emitted with the correct always true/false warning,
187         added optimization for double '!';
188         result of decorateType() must be assigned back to the tree, because
189         decorateType() can change the tree
190         * src/SDCCicode.c (geniCodeLogic),
191         (geniCodeAssign): replaced new checkConstantRange, added warnings,
192         (checkConstantRange): removed, it was only a fragment which never
193         emitted a warning
194         * src/SDCCsymt.c (computeType): fixed promotion for
195         "-1 < (unsigned bit) b"
196         * src/pic/ralloc.c (packRegsForAssign),
197         * src/pic16/ralloc.c (packRegsForAssign),
198         * src/hc08/ralloc.c (packRegsForAssign),
199         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
200         from mcs51
201         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
202         * support/regression/tests/constantRange.c: added
203         * support/valdiag/tests/constantRange.c: added
204         * support/valdiag/valdiag.py: added -DPORT_HOST=1
205
206 2006-06-02 Borut Razem <borut.razem AT siol.net>
207
208         * support/regression/ports/pic16/support.c: increase stack size
209           to 255 bytes
210         * support/regression/Makefile.in: sort tests by name so that the
211           resutlts can be compared on different machines / platforms
212
213 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
214
215         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
216         * src/ds390/gen.c (emitLabel): new, added,
217           (genDjnz): fixed stack overflow bug,
218           (throughout): cosmetic changes to sync with mcs51/gen.c,
219           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
220         * src/mcs51/gen.c (genEndFunction): small optimization,
221           (throughout): cosmetic changes to sync with ds390/gen.c
222
223 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
224
225         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
226           (_print_format): fixed printing pointers
227         * src/mcs51/gen.c (emitLabel, movb): new, added,
228           (genAssign): small optimization,
229           (genDjnz): fixed stack overflow bug,
230           (throughout): replaced sprintf with SNPRINTF,
231           replaced mcs51_regWithIdx with REG_WITH_INDEX,
232           replaced emitcode("mov", "b,...") with MOVB(...),
233           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
234           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
235         * src/mcs51/peeph.def: added rules 140 and 264
236         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
237           so they may get optimized into registers
238
239 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
240
241         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
242           immediately when encountered,
243           (printUsage): always use stderr even on windows
244
245 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
246
247         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
248         (processParms): fixed bug #1247551
249         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
250         parseCmdLine, main): print '--version' to stdout,
251         print 'help' to stdout if --help is given,
252         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
253         arguments are given; fixed --help
254
255 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
256
257         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
258         * support/regression/tests/bug-1493710.c: added
259
260 2006-05-27 Borut Razem <borut.razem AT siol.net>
261
262         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
263           static instead auto
264         * support/regression/ports/pic16/support.c: increase stack size
265           from default 64 bytes to 128 bytes
266         * support/regression/tests/staticinit.c,
267           support/regression/tests/float.c: regression tests fully enabled
268           for pic16 port by putting the initialized data arrays into the code
269           section
270         * support/regression/ports/pic16/spec.mk: don't link default libraries.
271           This was changed by mistake in the previous version.
272
273 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
274
275         * src/pic16/gen.c (genFunction, genEndFunction): some
276         beautifications, fixed bug with falsely restoring FSR2 in large
277         stack model, thanks to Beau E. Cox for reporting the bug
278
279 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
280
281         * debugger/mcs51/break.c,
282         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
283           use %p to print pointers, made address variables unsigned
284         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
285         * debugger/mcs51/symtab.c (parseSymbol): must return something
286         * src/mcs51/gen.c (aopForSym): small optimization,
287            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
288           (freeAsmop): added missing break,
289           (aopPut): removed parameter bvolatile, determine it inside the function,
290           (saveRegisters, unsaveRegisters): small optimization,
291           (genIpush): removed pointless check,
292           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
293           replaced sprintf with SNPRINTF,
294           replaced strcpy with strncpyz,
295           updated aopPut calls,
296           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
297         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
298
299 2006-05-24 Borut Razem <borut.razem AT siol.net>
300
301         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
302           modification of test for the pic16 port, put the array to the code
303           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
304
305 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
306
307         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
308         * support/Util/pstdint.h: added
309
310 2006-05-22 Borut Razem <borut.razem AT siol.net>
311
312         * src/regression/Makefile: removed bool2.c test, added -q linker option
313         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
314           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
315           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
316           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
317           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
318           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
319           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
320           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
321           define SUPPORT_BIT_TYPES 0, removed unused bit variables
322
323 2006-05-22 Raphael Neider <rneider AT web.de>
324
325         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
326           bug #1492360 (problematic due to generic pointers, see code)
327
328 2006-05-22 Borut Razem <borut.razem AT siol.net>
329
330         * support/regression/ports/pic16/specs.mk: removed stack size linker
331           directive
332         * support/regression/tests/array.c,
333           support/regression/tests/bitopcse.c,
334           support/regression/tests/bug-908454.c,
335           support/regression/tests/malloc.c: modified for pic16 regression test
336         * support/regression/tests/bitfields.c:
337           pic16 - excluded bitfileds of size > 8
338         * support/regression/tests/bp.c: pic16 - reduced data size
339         * support/regression/tests/bug-221100.c: pic16 - reduced data size
340         * support/regression/tests/bug-460010.c:
341           pic16 - used the absolute address the fits in memory
342         * support/regression/tests/bug-716242.c:
343           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
344         * support/regression/tests/float.c:
345           pic16 - excluded - data size too big
346         * support/regression/tests/onebyte.c:
347           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
348         * support/regression/tests/shifts.c:
349           pic16 - function names probably have to differ in first X characters
350           (gpasm limitation?)
351         * support/regression/tests/staticinit.c:
352           pic16 - excluded some tests due error: no target memory available for
353           section ".idata"
354
355 2006-05-22 Borut Razem <borut.razem AT siol.net>
356
357         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
358           second try. Thanks Stas Sergeev once more.
359
360 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
361
362         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
363           (genLeftShift, genRightShift): fixed bug 1491627
364         * src/hc08/peeph.def (rules 7, 8.x): added
365         * support/regression/tests/shifts.c (ShiftLeftByParam,
366           ShiftRightByParam, testShiftByParam): added to test variable shifting
367
368 2006-05-20 Raphael Neider <rneider AT web.de>
369
370         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
371         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
372           (allocReg): add only new registers to dynAllocRegs,
373           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
374             #1489055, #1445850, and probably #1483693
375
376 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
377
378         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
379         bug in for-loop that didn't emit the last of CONFIG and ID registers
380
381 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
382
383         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
384           with offset
385         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
386           1489016, 1434401 and 1490124
387         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
388           1489016, 1434401 and 1490124
389
390 2006-05-17 Borut Razem <borut.razem AT siol.net>
391
392         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
393           thanks Stas Sergeev
394
395 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
396
397         * device/include/mcs51/P89c51RD2.h,
398         * device/include/mcs51/P89LPC901.h,
399         * device/include/mcs51/P89LPC922.h,
400         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
401
402 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
403
404         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
405         to fix missing stack pragma in compiled binary object file,
406
407 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
408
409         * support/packihx/configure.in,
410         * support/packihx/configure: removed warning, autoconf >= 2.5x can
411         determine sizeof basic types even while cross compiling
412
413 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
414
415         * src/avr/gen.c (aopop),
416         * src/ds390/gen.c (aopOp),
417         * src/hc08/gen.c (aopOp),
418         * src/mcs51/gen.c (aopop),
419         * src/pic16/gen.c (pic16_aopOp),
420         * src/pic/gen.c (aopOp),
421         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
422         if size of operand is smaller than spill location
423
424 2006-05-12 Borut Razem <borut.razem AT siol.net>
425
426         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
427           have to have CR/LF line endings even if they are checked out on *nix
428           or on WIN32 in cygwin binmode
429
430 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
431
432         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
433         * device/include/ds80c390.h: added sfr16 definitions
434         * src/ds390/gen.c,
435         * src/ds390/gen.h,
436         * src/ds390/main.c,
437         * src/ds390/ralloc.c,
438         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
439           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
440           bit returning functions
441         * support/regression/tests/sfr16.c: enabled test on ds390
442
443 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
444
445         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
446         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
447
448 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
449
450         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
451         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
452           (cl_address_space constructor): removed expensive initialization,
453           (cl_address_space::get_cell): extended for late initialization,
454           (cl_address_space::*): use late initialization,
455           (cl_address_decoder::activate): removed expensive initialization,
456           This reduced regression test running time by 25%
457
458 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
459
460         * packihx/,
461         * configure.in,
462         * configure,
463         * sdcc.dsw,
464         * Makefile.bcc,
465         * Makefile.in,
466         * support/packihx/Makefile.in,
467         * support/packihx/clean.mk,
468         * support/packihx/Makefile.bcc,
469         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
470
471 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
472
473         * src/SDCCval.c (valNot): fix for regression test failure
474           of not.c on big endian hosts
475
476 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
477
478         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
479
480 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
481
482         * device/lib/mcs51/Makefile.in: changed string comparison operator
483           to = for POSIX compliance; == is bash extension
484
485 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
486
487         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
488           kosmonaut_pirx
489
490 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
491
492         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
493         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
494         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
495         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
496         bug report #1478657,
497
498 2006-05-05 Borut Razem <borut.razem AT siol.net>
499
500         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
501           making the html
502
503 2006-05-02 Borut Razem <borut.razem AT siol.net>
504
505         * doc/Makefile.in: removed *.ind dependency since there is no rule to
506           create *.ind, which made make to fail if invoked with -j 2
507
508 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
509
510         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
511           Hubert Sack for patch 1479782
512
513 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
514
515         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
516
517 2006-05-01 Raphael Neider <rneider AT web.de>
518
519         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
520           (create_pic): store only prefix-free device name,
521           (init_pic): check for device names with "16" prefix,
522           (list_valid_pics),
523         * src/pic/device.h (struct PIC_device),
524         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
525             stored device name,
526         * device/include/pic/pic12f{635,675,629,683}.h,
527         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
528         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
529         * device/include/pic/pic16f505.h,
530         * device/lib/pic/libdev/pic16f505.c: removed
531         * device/include/pic/pic14devices.txt: added support for pic12f
532             devices, removed unsupported non 16-bit devices
533             [above changes provided by patch from Zik Saleeba]
534         * src/pic/*, src/pic16/*, device/include/pic16/*,
535           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
536
537 2006-05-01 Borut Razem <borut.razem AT siol.net>
538
539         * configure.in, configure, doc/Makefile.in:
540           sync with nightly build makefile - latex, dvipdf and dvips
541           not needed any more
542
543 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
544
545         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
546         in the library source
547
548 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
549
550         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
551
552 2006-04-28 Raphael Neider <rneider AT web.de>
553
554         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
555         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
556           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
557         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
558
559 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
560
561         * device/lib/pic/libdev/Makefile.in,
562         * device/lib/hc08/Makefile.in,
563         * device/lib/gbz80/Makefile.in,
564         * device/lib/z80/Makefile.in,
565         * device/lib/ds390/Makefile.in,
566         * device/lib/ds400/Makefile.in: added srcdir to include search path,
567         thanks to Borut for the bug report
568         * configure.in,
569         * configure: always create doc/Makefile independent from --enable-doc
570         * Makefile.in: always install from directory doc independent from
571         --enable-doc
572         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
573         removed
574         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
575         * doc/Makefile.in: install *.txt if present
576         * device/include/Makefile.in (install): added installation of pic/*.inc
577         and pic/*.txt files again, they were erroneously removed
578
579 2006-04-28 Raphael Neider <rneider AT web.de>
580
581         * src/pic/{gen.c,main.h,pcode.c},
582         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
583             concerning signedness with casts
584
585 2006-04-28 Raphael Neider <rneider AT web.de>
586
587         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
588             definition of an interrupt handler,
589         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
590             interrupt handler stuff from picglue() to separate routine,
591           (picglue): enabled definition of intr handlers in files w/o main()
592
593 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
594
595         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
596           compilation with MSVC 2005 Express Edition (VC8)
597
598 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
599
600         * device/lib/Makefile: fixed build of gbz80 lib
601
602 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
603
604         * support/regression/tests/bug-460010.c,
605         * support/regression/tests/bug-524691.c,
606         * support/regression/tests/bug-716242.c: removed conditional defines
607           that are already in testfwk.h
608
609 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
610
611         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
612           (AccAXRsh1): added, shift right by 1,
613           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
614            AccAXLrl1
615         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
616
617 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
618
619         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
620         remove cast to same type
621         * src/SDCCast.c (decorateType): fix for RFE 1475742,
622         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
623         * as/z80/Makefile,
624         * link/z80/Makefile: removed, they have moved to
625         Makefile.in files
626         * configure,
627         * configure.in: replaced duplicate message about ucsim by missing sdcpp
628         * install-sh: fix bug #1204398 by setting umask 0022
629         * device/lib/Makefile: separate build of z80 and gbz80 lib
630
631 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
632
633         Enabled VPATH feature: changed nearly all Makefiles (149 files).
634         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
635
636         One basic decision: e.g. src/clean.mk includes further files. In order
637         to make this work there are two solutions:
638         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
639           run configure on them. This way they can use
640           'include $(srcdir)/port-clean.mk'
641         - always include clean.mk by the Makefile at the same level. To avoid
642           that `make clean` tries to include and build Makefile.dep the
643           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
644           implemented, because now even `make uninstall` doesn't create
645           Makefile.in. clean.mk could be eliminated by pasting it in
646           Makefile.in.
647
648         * debugger/mcs51/Makefile.in: build own objects from library sources
649         (SLIB, SDCC) in current directory
650
651         * configure, configure.in: renamed --disable-device-lib-build in
652         --disable-device-lib; added --enable-doc, the required tools are
653         searched by configure; added result message; the toolchain for the
654         belonging ports are now only built, if the port is enabled.
655
656         * support/regression/*: all output is written in directory gen, because
657         the fwk and ports directories don't livet in the build tree using vpath
658
659         * doc/sdccman.lyx: renamed --disable-device-lib-build to
660         --disable-device-lib, added --enable-doc, added section VPATH
661
662         * sim/ucsim/configure.in,
663         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
664         z80 are enabled by default
665
666 2006-04-24 Raphael Neider <rneider AT web.de>
667
668         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
669             to config word, "pic14_"-prefixed some extern functions
670           (pic14_emitConfigWord): emit __config directive(s) if assignment to
671             config word has been found
672         * src/pic/device.h: added prototypes
673         * src/pic/pcode.c: added "pic14_"-prefix where needed
674         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
675             fixup
676         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
677             words,
678           (pic14emitRegularMap): ignore config words,
679           (pic14createInterruptVect): moved generating __config directives away
680           (picglue): have __config directives emitted
681
682 2006-04-24 Borut Razem <borut.razem AT siol.net>
683
684         * doc/Makefile: sync with nightly build makefile
685
686 2006-04-24 Raphael Neider <rneider AT web.de>
687
688         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
689             registers that have not been assigned proper liveranges,
690             fixes #1469504 and #1474602,
691           (pCodeRegOptimizeRegUsage): fixed typo in comment
692
693 2006-04-24 Borut Razem <borut.razem AT siol.net>
694
695         * device/examples/main8051.c: deleted - it was removed from CVS
696           24.mar.2000 and after that modified 18.feb.2001, so it reappered
697           after the transition to Subversion
698         * src/SDCCalloc.h: deleted - it was removed  from CVS
699           3.feb.2001 and after that modified 18.feb.2001, so it reappered
700           after the transition to Subversion
701         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
702           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
703           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
704           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
705
706 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
707
708         * as/asx8051.dsp: added mcs51/strcmpi.h
709         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
710         * as/hc08/aslink.h: updated lnksect prototype
711         * as/hc08/asm.h,
712         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
713         * as/hc08/asmain.c,
714         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
715           (newdot): handle A_ABS
716         * as/hc08/asout.c,
717         * as/mcs51/asout.c (outarea): output address
718         * as/hc08/lkaomf51.c,
719         * as/mcs51/lkaomf51.c: disabled unused array UsageType
720         * as/hc08/m08pst.c,
721         * as/mcs51/i51pst.c,
722         * as/z80/z80pst.c: "ABS" is not A_OVR
723         * as/hc08/lkarea.c (newarea): read a_addr,
724           (lnkarea): added codemap array, sort absolute areas to the front,
725            combine all GSINITx/GSFINAL,
726           (find_empty_space, allocate_space): new functions,
727           (lnksect): return next address, handle absolute sections
728         * as/mcs51/lkarea.c (newarea): read a_addr,
729           lnksect2 prototype changed,
730           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
731           (find_empty_space, allocate_space): new, factored out of lnksect2,
732           (lnksect2): return next address, handle absolute sections
733         * as/hc08/lkhead.c,
734         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
735         * as/hc08/lklibr.c (addfile, fndsym),
736         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
737           index out of range and detect both '\' and '/'
738         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
739         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
740           regression tests (ds390 cannot return bool yet)
741         * doc/sdccman.lyx: changed version number, document changed --no-peep,
742           document critical interrupts on z80, document changed SDCC define
743         * src/asm.c (_asxxxx_mapping): fixed .org directive,
744           (_a390_mapping): added .org directive
745         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
746           (genMultOneByte): fixed warnings
747         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
748           ones
749         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
750         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
751           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
752         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
753         * src/pic16/main.c: removed newReg prototype
754         * src/pic16/pcode.c,
755         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
756           warnings
757         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
758           ones
759         * src/pic16/ralloc.c
760         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
761           to fix warnings
762         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
763           from short to PIC_OPTYPE
764         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
765         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
766           optype from short to PIC_OPTYPE
767         * src/port.h: made int_size unsigned to fix warnings
768         * src/SDCC.y: fixed warning on MSVC
769         * src/SDCCicode.c (getArraySizePtr): return unsigned int
770         * src/SDCCopt.c (convertToFcall): fixed warnings
771         * src/SDCCsymt.h: removed double prototype for genSymName
772         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
773           offset int to fix warnings
774
775 2006-04-22 Borut Razem <borut.razem AT siol.net>
776
777         * doc/sdccman.lyx, */Makefile, */Makefile.in:
778           references to CVS replaced with Subversion
779
780 2006-04-21 Borut Razem <borut.razem AT siol.net>
781
782         * doc/sdccman.lyx, */Makefile, */Makefile.in:
783           references to CVS replaced with Subversion
784
785 2006-04-19 Borut Razem <borut.razem AT siol.net>
786
787         * src/version.awk: adapted for svn
788         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
789           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
790           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
791           /binutils-avr/etc/*.vi, *.jin: removed all properties
792           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
793
794 2006-04-19 Borut Razem <borut.razem AT siol.net>
795
796         * CVS to Subversion migration completed
797
798 2006-04-18 Borut Razem <borut.razem AT siol.net>
799
800         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
801           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
802
803 2006-04-17 Borut Razem <borut.razem AT siol.net>
804
805         * device/include/Makefile.in: added pic/*.inc to the installation
806
807 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
808
809         * support/regression/collate-results.py: fixed output in case of
810         a valdiag error
811         * support/regression/generate-cases.py: fixed splitting of pathnames
812         with dots
813         * as/hc08/lklibr.c (addfile),
814         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
815
816 2006-04-11 Raphael Neider <rneider AT web.de>
817
818         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
819         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
820         * src/pic16/pcode.c (assignValnums): fixed #1460578
821
822 2006-04-11 Raphael Neider <rneider AT web.de>
823
824         * device/lib/pic/libdev/*.c,
825         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
826           fixes #1468739, enables compilation in --std-c99 mode
827         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
828
829 2006-04-11 Raphael Neider <rneider AT web.de>
830
831         * src/pic/device.c (find_device): removed debug output
832           (list_valid_pics): enabled verbose listing of supported devices
833         * device/include/stdbool.h: define bool as char for pic14/16 as well
834
835 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
836
837         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
838
839 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
840
841         * .version: bumped version to 2.5.6
842         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
843
844 2006-04-06 Raphael Neider <rneider AT web.de>
845
846         * .version: bumped version to 2.5.6 (pic14 ABI changed)
847         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
848         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
849           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
850             pic14_constructAbsMap
851           (pic14printPublics): declare absolute global symbols as global
852           (pic14createInterruptVect),
853         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
854           (newReg): assume new registers unused, use correct name in
855             hashtable (reg->name instead of name), more debugLog output
856         * src/pic/device.h (PIC_device): added fields for verbose output
857         * src/pic/device.c: moved device definition to pic14devices.txt,
858             added routines for runtime parsing of pic14devices.txt,
859             added support for second config word
860         * src/pic/main.c (_process_pragma): removed #pragma maxram,
861           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
862           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
863           (_pic14_parseOptions): moved pCodeInitRegisters here
864           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
865         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
866           (pCodeInitRegisters): rewrapped comments, perpared new approach to
867             handling the pseudo stack
868         * device/lib/Makefile.in: ignore failures in objects-pic16,
869         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
870         * device/lib/pic/NEWS: document new dependency on picXXX.lib
871         * device/lib/pic/Makefile.subdir,
872         * device/lib/pic16/Makefile.subdir: improved clean rules
873         * device/lib/pic/libdev/: NEW, pic14 device libraries
874         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
875         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
876         * device/include/Makefile.in: create subdir and install pic14 headers
877         * device/include/pic/p16f_common.inc: removed unused declarations
878         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
879             PICs from inc2h.pl v1.6,
880             replaced BIT_AT macros with struct declarations
881         * device/include/pic/pic14devices.txt: definition of supported devices,
882             all above improvements contributed by Zik Saleeba, thanks
883         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
884         * support/scripts/sdcc.nsi: also install pic14 device libraries and
885             headers
886
887 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
888
889         * device/include/mcs51/c8051f410.h: added interrupt numbers,
890         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
891           thanks to Charles Olds
892
893 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
894
895         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
896
897 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
898
899         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
900         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
901         * support/regression/bug1464657.c: added, new test
902
903 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
904
905         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
906           version number
907
908 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
909
910         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
911           --no-peep and --peep-file <file> are used don't use default rules but
912           do use the <file>
913
914 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
915
916         * src/mcs51/gen.c (genCall): fixed bug 1457608
917
918 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
919
920         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
921         changes seem to cause (trigger?) problems with the build system.
922
923 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
924
925         * src/SDCCpeeph.c (operandsLiteral): new, added,
926           (callFuncByName): inserted operandsLiteral
927         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
928
929 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
930
931         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
932         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
933
934 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
935
936         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
937           implemented patch 1120823 Thanks to Willy De la Court (normal
938           interrupts need an interrupt number now if they are made critical),
939           and enabled nesting of critical functions though not for gbz80
940           (genCritical, genEndCritical): added functions
941           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
942         * src/z80/mappings.i: added "ei" to all mappings
943
944 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
945
946         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
947         submitted by the Debian SDCC maintainer Aurelien Jarno:
948         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
949         archive with gcc 4.1 on mips and wrote the patch"
950
951 2006-03-16 Raphael Neider <rneider AT web.de>
952
953         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
954           the left operand is shorter than the result (c* = lit-c* + int),
955           fixes bug #1450796
956         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
957           OP_SYMBOL
958
959 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
960
961         * src/.version: increased version number to 2.5.5
962         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
963         linking is done manually in pic16 port's _linkEdit,
964         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
965         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
966         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
967         allocate asmop as AOP_ACC,
968         (aopForRemat): added parameter 'bool result' in function declaration,
969         (pic16_aopGet): return AOP_ACC when accessing WREG,
970         (pic16_popGetTempReg): minor modification,
971         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
972         'pic16_allocWithIdx',
973         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
974         calling function in absolute addresses,
975         (genAssign): take into account AOP_ACC asmop,
976         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
977         * src/pic16/pcoderegs.c: some debug functions and lines added,
978         * src/pic16/ralloc.c (decodeRegType): added but commented out,
979         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
980         register too,
981         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
982         call to allocReg, not by manually allocating a new one,
983         (pic16_assignRegisters): now before going through the register
984         allocating functions mark all registers as free. This eliminates some
985         side effects resulting from peephole parser done earlier in the backbone
986
987 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
988
989         * src/SDCCicode.c (geniCodeLogic),
990         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
991
992 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
993
994         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
995           (genSend): bugfix, do not allocate and free twice,
996           (shiftRLong): handle partially overlapping aops
997         * support/regression/tests/bitopcse.c: fixed warning redefined idata
998
999 2006-03-08 Borut Razem <borut.razem AT siol.net>
1000
1001         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
1002           for pic16
1003
1004 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
1005
1006         * support/regression/tests/bug1409955.c: new, added
1007         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
1008         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
1009           (aopForSym, aopOp): increment asmop.allocated if reused,
1010           (freeAsmop): decrement asmop.allocated and check for zero instead of
1011           using asmop.freed,
1012           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
1013           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
1014            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
1015            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
1016            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
1017            genSignedRightShift, genRightShift, genDataPointerGet,
1018            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
1019            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
1020             in reverse order from allocation,
1021           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
1022             added swappedLR to keep track
1023         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
1024           pdata & code for GCC, z80, gbz80 & hc08
1025         * support/regression/tests/zeropad.c: moved defines to testfwk.h
1026
1027 2006-03-08 Raphael Neider <rneider AT web.de>
1028
1029         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
1030
1031 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
1032
1033         * device/include/mcs51/c8051f410.h: new SiLabs mcu
1034         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
1035         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
1036
1037 2006-03-06 Borut Razem <borut.razem AT siol.net>
1038
1039         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
1040           made the linker quiet
1041
1042 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1043
1044         * src/pic16/gen.c (genPcall): fixed bug #1443644
1045         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
1046         which dumps before the function entry point a data byte which represents
1047         the number of the local variables used by the specified function, added
1048         'xinst' for initial support for Extended Instruction Support,
1049         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
1050         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
1051         port->fun_prefix anymore (may change later),
1052         (genFunction, genEndFunction): do not store/restore local registers for
1053         _main (this should take care the --main-return command line option in
1054         the future),
1055         (genOr): removed some legacy pic-port instructions,
1056         * src/pic16/genarith.c (genAddLit): re-enabled old code because
1057         performing operations with SFR's causes data to be written more than
1058         once to each SFR. Perhaps SFRs should be handled in special cases...
1059         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
1060         pcode.h
1061         * src/pic16/main.c (_process_pragma): stack bound checking did not take
1062         into account for stack starting position,
1063         (struct OPTIONS pic16_optionsTable): added command line argument
1064         --extended or -y for Extended Instruction Support,
1065         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
1066         (deassignLRs): *** perhaps the most important change, old 'for' code
1067         (commented out for reference), didn't account for some registers which
1068         were left marked 'not free' after a pointer operation. The change
1069         reduces register usage a lot in some cases
1070
1071 2006-03-04 Borut Razem <borut.razem AT siol.net>
1072
1073         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
1074           _clean
1075         * support/regression/tests/bug-524697.c: decreased array size for
1076           mcs51 to fit into the internal RAM
1077         * support/regression/Makefile.in: a little bit more verbose
1078
1079 2006-03-03 Borut Razem <borut.razem AT siol.net>
1080
1081         * support/regression/fwk/lib/testfwk.c,
1082           support/regression/fwk/include/testfwk.h: introduced function
1083           _prints(), nonrecursive _printn(), call _initEmu() from main()
1084         * support/regression/ports/gbz80/support.asm,
1085           support/regression/ports/ucz80/support.asm,
1086           support/regression/ports/z80/support.asm,
1087           support/regression/ports/ds390/support.c,
1088           support/regression/ports/hc08/support.c,
1089           support/regression/ports/host/support.c,
1090           support/regression/ports/mcs51/support.c,
1091           support/regression/ports/xa51/support.c: added empty _initEmu()
1092           function
1093         * support/regression/ports/pic16/gpsim.cmd,
1094           support/regression/ports/pic16/spec.mk,
1095           support/regression/ports/pic16/support.c,
1096           support/regression/Makefile.in: added pic16 regression test
1097
1098 2006-03-01 Raphael Neider <rneider AT web.de>
1099
1100         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
1101           genConstPointerGet): use safe way of generating MOVFF to cover
1102             literals as well as registers, fixes bug #1440527
1103         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
1104             dereference
1105           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
1106             more correctly, fixes bug #1232186
1107           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
1108         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
1109             gplink guess the correct processor in more cases, applied patch
1110             from Till Riedel attached to and fixing bug #1436552
1111
1112 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1113
1114         * support/regression/tests/array.c: added, contains check for #1434401
1115         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
1116
1117 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
1118
1119         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
1120         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
1121         * device/include/mcs51/c8051f326.h,
1122         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
1123         * device/include/mcs51/c8051f000.h,
1124         * device/include/mcs51/c8051f018.h,
1125         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
1126           PCON_IDLE,PCON_STOP and added sfr16 definitions
1127
1128 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1129
1130         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
1131           genGetWord): fixed bug 1409955
1132
1133 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1134
1135         * device/include/hc08/mc68hc908gp32.h,
1136         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
1137
1138 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
1139
1140         * src/SDCCast.c (constExprValue): return NULL if not a value
1141         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
1142         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
1143         * support/regression/tests/bitfields.c: enabled signed bitfield for all
1144
1145 2006-02-13 Borut Razem <borut.razem AT siol.net>
1146
1147         * src/regression/ptrarg.c: added, fails due to bug #1430967
1148         * src/regression/Makefile: ptrarg.c added, ...
1149
1150 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
1151
1152         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
1153         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
1154
1155 2006-02-11 Borut Razem <borut.razem AT siol.net>
1156
1157         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
1158           print "Processor: xxx" message to stdout only if --verbose
1159
1160 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1161
1162         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
1163         * support/regression/tests/bug1426356.c: added
1164         * support/regression/tests/bitfields.c: removed 2 tests
1165
1166 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1167
1168         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
1169         * device/include/mcs51/c8051f330.h,
1170         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
1171           PCON_IDLE,PCON_STOP and added sfr16 definitions
1172         * device/lib/_divsint.c,
1173         * device/lib/_divuint.c,
1174         * device/lib/_divulong.c,
1175         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1176           register bank bug for small stackauto
1177
1178 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1179
1180         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1181
1182 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1183
1184         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1185         * all.dsp: corrected several bin paths
1186         * device/include/mcs51/c8051f120.h,
1187         * device/include/mcs51/c8051f300.h,
1188         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1189           to PCON_IDLE,PCON_STOP
1190         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1191         * device/lib/printf_large.c (output_float): fixed bug 1388703
1192         * support/regression/tests/bug1057979.c: added test for bug 1388703
1193
1194 2006-02-08 Raphael Neider <rneider AT web.de>
1195
1196         * src/pic/pcode.c (pciTRIS): fixed typo,
1197           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1198           (LinkFlow): fixed handling of flows that end in a call,
1199           (ReuseReg): perform safety check earlier
1200         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1201             to work with flows at the beginning of a pBlock,
1202             fixes #1426557 (Symbol not previously defined),
1203           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1204             usage information
1205           (RemoveUnusedRegisters): update register usage info
1206         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1207             created, reuse existing ones instead
1208         * src/pic/gen.c (genPcall): fixed #1424719
1209
1210 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1211
1212         * link/z80/lkmain.c,
1213         * link/z80/lklex.c,
1214         * link/z80/lkdata.c,
1215         * link/z80/aslink.h: fixed build on current cygwin:
1216         replaced getline() by lk_getline()
1217
1218 2006-02-01 Borut Razem <borut.razem AT siol.net>
1219
1220         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
1221           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
1222           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
1223           src/regression/bool1.c, src/regression/bool2.c,
1224           src/regression/bool3.c, src/regression/call1.c,
1225           src/regression/compare.c, src/regression/compare10.c,
1226           src/regression/compare2.c, src/regression/compare3.c,
1227           src/regression/compare4.c, src/regression/compare5.c,
1228           src/regression/compare6.c, src/regression/compare7.c,
1229           src/regression/compare8.c, src/regression/compare9.c,
1230           src/regression/configword.c, src/regression/for.c,
1231           src/regression/inline.c, src/regression/mult1.c,
1232           src/regression/nestfor.c, src/regression/or1.c,
1233           src/regression/pointer1.c, src/regression/ptrfunc.c,
1234           src/regression/rotate1.c, src/regression/rotate2.c,
1235           src/regression/rotate3.c, src/regression/rotate4.c,
1236           src/regression/rotate5.c, src/regression/rotate6.c,
1237           src/regression/rotate7.c, src/regression/string1.c,
1238           src/regression/struct1.c, src/regression/sub.c,
1239           src/regression/sub2.c, src/regression/switch1.c,
1240           src/regression/while.c, src/regression/xor.c,
1241           src/regression/create_stc, src/regression/simulate,
1242           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
1243           regression tests
1244         * src/regression/gpsim_assert.h: added
1245
1246 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
1247
1248         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
1249         ((void (code *) (void)) 0) ();
1250         * as/hc08/aslex.c,
1251         * as/hc08/aslink.h,
1252         * as/hc08/asm.h,
1253         * as/hc08/asmain.c,
1254         * as/hc08/lkdata.c,
1255         * as/hc08/lklex.c,
1256         * as/hc08/lkmain.c,
1257         * as/mcs51/aslex.c,
1258         * as/mcs51/aslink.h,
1259         * as/mcs51/asm.h,
1260         * as/mcs51/asmain.c,
1261         * as/mcs51/lkdata.c,
1262         * as/mcs51/lklex.c,
1263         * as/mcs51/lkmain.c,
1264         * as/z80/aslex.c,
1265         * as/z80/asm.h,
1266         * as/z80/asmain.c: fixed build on current cygwin:
1267         replaced getline() by as_getline()
1268
1269 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
1270
1271         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
1272         declarator in the symbol chain
1273         * src/SDCCsymt.h,
1274         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
1275         parameter list for function pointers
1276         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
1277         * support/regression/tests/bug-716242.c: added
1278
1279 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
1280
1281         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
1282         offset if possible
1283         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
1284
1285 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
1286
1287         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
1288         inifinitely recurseable, added static
1289         * support/regression/tests/bug-1408066.c: added
1290
1291 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
1292
1293         * src/SDCCicode.h,
1294         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
1295         renamed, added possibility to create "postLoopLbl"-labels
1296         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
1297         newiTempLoopHeaderLabel
1298         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
1299         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
1300         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
1301         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
1302         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
1303         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
1304         (basicInduction): fixed bug #136564, made static,
1305         (loopInduction): changed parameter of basicInduction, made static,
1306         (addPostLoopBlock): added
1307         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
1308         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
1309         findLoopEndSeq
1310         * support/regression/tests/bug-136564.c: added
1311         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
1312         --std-sdcc99 to LIBSDCCFLAGS
1313
1314 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
1315
1316         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
1317         while loop
1318         * support/regression/tests/bug-1406131.c: added
1319
1320 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
1321
1322         * src/SDCCast.c (decorateType): fix promotion of unary minus
1323         * src/SDCCsymt.c (computeType): beautified
1324         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
1325         (valUnaryPM, valComplement): fix sign and promotion,
1326         (valNot): ANSI: result type is int (SDCC: unsigned char)
1327         * support/regression/tests/uminus.c: speedup by removing superflous
1328         test case 'int'
1329         * support/regression/tests/onebyte.c: added promotion and signedness
1330         tests for unary minus
1331         * support/regressions/tests/bug-477927.c: disable warning about
1332         uninitialized variables
1333         * support/regression/tests/not.c: added
1334
1335 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
1336
1337         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
1338         * src/mcs51/gen.c (gen51Code): show final register usage after
1339         fillGaps in asm with --i-code-in-asm
1340         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
1341         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
1342         incUsed, rliveClear, adjustIChain): made static,
1343         (setFromRange): excluded because it's unused,
1344         (findPrevUseSym, markWholeLoop): added,
1345         (findPrevUse): rewritten; fixes bug 895992; now a complete search
1346         through all branches of predecessors enables sdcc to emit the warning
1347         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
1348         (rlivePoint): made static, added parameter emitWarnings which is only
1349         true during the first run out of two,
1350         (findRecursiveSucc, findRecursivePred): removed,
1351         (computeLiveRanges): made static, added parameter emitWarnings,
1352         (dumpIcRlive): added for debugging only
1353         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
1354         removed prototype of setFromRange()
1355         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
1356         in call of computeLiveRanges()
1357         * support/regression/tests/bug-895992.c: added
1358         * support/regression/tests/bug-971834.c: added
1359         * support/valdiag/tests/bug-895992.c: added
1360         * support/valdiag/tests/bug-971834.c: added
1361
1362 2005-12-18 Raphael Neider <rneider AT web.de>
1363
1364         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
1365           (genUnpackBits): improved code for direct operands,
1366           (genPackBits): improved code for literal assignment to bitfields
1367             and for direct destination operands (no FSR indirection),
1368             prevented redundant AND, fixes #1362800,
1369           (AccLsh): added parameter to disable masking of the result
1370         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
1371           skip instructions with side-effects (like incfsz),
1372           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
1373         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
1374         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
1375           fixes #1375263
1376
1377 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
1378
1379         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
1380         volatile variables as spill location
1381
1382 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
1383
1384         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
1385         replacing literals
1386         * support/regression/tests/bug-1376320.c: added
1387
1388 2005-12-08 Raphael Neider <rneider AT web.de>
1389
1390         * src/pic/device.c: renamed is_shared to pic14_is_shared
1391         * src/pic/gen.c (genIfx): re-enabled handling of sbits
1392         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
1393           (is_valid_identifier): added for above workaround
1394
1395 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
1396
1397         * device/lib/Makefile.in: fixed to enable port-specific-objects
1398         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
1399           char, thanks Hubert Sack
1400         * doc/sdccman.lyx: documented --xstack-loc,
1401           elaborated a bit more on interrupts and pitfalls,
1402           removed "setjmp/longjmp unsupported",
1403           documented some unsupported C99 features
1404         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
1405         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
1406           if, thanks Hubert Sack
1407         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
1408         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
1409           make make_library
1410         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
1411           regression tests can report resource usage (rfe 700441)
1412         * support/regression/collate-results.py: report resource usage
1413         * support/regression/ports/ds390/spec.mk,
1414         * support/regression/ports/hc08/spec.mk,
1415         * support/regression/ports/mcs51/spec.mk,
1416         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
1417         * support/regression/ports/ds390/uCsim.cmd,
1418         * support/regression/ports/hc08/uCsim.cmd,
1419         * support/regression/ports/mcs51/uCsim.cmd,
1420         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
1421         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
1422           library, use the default one
1423         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
1424           building the library
1425
1426 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
1427
1428         * config.dsp: added dependency on .version and configure_vc.awk
1429         * device/include/setjmp.h: updated for --stack-auto and --xstack
1430         * device/include/mcs51/at89c51snd1c.h: corrected line endings
1431         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
1432         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
1433         * device/lib/libsdcc.lib: added _setjmp
1434         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
1435           (decorateType): fixed bug 1372851,
1436           (optimizeGetHbit): fixed warning
1437         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
1438           array initialisation
1439         * support/regression/tests/bug1057979.c: added test for bug 1358192
1440         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
1441
1442 2005-12-03 Borut Razem <borut.razem AT siol.net>
1443
1444         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
1445           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
1446
1447 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1448
1449         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
1450         createIval): implement symbol independant "flexible array member",
1451         (createIvalCharPtr): implemented flexible array initialisation with a
1452         string
1453         * src/SDCCsymt.c (copyStruct): removed,
1454         (getSize): fixed misleading comment,
1455         (getAllocSize): removed, the additional allocation size is now in
1456         sym->flexArrayLength,
1457         (checkStructFlexArray): new, syntax checks for flexible array members,
1458         (compStructSize): added syntax checks for "flexible array members"
1459         (copyStruct): removed,
1460         (copyLinkChain): removed inefficient fix for bug 770487
1461         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
1462         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
1463         symbol->flexArrayLength
1464         * src/SDCCerr.c,
1465         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
1466         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
1467         * support/regression/tests/structflexarray.c: added
1468         * support/valdiag/tests/structflexiblearray.c: added
1469
1470 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1471
1472         * src/SDCCast.c (decorateType): fixed bug 1368489
1473         * support/Util/SDCCerr.c,
1474         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
1475
1476 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1477
1478         * device/include/mcs51/at89c51snd1c.h: added file submitted by
1479           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
1480
1481 2005-11-27 Borut Razem <borut.razem AT siol.net>
1482
1483         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
1484           support/cpp2/mkdeps.h: added command line option
1485           -obj-ext=<extension> to SDCPP to define object file externion, used
1486           for generation of make dependencies (-M)
1487         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
1488
1489 2005-11-26 Borut Razem <borut.razem AT siol.net>
1490
1491         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
1492           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
1493           added pic and pic16 libraries
1494
1495 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1496
1497         * device/include/float.h: Corrected typo in prototype of __fsgt
1498
1499 2005-11-25 Borut Razem <borut.razem AT siol.net>
1500
1501         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
1502           added creation of model-mcs51-stack-auto libraries
1503
1504 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
1505
1506         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
1507         and fields-list too
1508         * src/SDCCast.c (createIvalArray): removed obsolete comment
1509
1510 2005-11-24 Borut Razem <borut.razem AT siol.net>
1511
1512         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
1513           added missing device/lib/mcs51/crt*.asm sources
1514
1515 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
1516
1517         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
1518
1519 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
1520
1521         * device/lib/_fs2schar.c,
1522         * device/lib/_fs2sint.c,
1523         * device/lib/_fs2slong.c: optimized inline asm
1524
1525 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1526
1527         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1528           Better handling of floats between -1.0 and 0.0.
1529
1530 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1531
1532         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
1533           (the missing "if"s prohibited removal of redundant labels)
1534
1535 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1536
1537         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1538           Properly convert floats between -1.0 and 0.0 to long, int, and char
1539           types (max integer value of negative floats tends to zero).
1540         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1541           Removed changes made so to work properly with floats between
1542           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
1543           and _fs2char.c
1544
1545 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1546
1547         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
1548         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
1549         (genCast) cosmetic change
1550         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
1551         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
1552         from mcs51
1553         * support/regression/tests/bitfields (testSignedBitfields): added
1554
1555 2005-11-18 Borut Razem <borut.razem AT siol.net>
1556
1557         * sdcc/device/lib/Makefile.in: remove all unnecessary files
1558         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
1559           introduced SILENT option to make building of pic16 libraries less
1560
1561 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1562
1563         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1564           Now they work properly with floats between -1.0 and 0.0
1565         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
1566
1567 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1568
1569         * src/SDCCicode.c (printOperand): added missing else
1570
1571 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1572
1573         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
1574         reformatted for better readability
1575         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
1576         signed bitfields
1577
1578 2005-11-17 Borut Razem <borut.razem AT siol.net>
1579
1580         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
1581           introduced SILENT option to make building of pic16 libraries less
1582           verbose - used for nightly snapshot build
1583         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
1584           available on Win32 platforms.
1585         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
1586           medium, large, pic and pic16
1587
1588 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1589
1590         * device/lib/printf_large.c: Temporary patch for bug 1358192:
1591           printf("%f"...) sets fraction to zero.
1592
1593 2005-11-16 Raphael Neider <rneider AT web.de>
1594
1595         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
1596           fixes #1357221
1597         * src/pic/gen.c (genIfx): implemented for CARRY bit
1598         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1599           to generic pointers, fixes #1357332,
1600           (pic16_movLit2f): NEW,
1601           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1602
1603 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1604
1605         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1606
1607 2005-11-11 Raphael Neider <rneider AT web.de>
1608
1609         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1610         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1611           compute pointer's type from operand,
1612           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1613           improved single bit reads, fixes bug #1353379
1614
1615 2005-11-09 Borut Razem <borut.razem AT siol.net>
1616
1617         * support/scripts/sdcc.nsi: added lib/pic to the package
1618
1619 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1620
1621         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1622
1623 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1624
1625         * support/regression/tests/bug1348008.c: added
1626         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1627         * support/regression/tests/bug1337835.c: updated comment
1628
1629 2005-11-06 Borut Razem <borut.razem AT siol.net>
1630
1631         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1632           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1633           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1634           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1635           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1636           dynamic construction of cl_error_class and derivates - 2.nd try
1637
1638 2005-11-05 Borut Razem <borut.razem AT siol.net>
1639
1640         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1641           bug, which caused Bus Errors on sparc solaris
1642
1643 2005-11-04 Borut Razem <borut.razem AT siol.net>
1644
1645         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1646           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1647           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1648           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1649           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1650           and derivates to resolve the initialization problem on OSX
1651
1652 2005-11-02 Borut Razem <borut.razem AT siol.net>
1653
1654         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1655           corrected typo - #include <winsock2.h>
1656
1657 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
1658
1659         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
1660           (_asxxxx_mapping): added org directive for future enhancements
1661
1662 2005-11-01 Borut Razem <borut.razem AT siol.net>
1663
1664         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1665           enabled sockets on WIN32
1666         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
1667
1668 2005-10-31 Borut Razem <borut.razem AT siol.net>
1669
1670         * support/regression/generate-cases.py: escape backslashes in {testcase}:
1671           WIN32 backslash path delimiters should be escaped when used in C strings
1672         * support/regression/tests/bitfields.c: exclude failing assertions for
1673           __CYGWIN32__ and __MINGW32__ hosts
1674
1675 2005-10-30 Borut Razem <borut.razem AT siol.net>
1676
1677         * src/SDCCutil.c: corrected double comparison typo
1678
1679 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
1680
1681         * device/lib/medium/Makefile: added for new memory model medium
1682         * device/include/asm/mcs51/features.h: updated for medium/pdata
1683         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
1684           added Multiply & Accumulate sbit's and MAC0_PAGE define
1685         * device/include/mcs51/c8051f300.h: added sfr16 definitions
1686         * device/include/mcs51/c8051f310.h: added sfr16 definitions
1687         * device/lib/_mullong.c: update for medium model
1688         * device/lib/incl.mk: added medium model
1689         * doc/sdccman.lyx: documented medium model
1690         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
1691         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1692         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1693         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1694           (allocParms): set SCLS and OCLS to pdata for medium model
1695         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1696           for pdata,
1697           (powof2): return <0 if not power of 2
1698         * src/avr/gen.c (genBitWise): use updated powof2
1699         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1700           (shiftR2Left2Result): small optimization in setup, save acc when storing,
1701           (shiftLLeftOrResult): use B if necessary
1702         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1703         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1704         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1705         * support/regression/Makefile.in: added test-mcs51-medium
1706         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1707
1708 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1709
1710         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1711         specifier unsigned
1712         * device/lib/time.c (mktime): fixed bug 1334315
1713
1714 2005-10-28 Raphael Neider <rneider AT web.de>
1715
1716         * device/include/pic/p16f_common.inc: added common declarations
1717         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1718
1719 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1720
1721         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1722           (aopPutUsesAcc): added to predict accumulator use,
1723           (assignResultValue): save acc if necessary,
1724           (genMinusDec): store result if indirectly addressed,
1725           (genDivOneByte):  save acc if necessary,
1726           (movLeft2Result): bugfix if left already in acc,
1727           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1728             attention to accumulator use (esp. pdata),
1729           (genReceive): receive pdata correctly
1730         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1731         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1732
1733 2005-10-27 Raphael Neider <rneider AT web.de>
1734
1735         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1736
1737 2005-10-27 Raphael Neider <rneider AT web.de>
1738
1739         * .version: changed version to 2.5.4
1740         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1741         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1742           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1743             arithmetics support routines
1744         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1745         * device/lib/Makefile.in: also create installdir for pic
1746
1747         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1748           pic14 port as well
1749         * src/pic/device.c (dump_sfr): rewritten to delegate register
1750           placement to the linker (use `extern sym' rather than sym EQU addr),
1751           (validAddress): fixed to check last specified address
1752         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1753           (popGetLit): truncate literal value to 8 bit,
1754           (popGet): moved assert to more appropriate place
1755           (popGetExternal): create pCode operand from and mark the according
1756             symbol as being `extern'
1757           (popGetAddr): added sanity check on immediate's offset, provide
1758             GPOINTER tag on demand
1759           (aopPut): fixed for immediates,
1760           (mov2w_op): move operand's address or contents to WREG (depending on
1761             operand type), safer variant of mov2w,
1762           (movwf,call_libraryfunc): NEW, handy abbreviations,
1763           (get_argument_pcop,get_return_val_pcop,pass_argument,
1764           get_returnvalue): interface for accessing function parameters and
1765             return values,
1766           (assignResultValuei,genRet): use new parameter/return value interface
1767           (pic14_getDataSize): back to old version handling generic pointers,
1768           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1769             provided implementation and/or fixed old one,
1770           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1771             calls, removed legacy 8051 reference code
1772           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1773           (loadSignToC): NEW, move the operands sign bit to CARRY,
1774           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1775             genRightShiftSigned, accepts negative shift counts,
1776           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1777           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1778             generic pointers, __data pointers and __code pointers,
1779           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1780             and signed bitfields, limit bitfields to 8 bit,
1781           (genDataPointerGet): fixed number of bytes read,
1782           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1783           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1784             pointers to constant data are no longer assumed to point to __code
1785             space, removed invalid pointer types,
1786           (bitpatternFromVal): retrieve the PICs representation of an integer
1787             or float literal,
1788           (genDataPointerSet): fixed assigning to po_immediate operands,
1789           (genGenPointerSet): implemented as library call,
1790           (genIfx): fixed incorrect condition,
1791           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1792             provide GPOINTER tag according to destination's storage class,
1793           (genCast): added code to handle casting to generic pointers, added
1794             sign-/zero extension of the result
1795           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1796         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1797         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1798           extend the result
1799         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1800           address/register resides in the shared banks
1801           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1802             put all variables into separate sections (have the linker arrange
1803             them)
1804           (picglue): put init code and interrupt handlers in separate sections
1805         * src/pic/main.c: added port specific options table, modified to PORT
1806           structure to make GPOINTERs 3 byte, added pic14_options
1807           (_pic14_do_link): private linking routine (update paths to libraries,
1808             add libsdcc.lib by default)
1809         * src/pic/main.h: declare pic14_options
1810         * src/pic/pcode.c: fixed instructions i/o relations,
1811           (RegCond): reverted to correct version,
1812           (newpCodeOpLit): truncate literals to 8 bit,
1813           (genericPrint): added debug output,
1814           (getRegFromInstruction): fixed for various operand types, simplified
1815           (BuildFlow): fixed broken handling of isntructions with labels
1816           (LinkFlow): start at last instruction in flow (skip trailing comments),
1817             pass the flow on to the next instruction after CALL
1818           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1819           (insertPCodeInstruction): fixed inserting after a skip instruction,
1820           (DoBankSelect): fixed for labeled instructions
1821           (OptimizepBlock): honor --nopeep switch
1822           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1823         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1824         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1825           (pCodeOptime2pCodes): allow disabling this optimization via
1826             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1827             but is still buggy), started implementation of a dataflow based
1828             pCode optimization (CSE + dead code elimination)
1829           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1830         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1831           names are independant of the stack location and therefore portable across
1832           devices
1833
1834 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1835
1836         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1837           (selectSpil): fixed bug 1337835 by not spilling bit variables
1838         * support/regression/tests/bug1337835.c: added test for this bug
1839         * src/mcs51/peeph.def: restart after rule 3.c,
1840           addded rules 263.x to optimize loading constants
1841
1842 2005-10-26 Raphael Neider <rneider AT web.de>
1843
1844         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1845         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1846           (genAssign): emit warning when casting literals to generic pointer
1847             type, also applies when taking the address of a fixed variable,
1848           (genCast): improved casting to generic pointers
1849         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1850           extern variables, added verbose error message
1851         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1852
1853 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1854
1855         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1856         carry must be complemented too
1857         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1858         could be emitted by genMinus
1859         * src/SDCCval.c (constVal): fixed bug 1305065
1860
1861 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1862
1863         * src/SDCCast.c (addCast): added promotion for bit variables
1864         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1865         promotion casts + optimisation
1866         (optimizeGetWord): fix warning 'i' might be used uninitialized
1867         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1868         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1869
1870 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1871
1872         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1873         all chars are promoted to int; promotion should be handled in SDCCast.c
1874
1875 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1876
1877         * device/lib/_strcmp.c: Fixed bug 1326457
1878
1879 2005-10-11 Raphael Neider <rneider AT web.de>
1880
1881         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1882         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1883
1884 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1885
1886         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1887         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1888
1889 2005-10-04 Raphael Neider <rneider AT web.de>
1890
1891         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1892           device/lib/pic16/pics.all: added pic18f1320
1893         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1894
1895 2005-09-30 Raphael Neider <rneider AT web.de>
1896
1897         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1898         * src/pic16/devices.inc: NEW, provides device descriptions
1899         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1900
1901 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1902
1903         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1904           GETHBIT
1905
1906 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1907
1908         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1909           documented Any Order Bit, Higher Order Byte and Higher Order Word
1910         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1911         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1912           (optimizeGetAbit): new, to get any bit, not only the high bit,
1913           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1914           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1915           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1916           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1917             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1918             GETABIT, GETBYTE, GETWORD: decorate them,
1919           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1920           (ast_print): added GETABIT, GETBYTE, GETWORD
1921         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1922         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1923           (geniCodeBinary): new generic binary icode,
1924           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1925         * src/port.h: updated comment for PORT.hasExtBitOp
1926         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1927           (genGetByte): new, to get a single byte,
1928           (genGetWord): new, to get a word from a long,
1929           (gen51Code): added GETABIT, GETBYTE, GETWORD
1930         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1931
1932 2005-09-23 Raphael Neider <rneider AT web.de>
1933
1934         * configure.in, configure: have device/lib/pic configured
1935         * device/lib/Makefile.in: added model-pic14
1936         * device/lib/clean.mk: added pic/ to clean rule
1937         * device/lib/pic: added rudimentary pic14 library providing support
1938           functions for multiplication/division/generic pointer access
1939         * src/SDCCopt.c (convilong): mark support functions as extern
1940           for pic14 port as well
1941         * src/pic/gen.c (genMult): added assertions,
1942           (genpic14Code): emit warning on unhandled iCodes
1943         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1944         * src/pic/pcode.c (pCodeOpCopy),
1945         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1946           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1947           SFR_REGISTER}), made safe for future extensions
1948         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1949           instructions even if preceeded by SKIP instructions (also remove
1950           them); removed unused code
1951         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1952           prevents leaving parts of the structure uninitialized after copying
1953
1954 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1955
1956         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1957           ago by me
1958         * support/regression/tests/addsub.c: added test for the bug
1959
1960 2005-09-21 Raphael Neider <rneider AT web.de>
1961
1962         * device/include/pic16/pic18f1220.h,
1963           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1964         * device/lib/pic16/Makefile.rules: added missing opening paren
1965         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1966           are provided in genutils.c,
1967           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1968           operand/result sizes,
1969           (genCmp): assert on NULL pointers first, then check deref'ed values
1970         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1971           result size
1972
1973 2005-09-18 Raphael Neider <rneider AT web.de>
1974
1975         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1976           as these are now unused,
1977           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1978         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1979           local, avoids uninitialized pointer dereference on r->name
1980         * src/pic16/ralloc.c (newReg): fixed indentation
1981
1982 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1983
1984         * src/SDCCval.c (constVal): fixed bug 730366
1985         * support/Util/SDCCerr.c,
1986         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1987
1988 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1989
1990         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1991
1992 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1993
1994         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1995
1996 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1997
1998         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1999           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2000         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
2001           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2002         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
2003         * packihx/packihx.c (hexDigit): made c unsigned char
2004         * as/mcs51/lklibr.c (fndsym),
2005         * link/z80/lkgb.c (gb),
2006         * link/z80/lklibr.c (fndsym),
2007         * link/z80/lkrloc.c (relr),
2008         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
2009         * src/SDCC.lex (checkCurrFile, process_pragma),
2010         * src/SDCCglue.c (spacesToUnderscores),
2011         * src/SDCCmain.c (setParseWithComma, processFile),
2012         * src/asm.c (tvsprintf, printCLine),
2013         * src/avr/gen.c (emitcode, aopPut),
2014         * src/ds390/gen.c (emitcode),
2015         * src/hc08/gen.c (emitcode, emitinline),
2016         * src/mcs51/gen.c (emitcode, genInline),
2017         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2018           tokenizeLineNode),
2019         * src/pic/ralloc.c (debugLog),
2020         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2021           tokenizeLineNode),
2022         * src/pic16/ralloc.c (debugLog),
2023         * src/z80/main.c (_process_pragma):
2024            made all ctype.h function calls safe
2025         * src/SDCCopt.c: include math.h for fabs
2026         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
2027           and used them throughout the code to make ctype.h function calls safe
2028         * src/ds390/main.c (asmLineNodeFromLineNode),
2029         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
2030         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
2031            unsigned char*
2032         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
2033           (newpCodeAsmDir): made ctype.h function calls safe
2034         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
2035           pic16_emitcode):  made lbp unsigned char*
2036         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
2037           (pic16_newpCodeAsmDir): made ctype.h function calls safe
2038         * src/xa51/gen.c (emitcode),
2039         * src/z80/gen.c (_emit2): made lbp unsigned char*
2040         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
2041            char*
2042
2043 2005-09-05 Raphael Neider <rneider AT web.de>
2044
2045         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
2046           access bank splitpoint
2047
2048 2005-09-05 Raphael Neider <rneider AT web.de>
2049
2050         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
2051
2052 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
2053
2054         * .version: changed to version 2.5.3
2055         * doc/sdccman.lyx: changed version to 2.5.3,
2056           documented --codeseg and --constseg and pragma codeseg and constseg,
2057           documented bit parameters (reentrant) and bit returning
2058         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
2059            currFunc->recvSize, but is this ok for all ports?
2060           (ast2iCode): result of ~ on unsigned char must be cast to int for
2061            bool to work
2062         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
2063           function pointers in bit space
2064         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
2065           (processFuncArgs): call port.reg_parm() with reentrancy info
2066         * src/port.h,
2067         * src/avr/main.c,
2068         * src/ds390/main.c,
2069         * src/hc08/main.c,
2070         * src/pic/main.c,
2071         * src/pic16/main.c,
2072         * src/xa51/main.c,
2073         * src/z80/main.c: port.reg_parm prototype extended with
2074           "bool reentrant" parameter
2075         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
2076           options.stackAuto for allocating bit register parameters
2077         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
2078           (genSend): set BitBankUsed if it is,
2079           (selectRegBank): factored out of genCall for use in genPcall,
2080           (genCall): removed redundant dtype assignmen, use selectRegBank,
2081           (genPcall): handle returning in Carry properly, save in F0 if needed,
2082           (genReceive): handle bit register parameters
2083         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
2084           (mcs51_assignRegisters): enable bit registers for all reentrant
2085            functions and don't set BitBankUsed unconditionally
2086         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
2087         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
2088         * support/regression/tests/funptrs.c: added tests for BOOL and for return
2089
2090 2005-08-27 Borut Razem <borut.razem AT siol.net>
2091
2092         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
2093         ppc-osx (Darwin) does not support -u option. It seems that it is
2094         supported only on Linux - GNU cp
2095
2096 2005-08-25 Borut Razem <borut.razem AT siol.net>
2097
2098         * sim/ucsim/gui.src/serio.src/Makefile.in,
2099           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
2100           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2101           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
2102           install and strip, since the strip at /usr/ccs/bin should be used
2103           on solaris
2104
2105 2005-08-24 Borut Razem <borut.razem AT siol.net>
2106
2107         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
2108
2109 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
2110
2111         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
2112         ffffffffu
2113
2114 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
2115
2116         * as/mcs51/aslink.h: completed lkrloc.c prototypes
2117         * as/mcs51/lkmain.c (link_main): fixed warning
2118         * device/include/stdbool.h: ds390 has no advanced bit support yet
2119         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
2120         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
2121         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
2122           and updated their macros
2123         * src/SDCCval.c (constVal): updated comment for renamed b_long
2124
2125 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
2126
2127         * as/mcs51/asdata.c: changed ctype['['] to BINOP
2128         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
2129           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
2130           (oprio): set priority for '['
2131         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
2132            and adb_24_bit
2133         * as/mcs51/asm.h: added defines R_BIT and S_BIT
2134         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
2135         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
2136         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
2137           added overlayable BIT_BANK area
2138         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
2139           (summary2): explain 'T' in legenda
2140         * as/mcs51/lkrloc.c: replaced old K&R style,
2141           (relr): added R_BIT processing,
2142           (errmsg): added "Bit-addressable relocation error",
2143           (adb_bit): added for converting from byte- to bit-addressable space,
2144           (adb_24_bit): added for converting from byte- to bit-addressable space
2145         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
2146            used in reentrant functions now even as return value
2147         * device/lib/_gptrput.c (_gptrput): removed obsolete code
2148         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
2149           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
2150         * src/SDCCglobl.h: added indicator BitBankUsed
2151         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
2152            the bit registers b0-b7
2153         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
2154           (geniCodeCast): fixed bug 1263853,
2155           (geniCodeLogicAndOr): put result in bool or char,
2156           (geniCodeReceive): added parameter func for accessing the return type,
2157           (geniCodeFunctionBody): pass func to geniCodeReceive
2158         * src/SDCCmain.c: added indicator BitBankUsed
2159         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
2160         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
2161           (checkSClass): don't put automatic bool/bit on stack,
2162           (checkFunction): removed check on function cannot return bit
2163         * src/SDCCsymt.h: added newBoolLink prototype
2164         * src/mcs51/gen.c (rb1regs): added bit registers,
2165           (movc): created for assigning to carry,
2166           (pushReg, popReg): created for pushing registers,
2167           (sameRegs): check both AOP_REG and AOP_CRY types,
2168           (aopOp): handle bit registers,
2169           (aopPut): optimization no self-assign,
2170           (saveRegisters): push reg->base (bits) only once for bit registers,
2171            and use pushReg,
2172           (unsaveRegisters): pop reg->base only once and use popReg,
2173           (assignResultValue): added parameter func and return in carry for bits,
2174           (genIpush): optimization no reload in A if not changed,
2175           (genSend): bit parameters in reentrant functions are passed in bit
2176            registers by first assigning to bits in B, then save registers and
2177            copy B to bits,
2178           (genCall): handle returning in Carry properly, save it in F0 if needed,
2179           (genPcall): updated assignResultValue call, this is not safe yet for bit
2180            returning function !!!
2181           (genFunction): don't generate equ's for bit registers and use pushReg,
2182           (genEndFunction): take care of bit returning functions and use popReg,
2183           (genRet): return bit in Carry,
2184           (genIfx): optimize bit registers and other directly addressable bits,
2185           (genReceive): updated assignResultValue call
2186         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2187           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2188            registers when using stack-auto
2189         * src/mcs51/ralloc.c (_G): added allBitregs,
2190           (regs8051): added the bit registers,
2191           (createStackSpil): use macro IS_BIT,
2192           (getRegBit): added to allocate a bit register, else spill,
2193           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2194           (updateRegUsage): factored out to ease stepping while debugging,
2195           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2196            also allocate bit registers,
2197           (fillGaps): handle bit registers,
2198           (findAllBitregs): added to create bit vector with all bit registers,
2199           (mcs51_allBitregs): returns this bit vector,
2200           (mcs51_assignRegisters): when using stack-auto use bit registers for
2201            passing parameters and creating local variables
2202         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2203
2204 2005-08-22 Borut Razem <borut.razem AT siol.net>
2205
2206         * device/lib/Makefile.in: replaced find option -or with -o
2207           to make it run on solaris
2208
2209 2005-08-22 Raphael Neider <rneider AT web.de>
2210
2211         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
2212           fixes #1265442 (crash on Solaris)
2213
2214 2005-08-20 Borut Razem <borut.razem AT siol.net>
2215
2216         * configure, configure.in: added tests for libsocket and libnsl libraries,
2217           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
2218           from support/regression/Makefile.in
2219         * support/regression/Makefile.in: added
2220         * device/lib/pic16/Makefile.common.in: force make to use bash shell
2221         * sim/ucsim/libtool: regenerated on sparc-solaris
2222         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2223           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
2224           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
2225           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
2226           sparc-solaris, which doesn't use GNU ld linker
2227         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
2228         * as/Makefile: find on sparc-solaris does not support -maxdepth option
2229
2230 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
2231
2232         * src/mcs51/peeph.def: updated comments
2233
2234 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2235
2236         * device/lib/_gptrget.c,
2237         * device/lib/_gptrput.c: slightly shorter
2238         * doc/sdccman.lyx: incremented version
2239         * src/mcs51/peeph.def: moved peephole comments to the line of first
2240           change to better keep line correlation, reanimated 186.e
2241         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
2242
2243 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2244
2245         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
2246           David Saxton with quotes around file name.
2247
2248 2005-08-15 Borut Razem <borut.razem AT siol.net>
2249
2250         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
2251           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
2252           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
2253           make tests run on x86_64 platform
2254
2255 2005-08-13 Raphael Neider <rneider AT web.de>
2256
2257         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
2258           as it might be executed DURING a build (parallel make is wonderful)
2259
2260 2005-08-13 Raphael Neider <rneider AT web.de>
2261
2262         * device/lib/Makefile.in (port-specific-objects-pic16):
2263           revert to cp $(PORT)/bin/*.* $(PORTDIR)
2264         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
2265           dependency
2266         * device/lib/pic16/Makefile.rules: build subdirs before creating
2267           the library, removed builddir rule, create $(builddir) early in
2268           recurse rule, use empty recurse rule for leaf directories
2269         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
2270           mkdir errors (race condition), removed duplicate suffix "hex"
2271           from clean rules
2272         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
2273         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
2274           prevents mkdir -p from aborting on Alpha
2275
2276 2005-08-12 Raphael Neider <rneider AT web.de>
2277
2278         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
2279           db-statements in order to allow for arrays of pointers in code
2280           sections to be placed without interspersed 0-padding, fixes
2281           bug #1256215
2282         * (emitStatistics): fixed division by zero for pic18f1220
2283         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
2284           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
2285         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
2286         * (pic16_pCodeConstString): keep track of already emitted string
2287           literals to prevent "duplicate definitions of symbol _str_NR"
2288         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
2289           debug message
2290         * device/lib/Makefile.in: ignore failing PIC16 library builds
2291         * device/lib/pic16/Makefile: do not build if gputils are missing
2292         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
2293
2294 2005-08-10 Raphael Neider <rneider AT web.de>
2295
2296         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
2297           my last commit)
2298
2299 2005-08-10 Raphael Neider <rneider AT web.de>
2300
2301         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
2302           Rokas' patch to add the new fixed point type "__fixed16x16"
2303         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
2304           functions for __fixed16x16 arithmetics
2305         * device/lib/pic16: reimplemented the build system to support
2306           a separate build directory, better handling of libio (create
2307           the library in a separate subdir for each architecture) and
2308           easier configuration (centralized in Makefile.common)
2309
2310 2005-08-07 Raphael Neider <rneider AT web.de>
2311
2312         * src/pic16/gen.c (genrshTwo): fixed sign extension
2313         * src/pic16/device.c: added pic18f2320, 4220 and 4320
2314         * device/include/pic16/pic18f2220.h: changed some bit definitions,
2315           added T0CONbits
2316         * device/include/pic16/pic18f4220.h: NEW, header for
2317           pic18f4220 and pic18f4320
2318         * device/include/pic16/pic18fregs.h: added new devices,
2319           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
2320         * device/include/pic16/signal.h: resolved name clashes
2321           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
2322           to also allow testing for interrupt enable bits, added
2323           comments on how to use the macros
2324         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
2325         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
2326           register definitions for the devices
2327         * device/lib/pic16/pics.all: added new devices
2328         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
2329           allocated memory
2330         * device/lib/pic16/libc/stdlib/memfree: do not count
2331           the block header as free memory
2332         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
2333           simplified and added missing end-of-blocklist-marker
2334           (reported by Peter Onion, fixes #1252814)
2335         * (_mergeHeapBlock): fixed loop condition
2336         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
2337           len==0, restructured code
2338         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
2339           up a bit, reduced bitfield accesses, prevent endless loops
2340           in case of heap corruption
2341         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
2342           "unreferenced arguments/must return a value" warnings
2343         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
2344           replaced BAUDREG with SPBRG
2345         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
2346           device/lib/pic16/debug/gstack/gstack.c: replaced
2347           _naked, _asm, _endasm with __naked, __asm, __endasm
2348
2349 2005-08-05 Raphael Neider <rneider AT web.de>
2350
2351         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
2352           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
2353
2354 2005-08-05 Borut Razem <borut.razem AT siol.net>
2355
2356         * device/lib/Makefile.in: added missing ';'
2357         * configure: removed ^M characters
2358
2359 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2360
2361         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
2362           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
2363           License
2364
2365 2005-08-04 Borut Razem <borut.razem AT siol.net>
2366
2367         * configure.in: pic16 libraries build 2nd try - enable running
2368           configure in device/lib/pic16
2369         * configure: regenerated from configure.in
2370         * device/lib/Makefile.in: create $(PORT)/bin directory
2371
2372 2005-08-03 Raphael Neider <rneider AT web.de>
2373
2374         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
2375           to get/set values via pointers
2376         * (genUnpackBits,genPackBits): changed detection of
2377           ptr->bitfield vs. sym.bitfield, fixed access via generic
2378           pointers, removed dead (wrong) code for multibyte bitfields
2379         * (genNearPointerGet, genGenPointerGet): removed useless code,
2380           fixed bitfield detection, fixes #1250594
2381         * (genNearPointerSet): removed useless code
2382         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
2383           and introduced macro pic16_emitpcode that conditionally emits
2384           the origin of the following pCode (useful for debugging SDCC)
2385         * src/pic16/pcode.c: changed (and disabled) some debug outputs
2386         * (createDefmap): fixed handling of LFSR for --optimize-df
2387
2388 2005-08-02 Borut Razem <borut.razem AT siol.net>
2389
2390         * device/lib/Makefile.in: pic16 libraries build enabled since
2391           gputils-0.13.2 are now localy installed at sourceforge's compile farm
2392
2393 2005-08-02 Raphael Neider <rneider AT web.de>
2394
2395         * src/pic16/gen.c (genPackBits): removed deprecated warning
2396         * (genGenPointerSet): fixed bitfield detection
2397
2398 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2399
2400         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
2401
2402 2005-07-31 Raphael Neider <rneider AT web.de>
2403
2404         * device/lib/pic16/libdev/pic18f458.c,
2405           device/include/pic16/pic18f458.h: added missing T0CONbits
2406
2407 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2408
2409         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
2410
2411 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
2412
2413         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
2414
2415 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2416
2417         * device/include/mcs51/at89c51ed2.h: added.
2418
2419 2005-07-23 Raphael Neider <rneider AT web.de>
2420
2421         * src/pic/gen.h: added emitpcode macro for debugging
2422         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
2423           and replace by macro adding debug information on demand
2424         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
2425         * (gencjne): tried to fix; replaced with correct (slower) code
2426         * (gen{Unp,P}ackBits): fixed single bit access
2427         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
2428         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
2429           previous instruction
2430         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
2431           register has to be handled with care (forbidding movement
2432           of assignments/uses, removing assignments completely, ...)
2433         * (pCodeOptime2pCodes): make use of regIsSpecial
2434         * added lots of debugging output (commented out)
2435         * src/pic/rallloc.c (deassignLRs): prevent operand registers
2436           from being reused as result UNLESS it is known to work
2437
2438 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
2439
2440         * support/Util/dbuf.h: include <stddef.h> for size_t
2441         * .version: changed to version 2.5.2
2442
2443 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2444
2445         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
2446
2447 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2448
2449         * src/hc08/gen.c (genMinus): fixed bug #1241835,
2450           (genModOneByte): removed needless psha/pula
2451
2452 2005-07-22 Raphael Neider <rneider AT web.de>
2453
2454         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
2455           have PIC14 handled like PIC16, fixes broken pic14 linker calls
2456         * src/pic/gen.c (resolveIfx): do not "invent" labels
2457         * (genSkipc): changed to positive logic
2458         * (genSkipCond): removed as no longer needed
2459         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
2460           backport from PIC16
2461         * (genLeftShift): check operands are in different registers
2462         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
2463           INCF does not update CARRY...
2464         * src/pic/main.c: fixed _linkCmd
2465         * src/pic/pcode.c (unlinkpCode): added inactive code
2466         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
2467           alive (do not assign result and operand overlapping registers)
2468
2469 2005-07-22 Raphael Neider <rneider AT web.de>
2470
2471         * src/pic/device.c (dump_sfr): replaced register declaration with
2472           call to emitSymbolToFile() to avoid duplicate symbols
2473         * (assignRelocatableRegisters): do not declare external symbols
2474         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
2475           right (take size of type, not etype)
2476         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
2477         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
2478         * (packRegsForAccUse): disabled assignment of WREG as
2479           the result reg to prevent occurence of just fixed #1235003,
2480           fixes #1242954
2481         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
2482           symbols (avoids duplicate symbols in .asm file)
2483         * (pic14emitRegularMap): use emitSymbolToFile()
2484         * src/pic/gen.c (aopOp): fixed spillLocation handling
2485         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
2486         * (genDataPointerSet): removed unneccessary variables/output
2487
2488 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
2489
2490         * as/mcs51/lkarea.c: enlarged codemap for banked memory
2491         * device/lib/mcs51/crtbank.asm: added # to 0x0F
2492
2493 2005-07-21 Raphael Neider <rneider AT web.de>
2494
2495         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
2496           architecture cannot handle them efficiently, fixes bug #1235003
2497         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
2498           check for empty sets before using them (fixes bug #1232190)
2499
2500 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
2501
2502         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
2503           (lnksect2): generate warnings for memory overlap
2504         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
2505           constseg to set the name of these segments so you can instruct the linker
2506           to place them in banks
2507         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
2508         * src/SDCCglobl.h: added MODEL_HUGE to enum,
2509           added code_seg and const_seg to options
2510         * src/SDCCglue.c (emitMaps): use options.const_seg,
2511           (createInterruptVect): put interrupt vectors in segment HOME,
2512           (glue): put HOME before static segment and put the main glue in HOME,
2513           (glue): use options.code_seg
2514         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
2515         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
2516           these segments so you can instruct the linker to place them in banks
2517           (linkEdit): use code_loc for HOME segment which should be the first
2518           segment in code memory now
2519         * src/SDCCmem.c: fixed more stuff like bug 1238386
2520         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
2521           (changePointer): don't change function pointers to code pointers for
2522           banked functions,
2523           (compareType): added exceptional check for banked function pointers
2524         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
2525         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
2526           after static in code memory
2527         * src/mcs51/gen.c: added aopLiteralLong prototype,
2528           (aopForSym): use getSize for functions,
2529           (genCall): generate banked calls over one trampoline __sdcc_banked_call
2530           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
2531           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
2532           the segment,
2533           (genPcall): use call for literal function pointers and generate banked
2534           calls over the one trampoline so there's only one place for the user to
2535           modify according to his/hers hardware,
2536           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
2537           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
2538         * src/mcs51/main.c: added keyword banked,
2539           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
2540         * support/Util/SDCCerr.c,
2541         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
2542           needed for passing the bank and address to the trampoline
2543         * device/lib/mcs51/crtbank.asm: added for bankswitching
2544         * device/lib/mcs51/Makefile: added crtbank
2545
2546 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2547
2548         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
2549           for fields at offset 0 of a struct or union as reported
2550           on 2005-07-07 in the developer mailing list.
2551
2552 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
2553
2554         * src/SDCCmem.c: fixed bug 1238386
2555
2556 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2557
2558         * src/mcs51/peeph.def: added labelrefcounting for peepholes
2559           (patch #1144962), added peephole 300, enabled 259.x
2560         * doc/sdccman.lyx: removed screenshot and provided link instead
2561
2562 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2563
2564         * doc/sdccman.lyx: added section about debugging with ddd
2565         * doc/figures/ddd_example.eps: screenshot of debugging session
2566
2567 2005-07-04 Raphael Neider <rneider AT web.de>
2568
2569         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
2570           like CODE pointers, fixes #1115683
2571         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
2572           call, fixes bugs #1232211, #1228110,
2573           fixed wrong casts to pCodeFlow from pCodeInstructions
2574
2575 2005-07-04 Raphael Neider <rneider AT web.de>
2576
2577         * src/pic/gen.c (popGet): changed assert to allow for
2578           bit operands
2579         * (popGetAddr): changed signature to provide
2580           an additional index, patched all call sites
2581         * (genCmpEq): handle literal-like operands correctly
2582         * (genAddrOf): added sanity checks on __code/__data pointers
2583         * (genAssign): added handling of symbols from __code section
2584         * (gencjne): do not generate code for comparisons whose result
2585           is neither stored nor used, fixes bug #1171114
2586         * (AccLsh, AccRsh): operate on operand instead of WREG
2587         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
2588           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
2589           by known count
2590         * rewrote complete shift-by-literal logic, commented unused
2591           functions out
2592         * (genConstPointerGet): get multiple bytes (if result size > 1),
2593           fixed handling of non-immediate addresses
2594         * (genPointerGet): handle CODE pointers like CONST pointers
2595         * (genpic14Code): insert C-SRC lines as Cource-pCodes
2596         * ({aop,op}_isLitLike): NEW, single place to decide whether an
2597           operand is to be treated as a literal or not
2598         * (mov2w,genPcall,genCmpEq),
2599           src/pic/genarith.c: use aop_isLitLike() to decide between
2600           literal/register contents
2601         * (addSign): added missing offset
2602         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2603           only emit comment in debug-mode,
2604           use {aop,op}_isLitLike throughout the file
2605         * src/pic/glue.c: fix initializers for pointers (work in progress)
2606         * src/pic/pcode.c (get_op): honor index on _const symbols
2607         * ({reset,dump}pCodeStatistics): NEW, estimate code size
2608         * (dumppBlock): added pCode size estimation
2609         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2610           check for IS_SYMOP before OP_SYMBOL'ing
2611         * fixed indentation, compacted switch-statements
2612         * (allocReg): find free register and allocate it instead of
2613           allocating new registers all the time
2614         * (deassignLRs): prevent POINTER_GET's from being assigned the same
2615           registers as its operands (necessary only for multibyte GETs)
2616
2617 2005-07-01 Raphael Neider <rneider AT web.de>
2618
2619         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2620           debugging .asm-output macros FENTRY + FEXIT
2621         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2622           way... I wonder...
2623         * (emitpComment): NEW, printf to pCode
2624         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2625           offset handling
2626         * (popGetAddr): NEW, variant of popGet to access an immediates
2627           high(er) bytes instead of the n'th byte of memory they reference,
2628           replaced popGet with popGetAddr where neccessary
2629         * (genDataPointerGet): reactivated and fixed implementation
2630         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2631           accesses
2632         * (genDataPointerSet): fixed multibyte assignments
2633         * (genpic14Code): fixed --i-code-in-asm handling
2634         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2635         * (genPlus): fixed index-out-of-bounds error
2636         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2637         * src/pic/ralloc.c: added debugging output macro FENTRY2
2638         * (spillThis): fixed indentation, enbraced for-body for clarity
2639         * (rematStr): commented out as now unused
2640         * (regTypeNum): commented out special spill case (overwrites
2641           arbitrary values)
2642         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2643
2644 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2645
2646         * doc/sdccman.lyx: documented sfr16/sfr32,
2647           added example for using storage class with function pointers
2648         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2649
2650 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2651
2652         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
2653         * device/lib/_itoa.c,
2654         * device/lib/_ltoa.c: optimized codesize
2655         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
2656           but don't know how to suppress the double warning.
2657         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
2658         * support/Util/SDCCerr.c,
2659         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
2660
2661 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
2662
2663         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
2664           fixed old K&R prototypes
2665         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
2666         * device/lib/_gptrget.c,
2667         * device/lib/_gptrgetc.c,
2668         * device/lib/_gptrput.c: changed versions for new memory indicator values,
2669           also new versions for small generic pointers and banked generic pointers
2670         * src/port.h: added const_name
2671         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
2672         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
2673         * src/SDCCcse.c (findPrevIc): check all associative operators
2674         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
2675         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
2676         * src/SDCCmem.c: updated comments,
2677           set far-space to 0 for pdata, results in optimized code
2678         * src/SDCCmem.h: added macro CONST_NAME
2679         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
2680           moving the info into the highest bits, see also gptrget/gptrput
2681         * src/src.dsp: added sdcc.ico to project files
2682         * src/avr/gen.c (genCast): fixed bug 0x%d
2683         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
2684         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
2685           relation between ptr_type and DCL_TYPE,
2686           (genCast): fixed bug 0x%d
2687         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
2688           (CODE)" for const_name
2689         * src/hc08/gen.c (genCast): fixed bug 0x%d
2690         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
2691           (hc08_port): added "CONST (CODE)" for const_name
2692         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2693           (aopForRemat, adjustArithmeticResult): disconnected direct relation
2694           between ptr_type and DCL_TYPE,
2695           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2696           operand* and took AOP() inside function so sfr-ness can be checked,
2697           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2698           new prototype,
2699           (genFunction, genEndFunction): optimized stack setup,
2700           (genMinus): optimized for literals with ending zeroes (in bytes),
2701           (genCast): fixed bug 0x%d
2702         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2703           (mcs51_port): added "CONST (CODE)" for const_name
2704         * src/mcs51/peeph.def: made rule 226 more generic
2705         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2706         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2707         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2708         * src/z80/main.c (z80_port): added NULL for const_name,
2709           (gbz80_port): added NULL for const_name
2710         * support/regression/tests/bug663539.c,
2711         * support/regression/tests/sfr16.c: new tests
2712
2713 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2714
2715         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2716
2717 2005-06-24 Raphael Neider <rneider AT web.de>
2718
2719         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2720           corrected typos...
2721         * device/include/pic16/signal.h: added USBIF
2722           and SIG_USB
2723
2724 2005-06-24 Raphael Neider <rneider AT web.de>
2725
2726         * device/lib/pic16/libdev/pic18f2455.c,
2727           device/include/pic16/pic18f2455.h: NEW
2728         * device/include/pic16/pic18fregs.h,
2729           device/lib/pic16/pics.all,
2730           src/pic16/device.c: added 18f2455
2731         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2732           device/include/pic16/{pic18f[68][567].h,usart.h}:
2733           replaced MULTIPLE_USARTS define with more relaible
2734           compatibility sfrs (for USART access)
2735
2736 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2737
2738         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2739           and the output asm file line is printed on two lines.
2740
2741 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2742
2743         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2744           BGT, BLE, BHI, and BLS instructions
2745         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2746           genCmpEq): removed
2747         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2748           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2749           fixes bug #1216342
2750         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2751
2752 2005-06-15 Raphael Neider <rneider AT web.de>
2753
2754         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2755         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2756         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2757           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2758           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2759
2760 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2761
2762         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2763           Marcel Telka in bug #1215704
2764
2765 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2766
2767         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2768           located in shared memory bank.
2769
2770 2005-05-31 Raphael Neider <rneider AT web.de>
2771
2772         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2773           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2774           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2775
2776 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2777
2778         * device/lib/_strncpy.c: fixed the fix
2779
2780 2005-05-26 Raphael Neider <rneider AT web.de>
2781
2782         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2783           initializers with \0, bug #1208187
2784         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2785           intializers with \0, bug #1208187
2786
2787 2005-05-26 Raphael Neider <rneider AT web.de>
2788
2789         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2790           initializers with \0, bug #1208187
2791         * src/pic16/main.c (_process_pragma): added sanity checks
2792           for stack position and size, emit warnings when appropriate
2793
2794 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2795
2796         * device/lib/_strncpy.c: fixed not filling with \0
2797
2798 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2799
2800         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2801           createFunction),
2802         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2803           compound_statement),
2804         * src/SDCCsymt.h,
2805         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2806
2807 2005-05-24 Raphael Neider <rneider AT web.de>
2808
2809         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2810
2811 2005-05-24 Raphael Neider <rneider AT web.de>
2812
2813         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2814           TRISE definitions, closes bug #1162453
2815
2816 2005-05-22 Raphael Neider <rneider AT web.de>
2817
2818         * src/pic16/main.c (_process_pragma): check for missing
2819           arguments to pragmas code and udata
2820         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2821           consistency fixes to match other headers (thanks to Jim Paris)
2822         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2823
2824 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2825
2826         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2827
2828 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2829
2830         * support/regression/tests/bug1198642.c: new test
2831         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2832         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2833         * support/scripts/resource.h,
2834         * support/scripts/resource.rc,
2835         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2836         * support/scripts/sdcc.ico: added 32x32 icon
2837
2838 2005-05-18 Raphael Neider <rneider AT web.de>
2839
2840         * device/lib/pic16/libdev/pic18f*.c,
2841         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2842           keywords to "__sfr" and "__at (X)"
2843         * device/include/pic16/pic18fregs.h: added pic18f4520
2844         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2845           #1203088 (MPLAB compatibility)
2846
2847 2005-05-17 Raphael Neider <rneider AT web.de>
2848
2849         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2850         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2851         * device/lib/pic16/pics.all: added new devices
2852         * src/pic16/device.c: added support for pic18f4520
2853
2854 2005-05-16 Raphael Neider <rneider AT web.de>
2855         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2856         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2857         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2858           convenience function for bit access
2859
2860 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2861
2862         * device/lib/printf_large.c: fixed bug 1193299
2863         * support/regression/tests/bug1057979.c: added test %3.3s
2864
2865 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2866
2867         * device/include/mcs51/8051.h,
2868         * device/include/mcs51/8052.h: made parseable with lint
2869         * device/include/mcs51/lint.h: added include file for (sp)lint
2870         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2871         * doc/cdbfileformat.lyx,
2872         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2873
2874 2005-05-14 Raphael Neider <rneider AT web.de>
2875
2876         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2877         * device/lib/pic16/libc/stdlib/itoa.c (new)
2878         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2879         * device/lib/pic16/libio/Makefile: exclude subdir according to
2880           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2881         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2882         * src/pic16/gen.c (genFunction): prevent annoying warning
2883         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2884           nameclashes on BeOS
2885         * support/cpp2/cppmain.c (cpp_output_string): new
2886         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2887           fixes bug 1116802
2888
2889 2005-05-13 Borut Razem <borut.razem AT siol.net>
2890
2891         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2892
2893 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2894
2895         * .version: changed to version 2.5.1; back to bleeding edge development
2896
2897 2005-05-11 Borut Razem <borut.razem AT siol.net>
2898
2899         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2900           generate PDF version 1.3 documents
2901
2902 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2903
2904         * .version: changed to version 2.5.0
2905
2906 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2907
2908         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2909
2910 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2911
2912         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2913         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2914         well as many smaller updates.
2915         * .version: changed to version 2.5.0-pre1
2916
2917 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2918
2919         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2920
2921 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2922
2923         * support/regression/tests/bug1185672.c: added
2924         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2925           bug 1185672
2926         * src/mcs51/gen.c (genCall): added comments, made it look safer
2927         * src/mcs51/gen.c (genEndFunction): simplified
2928
2929 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2930
2931         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2932
2933 2005-04-14 Borut Razem <borut.razem AT siol.net>
2934
2935         * fixed bug 1045046 - SIGSEGV with really simple code?:
2936           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2937           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2938
2939 2005-04-14 Borut Razem <borut.razem AT siol.net>
2940
2941         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2942           src/pic16/device.h: temporarily disabled experimental #inline pragma
2943           for 2.5.0 release
2944
2945 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2946
2947         * device/include/z80/stdio.h,
2948         * device/include/z80/string.h: removed these highly incomplete files so
2949           SDCC can use the default ones in device/include/
2950
2951 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2952
2953         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2954         gcc warning.
2955         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2956         fix sdcpp warnings.
2957
2958 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2959
2960         * device/include/malloc.h: removed redundant __reentrant prototypes
2961         * device/lib/_mullong.c: added working xstack variant in asm (C version
2962           doesn't pass regression tests)
2963         * device/lib/bpx.c: used __data and made bpx char for mcs51
2964         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2965           (createFunction): fixed bug with xstackPtr
2966         * src/SDCCcse.c: corrected comments
2967         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2968           (killDeadCode, eBBlockFromiCode): removed unused code
2969         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2970           corrected comments
2971         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2972           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2973           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2974           (genModOneByte): fixed warning in MSVC
2975         * src/mcs51/main.c (): added comments
2976         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2977
2978 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2979
2980         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2981
2982 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2983
2984         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2985
2986 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2987
2988         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2989         characters arrays of larger size than the declared one.
2990
2991 2005-04-10 Borut Razem <borut.razem AT siol.net>
2992
2993         * src/pic/gen.c (genInline),
2994           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2995           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2996           (findNextInstruction), (findPrevInstruction),
2997           (findInstructionUsingLabel),
2998           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2999         * src/pic/pcode.c (findLabel): added missing '\n'
3000         * src/src.dsp: added SDCCdwarf2.c to the project
3001
3002 2005-04-09 Borut Razem <borut.razem AT siol.net>
3003
3004         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
3005
3006 2005-04-08 Raphael Neider <rneider AT web.de>
3007
3008         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
3009           into the chain after a given one) and mergeDefmapSymbols (combine
3010           defmap entries for each symbol per pcode)
3011         * (createDefmap): have defmap entries merged in the end
3012         * (defmapReplaceSymRef): split defmap entries covering two accesses to
3013           a symbol before replacing one access type's symbol, merge symbols in
3014           the end (replacement symbol might already have an entry)
3015         * (assignValnums): keep reference to written WREG intact
3016
3017 2005-04-08 Raphael Neider <rneider AT web.de>
3018
3019         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
3020           Alpha)
3021
3022 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
3023
3024         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
3025         bytes
3026
3027 2005-04-07 Raphael Neider <rneider AT web.de>
3028
3029         * device/include/pic16/usart.h: added compatibility defines for
3030           devices with more than one USART
3031         * device/include/pic16/pic18f[68][567]20.h: activated above defines
3032
3033 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3034
3035         * device/lib/Makefile.in: updated for port specific include
3036
3037 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3038
3039         * support/regression/ports/mcs51/spec.mk: added mcs51 include
3040
3041 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3042
3043         * device/include/8051.h,
3044         * device/include/8052.h,
3045         * device/include/at89S8252.h,
3046         * device/include/at89c55.h,
3047         * device/include/at89x051.h,
3048         * device/include/at89x51.h,
3049         * device/include/at89x52.h,
3050         * device/include/mcs51reg.h,
3051         * device/include/reg51.h,
3052         * device/include/reg764.h,
3053         * device/include/regc515c.h,
3054         * device/include/sab80515.h: (re)moved these 12 files
3055         * device/include/mcs51/8051.h,
3056         * device/include/mcs51/8052.h,
3057         * device/include/mcs51/at89S8252.h,
3058         * device/include/mcs51/at89c55.h,
3059         * device/include/mcs51/at89x051.h,
3060         * device/include/mcs51/at89x51.h,
3061         * device/include/mcs51/at89x52.h,
3062         * device/include/mcs51/mcs51reg.h,
3063         * device/include/mcs51/reg51.h,
3064         * device/include/mcs51/reg764.h,
3065         * device/include/mcs51/regc515c.h,
3066         * device/include/mcs51/sab80515.h: and added them here
3067
3068 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
3069
3070         * device/include/stdarg.h: changed SDCC specific keywords to double
3071           underlined form.
3072         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
3073           mcs51 and ds390.
3074         * device/include/hc08/mc68hc908gp32.h,
3075         * device/include/hc08/mc68hc908jb8.h,
3076         * device/include/hc08/mc68hc908jkjl.h,
3077         * device/include/hc08/mc68hc908qy.h: fixed comments
3078         * device/include/mcs51/README: updated
3079         * device/include/mcs51/c8051f120.h: added PINRSF
3080         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
3081         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
3082           amidst code. Also inline is not supported.
3083
3084 2005-04-06 Raphael Neider <rneider AT web.de>
3085
3086         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
3087         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
3088           callers stack/frame pointers
3089
3090 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
3091
3092         * device/include/pic16/usart.h: added, missing in previous commit,
3093         * device/include/pic16/adc.h: fixed typo,
3094         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
3095         commit,
3096         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
3097         <p18fxxx.inc>
3098         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
3099         uninitialized because a bug appears with gplink
3100         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
3101         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
3102         complains for unrecognised option
3103
3104 2005-04-05 Raphael Neider <rneider AT web.de>
3105
3106         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
3107           structs as well (using memcpy)
3108         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
3109           on ISRs (GOTO has no label)
3110         * src/pic16/device.h: added OF_OPTIMIZE_DF
3111         * src/pic16/main.c: added compiler switch --optimize-df to enable the
3112           new data flow analysis/optimization
3113         * src/pic16/pcode.c: added (prototypes for and implementation of)
3114           dataflow analysis functions, fixed pCodeInstructions' inCond and
3115           outCond values, made RCALL a branch instruction
3116         * (pic16_unlinkpCode): keep C line if possible
3117         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
3118           C line moved if possible
3119         * (pic16_getRegFrompCodeOp): NEW, improved version of...
3120         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
3121           to use new pic16_getRegFrompCodeOp (works for more SFRs)
3122         * (pic16_BuildFlow): fixed skip instructions with label (did not start
3123           new flow)
3124         * (pic16_getJumptabpCode): NEW, needed in...
3125         * (LinkFlow): fixed handling of jumptables, calls and conditional
3126           branches
3127         * (pic16_InsertCommentAfter): NEW
3128         * (pic16_pCodeReplace): made verbose and flow preserving
3129         * (AnalyzeFlow): added call to data flow analysis
3130         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
3131         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
3132         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
3133
3134 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3135
3136         * src/SDCCast.c (decorateType): fixed bug #1105626
3137
3138 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
3139
3140         * device/include/asm/pic16/features.h,
3141         * pic18f*.h headers,
3142         * device/include/pic16/adc.h,
3143         * device/include/pic16/delay.h,
3144         * device/include/pic16/i2c.h,
3145         * device/include/pic16/malloc.h,
3146         * device/include/pic16/stdio.h,
3147         * device/include/pic16/stdlib.h,
3148         * device/include/pic16/string.h,
3149         * device/lib/pic16/libc/stdio/printf_tiny.c,
3150         * device/lib/pic16/libc/stdio/printf_small.c,
3151         * device/lib/pic16/libc/stdio/strmgpsim.c,
3152         * device/lib/pic16/libc/stdio/strmmssp.c,
3153         * device/lib/pic16/libc/stdio/strmusart.c,
3154         * device/lib/pic16/libc/stdio/vfprintf.c,
3155         * device/lib/pic16/libc/stdlib/ltoa.c,
3156         * device/lib/pic16/libc/stdlib/putchar.c,
3157         * device/lib/pic16/libc/stdlib/x_ftoa.c,
3158         * device/lib/pic16/libc/stdlib/memchrpgm.c,
3159         * device/lib/pic16/libc/stdlib/memchrram.c,
3160         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
3161         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
3162         * device/lib/pic16/libio/adc/adcbusy.c,
3163         * device/lib/pic16/libio/adc/adcread.c,
3164         * device/lib/pic16/libio/adc/adcsetch.c,
3165         * device/lib/pic16/libio/usart/ubaud.c,
3166         * device/lib/pic16/libio/usart/ubusy.c,
3167         * device/lib/pic16/libio/usart/udrdy.c,
3168         * device/lib/pic16/libio/usart/uopen.c,
3169         * device/lib/pic16/libio/usart/uputc.c,
3170         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
3171         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
3172         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
3173         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
3174         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
3175         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3176         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3177         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3178         specific keywords to double underlined form,
3179         * device/lib/pic16/libc/Makefile.rules,
3180         * device/lib/pic16/libsdcc/Makefile.rules,
3181         * device/lib/pic16/libm/Makefile,
3182         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3183         to compile with C standard set in Makefile.common
3184         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3185         rand.c and crc.c in compilation process,
3186         * device/lib/pic16/libsdcc/int/divuint.c,
3187         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3188         `c' from signed to unsigned,
3189         * device/lib/pic16/startup/crt0.c,
3190         * device/lib/pic16/startup/crt0i.c,
3191         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3192         keywords to double underlined form, bug fixes in _do_cinit function
3193         which prevented the correct initialization of the .idata segment,
3194         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3195         core to enter a infinite loop
3196         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3197
3198 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3199
3200         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3201
3202 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3203
3204         * device/include/Makefile.in: add support for hc08 subdirectory
3205         * device/include/hc08/: new subdirectory
3206         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3207         Lucas Loizaga, thanks!
3208         * device/include/hc08/mc68hc908qy.h,
3209         * device/include/hc08/mc68hc908gp32.h,
3210         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3211         their own directory. Changed internal macro names to use the compiler
3212         reserved namespace. Changed SDCC specific keywords to double
3213         underlined form.
3214         * device/include/math.h,
3215         * device/include/malloc.h,
3216         * device/include/stdarg.h,
3217         * device/include/stdbool.h
3218         * device/include/string.h,
3219         * device/include/tinibios.h,
3220         * device/include/ds400rom.h,
3221         * device/include/8051.h,
3222         * device/include/8052.h,
3223         * device/include/80c51xa.h,
3224         * device/include/at89c55.h,
3225         * device/include/at89S8252.h,
3226         * device/include/at89x51.h,
3227         * device/include/at89x52.h,
3228         * device/include/ds80c390.h,
3229         * device/include/reg764.h,
3230         * device/include/regc515c.h,
3231         * device/include/sab80515.h,
3232         * device/include/mcs51/c8051f000.h,
3233         * device/include/mcs51/c8051f018.h,
3234         * device/include/mcs51/c8051f020.h,
3235         * device/include/mcs51/c8051f040.h,
3236         * device/include/mcs51/c8051f060.h,
3237         * device/include/mcs51/c8051f120.h,
3238         * device/include/mcs51/c8051f300.h,
3239         * device/include/mcs51/c8051f310.h,
3240         * device/include/mcs51/c8051f320.h,
3241         * device/include/mcs51/c8051f330.h,
3242         * device/include/mcs51/c8051f350.h,
3243         * device/include/z180.h: Changed SDCC specific keywords to double
3244         underlined form.
3245
3246 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
3247
3248         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
3249         18F4455,
3250         * (pic16_assignConfigWordValue): disable testing of configuration
3251         register value with config mask,
3252         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
3253         function with port->fun_prefix,
3254         * (genFunction): when generating a naked interrupt function never
3255         create an absolute segment placed in interrupt vector address, place
3256         the actual interrupt function at IVA instead, when an interrupt
3257         function is generated with unspecified interrupt then do not create
3258         the absolute section,
3259         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
3260         code for generating a call to generic pointer get/put function with
3261         a call to function pic16_callGenericPointer(),
3262         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
3263         the call to the generic pointer get/put functions with prefixing the
3264         function name with port->fun_prefix,
3265         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
3266         * src/pic16/main.c (_process_pragma): prefix function with
3267         port->fun_prefix,
3268         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
3269         calling assembler, old 18Fxxxx macro is deprecated,
3270         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
3271         PC_ASMDIR in while condition,
3272         * (findInstruction): add PC_ASMDIR in while condition,
3273         * (buildCallTree): prefix main with port->fun_prefix,
3274         * (pic16_pCode2str): fixed bug that didn't emit the memory access
3275         identifier for variable with banked access in instructions BTFSS,
3276         BTFSC, BCF, BSF, BTG
3277         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
3278         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
3279         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
3280         perform optimization when enviroment variable NO_REG_OPT is set,
3281         * (insideLRBlock): NEW, return 1 if register is inside an
3282         INF_LOCALREGS block,
3283         * (RemoveRegFromLRBlock): remove a register that is completely
3284         eliminated by register optimization, but it is still left in local
3285         register store/restore in/from stack block,
3286         * (Remove2pcodes): after removing register, check to see if it
3287         should be removed from local register store/restore in/from stack
3288         block,
3289         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
3290         DUMMY_READ_VOLATILE,
3291
3292         * device/include/pic16/adc.h: minor prototype modifications and
3293         update,
3294         * device/include/pic16/malloc.h: added GPL notice various
3295         modifications,
3296         * device/include/pic16/stdint.h: NEW, standard header for ints
3297         * device/include/pic16/delay.h: NEW, header for delay functions,
3298         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
3299         delay1mtcy,
3300         * device/include/pic16/signal.h: NEW, header providing helper macros
3301         for implementing signal handlers,
3302         * device/include/pic16/stdio.h: added prototypes for functions,
3303         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
3304         prototypes for stdin and stdout, added macro PUTCHAR to
3305         automatically implement putchar function prototype,
3306         * device/include/pic16/usart.h: modified and updated USART library,
3307         * device/lib/pic16/libio/adc/,
3308         * device/lib/pic16/libio/i2c: some modifications to improve library
3309         performance,
3310         * device/lib/pic16/libc/stdio/: modifications for the new printf*
3311         family of functions,
3312         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
3313         family of functions and other sources,
3314         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
3315         of the PIC18Fxx[28] devices,
3316         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
3317         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
3318         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
3319         _do_cinit function, because the previous failed when local variables
3320         where not placed in the same memory bank,
3321         * device/lib/pic16/libsdcc/char/: various modifications to improve
3322         library performance,
3323         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
3324         information on the new functions of the c library and more...
3325
3326 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3327
3328         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
3329
3330 2005-03-26 Raphael Neider <rneider AT web.de>
3331
3332         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
3333           if condition == CARRY)
3334         * (genCmp): adapted to new genSkipc semantics
3335         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
3336           on rIfx (genCmp was broken)
3337
3338 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3339
3340         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
3341         * src/z80/main.c (_keywords[]),
3342         * src/SDCCglobal.h (struct options),
3343         * src/SDCC.y,
3344         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
3345         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
3346         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
3347         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
3348         always available in leading double underscore form. The C99 support is
3349         mostly missing, but it's a start.
3350         * support/regression/tests/bug-227710.c: fixed nonconforming use of
3351         reserved identifier "__data".
3352
3353 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
3354
3355         * src/mcs51/peeph.def: fixed bug 1170013
3356
3357 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
3358
3359         * device/include/mcs51reg.h: fixed bug 842007
3360
3361 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3362
3363         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
3364         last time.
3365
3366 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3367
3368         * src/port.h (struct PORT),
3369         * src/avr/ralloc.c (avr_assignRegisters),
3370         * src/avr/main.c,
3371         * src/ds390/ralloc.c (ds390_assignRegisters),
3372         * src/ds390/main.c,
3373         * src/hc08/ralloc.c (hc08_assignRegisters),
3374         * src/hc08/main.c,
3375         * src/mcs51/ralloc.c (mcs51_assignRegisters),
3376         * src/mcs51/main.c,
3377         * src/pic/ralloc.c (pic14_assignRegisters),
3378         * src/pic/main.c,
3379         * src/pic16/ralloc.c (pic16_assignRegisters),
3380         * src/pic16/main.c,
3381         * src/xa51/ralloc.c (xa51_assignRegisters),
3382         * src/xa51/main.c,
3383         * src/z80/ralloc.c (z80_assignRegisters),
3384         * src/z80/ralloc.h,
3385         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
3386         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
3387         * src/SDCCcse.h,
3388         * src/SDCCdflow.c (computeDataFlow),
3389         * src/SDCCdflow.h,
3390         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
3391         * src/SDCCloop.h,
3392         * src/SDCCcflow.c (*),
3393         * src/SDCCcflow.h,
3394         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
3395         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
3396         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
3397         immedDom() returning wrong block; probably fixes bug #1160833)
3398
3399 2005-03-20 Borut Razem <borut.razem AT siol.net>
3400
3401         * support/scripts/inc2h.pl: WIN32 port
3402
3403 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
3404
3405         * device/lib/makefile.in: added abs.c and labs.c
3406
3407 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
3408
3409         * device/include/stdint.h: added
3410         * device/lib/abs.c: added
3411         * device/lib/labs.c: added
3412         * device/include/stdlib.h: added abs() and labs() prototypes
3413         * device/lib/libsdcc.lib: added abs and labs
3414         * device/include/float.h,
3415         * device/lib/_fsmul.c,
3416         * device/lib/printf_fast.c,
3417         * device/lib/printf_tiny.c: updated comments
3418
3419 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3420
3421         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
3422         bug #1164313
3423
3424 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3425
3426         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
3427         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
3428
3429 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
3430
3431         * device/lib/printf_large.c: removed inline assembly for portability and
3432           readability. Use printf_fast if speed or size are more important.
3433         * src/pic16/gen.c: removed conditions around use of DEBUGpc
3434         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
3435
3436 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
3437
3438         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
3439         prevent compiler warning
3440
3441 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
3442
3443         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
3444         moved to level 0 and declared as static. Also they are explicit
3445         placed in access bank. This was necessery because some times they
3446         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
3447         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
3448         optimizations. Currently only compare to unsigned char is implemented,
3449         * src/pic16/gen.c: added fReturnIdx array,
3450         * (struct resolvedIfx) is moved to gen.h and made public,
3451         * (struct _G): added sregsAlloc and sregsAllocSet fields,
3452         * (aopForSym): added an optimization to directly store in stack of
3453         the operand of a SEND iCode,
3454         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
3455         but as registers instead (AOP_REG) using the fReturnIdx array,
3456         * (pic16_freeAsmop): remove the freed register from the
3457         _G.sregsAlloc field,
3458         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
3459         a compare of 'WREG',
3460         * (pic16_popGetTempRegCond): changed function prototype, now
3461         function takes also a bitVector argument v which holds the current
3462         set of registers that are allocated for stack access by aopForSym,
3463         registers allocated in aopForSym for accessing stack symbols are not
3464         any more part of the functions usedRegs field,
3465         * (genCall): some times aopOp is called for a stack variable to be
3466         send, aopForSym might perform the push, if this is true make sure
3467         that genCall doesn't push the variable twice by testing _G.resDirect,
3468         * (genFunction): changed testing for unspecified interrupt number
3469         from 256 to INTNO_UNSPEC,
3470         * modified selection scheme of frame pointer generation. Previously
3471         if function did use local registers a frame pointer was generated,
3472         now a frame pointer is generated only if function has arguments
3473         (that need PLUSW2 register access), or has stack arguments, or the
3474         compiler is not instructed to omit the frame pointer,
3475         * (genEndFunction): before restoring local registers that were saved
3476         in the function preamble, also restore the registers that *might*
3477         have been allocated for stack access,
3478         * (genRet): removed some old comments,
3479         * (genCmp, the active (RN's) version): added a call to the
3480         pic16_genCmp_special function to perform the compare with a more
3481         robust and optimized way,
3482         * (genInline): a feature has been added in inline code generation,
3483         which allows a wildcard variable substitution when writing inline
3484         assembly. Code is incomplete and experimental therefore undocumented,
3485         * (genCast): changed order of aopOp for result and right to allow
3486         aopForSym to directly load the result if possible,
3487         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
3488         perform an optimized compare on some selected special occasions,
3489         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
3490         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
3491         generate an IVT any more,
3492         * src/pic16/main.c (pic16_optionsTable): added command line option
3493         --optimize-cmp,
3494         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
3495         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
3496         macros,
3497         * src/pic16/NOTES: Raphael Neider added in list of active developers
3498         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
3499         jumptable_end to prevent bug #,
3500         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
3501         inCond and outCond fields,
3502         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
3503         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
3504         turn off register spilling,
3505         * (packRegsForOneUse): synced with other ports' versions although it
3506         is not used currently,
3507         * (pic16_packRegisters): added an optimization while reading
3508         structure bitfields, some registers may be saved (malloc code is
3509         decreased by 80 bytes)
3510
3511 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
3512
3513         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
3514         left is a bitfield, if yes, then don't optimize assignment. Perhaps
3515         this can be optimized more?
3516
3517 2005-03-10 Raphael Neider <rneider AT web.de>
3518
3519         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
3520           genNearPointerGet): (hopefully) fixed access to bitfields via
3521           pointers (p->bitN = x; and x = p->bitN; failed)
3522
3523 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
3524
3525         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
3526
3527 2005-03-09 Raphael Neider <rneider AT web.de>
3528
3529         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
3530
3531 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
3532
3533         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
3534         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
3535           (regTypeNum): set REG_BIT type if necessary
3536         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
3537         * support/regression/tests/critical.c: check bug 1144613
3538
3539 2005-03-02 Raphael Neider <rneider AT web.de>
3540
3541         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
3542
3543 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3544
3545         * src/avr/ralloc.c (serialRegAssign),
3546         * src/ds390/ralloc.c (serialRegAssign),
3547         * src/hc08/ralloc.c (serialRegAssign),
3548         * src/mcs51/ralloc.c (serialRegAssign),
3549         * src/pic/ralloc.c (serialRegAssign),
3550         * src/pic16/ralloc.c (serialRegAssign),
3551         * src/xa51/ralloc.c (serialRegAssign),
3552         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
3553
3554 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
3555
3556         * src/SDCCast.c (decorateType): fixed bug 1124787
3557
3558 2005-02-20 Hubert Sack <sack AT digiplan.de>
3559         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3560
3561         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
3562         patch #1121755
3563
3564 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3565
3566         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
3567         to keep the correct label reference count when adding/removing references
3568         to labels. A peephole file using this is appended to patch #1144962.
3569
3570 2005-02-14 Raphael Neider <rneider AT web.de>
3571
3572         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
3573         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
3574         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
3575           retrievals of result operand's value on assignment
3576
3577 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
3578
3579         * device/include/pic16/string.h: modified prototype for memccpy()
3580         to memccpy(void *, void *, char, size_t)
3581         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
3582         check whether to omit frame pointer or not,
3583         * (genInline): convert all occurences of "\n" to LF in inline
3584         assembler blocks, this helps formatting the inline text,
3585         * (pic16_loadFSR0): modified prototype,
3586         * (genNearPointerGet, genNearPointerSet): reorganization of code,
3587         removed some 8051 legacy code,
3588         * (genPackBits): enabled handling bitfields exceeding one byte in size,
3589         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
3590         before allocating temporary registers in functions,
3591
3592 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3593
3594         * support/regression/tests/bitvars.c: corrected the "fix"
3595
3596 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3597
3598         * support/regression/tests/bitvars.c,
3599         * support/regression/tests/bitwise.c,
3600         * support/regression/tests/rotate.c: "fixed" problems on Alpha
3601
3602 2005-02-10 Raphael Neider <rneider AT web.de>
3603
3604         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3605           different size for Alpha
3606         * src/pic16/gen.c (genCmpEq) : improved compare with 0
3607
3608 2005-02-09 Raphael Neider <rneider AT web.de>
3609
3610         * src/SDCC.lex(doPragma) : save and restore warning options as well
3611           (also added new stack plus clone- and copyAndFreeSDCCERRG())
3612         * have #pragma less_pedantic set the errorlevel to WARNING
3613           (fixes #1117001)
3614         * (cloneOptimize) : fixed wrong malloc's size
3615         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3616           facilitate correct handling of #pragma (save|restore)
3617
3618 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3619
3620         * src/mcs51/gen.c: removed non-standard C nameless struct/union
3621
3622 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3623
3624         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3625
3626 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3627
3628         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3629
3630 2005-02-02 Raphael Neider <rneider AT web.de>
3631
3632         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3633         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3634         * (pic16_storeForReturn): fixed to allow returning function pointers
3635         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3636         * device/include/pic16/{stddef.h,stdbool.h}: added
3637
3638 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3639
3640         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3641
3642 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3643
3644         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3645         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3646          appeared to be required
3647
3648 2005-01-31 Borut Razem <borut.razem AT siol.net>
3649
3650         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3651           include/mcs51 and include/z80 directories to the package
3652
3653 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3654
3655         * src/hc08/gen.c (genFunction): fixed bug #1112752
3656
3657 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3658
3659         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
3660
3661 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3662
3663         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
3664
3665 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
3666
3667         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
3668
3669 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
3670
3671         * device/include/c8051fxxx.h: removed these 6 files
3672         * device/include/mcs51/c8051fxxx.h: added these 11 new files
3673
3674 2005-01-26 Raphael Neider <rneider AT web.de>
3675
3676         * src/pic16/gen.c (genAssign): fixed assignment from longs
3677           in codespace (were cut to three bytes)
3678         * (genDummyRead): implemented (except for CODESPACE...),
3679           fixed bug #1108575
3680         * src/pic16/glue.c (emitStatistics): beautified
3681         * device/lib/pic16/libm/Makefile: added include path
3682
3683 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3684
3685         * src/z80/gen.c (aopPut): fixed bug #1103902
3686
3687 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3688
3689         * device/lib/expf.c: fixed bug #1095792
3690
3691 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3692
3693         * device/lib/pic16/libm: added Math library sources
3694
3695 2005-01-24 Raphael Neider <rneider AT web.de>
3696
3697         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3698           to enable upcast to pCodeOpReg2 (there is no type tag to
3699           differenciate the two and pic16_popGet2p cast into PCOR2)
3700         * src/pic16/main.c (_process_pragma): fixed another malloc bug
3701           (sizeof(sectNames) changed to sizeof(sectName))
3702           Both patches fix segfaults under MinGW.
3703
3704 2005-01-23 Raphael Neider <rneider AT web.de>
3705
3706         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3707           Safe_[mc]?alloc()'ed variables
3708         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3709           of (byte sized) temporaries (assign them to WREG for now)
3710         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3711           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3712           this might fix SIGSEGVs on MinGW...
3713         * src/SDCCopt.c (killDeadCode): restored original behaviour
3714           (volatile operands might get thrown away though)
3715
3716 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3717
3718         * src/pic16/gen.c: fixed bug #1106975,
3719         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3720         pointer update, INTCON is saved, global interrupts are disabled and
3721         restored after updateing TOS.
3722         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3723         * added function attribute 'shadowregs' to take advantage of shadow
3724         registers,
3725         * added function attribute 'wparam' as an alternative to the wparam
3726         pragma,
3727         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3728         user declares a non-ISR function as 'shadowregs',
3729         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3730
3731 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3732
3733         * .version: bumped version number to 2.4.8
3734         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3735         pic16 port,
3736         * device/lib/pic16/libio/i2c/: I2C module support library,
3737         * device/include/pic16/i2c.h: I2C support library header,
3738         * device/lib/pic16/libc/stdio/: standard IO support sources,
3739         * (printf_small.c): printf_small() source, supports float print,
3740         * (printf_tiny.c): printf_tiny() source, does not support floats,
3741         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3742         enable global optimizations for entire library source, other
3743         Makefiles in the source tree are also modified to reflect this,
3744         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3745         function,
3746         * doc/sdccman.lyx: updated to reflect new changes,
3747         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3748         sym->onStack if-case,
3749         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3750         sbit, idata, _idata, xdata, _xdata,
3751         * added pragma library, to link an external library, (see doc),
3752         * removed command line options, --pomit-config-words, --pomit-ivt,
3753         --pleave-reset-vector,
3754         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3755         when calling assembler to reflect memory model used, also define
3756         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3757         reflect stack model used,
3758         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3759         on stack return NULL,
3760
3761 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3762
3763         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3764           of the operands is volatile. Fixes #1020220
3765
3766 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3767
3768         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3769         * (OptimizeRegUsage): make sure that there is really no other flow where
3770           the first pCode is used
3771
3772 2005-01-22 Raphael Neider <rneider AT web.de>
3773
3774         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3775           to fix #1106967 (pCode->seq are not set up correctly)
3776
3777 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3778
3779         * src/SDCCglue.c (glue): make sure code area is declared before the
3780         static initialization area.
3781
3782 2005-01-21 Raphael Neider <rneider AT web.de>
3783
3784         * device/lib/Makefile.in: fixed test for pic16 install dir
3785         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3786           optimizations
3787         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3788           added --optimize-goto compiler switch and pragma wparam documentation
3789         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3790         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3791           and PRODH closing bug #1071770 (peephole optimizer)
3792
3793 2005-01-19 Raphael Neider <rneider AT web.de>
3794
3795         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3796           cmdLine buffers (used when calling sdcpp...) are large enough
3797           (MAX_PATH=256 truncates arguments leading to system halts when
3798           used in MinGW...)
3799         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3800         * (genUminus): rewritten to for efficiency
3801         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3802           used uninitialized in some cases)
3803         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3804           copy the third byte from the int -- now assumes 0x80 (data memory)
3805         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3806           operands (genAddLit expects the iCode's operands to swapped as
3807           well), fixed leftover bytes (crashed for short left operands)
3808         * (pic16_genMinusDec): performance improvements, removed false
3809           PIC14 emitSKPNCs
3810         * (pic16_genMinus): fixed to cope with differently sized operands
3811         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3812           for --obanksel > 1
3813         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3814         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3815           new banksel optimization
3816         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3817           analysis for temporary registers (segfaults...)
3818         * src/pic16/peeph.def: added rule
3819
3820 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3821
3822         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3823         which converts a float number to its ASCII representation
3824         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3825         functions to convert the fractional and integer part of a float to ASCII,
3826         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3827         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3828         ram
3829         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3830         _STATMEM macros,
3831         * device/include/pic16/adc.h: added GPL info,
3832         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3833         a pCodeOp as tested operand,
3834         * (genNearPointerGet): optimized bit testing, does not use
3835         intermediate register for bit value, test directly instead with
3836         BTFSS, BTFSC, works only for single bits,
3837         * (genpic16Code): dump the name of the iCode in the asm,
3838         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3839         renamed to pic16_decodeOp,
3840         * (serialRegAssign): do not allocate a temporary register for iCode
3841         sequences that test a single bit for 1/0
3842
3843 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3844
3845         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3846         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3847         access stack and frame pointers. They are initially assigned to
3848         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3849         accessing SFRs. Updated all occurences of modification of stack or
3850         frame pointer in gen.c and pcode.c,
3851         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3852         assigning of a literal value to pointers,
3853         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3854         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3855         selected
3856
3857 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3858
3859         * doc/sdccman.lyx: update documentation about stack pragma, added
3860         some info for stack memory models
3861
3862 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3863
3864         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3865
3866 2005-01-08 Raphael Neider <rneider AT web.de>
3867
3868         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3869           udata sections to fix bug #1097823
3870
3871 2005-01-05 Raphael Neider <rneider AT web.de>
3872
3873         * src/pic16/gen.c (genGenericShift): added handling of differently
3874           sized left operand and result
3875
3876 2005-01-04 Raphael Neider <rneider AT web.de>
3877
3878         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3879         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3880           to hold the condition bit)
3881         * added new version of genCmp (old code available via #define)
3882         * added new version of genShiftLeft/genShiftRight in a generic
3883           way, now supports shifting by negative values
3884         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3885           shiftCount (expected by genGenericShift)
3886         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3887         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3888           dump
3889         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3890           is an invalid literal too...)
3891
3892 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3893
3894         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3895         from Raphael Neider,
3896         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3897         for 8-bit literals. This fixes some literal operands which are sign
3898         extended to 16-bits ints when instruction needs only 8-bits.
3899
3900 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3901
3902         * device/lib/logf.c: added mcs51 assembly version
3903         * device/lib/expf.c: added mcs51 assembly version
3904         * device/lib/_logexpf.c: new shared asm code for expf and logf
3905         * device/include/math.h: add defines for assembly math library
3906         * device/lib/Makefile.in: build new _logexpf.c
3907         * device/lib/libfloat.lib: use new _logexpf.c
3908
3909 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3910
3911         * src/pic/device.c
3912         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3913           device types which have less than 0x7f registers.
3914
3915 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3916
3917         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3918
3919 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3920
3921         * device/lib/printf_fast.c: only build on supported arch.
3922         * device/lib/printf_tiny.c: only build on supported arch.
3923         * device/lib/printf_fast_f.c: only build if asm float lib
3924         * device/lib/_fsget1arg.c: only build if asm float lib
3925         * device/lib/_fsget2args.c: only build if asm float lib
3926         * device/lib/_fsnormalize.c: only build if asm float lib
3927         * device/lib/_fsreturnval.c: only build if asm float lib
3928         * device/lib/_fsrshift.c: only build if asm float lib
3929         * device/lib/_fsswapargs.c: only build if asm float lib
3930         * device/include/stdio.h: don't provide print_fast,
3931           print_fast_f, print_tiny prototypes if --xstack used
3932
3933 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3934
3935         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3936         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3937           to the SOURCES
3938
3939 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3940
3941         * device/lib/printf_fast_f.c: same as printf_fast, but
3942           with floating point enabled
3943         * device/lib/printf_fast.c: minor tweaks
3944         * device/include/stdio.h: add printf_fast_f
3945
3946 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3947
3948         * src/SDCCmain.c: make --float-reent default for mcs51
3949         * device/lib/_fsadd.c: added mcs51 assembly version
3950         * device/lib/_fssub.c: added mcs51 assembly version
3951         * device/lib/_fsmul.c: added mcs51 assembly version
3952         * device/lib/_fsdiv.c: added mcs51 assembly version
3953         * device/lib/_fseq.c: added mcs51 assembly version
3954         * device/lib/_fsneq.c: added mcs51 assembly version
3955         * device/lib/_fsgt.c: added mcs51 assembly version
3956         * device/lib/_fslt.c: added mcs51 assembly version
3957         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3958         * device/lib/Makefile.in: add _fscmp to build
3959         * device/lib/libfloat.lib: add _fscmp to build
3960
3961 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3962
3963         * device/lib/_fs2slong.c: added mcs51 assembly version
3964         * device/lib/_fs2sint.c: added mcs51 assembly version
3965         * device/lib/_fs2schar.c: added mcs51 assembly version
3966         * device/lib/_fs2ulong.c: added mcs51 assembly version
3967         * device/lib/_fs2uint.c: added mcs51 assembly version
3968         * device/lib/_fs2uchar.c: added mcs51 assembly version
3969         * device/lib/_slong2fs.c: added mcs51 assembly version
3970         * device/lib/_sint2fs.c: added mcs51 assembly version
3971         * device/lib/_schar2fs.c: added mcs51 assembly version
3972         * device/lib/_ulong2fs.c: added mcs51 assembly version
3973         * device/lib/_uint2fs.c: added mcs51 assembly version
3974         * device/lib/_uchar2fs.c: added mcs51 assembly version
3975         * device/include/float.h: added #define to select asm vs c
3976
3977 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3978
3979         * device/lib/printf_fast.c: improvements to float output
3980         * device/include/float.h: add defines for assembly float library
3981         * device/lib/_fsget1arg.c: receive 1 float arg
3982         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3983         * device/lib/_fsnormalize.c: normalize a float
3984         * device/lib/_fsreturnval.c: return float, various helper routines
3985         * device/lib/_fsrshift.c: right shift a float's mantissa
3986         * device/lib/_fsswapargs.c: swap 2 floats
3987         * device/lib/Makefile.in: build these 6 new files for mcs51
3988         * device/lib/libfloat.lib: add these 6 files to the library
3989
3990 2004-12-26 Borut Razem <borut.razem AT siol.net>
3991
3992         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3993           built by gcc 3.4.2
3994
3995 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3996
3997         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3998           and fully reentrant and register bank neutral.
3999         * device/lib/printf_fast.c: added float (not enabled by default),
4000           added compact/slower integer (also not enabled by default),
4001           improved size/speed of fast integer code, other minor changes
4002         * device/include/stdio.h, device/lib/Makefile.in,
4003           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
4004
4005 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
4006
4007         * src/pic16/pcode.c: declaring variables other than at the start of a
4008           block is not supported in C by VC6.
4009
4010 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
4011
4012         * applied a previous patch from Raphael Neider that wasn't included
4013         in the previous commits, which fixes infinite loops within jumptable
4014         improvements,
4015         * made some fixes that previous patches introduced
4016
4017 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
4018
4019         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
4020         that fixes an issue with AOP_PCODE asmop's offset,
4021         * (pic16_popCopyReg): update instance field too,
4022         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
4023         function of pic port,
4024         * (genCmp, genAnd, genAssign),
4025         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
4026
4027 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
4028
4029         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
4030         variables initial values to idata section,
4031         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
4032         variables in some functions. This utilizes parmBytes field of iCode
4033         structure to hold the offset of the variable in stack. (might be
4034         able to use the stack field too?)
4035         * applied patch from Raphael Neider # ### , # ###
4036         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
4037         variable initial values in idata section,
4038         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
4039         for static variables with initial value
4040         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
4041         applied fix in while loop from Raphael Neider.
4042
4043 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
4044
4045         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
4046         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
4047         * src/ds390/ralloc.c (serialRegAssign): spill bits
4048         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
4049         * support/Util/SDCCerr.c,
4050         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
4051         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
4052         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
4053
4054 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
4055
4056         * device/include/sdcc-lib.h: inserted LGPL, added includes
4057           asm/ds390/features.h and asm/mcs51/features.h
4058         * device/include/asm/default/features.h,
4059         * device/include/asm/gbz80/features.h,
4060         * device/include/asm/z80/features.h: added empty _AUTOMEM
4061           and _STATMEM
4062         * device/include/asm/ds390/features.h,
4063         * device/include/asm/mcs51/features.h: added files with defines for
4064           _AUTOMEM and _STATMEM indicating automatic and static storage class
4065         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
4066         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
4067         * src/SDCCicode.c (geniCodeCast),
4068         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
4069         * src/SDCCloop.c (loopInduction): removed unused variable lr
4070         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
4071           to convertToFcall to include char modulo (RFE 1065037), added check
4072           if left operand is unsigned and use abs of literal value
4073         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
4074           as it doesn't work after conversion from peephole.def to peephole.rul
4075         * src/mcs51/gen.c (toBoolean): added check for size,
4076           (genModOneByte): optimized code for signed char modulo a literal
4077           power of 2 (thanks to Hubert Sack),
4078           (genRRC): removed unnecessary "clr c",
4079           (genRLC): replaced "add a,acc" with cheaper "rlc a"
4080         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
4081           jump optimization,
4082           swapped rules 256.c and 256.d,
4083           extended 256.d by using new multiple checks (thanks Erik),
4084           added rules 256.e and 256.f,
4085           updated rule 261.a and 261.b to new generated code
4086         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
4087
4088 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4089
4090         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
4091           induction related bugs, including first part of bug #1074377
4092
4093 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
4094
4095         * applied patch from bug-report #1076292,
4096         * applied patches for genAnd and Goto-optimizations for Raphael
4097         Neider,
4098         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
4099         dump a less iCode information,
4100         * src/pic16/device.h (pic16_options_t): added field debgen,
4101         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
4102         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
4103         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
4104         puclic,
4105         * (various functions): added macros FENTRY and FENTRY2 to functions,
4106         to emit function prologue,
4107         * (various functions): fixed indentation,
4108         * (genNearPointerGet): fixed loading of FSR0,
4109         * (genPackBits): applied patch from Raphael Neider to fix updating
4110         of FSR0 and touching only the modified bits,
4111         * src/pic16/genarith.c (various functions): added macros FENTRY to
4112         emit function prologue in comments,
4113         * src/pic16/pcode.h: added functions debugf2, debugf3,
4114         * src/pic16/ralloc.c: partial fix for packForPush caused
4115         segmentation fault,
4116
4117 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4118
4119         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
4120           <stsp AT users.sourceforge.net> with reversed byte order
4121         * support/regression/tests/rotate.c: added (ds390 skips some tests)
4122
4123 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4124
4125         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
4126           bug #1074377
4127         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
4128         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
4129
4130 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4131
4132         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
4133
4134 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4135
4136         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
4137           conditions,
4138           (setFromConditionArgs): friendly operand parser for peephole rules,
4139           (operandBaseName, operandsNotRelated): new peephole condition
4140           "operandsNotRelated" -- similar to "operandsNotSame", but takes
4141           architecture specific register naming into account, handles n-way
4142           comparisons, and supports quoted literals
4143         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
4144
4145 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4146
4147         * src/mcs51/peeph.def: fixed bug #1076940
4148
4149 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4150
4151         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
4152
4153 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4154
4155         Adding support for replacing ljmps with sjmps in jumptables
4156         generated for switch statements. For now you need to set the
4157         environment variable SDCC_SJMP_JUMPTABLE to enable this.
4158         Now 4 algorithms for mcs51 jumptable generation are used:
4159         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
4160         addresses loaded pc-relative for up to 112 cases and stack-pushing
4161         target addresses loaded with offset from dptr for up to 256 cases.
4162
4163         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
4164         * src/mcs51/main.c: adapted constants for switch table generation
4165         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
4166
4167 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
4168
4169         * device/lib/printf_large.c (_print_format): fixed bug 1073386
4170         * support/regression/tests/bug1057979.c: added test for bug 1073386
4171
4172 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4173
4174         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
4175         compilers
4176
4177 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4178
4179         * src/pic16/device.h,
4180         * src/pic16/genarith.c,
4181         * src/pic16/glue.c,
4182         * src/pic16/main.c,
4183         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4184
4185 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4186
4187         Large cummulative patch for pic16 port.
4188         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4189         to call when a stack overflow occurs,
4190         * (malloc.h): added CVS Id tag,
4191         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4192         variable,
4193         * added libc directory. The current version of LibC contains string
4194         functions, ctype functions and macros and some functions of the
4195         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4196         be extensively tested in the future. Standard disclaimer here.
4197         Library is not automatically build yet. But one can build it by
4198         invoking 'make' inside the libc directory.
4199         * added ADC library under libio. Preliminary version yet.
4200
4201         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4202         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4203         aopForRemat() now and not by pic16_aopOp(),
4204         * (pic16_popGetTempReg): removed warning messgae when allocating
4205         temporary registers, its a buggy feature and will be removed,
4206         * (pic16_popGet): set register instance field in AOP_CRY,
4207         * (pic16_outBitC): fixed for results in size greater than 1,
4208         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4209         * (pic16_storeForReturn): optimized return of 0,
4210         * (genCmp): experimental code for new genCmp which uses PIC18's
4211         special compare&skip instructions. Initial tests fail some times
4212         with variables grater than 1 byte in size, so new code is disabled,
4213         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
4214         a single bit,
4215         * (genCast): began a fix to optimize the casting of a bit to another
4216         bit, now assigning a bitfield to another bitfield will fail, sorry,
4217         * src/pic16/main.c: disabled the use of lr-support feature,
4218         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
4219         * added some function prototypes, added function _debugf prototype,
4220         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
4221         bits with offset (case PO_GPR_BIT),
4222         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
4223         command line,
4224         * (isBankInstruction): modified to return 0 for no banking instruction,
4225         and 1 for banking instruction,
4226         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
4227         caused stop processing pCodes after a inline assembly block,
4228         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
4229         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
4230         registers when it shouldn't,
4231         * src/pic16/ralloc.c (allocReg): add preliminary support for
4232         supporting a limited set of temporary registers,
4233
4234 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4235
4236         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
4237           genDataPointerSet): ensure assignments always copy in MSB to LSB
4238           order,
4239           (loadRegFromAop): recognize CLRH optimization,
4240           (genFunction): optimize RECEIVE iCodes in reentrant functions
4241
4242 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4243
4244         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
4245           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
4246           selected.
4247         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
4248         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
4249           contiguous with data
4250
4251 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4252
4253         * device/lib/_gptrget.c (_gptrget),
4254         * device/lib/_gptrgetc.c (_gptrgetc),
4255         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
4256           instead of sjmp to ret
4257         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
4258           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
4259
4260 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
4261
4262         * .version: bumped version to 2.4.7
4263         * device/lib/_gptrget.c (_gptrget): is now _naked
4264         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
4265         * device/lib/_gptrput.c (_gptrput): is now _naked
4266         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
4267           (createFunction): fixed xstack
4268         * src/SDCCglue.c (emitMaps): set allocation required for bit area
4269         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
4270           or bit either,
4271           (geniCodeCritical): store original interrupt state in an iTemp bit
4272           var unless stack-auto
4273         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
4274         * src/SDCCmain.c (setIncludePath): added include/target to search path
4275         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
4276         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
4277           prototype,
4278           (processFuncArgs): put bit vars in bit area
4279         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
4280           unsaveRBank): fixed xstack,
4281           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
4282           (genFunction, genEndFunction): fixed xstack,
4283           (genAssign): optimization don't walk backwards through mem
4284         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
4285         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
4286         * support/regression/Makefile: also make library (for stack-auto) when
4287           making "all" and added "test-mcs51-xstack-auto"
4288         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
4289         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
4290         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
4291         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
4292         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
4293           make-library by MAKE_LIBRARY
4294         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
4295           regression tests for xstack
4296         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
4297         * support/regression/tests/critical.c: test for critical on mcs51
4298
4299 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4300
4301         * support/regression/ports/ucz80/spec.mk: use include and lib files from
4302           built version of sdcc instead of installed version
4303
4304 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
4305
4306         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
4307         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
4308           vprintf.c now
4309         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
4310         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
4311           WARNING: remove device/lib/build/z80/printf.o by hand when
4312           updating from previous build!
4313         * device/lib/z80/printf.c: updated comment
4314         * support/regression/tests/bug1057979.c: test all ports now
4315         * support/regression/tests/bug1065458.c: file added
4316
4317 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4318
4319         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
4320           *_start and *_end symbols for static functions
4321
4322 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
4323
4324         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
4325           and search crt0.o in all library paths,
4326           (setIncludePath): proper handling of --nostdinc,
4327           (setLibPath): proper handling of --nostdlib
4328         * support/regression/Makefile,
4329         * support/regression/ports/ds390/spec.mk,
4330         * support/regression/ports/gbz80/spec.mk,
4331         * support/regression/ports/hc08/spec.mk,
4332         * support/regression/ports/mcs51/spec.mk,
4333         * support/regression/ports/mcs51-large/spec.mk,
4334         * support/regression/ports/mcs51-stack-auto/spec.mk,
4335         * support/regression/ports/z80/spec.mk: use include and lib files from
4336           built version of sdcc instead of installed version
4337         * doc/sdccman.lyx: fixed typo in --nostdinc
4338
4339 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
4340
4341         * src/pic/pcode.c,
4342         * src/pic/device.c,
4343         * src/pic/ralloc.c,
4344         * src/pic/gen.c : added support to generate code for struct bit fields.
4345
4346 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
4347
4348         * as/xa51/xa_version.h,
4349         * device/include/errno.h,
4350         * device/include/regc515c.h,
4351         * device/lib/_itoa.c,
4352         * device/lib/_ltoa.c,
4353         * device/lib/ser_ir_cts_rts.c,
4354         * sim/ucsim/xa.src/glob.cc,
4355         * sim/ucsim/xa.src/inst_gen.cc,
4356         * sim/ucsim/xa.src/xa_bit.cc,
4357         * sim/ucsim/xa.src/xa_sfr.cc,
4358         * sim/ucsim/z80.src/inst_dd.cc,
4359         * sim/ucsim/z80.src/inst_fdcb.cc,
4360         * support/scripts/keil2sdcc.pl,
4361         * src/pic16/pic16.dsp,
4362         * src/pic16/pic16a.dsp: corrected cvs line endings
4363         * device/lib/printf_large.c: fixed bug 1057979
4364         * src/pic16/gen.c: fixed non-C standard code
4365         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
4366         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
4367         * support/regression/ports/mcs51/support.c: reload T1 asap
4368         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
4369           pdata use and clear idata startup behaviour
4370         * support/regression/tests/bug1057979.c: added
4371
4372 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
4373
4374         * device/examples/ds390/ow390/ad26.h,
4375         * device/examples/ds390/ow390/cnt1d.h,
4376         * device/examples/ds390/ow390/crcutil.c,
4377         * device/examples/ds390/ow390/ownet.h,
4378         * device/examples/ds390/ow390/owsesu.c,
4379         * device/examples/ds390/ow390/swt12.h,
4380         * device/examples/ds390/ow390/swtoper.c,
4381         * device/examples/ds390/ow390/temp10.h,
4382         * device/examples/ds390/ow390/thermodl.c,
4383         * device/examples/ds390/tinitalk/tinitalk.dsp,
4384         * device/examples/ds390/tinitalk/tinitalk.dsw,
4385         * device/examples/mcs51/clock/hw.h,
4386         * device/examples/mcs51/simple2/go.bat,
4387         * device/examples/serialcomm/windows/serial.h,
4388         * device/examples/xa51/dummy.c,
4389         * device/examples/xa51/hello.c,
4390         * device/include/80c51xa.h,
4391         * device/include/at89x051.h: corrected cvs line endings
4392
4393 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
4394
4395         * src/pic16/main.c (options): added command line --gstack, to trace
4396         stack over/under flows,
4397         * added pragma 'wparam' to allow passing first byte of function
4398         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
4399         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
4400         call to __gstack_test function and sets up the symbol as extern,
4401         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
4402         * popaop): added call to pic16_testStackOverflow,
4403         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
4404         wparamList list,
4405         * (genCall, genPcall): now all parameters are passed via stack
4406         except in functions that are pass to wparam pragma in which WREG is
4407         used too,
4408         * (genPcall): REENTRANT flag is checked to see if variable prototype
4409         contains reentrant keyword, don't call a non-reentrant function, via
4410         a reentrant function pointer or vice versa, functions are never
4411         passed via WREG,
4412         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
4413         D.Winkler,
4414         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
4415         SIGSEGV when accessing a NULL register stucture,
4416         * (pic16_printGPointerType): modified to handle UPPER modifier for
4417         function initializers, changed prototype of function to simpler one,
4418         * (pic16_printIvalFuncPtr): check to see if function is already
4419         added in externs list,
4420         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
4421         optimized a move from W to SFR with a move to the same register
4422         later after a CALL,
4423         * device/lib/pic16/debug: NEW directory, contains debug features
4424         which are enabled when linking with libdebug.lib, currently command
4425         line option --gstack enables stack pointer tracing for over/under
4426         flow, corresponding sources are in debug/gstack
4427
4428 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
4429
4430         * doc/sdccman.lyx: updated SDCC version,
4431         * (PIC16 port): update list of command line options,
4432         * src/pic16/device.h (structure pic16_options_t): added field gstack
4433         to enable stack overflow tracing on push/pops,
4434         * src/pic16/device.c (statistics structure): added statistics
4435         structure,
4436         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
4437         pic16_dump_int_registers): increase statistics counters for each
4438         * variable which is encountered
4439         * (pic16_dump_usection): emit each .udata variable to its own udata
4440         section,
4441         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
4442         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
4443         parameters via stack, otherwise use old scheme,
4444         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
4445         assembler output file,
4446         * src/pic16/main.c: added command line options --gstack to enable
4447         push/pop tracing for stack overflow,
4448         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
4449         instructions): added size of each instruction,
4450         * (pic16_countInstruction): estimate size of instructions in
4451         the_pFile list, inline assembly blocks are not counted,
4452         * (pic16_FixRegisterBanking): trace previous register usage, when
4453         banksel optimizations is greater than 0, don't emit a redudant
4454         banksel directive,
4455
4456 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
4457
4458         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
4459         * src/pic16/ralloc.c : applied same fix for pic16.
4460         * src/pic/gen.c : tidied it up a little.
4461
4462 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4463
4464         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
4465         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
4466
4467 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4468
4469         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
4470
4471 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4472
4473         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
4474         non-reentrant function __modsint in the interrupt function (thus
4475         corrupting math operations during serial I/O)
4476         * device/lib/ser_ir.c: as above, changed buffersize
4477         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
4478         256.c,d for zeroing
4479         * doc/Makefile: added option -t for rsync
4480
4481 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4482
4483         * src/SDCCast.h (struct ast),
4484         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
4485
4486 2004-10-20 Borut Razem <borut.razem AT siol.net>
4487
4488         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
4489         package
4490
4491 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
4492
4493         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
4494         makefile targets,
4495         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
4496         support functions to replace long sequences of MOVFF's from access
4497         bank registers to stack and vice versa,
4498         * src/pic16/device.h: added new field opt_flags, where optimization
4499         flags can be set to enable certain features,
4500         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
4501         * pBlock, (genFunction, genEndFunction): surroung loop for
4502         saving/loading used registers in stack with PC_INFO pCodes,
4503         INF_LREGS. Code in between can then be optimized by pCode optimizer
4504         to support function calls,
4505         * (genDataPointerSet): fixed bug which loaded float fields in
4506         structures with corrupt data,
4507         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
4508         in a standard way debug info on stderr. Feature used for developing
4509         and debugging only,
4510         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
4511         obsolete chunks of code,
4512         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
4513         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
4514         * pic16/src/pcode.c (pic16_newpCodeInfo,
4515         * (pic16_newpCodeOpLocalRegs),
4516         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
4517         feature,
4518         * (pic16_pCodeConstString): printing of the initial value of a
4519         symbol as a comment is inhibited since parsing was already done by
4520         copyStr and output is corrupt,
4521         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
4522
4523 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4524
4525         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
4526
4527 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
4528
4529         * as/mcs51/lkarea.c: removed old K&R style,
4530           (lnksect): changed check on boundary error,
4531           (lnksect2): changed check on boundary error,
4532           (lnksect2): extend XSTK to end of page if size = 1
4533         * as/mcs51/lkmain.c: removed old K&R style,
4534           (Areas51): create l_IRAM symbol
4535         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
4536         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
4537           model-mcs51-stack-auto, added model-mcs51-xstack-auto
4538         * device/lib/_mullong.c: added version to be compiled with xstack
4539         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
4540         * device/lib/mcs51/crtxclear.asm: clear pdata as well
4541         * device/lib/mcs51/crtxstack.asm: fixed comment
4542         * src/SDCCglue.c: maxInterrupts defaults to 0,
4543           (emitMaps): added pdata,
4544           (createInterruptVect): (re)moved default,
4545           (glue): added pdata,
4546           (glue): moved __start__xstack to XSTK with default size 1
4547         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
4548           and options.float_rent when options.stackAuto is set,
4549           (linkEdit): only write XDATA_NAME if provided on command line
4550         * src/SDCCmem.h,
4551         * src/SDCCmem.c: added pdata
4552         * src/port.h: added pdata_name to PORT
4553         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
4554           (saveRegisters, unsaveRegisters): removed usage of B,
4555           (genMinus): fixed accumulator clash,
4556           (genJumpTab): added comment, this needs another look
4557         * src/mcs51/gen.c: added check for "B in use" paranoia,
4558           added pushB() and popB()
4559         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
4560           chance
4561         * src/avr/main.c,
4562         * src/ds390/main.c,
4563         * src/hc08/main.c,
4564         * src/mcs51/main.c,
4565         * src/pic/main.c,
4566         * src/pic16/main.c,
4567         * src/xa51/main.c,
4568         * src/z80/main.c: (reset_regparms) made void parameter explicit and
4569           added PSEG (PAG,XDATA) or NULL to port specifier
4570         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
4571         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
4572           (_mcs51_genInitStartup): removed __start__xstack equ,
4573           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
4574         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
4575         * src/z80/gen.c (_rleAppend): fixed warnings
4576         * support/regression/tests/zeropad.c: added pdata test
4577         * .version: bumped to 2.4.6
4578
4579 2004-10-17 Borut Razem <borut.razem AT siol.net>
4580
4581         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
4582         as a part of nightly build
4583
4584 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
4585
4586         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
4587         WREG holds the first byte function parameters,
4588         * (aopForSym): take special case for symbols which are in FARSPACE
4589         but in CODESPACE too,
4590         * (assignResultValue): modified to take into account _G.useWreg,
4591         * (genCall): don't use wreg for parameter passing when function is
4592         declared as reentrant, too, added optimization INCF to stack
4593         pointer when stack parameter count is 1,
4594         * (genFunction, genEndFunction): refurnished and fixed to not using
4595         wreg for passing parameters when function has varargs or is
4596         reentrant, fixed bug with symbol name compare for generating
4597         functions in absolute address,
4598         * (pic16_storeForReturn): refurnished,
4599         * (genCmp): began writing a new version of the function, not ready
4600         yet, therefore it is disabled,
4601         * (genAssign): do not read code memory when assigning a function to
4602         a pointer function,
4603         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
4604         array of characters, not pointer,
4605         * (pic16initialComments): in debug mode emit an .ident directive for
4606         the assembler,
4607         * (_process_pragma): emit a new warning type (internal to pic16)
4608         when setting stack to default length, emit a similar warning when
4609         placing a function at absolute address and address is not word aligned
4610         * (_pic16_parseOptions): added 'return TRUE' statement,
4611         * (_pic16_linkEdit): if compiling a source, then add the source's
4612         file object, first in the list of objects to link,
4613
4614 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
4615
4616         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
4617         * src/pic/main.c : removed VC warning.
4618         * src/pic/gen.c : changed comment.
4619
4620 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
4621
4622         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
4623         reference to a deprecated symbol _GPTRREG was causing failure to
4624         link. Thanks G. M. Gallant for the info.
4625
4626 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
4627
4628         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
4629         comments for Bugs item #954788.
4630
4631 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
4632
4633         * src/pic16/device.c (pic16_dump_gsection,
4634         * pic16_groupRegistersInSection): handle symbols declared to be in
4635         access bank differently,
4636         * src/pic16/gen.c (struct _G): added field resDirect,
4637         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
4638         send values read from stack directly to result and don't allocate
4639         temporary values,
4640         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
4641         same registers,
4642         * (pic16_sameRegsOfs): NEW,
4643         * (freeAsmop): if _G.resDirect is set then do not mark registers as
4644         free because they were not allocated from temporary pool,
4645         * pic16_popRegFromString): workaround to fix a problem with
4646         allocating variables twice or never,
4647         * (genGenPointerGet): using PRODL instead of FSR0H,
4648         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
4649         instead of FSR0H,
4650         * (genAssign): take advantage of the _G.resDirect flag,
4651         * (genCast): around line 11844, use mov2f instead of directly
4652         MOVFF'ing between operands to account for literal values,
4653         * src/pic16/genutils.c: some new debug functions for gpsim have been
4654         added,
4655         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
4656         float with integer part only,
4657         * src/pic16/main.c (_process_pragma): handle pragma udata access to
4658         place variables in access bank
4659         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
4660         updated sources to reflect recent changes in gen.c
4661
4662 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
4663
4664         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
4665         sources that searched for headers in installation path, now the
4666         device/include/pic16 is used,
4667         * src/pic16/glue.c (pic16glue),
4668         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
4669         .line directives if not in debug mode, this suppresses assembler's
4670         warnings for ignored directives
4671
4672 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
4673
4674         * src/port.h: made reset_regparms prototype void parameter explicit.
4675         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
4676         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
4677         * doc/sdccman.lyx: documented warning disabling and how to use
4678           printf_large to make it print floats.
4679         * device/include/stdbool.h: NEW
4680         * device/lib/_atof.c,
4681         * device/lib/_divuint.c,
4682         * device/lib/_divulong.c,
4683         * device/lib/expf.c,
4684         * device/lib/printf_large.c,
4685         * device/lib/sincosf.c,
4686         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
4687         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
4688           a completely reentrant lib.
4689
4690 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
4691
4692         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
4693         * device/include/pic16/stdio.h: fixed bug with colon
4694
4695 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
4696
4697         * device/include/pic16/stdio.h,
4698         * device/include/pic16/stdlib.h,
4699         * device/include/pic16/math.h: NEW
4700         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
4701         declared as _naked to reduce overhead
4702         * device/lib/Makefile.in (target port-specific-objects-pic16):
4703         changed * to *.* so to ignore the CVS directory,
4704         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4705         stacked variables back in stack,
4706         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4707         corruption
4708
4709 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4710
4711         * .version: bumped version number to 2.4.5
4712         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4713         * support/Util/SDCCerr.c (messages structure): added entry for
4714         W_POSSBUG2
4715
4716         Large cumulative patch for pic16 port and libraries.
4717         * device/include/pic16/sdcc-lib.h,
4718         * device/include/pic16/stdarg.h,
4719         * device/include/asm/pic16/features.h,
4720         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4721         * device/include/pic16/float.h: changes reentrant keyword with
4722         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4723         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4724         updated target build-libraries to include objects from gptr,
4725         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4726         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4727         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4728         all function headings,
4729         * src/SDCCmain.c: added global parameter userIncDirsSet,
4730         * (parseCmdLine): when option -I is encountered add directory to
4731         userIncDirsSet too,
4732         * src/version.awk: added space between control and long,
4733         * src/pic16/NOTES: added some notes for the port,
4734         * src/pic16/gen.c: added prototype for mov2fp function,
4735         * (fReturnpic16[]): properly named return value registers,
4736         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4737         * (aopForSym): added code to handle symbols with onStack flag set,
4738         symbols onStack are allocated PTRSIZE bytes,
4739         * (aopFreeAsmop): handles special case where asmops are stack objects,
4740         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4741         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4742         added argument lock to trace flaws in allocating temporary registers
4743         when developing port,
4744         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4745         * (pic16_popRegFromString): reenabled allocating a direct register
4746         from string,
4747         * (assignResultValue): various beautifications,
4748         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4749         referenced function argument,
4750         * (genIpush): reenabled to allow stacked arguments, handles only
4751         ic->parmPush iCodes,
4752         * (genCall, genPcall): major changes to allow for variable argument
4753         functions, fixed a bug with falsely restoring stack pointer after
4754         returning from call,
4755         * (genFunction): pending code for critical function,
4756         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4757         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4758         * (genNearPointerGet): fixed bug with indirect reading, was always
4759         reading from INDF0
4760         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4761         pointers,
4762         * (genAddrOf): rewrote code to take address of a stacked function parameter
4763         * (genCast): fixed casting to generic pointer type,
4764         * src/pic16/gen.h: added AOP_STA,
4765         * (struct asmop): added field stk,
4766         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4767         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4768         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4769         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4770         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4771         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4772         generic pointers,
4773         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4774         and library paths,
4775         * (pic16_port structure): generic pointer size is set to 3,
4776         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4777         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4778         compiler warning,
4779         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4780         operand is an iTemp,
4781
4782 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4783
4784         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4785         * debugger/mcs51/simi.c: addapt new syntax of s51
4786
4787 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4788
4789         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4790         * src/pic16/pcode.c: commented out some calls to free() in order to
4791         fix bug #989576,
4792
4793 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4794
4795         * src/SDCCicode.h,
4796         * src/SDCCicode.c (isiCodeInFunctionCall),
4797         * src/avr/ralloc.c (selectSpil),
4798         * src/pic/ralloc.c (selectSpil),
4799         * src/pic16/ralloc.c (selectSpil),
4800         * src/ds390/ralloc.c (selectSpil),
4801         * src/hc08/ralloc.c (selectSpil),
4802         * src/xa51/ralloc.c (selectSpil),
4803         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4804         stack in the middle of a function call sequence (fixes bug #1020268)
4805         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4806         costs associated with the minimum switch case.
4807
4808 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4809
4810         * src/SDCC.lex: fixed bug #1030549
4811
4812 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4813
4814         * src/SDCCcse.h (struct cseDef),
4815         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4816         over a function call if the CSE is derived from a symbol whose
4817         address has been taken (fixes bug #1029883)
4818         * support/regression/tests/bug-1029883: a new regression test for
4819         this bug
4820
4821 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4822
4823         * src/hc08/gen.c (emitinline): fixed bug #1029778
4824         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4825         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4826         and starts toward RFE #905167)
4827
4828 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4829
4830         * src/pic16/gen.c (mov2f): New function to move an operand to
4831         another without considering if it is a literal or a register,
4832         * (pic16_sameRegs): don't check if they are both AOP_REG,
4833         * (AccRsh): removed andmask=0 lines,
4834         * (genLeftShift): duplicated to be improved in future versions,
4835         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4836         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4837         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4838         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4839         * (insertBankSwitch): fixed inserting banksel directives algorithm
4840         for instructions that follow a skip instruction, this fixes a report
4841         for broken subtraction code generation,
4842         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4843         iCode is a left op, just in case result and right share the same
4844         registers
4845
4846 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4847
4848         * src/hc08/main.c,
4849         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4850         preservation of HX
4851         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4852         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4853         on 2004-09-12; it was buggy
4854
4855 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4856
4857         * src/SDCCsymt.h: removed RESULT_CHECK
4858         * src/SDCCast.c,
4859         * src/SDCCglue.c,
4860         * src/SDCCval.c,
4861         * src/pic/glue.c,
4862         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4863
4864 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4865
4866         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4867         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4868         configuration values no more rejected by compiler, they are assigned
4869         to configuration registers with a warning message instead,
4870         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4871         the for-loop so last conf register is emitted too,
4872         * (_pic16_initPaths): link library libsdcc.lib by default,
4873         * (_hasNativeMulFor): modified test for multiplication according to
4874         Raphael Neider's remarks. Integer multiplication is also done with
4875         support functions,
4876         * device/include/pic16/pic18fregs.h: corrected type error in while
4877         testing and including 18f6720 header file
4878
4879 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4880
4881         * src/pic16/device.h (pic16_options): removed field use_crt,
4882         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4883         until an optimization to handle single bits is added,
4884         * (pic16_loadFSR0): moved before genUnpackBits,
4885         * (genAnd): some white lines removed,
4886         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4887         leave_reset flags in pic16_options when using crt modules,
4888
4889 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4890
4891         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4892           for bugs 898889 & 979599. Also used some safer print instructions.
4893
4894 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4895
4896         * src/pic16/device.h (pic16_options_t): added field use_crt,
4897         crt_name, no_crt,
4898         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4899         catch a probable future bug,
4900         * src/pic16/gen.c: aopIdx function commented out,
4901         * (genAssign): commented out old code which used aopIdx,
4902         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4903         code, added if conditionals to take into account the --use-crt
4904         command line options,
4905         * src/pic16/main.c (pic16_optionsTable): added new command line
4906         options, --use-crt= and --no-crt,
4907         * (_pic16_linkEdit): now the proper crt object is added in the
4908         linker command line except than when --no-crt is specified,
4909         * src/pic16/pcode.c,
4910         * src/pic16/pcode.h: added some structures and functions for a new
4911         optimization scheme to compansate for instruction overhead between
4912         same iCodes, this scheme is currently under development and is not
4913         working in any way,
4914         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4915         to && operator,
4916         * device/lib/pic16/startup/crt0i.c,
4917         * device/lib/pic16/startup/crt0iz.c: added global char variable
4918         __uflags to force the generation of an idata section
4919
4920 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4921
4922         * doc/Makefile,
4923         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4924         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4925
4926 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4927
4928         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4929         Frieder) and clarified the default code optimization mode
4930
4931 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4932
4933         * src/SDCC.lex (doPragma, process_pragma),
4934         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4935         "opt_code_size", and "opt_code_balanced"
4936         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4937         regrouped options by category, added support for category headers
4938         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4939         and "--opt-code-size"
4940         * doc/sdccman.lyx: documented these new options and pragmas
4941         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4942         preference into account
4943
4944 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4945
4946         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4947           geniCodePreDec): Fixed bug 904237 by generating a warning
4948         * src/SDCCerr.h,
4949         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4950
4951 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4952
4953         * src/pic/device.c : When no max ram set validate full memory range.
4954         * src/pic/pcode.c,
4955         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4956
4957 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4958
4959         * device/lib/_gptrget.c,
4960         * device/lib/_gptrput.c: updated comment
4961         * device/lib/calloc.c,
4962         * device/lib/free.c,
4963         * device/lib/malloc.c,
4964         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4965         * src/SDCCcse.c (cseBBlock),
4966         * src/SDCCicode.c (printOperand, geniCodeArray),
4967         * src/SDCCicode.h (struct operand): fixed bug 868103
4968         * support/regression/tests/bug-868103.c: added
4969         * src/SDCCast.c (searchLitOp),
4970         * src/SDCCcse.h (struct cseDef),
4971         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4972         * src/SDCCicode.h (struct operand),
4973         * src/SDCCsymt.h (struct sym_link),
4974         * src/avr/gen.c (hasInc),
4975         * src/ds390/gen.c (hasInc),
4976         * src/hc08/gen.c (genPlusIncr, hasInc),
4977         * src/mcs51/gen.c (hasInc),
4978         * src/pic16/glue.c (pic16_printIvalChar),
4979         * src/pic16/ralloc.c (regWithIdx),
4980         * src/xa51/gen.c (hasInc) : removed warnings
4981         * src/SDCCast.c (createBlock): added comment ???
4982         * src/hc08/ralloc.c: updated comments
4983
4984 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4985
4986         * doc/sdccman.lyx: updated section on switch statements, added
4987         section about semaphore locking
4988         * doc/Makefile: added option -info for latex2html
4989         * device/lib/_gptrget.c,
4990         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4991
4992 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4993
4994         * src/pic/device.h,
4995         * src/pic/device.c,
4996         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4997          maxram is less than 0x100.
4998
4999 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5000
5001         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
5002
5003 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5004
5005         * src/port.h,
5006         * src/mcs51/main.c,
5007         * src/ds390/main.c,
5008         * src/z80/main.c,
5009         * src/hc08/main.c,
5010         * src/pic/main.c,
5011         * src/pic16/main.c,
5012         * src/avr/main.c,
5013         * src/xa51/main.c
5014         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
5015         a jump table is the best form for a switch statement, including
5016         automatic insertion of missing cases to make the case range
5017         continuous. Developed in collaboration with Frieder Ferlemann.
5018
5019 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5020
5021         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
5022         accumulator result if it needs sign extension
5023
5024 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5025
5026         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
5027
5028 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5029
5030         * device/lib/gbz80/printf.c,
5031         * device/lib/z80/printf.c: removed define for NULL
5032
5033 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5034
5035         * as/xa51/xa_link.c,
5036         * device/examples/ds390/ow390/ad26.c,
5037         * device/examples/ds390/ow390/cnt1d.c,
5038         * device/examples/ds390/ow390/counter.c,
5039         * device/examples/ds390/ow390/ds2480.h,
5040         * device/examples/ds390/ow390/ds2480ut.c,
5041         * device/examples/ds390/ow390/findtype.c,
5042         * device/examples/ds390/ow390/gethumd.c,
5043         * device/examples/ds390/ow390/owllu.c,
5044         * device/examples/ds390/ow390/ownetu.c,
5045         * device/examples/ds390/ow390/swt12.c,
5046         * device/examples/ds390/ow390/swtloop.c,
5047         * device/examples/ds390/ow390/temp.c,
5048         * device/examples/ds390/ow390/temp10.c,
5049         * device/examples/ds390/ow390/thermo21.c,
5050         * device/examples/ds390/ow390/tinilnk.c,
5051         * device/examples/ds390/ow390/tstfind.c,
5052         * device/examples/serialcomm/windows/serial.cpp,
5053         * device/examples/serialcomm/windows/test_serialcomm.cpp,
5054         * device/include/reg51.h: fixed line endings for cvs
5055
5056 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5057
5058         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
5059         packRegsForAccUse, packRegisters): new accumulator register
5060         packing algorithm
5061         * support/regression/ports/hc08/support.c (_putchar): suppress
5062         warning of unused variable
5063         * src/SDCCicode.c: added SWAP entry to codeTable
5064
5065 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
5066
5067         * device/lib/sprintf.c: forgot to add this file before previous commit
5068
5069 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
5070
5071         * src/pic16/gen.c (genPackBits): added operand right in function
5072         parameters, load result directly if p_type is POINTER (that is
5073         called by genNearPointerSet)
5074         * (genUnPackBits): added operand left in function parameters,
5075         * (genNearPointerGet, genNearPointerSet): prevent the loading of
5076         FSR0 if accessing bitfields,
5077
5078 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
5079
5080         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
5081           _print_format; updated printf, sprintf, vsprintf
5082         * device/include/asm/default/features.h: corrected comment/define
5083         * device/lib/Makefile.in: added sprintf.c
5084         * device/lib/libsdcc.lib: added sprintf module
5085         * device/lib/printf_large.c,
5086         * device/lib/vprintf.c,
5087         * device/lib/sprintf.c: totally refactored printf_large and vprintf
5088           into these 3 files
5089         * support/regression/Makefile: changed ALL_PORTS into a usefull default
5090         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
5091         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
5092           hc08 test
5093         * support/regression/tests/zeropad.c: define idata as data for hc08
5094
5095 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5096
5097         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
5098         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
5099         labels are referenced at least once (even if a reference is not found)
5100         * src/hc08/gen.c (emitcode): set isComment flag for comments
5101         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
5102         loads), rules 6a..6b (optimize jumps to return)
5103
5104 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5105
5106         * device/lib/acosf.c (acosf),
5107         * device/lib/asinf.c (asinf),
5108         * device/lib/atanf.c (atanf),
5109         * device/lib/ceilf.c (ceilf),
5110         * device/lib/cosf.c (cosf),
5111         * device/lib/coshf.c (coshf),
5112         * device/lib/cotf.c (cotf),
5113         * device/lib/fabsf.c (fabsf),
5114         * device/lib/floorf.c (floorf),
5115         * device/lib/log10f.c (log10f),
5116         * device/lib/logf.c (logf),
5117         * device/lib/sinf.c (sinf),
5118         * device/lib/sinhf.c (sinhf),
5119         * device/lib/sqrtf.c (sqrtf),
5120         * device/lib/tanf.c (tanf),
5121         * device/lib/tanhf.c (tanhf),
5122         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
5123         replaced all instances of "reentrant" in the library functions
5124         defined in math.h with this macro.
5125         * support/regression/tests/float_trans.c: reenabled test for hc08
5126
5127 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
5128
5129         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
5130         erroneously deleted
5131
5132 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5133
5134         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
5135         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
5136         multi-byte volatile operands are used
5137         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
5138         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
5139         initialization to area GSINIT0 so that it would always precede
5140         any static initializers in GSINIT
5141         * support/regression/tests/zeropad.c: fixed idata define for hc08
5142         * support/regression/tests/bug-927659.c,
5143         * support/regression/tests/float_trans.c: disabled tests for hc08
5144         pending missing library routines
5145         * .version: increased version number to 2.4.4 - hc08 port now passes
5146         regression tests
5147
5148
5149 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
5150
5151         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
5152         * Makefile.common.in,
5153         * as/Makefile,
5154         * as/hc08/Makefile.in,
5155         * as/mcs51/Makefile.in,
5156         * as/z80/Makefile.in,
5157         * debugger/mcs51/Makefile.in,
5158         * device/include/Makefile.in,
5159         * device/lib/Makefile.in,
5160         * doc/Makefile,
5161         * link/Makefile,
5162         * link/z80/Makefile.in,
5163         * packihx/Makefile.in,
5164         * sim/ucsim/main_in.mk,
5165         * sim/ucsim/avr.src/Makefile.in,
5166         * sim/ucsim/doc/Makefile.in,
5167         * sim/ucsim/gui.src/serio.src/Makefile.in,
5168         * sim/ucsim/hc08.src/Makefile.in,
5169         * sim/ucsim/s51.src/Makefile.in,
5170         * sim/ucsim/xa.src/Makefile.in,
5171         * sim/ucsim/z80.src/Makefile.in,
5172         * src/Makefile.in,
5173         * support/cpp2/Makefile.in,
5174         * support/librarian/Makefile,
5175         * support/makebin/Makefile: added DESTDIR to the install path proposed
5176         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5177         * doc/sdccman.lyx: added DESTDIR documentation
5178
5179 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5180
5181         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5182         instruction for interrupt handlers, use fast returns when returning
5183         from high priority interrupts
5184
5185 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5186
5187         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5188         code generation
5189         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5190         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5191         bugs, ported much of Bernhard's code from mcs51
5192         * src/mcs51/gen.c (genSend),
5193         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5194         than one when calling a reentrant function
5195         * device/lib/_mullong.c: defined an alternate struct layout for big
5196         endian ports (hc08)
5197
5198 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5199
5200         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5201         test
5202
5203 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5204
5205         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5206         are sane and complete before asking the port its prefered parameter
5207         passing method (fixes bug #1017633)
5208         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5209         and _ret3
5210
5211 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5212
5213         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
5214         problem in bitfields >= 8 bits.
5215
5216 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5217
5218         * src/SDCCsymt.c: undid changes that were not meant to be committed
5219
5220 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5221
5222         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
5223
5224 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5225
5226         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
5227           copied and wrong bit got inverted
5228
5229 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5230
5231         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
5232         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
5233         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
5234         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
5235         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
5236         assignments to bitfields at known addresses
5237         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
5238         reads from bitfields at known addresses
5239         * src/hc08/ralloc.c (packRegisters),
5240         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
5241         genhc08Code): optimize pointer get values used as conditionals
5242         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
5243         and branch
5244
5245 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5246
5247         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
5248         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
5249         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
5250         as conditionals
5251
5252 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5253
5254         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
5255
5256 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5257
5258         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
5259         related problems
5260
5261 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
5262
5263         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
5264
5265 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5266
5267         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
5268         mcs51 port
5269
5270 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
5271
5272         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
5273
5274 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5275
5276         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
5277         cases use more compact code.
5278
5279 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
5280
5281         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
5282
5283 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5284
5285         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
5286
5287 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5288
5289         * src/SDCCsymt.h,
5290         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
5291         parameter of changePointer() from symbol* to sym_link*
5292         * src/SDCCast.c (decorateType): call changePointer() for CAST op
5293         * src/SDCCsymt.c (compareType): void* type is castable to other
5294         pointers, but not necesarily an exact match.
5295         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
5296         is no longer blindly treated as an exact match.
5297         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
5298
5299 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
5300
5301         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
5302
5303 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
5304
5305         * src/pic/gen.c,
5306         * src/pic/pcode.c,
5307         * src/pic/ralloc.h,
5308         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
5309
5310 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
5311
5312         * src/pic/device.c,
5313         * src/pic/device.h,
5314         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
5315
5316 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5317
5318         * src/mcs51/gen.c (emitcode): fixed bug #992819
5319
5320 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
5321
5322         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
5323           there's no need to make it worse
5324
5325 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5326
5327         * src/mcs51/ralloc.c (deassignLR),
5328         * src/ds390/ralloc.c (deassignLR),
5329         * src/hc08/ralloc.c (deassignLR),
5330         * src/z80/ralloc.c (deassignLR),
5331         * src/pic/ralloc.c (deassignLR),
5332         * src/pic16/ralloc.c (deassignLR),
5333         * src/avr/ralloc.c (deassignLR),
5334         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
5335         rlivePoint): fixed another part of bug #971834
5336
5337 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5338
5339         * src/z80/main.c: enabled "critical" keyword
5340         * src/z80/mappings.i,
5341         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
5342         functions (fixes bug #979646)
5343         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
5344
5345 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5346
5347         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
5348           such as c:\mydir.
5349
5350 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
5351
5352         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
5353           doesn't disable too much optimizations
5354
5355 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5356
5357         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
5358
5359 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
5360
5361         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
5362
5363 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5364
5365         * src/pic/gen.c tidied up tabs
5366         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
5367         * src/pic/main.c tidied up tabs
5368         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
5369         * src/pic/pcoderegs.c tidied up tabs
5370         * src/pic/ralloc.c tidied up tabs
5371
5372 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
5373
5374         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
5375         to S_FIXED for pic16 port and when symbol is not in level 0,
5376         allocate for S_REGISTER storage class and pic16 port, too,
5377         * src/pic16/device.h: prototype for checkSym,
5378         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
5379         * (pic16_assignConfigWordValue): test the value and the mask to
5380         validate that the value is suitable for the configuration word,
5381         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
5382         collect extern declared symbols, don't emit symbol twice, check
5383         first if symbol is in publics set first,
5384         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
5385         * added command line '--fstack' which enables an experimental
5386         feature for stack access, too buggy to be used yet...
5387         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
5388         * (pic16_allocDirReg): when register has storage class S_REGISTER
5389         allocate in pic16_dynAccessRegs,
5390         * device/include/pic16/pic18f????.h: modified configuration word
5391         naming convention, words started as CONFIG0H but should be CONFIG1H
5392
5393 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
5394
5395         * device/include/mcs51reg.h: fixed bug 970993
5396
5397 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
5398
5399         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
5400         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
5401         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
5402         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
5403         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
5404         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
5405           error/warning numbers,
5406           added function setWarningDisabled()
5407         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
5408         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
5409           _memcmp.c _memmove.c calloc.c realloc.c free.c
5410         * support/regression/tests/malloc.c: added tests for new functionality
5411         * support/regression/tests/zeropad.c: added tests for truncated initializers
5412           and initialized char arrays starting with '\x0'
5413         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
5414
5415 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
5416
5417         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
5418
5419 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5420
5421         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
5422         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
5423         peephole 177.e. Thanks to anonymous
5424
5425 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
5426
5427         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
5428         function isn't used in the source but referenced as a
5429         variable initializer then declare it as extern in .asm file
5430
5431 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
5432
5433         * .version: increased version number to 2.4.3
5434
5435         Adding version extension according to ChangeLog CVS revision
5436         * src/Makefile.in (target all): added dependency 'version.h'
5437         * (rule version.h): added rule to create version.h from ChangeLog,
5438         * (rule dep): added dependency version.h,
5439         * src/version.awk: AWK script to create version.h
5440         * src/SDCCdwarf2.c (dwWriteModule),
5441         * src/SDCCglue.c (initialComments),
5442         * src/SDCCmain.c (printVersionInfo): modified to write after
5443         version string the version extension number,
5444         * src/SDCCutil.c: included "version.h"
5445         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
5446         number,
5447         * src/SDCCutil.h: added prototype for getBuildNumber
5448
5449         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
5450         includeDirsSet, too,
5451         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
5452         const char [] is found in function prototype...
5453
5454         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
5455         moving to WREG with source is already in WREG,
5456         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
5457         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
5458         * (aopForSym): stack'ed symbols are partially supported, added
5459         if-clause to support symbols in FARSPACE,
5460         * (sameRegs): added test for AOP_ACC to see if registers are same,
5461         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
5462         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
5463         * (pic16_popRegFromString): will not allocate a new register if it
5464         doesn't find one by name, bug may have introduced...
5465         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
5466         * (genIpush): revived to use pic16 port's stack,
5467         * (genAddrOf): added incomplete case for stack'ed operand,
5468         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
5469         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
5470         can handle multibyte operands,
5471         * src/pic16/glue.c (pic16_printIval*): some debug info added,
5472         * (pic16initialComments): added message for MPLAB compatibility
5473         mode enabled,
5474         * src/pic16/main.h: prototype for pic16_mplab_comp,
5475         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
5476         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
5477         * (_pic16_linkEdit): NEW, handles link stage, transferred here
5478         because of increased complexity of procedure,
5479         * (_process_pragma): stack pragma changed to format 'stack pos len',
5480         emit symbol '_stack_end' to conform with gplink,
5481         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
5482         to search for register,
5483         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
5484         PO_GPR_REGISTER,
5485         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
5486         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
5487         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5488         case for PO_GPR_REGISTER,
5489         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
5490         dies, the new era is ahead !...
5491         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
5492         pic16_dynInternalRegs,
5493         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
5494         * (pic16_allocDirReg): minor optimizations and bug fixes,
5495         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
5496
5497         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
5498         load stack and frame pointer with address of 'stack_end' symbol
5499
5500 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
5501
5502         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
5503         without source code but only variable initializers
5504
5505 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
5506
5507         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
5508         external are not declared as extern to reduce overhead while linking
5509
5510 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
5511
5512         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
5513
5514 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
5515
5516         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
5517           Yee Keat for the patch
5518         * src/SDCCast.c (decorateType): fixed bug #979599
5519         * src/ds390/gen.h: removed local fReturnSizeDS390
5520         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
5521         * src/ds390/gen.c (genAnd, genOr, genXor),
5522         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
5523
5524 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
5525
5526         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
5527         add relFilesSet to $3, manipulate $2 to handle linking of object
5528         files without source files in command line,
5529         * device/include/pic16 (all headers): added ID location macros,
5530         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
5531         entries for ID location bytes,
5532         * (pic16_assignIdByteValue): NEW,
5533         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
5534         added field dumpcalltree to pic16_options_t,
5535         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
5536         is used instead of pic16_Gstack_base_addr, check if (ifx) before
5537         emitting rFalseIfx label after check_carry label,
5538         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
5539         pic16_emitDIRegs), NEW
5540         * (pic16glue): dump .calltree file when option --calltree found,
5541         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
5542         * (_pic16_genAssemblerPreamble): emit ID locations after
5543         configuration registers,
5544         * (pic16_linkCmd): modifications of the link command,
5545         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
5546         * (pic16_pCodeInitRegisters): don't init stack registers,
5547         * (pic16_findPrevInstruction): fixed bug,
5548         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
5549         bug with immediate registers,
5550         * (buildCallTree): traces stack push and pop,
5551         * (pct2): dump also stack usage for each function,
5552         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
5553         * (pic16_allocDirReg): various modifications,
5554         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
5555         fixed to 1,
5556
5557 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
5558
5559         * src/pic16/pcode.c: removed buggy double colon
5560
5561 2004-07-01 Borut Razem <borut.razem AT siol.net>
5562
5563         * support/scripts/sdcc.nsi: added include/pic16 to setup
5564
5565 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
5566
5567         * device/lib/Makefile.in: fixed bug in target objects-pic16,
5568         * device/lib/pic16/Makefile: prefixed with dash (-) command under
5569         target 'clean',
5570         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
5571         specific command line arguments. Also added sample lkr script
5572         for placing a variable at a specific memory bank.
5573         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
5574         at a specific memory bank,
5575         * (pic16_dump_isection): fixed bug which caused string literals to
5576         be omitted when dumping idata section,
5577         * (pic16_groupRegistersInSection): added code to handle registers
5578         in specific memory banks,
5579         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
5580         public, all references are renamed too,
5581         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
5582         AOP_DPTR2,
5583         * (pic16_storeForReturn): added case to handle when dest is WREG,
5584         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
5585         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
5586         pic16_rel_udata, check to see if that register is marked as being
5587         a member of a specific memory bank,
5588         * (pic16_printIvalCharPtr): added code to add string literals either
5589         to code or the idata sections,
5590         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
5591         also accept the 'udata' pragma,
5592         * src/pic16/main.h: new structure types sectName and sectSym
5593         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
5594         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
5595         * (pic16_findPrevInstruction): fixed, it returned nothing,
5596         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
5597         instruction combinations,
5598         * (pic16_FixRegisterBanking): heavily reorganised,
5599         * (pic16_AnalyzeBanking): if generating banksel directives is
5600         disabled, then don't call FixRegisterBanking at all,
5601         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
5602         completely removed,
5603         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
5604
5605 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
5606
5607         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
5608         Phuah Yee Keat <yk.phuah AT nestac.com>
5609
5610 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5611
5612         * src/pic16/glue.c (pic16createInterruptVect): function now emits
5613         correctly the IVT even if it is relocated to some other location
5614
5615 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5616
5617         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
5618         * device/include/pic16/pic18f2220.h: NEW,
5619         * device/lib/pic16/libdev/pic18f2220.c: NEW,
5620         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
5621         * src/pic16/device.c (struct Pics16): added info for 18f2220,
5622         * src/pic16/device.h (struct pic16_options): added ivt_loc and
5623         nodefaultlibs, ivt_loc is the location of the interrupt vector
5624         table, and nodefaultlibs signs that default libraries should not be
5625         linked in link stage,
5626         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
5627         according to --ivt-loc argument,
5628         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
5629         when pragma stack is found,
5630
5631 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5632
5633         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
5634         256 (range check), 257 (do while), 258.a-f (bit banging
5635         f.e. on 3-wire SPI bus)
5636
5637 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5638
5639         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
5640         variables used exclusively within a loop
5641
5642 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
5643
5644         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
5645
5646 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5647
5648         * src/SDCClrange.c (computeClash): fixed bug #971834
5649
5650 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5651
5652         * src/mcs51/gen.c (genCmp): fixed bug #975903
5653         * src/hc08/gen.c (operandsEqu),
5654         * src/ds390/gen.c (operandsEqu),
5655         * src/z80/gen.c (operandsEqu),
5656         * src/pic/gen.c (operandsEqu),
5657         * src/pic16/gen.c (operandsEqu),
5658         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
5659         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
5660
5661 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5662
5663         * src/SDCCcse.c (cseBBlock): fixed bug #966963
5664
5665 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
5666
5667         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
5668         default case in switch statement,
5669         * glue.c (pic16_initPointer): expr is initialised via decoarteType
5670         to eliminate problem with initialisation of pointers, but problem
5671         still exists,
5672         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
5673         * (emitStaticSegment): removed various lines emitting debug info,
5674         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
5675         added processor registers for utilizing EEPROM,
5676         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
5677         configurable and set 8
5678
5679 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
5680
5681         * .version: increased version number to 2.4.2,
5682
5683         Cumulative patch for pic16 port
5684         * src/pic16/device.c: changed scheme to dump initial values for
5685         variables in idata segment, all print_idata* functions were removed,
5686         now the pic16_printIval* will be called,
5687         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
5688         * _pic16_printPointerType, pic16_printPointerType,
5689         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
5690         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
5691         NEW, similar to the respective functions in SDCCglue.c,
5692         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
5693         way, emitting hex bytes,
5694         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
5695
5696 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5697
5698         * src/avr/ralloc.c (serialRegAssign),
5699         * src/xa51/ralloc.c (serialRegAssign),
5700         * src/pic/ralloc.c (serialRegAssign),
5701         * src/pic16/ralloc.c (serialRegAssign),
5702         * src/hc08/ralloc.c (serialRegAssign),
5703         * src/z80/ralloc.c (serialRegAssign),
5704         * src/ds390/ralloc.c (serialRegAssign),
5705         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5706
5707 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5708
5709         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5710         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5711
5712 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5713
5714         Cumulative patch for pic16 port:
5715         * src/pic16/device.h (typedef PIC16_device) modified fields for
5716         defining microcontrollers,
5717         * src/pic16/device.c: added new info for all devices in Pics16 array,
5718         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5719         to be optimised out by the pCode optimiser,
5720         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5721         specially, bug reported by G.M. Gallant,
5722         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5723         as force'd so that cannot be optimised out by pCode optimiser,
5724         * src/pic16/pcode.c,
5725         * src/pic16/pcodepeeph.c,
5726         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5727         they are disabled by default, but can be enabled explicit with
5728         command argument --denable-peeps, for testing,
5729         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5730         --pomit-ivt in COMPILE_FLAGS
5731
5732 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5733
5734         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5735           compilation on MSVC
5736
5737 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5738
5739         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5740
5741 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5742
5743         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5744         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5745
5746 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5747
5748         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5749         would only assign 0x300001 register.
5750
5751 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5752
5753         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5754         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5755
5756 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5757
5758         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5759         for ds80c400
5760         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5761         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5762         added peephole 254 (left shift), 255 (jump table)
5763
5764 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5765
5766         * device/lib/Makefile.in: removed comment line with model-pic16,
5767         * (target port-specific-objects-pic16): the libraries and objects
5768         are copied to the build directory form the device/lib/pic16/bin
5769         directory
5770
5771         Cumulative patch concerning pic16 port:
5772         * library directory has been re-organized,
5773         * added support for PIC18F1220,
5774         * added headers and library sources for chips 18f1220,18f6520,
5775         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5776
5777         * configuration registers setting has changed, now each supported
5778         device has a complete description of the registers it uses,
5779         * all initialisations are moved to idata sections, these section
5780         can be absolute or relocatable,
5781         * fixed initialisation of codespace variables,
5782         * fixed warning about PCLATU and gpsim,
5783         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5784         * (genAssign): use table reads when assigning from variables in codespace,
5785         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5786         char/int variables placed in codespace,
5787         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5788         registers set in .asm file, no need for --pomit-config-words anymore,
5789         * (pic16glue): some 8051 legacy segments are commented out
5790         (to be removed completely),
5791         * added support for alternative assembler and linker with --asm=
5792         and --link= command line arguments,
5793         * peepholes are disabled automatically in the port, no need to
5794         specify on command line,
5795         * port supports natively char/int/long multiplication, but converts
5796         all divisions to support functions,
5797         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5798         to the file set in variable $2,
5799         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5800         strings in ASCII format and not in hex,
5801         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5802         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5803         allocate proper register if iCodes aren't temporary,
5804
5805 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5806
5807         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5808
5809 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5810
5811         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5812         is commented out
5813
5814 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5815
5816         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5817         computed address is reused
5818         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5819         multi-byte bitfields
5820
5821 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5822
5823         * src/z80/gen.c: (genArrayInit): must check for pointers too
5824
5825 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5826
5827         * support/regression/tests/zeropad.c: never meant to commit the
5828           nestedstruct test: removed, added check for GCC version
5829
5830 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5831
5832         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5833         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5834         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5835           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5836           bugs 928906 and 954082 half-empty initializers
5837         * src/SDCCsymt.h,
5838         * src/SDCCsymt.c (getAllocSize): added for above fix
5839         * src/z80/gen.c (genArrayInit): fixed bug 741044
5840         * support/regression/tests/zeropad.c: added tests
5841
5842 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5843
5844         * src/pic16/device.c (pic16_dump_section): corrected bug which
5845         caused some symbols of the libraries to be misplaced
5846
5847 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5848
5849         * src/pic16/glue.c,
5850         * src/pic16/ralloc.h,
5851         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5852         to fix conflict with pic port
5853
5854 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5855
5856         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5857         externs configuration variables,
5858         * src/pic16/ralloc.h,
5859         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5860         prototype in header, commented out some debug messages
5861
5862 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5863
5864         * src/pic16/glue.c,
5865         * src/pic16/main.c,
5866         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5867         for gpasm COFF object generation. Thanks to D. Hawkins for
5868         his patch info
5869
5870 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5871
5872         * src/ds390/main.c,
5873         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5874         Brock for spotting this)
5875         * src/ds390/gen.c (genEndFunction),
5876         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5877         interrupt handler and critical. Disable push/pop optimizations when
5878         peephole optimizations disabled.
5879
5880 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5881
5882         Updated pic16 library sources and headers.
5883         * device/lib/pic16/pic18f*/ ,
5884         * device/include/pic16/*.h: modified to handle structured SFR
5885         definitions
5886
5887 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5888
5889         * src/port.h (PORT structure): added hook initPaths, now each
5890         port can declare its own default search paths,
5891         which can been seen with the --print-search-dirs option,
5892         see pic16 port for example,
5893         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5894         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5895         * (doPrintSearchDirs): NEW, replaces in a central manner the
5896         printing of search dirs which was split in set*Paths functions,
5897         * (main): added call to port->initPaths and doPrintSearchDirs,
5898         * src/avr/main.c,
5899         * src/ds390/main.c,
5900         * src/hc08/main.c,
5901         * src/izt/i186.c,
5902         * src/izt/tlcs900h.c,
5903         * src/mcs51/main.c,
5904         * src/pic/main.c,
5905         * src/pic16/main.c: modified port structures to reflect addition of
5906         initPaths hook,
5907
5908         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5909         * (pic16_dump_section): for registers in same address reserve memory once,
5910         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5911         to no_banksel,
5912         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5913         result is greater in size than right or left,
5914         * (pic16_genUMult8X8_8): there are some cases where the result can
5915         be 16 bits size, so handle these,
5916         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5917         * (pic16_outBitC): modified to emit pcodes,
5918         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5919         or not,
5920         * (genDivOneByte): implemented algorithm to divide 8-bits,
5921         * (genCmp): uncommented goto, but issues still exist,
5922         * (genAnd): fixed a bug with variables >8bits,
5923         * (genPackBits): optimization added that uses BCF/BSF to change a
5924         single bit,
5925         * (genAssign): fixed bug when assigning floating point literals,
5926         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5927         __sdcc_gsinit_startup label,
5928         * src/pic16/main.c (_pic16_init): removed search directory
5929         initialisations,
5930         * (_pic16_initPaths): NEW, used to initialise search directories,
5931         * (_hasNativeMulFor): support functions for all except char/int
5932         multiplication, and char division,
5933         * (PIC16_port struct): modified entry for native mul support,
5934         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5935         no_banksel option,
5936         * (buildCallTree): call to register_usage is ifdef'ed out,
5937
5938 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5939
5940         * device/include/string.h: applied Stas Sergeev's patch to make this
5941         header file compatible with the preprocessor -Wundef option
5942         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5943         failure (fixes bug #941458)
5944
5945 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5946
5947         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5948         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5949         that the variable, not the function, should be static
5950         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5951         to be consistent with non-literal case
5952
5953 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5954
5955         * src/SDCCast.c (isConformingBody): fixed bug #949967
5956         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5957         convilong): fixed bug #952086
5958
5959 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5960
5961         * src/SDCCmem.c (allocVariables): fixed bug #955321
5962
5963 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5964
5965         * src/hc08/main.c (_hc08_genAssemblerEnd),
5966         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5967         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5968         completely eliminated the use of a temporary file
5969         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5970         when more than one file linked
5971         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5972
5973 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5974
5975         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5976         which fixes bug #543481
5977         * support/regression/tests/bug-751703.c: fixed comments left from a
5978         cut and paste error
5979         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5980         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5981         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5982         scopes
5983         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5984         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5985         are now changed to underscores in moduleName
5986
5987 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5988
5989         * as/mcs51/lkmem.c: better fix for bug #954173
5990
5991 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5992         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5993
5994         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5995         * device/include/c8051f000.h,
5996         * device/include/c8051f120.h,
5997         * device/include/c8051f300.h,
5998         * device/include/c8051f310.h,
5999         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
6000         PWM16) and detab'ed
6001
6002 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6003
6004         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
6005         and mailing lists, doc'ed --no-peep-comments, removed reference
6006         to knoppix (newest version has no LyX/LaTeX), other minor changes
6007         * src/SDCCglue.c (glue): save 2 bytes stack space with
6008         option --main-return. The ljmp could probably be avoided too
6009
6010 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6011
6012         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
6013
6014 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6015
6016         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
6017         * src/SDCCopt.c (isLocalWithoutDef),
6018         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
6019         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
6020         (credit to Maarten Brock for patch #949363, on which this is based)
6021         * support/regression/tests/bug-751703.c: some test cases of extern used
6022         within inner scopes.
6023
6024 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6025
6026         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
6027         SPEC_STRUCT
6028         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
6029         struct definitions
6030         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
6031         dwWriteLabel): fix to create valid debugger symbols even when
6032         the module name has non-alphanumeric symbols in it
6033         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
6034         when a variable's allocation has been optimized away
6035
6036
6037 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6038
6039         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
6040         * src/hc08/main.c,
6041         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
6042         * src/mcs51/main.c,
6043         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
6044         * src/ds390/main.c,
6045         * src/z80/gen.c (z80_emitDebuggerSymbol),
6046         * src/z80/main.c,
6047         * src/pic/gen.c (pic14_emitDebuggerSymbol),
6048         * src/pic/main.c,
6049         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
6050         * src/pic16/main.c,
6051         * src/avr/gen.c (avr_emitDebuggerSymbol),
6052         * src/avr/main.c,
6053         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
6054         * src/xa51/main.c,
6055         * src/SDCCdebug.c (emitDebuggerSymbol),
6056         * src/SDCCdebug.h,
6057         * src/port.h: added a debugger struct to the port struct. Added a
6058         callback for defining debugger symbols
6059
6060         * src/SDCCast.c (createLabel),
6061         * src/SDCC.y (labeled_statement): mark all compiler generated labels
6062         with isitmp = 1
6063         * src/SDCCicode.h,
6064         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
6065         iCode back to the ast for the function
6066
6067         * src/hc08/ralloc.c (hc08_assignRegisters),
6068         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
6069         unneeded fields from the regs struct.
6070         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
6071         pushReg() & pullReg() functions instead of emitcode()
6072
6073         * src/hc08/gen.c (genLabel, genhc08Code),
6074         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
6075
6076         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
6077         debugger hooks
6078
6079         * src/hc08/gen.c (genEndFunction, genhc08Code),
6080         * src/hc08/gen.h,
6081         * src/mcs51/gen.c (genEndFunction, gen51Code),
6082         * src/mcs51/gen.h,
6083         * src/ds390/gen.c (genEndFunction, gen390Code),
6084         * src/ds390/gen.h,
6085         * src/z80/gen.c (genEndFunction, genZ80Code),
6086         * src/z80/gen.h,
6087         * src/z80/z80.h,
6088         * src/pic/gen.c (genEndFunction, genpic14Code),
6089         * src/pic/gen.h,
6090         * src/pic16/gen.c (genEndFunction, genpic16Code),
6091         * src/pic16/gen.h,
6092         * src/avr/gen.c (genEndFunction, genAVRCode),
6093         * src/avr/gen.h,
6094         * src/xa51/gen.c (genEndFunction, genXA51Code),
6095         * src/xa51/gen.h,
6096         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
6097         specific code to cdbFile.c and out of the backend code generators
6098
6099         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
6100         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
6101         starting address is now 0
6102
6103         * as/hc08/asm.h,
6104         * as/hc08/m08pst.c,
6105         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
6106         assembler directive for DWARF support
6107         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
6108
6109         * src/src.dsp,
6110         * src/Makefile.in,
6111         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
6112
6113 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6114
6115         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
6116         and inappropriate peephole optimization in jump tables
6117
6118 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6119
6120         * as/hc08/m08pst.c,
6121         * src/SDCCglue.c: sdccopt works for the hc08 port now
6122
6123 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
6124
6125         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
6126
6127 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6128
6129         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
6130
6131 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6132
6133         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
6134         rules
6135         * src/SDCCmain.c,
6136         * src/SDCCglobl.h,
6137         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
6138         comments from the peephole optimizer replacement rules
6139         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
6140         symbols
6141         * src/SDCCcse.c (updateSpillLocation),
6142         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
6143         equivalents
6144         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
6145         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
6146         objects far pointers
6147
6148 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6149
6150         * src/SDCCsymt.h: a missing part of my last change
6151         * src/pic/ralloc.c (regTypeNum),
6152         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
6153
6154 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6155
6156         * src/SDCCicode.h,
6157         * src/SDCCicode.c (aggrToPtrDclType),
6158         * src/SDCCptropt.h,
6159         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
6160         ptrPseudoSymConvert),
6161         * src/pic/ralloc.c (regTypeNum),
6162         * src/pic16/ralloc.c (regTypeNum),
6163         * src/hc08/ralloc.c (regTypeNum),
6164         * src/ds390/ralloc.c (regTypeNum),
6165         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
6166         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
6167
6168 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6169
6170         * link/z80/lkmain.c (afile),
6171         * as/hc08/lkmain.c (afile),
6172         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
6173         prevent a pointer problem when a filename has no directory and
6174         no extension specified.
6175
6176 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6177
6178         * link/z80/lkmain.c (afile): allow periods in directory names
6179         * link/z80/lkmain.c (afile),
6180         * as/mcs51/lkmain.c (afile),
6181         * as/hc08/lkmain.c (afile): allow linker script file to have an
6182         extension other than ".lnk"
6183         * link/z80/lklex.c (getfid),
6184         * link/z80/lkmain.c (parse),
6185         * as/mcs51/lklex.c (getfid),
6186         * as/mcs51/lkmain.c (parse),
6187         * as/hc08/lklex.c (getfid),
6188         * as/hc08/lkmain.c (parse): Support comments in the linker script
6189         file on lines by themselves and after filenames
6190
6191 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6192
6193         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6194
6195 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6196
6197         * src/z80/peeph-z80.def: removed some peephole rules that don't
6198         work with multibyte arithmetic (fixed bug #937126)
6199         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6200         to registers and not global variables
6201         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6202         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6203         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6204         checking for assignments not internally generated (fixed bug #931895)
6205         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6206         structure member (fixed bug #930072)
6207
6208 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6209
6210         * src/SDCCmain.c (linkEdit),
6211         * src/hc08/main.c (_hc08_parseOptions),
6212         * as/hc08/Makefile.in,
6213         * as/hc08/aslink.h,
6214         * as/hc08/asm.h,
6215         * as/hc08/m08pst.c,
6216         * as/hc08/lkrloc.c (relr, rele),
6217         * as/hc08/lkarea.c (lnkarea)
6218         * as/hc08/lkmain.c (afile, parse),
6219         * as/hc08/lkelf.c: support for ELF output
6220         * as/hc08/lks19.c (s19),
6221         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
6222
6223 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6224
6225         * as/mcs51/lkihx.c: Fixed bug #899105.
6226
6227 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6228
6229         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
6230         .dsp files from Unix to DOS.
6231
6232 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6233
6234         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
6235         function pointers; we have been compliant for several months now.
6236         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
6237         change that was accidently commented out
6238         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
6239         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
6240         bug #922319
6241
6242 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6243
6244         * src/hc08/gen.c: output of all of the internal debugging information
6245         is now controlled by the D() macro; it is disabled by default
6246
6247 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6248
6249         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
6250         harder to keep the same registers during a CAST iCode
6251         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
6252         long via int can be done in a single cast, if the signedness is
6253         correct.
6254         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
6255         putchar() in tinibios.c in ds390's library
6256
6257 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
6258
6259         * src/SDCCast.c (decorateType): fixed bug #898889,
6260         cast result of a literal complement too
6261         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
6262         fixed check for bitfields
6263
6264 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
6265
6266         * src/SDCCicode.c (geniCodeLogic): made it static,
6267         (geniCodeLogicAndOr): added in order to fix bug #905492,
6268         (ast2iCode): fixed bug #905492
6269         * support/regression/tests/bug-905492.c: added
6270         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
6271         (processParms): fixed bug #927659: don't copy parms, this will clear
6272         decorated flag
6273         * support/regression/tests/bug-927659.c: added
6274
6275 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
6276
6277         * src/SDCCast.c (addCast): don't cast float to char
6278         * device/lib/libsdcc.lib: added _memmove
6279
6280 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
6281
6282         * device/lib/large/Makefile: fixed parallel execution by
6283         replacing `make` by `$(MAKE)`
6284
6285 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6286
6287         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
6288         offsets (fixes bug #923936)
6289
6290 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
6291
6292         * device/lib/small/Makefile: fixed parallel execution by
6293         replacing `make` by `$(MAKE)`
6294
6295 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6296
6297         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
6298
6299 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
6300
6301         * src/pic/gen.c (genCpl): multi-byte complements were not working.
6302         * src/regression/Makefile: Regression test was not running.
6303
6304 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6305
6306         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
6307         complement if possible
6308         * src/SDCCval.c (valComplement),
6309         * src/SDCCicode.c (operandOperation): fixed complement of literal
6310         * support/regression/tests/onebyte.c (testComplement): added
6311
6312 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
6313
6314         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
6315         return an optimized tree; actually replace actParm with the new tree
6316         * src/SDCCast.h: added some parantheses to remove side effects
6317         * support/regression/tests/bug-920866.c
6318
6319 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
6320         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
6321         Bit operands were not being handled properly in the pic14 port.
6322         (now src/regression/add.c passes again).
6323
6324 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6325
6326         * src/SDCC.y (labeled_statement): case and default no longer require
6327         a following statement (RFE #893037)
6328
6329 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6330
6331         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
6332         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
6333         disabled (fixes bug #916294)
6334         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
6335         "mov a,acc"; patch provided by Lenny Story
6336         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
6337
6338 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6339
6340         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
6341         functions
6342         * src/ds390/gen.c (genFunction, genEndFunction),
6343         * src/ds390/ralloc.c (ds390_assignRegisters),
6344         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
6345         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
6346         pushed if there are parameters passed on the stack. Also, a cleaner
6347         way to decide if r0/r1 should be pushed/popped. (Together they fix
6348         bug #918693)
6349
6350 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6351
6352         * doc/sdccman.lyx,
6353         * device/lib/mcs51/crtpagesfr.asm,
6354         * device/lib/mcs51/crtxinit.asm,
6355         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
6356         to avoid confusion with Si Lab's SFRPAGE register.
6357
6358 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6359
6360         * src/SDCCglue.c (emitMaps): allow public sfr variables
6361         * src/SDCCglue.c (initialComments): include compiler build date
6362         with compiler version and put the timestamp of the generated
6363         assembly file on a serperate line to be less confusing.
6364         * src/port.h: added genInitStartup hook
6365         * src/avr/main.c,
6366         * src/ds390/main.c,
6367         * src/hc08/main.c,
6368         * src/pic/main.c,
6369         * src/pic16/main.c,
6370         * src/xa51/main.c,
6371         * src/z80/main.c: genInitStartup initialize as NULL (default to
6372         historical behaviour)
6373         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
6374         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
6375         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
6376         library instead of hard coding it into the compiler.
6377         * support/regression/ports/mcs51-stack-auto/spec.mk,
6378         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
6379         * device/lib/mcs51/Makefile,
6380         * device/lib/small/Makefile,
6381         * device/lib/large/Makefile,
6382         * device/lib/mcs51/crtpagesfr.asm,
6383         * device/lib/mcs51/crtstart.asm,
6384         * device/lib/mcs51/crtxclear.asm,
6385         * device/lib/mcs51/crtxinit.asm,
6386         * device/lib/mcs51/crtclear.asm,
6387         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
6388         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
6389         and into user configurable files.
6390         * device/lib/clean.mk: clean mcs51 directory too
6391         * support/regression/tests/longlit.c: added static to T1 declaration
6392         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
6393         accesses in the initialization code
6394
6395 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6396
6397         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
6398         OSCTRIMVAL as noted in bug #916008
6399
6400 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6401
6402         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
6403         in loops with multiple exits (reported as incorrect registers
6404         used by Martin Helmling in Sdcc-user list)
6405
6406 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6407
6408         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
6409         made ds390 register extensions look less like error messages
6410
6411 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6412
6413         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
6414         reported by Adam Wozniak in Sdcc-user list
6415
6416 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
6417
6418         * src/SDCCast.c (decorateType): fixed with bug and promotion in
6419         arithmetic optimizations, added debug output
6420
6421 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
6422
6423         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
6424         * sdcc.spec: updated and split sdcc into 3 rpms
6425         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
6426         needed for literals of LEFT_OP and '+'
6427         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
6428         introduced RESULT_TYPE_NOPROM
6429         (geniCodeMultiply): fixed logic for decision if mul is optimized to
6430         left shift
6431         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
6432         limited promotion to int only for '*'
6433         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
6434
6435 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
6436
6437         * src/pic16/gen.c (genSkip),
6438         (genc16bit2lit), (gencjneshort): commented out
6439         (is_LitOp): new helper function, checks operand type
6440         (genCmpEq): rewritten
6441
6442 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
6443
6444         * support/regression/tests/bug-908454.c: added
6445
6446 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
6447
6448         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
6449         * src/SDCCicode.c (usualBinaryConversions): op needs int type
6450         (geniCodeCast): cosmetic, don't preserve bit storage class
6451         (geniCodeLeftShift): added promotion
6452         (geniCodeLogic): fixed regression
6453         * src/SDCCsymt.c (computeTypeOr): accept bits too
6454         (compareType): 2nd part of fix for bug #908454, needed for bitfields
6455
6456 2004-03-07  Borut Razem <borut.razem AT siol.net>
6457
6458         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
6459
6460 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
6461
6462         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
6463         version of pic16_genPackRegisters which does not check if ic is a
6464         CAST operator,
6465         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
6466         function cause string1.c regression test fails
6467
6468 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
6469
6470         * sim/ucsim/configure.in,
6471         * sim/ucsim/configure,
6472         * sim/ucsim/doc/Makefile.in: use docdir
6473         * src/SDCC.y: fixed sbit atrributes
6474         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
6475         * src/SDCCast.c (decorateType): |^& need special promotion handling
6476         * src/SDCCast.h,
6477         * src/SDCCsymt.h: moved definition of RESULT_TYPE
6478         * src/SDCCsymt.h (computeType),
6479         * src/SDCCicode.c: computeType() needs op
6480         * src/SDCCsymt.c (checkTypeSanity),
6481         * doc/sddman.lyx: "plain" bitfields are unsigned
6482         * src/SDCCsymt.c (computeTypeOr): added
6483         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
6484         |^& ops
6485         * src/SDCCval.c (val*): computeType() needs op
6486         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
6487         * support/regression/tests/onebyte.c: added tests for |^&
6488
6489 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
6490
6491         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
6492         for writing icode into asm output.
6493
6494 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
6495
6496         * src/pic16/device.c: added some debug lines enabled
6497         with macro DEBUG_CHECK,
6498         * src/pic16/genarith.c: more debug in genPlus,
6499         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
6500         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
6501         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
6502         * (aopForSym): onStack symbols are re-placed in data memspace,
6503         and onStack flag is cleared,
6504         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
6505         copy temporary pcodeop,
6506         * (genPcall): added warning for not updating PCLATU,
6507         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
6508         always true for pic16 port,
6509         * (genMultOneWord): NEW, supports integer multiplication,
6510         * (genMult): modified to call genMultOneWord,
6511         * (ifxForOp): added warning when return NULL,
6512         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
6513         flag is set before call to operandFromSymbol for implicit
6514         added structures,
6515         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
6516         options.intlong_rent are set by default,
6517         * (_hasNativeMulFor): modified to allow port generation of integer
6518         multiplication,
6519         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
6520         set regtype to REG_SFR for all registers, restricting seting the
6521         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
6522
6523 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6524
6525         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
6526         more than 500 times in the regression tests
6527
6528 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6529
6530         * support/Util/SDCCerr.h,
6531         * support/Util/SDCCerr.c,
6532         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6533         enumerator_list),
6534         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
6535         for symbol conflicts.
6536         * support/valdiags/tests/enum.c,
6537         * support/valdiags/tests/tentdecl.c,
6538         * support/valdiags/tests/struct.c: expect possible error messages
6539         referring to original symbol definitions.
6540         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
6541         * src/SDCCsymt.h,
6542         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
6543
6544 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
6545
6546         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
6547
6548 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
6549
6550         * src/pic16/ralloc.c (newReg): fixed bug #908929
6551
6552 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6553
6554         * src/ds390/gen.c: added missing #include "main.h"
6555
6556 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
6557
6558         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
6559         checking if symbol is already in set,
6560         * src/pic16/device.h: prototype for checkAddSym,
6561         * src/pic16/gen.c: (_G): added entry interruptvector,
6562         * (assignResultValue): removed some commented out lines,
6563         * (genFunction): check for ISR via sym->type, absolute section for
6564         interrupt code is created via a new pBlock, the goto instruction is
6565         placed now correctly at the interrupt vector position, changed all
6566         references from ivec to _G.interruptvector,
6567         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
6568         is the interrupt is a high priority one, same for return from ISR,
6569         * src/pic16/glue.c: changed all calls of addSetHead for publics and
6570         externs to calls of checkAddSym,
6571         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
6572         pic16_pcode_verbose flag is set,
6573         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
6574         * src/pic16/pcoderegs.c: message about how many registers are saved
6575         will only be emitted if pic16_pcode_verbose flag is set,
6576
6577 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6578
6579         * src/ds390/ralloc.h,
6580         * src/ds390/ralloc.c (ds390_regWithIdx),
6581         * src/ds390/gen.c (emitcode),
6582         * src/ds390/main.h,
6583         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
6584         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6585         ds390operandCompare, getRegsRead, getRegsWritten,
6586         initializeAsmLineNode): customized instruction size calculation for
6587         ds390, started basis for some register optimizations
6588         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
6589         corresponding assembly output
6590         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
6591         missing push/pop of r0/r1. Optimized push/pops
6592
6593 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6594
6595         * src/mcs51/main.c (instructionSize): fixed ACALL size
6596         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
6597
6598 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
6599
6600         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
6601         the sorting of rlist with NULL elements
6602         * (print_idataType, print_idata): NEW to create idata sections
6603         * src/pic16/device.h: idataSymSet new variable
6604         * src/pic16/gen.c (genFunction): fixed some bugs in string
6605         comparing, improved the absolute section creation for ISRs,
6606         added FSR0L/FSR0H in registers that are saved in an ISR,
6607         * (genInline): fixed the processing of inline snippets,
6608         now they undergo no process by the peephole optimizer
6609         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
6610         are placed in idataSymSet,
6611         * (pic16emitStaticSeg): extern symbols are added in externs,
6612         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
6613         switching when aboslute variables are placed in access bank memory
6614         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
6615         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
6616         commented out with #if,
6617         * (pic16_packRegisters): reintroduce the check for CAST because some
6618         symbols are not correctly handled,
6619         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
6620         pCodeInstruction instead of pCode,
6621         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
6622         pCodeAsmDir definition,
6623         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
6624         directive, then the argument directive is emitted without the leading
6625         tab, hack for inline labels which must be in the first column,
6626         * (compareLabel,pic16_findNextInstruction),
6627         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
6628         * (insertBankSwitch): modified for the new pCodeAsmDir,
6629
6630 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6631         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
6632
6633         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
6634         instance,
6635         * (pushSide): commented out with #if,
6636         * (assignResultValue): fixed some typos in saving
6637         registers,
6638         * (genPcall): FIXED and sync'ed with genCall,
6639         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
6640         * (genNearPointerGet): fixed to handle some more cases,
6641         implementation scheme via table reads,
6642         * (genConstPointerGet): modified to access code memory correct,
6643         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
6644         and improved to handle some cases
6645         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
6646         instead of "RETLW" for init data
6647         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
6648         not IN_DIRSPACE, work around to reduce bank switching when aboslute
6649         variables are placed in access bank memory (<0x80 and >=0xf80),
6650         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
6651         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
6652         TBLWT_POSTDEC,TBLWT_PREINC
6653         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
6654         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
6655         directives
6656         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
6657         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
6658         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
6659         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
6660
6661 2004-02-29  Borut Razem <borut.razem AT siol.net>
6662
6663         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
6664         support/Util/findme.h, support/Util/system.h: enhance binary relative
6665         search for lib and include by using findProgramPath()
6666
6667 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6668
6669         * src/SDCCpeeph.h,
6670         * src/SDCCpeeph.c (pcDistance),
6671         * src/port.h,
6672         * src/mcs51/ralloc.h,
6673         * src/mcs51/ralloc.c (mcs51_regWithIdx),
6674         * src/mcs51/main.h,
6675         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
6676         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6677         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
6678         size calculation port specific, started basis for some register
6679         optimizations
6680         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
6681         missing push/pop of r0/r1. Optimized push/pops
6682         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
6683         * device/lib/_modsint.c (_modsint),
6684         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
6685         and stack version so regression tests pass
6686
6687 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
6688
6689         * src/Makefile.in (dep): include SLIBOBJS in dependency check
6690         * src/SDCCast.c (decorateType): catch another small optimization
6691         with '?' operator
6692         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
6693         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
6694         modified to finally use computeType() all over SDCC,
6695         see Feature Request #877103
6696         * src/SDCCval.h: cosmetic
6697         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
6698         valCompare(); regression tested in muldiv.c
6699         * support/regression/tests/muldiv.c (testMod): mod sign follows
6700         dividend only
6701
6702 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
6703
6704         * src/SDCCast.c (decorateType): fixed bug #902362
6705         * doc/INSTALL.txt: fixed install instructions for win32
6706
6707 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6708
6709         * device/include/Makefile.in (install): fixed by replacing spaces
6710         by tabs
6711         * doc/README.txt,
6712         * doc/INSTALL.txt: updated for release
6713         * doc/sdccman.lyx: added warning for --xstack being buggy
6714
6715 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6716
6717         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6718         to eliminate build warnings.
6719         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6720
6721 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6722            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6723
6724         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6725         removed -penable-stack, added comment for stack pragma, added
6726         warning for not initializing the stack/frame registers, removed
6727         comment at interrupts section
6728
6729         Stack is made permanent, there is no ability to disable stack usage.
6730         * src/pic16/device.h,
6731         * src/pic16/device.c: removed all references to USE_STACK macro,
6732         * src/pic16/device.c (pic16_dump_section): when no elements in
6733         rlist, free rlist before return,
6734         * (pic16_dump_int_registers): NEW, internal registers are a new set
6735         of general purpose registers reused by each function,
6736         * (checkAddReg): returns 1 if registers is added to set,
6737         * (pic16_groupRegistersInSection): when a registers is of type
6738         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6739         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6740         SRCASECMP macro is moved here from device.c
6741         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6742         PO_PCLATU, PO_PRODL, PO_PRODH,
6743         * (pic16_pCodeOpType, genMinus,
6744         changed compares to "a" register, with AOP_ACC,
6745         * (pic16_genPlus): fixed some bugs and indented properly,
6746         * (pic16_addSign): changed size to size+offset in the MOVWF
6747         instruction,
6748         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6749         multiply 8-bit operand by literal, result is 8-bit,
6750         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6751         multiply 2 8-bit operand, result is 8-bit,
6752         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6753         genUMult8X*_16,
6754         * src/pic16/gen.c: changed accUse to contain WREG only,
6755         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6756         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6757         true, do not use immediate addressing any more unless sym is a
6758         pointer in codespace,
6759         * (aopForRemat): do not use immediate addressing when symbol not in
6760         codespace and when symbol's address is requested,
6761         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6762         accUse size (= 1),
6763         * (aopGet): added case for AOP_ACC and don't return "accumulator
6764         bug" but WREG instead,
6765         * (popGetTempReg): pushes contents of temporary register in stack,
6766         * (popReleaseTempReg): pops contents of temporary register from
6767         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6768         * (pic16_popGet): separated case AOP_ACC to return register WREG
6769         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6770         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6771         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6772         the use of immediate pointers to certain cases only.
6773
6774         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6775         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6776         * (assignResultValue, genCall, genRet): modified to use the new
6777         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6778         genPcall is still broken,
6779         * (genFunction): added code to create 'A' type pBlocks when
6780         interrupt functions are generated, code not extensively tested yet,
6781         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6782         * (genEndFunction): modified so ISRs pop stored registers from stack,
6783         * (genMultOneByte): cleanup,
6784         * (AccRsh): added flag andmask, to and result with appropriate mask,
6785         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6786         * (genDataPointerGet): fixed and reenabled its use,
6787         * (genNearDataPointerGet): bugs fixed,
6788         * (genDataPointerSet): bugs fixed,
6789         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6790         pic16_DumpSymbol, pic16_DumpOp,
6791         * src/pic16/genutils.h: function prototypes for the above functions,
6792         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6793         pointers,
6794         * (pic16emitRegularMap): many many many improvements, but needs a
6795         major cleanup,
6796         * src/pic16/main.c: enable_stack in pic16_options is removed,
6797         * (_pic16_parseOptions): removed command line options -penable-stack,
6798         * (_process_pragma): emit stack symbol only when stack pragma is
6799         processed,
6800         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6801         redirected to FSR0L/FSR0H pair,
6802         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6803         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6804         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6805         for immediates,
6806         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6807         * (dumpPicOptype): NEW,
6808         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6809         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6810         with movff instruction,
6811         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6812         added pic16_int_regs, some packRegsFor* functions are commented out,
6813         because produce errors,
6814         * src/pic16/NOTES: minor modifications
6815
6816 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6817
6818         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6819         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6820         --pack-iram.
6821         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6822         * as/mcs51/lkaomf51.c: fixed bug #895763
6823
6824 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6825
6826         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6827
6828 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6829
6830         * doc/sdccman.lyx: added details about the HC08 storage classes and
6831         interrupts, fixed the register usage info for z80 & gbz80
6832
6833 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6834
6835         * doc/sdccman.lyx: added more pic16 port documentation
6836         * device/include/pic16/: added header pic18fregs.h
6837
6838 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6839
6840         * doc/sdccman.lyx: added Vangelis' contribution
6841
6842 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6843
6844         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6845         extend to the next CALL or PCALL, not just to the next CALL.
6846
6847 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6848
6849         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6850
6851 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6852
6853         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6854         bug #895752 and a better fix for bug #716790
6855
6856 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6857
6858         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6859
6860 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6861
6862         * doc/sdccman.lyx: minor changes, minor changed
6863
6864 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6865
6866         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6867         which can't handle SDCC_NEWONEBYTEOPS,
6868         (geniCodeMultiply): removed conversion from mult to shift for pic14
6869         and pic16
6870
6871 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6872
6873         * src/hc08/gen.h,
6874         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6875         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6876         thus fixing bug #895406
6877
6878 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6879
6880         * device/lib/_modsint.c,
6881         * device/lib/_modslong.c: sign follows divisor only
6882         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6883         signs or signedness can be ignored
6884         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6885         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6886         added optimization for IFX,
6887         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6888         arguments;
6889         reenabled optimization for IFX, which was removed on 2004-01-11
6890         * src/SDCCast.h: added return type IFX
6891         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6892         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6893         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6894         SDCC_OLDONEBYTEOPS selects the old behaviour
6895         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6896         changed again and commented promotion rule
6897         * src/SDCCval.c (valDiv): promotion no longer necessary
6898         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6899         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6900         rewritten
6901         * support/regression/tests/onebyte.c: added
6902
6903 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6904
6905         * gen.c (genInline): reverted to old code for assemnling inline
6906         code because of bug reported James Chadd
6907
6908 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6909
6910         * ralloc.h: missing declarations from previous patch,
6911         seems that patch for ralloc.h was never applied, fixed
6912
6913 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6914            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6915
6916         * pcode.c,
6917         * pcode.h,
6918         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6919         indirect addressing. Marked FSR0 as deprecated
6920         * gen.c (pointerCode): commented out, not needed now
6921         (pic16_popGet2p): new MOVFF helper function
6922         (genGenPointerGet),
6923         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6924         (shiftRLong): removed duplicate debugging info
6925
6926 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6927
6928         * src/ds390/gen.c (genNearPointerGet),
6929         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6930         optimization with bits, but not bitfields.
6931         * src/ds390/ralloc.c (packRegisters),
6932         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6933
6934 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6935
6936         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6937
6938 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6939
6940         * src/SDCCsymt.h,
6941         * src/SDCCicode.c (operandFromSymbol),
6942         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6943         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6944         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6945         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6946         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6947         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6948         bug #892038
6949         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6950         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6951         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6952         * src/SDCCsymt.c (newSymbol),
6953         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6954         enumerator_list),
6955         * src/SDCCval.h,
6956         * src/SDCCval.c (newiList): fixed bug #885705
6957
6958 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6959
6960         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6961         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6962
6963 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6964
6965         * device/include/c8051f120.h,
6966         * device/include/c8051f300.h,
6967         * device/include/c8051f310.h: added/updated header files for Silicon
6968         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6969         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6970         in new section Submitting patches
6971
6972 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6973
6974         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6975         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6976         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6977         genGenPointerSet),
6978         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6979         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6980         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6981         genGenPointerSet),
6982         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6983         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6984         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6985         genGenPointerSet),
6986         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6987         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6988         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6989         genGenPointerSet): fixed bug #892400
6990         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6991         to eliminate build warnings.
6992         * src/SDCCast.c (processParms),
6993         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6994         fixed bug 751859
6995         * support/valdiag/valdiag.py: added GCC to the list of defines active
6996         when compiling with gcc
6997
6998 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6999
7000         * support/Util/SDCCerr.h,
7001         * support/Util/SDCCerr.c,
7002         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
7003         with an incomplete type (fixed bug #883734)
7004         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
7005
7006 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7007
7008         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
7009
7010 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7011
7012         * src/SDCCast.c (decorateType),
7013         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
7014         function pointer implementation
7015         * support/regression/tests/funptrs.c: added tests to verify both forms
7016         of function pointers work correctly. Added tests to verify parameters
7017         are passed in the correct order.
7018
7019 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
7020
7021         * device.c (regCompare): registers are sorted by ascending
7022         address and increasing size,
7023         * main.c (_pic16_finaliseOptions): removed the declaration
7024         of compiler macro MCU. Now a macro of the format pic18fxxxx
7025         will be defined from the command line
7026
7027 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7028             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7029
7030         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
7031         PCOP_RLCF was overwritten!
7032         * gen.c (genSkip): commented out calls to pic16_emitcode,
7033         * (genCmpEQ): fixed "long" compares, only high word did get compared,
7034         * (genlshTwo),
7035         * (genRRC): added debugging info,
7036         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
7037         overwritten while shifting,
7038         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
7039         overwritten while shifting,
7040         * (AccLsh),
7041         * (AccRsh),
7042         * (shiftLLeftOrResult),
7043         * (shiftRLeftOrResult),
7044         * (shiftRLong),
7045         * (shiftLLong): Implemented with pic16_emitpcode
7046         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
7047         * (genLeftShift): Fixed bug, operand for shift by variable always
7048         was "and"ed with 0x0f,
7049         * (genLeftShiftLiteral),
7050         * (genrshTwo),
7051         * (genRightShiftLiteral): added debugging info,
7052         * (genrshFour): added comment,
7053         * (genRightShift): determined signedness from operand "left"
7054         instead of "result"
7055
7056 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7057
7058         * src/SDCCicode.c (geniCodeParms),
7059         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
7060         function pointers, fixed function pointer bugs #861242 and #861896
7061
7062 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7063
7064         * device/include/c8051f000.h,
7065         * device/include/c8051f120.h,
7066         * device/include/c8051f300.h: added header files for Silicon
7067         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7068
7069 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
7070
7071         * src/SDCCast.c (processParams): added new type flow and restructured
7072         (gatherAutoInit): added new type flow
7073         (addCast): cosmetic changes
7074         (getLeftResultType): added new type flow for array indices, patch
7075         provided by Stas, see FR #877103
7076         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
7077         array index patch by Stas
7078         * src/SDCCast.h: added prototype getResultTypeFromType()
7079         * src/SDCCval.h,
7080         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
7081         * src/pic/glue.c (pic14emitStaticSeg),
7082         * src/pic16/glue.c (pic16emitStaticSeg),
7083         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
7084         for initialization of symbols
7085         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
7086         * support/Util/SDCCerr.h:
7087         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
7088         * .version: bumped version number to 2.3.8
7089         * device/include/Makefile.in (install),
7090         * doc/Makefile (install): changed to 'rm `find ...`' construct to
7091         avoid warnings
7092
7093 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
7094
7095         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
7096         Slade Rich fixed an optimization bug
7097         * src/pic/pcodepeep.c,
7098         * src/pic/pcoderegs.c
7099         * doc/Makefile (install): added test for directory
7100
7101 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7102
7103         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
7104         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
7105         * src/pic/ralloc.c (getRegPtr, getRegGpr),
7106         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
7107         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
7108         * as/mcs51/asexpr.c (term),
7109         * as/hc08/asexpr.c (term): fixed bug #887146
7110
7111 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7112
7113         * src/z80/gen.c (genMult): handle single byte result product
7114         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
7115         DUMMY_READ_VOLATILE (fixed bug #886367)
7116
7117 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7118
7119         * support/regression/tests/libmullong.c: fixed logic, on little endian
7120         hosts we ended without a mullong_wrapper()
7121
7122 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7123
7124         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
7125         virus/worm forged address usage.
7126
7127 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7128
7129         Fixed promotion, it should be done on AST level:
7130         * src/SDCCast.c (addCast): added promotion to int
7131         (decorateType): updated call to upCast()
7132         * src/SDCCicode.c (geniCodeLeftShift): removed call to
7133         usualUnaryConversions()
7134
7135 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
7136
7137         * support/regression/tests/literalop.c (mulWrapper): Added a
7138         wrapper to remove integer overflow warnings.
7139
7140         * support/regression/tests/float_trans.c: Made work on host.
7141
7142         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
7143         location of sz80.
7144
7145         * support/regression/generate-cases.py (main): Changed from inline
7146         to a main method.
7147
7148         * doc/Makefile (install): Changed to depth first to get rid of
7149         missing directory install warning.
7150
7151         * as/Makefile (install-doc): Made work on Mac.
7152
7153 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
7154
7155         * src/SDCCast.c: added an additional type flow in decorateType() of
7156         opposite direction, see feature request #860006; it's enabled at runtime
7157         by setting the environment variable SDCC_NEWTYPEFLOW
7158         * src/SDCCast.h: changed prototype of decorateType()
7159         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
7160         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
7161         'char' to 'int' can be omitted, if both operands are 'unsigned char';
7162         see feature request #877103
7163         * src/SDCCval.c: updated call of decorateType()
7164         (valBitwise): fixed bug #882876
7165         (valMinus): added promotion
7166         (valLogicAndOr): result is unsigned
7167         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
7168         * src/SDCCsymt.c (computeType),
7169         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
7170         must not cause an unsigned operation
7171         * src/pic/glue (pic14emitRegularMap),
7172         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
7173
7174 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
7175
7176         * src/pic/pcode.c (PCodeID): commented out left over debug code
7177
7178 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7179
7180         * support/valdiag/tests/overflow.c: added shift tests
7181         * src/pic/device.c,
7182         * src/pic/gen.c,
7183         * src/pic/gen.h,
7184         * src/pic/glue.c,
7185         * src/pic/main.c,
7186         * src/pic/pcode.c,
7187         * src/pic/pcode.h,
7188         * src/pic/pcodepeep.c,
7189         * src/pic/pcoderegs.c,
7190         * src/pic/ralloc.c,
7191         * src/pic/ralloc.h: applied patch from Slade Rich;
7192         added support for multiple code pages and multiple RAM banks on the
7193         PIC 14 port. The ASM files now no longer simply assume all the
7194         code / RAM are in the same page / bank. This means the linker can
7195         safely allocate code/RAM of separate ASM files to different pages/banks.
7196         * doc/sdccman.lyx: added Slade's tips
7197         * src/mcs51/peeph.def: fixed bug #880768
7198
7199 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7200
7201         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7202         * src/SDCCast.c (decorateType): fixed bug #880197
7203
7204 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7205
7206         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7207         getopt.h.
7208
7209         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7210         strtof is not part of C89 and isn't included with Mac OS X.
7211
7212 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7213
7214         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
7215         shiftL2Left2Result): fixed bug #879326
7216         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
7217         (genMultOneByte): fixed bug in signed vs unsigned multiplication
7218         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
7219         address fetch for clr instruction
7220         * device/lib/hc08/_mulint.c: created optimized assembly version
7221         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
7222
7223 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
7224
7225         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
7226         proposed in FR #877103
7227
7228 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
7229
7230         * src/SDCCval.c (cheapestVal): added missing checks
7231         * src/SDCCicode.c (usualBinaryConversions): fixed condition
7232         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
7233
7234 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
7235
7236         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
7237         equal operands
7238
7239 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
7240
7241         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
7242         loaded with the linker search paths (-L arguments) and the libraries
7243         to be linked with the current source (-l arguments). Changes
7244         currently will affect only the pic16 port.
7245         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
7246         include path the port specific paths and port specific libraries,
7247         * gplink command now contains the $3 argument,
7248         * src/pic16/device.h,
7249         * src/pic16/device.c,: structure PIC_device is made public and
7250         renamed to PIC16_device, the same for variable Pics which is renamed
7251         to Pics16. Updated all references to them.
7252         * src/pic16/glue.c (pic16glue): corrected bug with code
7253         initialization which bypassed the variable initializations block.
7254
7255         * device/lib/pic16/Makefile.rules: removed --penable-stack from
7256         COMPILE_FLAGS and added the --nostdinc option
7257
7258 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7259
7260         * device/include/mc68hc908jb8.h: Register defs for another member
7261         of the hc08 family. Contributed by Bjorn Bringert - thanks!
7262
7263 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
7264
7265         Documenting changes from previous commits.
7266         * configure.in (version 1.56),
7267         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
7268         when generating output files to configure the pic16 library,
7269         but now I've commented it out, since gputils aren't installed in the
7270         SF compile farm, so library won't compile
7271
7272         * device/lib/Makefile.in (version 1.56): initially I've added in
7273         target 'all' the prerequestive 'model-pic16' so it compiled the
7274         pic16 library, but now I've commented it out for the same reasons
7275         above,
7276         * added targets 'model-pic16' and 'objects-pic16' to compile the
7277         library
7278         * added target 'port-specific-objects-pic16' to handle the
7279         generated libraries and copy them into the build/ directory
7280         * added target 'clean-intermediate-pic16' to clean intermediate
7281         files into pic16 directory
7282         * in target 'installdirs' added line to create directory pic16 in
7283         the installation path
7284
7285         * device/include/Makefile.in (version 1.11): in target 'install'
7286         added lines to copy all header files to installation path,
7287         * in target 'installdirs' added line create directory for pic16
7288         headers in the installation path
7289
7290 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
7291
7292         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
7293          a function call
7294
7295 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
7296
7297         * configure,
7298         * device/lib/configure.in,
7299         * device/lib/configure: fixed for autoconf 2.57
7300
7301 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7302
7303         * src/z80/main.c (_parseOptions): fixed the portmode= command line
7304         option so that it actually works. Made it specific to the z80, since
7305         the gbz80 doesn't have these kinds of I/O ports.
7306
7307 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7308
7309         * device/include/z180.h,
7310         * device/lib/_memcpy.c,
7311         * device/lib/_memmove.c,
7312         * device/lib/_mulint.c,
7313         * device/lib/ser_ir.c,
7314         * device/lib/ser_ir_cts_rts.c,
7315         * device/lib/_strcmp.c,
7316         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
7317         * src/z80/main.c (_process_pragma): add support for pragmas bank and
7318         portmode; added deprecation warning for bank= and protmode= forms.
7319         Also, guard against buffer overflow.
7320         * src/z80/gen.c (aopGet): generate better code for sfr banked read
7321
7322 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7323
7324         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
7325         changed interrupt vector table generation to only emit declared vectors.
7326         * device/include/Makefile.in: added missing backslash
7327         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
7328
7329 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7330
7331         Mainly changes to support compilation of the device libraries
7332         * src/pic16/device.c: stack is allocated via symbol and not
7333         via literal number. The symbol is placed in the corresponding
7334         position of the data ram
7335         * (pic16_dump_section): relocatable and absolute uninitialized
7336         data are now emitted in sorted order to reduce section naming,
7337         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
7338         weren't marked as being in the access bank,
7339
7340 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7341
7342         Added portion of GNU PIC Library under the directory
7343         device/include/pic16 and device/lib/pic16. These files
7344         contain the declarations of SFRs for the PIC18Fxx2 devices.
7345         The directory is initialized via configure from toplevel.
7346
7347 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
7348
7349         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
7350         the spilllocations to be compared correctly
7351
7352 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7353
7354         * src/SDCCast.c (decorateType): fixed bug introduced today
7355
7356 2004-01-12  Borut Razem <borut.razem AT siol.net>
7357
7358         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
7359         doc/sdccman.lyx: upper case pragmas are deprecated
7360
7361 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7362
7363         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
7364         in simpler and even better code
7365
7366 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
7367
7368         * src/SDCCicode.c (operandOperation): fixed bug #874819
7369         * src/SDCCast.c (decorateType): fixed
7370         char foo (unsigned long ul) { return ul > 0; }
7371
7372 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7373
7374         * doc/sdccman.lyx: Moved and added some sections, small changes
7375         all over. Telling LaTeX to be less strict with word spacing
7376         to better keep the right margin. Changed some notes about
7377         maintainance of the ports in section 3.2.1 - is it OK like this?
7378
7379 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
7380
7381         SDCC source changes:
7382         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
7383         convilong): modified to inform the pic16 port that builtin functions
7384         are external
7385
7386         PIC16 PORT specific changes:
7387         * src/pic16/device.c pic16_dump_equates() added,
7388         processor registers declared internally by the port are emitted in
7389         the translation as equates,
7390         * src/pic16/gen.c: inline code is passed unprocessed to the
7391         translation,
7392         * (pic16_popGetLit2): fnuction modified to take second operand as
7393         pCodeOp pointer and not as literal,
7394         * (popRegFromIdx): prefixed with pic16_,
7395         * (pic16_popCombine2): modified to receive already allocated pCode
7396         operands,
7397         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
7398         * (genFunction): initializes local stack frame and pushes on stack
7399         all the registers used by this function,
7400         * (genEndFunction): restores all registers from stack and restores
7401         stack frame,
7402         * src/pic16/glue.c (pic16emitRegularMap): various changes and
7403         improvements,
7404         * (pic16glue): changed the program startup sequence,
7405         * added new dbName code 'A' for functions placed in absolute section
7406         * src/pic16/main.c: added function attribute _naked,
7407         * added pragma 'code' to place a fnuction at an absolute address,
7408         * added command line arguments --debug-ralloc and --pcode-verbose,
7409         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
7410         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
7411         * (pic16_newpCodeOpLit2): modified to take the second operand as
7412         pCodeOp pointer,
7413         * (pic16_printpBlock): modified to emit each function in a separate
7414         section,
7415         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
7416         UPPER for immediate operands,
7417         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
7418         instruction,
7419         * src/pic16/peeph.def: all peepholes with movff are commented out,
7420         because there is a problem in the pcode peep optimizer,
7421         * src/pic16/ralloc.c: the register allocator can now reuse local
7422         function symbols for another function. This saves register usage.
7423         * src/pic16/ralloc.h: added flag isLocal in structure regs,
7424
7425         Added file src/pic16/NOTES with information about program writing on
7426         the current port version.
7427
7428 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7429
7430         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
7431         and peephole 252 (array access)
7432
7433 2004-01-09  Borut Razem <borut.razem AT siol.net>
7434
7435         * src/SDCCmain.c : fixed #872250: -l command line defined library
7436           files are scanned before standard library files
7437
7438 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7439
7440         * src/SDCCast.c (decorateType): fixed bug #874046
7441
7442 2004-01-09  Borut Razem <borut.razem AT siol.net>
7443
7444         * support/scripts/sdcc.nsi: remove previous installation
7445
7446 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7447
7448         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
7449         bytes for last interrupt vector (mcs51)
7450         * sdcc.spec: fixed typo
7451
7452 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7453
7454         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
7455         gen51Code): more efficient parameter receive for --model-large
7456         ("bug" #845294)
7457
7458 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7459
7460         * src/ds390/main.c,
7461         * src/z80/main.c: added missed needLinkerScript flags (more than
7462         one port structure defined in these file)
7463         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
7464         bug #795325
7465
7466 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
7467
7468         * src/SDCCmain.c: removed various references to DEFAULT_PORT
7469         * src/port.h: added flag needLinkerScript in port->linker
7470         structure to inform whether to create a .lnk file or not,
7471         * src/avr/main.c,
7472         * src/ds390/main.c,
7473         * src/hc08/main.c,
7474         * src/mcs51/main.c,
7475         * src/pic/main.c,
7476         * src/pic16/main.c,
7477         * src/xa51/main.c,
7478         * src/z80/main.c: changed appropriately to configure
7479         needLinkerScript flag
7480         * src/pic/gen.c,
7481         * src/pic16/gen.c (genAddrOf): fixed bug #863624
7482         * src/pic/glue.c: added variable udata_section_name to
7483         override default uninitialized data segment definition for
7484         devices only with SHAREBANK memory (reported from Erik Epetrich)
7485         * (pic14emitOverlay): modified to emit a commented overlay segment
7486         directive when no overlay data exist
7487         * (picglue): modified to emit uninitialized data segment
7488         according to udata_section_name
7489         * src/pic/main.c (_pic14_parseOptions): added command line
7490         options --udata-section-name=[name] to override default
7491         udata definition name
7492         * modified _linkCmd and _asmCmd to include compiler passed
7493         arguments via -W option
7494         * src/pic16/main.c: added $l in _asmCmd, changed extension for
7495         object file from '.rel' to '.o' in port->linker structure,
7496         changed size of fptr from 2 to 3 in port structure
7497
7498 2004-01-07  Borut Razem <borut.razem AT siol.net>
7499
7500         * support/scripts/sdcc.nsi: update PATH
7501         * support/scripts/sdcc.ico: craeted
7502
7503 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
7504
7505         * device/include/Makefile.in: fix install
7506         * doc/Makefile: fix install
7507
7508 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7509
7510         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
7511         in bug #860505
7512         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
7513         how the function variable allocation summary is displayed; also
7514         include information about variables allocated to the overlay
7515         segment
7516
7517 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7518
7519         * as/mcs51/lkmain.c: Help about -Y option
7520         * as/mcs51/lkarea.c: Fixed gcc warnings
7521
7522 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7523
7524         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
7525         fixed warning
7526         * support/valdiag/tests/overflow.c: added
7527         * src/SDCCast.c (decorateType),
7528         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
7529         LEFT_OP (left shift)
7530
7531 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7532
7533         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
7534         (default behaviour).
7535
7536 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7537
7538         A python script to validate compiler diagnostic messages. It can be
7539         used to verify that sdcc complains about bad c source code and
7540         gives a good location of the error.
7541         * support/valdiag/Makefile,
7542         * support/valdiag/valdiag.py,
7543         * support/valdiag/tests/*
7544
7545 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7546
7547         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
7548         * src/SDCCsymt.c (newEnumType),
7549         * src/SDCCsymt.h
7550         * support/Util/SDCCerr.c,
7551         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
7552         enum related bugs.
7553         * support/regression/tests/enum.c: added test for enum values that
7554         require at least 2 bytes of storage.
7555
7556 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7557
7558         * src/common.h: added ifndef/define/endif macros
7559         around the header file.
7560         Bug reported from Jesus Calvino-Fraga
7561
7562 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7563
7564         * sdcc.spec: updated
7565         * device/include/Makefile.in: don't install CVS directories
7566         * device/lib/Makefile.in: added removal of CVS directories after install
7567         * doc/Makefile: fixed install, added local_icons
7568         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
7569         * src/mcs51/gen.c (genRightShift): fixed bug #870788
7570         * src/ds390/gen.c (genRightShift): fixed bug #870788
7571         * src/SDCCast.c (decorateType): fixed bug #870781
7572
7573 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7574
7575         PIC16 port related changes:
7576         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
7577         added variable stackPos,
7578
7579         * gen.c: genCall, assignResultValue: added support for
7580         pushing/retrieving function parameters to/from stack,
7581         genFunction,genEndFunction: setup stack frame for the
7582         generated function,
7583         genAddrOf: will be changed according to bug 863624
7584
7585         * added files genutils.c and genutils.h which contain gen*
7586         debugged and optimised functions extracted from gen.c
7587
7588         * glue.c: added variable 'externs' which holds extern symbols,
7589         pic16emitRegularMap: is modified to properly handle relocatable
7590          symbols under the new scheme,
7591         pic16createInterruptVect: is modified
7592         pic16printPublics: is modified to emit 'global' assembler directives,
7593         added pic16_printExterns to print extern symbols,
7594         pic16glue: initializes stack/frame pointer in the beginning of
7595         the assembly output. Temporary hack, will be corrected later,
7596         because gplink yet does not support stack and SDCC does not
7597         yet support a type of crt0.o object to create the final binary.
7598
7599         * Removed many lines that contain 8051 legacy code.
7600         * The code is finally placed under a 'code' directive.
7601         * Added port specific options.
7602
7603         * _process_pragma: simplified since now we do not need *special*
7604         include file to define SFR registers. But a separate header
7605         will be needed. This will be developed later.
7606         * _pic16_parseOptions: added, parses port specific options:
7607         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
7608         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
7609         --preplace-udata-with=
7610
7611         * _pic16_setDefaultOptions: modified to initialize section names,
7612         but hack is temporarly out of order since it needs improvement.
7613         * _pic16_genAssemblerPreamble: configuration words are emitted by
7614         their address instead of their name. This part is incomplete and
7615         supports only the 18Fxx2 devices. Other devices will emit an error
7616         during assembly since they do not contain the same set of config
7617         registers
7618         * _pic16_genIVT: is modified,
7619
7620         * pcode.c: added definitions for some hardware registers that are needed
7621         for stack support
7622         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
7623         All PCI entries are updated. Now LFSR is supported.
7624         * Removed pic16_pciTRIS is mentioned by mdubuc in source
7625         * added pic16_newpCodeOpLit2 to support instructions with
7626         two literal arguments
7627         * pic16_pCode2str: corrected code that emits assembler instructions
7628         with two literal operands and those that have an access bit modifier
7629         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
7630         this fixes a bug which caused some labels to be lost, when an
7631         assembler directive was added, i.e. banksel,
7632         * pic16_FixRegisterBanking: improved logic that causes the insertion
7633         of bank switching,
7634         * InlineFunction: functions that are called once, are not any more
7635         inlined. This can be a port option in the future,
7636
7637         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
7638
7639         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
7640         hold the corresponding uninitialized symbols,
7641         * pic16_allocProcessorRegister: registers have explicit marked the
7642         accessBank field,
7643         * pic16_allocInternalRegister: registers are explicit marked as
7644         not used,
7645         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
7646         processing list, so bit registers were lost,
7647         *
7648
7649         * ralloc.h: added field 'accessBank' and original symbol operand
7650         in register definition,
7651         * removed the field isMapped from register definition,
7652
7653         ** Several functions have been removed from various sources:
7654         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
7655         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
7656         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
7657         pic16_assignRelocatableRegisters
7658
7659         ** others have been introduced:
7660         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
7661         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
7662
7663 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
7664
7665         * support/scripts/inc2h.pl: changed definition of BIT_AT
7666         to emit 'sbit at' instead of 'bit at'. This was a request.
7667
7668         PIC16 port related preliminary changes:
7669         * gen.c: prefixed function popRegFromString with
7670         pic16_ and all references to it corrected
7671         * pcode.c: all pic16_pc_* hardware registers prefixed
7672         with underscore (_),
7673         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
7674         * ralloc.c: newReg(): when register is REG_SFR then
7675         set address to rIdx,
7676         pic16_allocProcessorRegister(): marks register wasUsed=0
7677         pic16_writeUsedRegs(): added a call to assign processor
7678         registers via pic16_assignFixedRegisters
7679
7680 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7681
7682         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
7683         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
7684         variables in unused register banks.  Also the SSEG is placed
7685         wherever there is enough space for it, and IDATA can be anywhere
7686         in internal RAM.  For now compile using -Wl-Y[stack_size].
7687         The mem file is different for this option as well, since it
7688         makes no sense of talking about DSEG lenght.
7689
7690 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
7691
7692         * src/SDCClrange.c: fixed bug 869095 that caused segfault
7693         in certain cases, e.g. when ROM assignment, patch provided
7694         from Albert den Haan.
7695
7696 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
7697
7698         Many signedness and type propagation fixes:
7699         * src/SDCCicode.c: made geniCodeCast() static
7700         replaced SPEC_ by IS_ (cosmetic)
7701         (operandOperation): fixed div and mod operation
7702         (usualBinaryConversions): added support for promotion of char
7703         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
7704         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7705         (geniCodeAdd): an array index will stay unsigned, even if promoted
7706         from char to int
7707         (geniCodeArray): ditto
7708         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7709         * src/SDCCsymt.c (computeType): added more support for char;
7710         promotion of char is selectable by promoteCharToInt, fixed signedness
7711         for all cases
7712         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7713         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7714         * src/SDCCval (val*): replaced signedness calculation by
7715         computeType()
7716         rearranged if-branches (cosmetic)
7717         (valShift): added warning W_SHIFT_CHANGED
7718         (valCompare): fixed problem with different types
7719         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7720         * support/regression/tests/literalop.c: added many cases
7721         * support/regression/tests/ast_constant_folding.c: changed finally to
7722         'unsigned int'
7723         * .version: new year, new version: 2.3.7
7724         * src/SDCCmain.c (main): applied patch #866468
7725         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7726         provided by Scott Bronson
7727         * doc/sdccman.lyx: updated documentation for sdcdb
7728         updated and added chapter tips
7729
7730 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7731
7732         * src/SDCCsymt.h: missing from yesterday's commits
7733
7734 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7735
7736         * src/SDCC.y (struct_or_union_specifier),
7737         * support/Util/SDCCerr.c,
7738         * support/Util/SDCCerr.h: verify that struct & union tags are used
7739         as declared.
7740
7741 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7742
7743         * src/SDCCglobl.h: missing from yesterday's commits
7744
7745 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7746
7747         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7748         sft_attributes, struct_declaration, parameter_declaration,
7749         type_name, start_block, declaration_list),
7750         * src/SDCC.lex (check_type): support redefinition of typedef names
7751
7752 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7753
7754         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7755         aligned xdata arrays. Erik helped me with the if clause.
7756
7757 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7758
7759         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7760         warning
7761
7762 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7763
7764         * src/SDCCast.h,
7765         * src/SDCCast.c (newAst_),
7766         * src/SDCCicode.h,
7767         * src/SDCCicode.c (ast2iCode, newiCode),
7768         * src/SDCCglobl.h,
7769         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7770         expr, statement, expression_statement, selection_statement,
7771         iteration_statement, expr_opt, jump_statement): foundation for tracking
7772         sequence points
7773         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7774         point code too)
7775
7776 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7777
7778         * support/Util/SDCCerr.c,
7779         * src/SDCCast.h,
7780         * src/SDCCast.c (createCase, createDefault, decorateType),
7781         * src/SDCClabel.c (labelUnreach),
7782         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7783         to error messages.
7784         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7785         (with thanks to Stas Sergeev)
7786         * device/include/time.h,
7787         * device/lib/time.c (CheckTime): suppress unreachable code warning
7788
7789 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7790
7791         * src/SDCCast.c (createIvalCharPtr),
7792         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7793         bug #753752)
7794         * support/regression/tests/nullstring.c: tests for these two bugs
7795
7796 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7797
7798         * support/Util/SDCCerr.h,
7799         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7800         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7801         about storage class and 'at' used inside struct or union
7802         * src/SDCCBBlock.c (iCodeFromeBBlock),
7803         * src/SDCCcse.c (ifxOptimize),
7804         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7805         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7806         printIval, emitStaticSeg, emitOverlay),
7807         * src/SDCClabel.c (deleteIfx),
7808         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7809         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7810         gatherAutoInit, processParms),
7811         * support/Util/SDCCerr.h,
7812         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7813         reporting for post-parse errors.
7814
7815 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7816
7817         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7818         implicit casts via union; they don't work on big endian systems
7819         (possible fix for bug #861138)
7820
7821 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7822
7823         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7824         * src/mcs51/main.c: fixed the fix for bug #737001
7825
7826 2003-12-15  Borut Razem <borut.razem AT siol.net>
7827
7828         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7829
7830 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7831
7832         * support/makebin/makebin.c: put output in binary mode
7833
7834 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7835
7836         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7837         xdata and data memory on startup. Set the environment variable
7838         SDCC_NOGENRAMCLEAR to disable this.
7839         * src/mcs51/peephole.def,
7840         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7841         (allows non-interrupt and interrupt code to safely compete for a resource
7842         without the non-interrupt code having to disable interrupts)
7843
7844 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7845
7846         * src/SDCCicode.c (geniCodeAdd),
7847         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7848         with valFromType if type might be a pointer and host is big endian).
7849         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7850         types, not just integer types.
7851         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7852         multiply defined with mismatching "at" address.
7853
7854 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7855
7856         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7857         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7858         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7859         with embedded nulls (fixed bug #753752)
7860
7861 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7862
7863         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7864         Apparently this did not see much testing (endless loop)
7865
7866 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7867
7868         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7869
7870 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7871
7872         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7873         gracefully handle NULL memmap pointers
7874
7875 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7876
7877         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7878         instead of deleting the iCode when an operand is volatile
7879         * src/z80/gen.c (genDummyRead),
7880         * src/mcs51/gen.c (genDummyRead),
7881         * src/ds390/gen.c (genDummyRead),
7882         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7883         not just IC_RIGHT
7884         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7885         * src/SDCC.y: fixed bug #850420
7886
7887 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7888
7889         Applied z80 i/o port patch from Peter Townson and fixed some operators
7890         to better handle operands in A register.
7891         * device/include/z180.h
7892         * src/SDCC.y
7893         * src/SDCCglue.c
7894         * src/z80/gen.c
7895         * src/z80/gen.h
7896         * src/z80/main.c
7897         * src/z80/peeph-z80.def
7898         * src/z80/peeph.def
7899         * src/z80/z80.h
7900
7901 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7902
7903         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7904
7905 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7906
7907         * device/lib/hc08/_mullong.c: Removed extra #endif
7908
7909 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7910
7911         * sim/ucsim/hc08.src/inst.cc,
7912         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7913         carries from x to h
7914         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7915         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7916         * device/include/stdarg.h: fixed varargs for hc08
7917         * device/lib/Makefile.in,
7918         * device/lib/hc08/Makefile,
7919         * device/lib/hc08/_mulint.c,
7920         * device/lib/hc08/_mullong.c: fixed some endian problems
7921
7922 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7923
7924         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7925         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7926         * device/lib/_gptrget.c,
7927         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7928
7929 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7930
7931         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7932         * src/SDCCast.c (astErrors): fixed bug #846007
7933         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7934
7935 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7936
7937         * src/SDCCast.c (decorateType): disabled a transformation I added in
7938         revision 1.188 (access to fields of a structure at an absolute address);
7939         it breaks with bitfields, extern declarations, and gcse analysis.
7940         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7941         could be assigned through a pointer, so don't complain.
7942         * src/SDCCast.c (astErrors),
7943         * src/SDCCast.h,
7944         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7945
7946 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7947
7948         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7949         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7950         output of __config directives, since gpasm now supports them
7951         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7952         pre-processor macro, i.e. -DMCU=p18f452
7953         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7954         and modified to handle 'cast' icode similarly to '=' icode
7955         * src/pic16/device.h (typedef struct PIC_device): added field
7956         'extMIface' to indicate that chip has external memory interface
7957         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7958         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7959         18F8720
7960
7961 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7962
7963         * src/SDCC.y (pointer): fixed bug #846006
7964         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7965         * src/SDCCast.c (decorateType): fixed bug #846009
7966         * src/ds390/peeph.def,
7967         * src/ds390/gen.c (genAnd, genOr),
7968         * src/mcs51/peeph.def,
7969         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7970
7971 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7972
7973         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7974         * src/SDCCdflow.c
7975         * src/SDCCcse.c
7976         * src/SDCCcse.h
7977         * src/SDCCBBlock.h
7978         * src/SDCCBBlock.c
7979
7980 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7981
7982         fixed bug #845089
7983         * src/SDCCbitv.h,
7984         * src/SDCCbitv.c: added function to free a bitvector
7985         * src/SDCClrange.h,
7986         * src/SDCClrange.c: added function to recompute the liveranges
7987         * src/avr/ralloc.c,
7988         * src/ds390/ralloc.c,
7989         * src/hc08/ralloc.c,
7990         * src/mcs51/ralloc.c,
7991         * src/pic/ralloc.c,
7992         * src/pic16/ralloc.c,
7993         * src/xa51/ralloc.c,
7994         * src/z80/ralloc.c: recompute the liveranges after register packing
7995
7996 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7997
7998         * src/SDCCloop.c (newInduction): fixed bug #845630
7999
8000 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8001
8002         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
8003         inadvertantly left behind from my 2003-11-12 change
8004
8005 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8006
8007         Updated headers I neglected to commit yesterday.
8008         * src/SDCClrange.h,
8009         * src/SDCCicode.h
8010
8011 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8012
8013         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
8014         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
8015         * src/SDCCopt.c (eBBlockFromiCode),
8016         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
8017         the creation of the key hash table from the sequencing so it can be used
8018         earlier (for some GCSE bug fixes still pending)
8019
8020 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8021
8022         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
8023         * support/regression/tests/addsub.c: testing genPlus shortcut
8024
8025 2003-11-15  Borut Razem <borut.razem AT siol.net>
8026
8027         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
8028
8029 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8030
8031         * src/SDCCcse.c (cseBBlock): fixed bug #527779
8032         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
8033         ordering is immaterial.
8034         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
8035
8036 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8037
8038         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
8039         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
8040         (SIGSEV) of bug #840381
8041         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
8042         unlink new file before rename if new and old filenames are the same)
8043
8044 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8045
8046         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
8047         uninitialized variables) for the mcs51. Set environment variable
8048         SDCC_GENRAMCLEAR to test.
8049         xdata initialization slightly shorter
8050
8051 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8052
8053         * src/SDCCsymt.h,
8054         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
8055         #838241 & 780691 (basicly the same bug)
8056         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
8057         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
8058
8059 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
8060
8061         * src/SDCCmain.c (linkEdit): "fix" #834252
8062
8063 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8064
8065         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
8066         * src/SDCCast.h,
8067         * src/SDCC.y: fixed bug #819403
8068
8069 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8070
8071         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
8072         the reentrant attribute.
8073         * src/hc08/gen.c (genPackBits): added missing stack readjustment
8074         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
8075         simulation
8076         * src/SDCCast.c (decorateType): fixed bug with storage class not being
8077         updated during pointer dereference; f.e. ~(((char *)1)*) was being
8078         erroneously reduced to a literal.
8079         * src/hc08/ralloc.c (packRegisters, rematStr),
8080         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
8081         some cases
8082
8083 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8084
8085         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
8086         * doc/sdccman.lyx: changed from 'article' to 'book'
8087         * doc/Makefile: readded test_suite_spec and cdbfileformat
8088
8089 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
8090
8091         * device/include/stdlib.h: include malloc.h to comply with ANSI
8092         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
8093
8094 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8095
8096         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
8097         * doc/clean.mk: also remove *.out files
8098         * doc/sdccman.lyx: some additions, larger top/bottom margins
8099
8100 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8101
8102         * src/SDCC.y: fixed bug #837365
8103         * support/regression/tests/bitopcse.c
8104         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
8105         a symbol (might be valop instead)
8106         * device/lib/Makefile.in: added errno.c to HC08SOURCES
8107         * device/lib/clean.mk: added hc08 to the cleaning list
8108
8109 2003-11-04  Borut Razem <borut.razem AT siol.net>
8110
8111         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
8112           made 2003-11-04
8113         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8114           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
8115           malloc is declared in standard stdlib.h
8116
8117 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8118
8119         * device/lib/hc08/Makefile: need to clean .rel not .o files
8120         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
8121
8122 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8123
8124         * src/port.h,
8125         * src/hc08/main.c,
8126         * src/mcs51/main.c,
8127         * src/ds390/main.c,
8128         * src/z80/main.c,
8129         * src/avr/main.c,
8130         * src/pic/main.c,
8131         * src/pic16/main.c,
8132         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
8133         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
8134         tests (which uses the port's oclsExpense function)
8135         * src/SDCC.y,
8136         * src/SDCCast.c,
8137         * src/SDCCicode.c,
8138         * src/hc08/gen.c,
8139         * src/ds390/gen.c,
8140         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
8141
8142 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8143
8144         * src/SDCCcse.c (ifxOptimize),
8145         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
8146         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
8147         deleting the IFX iCode.
8148         * src/hc08/ralloc.c: reduced unneeded slocs
8149         * src/hc08/gen.c: fixed bug in asmopToBoolean
8150
8151 2003-11-04  Borut Razem <borut.razem AT siol.net>
8152
8153         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
8154           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8155           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
8156           transferred to configure
8157
8158 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
8159
8160         Use headers defined in the C[++] standards:
8161         * sim/ucsim/gui.src/serio.src/fileio.cc
8162         * sim/ucsim/gui.src/serio.src/frontend.cc
8163         * sim/ucsim/gui.src/serio.src/main.cc
8164         * sim/ucsim/gui.src/serio.src/posix_signal.cc
8165         * support/Util/NewAlloc.c
8166         * as/hc08/lklibr.c
8167         * as/mcs51/lklibr.c
8168         * as/z80/aslist.c
8169         * as/z80/assym.c
8170
8171 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8172
8173         * Added MSVC projects for hc08 assembler and linker:
8174         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
8175         /as/hc08/link_hc08.dsp
8176
8177 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8178
8179         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8180
8181 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8182
8183         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8184
8185 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8186
8187         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8188
8189 2003-10-31  Borut Razem <borut.razem AT siol.net>
8190
8191         * support/cpp2/cpplib.h,
8192           support/cpp2/cpplib.c,
8193           support/cpp2/cpplex.c,
8194           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8195           to switch _asm block preprocessing on / off. Default is
8196           #pragma preproc_asm +
8197
8198 2003-10-31  Borut Razem <borut.razem AT siol.net>
8199
8200         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8201           when outputting comment blocks (when executed with -C option) and
8202           _asm (SDCPP specific) blocks
8203
8204 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8205
8206         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8207
8208 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8209
8210         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8211
8212 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
8213
8214         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
8215         * src/SDCCast.c (decorateType): fixed bug #832664
8216
8217 2003-10-31  Borut Razem <borut.razem AT siol.net>
8218
8219         * support\cpp2\cpplex.c: fixed for SDCPP:
8220           comments(when executed with -C option) and _asm blocks
8221           were included even if they where in skipped #if block.
8222           Applied solution from GCC cpp 3.3.2
8223
8224 2003-10-31  Borut Razem <borut.razem AT siol.net>
8225
8226         * src/SDCC.lex: sdcc now understands both formats:
8227           '# <line_number> <file_name>' and
8228           '#line <line_number> <file_name>'
8229         * support/cpp2/cppmain.c: sdcpp now generates the standard
8230           '# <line_number> <file_name>' instead of former
8231           '#line <line_number> <file_name>'
8232
8233 2003-10-30  Borut Razem <borut.razem AT siol.net>
8234
8235         * support/cpp2/cpphash.h,
8236         * support/cpp2/cpplib.h
8237         * support/cpp2/cpplex.c,
8238         * support/cpp2/cppmain.c,
8239         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
8240
8241 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8242
8243         Fixed a number of problems revealed by bug #827883.
8244         * src/SDCCloop.c (loopInvariants): Spill location of the
8245         result operand should be recomputed if extracted from
8246         a loop. Also, don't extract assignments of an iTemp
8247         from a literal.
8248         * src/SDCCast.c (isConformingBody): loop reversal should
8249         not occur if the control variable is involved with a
8250         relational operator.
8251
8252 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
8253
8254         * .version: bumped to 2.3.6 to reflect the big improvements
8255         made by Erik and Klaus. Thanks!
8256
8257 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
8258
8259         Replaced the livrange code.
8260         * src/SDCClrange.c: added new LR code
8261         * src/SDCCloop.c,
8262         * src/SDCCBBlock.h: removed remainig parts from old LR code
8263         * src/ds390/ralloc.c,
8264         * src/ds390/gen.c: minor fixes to make it work with new code
8265
8266 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8267
8268         * as/hc08/asm.h,
8269         * as/hc08/lkrloc.c,
8270         * src/hc08/gen.c,
8271         * src/hc08/ralloc.c: Fix various warnings related to the hc08
8272         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
8273         (tweaked fix for bug #818696)
8274
8275 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8276
8277         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
8278
8279 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8280
8281         * src/SDCCmain.c,
8282         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
8283         * src/mcs51/gen.c (gencjneshort),
8284         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
8285         more efficient (per Scott Bronson's suggestion)
8286
8287 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8288
8289         Extended the semantics of the critical keyword to include
8290         individual statements. See RFE #827755 and #799831
8291         * src/SDCC.y
8292         * src/SDCCicode.c
8293         * src/SDCCopt.c
8294         * src/SDCCast.c
8295         * support/Util/SDCCerr.c
8296         * support/Util/SDCCerr.h
8297         * src/mcs51/gen.c
8298         * src/ds390/gen.c
8299         * src/hc08/gen.c
8300
8301 2003-10-19  Borut Razem <borut.razem AT siol.net>
8302
8303         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
8304
8305 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8306
8307         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
8308         Fixed bug #818696
8309         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
8310         and predecrement operand is displayed
8311
8312 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8313
8314         * src/SDCCval.c (valMinus): fixed bug #826041
8315
8316 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8317
8318         Some hc08 related updates that I missed earlier
8319         * sim/ucsim/stypes.h
8320         * support/regression/ports/hc08/spec.mk
8321
8322 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8323
8324         New target "hc08" for the Motorola 68hc08 family of micros
8325
8326         * configure
8327         * configure.in
8328         * Makefile
8329         * src/hc08/*
8330         * src/SDCCmain.c
8331         * src/port.h
8332         * sim/ucsim/hc08.src/*
8333         * sim/ucsim/configure.in
8334         * src/ucsim/configure
8335         * sim/ucsim/packages_in.mk
8336         * as/hc08/*
8337         * as/Makefile
8338         * device/include/mc68hc908qy.h
8339         * device/lib/hc08/*
8340         * device/lib/Makefile.in
8341         * support/regression/ports/hc08/*
8342         * support/regression/Makefile
8343
8344 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8345
8346         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
8347         regression test
8348         * src/ds390/gen.c (genCast): fixed bug #821957
8349
8350 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8351
8352         * device/lib/logf.c: "fixed" overlay bug
8353         * support/regression/ports/host/spec.mk: added m library
8354         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
8355         * support/regression/tests/float_trans: added (for Eric)
8356
8357 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
8358
8359         * src/mcs51/gen.c (genCpl): fixed bug
8360         http://sf.net/mailarchive/message.php?msg_id=6263915
8361
8362 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
8363
8364         * src/SDCCast.c (decorateType): added extended constant folding
8365         * src/SDCCsymt.c (computeType): cleanup
8366         * src/SDCCval.c (valShift): minor optimization
8367         * support/regression/tests/ast_constant_folding.c: added
8368
8369 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8370
8371         * src/SDCCmain.c: removed some unintended changes
8372
8373 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8374
8375         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
8376         * src/z80/gen.c: fixed part of bug #817589
8377         * src/SDCCsymt.c (checkFunction): fixed bug #817895
8378
8379 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
8380
8381         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
8382         * src/SDCCcflow.c
8383         * src/SDCCcse.c
8384         * src/SDCCdflow.c
8385         * src/SDCClabel.c
8386         * src/SDCClrange.c
8387         * src/SDCCmem.c
8388         * src/SDCCopt.c
8389         * src/SDCCpeeph.c
8390         * src/SDCCset.c
8391         * src/avr/ralloc.c
8392         * src/ds390/ralloc.c
8393         * src/izt/ralloc.c
8394         * src/mcs51/ralloc.c
8395         * src/pic/ralloc.c
8396         * src/pic16/ralloc.c
8397         * src/xa51/ralloc.c
8398         * src/z80/ralloc.c
8399         * src/z80/gen.c: removed unused label "release:"
8400
8401 2003-10-06  Borut Razem <borut.razem AT siol.net>
8402
8403         * src/SDCC.lex: removed definition of unused variables
8404           save_optimize and save_options
8405
8406 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
8407
8408         * clean.mk: removed '=' in "-maxdepth=1"
8409         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
8410         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
8411
8412 2003-10-06  Borut Razem <borut.razem AT siol.net>
8413
8414         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
8415           my_unput() replaced by unput()
8416
8417 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
8418
8419         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
8420         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
8421         type-punned pointer will break strict-aliasing rules"
8422         Old LR behaviour is again default; Klaus' LR can be choosen by
8423         defining the environment variable LRKLAUS
8424         * src/SDCCBBlock.h
8425         * src/SDCCloop.c
8426         * src/SDCClrange.c
8427         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
8428         * clean.mk: fixed removal of files in bin/CVS/
8429         * device/lib/clean.mk: fixed removal of directories small and large
8430         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
8431         * src/SDCCicode.c,
8432         * src/SDCCval.c: removed superflous test for pedantic
8433
8434 2003-10-05  Borut Razem <borut.razem AT siol.net>
8435
8436         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
8437           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
8438           message "unmatched #pragma SAVE and #pragma RESTORE"
8439
8440 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8441
8442         * doc/sdccman.lyx: various additions and updates (interrupts, inline
8443           assembly, critical functions, atomic, nojtbound)
8444
8445 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
8446
8447         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
8448         * src/SDCCBBlock.h
8449         * src/SDCCloop.c
8450         * src/SDCCloop.h
8451         * src/SDCClrange.c
8452
8453 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8454
8455         * src/z80/gen.h,
8456         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8457         * src/mcs51/gen.h
8458         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8459         * src/ds390/gen.h
8460         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8461         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
8462         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
8463
8464 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8465
8466         * src/z80/gen.c (genRet): fixed bug #524753
8467         * src/z80/gen.c (genCast): fixed internal error on cast from
8468         pointer to long
8469         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
8470         fix for bug #477835 to the z80
8471         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
8472         for tracking iCodes in the peephole optimizer for z80
8473
8474 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8475
8476         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
8477         the other part of bug #814548
8478         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
8479
8480 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
8481
8482         * src/SDCCcse.c: fixed part of bug #814548
8483
8484 2003-09-28  Borut Razem <borut.razem AT siol.net>
8485
8486         * src/asm.c: rewrite of printILine() to use temporary file instead
8487           a pipe
8488         * src/xa51/main.c: commented out declaration of int rewinds
8489
8490 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8491
8492         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
8493
8494 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8495
8496         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
8497         * src/asm.c (printILine): Fixed bug #811015
8498
8499 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8500
8501         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
8502         freeing.
8503
8504 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8505
8506         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
8507         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
8508         to correctly handle general case of AOP_PAIRPTR
8509         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
8510
8511 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8512
8513         * src/mcs51/ralloc.c (fillGaps),
8514         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
8515         register positioning bug)
8516
8517 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
8518
8519         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
8520
8521 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8522
8523         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
8524         genCodePointerGet, genGenPointerGet, genFarPointerSet,
8525         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
8526         (ralloc doesn't intentionally do this now, but perhaps later)
8527         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
8528         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
8529         register positioning bugs (Fixed bug #762602 and #795325)
8530         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
8531         (Fixed bug #808779)
8532         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
8533         lines that --i-code-in-asm generates
8534
8535 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8536
8537         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
8538         trying to fclose a FILE* that was already closed.
8539
8540 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8541
8542         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
8543         of const struct should be treated as if const themselves)
8544
8545 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
8546
8547         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
8548
8549 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8550
8551         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
8552         Unix (/n) and DOS (/r/n) line terminations.
8553
8554 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8555
8556         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
8557         bug #613775
8558
8559 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8560
8561         * src/mcs51/gen.c (genFunction, genEndFunction),
8562         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
8563         and restore of EA so that stack offsets to parameters are
8564         correct when using both critical and reentrant/stack-auto.
8565         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
8566         size (can be triggered in error if sloc is shared between
8567         different sized objects)
8568         * device/include/float.h: fixed macros to explicitly use
8569         unsigned long where needed
8570
8571 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
8572
8573         Feature req. 799831: added code to allow nesting of critical functions
8574         * src/mcs51/gen.c (genFunction, genEndFunction)
8575         * src/ds390/gen.c (genFunction, genEndFunction)
8576
8577 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8578
8579         * src/SDCCsymt.c (sclsFromPtr),
8580         * src/SDCCsymt.h,
8581         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
8582         support for standard C idiom of memory mapped variables; for
8583         example, *((xdata int*)0x1234) = 1 is now internally equivalent
8584         to xdata int at 0x1234 tempvar = 1.
8585         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
8586         provided by Akiya ISHIDA
8587
8588 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
8589
8590         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
8591         * src/SDCCval.c (constVal): added reduction from int to char
8592         * src/SDCCval.c (valMult, valDiv): fixed sign handling
8593         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
8594         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
8595         to ignore the sign
8596         * support/regression/tests/shifts.c: fixed
8597
8598 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8599
8600         * src/z80/gen.c (genXor): Fixed bug #805445
8601
8602 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8603
8604         Fixed bug #621531 (const & volatile confusion in the type chain).
8605         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
8606         refer to the const or volatile state of the pointer itself.
8607
8608         * src/SDCCast.c
8609         * src/SDCCglue.c
8610         * src/SDCCicode.c
8611         * src/SDCCsymt.c
8612         * src/SDCCval.c
8613         * src/SDCC.y
8614         * src/SDCCsymt.h
8615         * src/pic/gen.c
8616         * src/pic/ralloc.c
8617         * src/pic16/gen.c
8618         * src/pic16/ralloc.c
8619         * support/regression/tests/const.c
8620
8621 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8622
8623         When checking for duplicated modules, use absolute paths
8624         instead of relative paths.  Files changed:
8625
8626         * as/mcs51/lklib.c
8627         * link/z80/lklib.c
8628
8629 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8630
8631         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
8632
8633 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8634
8635         * device/include/string.h: added size_t typedef, changed
8636         prototypes to use size_t, eliminated separate reentrant and
8637         non-reentrant declarations, added _memmove declaration
8638         * device/lib/_memcpy.c: changed to use size_t instead of int,
8639         changed /4 to >>2 to avoid division library call
8640         * device/lib/_memcmp.c,
8641         * device/lib/_memset.c,
8642         * device/lib/_strncat.c,
8643         * device/lib/_strncpy.c,
8644         * device/lib/_strncmp.c: changed to use size_t instead of int
8645         * device/lib/_memmove.c: new file (fixed bug #772294)
8646         * device/lib/Makefile.in: added _memmove.c
8647         * device/lib/z80/asm_strings.s: fixed bug #772290
8648         * support/regression/tests/bitfields.c: attempt to fix host assertion
8649         failure on amd64-unknown-linux2.2
8650
8651 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8652
8653         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
8654         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
8655         * as/z80/asmain.c (main): fixed bug #801766
8656
8657 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
8658
8659         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
8660         compilers
8661
8662 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8663
8664         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
8665         reported in bug #800609
8666
8667 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
8668
8669         * Top header beautifications in src/pic16 directory:
8670           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
8671           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
8672           pcoderegs.h, ralloc.c, ralloc.h
8673         * main.c: added top header and GPL license notice
8674         * pcode.c: fixed the if-conditional warning
8675
8676 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
8677
8678         * device/lib/_mullong.c: replaced int by short for gcc
8679
8680 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8681
8682         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
8683         and JUMPTABLE iCodes properly now (worked by accident before)
8684         * src/mcs51/gen.c (leftRightUseAcc),
8685         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
8686         iCode properly now. Use getSize instead of nRegs since a & b
8687         aren't part of the nRegs tally.
8688
8689 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
8690
8691         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
8692         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
8693           before instructions that use the _STATUS register
8694
8695 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
8696
8697         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
8698         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
8699         fetching of the pointer
8700         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
8701         copied from genNearPointerSet()
8702         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
8703         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
8704         If they pop r0/r1 they must be called in the opposite order than aopOp().
8705         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8706         (resp. --stack-auto), prepared for --xstack
8707
8708 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8709
8710         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8711
8712 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8713
8714         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8715         these ports have their own __sdcc_external_start()
8716
8717 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8718
8719         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8720         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8721         type for bits was changed. It resulted in bit variables becoming
8722         global, which is not permitted in PIC 14 assembly output.
8723
8724 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8725
8726         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8727
8728 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8729
8730         Z80 and MCS51 linkers complaint if a public symbol is defined
8731         in more than one library module:
8732
8733         * as/mcs51/lklib.c
8734         * link/z80/lklib.c
8735         * as/mcs51/Makefile.in
8736
8737 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8738
8739         A few small changes that speed up the peephole optimizer.
8740
8741         * src/SDCCpeeph.c
8742
8743 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8744
8745         Try to make the peephole optimizer smarter by maintaining
8746         an association between the assembly source code and the
8747         iCodes that originated them. Put this information to use
8748         with a new peephole rule condition "notVolatile" so that
8749         the rules can be aggressive yet still safe.
8750
8751         * src/SDCCpeeph.c
8752         * src/SDCCpeeph.h
8753         * src/mcs51/gen.c
8754         * src/mcs51/peeph.def
8755
8756 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8757
8758         Fixed bug #741761
8759
8760         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8761         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8762         if the left or right operand symbols have the accuse flag set.
8763
8764 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8765
8766         Changed the type of the result of the ! (NOT) operator to char;
8767         previously it returned the same type as the source. This allows
8768         us to eliminate all the genFloatNot functions (all of its target
8769         implementations were very buggy) since !float can use the same
8770         code as !long now.
8771
8772         * src/SDCCicode.c (ast2iCode): ! returns char
8773         * src/mcs51/gen.c (genNot, genNotFloat),
8774         * src/ds390/gen.c (genNot, genNotFloat),
8775         * src/z80/gen.c (genNot, genNotFloat),
8776         * src/pic/gen.c (genNot, genNotFloat),
8777         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8778
8779 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8780
8781         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8782         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8783            during interrupts. Ensure WSAVE is located at a shared bank address.
8784         2. Fixed page selection in some places
8785         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8786            the registers name strings.
8787         4. Fixed "signed / unsigned compare" compiler warnings.
8788         5. The PIC port manages its own allocation of the general purpose
8789            registers, but makes no attempt to reuse them. As a result when
8790            compiling it soon runs out of general purpose registers. Some
8791            additional code was added to the files pcode.c and device.c to walk
8792            through the function call tree and rename the registers so that they
8793            get reused.
8794
8795         * src/pic/device.c
8796         * src/pic/gen.c
8797         * src/pic/glue.c
8798         * src/pic/pcode.c
8799         * src/pic/pcode.h
8800         * src/pic/ralloc.c
8801         * src/pic/ralloc.h
8802         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8803         genPlus() & genMinus() when the result is the same as left or right
8804
8805 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8806
8807         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8808
8809 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8810
8811         Made bitfield a distinct type from bit so that bitfields
8812         convert as per ANSI C and bits retain their traditional
8813         boolean style behaviour. Implemented bitfield support in
8814         the z80 port.
8815
8816         * src/SDCCsymt.h,
8817         * src/SDCCsymt.c,
8818         * src/SDCCast.c,
8819         * src/cdbFile.c,
8820         * src/mcs51/gen.c,
8821         * src/ds390/gen.c: bit v bitfield split
8822         * src/z80/gen.c: New support for bitfields
8823         * support/regression/tests/bitfields.c: reenabled z80,
8824         added more tests
8825
8826 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8827
8828         Rules 246.x, 247.x relate to bitfields, the others speed up
8829         access to xdata mapped I/O devices.
8830
8831         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8832
8833 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8834
8835         Cleaned up genPackBits and genUnpackBits and added two helper
8836         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8837         for literal assignments in genPackBits (thanks to Frieder for
8838         reminding me).
8839
8840         * src/mcs51/gen.c
8841         * src/ds390/gen.c
8842
8843 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8844
8845         Fixed bug #748310 (pointer to function type mishandled when the
8846         function name is omitted). Also fixed a SIGSEGV when a function
8847         attribute (reentrant, etc) is used on a non-function or on a
8848         function but misplaced before the parameter list.
8849
8850         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8851         bug #748310
8852         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8853         * support/Util/SDCCerr.h,
8854         * support/Util/SDCCerr.c: Added func attr misuse error msg
8855
8856 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8857
8858         Fixed bug #787649 by anonymous
8859         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8860         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8861
8862 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8863
8864         Fixed numerous bitfield problems.
8865
8866         * src/SDCC.y: More bitfield related error checking
8867         * src/SDCCsymt.h,
8868         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8869         * support/Util/SDCCerr.h,
8870         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8871         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8872         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8873         * support/regression/tests/bitfields.c: tests added
8874
8875 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8876
8877         Made the constant following the "interrupt" keyword optional. If
8878         omitted, the function will not automatically be given an entry
8879         in the interrupt vector table (similar to #pragma NOIV, but
8880         less syntacticly kludgy). The interrupt number is also now
8881         range checked. Also fixed a bug in the high order bit example
8882         in the manual.
8883
8884         * src/SDCC.y
8885         * src/SDCCmem.c
8886         * src/SDCCglue.c
8887         * src/SDCCsymt.h
8888         * support/Util/SDCCerr.c
8889         * support/Util/SDCCerr.h
8890         * doc/sdccman.lyx
8891
8892 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8893
8894         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8895         * src/SDCCicode.c (operandOperation): rewritten some ops
8896         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8897         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8898         other type
8899         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8900         be re-activated by defining REDUCE_LITERALS)
8901         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8902         unsigned, but are signed by default
8903         * src/SDCCval.c (constVal): rearranged
8904         * src/SDCCval.c (valMod): preliminary fix
8905         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8906         * support/regression/literalop.c: added, work in progress
8907
8908 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8909
8910         Generate warnings for useless declarations like "char data;"
8911         that don't do what new users expect.
8912
8913         * src/SDCC.y
8914         * support/Util/SDCCerr.h
8915         * support/Util/SDCCerr.c
8916
8917 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8918
8919         * src/SDCCval.c (valMult): fix overflow detection of negative int
8920
8921 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8922
8923         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8924
8925         Changes to support big endian targets:
8926
8927         * src/ports.h
8928         * src/SDCCglue.c
8929         * src/avr/main.c
8930         * src/ds390/main.c
8931         * src/izt/i186.c
8932         * src/mcs51/main.c
8933         * src/pic/main.c
8934         * src/pic16/main.c
8935         * src/xa51/main.c
8936         * src/z80/main.c
8937
8938 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8939
8940         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8941         * device/lib/time.c: fixed warning "integer overflow in expression"
8942
8943 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8944
8945         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8946         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8947         constants are unsigned; added recognition of "u" flag for unsigned
8948         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8949         * src/SDCCval.c (valDiv, valMod): fixed signdness
8950         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8951         signedness of modulo, left and right shift
8952         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8953         * support/Util/SDCCerr.h: added warning W_INT_OVL
8954         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8955         * src/SDCCast.c (ast_print): improved output of constants
8956
8957 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8958
8959         Fixed some warnings when building with MSVC:
8960
8961         * as\mcs51\asdata.c
8962         * as\z80\asdata.c
8963         * as\mcs51\asm.h
8964         * as\z80\asm.h
8965         * link\z80\aslink.h
8966         * link\z80\lkdata.c
8967         * link\z80\lkeval.c
8968         * link\z80\lkgb.c
8969         * link\z80\lkihx.c
8970         * link\z80\lks19.c
8971         * link\z80\lksym.c
8972         * support\cpp2\cpplib.c
8973         * src\ds390\gen.c
8974         * src\mcs51\gen.c
8975
8976 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8977
8978         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8979
8980 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8981
8982         * support\librarian\clean.mk: Do not remove Makefile.
8983         * support\librarian\Makefile: added.
8984
8985 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8986
8987         Added librarian to MSVC build:
8988         * all.dsp
8989         * sdcc.dsw
8990         * support\librarian\librarian.dsp
8991
8992         'configure' not needed for librarian, removed:
8993         * support\librarian\configure
8994         * support\librarian\configure.in
8995         * support\librarian\config_in.h
8996         * support\librarian\Makefile.in
8997
8998         Hopefully these ones built the librarian and the rest of sdcc properly:
8999         * Makefile
9000         * Makefile.common.in
9001
9002         Messed up 'configure', so revert to previous version:
9003         * configure
9004         * configure.in
9005
9006 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
9007
9008         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
9009         there, while the mantissa of a double is "only" 53 bits wide.
9010
9011 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9012
9013         Adding sdcclib to the build.  MSVC project coming soon.
9014         Files added/changed:
9015
9016         * support\librarian\clean.mk
9017         * support\librarian\configure
9018         * support\librarian\configure.in
9019         * support\librarian\config_in.h
9020         * support\librarian\Makefile.bcc
9021         * support\librarian\Makefile.in
9022         * support\librarian\sdcclib.c
9023         * Makefile.bcc
9024         * Makefile
9025         * Makefile.common.in
9026         * configure
9027         * configure.in
9028
9029 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9030
9031         Linker now complaints if linked modules have conflicting options, for
9032         example, one compiled using --model-large and another one compiled with
9033         --model-small.  The following files were modified:
9034
9035         * as\mcs51\asdata.c
9036         * as\mcs51\aslink.h
9037         * as\mcs51\asm.h
9038         * as\mcs51\asmain.c
9039         * as\mcs51\asout.c
9040         * as\mcs51\i51pst.c
9041         * as\mcs51\lkdata.c
9042         * as\mcs51\lklibr.c
9043         * as\mcs51\lkmain.c
9044         * as\z80\asdata.c
9045         * as\z80\asm.h
9046         * as\z80\asmain.c
9047         * as\z80\asout.c
9048         * as\z80\z80pst.c
9049         * link\z80\aslink.h
9050         * link\z80\lkdata.c
9051         * link\z80\lklibr.c
9052         * link\z80\lkmain.c
9053         * src\SDCCglue.c
9054
9055 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9056
9057         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
9058         as/mcs51/lklibr.c: Generate a warning when a library is not found.
9059
9060 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
9061
9062         * src/z80/mappings.i: fix _mul[us][int,long] entries
9063
9064 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9065
9066         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
9067
9068 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9069
9070         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
9071         * support/regression/tests/bitopcse.c: added
9072         fixed warning:
9073         * src/avr/gen.c:
9074         * src/pic/gen.c:
9075         * src/pic16/gen.c:
9076         * src/z80/gen.c:
9077         * src/xa51/gen.c:
9078
9079 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9080
9081         added support for new library format to z80, gbz80 linkers:
9082         *link/z80/aslink.h
9083         *link/z80/lklex.c
9084         *link/z80/lklib.c
9085         *link/z80/lklist.c
9086
9087 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9088
9089         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
9090         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
9091
9092 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
9093
9094         added DUMMY_READ_VOLATILE:
9095         * src/SDCC.y:
9096         * src/avr/gen.c:
9097         * src/xa51/gen.c:
9098         * src/z80/gen.c:
9099         * src/pic/gen.c:
9100         * src/pic16/gen.c:
9101         * src/mcs51/gen.c:
9102         * src/ds390/gen.c:
9103         * src/SDCCcse.c (algebraicOpts): many improvements
9104         * src/SDCCcse.h: removed algebraicOpts()
9105         * src/SDCCicode.c (picDummyRead): added
9106
9107 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9108
9109         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
9110         "Insufficient space in data memory".
9111
9112 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9113
9114         * src/mcs51/gen.c: fixed bug #771358
9115         * src/z80/gen.c: fixed bug #759087
9116
9117 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
9118
9119         * src/pic16/glue.c: minor cleanup by Vangelis
9120
9121 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9122
9123         * device/include/regc515c.h: fixed #758477
9124         * device/lib/_gptrget.c: saving some cycles in generic pointer get
9125         * device/lib/_gptrput.c: saved a few bytes
9126         * my tab spacing is 8, yours too?)
9127         * device/lib/_ser.c: process RX bytes earlier than TX bytes
9128         * device/lib/serial.c: process RX bytes earlier than TX bytes
9129         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
9130
9131 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9132
9133         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
9134
9135 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9136
9137     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
9138
9139 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
9140
9141         * device/lib/Makefile.in: bad fix, reverted to 1.43
9142
9143 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
9144
9145         * device/lib/Makefile.in: added missing z80 object files
9146
9147 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
9148
9149         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
9150         pic16 progress by Vangelis:
9151         * src/SDCCglobl.h:
9152         * src/SDCCmain.c:
9153         * src/pic/Makefile:
9154         * src/pic:
9155         * pic/Makefile:
9156         * pic16/device.c:
9157         * pic16/device.h:
9158         * pic16/gen.c:
9159         * pic16/gen.h:
9160         * pic16/genarith.c:
9161         * pic16/glue.c:
9162         * pic16/main.c:
9163         * pic16/pcode.c:
9164         * pic16/pcode.h:
9165         * pic16/pcodepeep.c:
9166         * pic16/peeph.def:
9167
9168 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9169
9170     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
9171
9172 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9173
9174     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
9175     added gbz80 build to MSVC project.
9176     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9177     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9178     from 8051 stuff and setup so it links using a .lnk file.
9179
9180 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9181
9182     * support/librarian/sdcclib.c: sdcc librarian.
9183     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9184     with sdcclib.
9185
9186 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9187
9188     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9189
9190 2003-07-02  Borut Razem <borut.razem AT siol.net>
9191
9192         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9193         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9194         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9195         src/xa51/main.c, src/z80/main.c:
9196         virtualization of glue() function: each port has it's own glue function,
9197         which is accessed by do_glue function pointer in PORT.general structure
9198
9199 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9200
9201         * DS800C400 fun, improved ROM interface and tinibios.
9202
9203 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9204
9205         * More support for DS80C400. Now includes beginning of interface to ROM.
9206
9207 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9208
9209         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9210
9211 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9212
9213         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
9214
9215 2003-06-19  Borut Razem <borut.razem AT siol.net>
9216
9217         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
9218
9219 2003-06-19  Borut Razem <borut.razem AT siol.net>
9220
9221         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
9222         fixed Z80 port - crt0.o: cannot open.
9223
9224 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
9225
9226         * support/Util/MySystem.c (merge_command): revert bad fix
9227
9228 2003-06-18  Borut Razem <borut.razem AT siol.net>
9229
9230         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
9231
9232 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9233
9234         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9235         option --use-stdout sends errors to stdout instead of stderr.
9236
9237 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
9238
9239         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
9240
9241 2003-06-15  Borut Razem <borut.razem AT siol.net>
9242
9243         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
9244         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
9245         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
9246         fixed width array of pointers replaced with sets;
9247         multiple include and lib paths ared transferred to preprocessor and linker
9248         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
9249         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
9250         fixed width array of pointers
9251         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
9252         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
9253         fixupPath(), getPathDifference()
9254         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
9255         fixed width array of pointers
9256
9257 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
9258
9259         * src/pic16/ralloc.c: fix warnings
9260         * src/pic16/pcode.c: fix warning
9261
9262 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
9263
9264          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
9265         know all the details, but essentially this set of changes enable
9266         the pic16 port to generate movff instructions and generate assembler
9267         directives,
9268         * src/SDCCmain.c:
9269         * src/pic16/gen.c:
9270         * src/pic16/glue.c:
9271         * src/pic16/pcode.c:
9272         * src/pic16/device.c:
9273         * src/pic16/main.c:
9274         * src/pic16/pcode.h:
9275         * src/pic16/pcoderegs.c:
9276         * src/pic16/ralloc.c:
9277         * src/pic16/ralloc.h:
9278
9279 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9280
9281         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9282         added option --vc, so sdcc errors and warnings are compatible with
9283         Microsoft Visual Studio.
9284
9285 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9286
9287         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
9288           device/lib/libfloat.lib: added atof function.
9289
9290 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
9291
9292         * doc/sdccman.lyx: updated to Lyx 1.3
9293         * doc/cdbfileformat.lyx: updated to Lyx 1.3
9294         * doc/test_suite_spec.lyx: updated to Lyx 1.3
9295         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
9296
9297 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
9298
9299         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
9300
9301 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9302
9303         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
9304           additions to the "related tools/documentation" section
9305
9306 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
9307
9308         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
9309
9310 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
9311
9312         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
9313         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
9314
9315 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
9316
9317         * doc/sdccman.lyx: fix double dash and other minor things
9318         * doc/Makefile: fix double dash
9319
9320 2003-05-28  Karl Bongers(patches from Martin Helmling)
9321         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
9322           condition and ignore commands.
9323
9324 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9325
9326         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
9327           is in parts still quite out of date, I did changes as far as I felt makes sense
9328           for a non-native english speaker.
9329           Please feel free to add to the manual or to correct my changes.
9330         * doc/Makefile: undid touching the date of intermediate tex files.
9331
9332 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9333
9334         * doc/sdccman.lyx: Manual has an index now
9335
9336 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
9337
9338         Finalize muluint/mulsint and mululong/mulslong merging:
9339         * device/lib/_mulint.c
9340         * device/lib/_mullong.c
9341         * device/lib/gbz80/mul.s
9342         * device/lib/gbz80/stubs.s
9343         * device/lib/z80/mul.s
9344         * device/lib/z80/stubs.s
9345         * src/SDCCsymt.c (initCSupport)
9346
9347 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9348
9349         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
9350         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
9351           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
9352           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
9353           instead of /Zm500.
9354
9355 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9356
9357         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
9358           the regression tests I'm not brave enough to enable 245.b, 245.c
9359         * doc/sdccman.lyx: added latex preamble for hyperref package.
9360           Using pdflatex this will give you a hyperlinked pdf file with
9361           bookmarks. (prepend '%' before /usepackage if this breaks something)
9362
9363 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9364
9365          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
9366
9367 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
9368
9369         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
9370
9371 2003-05-21    <johan AT balder>
9372
9373         * src/SDCCglue.c (printIval): fixed bug #739934
9374
9375 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9376
9377         Applied patch from bug 737905 (renamed yylineo to mylineno):
9378         * src/altlex.c
9379         * src/SDCCast.c
9380         * src/SDCglobl.h
9381         * src/SDCC.lex
9382         * src/SDCCsymt.c
9383         * src/SDCCval.c
9384         * src/pic16/pcode.c: Cleaned warnings
9385         * src/pic16/pcodeflow.c: Cleaned warnings
9386         * src/pic16/pcoderegs.c: Cleaned warnings
9387
9388 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
9389
9390         * src/pic16/pcode.c: Cleaned warnings
9391         * src/pic16/pcodepeep.c: Cleaned warnings
9392         * src/pic16/ralloc.c: Cleaned warnings
9393
9394 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9395
9396         * doc/sdccman.lyx: fixed bug 739745
9397         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
9398
9399 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
9400
9401         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
9402         it can be defined with CFLAGS when running configure
9403         * src/SDCCmain.c: fixed compiling + linking with object files
9404
9405 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
9406
9407         * configure.in: configure for pic16 port,
9408             added --disable-pic16-port
9409         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
9410         * src/SDCCmain.c: linkOptions is changed to set *,
9411             added if/endif conditional macros to remove options help
9412             messages from optionsTable when a port is not configured, added
9413             support for the PIc16 port in the ports table, when executing
9414             the compiler with no port specified on command line, a default
9415             port is selected with the new macro DEFAULT_PORT which is
9416             defined in port.h, in setDefaultOptions() linkOptions is removed
9417             from initialization assignment, since now it is a set,
9418             parseCmdLine uses setParseWithComma for linkOptions, in
9419             linkEdit() linkOptions are accessed with new function indexSet()
9420             which returns the i'th item of a set variable. See SDCCset.c, in
9421             linkEdit() when calling buildCmdLine(), added linkOptions as
9422             last argument. Now users can pass arguments to gplink via the
9423             -Wl option, main() uses pic16glue() to glue up pic16 programs
9424         * src/SDCCpeeph.c: various changes to support pic16
9425         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
9426             return the i'th item of the set
9427         * src/SDCCset.h: added function prototype for indexSet()
9428         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
9429         * src/clean.mk: added pic16 in CLEANALLPORTS variable
9430         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
9431             added macro DEFAULT_PORT
9432         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
9433         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
9434             generated
9435         * src/pic16/glue.c: commented out some error producing lines
9436         * src/pic16/main.c: __config directives are commented out to stop
9437             gpasm complaining and test the linkage with gplink, _linkCmd and
9438             _asmCmd changed to be more gplink and gpasm friendly
9439         * src/pic16/peeph.def: peep rule 3 is commented out, since it
9440             produced an error when parsed, peep rule 12 is added to utilize
9441             movff, but it is commented out since the pCode does not support
9442             yet a command with 2 address arguments
9443
9444 2003-05-18    <johan AT balder>
9445
9446         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9447         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9448 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
9449
9450         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
9451   Added feature to script commands from file.
9452
9453 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
9454
9455         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
9456         * src/SDCCutil.c: include ctype.h for win32
9457
9458 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
9459
9460         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
9461
9462 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
9463
9464         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
9465   Fixed so you can set breakpoints prior to run, run does not stop
9466   on entry now.  Add tbreak.  Other enhancements and fixes for use
9467   with ddd.
9468
9469 2003-05-12  Borut Razem <borut.razem AT siol.net>
9470
9471         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
9472
9473 2003-05-11  Borut Razem <borut.razem AT siol.net>
9474
9475         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
9476         the path of bin directory, so that PATH is the only env. variable, which has to be set
9477         in case of standard installation.
9478         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
9479         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
9480         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
9481
9482 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9483
9484         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
9485         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
9486         temp files are in the port dir; clean the gen/test directory when
9487         generating new test.c
9488         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
9489         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
9490         * support/regression/tests/zeropad.c: added
9491
9492 2003-05-09    <johan AT balder>
9493
9494         * src/SDCCglue.c: fixed bug #597940
9495
9496 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
9497
9498         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9499   cache sfr, optimize next,step, fix off by one sourceline,
9500   support ddd list function.
9501         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
9502
9503 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9504
9505         * support/regression/HTMLgen.py: added compare_s2f()
9506         * support/regression/Makefile: redo 1.27
9507         * support/regression/generate-cases.py: redo 1.5
9508
9509 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
9510
9511         * support/regression/tests/float.c: workaround 33 bit hex constant
9512         * support/regression/tests/simplefloat.c: fix division for host
9513
9514 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
9515
9516         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
9517         that tame's the PIC's over-aggressive optimizer.
9518
9519 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9520
9521          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
9522          support for MSVC.
9523
9524 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
9525
9526         Initial support for DS80C400. "Hello world" runs on TINIm400
9527         (with polled I/O).
9528
9529 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
9530
9531          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9532          * Some notes on ddd usage added in debugger/README
9533          Martin Helmling adding more features and fixes for ddd GUI debugger.
9534          Code added for nexti, stepi, up, down, and other adjustments.
9535
9536 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
9537
9538         * src/pic/pCodepeep.c non-wildcard asmops are now handled
9539         * src/pic/peeph.def Added two rules to optimize carry manipulation
9540         * src/pic/* removed debug printfs
9541
9542 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
9543
9544         * debugger/mcs51/cmd.c: added header newalloc.h
9545
9546 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
9547
9548         * as/Makefile: new EXEEXT
9549         * as/z80/Makefile: remove trailing slash of BUILDIR
9550         * as/z80/clean.mk: new EXEEXT
9551         * Makefile.common.in: add to CFLAGS (and others), don't replace it
9552         * support/cpp2/Makefile.in: new EXEEXT
9553         * src/pic/glue.c (pic14emitRegularMap): fixed warning
9554
9555 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
9556
9557         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
9558         EXEEXT was introduced to fix all related problems with targets
9559         "clean", "install" and "uninstall"; a couple of further flaws
9560         especially with "clean" have been fixed too
9561         * as/mcs51/Makefile.in
9562         * as/mcs51/clean.mk
9563         * as/z80/Makefile
9564         * Makefile
9565         * clean.mk
9566         * debugger/mcs51/Makefile.in
9567         * debugger/mcs51/clean.mk
9568         * link/z80/Makefile
9569         * link/z80/Makefile.in
9570         * link/z80/clean.mk
9571         * link/Makefile
9572         * packihx/Makefile.in
9573         * packihx/clean.mk
9574         * sim/ucsim/Makefile
9575         * sim/ucsim/clean.mk
9576         * sim/ucsim/avr.src/Makefile.in
9577         * sim/ucsim/avr.src/clean.mk
9578         * sim/ucsim/s51.src/Makefile.in
9579         * sim/ucsim/s51.src/clean.mk
9580         * sim/ucsim/xa.src/Makefile.in
9581         * sim/ucsim/xa.src/clean.mk
9582         * sim/ucsim/z80.src/Makefile.in
9583         * sim/ucsim/z80.src/clean.mk
9584         * sim/ucsim/main_in.mk
9585         * sim/ucsim/packages_in.mk
9586         * sim/ucsim/gui.src/Makefile.in
9587         * sim/ucsim/gui.src/serio.src/Makefile.in
9588         * sim/ucsim/gui.src/serio.src/clean.mk
9589         * src/Makefile.in
9590         * src/clean.mk
9591         * support/cpp2/Makefile.in
9592         * support/cpp2/clean.mk
9593         * support/makebin/Makefile
9594         * support/makebin/clean.mk
9595         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
9596         * doc/sdccman.lyx: --program-suffix no longer needed
9597
9598 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
9599
9600          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
9601          Martin Helmling added support for ddd GUI debugger.
9602          Code added to display assembly, set variables, and other commands
9603          to interface to ddd.
9604
9605 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
9606
9607         * as/Makefile: fix target clean
9608         * as/clean.mk: fix target clean
9609         * as/z80/clean.mk: fix target clean
9610
9611 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
9612
9613         * Makefile.common.in: added  AT EXEEXT AT
9614         * configure.in: removed all mingw32 stuff
9615         * configure: rebuilt from configure.in
9616         * doc/sdccman.lyx: updated section "installation"
9617         * support/scripts/sdcc_mingw32: adapted to configure
9618         * support/scripts/sdcc_cygwin_mingw32: added
9619
9620 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
9621
9622         * src/pic Added object file support for the PIC port
9623         * src/pic Applied patch from Craig Franklin (this started the object file support)
9624         * src/regression Updated the PIC regression tests for object files
9625
9626 2003-04-20  Borut Razem <borut.razem AT siol.net>
9627
9628         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
9629           lklex.c: In function `getfid':
9630           lklex.c:203: warning: array subscript has type `char'
9631         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
9632           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
9633         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
9634           stack handling macros
9635
9636 2003-04-19  Borut Razem <borut.razem AT siol.net>
9637
9638         * "handling space characters in file path" task:
9639         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
9640         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
9641         * support/Util/MySystem.h: make it self-sufficient
9642         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
9643           src/z80/main.c, sdcc/as/mcs51/lklex.c:
9644           handling space characters in file path
9645         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
9646           (it will be used by assemblers, which have their own includes, e.g. gpasm)
9647         * support/Util/MySystem.c: handling space characters in executable's path
9648
9649 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
9650
9651         * as/z80/Makefile: fix permanent rebuild of z80
9652         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
9653         * support/regression/tests/bitfields.c: added Johan's bitfields.c
9654
9655 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
9656
9657         * src/SDCCopt.c: add special case optimization to replace modulo by
9658           a power of two with a bitwise AND.
9659
9660 2003-04-18    <johan AT balder>
9661
9662         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
9663
9664 2003-04-17    <johan AT balder>
9665
9666         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
9667         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
9668
9669 2003-04-13  Borut Razem <borut.razem AT siol.net>
9670
9671         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
9672         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
9673           fixed mingw problem in adl_NORMALIZE_PATH
9674
9675 2003-04-12  Borut Razem <borut.razem AT siol.net>
9676
9677         * fixed "#pragma SAVE/RESTORE can not be nested":
9678         * src/SDCC.lex: reworked pragma handling functions
9679         * sdcc/src/SDCCglobl.h: reworked stack handling macros
9680         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
9681
9682 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9683
9684         * src/SDCCutil.c (pathEquivalent): defined but not used
9685         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
9686         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
9687         * configure: rebuilt from configure.in
9688         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9689         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9690         * device/include/Makefile.in: replace sdcc_datadir
9691         * device/lib/Makefile.in: replace sdcc_datadir
9692         * Makefile.common.in: add LDFLAGS from configure
9693         * packihx/Makefile.in: use LDFLAGS
9694         * src/Makefile.in: use LDFLAGS
9695         * support/cpp2/Makefile.in: add LDFLAGS from configure
9696         * support/makebin/Makefile: use LDFLAGS
9697         * .version: bumped version number to 2.3.5
9698
9699 2003-04-12  Borut Razem <borut.razem AT siol.net>
9700
9701         * completed "different paths" task:
9702         * src/SDCCmacro.c: fixed bug in handling quotes
9703         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
9704         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9705
9706 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9707
9708         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9709
9710 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9711
9712         * ds390/gen.c ds390/peeph.def: fix bug 706781
9713
9714 2003-04-11  Borut Razem <borut.razem AT siol.net>
9715
9716         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9717
9718 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9719
9720         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9721         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9722          set - this bit used to not be set...).
9723         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9724           bad code in PIC Port
9725         * src/regression/and2.c added to test bug 609268
9726         * src/regression/Makefile added and2.c to regression test
9727
9728
9729 2003-04-08    <johan AT CP255758-A>
9730
9731         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9732         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9733         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9734
9735 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9736
9737         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9738         fix bug #487815
9739         * support/cpp2/Makefile.in: fix bug #487815
9740         * configure: rebuilt from configure.in
9741         * Makefile.common.in: docdir changed, new path suffixes
9742         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9743         * sdcc_vc_in.h: reflect changes from sdccconf.h
9744         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9745         * src/SDCCutil.h: remove BINDIR hack
9746         * doc/sdccman.lyx: update new path hierarchy
9747
9748 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9749
9750         * src/SDCCpeeph.c: added okToRemoveSLOC test
9751
9752 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9753
9754         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9755
9756 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9757
9758         * src/SDCCpeeph.c: added labelIsReturnOnly test
9759         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9760
9761 2003-04-05    <johan AT balder>
9762
9763         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9764         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9765         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9766         * src/SDCCast.c: fixed a warning
9767         * src/SDCCast.h: fixed a warning
9768         * src/SDCCicode.c (operandFromAst): fixed a warning
9769
9770 2003-04-04    <johan AT balder>
9771
9772         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9773         * src/SDCCast.c (decorateType): fixed bug #715076
9774         * src/SDCC.y: fixed bug #702907
9775
9776 2003-04-03    <johan AT balder>
9777
9778         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9779         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9780         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9781         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9782         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9783
9784 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9785
9786         * _decdptr.c: fix return values
9787         * _gptrget.c: fix return values
9788         * _gptrgetc.c: fix return values
9789         * _gptrput.c: fix return values
9790         * _mulint.c: fix return values
9791         * as/z80/Makefile: fix 'make -j' problem
9792
9793 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9794
9795         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9796         * configure.in: big cleanup, updated to autoconf 2.5x
9797         * configure: rebuilt from configure.in
9798         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9799         * sdcc_vc_in.h: reflect changes from sdccconf.h
9800         * doc/Makefile: fixed a flaw in "make install"
9801
9802 2003-04-02    <johan AT balder>
9803
9804         * src/ds390/gen.c (genCmp): no comments
9805         * src/mcs51/gen.c (genCmp): no comments
9806         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9807         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9808
9809 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9810
9811         * support/regression/generate-cases.py: place generated file in given sub directory
9812         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9813         * support/regression/Makefile: improvements for 'make -j';
9814         side effect: it's simpler and faster now
9815
9816 2003-03-31  Borut Razem <borut.razem AT siol.net>
9817
9818         * src/z80/main.c: link-{port} and as-{port} defined without path
9819         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9820
9821 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9822
9823         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9824
9825 2003-03-30  Borut Razem <borut.razem AT siol.net>
9826
9827         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9828           changed type of list parameter to set
9829         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9830         * src/port.h: changed type of do_assemble() parameter to set
9831         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9832           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9833           definition of "cppoutfilename" macro with NULL value in preProcess()
9834         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9835         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9836         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9837           replaced with set *binPathSet
9838         * shash_add() deallocates the item, if allready exsists, before adding the new one
9839         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9840
9841 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9842
9843         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9844           a nested for loop bug in the PIC port
9845         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9846           for loops
9847
9848 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9849
9850         * support/Util/dbuf.h: remove C++ stuff to make it portable
9851
9852 2003-03-28  Borut Razem <borut.razem AT siol.net>
9853
9854         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9855           literal strings in stringLiteral()
9856         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9857         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9858           to the project
9859
9860 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9861
9862         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9863
9864 2003-03-26    <johan AT balder>
9865
9866         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9867         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9868         * src/SDCCast.c (decorateType): fixed " -v < 3"
9869
9870 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9871
9872         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9873         Added Lenny Story's debug infrastructure changes:
9874         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9875         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9876         * src/cdbFile.c: added
9877         * src/SDCCdebug.c: added
9878         * src/SDCCdebug.h: added
9879         * src/SDCCast.c (createFunction)
9880         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9881         * src/SDCCmain.c (parseCmdLine, main)
9882         * src/SDCCmem.c (redoStackOffsets)
9883         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9884         * src/SDCCsymt.h
9885         * src/common.h
9886         * src/avr/gen.c (genAVRCode)
9887         * src/ds390/gen.c (gen390Code)
9888         * src/mcs51/gen.c (gen51Code)
9889         * src/pic/gen.c (genpic14Code)
9890         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9891         * src/xa51/gen.c (genXA51Code)
9892         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9893
9894 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9895
9896         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9897         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9898
9899 2003-03-22    <johan AT balder>
9900
9901         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9902
9903 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9904
9905         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9906         * doc/cdbfileformat.lyx: added, written by Lenny Story
9907         * doc/Makefile: added cdbfileformat.lyx
9908         * doc/clean.mk: added cdbfileformat.lyx
9909
9910 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9911
9912         * src/mcs51/peeph.def: fix bug #705773
9913
9914 2003-03-20    <johan AT balder>
9915
9916         An sfr/sbit can have an "at #" AND an initializer
9917         * src/SDCCsymt.c (checkSClass):
9918         * src/SDCCmem.c (allocGlobal):
9919         * src/SDCCmem.c (allocLocal):
9920         * src/SDCCast.c (createBlock):
9921
9922 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9923
9924         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9925
9926 2003-03-16    <johan AT balder>
9927
9928         Undid the hackup of const and volatile, the problem is much bigger
9929         * src/SDCC.y:1.65
9930         * src/SDCCast.c:1.171
9931         * src/SDCCglue.c:1.138
9932         * src/SDCCicode.c:1.146
9933         * src/SDCCsymt.c:1.150
9934         * src/SDCCval.c:1.65
9935
9936 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9937
9938         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9939         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9940
9941 2003-03-13    <johan AT balder>
9942
9943         Hackup const and volatile modifiers in type chains a bit:
9944         * src/SDCC.y:1.63
9945         * src/SDCCast.c:1.169
9946         * src/SDCCglue.c:1.136
9947         * src/SDCCicode.c:1.143
9948         * src/SDCCsymt.c1.146
9949         * src/SDCCsymt.h1.59
9950         * src/SDCCval.c:1.63
9951
9952 2003-03-12    <johan AT balder>
9953
9954         * src/SDCCBBlock.h: more LRH debugging junk
9955         * src/SDCCcflow.h: more LRH debugging junk
9956         * src/SDCCloop.c: more LRH debugging junk
9957         * src/SDCC.y (struct_declaration): fixed bug #697590
9958         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9959         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9960         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9961
9962 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9963         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9964         test function names must now match exactly).
9965         * src/SDCCcse.c: added special case in findCheaperOp to allow
9966         extending a short integer. Makes less awful code for bug 700121 test case.
9967
9968 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9969
9970         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9971         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9972
9973 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9974
9975         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9976         actually called (operandsNotEqual() was called for all
9977         operandsNotEqualX tests).
9978
9979 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9980
9981         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9982         with shorter literals. Fixes bug 700121.
9983
9984 2003-03-11    <johan AT balder>
9985
9986         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9987
9988 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9989
9990         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9991         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9992
9993 2003-03-10  Borut Razem <borut.razem AT siol.net>
9994
9995         * src/SDCCmain.c: pipe preprocessor's output
9996         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9997         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9998         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9999         which closes all pipes in pipeSet set
10000         * src/SDCCset.c: free deleted item in function deleteSetItem()
10001         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10002         moved from z80 to src subproject
10003         * .version: increased version number to 2.3.4
10004
10005 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
10006
10007         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
10008         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
10009         * support/regression/ports/xa51/spec.mk: fix typo
10010
10011 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
10012
10013         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
10014
10015 2003-03-09  Borut Razem <borut.razem AT siol.net>
10016
10017         * src/SDCCmain.c: pipe preprocessor's output
10018         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10019         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10020         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10021         which closes all pipes in pipeSet set
10022         * src/SDCCset.c: free deleted item in function deleteSetItem()
10023         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10024         moved from z80 to src subproject
10025
10026 2003-03-09  Borut Razem <borut.razem AT siol.net>
10027
10028         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
10029         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
10030         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
10031         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
10032         * src/SDCCglobl.h: unification of WIN32 native definitions
10033
10034 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10035
10036         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
10037
10038 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10039
10040         * src/configure.in:   check for endianess (even while cross-compiling)
10041         * src/configure:      check for endianess (even while cross-compiling)
10042         * src/configure_in.h: check for endianess (even while cross-compiling)
10043         * src/avr/gen.c:        remove old endianess stuff
10044         * src/mcs51/gen.c:      remove old endianess stuff
10045         * src/ds390/gen.c:      remove old endianess stuff
10046         * src/pic/gen.c:        remove old endianess stuff
10047         * src/pic/genarith.c:   remove old endianess stuff
10048         * src/pic/glue.c:       fix endianess check
10049         * src/pic16/gen.c:      remove old endianess stuff
10050         * src/pic16/genarith.c: remove old endianess stuff
10051         * src/pic16/glue.c:     fix endianess check
10052         * src/xa51/gen.c:       remove old endianess stuff
10053         * src/z80/gen.c:        fix endianess check
10054         * src/SDCCglue.c:       fix endianess check
10055         * src/ds390/peeph.def: fix bug 700036
10056
10057 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10058
10059         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
10060         * src/configure: find appropriate data-types on host for SDCC's int and long
10061         * src/configure.in: find appropriate data-types on host for SDCC's int and long
10062         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
10063         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
10064
10065 2003-03-07    <johan AT balder>
10066
10067         Just a big NOOP:
10068                 some minor cleanups before the big shot
10069                 OP_DEFS and OP_USES now use Kevin's protection
10070                 new option --nolabelopt
10071
10072         * src/SDCCBBlock.c:
10073         * src/SDCCast.c,:
10074         * src/SDCCcflow.c:
10075         * src/SDCCcse.c:
10076         * src/SDCCicode.c:
10077         * src/SDCCicode.h:
10078         * src/SDCClabel.c:
10079         * src/SDCCloop.c:
10080         * src/SDCCmain.c:
10081         * src/ds390/ralloc.c:
10082         * src/mcs51/ralloc.c:
10083         * src/pic/ralloc.c:
10084         * src/xa51/ralloc.c:
10085         * src/z80/ralloc.c:
10086
10087 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
10088
10089         * src/pic/pcode.c (get_op): fix 64 bit warnings
10090         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
10091         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
10092         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
10093         * support/regression/tests/malloc.c: fix 64 bit warnings
10094
10095 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
10096
10097         * src/mcs51/gen.c (genMinus): fixed bug 696436
10098
10099 2003-03-02  Borut Razem <borut.razem AT siol.net>
10100
10101         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
10102
10103 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
10104
10105         * configure.in: test for mkstemp
10106         * sdccconf_in.h: add HAVE_MKSTEMP
10107
10108 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
10109
10110         * device/include/ctype.h: removed warning while using --stack-auto
10111         * device/include/malloc.h: removed warning while using --stack-auto
10112         * device/include/string.h: removed warning while using --stack-auto
10113
10114 2003-02-23  Borut Razem <borut.razem AT siol.net>
10115
10116         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
10117         because NDEBUG is defined (see man assert)
10118         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
10119
10120 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10121
10122         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
10123         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
10124
10125 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10126
10127         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
10128         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
10129
10130 2003-02-18    <johan AT balder>
10131
10132         * as/mcs51/asmain.c (asmbl): module can start with a digit
10133         * as/z80/asmain.c (asmbl): module can start with a digit
10134
10135 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
10136
10137         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
10138         * src/asm.c: fix pipe() for Mingw32
10139
10140 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
10141
10142         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
10143         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
10144         make -V work again; --c1mode reads now from stdin
10145         * doc/sdccman.lyx: added --c1mode
10146         * support/Util/SDCCerr.c: new messages for c1 mode
10147         * support/Util/SDCCerr.h: new messages for c1 mode
10148         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
10149
10150 2003-02-15    <johan AT balder>
10151
10152         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
10153
10154 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
10155
10156         * doc/sdccman.lyx: Environment variables, -o and other minor things
10157
10158 2003-02-14    <johan AT balder>
10159
10160         * src/xa51/main.c: before anyone really tries to use it :)
10161
10162         * Install doc's in share/sdcc/doc
10163         * removed some obsolete files
10164         * Do a proper make distclean and uninstall
10165         M Makefile.common.in
10166         R sdccbuild.sh
10167         M as/Makefile
10168         M device/include/Makefile.in
10169         M device/lib/Makefile.in
10170         M doc/sdccman.lyx
10171         M link/Makefile
10172         M sim/ucsim/doc/Makefile.in
10173         M src/clean.mk
10174         R src/avr/peeph.rul
10175         R src/xa51/peeph.rul
10176         M support/cpp2/Makefile.in
10177         M support/makebin/Makefile
10178
10179
10180 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10181
10182         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10183
10184 2003-02-10  Borut Razem <borut.razem AT siol.net>
10185
10186         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10187         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10188         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10189         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10190         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10191         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10192         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10193         src/z80/Makefile.bcc: Borland Makefile cleanup
10194         * as/z80/Makefile.bcc: Added Borland Makefile
10195         * support/cpp2/borland.h: Removed
10196
10197 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10198
10199         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10200         * src/SDCC.lex: new pragma NOIV
10201         * src/SDCCglobl.h: new pragma NOIV
10202         * src/SDCCmem.c: new pragma NOIV
10203
10204 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10205
10206         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10207
10208 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10209
10210         * src/SDCCmain.c: signal handling is switched off by --debug
10211         * doc/Makefile: small fix for install; use clean.mk again
10212         * doc/clean.mk: clean *.pdf and *.html too
10213
10214 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
10215
10216         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
10217         * device/lib/printfl.c: fix a ds390 bug by making it portable
10218         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
10219         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
10220         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
10221         * debugger/mcs51/cmd.c: converted multi-line string literals
10222         * sim/ucsim/globals.cc: converted multi-line string literals
10223         * src/SDCCmain.c: introduced signal handler to remove temp files
10224         * doc/Makefile: small tweaks, implement clean
10225         * doc: removed generated files
10226
10227 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10228
10229         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
10230         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
10231         Address Record is not correctly generated for DS390."
10232
10233 2003-02-02  Borut Razem <borut.razem AT siol.net>
10234
10235         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
10236         * as/mcs51/asm.h: fixed compilation with Borland C
10237         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
10238         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
10239         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
10240         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
10241         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
10242         src/z80/Makefile.bcc: delete $(LIB) only if exist
10243         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
10244
10245 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
10246
10247         * device/include/malloc.h: introduced NULL
10248         * device/include/string.h: introduced NULL
10249         * device/include/stdlib.h: introduced NULL
10250         * device/lib/_memcpy.c: removed NULL
10251         * device/lib/_strcat.c: removed NULL
10252         * device/lib/_strchr.c: removed NULL
10253         * device/lib/_strcmp.c: removed NULL
10254         * device/lib/_strcpy.c: removed NULL
10255         * device/lib/_strcspn.c: removed NULL
10256         * device/lib/_strlen.c: removed NULL
10257         * device/lib/_strncat.c: removed NULL
10258         * device/lib/_strncmp.c: removed NULL
10259         * device/lib/_strncpy.c: removed NULL
10260         * device/lib/_strpbrk.c: removed NULL
10261         * device/lib/_strrchr.c: removed NULL
10262         * device/lib/_strspn.c: removed NULL
10263         * device/lib/_strstr.c: removed NULL
10264         * device/lib/_strtok.c: removed NULL
10265         * device/lib/malloc.c: removed NULL, include own header
10266
10267 2003-02-02    <johan AT balder>
10268
10269         * 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
10270         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
10271         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
10272         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
10273         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
10274         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
10275
10276 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10277
10278         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
10279         area 'DATA'"
10280
10281 2003-02-01    <johan AT balder>
10282
10283         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
10284
10285 2003-01-31    <johan AT CP255758-A>
10286
10287         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
10288
10289 2003-01-30    <johan AT balder>
10290
10291         * src/SDCCBBlock.c: automatic bug detection
10292         * src/SDCCicode.c: automatic bug detection
10293
10294 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10295
10296         * src/SDCCglobl.h:   now --xram-size 0 works
10297         * src/SDCCmain.c:    now --xram-size 0 works
10298
10299 2003-01-29    <johan AT balder>
10300
10301         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
10302
10303 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10304
10305         * as/mcs51/aslink.h: Added options --xram-size and --code-size
10306         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
10307         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
10308         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
10309         * src/SDCCglobl.h:   Added options --xram-size and --code-size
10310         * src/SDCCmain.c:    Added options --xram-size and --code-size
10311
10312 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
10313
10314         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
10315         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
10316
10317 2003-01-27    <johan AT balder>
10318
10319         * src/SDCC.y: fixed bug #613764
10320
10321 2003-01-26    <johan AT balder>
10322
10323         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
10324         * src/SDCCsymt.h: fixed bug #673374
10325         * src/SDCCglue.c: fixed bug #661910
10326         * src/SDCCast.c: fixed bug #458099 and 673374
10327
10328 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
10329
10330         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
10331         * as/mcs51/strcmpi.h: added
10332         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
10333         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
10334         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
10335         * as/mcs51/assym.c: strcmpi -> as_strcmpi
10336         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
10337         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
10338         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
10339         * as/mcs51/Makefile.aslink: new module strcmpi
10340         * as/mcs51/Makefile.asx8051: new module strcmpi
10341         * as/mcs51/Makefil.bcc: new module strcmpi
10342         * as/mcs51/Makefile.in: new module strcmpi
10343         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
10344
10345 2003-01-26    <johan AT balder>
10346
10347         * src/SDCCglue.c: reverted back to 1.124
10348         * src/SDCCast.c: reverted back to 1.156
10349         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
10350
10351 2003-01-25    <johan AT balder>
10352
10353         * src/SDCCglue.c: A better fix for bug #661910
10354         * src/SDCCast.c: A better fix for bug #661910
10355         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
10356
10357 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10358
10359         * src/Makefile.in: remove spawn.o
10360         * src/SDCCmain.c: remove spawn.h
10361         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
10362         * src/spawn.c: removed
10363         * src/spawn.h: removed
10364         * support/regression/ports/ds390/spec.mk: link with -r
10365
10366 2003-01-24    <johan AT CP255758-A>
10367
10368         * src/ds390/gen.c (aopOp): fixed bug #667458
10369         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
10370         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
10371         (createIvalCharPtr): an ival doesn't always have a storage class anymore
10372
10373 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10374
10375         * src/mcs51/peeph.def: better assembler identation by Frieder
10376         * src/mcs51/gen.c: better assembler identation by Frieder
10377
10378 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
10379
10380         * as/z80/string.h: removed for gcc 3.2
10381         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
10382         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
10383
10384 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10385
10386         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
10387         * src/SDCCpeeph.c (replaceRule): fix bug #663503
10388         * support/regression/Makefile: separate temp files for ports
10389         * support/regression/generate-cases.py: separate temp files for ports
10390         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10391         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10392
10393 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10394
10395         * moved tinitalk to device/examples/ds390
10396
10397 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
10398
10399         * as/mcs51/lkmem.c: rflag is for DS390
10400         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
10401         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
10402                          (linkEdit): move mem- and map-files the same way as ihx-files
10403         * src/z80/main.c (_setDefaultOptions): removed --generic
10404         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
10405         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
10406         * src/pic/glue.c (picglue): --c1mode works again
10407         * src/pic16/glue.c (pic16glue): --c1mode works again
10408         * src/asm.c (printCLine): fix #660034
10409
10410 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
10411
10412         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
10413         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
10414         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
10415         * as/mcs51/lkmem (summary): better fix for sp problem
10416         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
10417         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
10418         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
10419                                               remove --stack-after-data
10420
10421 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
10422
10423         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
10424         * src/SDCCutil.c (join): ugly bug: missing '\0'
10425         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
10426
10427 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10428
10429         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
10430         * src/port.h: typo
10431         * src/pic/main.c (_asmCmd): gpasm supports -o
10432         * src/z80/main.c: more general macros
10433         * device/lib/Makefile.in: remove intermediate files
10434
10435 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10436
10437         * .version: Bumped version number to 2.3.3
10438         * src/SDCCBBlock.c: new option -o
10439         * src/SDCCglobl.h: new option -o
10440         * src/SDCCglue.c: new option -o
10441         * src/SDCCmain.c: new option -o
10442         * src/asm.c: new option -o
10443         * src/ds390/main.c: new option -o
10444         * src/pic/glue.c: new option -o
10445         * src/pic/pcode.c: new option -o
10446         * src/pic/ralloc.c: new option -o
10447         * src/pic16/glue.c: new option -o
10448         * src/pic16/pcode.c: new option -o
10449         * src/pic16/ralloc.c: new option -o
10450         * src/z80/main.c: new option -o
10451         * device/lib/Makefile.in: use -o
10452         * support/regression/ports/ds390/spec.mk: use -o
10453         * support/regression/ports/gbz80/spec.mk: use -o
10454         * support/regression/ports/mcs51/spec.mk: use -o
10455         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
10456         * support/regression/ports/z80/spec.mk: use -o
10457         * support/regression/ports/ucz80/spec.mk: use -o
10458         * support/regression/ports/xa51/spec.mk: use -o
10459         * support/regression/fwk/lib/timeout.c: fix usage string
10460
10461 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
10462         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
10463
10464 2003-01-07    <johan AT balder>
10465
10466         * src/SDCCast.c (decorateType): fixed bug #600035
10467
10468 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
10469         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
10470         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
10471         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
10472         * src/pic/pcode.c: outcommented unused variable to remove warnings
10473         * src/pic/ralloc.c: outcommented unused variable to remove warnings
10474
10475 2003-01-06    <karl AT turbobit.com>
10476         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
10477    regression tests.
10478
10479 2003-01-06    <johan AT balder>
10480
10481         * src/SDCCicode.c: fixed array add
10482
10483 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
10484         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
10485         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
10486
10487 2003-01-04    <johan AT balder>
10488
10489         * src/SDCCval.c (getNelements): fixed the initialized array of structures
10490
10491 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10492         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
10493
10494 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10495         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
10496         * support/regression/tests/bug-524697.c: fit mem usage into 8032
10497
10498 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10499         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
10500
10501 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
10502         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
10503
10504 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
10505         * src/mcs51/main.c: removed {bindir}{sep} from aslink
10506
10507 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10508
10509     * in \sdcc\as\mcs51\ changed these files in order to create an
10510     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
10511     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
10512     following files to include the previous two files: aslink.dsp,
10513     Makefile.aslink, Makefile.bcc, and Makefile.in.
10514
10515     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
10516     .adb instead of .cdb
10517
10518 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10519
10520         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
10521         value from option --iram-size.
10522
10523 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10524
10525         * \sdcc\as\mcs51\lklist.c: added boundary check before using
10526         dram[] array.
10527
10528 2002-09-18    <wiml AT hhhh.org>
10529
10530         * SDCClrange.h: exposed setFromRange() and setToRange()
10531         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
10532           packRegsForAccUse() (bug 542397)
10533         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
10534           multiple times and emitting the fetch operations more than once
10535           added aopGetUsesAcc() function to allow binary operators to
10536           fetch their operands in the correct order; made genMinus() emit
10537           compact code for X = LITERAL - Y
10538
10539 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10540         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
10541         sprintf() in line 1267.
10542
10543 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10544         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
10545         like ports.
10546
10547 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10548         Changes to aslink (All the changes are marked with 'JCF'):
10549
10550         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
10551         summary().
10552
10553         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
10554         area BSEG.  Also moves, if possible, the DATA area down into the internal
10555         ram so more space is available.
10556
10557         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
10558         sflag.
10559
10560         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
10561         not bytes.  Function summary() which creates a memory usage summary
10562         file with extension .mem.  Reports of overlaping stack and small stack
10563         size.  If the space for the stack is less than 16 bytes aslink trows a
10564         warning.
10565
10566         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
10567         the 8051.  Option 'y' for memory summary output file.
10568
10569         Changes to sdcc (All the changes are marked with 'JCF'):
10570
10571         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
10572
10573         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
10574         overlaying area for it (uses RegBankUsed[4]).
10575
10576         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
10577         bank zero as used by default.  By default aslink locates the stack
10578         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
10579         the creation of the .mem file.  Delegates the allocation of data area
10580         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
10581         the begining of the stack area to aslink.
10582
10583         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
10584         glue() in SDCCglue.c creates an area for it.
10585
10586 2002-09-03  Borut Razem <borut.razem AT siol.net>
10587         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
10588         sdcc/src/pic/glue.c:
10589         introduced atexit() handler for teporay files removal in case of
10590         errors, assertions, ...
10591
10592 2002-08-29  Borut Razem <borut.razem AT siol.net>
10593         * sdcc/support/cpp2/auto-host_vc_in.h:
10594         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
10595         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
10596         Maybe there is a similar problem with BORLANDC? It should be checked!
10597
10598         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
10599         corrected improper use of assert: the assignment to clr variable was done inside the assert.
10600         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
10601         was not executed, and the compiler (cl) launched a warning:
10602         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
10603
10604 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10605         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
10606
10607 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
10608         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
10609
10610         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10611           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
10612           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
10613           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10614           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
10615           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
10616           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
10617         - added Release configuration in VS projects
10618         - review of compiler an linker options
10619         - VC .exe files are generated in bin_vc directory, not to interfere
10620           with binaries generated from other projects (cygwin, mingw, bcc ...)
10621
10622         * sdcc/src/yacc.dsp: added
10623
10624         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
10625         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
10626         and insert the version number definitions from .version
10627
10628         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
10629
10630         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
10631         added - genarate auto-host.h using auto-host_vc_in.h as template
10632
10633         * sdcc/sdcc_vc.h,
10634         removed from CVS, generated automatically
10635
10636 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
10637         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
10638
10639 2002-08-11  Borut Razem <borut.razem AT siol.net>
10640         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
10641
10642 2002-08-10  Borut Razem <borut.razem AT siol.net>
10643         * src/SDCCmain.c (main):
10644         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
10645         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
10646         The consequence was that some temporary files were not removed.
10647
10648         * src/SDCCglue.c:
10649         unification of code in functions tempfilename() and tempfile():
10650         function tempnam() is defined in Visual Studio 6.0 and .NET
10651
10652         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
10653
10654         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10655           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
10656         - removed compiler command line option /WX: Treats all warnings as errors
10657         - update a list of source files, included into the project
10658
10659         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10660           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
10661         changed project type to Generic Project so that can be correcly converted to VS.NET project
10662
10663         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
10664
10665         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
10666
10667         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
10668
10669         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
10670         added return 0 statements after assert() to make compiler happy
10671
10672         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
10673         added newline in the def file to keep MSC compiler satisfied
10674
10675         * sdcc/src/z80/gen.c:
10676         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
10677           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
10678         - solved MSC error in function aopDump()
10679
10680         * sdcc_vc.h: define PREFIX as "\\sdcc"
10681
10682 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
10683         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
10684
10685 2002-06-22  Scott Dattalo <scott AT dattalo.com>
10686         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
10687         - Rewrote the register banking algorithm.
10688         - Added pCode live-range analysis to registers (for now, only non-used and
10689         singly-used registers optimized away)
10690
10691         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
10692
10693         * 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.
10694
10695 2002-05-10  Scott Dattalo <scott AT dattalo.com>
10696         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
10697
10698 2002-04-22  Michael Hope  <michaelh AT vroom>
10699
10700         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
10701
10702         * configure.in (DD_COPT): Added include support required for gbdk.
10703
10704         * .version: Bumped version number just to increase it.
10705
10706         * src/SDCCmain.c: Added -nostdinc to the default options.
10707
10708 2002-04-15  Michael Hope  <michaelh AT vroom>
10709
10710         * device/lib/z80/printf.c (sprintf): Added.
10711
10712         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10713
10714         * src/z80/peeph.def: Added transpose redundent load rule.
10715
10716         * src/z80/main.c: Added force callee saves for jaune.
10717
10718         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10719
10720         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10721
10722 2002-03-28  Johan Knol  <johan AT balder>
10723
10724         * src/SDCCval.c: fixed bug #532436
10725
10726 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10727         * /src/port.h:
10728         Added "char *Processor" field to the port structure.
10729
10730         * /src/SDCCmain.c:
10731         Added -p option. Allows port dependent processor to be specified.
10732
10733         * all ports:
10734         Initialized the new field char *Processor field to NULL in all ports
10735
10736         * /src/pic/*:
10737         Compiler generated registers for interrupt context saving
10738         were not getting allocated.
10739
10740 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10741
10742         * /src/SDCCast.c:
10743         Fixed left shift. Will promote the left side of a left shift
10744         if a) left shifting more than size of operand or b) when assigned
10745         to something size > size of left side
10746
10747 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10748         * src/pic/*
10749         tons of changes. Register allocation has been
10750         rewritten. Added customization for the various PICs. Flow
10751         analysis is restructured. ...
10752
10753         * src/pic/device.h:
10754         Added
10755
10756         * src/pic/device.c:
10757         Added. device.c is a PIC port hack to accomodate variations
10758         in PIC devices.
10759
10760 2002-03-13  Michael Hope  <michaelh AT vroom>
10761
10762         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10763
10764 2002-03-04  johanknol  <johanknol AT manik>
10765
10766         * /src/SDCCval.c: fixed
10767
10768         const unsigned char arr[][2] = { { 0, 1 } };
10769         t18.c:1: error: Initializer element is not constant
10770
10771 2002-03-04  bela  <bela AT manik>
10772
10773         * /device/include/mcs51reg.h:
10774         ds89c420 register definition update
10775
10776 2002-03-03    <johan AT FRIJA>
10777
10778         * support/Util/SDCCerr.c: did something, but don't no why anymore
10779
10780         * support/regression/tests/bug-524691.c: made it a little less shy
10781
10782         * src/SDCCast.c (decorateType): fixed bug #524697
10783
10784         * src/SDCCast.c: made some lineno improvements
10785
10786         * src/SDCCval.c (getNelements): changed warning to error
10787
10788         * src/SDCCglue.c (printIvalArray): changed warning to error
10789
10790         * src/SDCCicode.c: fixed a warning for mingw
10791
10792         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10793
10794         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10795
10796 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10797
10798         * src/ds390/peeph.def:
10799         Added some more peephole rules
10800
10801         * src/ds390/gen.c: Various fixes & enhancements
10802
10803         * src/SDCClrange.c, src/SDCClrange.h:
10804         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10805
10806         * src/ds390/ralloc.c:
10807         various fixes & enhancements (ds390) specific
10808
10809         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10810         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10811         from rallocs.
10812
10813         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10814
10815 2002-03-02    <johan AT FRIJA>
10816
10817         * src/SDCCast.c (decorateType): fixed bug #524708
10818
10819         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10820
10821         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10822
10823 2002-03-01  Michael Hope  <michaelh AT vroom>
10824
10825         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10826
10827         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10828
10829 2002-03-01    <johan AT FRIJA>
10830
10831         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10832
10833         * src/SDCCast.c (decorateType): fixed bug #524209
10834
10835         * src/SDCCval.c (valNot): fixed bug #524195
10836
10837 2002-02-26    <johan AT balder>
10838
10839         * src/xa51/gen.c: fixed a warning
10840
10841         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10842
10843         * src/SDCCast.c (decorateType): fixed bug #522534
10844
10845 2002-02-23    <johan AT balder>
10846
10847         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10848
10849 2002-02-22    <johan AT balder>
10850
10851         * src/SDCCast.c: fixed bug #514865
10852
10853         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10854
10855 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10856
10857         * sdcc/src/SDCCloop.c:
10858         Previous fix was not good. basic blocks that have "break" or "return" are
10859         not really partof a loop , but live ranges used in these blocks should
10860         be live thru the entire loop, so set partOfLoop but don't add them to
10861         loop region
10862
10863 2002-02-21    <johan AT FRIJA>
10864
10865         * src/SDCCcse.c: fixed bug #514308
10866
10867 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10868
10869         * src/SDCCloop.c:
10870         Fixed BUG #519583. If a conditional block ended in a return/break
10871         statement inside a loop, it was not being considered part of the loop.
10872
10873         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10874
10875 2002-02-10  Karl Bongers <karl AT turbobit.com>
10876
10877         * debugger/*:
10878         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10879         with lots of comments and notes.
10880
10881         * device/examples/test2.c:
10882         Fix bug, "red" variable not being initialized(compiler complained).
10883
10884         * device/examples/Makefile, examples/test3.c:
10885         Add Makefile in device/examples folder, compiles test3.c
10886         for use as a multiple module SDCDB test case.
10887
10888         * sim/ucsim/cmd.src/cmdset.cc:
10889         Took out debug printfs in ucsim "next" command.
10890
10891         * sim/ucsim/xa.src:
10892         Karl and Johan start ucsim XA support.  Most dissassembly working,
10893         about 75% emulation done(plenty of work remaining).
10894
10895         * sim/ucsim/z80.src:
10896         Add Z80 support to ucsim, add test-ucz80 regression test,
10897         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10898         Notice z80 compiler fails on examples/test3.c/crc code.
10899
10900 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10901
10902         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10903         Added support for --parms-in-bank1
10904
10905         * src/ds390/peeph.def:
10906         added a few more peephole optimzations
10907
10908         * src/ds390/main.c:
10909         1) added __builtin_inp & __builtin_outp used to read in data of given length
10910            from a memory mapped port
10911         2) added __builtin_memcmp
10912         3) added __builtin_swapw swap bytes of a short
10913
10914         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10915         1) handle multiple send & receives from register bank1
10916         2) ralloc can now allocate DPTR1 to some liveRanges
10917
10918         * src/SDCCsymt.c, src/SDCCsymt.h:
10919         changes to handle multiple sends & receives
10920
10921         * src/SDCCptropt.h:
10922         added some pointer arithmetic optimization
10923
10924         * src/SDCCptropt.c:
10925         added some pointer arithmetic optimizations but not stable yet so not
10926         called from anywhere (will get this working shortly)
10927
10928         * src/SDCCopt.c: fixed for multiple sends & receives
10929
10930         * src/SDCCmain.c:
10931         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10932         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10933            set preprocessor defines (depending on options)
10934
10935         * src/SDCCicode.c, src/SDCCicode.h:
10936         changes made to handle multiple sends & receives
10937
10938         * src/SDCCglobl.h:
10939         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10940
10941         * src/SDCCcse.c, src/SDCCcse.h:
10942         added function findbackward def (to be used in upcoming optimization)
10943
10944         * src/SDCCcflow.c, src/SDCCcflow.h:
10945         added function returnAtEnd - to determine if a basic block terminates with
10946         a RETURN iCode
10947
10948         * src/SDCCast.c, src/SDCCast.h:
10949         added option parms-in-bank1
10950
10951         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10952         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10953         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10954         adjusted for --parms-in-bank1 option
10955
10956         * device/include/string.h:
10957         donot redefine "reentrant" keyword
10958
10959         * device/include/ds80c390.h: Added some more SFRs
10960
10961 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10962
10963         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10964
10965 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10966
10967         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10968
10969 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10970
10971         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10972
10973 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10974
10975         * Added --xram-movc option
10976
10977 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10978
10979         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10980
10981 2002-01-11  Johan Knol
10982
10983         * Added math lib of Jesus Calvino-Fraga
10984
10985 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10986
10987         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10988         * support/regression/Makefile: new target test-mcs51-stack-auto
10989         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10990
10991 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10992
10993         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10994
10995 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10996
10997         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10998
10999 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
11000
11001         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
11002
11003         * src/SDCCglue.h: add definition for printIvalChar()
11004
11005 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11006
11007         * src/SDCCast.c: fix #498138 by Johan
11008
11009         * src/SDCCglue.c: fix #498138 by Johan
11010
11011 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11012
11013         * support/regression/Makefile: fix clean
11014
11015         * support/regression/ports/ds390/support.c: fix transmission of last character
11016
11017 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
11018
11019         * /sdcc/src/ds390/gen.c:
11020         a) improved computing address of stack variable
11021         b) took out some #if 0 code
11022         c) improved parmBytes adjustment
11023         d) improved genPlusIncr & genMinusIncr
11024         e) genCmp could generate bad code (when left assigned to DPTR)
11025         f) Fixed bug in hasInc
11026
11027         * /sdcc/src/ds390/ralloc.c:
11028         a) packRegsForSupport could mess up live information (Fixed)
11029         b) packRegsDPTRuse could be incorrect for left & right shift
11030
11031         * /sdcc/src/mcs51/ralloc.c:
11032         packRegsForSupport could mess up the live information (Fixed)
11033
11034         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
11035
11036         * /sdcc/src/SDCCast.c:
11037         can reverse a loop even if function call is present as long
11038         as the loop control variable is local & is not passed as parameter
11039
11040 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11041
11042         * /sdcc/ChangeLog: *** empty log message ***
11043
11044         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
11045         More builtin function additions for TININative
11046
11047         * /sdcc/src/ds390/ralloc.c:
11048         Had broken the regression testsuite
11049
11050         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
11051
11052         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
11053         Added funcattr hasStackParms will be set for reentrant functions when there
11054         are paramteres on the stack, this helps in minimizing frame pointer generation
11055         typeFromStr can handle function pointers now
11056
11057         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
11058         *** empty log message ***
11059
11060 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11061
11062         * /src/ds390/gen.c, /src/ds390/main.c:
11063         More builtin function additions for TININative
11064
11065         * /src/ds390/ralloc.c:
11066         Had broken the regression testsuite
11067
11068         * /src/SDCCast.c: Fixed a bug in dumptree
11069
11070         * /src/SDCCsymt.c, /src/SDCCsymt.h:
11071         Added funcattr hasStackParms will be set for reentrant functions when there
11072         are paramteres on the stack, this helps in minimizing frame pointer generation
11073         typeFromStr can handle function pointers now
11074
11075         * /doc/builtins.txt, /doc/TININative.txt:
11076         *** empty log message ***
11077
11078
11079 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11080
11081         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
11082         ALPHA version for -mTININative
11083
11084         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
11085         updated to reflect changes in the port structure
11086
11087         * /src/port.h:
11088         added function do_assemble (similar to do_link) if non-null this function
11089         will be called to do assembly (-mTININative) requires a multi command
11090         assembly
11091         added function genAssemblerEnd will be called to generate assembler Epilogue
11092
11093         * /src/SDCCsymt.c:
11094         added _JavaNative to debug info printing
11095
11096         * /src/SDCCmain.c: added option --tini-libid
11097         added port->do_assemble function (-mTININative) has a multi command assemble
11098
11099         * /src/SDCCglue.c: Disabled "constExpr" check
11100         added port->genAssemblerEnd function
11101
11102         * /src/SDCCglobl.h: Added option --tini-libid value
11103
11104         * /src/SDCCast.h:
11105         tookout optimizeCompare from the header (has no external references)
11106
11107         * /src/SDCCast.c: made one more function "static"
11108
11109 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
11110
11111         * src/z80/mappings.i: Added z80asm support.
11112
11113         * src/z80/main.c: Added z80asm support on --asm=z80asm
11114
11115         * src/z80/gen.c: Fixed asm portability issues.
11116
11117         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
11118
11119         * src/SDCCglue.c (printExterns): Added global/extern split.
11120
11121 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
11122
11123         * support/regression/Makefile: added test for mcs51 model large
11124
11125         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
11126
11127         * support/regression/ports/gbz80/spec.mk: added -mgbz80
11128
11129 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
11130
11131         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
11132
11133 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
11134
11135         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
11136
11137         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
11138
11139 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
11140
11141         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
11142
11143         * support/regression/tests/simplefloat.c: Port to mcs51.
11144
11145 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
11146         * support/regression/tests/bug-485362.c: Added.
11147
11148         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
11149
11150         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
11151
11152         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
11153
11154         * src/z80/gen.c (aopDump): Added a dump function.
11155
11156 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
11157         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
11158
11159         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
11160
11161         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
11162
11163         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
11164
11165         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
11166
11167         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
11168
11169         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
11170
11171         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
11172
11173         * support/regression/ports/ds390/support.c: Use tinibios.
11174
11175         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11176
11177 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11178
11179         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11180         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11181
11182         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11183
11184         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11185
11186 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11187
11188         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11189
11190         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11191         (packRegsForIYUse): Created and optimised.
11192
11193 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11194
11195         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11196 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11197
11198         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11199
11200         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11201
11202         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11203
11204 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11205
11206         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11207
11208         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11209
11210 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11211
11212         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
11213
11214         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
11215
11216         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
11217
11218 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11219
11220         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
11221         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
11222         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
11223
11224         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
11225
11226         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
11227         (genNotFloat): Added.
11228         (genUminusFloat): Added.
11229
11230         * device/lib/z80/Makefile: Added floating pt stubs.
11231
11232         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
11233
11234         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
11235
11236         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
11237
11238 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11239
11240         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
11241
11242         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
11243
11244         * sdcc/support/regression/Makefile: Add port ds390.
11245
11246         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
11247
11248         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
11249
11250         * sdcc/support/regression/ports/ds390/spec.mk: Added.
11251
11252         * sdcc/support/regression/ports/ds390/support.c: Added.
11253
11254         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
11255
11256         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
11257
11258         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
11259
11260 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11261
11262         * device/include/malloc.h: Added z80 and gbz80 support.
11263
11264         * device/lib/gbz80/heap.s: Added.
11265
11266         * device/lib/z80/heap.s: Added.
11267
11268         * device/lib/malloc.c: Added z80 and gbz80 support.
11269
11270         * support/regression/tests/malloc.c (testMalloc): Added.
11271
11272         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
11273
11274         * support/regression/tests/bug-478094.c: Added.
11275
11276         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
11277
11278 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
11279
11280         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
11281
11282         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
11283
11284         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
11285
11286         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
11287
11288         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
11289
11290 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11291
11292         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
11293
11294 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
11295
11296         * support/regression/tests/bug-477927.c: Added.
11297
11298         * src/z80/peeph.def: Added minor rules.
11299
11300         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
11301
11302         * src/z80/peeph.def: Added jump optimisation modification.
11303
11304 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
11305
11306         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
11307
11308 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
11309
11310         * support/regression/tests/funptrs.c: Added.
11311
11312 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
11313
11314         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
11315
11316 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
11317
11318         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
11319
11320         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
11321
11322         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
11323         (movLeft2ResultLong): Created.
11324
11325         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
11326         (joinPushes): Added.  Joins two char pushes into a word push.
11327
11328 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
11329
11330         * support/cpp2/Makefile.in (install): Added creation of dest dir.
11331
11332         * support/makebin/Makefile (install): Added creation of dest dir.
11333
11334 2001-10-24 Karl Bongers <karl AT turbobit.com>
11335
11336         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
11337
11338 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
11339
11340         * src/z80/ralloc.c: Turned off faulty pack for one use.
11341
11342         * src/z80/peeph-gbz80.def: Removed redundent restart options.
11343
11344         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
11345
11346 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
11347
11348         * support/regression/Makefile: Improved clean
11349
11350         * support/regression/ports/gbz80/spec.mk: Added clean
11351
11352         * support/regression/ports/host/spec.mk: Added clean
11353
11354         * support/regression/ports/z80/spec.mk: Added clean
11355
11356         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
11357
11358         * support/regression/ports/mcs51/timeout.c: little improvements
11359
11360 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
11361
11362         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
11363
11364         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
11365
11366         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
11367
11368 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
11369
11370         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
11371
11372         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
11373
11374 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
11375         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
11376
11377         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
11378
11379         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
11380
11381         * src/mcs51/main.c (_linkCmd): Added bin path to command.
11382
11383         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
11384
11385         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
11386
11387         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
11388
11389         * support/regression/tests/longor.c: Added.
11390
11391 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
11392
11393         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
11394
11395         * as/mcs51/aslink.h: define PATH_MAX
11396
11397         * as/mcs51/asm.h: define PATH_MAX
11398
11399         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
11400
11401         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
11402
11403         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
11404
11405         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
11406
11407         * src/SDCCglobl.h: define PATH_MAX
11408
11409         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
11410
11411         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
11412
11413 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
11414
11415         * src/z80/gen.c (gencjneshort): Fixed
11416
11417         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
11418
11419 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
11420
11421         * support/regression/tests/bug-469671.c: Added.
11422
11423         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
11424
11425 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
11426
11427         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
11428
11429         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
11430
11431 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
11432
11433         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
11434
11435         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
11436
11437         * src/device/lib/_mullong.c : removed hint: nooverlay bug
11438
11439         * src/device/lib/_divuint.c : removed hint: nooverlay bug
11440
11441         * src/device/lib/_divulong.c: removed hint: nooverlay bug
11442
11443         * src/device/lib/_moduint.c : removed hint: nooverlay bug
11444
11445         * src/device/lib/_modulong.c: removed hint: nooverlay bug
11446
11447 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
11448
11449         * 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.
11450
11451         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
11452
11453         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
11454
11455 2001-10-07    <johan AT FRIJA>
11456
11457         * device/lib/gets.c (gets): fixed the return value.
11458
11459 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
11460         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
11461
11462         * 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.
11463
11464         * 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.
11465
11466         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
11467
11468         * src/pic/gen.c: Removed Safe_strdup.
11469
11470         * configure.in: Added option to enable libgc support.
11471
11472         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
11473         (bitVectUnion): Optimised.
11474         (bitVectIntersect): Optimised.
11475         (bitVectBitsInCommon): Optimised.
11476         (bitVectCplAnd): Optimised.
11477
11478         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
11479
11480 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11481
11482         * src/SDCCmain.c: distinguish between assembler debug and plain options
11483
11484         * src/avr/main.c:   remove standard assembler options
11485
11486         * src/ds390/main.c: remove standard assembler options
11487
11488         * src/mcs51/main.c: remove standard assembler options
11489
11490         * src/port.h: removed "PENDING" comment
11491
11492 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11493
11494         * src/device/lib/_mulint.c  : new, with assember functions
11495
11496         * src/device/lib/_mullong.c : new, with assember functions
11497
11498         * src/device/lib/_divuint.c : with assember functions
11499
11500         * src/device/lib/_divsint.c : with assember functions
11501
11502         * src/device/lib/_divulong.c: with assember functions
11503
11504         * src/device/lib/_divslong.c: with assember functions
11505
11506         * src/device/lib/_moduint.c : with assember functions
11507
11508         * src/device/lib/_modsint.c : with assember functions
11509
11510         * src/device/lib/_modulong.c: with assember functions
11511
11512         * src/device/lib/_modslong.c: with assember functions
11513
11514         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
11515
11516         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
11517
11518         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
11519                                       replaced _mululong.c and _mulslong.c by _mullong.c
11520
11521 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11522
11523         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
11524
11525 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11526
11527         * src/SDCCglue.c: test, if win32api is available for MINGW
11528
11529 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11530
11531         * src/SDCCsymt.c: no more _modifier in printTypeChain()
11532         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
11533         * support/regression/ports/gbz80/spec.mk: removed GENERIC
11534         * support/regression/ports/host/spec.mk: removed GENERIC
11535         * support/regression/ports/mcs51/spec.mk: removed GENERIC
11536         * support/regression/ports/z80/spec.mk: removed GENERIC
11537
11538 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
11539
11540         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
11541
11542         * support/regression/tests/bug-467035.c: Created.
11543
11544 2001-10-01    <johan AT FRIJA>
11545
11546         * src/SDCC.y: fixed bug #466586 part 1
11547
11548 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
11549
11550         * SDCCicode.c: z80 has no generic pointers
11551         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
11552
11553 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
11554
11555         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
11556
11557 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
11558
11559         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
11560
11561         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
11562
11563 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
11564
11565         * configure.in: Fixed up so that ucsim is only configured once.
11566
11567         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
11568
11569         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
11570         (getPathDifference): As above.
11571
11572         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
11573
11574         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
11575
11576 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
11577         * .version: Updated to 2.3.1
11578
11579         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
11580         Added copyright header.
11581
11582         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
11583         (assemble): Added support for macro based assembler commands.
11584         (linkEdit): Added support for macro based linker commands.
11585         (preProcess): Changed the pre-processor to use macros.
11586         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
11587         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
11588
11589         * device/lib/z80/crt0.s: Added module name for debugging.
11590
11591 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
11592
11593         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11594
11595         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
11596
11597         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
11598
11599         * src/Makefile.in: Added SDCCmacro and SDCCutil
11600
11601 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
11602
11603         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11604
11605 2001-09-16    <johan AT FRIJA>
11606
11607         * 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.
11608
11609 2001-09-15    <johan AT FRIJA>
11610
11611         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
11612         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
11613
11614 2001-09-11    <johan AT FRIJA>
11615
11616         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
11617
11618 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
11619
11620         * support/regression/tests/bug-460444.c: Added test case.
11621
11622         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
11623         (genCast): Added justification for all of the asserts.
11624
11625 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
11626
11627         * support/regression/support.c: _xdata replaced by xdata
11628
11629         * support/regression/spec.mk: removed _generic
11630
11631 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
11632
11633         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
11634
11635         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
11636         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
11637
11638         * src/z80/peeph.def: Added a rule to optimise shift then compare.
11639
11640         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
11641
11642         * support/regression/tests/bug-460010.c: Added test case.
11643
11644         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
11645
11646 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
11647
11648         * support/regression/Makefile: inter-port-clean adjusted for mcs51
11649
11650         * support/regression/testfwk.c: removed workaround for bug #436344
11651
11652         * support/regression/tests/bp.c: use less memory with mcs51
11653
11654         * support/regression/tests/bug-441448.c: use less memory
11655
11656         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
11657
11658         * support/regression/collate-results.py: typo
11659
11660 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
11661
11662         * support/regression/tests/fetchoverlap.c: Added new test case.
11663
11664         * support/regression/tests/bp.c: Added new test case.
11665
11666         * support/regression/tests/bug-448984.c: Added new test case.
11667
11668         * support/regression/tests/pow2shifts.c: Added new test case.
11669
11670         * src/z80/gen.c: Turned off the noise it normally generates for the release.
11671         (genlshTwo): Fixed right shift for count > 8.
11672
11673         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
11674
11675 2001-09-08    <johan AT FRIJA>
11676
11677         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
11678
11679 2001-09-07    <johan AT FRIJA>
11680
11681         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
11682
11683         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
11684
11685 2001-09-06    <johan AT FRIJA>
11686
11687         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
11688         * bernhard noted me at this: "() equals to (void)" (1.38)
11689
11690 2001-09-05    <johan AT FRIJA>
11691
11692         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
11693
11694 2001-09-04    <johan AT FRIJA>
11695
11696         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
11697
11698
11699 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
11700
11701         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
11702
11703 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
11704
11705         * link/z80/aslink.h: Fixed path for PATH_MAX
11706
11707 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11708
11709         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11710
11711         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11712
11713         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11714
11715         * 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.
11716
11717 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11718
11719         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11720         (genCmp): Fixed up genCmp for the GB with longs.
11721
11722         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11723
11724         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11725
11726         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11727
11728         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11729
11730 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11731
11732         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11733
11734 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11735
11736         * 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.
11737
11738         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11739
11740 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11741
11742         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11743
11744         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11745
11746 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11747
11748   * sim/ucsim/configure:    little improvement of Cygwin-detection
11749   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11750   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11751   * support/regression/tests/bug-221100.c: small changes for mcs51
11752   * support/regression/tests/bug-221168.c: small changes for mcs51
11753   * support/regression/tests/bug-227710.c: small changes for mcs51
11754   * support/regression/tests/staticinit.c: small changes for mcs51
11755   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11756   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11757   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11758
11759 $Revision$