0c80cdc42be7839d7e86e9359901847f1c2852f9
[fw/sdcc] / ChangeLog
1 2006-07-02 Raphael Neider <rneider AT web.de>
2
3         * src/pic16/devices.inc,
4         * device/include/pic16/pic18fregs.h,
5         * device/include/pic16/pic18f4550.h,
6         * device/lib/pic16/pics.all,
7         * device/lib/pic16/libdev/pic18f4550.c: added support for 18f4550
8
9 2006-07-01 Bernhard Held <bernhard AT bernhardheld.de>
10
11         * as/hc08/lkaomf51.c (OutputName),
12         * as/mcs51/lkaomf51.c (OutputName),
13         * as/z80/asmain.c (asmbl),
14         * src/ds390/main.c (asmLineNodeFromLineNode),
15         * src/hc08/ralloc.c (hc08_assignRegisters),
16         * src/mcs51/main.c (asmLineNodeFromLineNode),
17         * src/xa51/ralloc.c (checkRegMask),
18         * src/xa51/gen.c (emitcode),
19         * src/z80/gen.c (_emit2),
20         * src/SDCCast.c (searchLitOp),
21         * src/SDCCglobl.h,
22         * support/packihx/packihx.c,
23         * support/Util/MySystem.c (split_command): fix gcc 4 warnings
24         * src/ds390/gen.c (aopPutUsesAcc),
25         * src/ds390/ralloc.c (getRegBitNoSpil): unused, therefore disabled
26         * support/regression/tests/libmullong.c (mullong_wrapper),
27         * src/SDCCsymt.c (powof2),
28         * src/SDCCast.c,
29         * src/SDCCicode.c: renamed TYPE_WORD by TYPE_TARGET_INT and so on
30         * src/SDCCsymt.h: added TYPE_TARGET_*
31         * src/SDCCutil.c (doubleFromFixed16x16, fixed16x16FromDouble),
32         * src/SDCCutil.h (doubleFromFixed16x16, fixed16x16FromDouble): moved to
33         SDCCast because 1) header problems 2) this is the right place
34         * src/SDCCast.c (doubleFromFixed16x16, fixed16x16FromDouble): added
35         * src/SDCCval.h (doubleFromFixed16x16, fixed16x16FromDouble): added
36         prototype
37
38 2006-06-29 Bernhard Held <bernhard AT bernhardheld.de>
39
40         * src/SDCCicode.h: removed buggy semicolon in unused macro
41         * src/SDCClrange.c (findPrevUseSym, rlivePoint): fixed bug #1486853,
42         search for previous definiton of auto symbols too,
43         (findPrevUse): fixed logic of emitWarnings
44
45 2006-06-26 Raphael Neider <rneider AT web.de>
46
47         * src/pic16/gen.c (genFunction, genEndFunction): also preserve
48           PCLATH and PCLATU on interrupts, potentially fixes #1505141
49
50 2006-06-25 Raphael Neider <rneider AT web.de>
51
52         * device/lib/pic/libm: NEW, added math library functions
53         * device/lib/pic/libsdcc: NEW; added float support functions
54         * device/lib/pic/{Makefile.in,configure.in,configure}: added libm/
55         * device/include/pic/{limits.h,errno.h,sdcc-lib.h,float.h,math.h}:
56           NEW, added math related headers
57         * device/include/asm/pic/features.h: NEW
58         * src/pic/gen.c (emitpcode_real): emit warning on NULL pCodeOp,
59           (popGet): allow larger offsets for AOP_PCODE,
60           (genDataPointerSet): handle literals explicitly, more debug output,
61           (genAssign): fixed for float using aopLiteral ;-)
62         * src/pic/glue.c (pic14createInterruptVect): inserted pagesel before
63           GOTO initialisation routine
64         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): set wasUsed
65           flag on registers, fixes #1469043 (local variables do not work)
66         * src/pic/main.c (_pic14_do_link),
67         * src/pic16/main.c (_pic16_linkEdit): use fullDstFileName if
68           available
69
70 2006-06-25 Borut Razem <borut.razem AT siol.net>
71
72         * device/lib/pic16/libc/stdio/sprintf.c: return the number of
73           characters printed (not including the trailing '\0' used to end
74           output to strings). Problem detected in regression test bug-927659.c.
75           NOTE: printf() family functions should return int instead
76           unsigned int!
77         * device/lib/pic16/libc/stdio/vfprintf.c: "%%" prints "%", unknown
78           specifier are printed as themselves
79         * sdcc/support/regression/tests/bug1057979.c: pic16 printf doesn't
80           support flags, width and precision specifiers
81
82 2006-06-24 Borut Razem <borut.razem AT siol.net>
83
84         * sdcc/support/regression/tests/bitvars.c: added gbz80, pic16 and pic16
85           to the list of sdcc tagrets not supporting bit type
86         * sdcc/support/regression/tests/bug-905992.c.c: excluded regression
87           testfor pic16 due to bug:
88           [ 1511794 ] pic16: regression test bug-895992.c fails
89
90 2006-06-24 Maarten Brock <sourceforge.brock AT dse.nl>
91
92         * src/mcs51/gen.c (genCmp): optimization for RFE 1162453
93         * src/SDCCglue.c (initPointer), fixed bug 1496419
94         * support/regression/tests/bug1496419.c: new, added
95
96 2006-06-22 Borut Razem <borut.razem AT siol.net>
97
98         * support/regression/ports/pic16/support.c: use gpsim usart module from
99           libgpsim_modules library
100
101 2006-06-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
102
103         * device/include/mcs51/at89c51ed2.h: Fixed bug 1510144 changed
104         IP0H to IPH0.
105
106 2006-06-19 Raphael Neider <rneider AT web.de>
107
108         * src/pic/glue.h,src/pic16/glue.h: added prototypes
109         * src/pic/glue.c,src/pic16/glue.c (pic1x_stringInSet,
110           pic1x_emitSymbolIfNew): NEW, check for a string in a set,
111           (pic14printExterns,pic14printPublics,pic16printPublics,
112           pic16_printExterns): use new functions to emit symbols
113           (picglue,pic16glue): emit publics before emitting externs
114         * src/pic/gen.c,src/pic16/gen.c (genFunction): remember the names of
115           locally defined functions to avoid bug #1443651
116         * support/regression/tests/bug-716242.c: removed pic16 workaround
117         * support/regression/ports/pic16/spec.mk: ignore errors during build
118
119 2006-06-19 Raphael Neider <rneider AT web.de>
120
121         * src/pic/glue.h: added pic14aopLiteral prototype
122         * src/pic/glue.c (pic14aopLiteral): return unsigned int
123         * src/pic/gen.c: removed stdint.h dependency
124           (aopGet): use Safe_strdup()
125           (bitpatternFromVal): removed, replaced use with pic14aopLiteral
126           (genDataPointerSet): use pic14aopLiteral()
127         * src/pic16/glue.h, src/pic16/glue.c, src/pic16/gen.c: similar changes
128           for pic16; thanks to Bernhard and Maarten
129
130 2006-06-18 Borut Razem <borut.razem AT siol.net>
131
132         * support/regression/tests/structflexarray.c: flexible array members
133           not supported by gcc < 3
134         * sim/ucsim/configure, sim/ucsim/configure.in: do not compile serio
135           GUI tool by default
136         * src/pic/gen.c: don't include [p]strdin.h on solaris
137         * support/Util/pstdint.h: addad svn attributes
138         * support/regression/tests/constantRange.c,
139           support/regression/tests/rotate.c: include inttypes.h instead
140           stdint.h on solaris, addad svn attributes
141
142 2006-06-18 Raphael Neider <rneider AT web.de>
143
144         * src/SDCCsymt.c (initCSupport): change return type of divschar to
145           int for PIC16
146         * src/pic16/genarith.c (genAddLit): sign-extend via standard routine
147           (pic16_genMinusBits): simplified sign-extension
148           (pic16_genUMult8XLit_8,pic16_genUMult8X8_8): renamed to
149             pic16_genMult8XLit_n resp. pic16_genMult8X8_n, fixed and
150             adjusted to correctly handle mixed-signed operands, disabled
151             now unused multiplciation routines
152         * src/pic16/gen.c (pic16_pushpCodeOp): fixed to handle literals
153           (assignResultValue): added argument denoting the size of the result
154             as returned by the function (fixes upcasts in assigning from
155             function calls: char foo(); int i = foo();)
156           (genCall,genPcall,genGenPointerGet,genReceive): pass size of
157             function result to assignResultValue
158           (genMult): disabled inlined multiplication code
159           (genDiv): augmented to also handle the modulus operator, fixed to
160             handle mixed-signed operands correctly
161           (genMod): simply call genDiv, disabled unused code
162           (genAssign): fixed missing (sign-)extension on result
163         * src/pic16/main.c (_hasNativeMulFor): accept literals [-128..256) as
164             valid char operands, allow signed operands for native code, added
165             division and modulo operator handling
166         * device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
167
168         As a consequence, onebyte.c (if split into two files) and muldiv.c
169         pass regression tests.
170
171 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
172
173         * doc/Makefile.in: two runs of makeindex seem needed to get
174         correct page references in the index of sdccman.pdf
175         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
176
177 2006-06-17 Borut Razem <borut.razem AT siol.net>
178
179         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
180
181 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
182
183         * doc/sdccman.lyx: updated, added (porting source code, debugging),
184         mentioned ec2drv and paulmon
185
186 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
187
188         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
189           consecutive abs areas
190           (find_empty_space, allocate_space): added map to handle codemap or
191            xdatamap,
192           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
193            absolute idata and xdata
194         * as/mcs51/lkmem.c (summary2): updated legend
195
196 2006-06-16 Raphael Neider <rneider AT web.de>
197
198         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
199
200 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
201
202         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
203           1208515
204         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
205
206 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
207
208         * src/port.h (struct PORT): added field gp_tags, to hold the tag
209         value of generic pointers,
210         * src/avr/main.c,
211           src/ds390/main.c,
212           src/hc08/main.c,
213           src/izt/i186.c,
214           src/izt/tlcs900h.c,
215           src/mcs51/main.c,
216           src/pic/main.c,
217           src/pic16/main.c,
218           src/xa51/main.c,
219           src/z80/main.c: PORT structure, added elements for gp_tags field,
220         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
221         fields in the PORT structure of each port,
222         * src/SDCCast.c (decorateType): allow processing of generic pointers
223         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
224         S_FIXED symbols
225
226 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
227
228         * link/z80/lkgb.c,
229         * link/z80/lkgg.c,
230         * src/pic16/gen.c,
231         * src/pic16/main.c,
232         * src/pic16/pcode.c,
233         * src/pic/main.c,
234         * src/pic/pcoderegs.c,
235         * src/SDCCicode.c,
236         * src/SDCCmain.c,
237         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
238           bug 1504689 on minGW
239
240 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
241
242         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
243
244 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
245
246         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
247
248 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
249
250         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
251           for optimization
252
253 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
254
255         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
256         to a char variable. Fixed bug #1504211
257         * device/include/pic16/adc.h,
258         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
259         and fixed bug #1364390
260
261 2006-06-10 Borut Razem <borut.razem AT siol.net>
262
263         * CVSROOT: removed the CVS left-over
264
265 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
266
267         * as/hc08/asmain.c (asexit),
268         * as/hc08/lkmain.c (lkexit),
269         * as/mcs51/asmain.c (asexit),
270         * as/mcs51/lkmain.c (lkexit),
271         * src/SDCCglue.c (DEFSETFUNC),
272         * src/SDCCmain.c (linkEdit, assemble),
273         * support/librarian/sdcclib.c (AddRel),
274           replaced unlink() by standard C remove()
275         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
276         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
277           gatherImplicitVariables): new, added to fix bug 608752,
278           (createFunction): added gatherImplicitVariables()
279         * src/SDCCast.h: added createRMW prototype
280         * src/SDCCsymt.h (struct symbol): added infertype
281         * support/regression/tests/bug608752.c: new, added
282
283 2006-06-10 Raphael Neider <rneider AT web.de>
284
285         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
286           multibyte dummy reads (fixes #1503234)
287
288 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
289
290         * device/include/mcs51/compiler.h: new, added header file to enable
291           creating common sfr definition header files for different compilers
292
293 2006-06-05 Raphael Neider <rneider AT web.de>
294
295         * src/pic16/{pcode.h,genarith.c}:
296           introduced pCodeOp combining any two pCodeOps (previously only
297           two register operands could be combined), removed pcop2 from
298           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
299         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
300         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
301           rewritten to use new PO_TWO_OPS
302         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
303         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
304           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
305           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
306           (pic16_get_op): embraced return arg to allow #define return(x),
307             added new case for combined opcodes
308           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
309           (pic16_pCode2str,pic16_getRegFrompCodeOp,
310            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
311
312 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
313
314         * src/SDCCval.c (checkConstantRange): added
315         * src/SDCCval.h: added checkConstantRange
316         * support/Util/SDCCerr.c,
317         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
318         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
319         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
320         * src/SDCCast.c (decorateType): added checkConstantRange,
321         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
322         can be emitted with the correct always true/false warning,
323         added optimization for double '!';
324         result of decorateType() must be assigned back to the tree, because
325         decorateType() can change the tree
326         * src/SDCCicode.c (geniCodeLogic),
327         (geniCodeAssign): replaced new checkConstantRange, added warnings,
328         (checkConstantRange): removed, it was only a fragment which never
329         emitted a warning
330         * src/SDCCsymt.c (computeType): fixed promotion for
331         "-1 < (unsigned bit) b"
332         * src/pic/ralloc.c (packRegsForAssign),
333         * src/pic16/ralloc.c (packRegsForAssign),
334         * src/hc08/ralloc.c (packRegsForAssign),
335         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
336         from mcs51
337         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
338         * support/regression/tests/constantRange.c: added
339         * support/valdiag/tests/constantRange.c: added
340         * support/valdiag/valdiag.py: added -DPORT_HOST=1
341
342 2006-06-02 Borut Razem <borut.razem AT siol.net>
343
344         * support/regression/ports/pic16/support.c: increase stack size
345           to 255 bytes
346         * support/regression/Makefile.in: sort tests by name so that the
347           resutlts can be compared on different machines / platforms
348
349 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
350
351         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
352         * src/ds390/gen.c (emitLabel): new, added,
353           (genDjnz): fixed stack overflow bug,
354           (throughout): cosmetic changes to sync with mcs51/gen.c,
355           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
356         * src/mcs51/gen.c (genEndFunction): small optimization,
357           (throughout): cosmetic changes to sync with ds390/gen.c
358
359 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
360
361         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
362           (_print_format): fixed printing pointers
363         * src/mcs51/gen.c (emitLabel, movb): new, added,
364           (genAssign): small optimization,
365           (genDjnz): fixed stack overflow bug,
366           (throughout): replaced sprintf with SNPRINTF,
367           replaced mcs51_regWithIdx with REG_WITH_INDEX,
368           replaced emitcode("mov", "b,...") with MOVB(...),
369           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
370           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
371         * src/mcs51/peeph.def: added rules 140 and 264
372         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
373           so they may get optimized into registers
374
375 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
376
377         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
378           immediately when encountered,
379           (printUsage): always use stderr even on windows
380
381 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
382
383         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
384         (processParms): fixed bug #1247551
385         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
386         parseCmdLine, main): print '--version' to stdout,
387         print 'help' to stdout if --help is given,
388         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
389         arguments are given; fixed --help
390
391 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
392
393         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
394         * support/regression/tests/bug-1493710.c: added
395
396 2006-05-27 Borut Razem <borut.razem AT siol.net>
397
398         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
399           static instead auto
400         * support/regression/ports/pic16/support.c: increase stack size
401           from default 64 bytes to 128 bytes
402         * support/regression/tests/staticinit.c,
403           support/regression/tests/float.c: regression tests fully enabled
404           for pic16 port by putting the initialized data arrays into the code
405           section
406         * support/regression/ports/pic16/spec.mk: don't link default libraries.
407           This was changed by mistake in the previous version.
408
409 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
410
411         * src/pic16/gen.c (genFunction, genEndFunction): some
412         beautifications, fixed bug with falsely restoring FSR2 in large
413         stack model, thanks to Beau E. Cox for reporting the bug
414
415 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
416
417         * debugger/mcs51/break.c,
418         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
419           use %p to print pointers, made address variables unsigned
420         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
421         * debugger/mcs51/symtab.c (parseSymbol): must return something
422         * src/mcs51/gen.c (aopForSym): small optimization,
423            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
424           (freeAsmop): added missing break,
425           (aopPut): removed parameter bvolatile, determine it inside the function,
426           (saveRegisters, unsaveRegisters): small optimization,
427           (genIpush): removed pointless check,
428           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
429           replaced sprintf with SNPRINTF,
430           replaced strcpy with strncpyz,
431           updated aopPut calls,
432           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
433         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
434
435 2006-05-24 Borut Razem <borut.razem AT siol.net>
436
437         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
438           modification of test for the pic16 port, put the array to the code
439           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
440
441 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
442
443         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
444         * support/Util/pstdint.h: added
445
446 2006-05-22 Borut Razem <borut.razem AT siol.net>
447
448         * src/regression/Makefile: removed bool2.c test, added -q linker option
449         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
450           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
451           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
452           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
453           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
454           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
455           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
456           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
457           define SUPPORT_BIT_TYPES 0, removed unused bit variables
458
459 2006-05-22 Raphael Neider <rneider AT web.de>
460
461         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
462           bug #1492360 (problematic due to generic pointers, see code)
463
464 2006-05-22 Borut Razem <borut.razem AT siol.net>
465
466         * support/regression/ports/pic16/specs.mk: removed stack size linker
467           directive
468         * support/regression/tests/array.c,
469           support/regression/tests/bitopcse.c,
470           support/regression/tests/bug-908454.c,
471           support/regression/tests/malloc.c: modified for pic16 regression test
472         * support/regression/tests/bitfields.c:
473           pic16 - excluded bitfileds of size > 8
474         * support/regression/tests/bp.c: pic16 - reduced data size
475         * support/regression/tests/bug-221100.c: pic16 - reduced data size
476         * support/regression/tests/bug-460010.c:
477           pic16 - used the absolute address the fits in memory
478         * support/regression/tests/bug-716242.c:
479           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
480         * support/regression/tests/float.c:
481           pic16 - excluded - data size too big
482         * support/regression/tests/onebyte.c:
483           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
484         * support/regression/tests/shifts.c:
485           pic16 - function names probably have to differ in first X characters
486           (gpasm limitation?)
487         * support/regression/tests/staticinit.c:
488           pic16 - excluded some tests due error: no target memory available for
489           section ".idata"
490
491 2006-05-22 Borut Razem <borut.razem AT siol.net>
492
493         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
494           second try. Thanks Stas Sergeev once more.
495
496 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
497
498         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
499           (genLeftShift, genRightShift): fixed bug 1491627
500         * src/hc08/peeph.def (rules 7, 8.x): added
501         * support/regression/tests/shifts.c (ShiftLeftByParam,
502           ShiftRightByParam, testShiftByParam): added to test variable shifting
503
504 2006-05-20 Raphael Neider <rneider AT web.de>
505
506         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
507         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
508           (allocReg): add only new registers to dynAllocRegs,
509           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
510             #1489055, #1445850, and probably #1483693
511
512 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
513
514         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
515         bug in for-loop that didn't emit the last of CONFIG and ID registers
516
517 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
518
519         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
520           with offset
521         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
522           1489016, 1434401 and 1490124
523         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
524           1489016, 1434401 and 1490124
525
526 2006-05-17 Borut Razem <borut.razem AT siol.net>
527
528         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
529           thanks Stas Sergeev
530
531 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
532
533         * device/include/mcs51/P89c51RD2.h,
534         * device/include/mcs51/P89LPC901.h,
535         * device/include/mcs51/P89LPC922.h,
536         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
537
538 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
539
540         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
541         to fix missing stack pragma in compiled binary object file,
542
543 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
544
545         * support/packihx/configure.in,
546         * support/packihx/configure: removed warning, autoconf >= 2.5x can
547         determine sizeof basic types even while cross compiling
548
549 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
550
551         * src/avr/gen.c (aopop),
552         * src/ds390/gen.c (aopOp),
553         * src/hc08/gen.c (aopOp),
554         * src/mcs51/gen.c (aopop),
555         * src/pic16/gen.c (pic16_aopOp),
556         * src/pic/gen.c (aopOp),
557         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
558         if size of operand is smaller than spill location
559
560 2006-05-12 Borut Razem <borut.razem AT siol.net>
561
562         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
563           have to have CR/LF line endings even if they are checked out on *nix
564           or on WIN32 in cygwin binmode
565
566 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
567
568         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
569         * device/include/ds80c390.h: added sfr16 definitions
570         * src/ds390/gen.c,
571         * src/ds390/gen.h,
572         * src/ds390/main.c,
573         * src/ds390/ralloc.c,
574         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
575           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
576           bit returning functions
577         * support/regression/tests/sfr16.c: enabled test on ds390
578
579 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
580
581         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
582         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
583
584 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
585
586         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
587         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
588           (cl_address_space constructor): removed expensive initialization,
589           (cl_address_space::get_cell): extended for late initialization,
590           (cl_address_space::*): use late initialization,
591           (cl_address_decoder::activate): removed expensive initialization,
592           This reduced regression test running time by 25%
593
594 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
595
596         * packihx/,
597         * configure.in,
598         * configure,
599         * sdcc.dsw,
600         * Makefile.bcc,
601         * Makefile.in,
602         * support/packihx/Makefile.in,
603         * support/packihx/clean.mk,
604         * support/packihx/Makefile.bcc,
605         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
606
607 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
608
609         * src/SDCCval.c (valNot): fix for regression test failure
610           of not.c on big endian hosts
611
612 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
613
614         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
615
616 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
617
618         * device/lib/mcs51/Makefile.in: changed string comparison operator
619           to = for POSIX compliance; == is bash extension
620
621 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
622
623         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
624           kosmonaut_pirx
625
626 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
627
628         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
629         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
630         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
631         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
632         bug report #1478657,
633
634 2006-05-05 Borut Razem <borut.razem AT siol.net>
635
636         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
637           making the html
638
639 2006-05-02 Borut Razem <borut.razem AT siol.net>
640
641         * doc/Makefile.in: removed *.ind dependency since there is no rule to
642           create *.ind, which made make to fail if invoked with -j 2
643
644 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
645
646         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
647           Hubert Sack for patch 1479782
648
649 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
650
651         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
652
653 2006-05-01 Raphael Neider <rneider AT web.de>
654
655         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
656           (create_pic): store only prefix-free device name,
657           (init_pic): check for device names with "16" prefix,
658           (list_valid_pics),
659         * src/pic/device.h (struct PIC_device),
660         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
661             stored device name,
662         * device/include/pic/pic12f{635,675,629,683}.h,
663         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
664         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
665         * device/include/pic/pic16f505.h,
666         * device/lib/pic/libdev/pic16f505.c: removed
667         * device/include/pic/pic14devices.txt: added support for pic12f
668             devices, removed unsupported non 16-bit devices
669             [above changes provided by patch from Zik Saleeba]
670         * src/pic/*, src/pic16/*, device/include/pic16/*,
671           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
672
673 2006-05-01 Borut Razem <borut.razem AT siol.net>
674
675         * configure.in, configure, doc/Makefile.in:
676           sync with nightly build makefile - latex, dvipdf and dvips
677           not needed any more
678
679 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
680
681         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
682         in the library source
683
684 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
685
686         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
687
688 2006-04-28 Raphael Neider <rneider AT web.de>
689
690         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
691         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
692           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
693         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
694
695 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
696
697         * device/lib/pic/libdev/Makefile.in,
698         * device/lib/hc08/Makefile.in,
699         * device/lib/gbz80/Makefile.in,
700         * device/lib/z80/Makefile.in,
701         * device/lib/ds390/Makefile.in,
702         * device/lib/ds400/Makefile.in: added srcdir to include search path,
703         thanks to Borut for the bug report
704         * configure.in,
705         * configure: always create doc/Makefile independent from --enable-doc
706         * Makefile.in: always install from directory doc independent from
707         --enable-doc
708         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
709         removed
710         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
711         * doc/Makefile.in: install *.txt if present
712         * device/include/Makefile.in (install): added installation of pic/*.inc
713         and pic/*.txt files again, they were erroneously removed
714
715 2006-04-28 Raphael Neider <rneider AT web.de>
716
717         * src/pic/{gen.c,main.h,pcode.c},
718         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
719             concerning signedness with casts
720
721 2006-04-28 Raphael Neider <rneider AT web.de>
722
723         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
724             definition of an interrupt handler,
725         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
726             interrupt handler stuff from picglue() to separate routine,
727           (picglue): enabled definition of intr handlers in files w/o main()
728
729 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
730
731         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
732           compilation with MSVC 2005 Express Edition (VC8)
733
734 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
735
736         * device/lib/Makefile: fixed build of gbz80 lib
737
738 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
739
740         * support/regression/tests/bug-460010.c,
741         * support/regression/tests/bug-524691.c,
742         * support/regression/tests/bug-716242.c: removed conditional defines
743           that are already in testfwk.h
744
745 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
746
747         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
748           (AccAXRsh1): added, shift right by 1,
749           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
750            AccAXLrl1
751         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
752
753 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
754
755         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
756         remove cast to same type
757         * src/SDCCast.c (decorateType): fix for RFE 1475742,
758         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
759         * as/z80/Makefile,
760         * link/z80/Makefile: removed, they have moved to
761         Makefile.in files
762         * configure,
763         * configure.in: replaced duplicate message about ucsim by missing sdcpp
764         * install-sh: fix bug #1204398 by setting umask 0022
765         * device/lib/Makefile: separate build of z80 and gbz80 lib
766
767 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
768
769         Enabled VPATH feature: changed nearly all Makefiles (149 files).
770         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
771
772         One basic decision: e.g. src/clean.mk includes further files. In order
773         to make this work there are two solutions:
774         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
775           run configure on them. This way they can use
776           'include $(srcdir)/port-clean.mk'
777         - always include clean.mk by the Makefile at the same level. To avoid
778           that `make clean` tries to include and build Makefile.dep the
779           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
780           implemented, because now even `make uninstall` doesn't create
781           Makefile.in. clean.mk could be eliminated by pasting it in
782           Makefile.in.
783
784         * debugger/mcs51/Makefile.in: build own objects from library sources
785         (SLIB, SDCC) in current directory
786
787         * configure, configure.in: renamed --disable-device-lib-build in
788         --disable-device-lib; added --enable-doc, the required tools are
789         searched by configure; added result message; the toolchain for the
790         belonging ports are now only built, if the port is enabled.
791
792         * support/regression/*: all output is written in directory gen, because
793         the fwk and ports directories don't livet in the build tree using vpath
794
795         * doc/sdccman.lyx: renamed --disable-device-lib-build to
796         --disable-device-lib, added --enable-doc, added section VPATH
797
798         * sim/ucsim/configure.in,
799         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
800         z80 are enabled by default
801
802 2006-04-24 Raphael Neider <rneider AT web.de>
803
804         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
805             to config word, "pic14_"-prefixed some extern functions
806           (pic14_emitConfigWord): emit __config directive(s) if assignment to
807             config word has been found
808         * src/pic/device.h: added prototypes
809         * src/pic/pcode.c: added "pic14_"-prefix where needed
810         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
811             fixup
812         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
813             words,
814           (pic14emitRegularMap): ignore config words,
815           (pic14createInterruptVect): moved generating __config directives away
816           (picglue): have __config directives emitted
817
818 2006-04-24 Borut Razem <borut.razem AT siol.net>
819
820         * doc/Makefile: sync with nightly build makefile
821
822 2006-04-24 Raphael Neider <rneider AT web.de>
823
824         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
825             registers that have not been assigned proper liveranges,
826             fixes #1469504 and #1474602,
827           (pCodeRegOptimizeRegUsage): fixed typo in comment
828
829 2006-04-24 Borut Razem <borut.razem AT siol.net>
830
831         * device/examples/main8051.c: deleted - it was removed from CVS
832           24.mar.2000 and after that modified 18.feb.2001, so it reappered
833           after the transition to Subversion
834         * src/SDCCalloc.h: deleted - it was removed  from CVS
835           3.feb.2001 and after that modified 18.feb.2001, so it reappered
836           after the transition to Subversion
837         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
838           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
839           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
840           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
841
842 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
843
844         * as/asx8051.dsp: added mcs51/strcmpi.h
845         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
846         * as/hc08/aslink.h: updated lnksect prototype
847         * as/hc08/asm.h,
848         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
849         * as/hc08/asmain.c,
850         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
851           (newdot): handle A_ABS
852         * as/hc08/asout.c,
853         * as/mcs51/asout.c (outarea): output address
854         * as/hc08/lkaomf51.c,
855         * as/mcs51/lkaomf51.c: disabled unused array UsageType
856         * as/hc08/m08pst.c,
857         * as/mcs51/i51pst.c,
858         * as/z80/z80pst.c: "ABS" is not A_OVR
859         * as/hc08/lkarea.c (newarea): read a_addr,
860           (lnkarea): added codemap array, sort absolute areas to the front,
861            combine all GSINITx/GSFINAL,
862           (find_empty_space, allocate_space): new functions,
863           (lnksect): return next address, handle absolute sections
864         * as/mcs51/lkarea.c (newarea): read a_addr,
865           lnksect2 prototype changed,
866           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
867           (find_empty_space, allocate_space): new, factored out of lnksect2,
868           (lnksect2): return next address, handle absolute sections
869         * as/hc08/lkhead.c,
870         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
871         * as/hc08/lklibr.c (addfile, fndsym),
872         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
873           index out of range and detect both '\' and '/'
874         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
875         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
876           regression tests (ds390 cannot return bool yet)
877         * doc/sdccman.lyx: changed version number, document changed --no-peep,
878           document critical interrupts on z80, document changed SDCC define
879         * src/asm.c (_asxxxx_mapping): fixed .org directive,
880           (_a390_mapping): added .org directive
881         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
882           (genMultOneByte): fixed warnings
883         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
884           ones
885         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
886         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
887           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
888         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
889         * src/pic16/main.c: removed newReg prototype
890         * src/pic16/pcode.c,
891         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
892           warnings
893         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
894           ones
895         * src/pic16/ralloc.c
896         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
897           to fix warnings
898         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
899           from short to PIC_OPTYPE
900         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
901         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
902           optype from short to PIC_OPTYPE
903         * src/port.h: made int_size unsigned to fix warnings
904         * src/SDCC.y: fixed warning on MSVC
905         * src/SDCCicode.c (getArraySizePtr): return unsigned int
906         * src/SDCCopt.c (convertToFcall): fixed warnings
907         * src/SDCCsymt.h: removed double prototype for genSymName
908         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
909           offset int to fix warnings
910
911 2006-04-22 Borut Razem <borut.razem AT siol.net>
912
913         * doc/sdccman.lyx, */Makefile, */Makefile.in:
914           references to CVS replaced with Subversion
915
916 2006-04-21 Borut Razem <borut.razem AT siol.net>
917
918         * doc/sdccman.lyx, */Makefile, */Makefile.in:
919           references to CVS replaced with Subversion
920
921 2006-04-19 Borut Razem <borut.razem AT siol.net>
922
923         * src/version.awk: adapted for svn
924         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
925           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
926           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
927           /binutils-avr/etc/*.vi, *.jin: removed all properties
928           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
929
930 2006-04-19 Borut Razem <borut.razem AT siol.net>
931
932         * CVS to Subversion migration completed
933
934 2006-04-18 Borut Razem <borut.razem AT siol.net>
935
936         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
937           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
938
939 2006-04-17 Borut Razem <borut.razem AT siol.net>
940
941         * device/include/Makefile.in: added pic/*.inc to the installation
942
943 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
944
945         * support/regression/collate-results.py: fixed output in case of
946         a valdiag error
947         * support/regression/generate-cases.py: fixed splitting of pathnames
948         with dots
949         * as/hc08/lklibr.c (addfile),
950         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
951
952 2006-04-11 Raphael Neider <rneider AT web.de>
953
954         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
955         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
956         * src/pic16/pcode.c (assignValnums): fixed #1460578
957
958 2006-04-11 Raphael Neider <rneider AT web.de>
959
960         * device/lib/pic/libdev/*.c,
961         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
962           fixes #1468739, enables compilation in --std-c99 mode
963         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
964
965 2006-04-11 Raphael Neider <rneider AT web.de>
966
967         * src/pic/device.c (find_device): removed debug output
968           (list_valid_pics): enabled verbose listing of supported devices
969         * device/include/stdbool.h: define bool as char for pic14/16 as well
970
971 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
972
973         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
974
975 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
976
977         * .version: bumped version to 2.5.6
978         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
979
980 2006-04-06 Raphael Neider <rneider AT web.de>
981
982         * .version: bumped version to 2.5.6 (pic14 ABI changed)
983         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
984         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
985           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
986             pic14_constructAbsMap
987           (pic14printPublics): declare absolute global symbols as global
988           (pic14createInterruptVect),
989         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
990           (newReg): assume new registers unused, use correct name in
991             hashtable (reg->name instead of name), more debugLog output
992         * src/pic/device.h (PIC_device): added fields for verbose output
993         * src/pic/device.c: moved device definition to pic14devices.txt,
994             added routines for runtime parsing of pic14devices.txt,
995             added support for second config word
996         * src/pic/main.c (_process_pragma): removed #pragma maxram,
997           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
998           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
999           (_pic14_parseOptions): moved pCodeInitRegisters here
1000           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
1001         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
1002           (pCodeInitRegisters): rewrapped comments, perpared new approach to
1003             handling the pseudo stack
1004         * device/lib/Makefile.in: ignore failures in objects-pic16,
1005         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
1006         * device/lib/pic/NEWS: document new dependency on picXXX.lib
1007         * device/lib/pic/Makefile.subdir,
1008         * device/lib/pic16/Makefile.subdir: improved clean rules
1009         * device/lib/pic/libdev/: NEW, pic14 device libraries
1010         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
1011         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
1012         * device/include/Makefile.in: create subdir and install pic14 headers
1013         * device/include/pic/p16f_common.inc: removed unused declarations
1014         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
1015             PICs from inc2h.pl v1.6,
1016             replaced BIT_AT macros with struct declarations
1017         * device/include/pic/pic14devices.txt: definition of supported devices,
1018             all above improvements contributed by Zik Saleeba, thanks
1019         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
1020         * support/scripts/sdcc.nsi: also install pic14 device libraries and
1021             headers
1022
1023 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1024
1025         * device/include/mcs51/c8051f410.h: added interrupt numbers,
1026         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
1027           thanks to Charles Olds
1028
1029 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1030
1031         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
1032
1033 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1034
1035         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
1036         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
1037         * support/regression/bug1464657.c: added, new test
1038
1039 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1040
1041         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
1042           version number
1043
1044 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1045
1046         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
1047           --no-peep and --peep-file <file> are used don't use default rules but
1048           do use the <file>
1049
1050 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1051
1052         * src/mcs51/gen.c (genCall): fixed bug 1457608
1053
1054 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1055
1056         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
1057         changes seem to cause (trigger?) problems with the build system.
1058
1059 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
1060
1061         * src/SDCCpeeph.c (operandsLiteral): new, added,
1062           (callFuncByName): inserted operandsLiteral
1063         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
1064
1065 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1066
1067         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
1068         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
1069
1070 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1071
1072         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
1073           implemented patch 1120823 Thanks to Willy De la Court (normal
1074           interrupts need an interrupt number now if they are made critical),
1075           and enabled nesting of critical functions though not for gbz80
1076           (genCritical, genEndCritical): added functions
1077           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
1078         * src/z80/mappings.i: added "ei" to all mappings
1079
1080 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1081
1082         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
1083         submitted by the Debian SDCC maintainer Aurelien Jarno:
1084         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
1085         archive with gcc 4.1 on mips and wrote the patch"
1086
1087 2006-03-16 Raphael Neider <rneider AT web.de>
1088
1089         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
1090           the left operand is shorter than the result (c* = lit-c* + int),
1091           fixes bug #1450796
1092         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
1093           OP_SYMBOL
1094
1095 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1096
1097         * src/.version: increased version number to 2.5.5
1098         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
1099         linking is done manually in pic16 port's _linkEdit,
1100         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
1101         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
1102         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
1103         allocate asmop as AOP_ACC,
1104         (aopForRemat): added parameter 'bool result' in function declaration,
1105         (pic16_aopGet): return AOP_ACC when accessing WREG,
1106         (pic16_popGetTempReg): minor modification,
1107         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
1108         'pic16_allocWithIdx',
1109         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
1110         calling function in absolute addresses,
1111         (genAssign): take into account AOP_ACC asmop,
1112         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
1113         * src/pic16/pcoderegs.c: some debug functions and lines added,
1114         * src/pic16/ralloc.c (decodeRegType): added but commented out,
1115         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
1116         register too,
1117         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
1118         call to allocReg, not by manually allocating a new one,
1119         (pic16_assignRegisters): now before going through the register
1120         allocating functions mark all registers as free. This eliminates some
1121         side effects resulting from peephole parser done earlier in the backbone
1122
1123 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
1124
1125         * src/SDCCicode.c (geniCodeLogic),
1126         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
1127
1128 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
1129
1130         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
1131           (genSend): bugfix, do not allocate and free twice,
1132           (shiftRLong): handle partially overlapping aops
1133         * support/regression/tests/bitopcse.c: fixed warning redefined idata
1134
1135 2006-03-08 Borut Razem <borut.razem AT siol.net>
1136
1137         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
1138           for pic16
1139
1140 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
1141
1142         * support/regression/tests/bug1409955.c: new, added
1143         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
1144         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
1145           (aopForSym, aopOp): increment asmop.allocated if reused,
1146           (freeAsmop): decrement asmop.allocated and check for zero instead of
1147           using asmop.freed,
1148           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
1149           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
1150            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
1151            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
1152            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
1153            genSignedRightShift, genRightShift, genDataPointerGet,
1154            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
1155            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
1156             in reverse order from allocation,
1157           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
1158             added swappedLR to keep track
1159         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
1160           pdata & code for GCC, z80, gbz80 & hc08
1161         * support/regression/tests/zeropad.c: moved defines to testfwk.h
1162
1163 2006-03-08 Raphael Neider <rneider AT web.de>
1164
1165         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
1166
1167 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
1168
1169         * device/include/mcs51/c8051f410.h: new SiLabs mcu
1170         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
1171         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
1172
1173 2006-03-06 Borut Razem <borut.razem AT siol.net>
1174
1175         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
1176           made the linker quiet
1177
1178 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1179
1180         * src/pic16/gen.c (genPcall): fixed bug #1443644
1181         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
1182         which dumps before the function entry point a data byte which represents
1183         the number of the local variables used by the specified function, added
1184         'xinst' for initial support for Extended Instruction Support,
1185         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
1186         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
1187         port->fun_prefix anymore (may change later),
1188         (genFunction, genEndFunction): do not store/restore local registers for
1189         _main (this should take care the --main-return command line option in
1190         the future),
1191         (genOr): removed some legacy pic-port instructions,
1192         * src/pic16/genarith.c (genAddLit): re-enabled old code because
1193         performing operations with SFR's causes data to be written more than
1194         once to each SFR. Perhaps SFRs should be handled in special cases...
1195         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
1196         pcode.h
1197         * src/pic16/main.c (_process_pragma): stack bound checking did not take
1198         into account for stack starting position,
1199         (struct OPTIONS pic16_optionsTable): added command line argument
1200         --extended or -y for Extended Instruction Support,
1201         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
1202         (deassignLRs): *** perhaps the most important change, old 'for' code
1203         (commented out for reference), didn't account for some registers which
1204         were left marked 'not free' after a pointer operation. The change
1205         reduces register usage a lot in some cases
1206
1207 2006-03-04 Borut Razem <borut.razem AT siol.net>
1208
1209         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
1210           _clean
1211         * support/regression/tests/bug-524697.c: decreased array size for
1212           mcs51 to fit into the internal RAM
1213         * support/regression/Makefile.in: a little bit more verbose
1214
1215 2006-03-03 Borut Razem <borut.razem AT siol.net>
1216
1217         * support/regression/fwk/lib/testfwk.c,
1218           support/regression/fwk/include/testfwk.h: introduced function
1219           _prints(), nonrecursive _printn(), call _initEmu() from main()
1220         * support/regression/ports/gbz80/support.asm,
1221           support/regression/ports/ucz80/support.asm,
1222           support/regression/ports/z80/support.asm,
1223           support/regression/ports/ds390/support.c,
1224           support/regression/ports/hc08/support.c,
1225           support/regression/ports/host/support.c,
1226           support/regression/ports/mcs51/support.c,
1227           support/regression/ports/xa51/support.c: added empty _initEmu()
1228           function
1229         * support/regression/ports/pic16/gpsim.cmd,
1230           support/regression/ports/pic16/spec.mk,
1231           support/regression/ports/pic16/support.c,
1232           support/regression/Makefile.in: added pic16 regression test
1233
1234 2006-03-01 Raphael Neider <rneider AT web.de>
1235
1236         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
1237           genConstPointerGet): use safe way of generating MOVFF to cover
1238             literals as well as registers, fixes bug #1440527
1239         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
1240             dereference
1241           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
1242             more correctly, fixes bug #1232186
1243           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
1244         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
1245             gplink guess the correct processor in more cases, applied patch
1246             from Till Riedel attached to and fixing bug #1436552
1247
1248 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1249
1250         * support/regression/tests/array.c: added, contains check for #1434401
1251         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
1252
1253 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
1254
1255         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
1256         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
1257         * device/include/mcs51/c8051f326.h,
1258         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
1259         * device/include/mcs51/c8051f000.h,
1260         * device/include/mcs51/c8051f018.h,
1261         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
1262           PCON_IDLE,PCON_STOP and added sfr16 definitions
1263
1264 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1265
1266         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
1267           genGetWord): fixed bug 1409955
1268
1269 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1270
1271         * device/include/hc08/mc68hc908gp32.h,
1272         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
1273
1274 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
1275
1276         * src/SDCCast.c (constExprValue): return NULL if not a value
1277         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
1278         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
1279         * support/regression/tests/bitfields.c: enabled signed bitfield for all
1280
1281 2006-02-13 Borut Razem <borut.razem AT siol.net>
1282
1283         * src/regression/ptrarg.c: added, fails due to bug #1430967
1284         * src/regression/Makefile: ptrarg.c added, ...
1285
1286 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
1287
1288         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
1289         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
1290
1291 2006-02-11 Borut Razem <borut.razem AT siol.net>
1292
1293         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
1294           print "Processor: xxx" message to stdout only if --verbose
1295
1296 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1297
1298         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
1299         * support/regression/tests/bug1426356.c: added
1300         * support/regression/tests/bitfields.c: removed 2 tests
1301
1302 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1303
1304         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
1305         * device/include/mcs51/c8051f330.h,
1306         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
1307           PCON_IDLE,PCON_STOP and added sfr16 definitions
1308         * device/lib/_divsint.c,
1309         * device/lib/_divuint.c,
1310         * device/lib/_divulong.c,
1311         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1312           register bank bug for small stackauto
1313
1314 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1315
1316         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1317
1318 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1319
1320         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1321         * all.dsp: corrected several bin paths
1322         * device/include/mcs51/c8051f120.h,
1323         * device/include/mcs51/c8051f300.h,
1324         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1325           to PCON_IDLE,PCON_STOP
1326         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1327         * device/lib/printf_large.c (output_float): fixed bug 1388703
1328         * support/regression/tests/bug1057979.c: added test for bug 1388703
1329
1330 2006-02-08 Raphael Neider <rneider AT web.de>
1331
1332         * src/pic/pcode.c (pciTRIS): fixed typo,
1333           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1334           (LinkFlow): fixed handling of flows that end in a call,
1335           (ReuseReg): perform safety check earlier
1336         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1337             to work with flows at the beginning of a pBlock,
1338             fixes #1426557 (Symbol not previously defined),
1339           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1340             usage information
1341           (RemoveUnusedRegisters): update register usage info
1342         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1343             created, reuse existing ones instead
1344         * src/pic/gen.c (genPcall): fixed #1424719
1345
1346 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1347
1348         * link/z80/lkmain.c,
1349         * link/z80/lklex.c,
1350         * link/z80/lkdata.c,
1351         * link/z80/aslink.h: fixed build on current cygwin:
1352         replaced getline() by lk_getline()
1353
1354 2006-02-01 Borut Razem <borut.razem AT siol.net>
1355
1356         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
1357           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
1358           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
1359           src/regression/bool1.c, src/regression/bool2.c,
1360           src/regression/bool3.c, src/regression/call1.c,
1361           src/regression/compare.c, src/regression/compare10.c,
1362           src/regression/compare2.c, src/regression/compare3.c,
1363           src/regression/compare4.c, src/regression/compare5.c,
1364           src/regression/compare6.c, src/regression/compare7.c,
1365           src/regression/compare8.c, src/regression/compare9.c,
1366           src/regression/configword.c, src/regression/for.c,
1367           src/regression/inline.c, src/regression/mult1.c,
1368           src/regression/nestfor.c, src/regression/or1.c,
1369           src/regression/pointer1.c, src/regression/ptrfunc.c,
1370           src/regression/rotate1.c, src/regression/rotate2.c,
1371           src/regression/rotate3.c, src/regression/rotate4.c,
1372           src/regression/rotate5.c, src/regression/rotate6.c,
1373           src/regression/rotate7.c, src/regression/string1.c,
1374           src/regression/struct1.c, src/regression/sub.c,
1375           src/regression/sub2.c, src/regression/switch1.c,
1376           src/regression/while.c, src/regression/xor.c,
1377           src/regression/create_stc, src/regression/simulate,
1378           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
1379           regression tests
1380         * src/regression/gpsim_assert.h: added
1381
1382 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
1383
1384         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
1385         ((void (code *) (void)) 0) ();
1386         * as/hc08/aslex.c,
1387         * as/hc08/aslink.h,
1388         * as/hc08/asm.h,
1389         * as/hc08/asmain.c,
1390         * as/hc08/lkdata.c,
1391         * as/hc08/lklex.c,
1392         * as/hc08/lkmain.c,
1393         * as/mcs51/aslex.c,
1394         * as/mcs51/aslink.h,
1395         * as/mcs51/asm.h,
1396         * as/mcs51/asmain.c,
1397         * as/mcs51/lkdata.c,
1398         * as/mcs51/lklex.c,
1399         * as/mcs51/lkmain.c,
1400         * as/z80/aslex.c,
1401         * as/z80/asm.h,
1402         * as/z80/asmain.c: fixed build on current cygwin:
1403         replaced getline() by as_getline()
1404
1405 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
1406
1407         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
1408         declarator in the symbol chain
1409         * src/SDCCsymt.h,
1410         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
1411         parameter list for function pointers
1412         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
1413         * support/regression/tests/bug-716242.c: added
1414
1415 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
1416
1417         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
1418         offset if possible
1419         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
1420
1421 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
1422
1423         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
1424         inifinitely recurseable, added static
1425         * support/regression/tests/bug-1408066.c: added
1426
1427 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
1428
1429         * src/SDCCicode.h,
1430         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
1431         renamed, added possibility to create "postLoopLbl"-labels
1432         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
1433         newiTempLoopHeaderLabel
1434         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
1435         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
1436         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
1437         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
1438         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
1439         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
1440         (basicInduction): fixed bug #136564, made static,
1441         (loopInduction): changed parameter of basicInduction, made static,
1442         (addPostLoopBlock): added
1443         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
1444         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
1445         findLoopEndSeq
1446         * support/regression/tests/bug-136564.c: added
1447         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
1448         --std-sdcc99 to LIBSDCCFLAGS
1449
1450 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
1451
1452         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
1453         while loop
1454         * support/regression/tests/bug-1406131.c: added
1455
1456 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
1457
1458         * src/SDCCast.c (decorateType): fix promotion of unary minus
1459         * src/SDCCsymt.c (computeType): beautified
1460         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
1461         (valUnaryPM, valComplement): fix sign and promotion,
1462         (valNot): ANSI: result type is int (SDCC: unsigned char)
1463         * support/regression/tests/uminus.c: speedup by removing superflous
1464         test case 'int'
1465         * support/regression/tests/onebyte.c: added promotion and signedness
1466         tests for unary minus
1467         * support/regressions/tests/bug-477927.c: disable warning about
1468         uninitialized variables
1469         * support/regression/tests/not.c: added
1470
1471 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
1472
1473         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
1474         * src/mcs51/gen.c (gen51Code): show final register usage after
1475         fillGaps in asm with --i-code-in-asm
1476         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
1477         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
1478         incUsed, rliveClear, adjustIChain): made static,
1479         (setFromRange): excluded because it's unused,
1480         (findPrevUseSym, markWholeLoop): added,
1481         (findPrevUse): rewritten; fixes bug 895992; now a complete search
1482         through all branches of predecessors enables sdcc to emit the warning
1483         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
1484         (rlivePoint): made static, added parameter emitWarnings which is only
1485         true during the first run out of two,
1486         (findRecursiveSucc, findRecursivePred): removed,
1487         (computeLiveRanges): made static, added parameter emitWarnings,
1488         (dumpIcRlive): added for debugging only
1489         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
1490         removed prototype of setFromRange()
1491         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
1492         in call of computeLiveRanges()
1493         * support/regression/tests/bug-895992.c: added
1494         * support/regression/tests/bug-971834.c: added
1495         * support/valdiag/tests/bug-895992.c: added
1496         * support/valdiag/tests/bug-971834.c: added
1497
1498 2005-12-18 Raphael Neider <rneider AT web.de>
1499
1500         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
1501           (genUnpackBits): improved code for direct operands,
1502           (genPackBits): improved code for literal assignment to bitfields
1503             and for direct destination operands (no FSR indirection),
1504             prevented redundant AND, fixes #1362800,
1505           (AccLsh): added parameter to disable masking of the result
1506         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
1507           skip instructions with side-effects (like incfsz),
1508           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
1509         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
1510         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
1511           fixes #1375263
1512
1513 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
1514
1515         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
1516         volatile variables as spill location
1517
1518 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
1519
1520         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
1521         replacing literals
1522         * support/regression/tests/bug-1376320.c: added
1523
1524 2005-12-08 Raphael Neider <rneider AT web.de>
1525
1526         * src/pic/device.c: renamed is_shared to pic14_is_shared
1527         * src/pic/gen.c (genIfx): re-enabled handling of sbits
1528         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
1529           (is_valid_identifier): added for above workaround
1530
1531 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
1532
1533         * device/lib/Makefile.in: fixed to enable port-specific-objects
1534         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
1535           char, thanks Hubert Sack
1536         * doc/sdccman.lyx: documented --xstack-loc,
1537           elaborated a bit more on interrupts and pitfalls,
1538           removed "setjmp/longjmp unsupported",
1539           documented some unsupported C99 features
1540         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
1541         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
1542           if, thanks Hubert Sack
1543         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
1544         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
1545           make make_library
1546         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
1547           regression tests can report resource usage (rfe 700441)
1548         * support/regression/collate-results.py: report resource usage
1549         * support/regression/ports/ds390/spec.mk,
1550         * support/regression/ports/hc08/spec.mk,
1551         * support/regression/ports/mcs51/spec.mk,
1552         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
1553         * support/regression/ports/ds390/uCsim.cmd,
1554         * support/regression/ports/hc08/uCsim.cmd,
1555         * support/regression/ports/mcs51/uCsim.cmd,
1556         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
1557         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
1558           library, use the default one
1559         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
1560           building the library
1561
1562 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
1563
1564         * config.dsp: added dependency on .version and configure_vc.awk
1565         * device/include/setjmp.h: updated for --stack-auto and --xstack
1566         * device/include/mcs51/at89c51snd1c.h: corrected line endings
1567         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
1568         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
1569         * device/lib/libsdcc.lib: added _setjmp
1570         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
1571           (decorateType): fixed bug 1372851,
1572           (optimizeGetHbit): fixed warning
1573         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
1574           array initialisation
1575         * support/regression/tests/bug1057979.c: added test for bug 1358192
1576         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
1577
1578 2005-12-03 Borut Razem <borut.razem AT siol.net>
1579
1580         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
1581           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
1582
1583 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1584
1585         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
1586         createIval): implement symbol independant "flexible array member",
1587         (createIvalCharPtr): implemented flexible array initialisation with a
1588         string
1589         * src/SDCCsymt.c (copyStruct): removed,
1590         (getSize): fixed misleading comment,
1591         (getAllocSize): removed, the additional allocation size is now in
1592         sym->flexArrayLength,
1593         (checkStructFlexArray): new, syntax checks for flexible array members,
1594         (compStructSize): added syntax checks for "flexible array members"
1595         (copyStruct): removed,
1596         (copyLinkChain): removed inefficient fix for bug 770487
1597         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
1598         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
1599         symbol->flexArrayLength
1600         * src/SDCCerr.c,
1601         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
1602         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
1603         * support/regression/tests/structflexarray.c: added
1604         * support/valdiag/tests/structflexiblearray.c: added
1605
1606 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1607
1608         * src/SDCCast.c (decorateType): fixed bug 1368489
1609         * support/Util/SDCCerr.c,
1610         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
1611
1612 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1613
1614         * device/include/mcs51/at89c51snd1c.h: added file submitted by
1615           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
1616
1617 2005-11-27 Borut Razem <borut.razem AT siol.net>
1618
1619         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
1620           support/cpp2/mkdeps.h: added command line option
1621           -obj-ext=<extension> to SDCPP to define object file externion, used
1622           for generation of make dependencies (-M)
1623         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
1624
1625 2005-11-26 Borut Razem <borut.razem AT siol.net>
1626
1627         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
1628           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
1629           added pic and pic16 libraries
1630
1631 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1632
1633         * device/include/float.h: Corrected typo in prototype of __fsgt
1634
1635 2005-11-25 Borut Razem <borut.razem AT siol.net>
1636
1637         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
1638           added creation of model-mcs51-stack-auto libraries
1639
1640 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
1641
1642         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
1643         and fields-list too
1644         * src/SDCCast.c (createIvalArray): removed obsolete comment
1645
1646 2005-11-24 Borut Razem <borut.razem AT siol.net>
1647
1648         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
1649           added missing device/lib/mcs51/crt*.asm sources
1650
1651 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
1652
1653         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
1654
1655 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
1656
1657         * device/lib/_fs2schar.c,
1658         * device/lib/_fs2sint.c,
1659         * device/lib/_fs2slong.c: optimized inline asm
1660
1661 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1662
1663         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1664           Better handling of floats between -1.0 and 0.0.
1665
1666 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1667
1668         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
1669           (the missing "if"s prohibited removal of redundant labels)
1670
1671 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1672
1673         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1674           Properly convert floats between -1.0 and 0.0 to long, int, and char
1675           types (max integer value of negative floats tends to zero).
1676         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1677           Removed changes made so to work properly with floats between
1678           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
1679           and _fs2char.c
1680
1681 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1682
1683         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
1684         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
1685         (genCast) cosmetic change
1686         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
1687         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
1688         from mcs51
1689         * support/regression/tests/bitfields (testSignedBitfields): added
1690
1691 2005-11-18 Borut Razem <borut.razem AT siol.net>
1692
1693         * sdcc/device/lib/Makefile.in: remove all unnecessary files
1694         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
1695           introduced SILENT option to make building of pic16 libraries less
1696
1697 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1698
1699         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1700           Now they work properly with floats between -1.0 and 0.0
1701         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
1702
1703 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1704
1705         * src/SDCCicode.c (printOperand): added missing else
1706
1707 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1708
1709         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
1710         reformatted for better readability
1711         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
1712         signed bitfields
1713
1714 2005-11-17 Borut Razem <borut.razem AT siol.net>
1715
1716         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
1717           introduced SILENT option to make building of pic16 libraries less
1718           verbose - used for nightly snapshot build
1719         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
1720           available on Win32 platforms.
1721         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
1722           medium, large, pic and pic16
1723
1724 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1725
1726         * device/lib/printf_large.c: Temporary patch for bug 1358192:
1727           printf("%f"...) sets fraction to zero.
1728
1729 2005-11-16 Raphael Neider <rneider AT web.de>
1730
1731         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
1732           fixes #1357221
1733         * src/pic/gen.c (genIfx): implemented for CARRY bit
1734         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1735           to generic pointers, fixes #1357332,
1736           (pic16_movLit2f): NEW,
1737           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1738
1739 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1740
1741         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1742
1743 2005-11-11 Raphael Neider <rneider AT web.de>
1744
1745         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1746         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1747           compute pointer's type from operand,
1748           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1749           improved single bit reads, fixes bug #1353379
1750
1751 2005-11-09 Borut Razem <borut.razem AT siol.net>
1752
1753         * support/scripts/sdcc.nsi: added lib/pic to the package
1754
1755 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1756
1757         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1758
1759 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1760
1761         * support/regression/tests/bug1348008.c: added
1762         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1763         * support/regression/tests/bug1337835.c: updated comment
1764
1765 2005-11-06 Borut Razem <borut.razem AT siol.net>
1766
1767         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1768           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1769           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1770           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1771           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1772           dynamic construction of cl_error_class and derivates - 2.nd try
1773
1774 2005-11-05 Borut Razem <borut.razem AT siol.net>
1775
1776         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1777           bug, which caused Bus Errors on sparc solaris
1778
1779 2005-11-04 Borut Razem <borut.razem AT siol.net>
1780
1781         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1782           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1783           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1784           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1785           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1786           and derivates to resolve the initialization problem on OSX
1787
1788 2005-11-02 Borut Razem <borut.razem AT siol.net>
1789
1790         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1791           corrected typo - #include <winsock2.h>
1792
1793 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
1794
1795         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
1796           (_asxxxx_mapping): added org directive for future enhancements
1797
1798 2005-11-01 Borut Razem <borut.razem AT siol.net>
1799
1800         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1801           enabled sockets on WIN32
1802         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
1803
1804 2005-10-31 Borut Razem <borut.razem AT siol.net>
1805
1806         * support/regression/generate-cases.py: escape backslashes in {testcase}:
1807           WIN32 backslash path delimiters should be escaped when used in C strings
1808         * support/regression/tests/bitfields.c: exclude failing assertions for
1809           __CYGWIN32__ and __MINGW32__ hosts
1810
1811 2005-10-30 Borut Razem <borut.razem AT siol.net>
1812
1813         * src/SDCCutil.c: corrected double comparison typo
1814
1815 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
1816
1817         * device/lib/medium/Makefile: added for new memory model medium
1818         * device/include/asm/mcs51/features.h: updated for medium/pdata
1819         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
1820           added Multiply & Accumulate sbit's and MAC0_PAGE define
1821         * device/include/mcs51/c8051f300.h: added sfr16 definitions
1822         * device/include/mcs51/c8051f310.h: added sfr16 definitions
1823         * device/lib/_mullong.c: update for medium model
1824         * device/lib/incl.mk: added medium model
1825         * doc/sdccman.lyx: documented medium model
1826         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
1827         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1828         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1829         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1830           (allocParms): set SCLS and OCLS to pdata for medium model
1831         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1832           for pdata,
1833           (powof2): return <0 if not power of 2
1834         * src/avr/gen.c (genBitWise): use updated powof2
1835         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1836           (shiftR2Left2Result): small optimization in setup, save acc when storing,
1837           (shiftLLeftOrResult): use B if necessary
1838         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1839         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1840         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1841         * support/regression/Makefile.in: added test-mcs51-medium
1842         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1843
1844 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1845
1846         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1847         specifier unsigned
1848         * device/lib/time.c (mktime): fixed bug 1334315
1849
1850 2005-10-28 Raphael Neider <rneider AT web.de>
1851
1852         * device/include/pic/p16f_common.inc: added common declarations
1853         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1854
1855 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1856
1857         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1858           (aopPutUsesAcc): added to predict accumulator use,
1859           (assignResultValue): save acc if necessary,
1860           (genMinusDec): store result if indirectly addressed,
1861           (genDivOneByte):  save acc if necessary,
1862           (movLeft2Result): bugfix if left already in acc,
1863           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1864             attention to accumulator use (esp. pdata),
1865           (genReceive): receive pdata correctly
1866         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1867         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1868
1869 2005-10-27 Raphael Neider <rneider AT web.de>
1870
1871         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1872
1873 2005-10-27 Raphael Neider <rneider AT web.de>
1874
1875         * .version: changed version to 2.5.4
1876         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1877         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1878           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1879             arithmetics support routines
1880         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1881         * device/lib/Makefile.in: also create installdir for pic
1882
1883         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1884           pic14 port as well
1885         * src/pic/device.c (dump_sfr): rewritten to delegate register
1886           placement to the linker (use `extern sym' rather than sym EQU addr),
1887           (validAddress): fixed to check last specified address
1888         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1889           (popGetLit): truncate literal value to 8 bit,
1890           (popGet): moved assert to more appropriate place
1891           (popGetExternal): create pCode operand from and mark the according
1892             symbol as being `extern'
1893           (popGetAddr): added sanity check on immediate's offset, provide
1894             GPOINTER tag on demand
1895           (aopPut): fixed for immediates,
1896           (mov2w_op): move operand's address or contents to WREG (depending on
1897             operand type), safer variant of mov2w,
1898           (movwf,call_libraryfunc): NEW, handy abbreviations,
1899           (get_argument_pcop,get_return_val_pcop,pass_argument,
1900           get_returnvalue): interface for accessing function parameters and
1901             return values,
1902           (assignResultValuei,genRet): use new parameter/return value interface
1903           (pic14_getDataSize): back to old version handling generic pointers,
1904           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1905             provided implementation and/or fixed old one,
1906           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1907             calls, removed legacy 8051 reference code
1908           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1909           (loadSignToC): NEW, move the operands sign bit to CARRY,
1910           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1911             genRightShiftSigned, accepts negative shift counts,
1912           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1913           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1914             generic pointers, __data pointers and __code pointers,
1915           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1916             and signed bitfields, limit bitfields to 8 bit,
1917           (genDataPointerGet): fixed number of bytes read,
1918           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1919           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1920             pointers to constant data are no longer assumed to point to __code
1921             space, removed invalid pointer types,
1922           (bitpatternFromVal): retrieve the PICs representation of an integer
1923             or float literal,
1924           (genDataPointerSet): fixed assigning to po_immediate operands,
1925           (genGenPointerSet): implemented as library call,
1926           (genIfx): fixed incorrect condition,
1927           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1928             provide GPOINTER tag according to destination's storage class,
1929           (genCast): added code to handle casting to generic pointers, added
1930             sign-/zero extension of the result
1931           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1932         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1933         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1934           extend the result
1935         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1936           address/register resides in the shared banks
1937           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1938             put all variables into separate sections (have the linker arrange
1939             them)
1940           (picglue): put init code and interrupt handlers in separate sections
1941         * src/pic/main.c: added port specific options table, modified to PORT
1942           structure to make GPOINTERs 3 byte, added pic14_options
1943           (_pic14_do_link): private linking routine (update paths to libraries,
1944             add libsdcc.lib by default)
1945         * src/pic/main.h: declare pic14_options
1946         * src/pic/pcode.c: fixed instructions i/o relations,
1947           (RegCond): reverted to correct version,
1948           (newpCodeOpLit): truncate literals to 8 bit,
1949           (genericPrint): added debug output,
1950           (getRegFromInstruction): fixed for various operand types, simplified
1951           (BuildFlow): fixed broken handling of isntructions with labels
1952           (LinkFlow): start at last instruction in flow (skip trailing comments),
1953             pass the flow on to the next instruction after CALL
1954           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1955           (insertPCodeInstruction): fixed inserting after a skip instruction,
1956           (DoBankSelect): fixed for labeled instructions
1957           (OptimizepBlock): honor --nopeep switch
1958           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1959         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1960         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1961           (pCodeOptime2pCodes): allow disabling this optimization via
1962             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1963             but is still buggy), started implementation of a dataflow based
1964             pCode optimization (CSE + dead code elimination)
1965           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1966         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1967           names are independant of the stack location and therefore portable across
1968           devices
1969
1970 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1971
1972         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1973           (selectSpil): fixed bug 1337835 by not spilling bit variables
1974         * support/regression/tests/bug1337835.c: added test for this bug
1975         * src/mcs51/peeph.def: restart after rule 3.c,
1976           addded rules 263.x to optimize loading constants
1977
1978 2005-10-26 Raphael Neider <rneider AT web.de>
1979
1980         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1981         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1982           (genAssign): emit warning when casting literals to generic pointer
1983             type, also applies when taking the address of a fixed variable,
1984           (genCast): improved casting to generic pointers
1985         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1986           extern variables, added verbose error message
1987         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1988
1989 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1990
1991         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1992         carry must be complemented too
1993         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1994         could be emitted by genMinus
1995         * src/SDCCval.c (constVal): fixed bug 1305065
1996
1997 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1998
1999         * src/SDCCast.c (addCast): added promotion for bit variables
2000         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
2001         promotion casts + optimisation
2002         (optimizeGetWord): fix warning 'i' might be used uninitialized
2003         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
2004         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
2005
2006 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
2007
2008         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
2009         all chars are promoted to int; promotion should be handled in SDCCast.c
2010
2011 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2012
2013         * device/lib/_strcmp.c: Fixed bug 1326457
2014
2015 2005-10-11 Raphael Neider <rneider AT web.de>
2016
2017         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
2018         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
2019
2020 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2021
2022         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
2023         * support/regression/tests/sfr16.c: added test for the sfr32 bug
2024
2025 2005-10-04 Raphael Neider <rneider AT web.de>
2026
2027         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
2028           device/lib/pic16/pics.all: added pic18f1320
2029         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
2030
2031 2005-09-30 Raphael Neider <rneider AT web.de>
2032
2033         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
2034         * src/pic16/devices.inc: NEW, provides device descriptions
2035         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
2036
2037 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
2038
2039         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
2040           GETHBIT
2041
2042 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
2043
2044         * doc/sdccman.lyx: updated Highest Order Bit documentation,
2045           documented Any Order Bit, Higher Order Byte and Higher Order Word
2046         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
2047         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
2048           (optimizeGetAbit): new, to get any bit, not only the high bit,
2049           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
2050           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
2051           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
2052           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
2053             RIGHT_OP: also try GETBYTE, GETWORD optimization,
2054             GETABIT, GETBYTE, GETWORD: decorate them,
2055           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
2056           (ast_print): added GETABIT, GETBYTE, GETWORD
2057         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
2058         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
2059           (geniCodeBinary): new generic binary icode,
2060           (ast2iCode): added GETABIT, GETBYTE, GETWORD
2061         * src/port.h: updated comment for PORT.hasExtBitOp
2062         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
2063           (genGetByte): new, to get a single byte,
2064           (genGetWord): new, to get a word from a long,
2065           (gen51Code): added GETABIT, GETBYTE, GETWORD
2066         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
2067
2068 2005-09-23 Raphael Neider <rneider AT web.de>
2069
2070         * configure.in, configure: have device/lib/pic configured
2071         * device/lib/Makefile.in: added model-pic14
2072         * device/lib/clean.mk: added pic/ to clean rule
2073         * device/lib/pic: added rudimentary pic14 library providing support
2074           functions for multiplication/division/generic pointer access
2075         * src/SDCCopt.c (convilong): mark support functions as extern
2076           for pic14 port as well
2077         * src/pic/gen.c (genMult): added assertions,
2078           (genpic14Code): emit warning on unhandled iCodes
2079         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
2080         * src/pic/pcode.c (pCodeOpCopy),
2081         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
2082           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
2083           SFR_REGISTER}), made safe for future extensions
2084         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
2085           instructions even if preceeded by SKIP instructions (also remove
2086           them); removed unused code
2087         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
2088           prevents leaving parts of the structure uninitialized after copying
2089
2090 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
2091
2092         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
2093           ago by me
2094         * support/regression/tests/addsub.c: added test for the bug
2095
2096 2005-09-21 Raphael Neider <rneider AT web.de>
2097
2098         * device/include/pic16/pic18f1220.h,
2099           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
2100         * device/lib/pic16/Makefile.rules: added missing opening paren
2101         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
2102           are provided in genutils.c,
2103           (genUminusFloat,genUminus,genCmpEq): added asserts on different
2104           operand/result sizes,
2105           (genCmp): assert on NULL pointers first, then check deref'ed values
2106         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
2107           result size
2108
2109 2005-09-18 Raphael Neider <rneider AT web.de>
2110
2111         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
2112           as these are now unused,
2113           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
2114         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
2115           local, avoids uninitialized pointer dereference on r->name
2116         * src/pic16/ralloc.c (newReg): fixed indentation
2117
2118 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
2119
2120         * src/SDCCval.c (constVal): fixed bug 730366
2121         * support/Util/SDCCerr.c,
2122         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
2123
2124 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
2125
2126         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
2127
2128 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
2129
2130         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
2131
2132 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2133
2134         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
2135           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2136         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
2137           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2138         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
2139         * packihx/packihx.c (hexDigit): made c unsigned char
2140         * as/mcs51/lklibr.c (fndsym),
2141         * link/z80/lkgb.c (gb),
2142         * link/z80/lklibr.c (fndsym),
2143         * link/z80/lkrloc.c (relr),
2144         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
2145         * src/SDCC.lex (checkCurrFile, process_pragma),
2146         * src/SDCCglue.c (spacesToUnderscores),
2147         * src/SDCCmain.c (setParseWithComma, processFile),
2148         * src/asm.c (tvsprintf, printCLine),
2149         * src/avr/gen.c (emitcode, aopPut),
2150         * src/ds390/gen.c (emitcode),
2151         * src/hc08/gen.c (emitcode, emitinline),
2152         * src/mcs51/gen.c (emitcode, genInline),
2153         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2154           tokenizeLineNode),
2155         * src/pic/ralloc.c (debugLog),
2156         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2157           tokenizeLineNode),
2158         * src/pic16/ralloc.c (debugLog),
2159         * src/z80/main.c (_process_pragma):
2160            made all ctype.h function calls safe
2161         * src/SDCCopt.c: include math.h for fabs
2162         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
2163           and used them throughout the code to make ctype.h function calls safe
2164         * src/ds390/main.c (asmLineNodeFromLineNode),
2165         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
2166         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
2167            unsigned char*
2168         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
2169           (newpCodeAsmDir): made ctype.h function calls safe
2170         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
2171           pic16_emitcode):  made lbp unsigned char*
2172         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
2173           (pic16_newpCodeAsmDir): made ctype.h function calls safe
2174         * src/xa51/gen.c (emitcode),
2175         * src/z80/gen.c (_emit2): made lbp unsigned char*
2176         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
2177            char*
2178
2179 2005-09-05 Raphael Neider <rneider AT web.de>
2180
2181         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
2182           access bank splitpoint
2183
2184 2005-09-05 Raphael Neider <rneider AT web.de>
2185
2186         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
2187
2188 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
2189
2190         * .version: changed to version 2.5.3
2191         * doc/sdccman.lyx: changed version to 2.5.3,
2192           documented --codeseg and --constseg and pragma codeseg and constseg,
2193           documented bit parameters (reentrant) and bit returning
2194         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
2195            currFunc->recvSize, but is this ok for all ports?
2196           (ast2iCode): result of ~ on unsigned char must be cast to int for
2197            bool to work
2198         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
2199           function pointers in bit space
2200         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
2201           (processFuncArgs): call port.reg_parm() with reentrancy info
2202         * src/port.h,
2203         * src/avr/main.c,
2204         * src/ds390/main.c,
2205         * src/hc08/main.c,
2206         * src/pic/main.c,
2207         * src/pic16/main.c,
2208         * src/xa51/main.c,
2209         * src/z80/main.c: port.reg_parm prototype extended with
2210           "bool reentrant" parameter
2211         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
2212           options.stackAuto for allocating bit register parameters
2213         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
2214           (genSend): set BitBankUsed if it is,
2215           (selectRegBank): factored out of genCall for use in genPcall,
2216           (genCall): removed redundant dtype assignmen, use selectRegBank,
2217           (genPcall): handle returning in Carry properly, save in F0 if needed,
2218           (genReceive): handle bit register parameters
2219         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
2220           (mcs51_assignRegisters): enable bit registers for all reentrant
2221            functions and don't set BitBankUsed unconditionally
2222         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
2223         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
2224         * support/regression/tests/funptrs.c: added tests for BOOL and for return
2225
2226 2005-08-27 Borut Razem <borut.razem AT siol.net>
2227
2228         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
2229         ppc-osx (Darwin) does not support -u option. It seems that it is
2230         supported only on Linux - GNU cp
2231
2232 2005-08-25 Borut Razem <borut.razem AT siol.net>
2233
2234         * sim/ucsim/gui.src/serio.src/Makefile.in,
2235           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
2236           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2237           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
2238           install and strip, since the strip at /usr/ccs/bin should be used
2239           on solaris
2240
2241 2005-08-24 Borut Razem <borut.razem AT siol.net>
2242
2243         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
2244
2245 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
2246
2247         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
2248         ffffffffu
2249
2250 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
2251
2252         * as/mcs51/aslink.h: completed lkrloc.c prototypes
2253         * as/mcs51/lkmain.c (link_main): fixed warning
2254         * device/include/stdbool.h: ds390 has no advanced bit support yet
2255         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
2256         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
2257         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
2258           and updated their macros
2259         * src/SDCCval.c (constVal): updated comment for renamed b_long
2260
2261 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
2262
2263         * as/mcs51/asdata.c: changed ctype['['] to BINOP
2264         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
2265           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
2266           (oprio): set priority for '['
2267         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
2268            and adb_24_bit
2269         * as/mcs51/asm.h: added defines R_BIT and S_BIT
2270         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
2271         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
2272         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
2273           added overlayable BIT_BANK area
2274         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
2275           (summary2): explain 'T' in legenda
2276         * as/mcs51/lkrloc.c: replaced old K&R style,
2277           (relr): added R_BIT processing,
2278           (errmsg): added "Bit-addressable relocation error",
2279           (adb_bit): added for converting from byte- to bit-addressable space,
2280           (adb_24_bit): added for converting from byte- to bit-addressable space
2281         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
2282            used in reentrant functions now even as return value
2283         * device/lib/_gptrput.c (_gptrput): removed obsolete code
2284         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
2285           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
2286         * src/SDCCglobl.h: added indicator BitBankUsed
2287         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
2288            the bit registers b0-b7
2289         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
2290           (geniCodeCast): fixed bug 1263853,
2291           (geniCodeLogicAndOr): put result in bool or char,
2292           (geniCodeReceive): added parameter func for accessing the return type,
2293           (geniCodeFunctionBody): pass func to geniCodeReceive
2294         * src/SDCCmain.c: added indicator BitBankUsed
2295         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
2296         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
2297           (checkSClass): don't put automatic bool/bit on stack,
2298           (checkFunction): removed check on function cannot return bit
2299         * src/SDCCsymt.h: added newBoolLink prototype
2300         * src/mcs51/gen.c (rb1regs): added bit registers,
2301           (movc): created for assigning to carry,
2302           (pushReg, popReg): created for pushing registers,
2303           (sameRegs): check both AOP_REG and AOP_CRY types,
2304           (aopOp): handle bit registers,
2305           (aopPut): optimization no self-assign,
2306           (saveRegisters): push reg->base (bits) only once for bit registers,
2307            and use pushReg,
2308           (unsaveRegisters): pop reg->base only once and use popReg,
2309           (assignResultValue): added parameter func and return in carry for bits,
2310           (genIpush): optimization no reload in A if not changed,
2311           (genSend): bit parameters in reentrant functions are passed in bit
2312            registers by first assigning to bits in B, then save registers and
2313            copy B to bits,
2314           (genCall): handle returning in Carry properly, save it in F0 if needed,
2315           (genPcall): updated assignResultValue call, this is not safe yet for bit
2316            returning function !!!
2317           (genFunction): don't generate equ's for bit registers and use pushReg,
2318           (genEndFunction): take care of bit returning functions and use popReg,
2319           (genRet): return bit in Carry,
2320           (genIfx): optimize bit registers and other directly addressable bits,
2321           (genReceive): updated assignResultValue call
2322         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2323           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2324            registers when using stack-auto
2325         * src/mcs51/ralloc.c (_G): added allBitregs,
2326           (regs8051): added the bit registers,
2327           (createStackSpil): use macro IS_BIT,
2328           (getRegBit): added to allocate a bit register, else spill,
2329           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2330           (updateRegUsage): factored out to ease stepping while debugging,
2331           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2332            also allocate bit registers,
2333           (fillGaps): handle bit registers,
2334           (findAllBitregs): added to create bit vector with all bit registers,
2335           (mcs51_allBitregs): returns this bit vector,
2336           (mcs51_assignRegisters): when using stack-auto use bit registers for
2337            passing parameters and creating local variables
2338         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2339
2340 2005-08-22 Borut Razem <borut.razem AT siol.net>
2341
2342         * device/lib/Makefile.in: replaced find option -or with -o
2343           to make it run on solaris
2344
2345 2005-08-22 Raphael Neider <rneider AT web.de>
2346
2347         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
2348           fixes #1265442 (crash on Solaris)
2349
2350 2005-08-20 Borut Razem <borut.razem AT siol.net>
2351
2352         * configure, configure.in: added tests for libsocket and libnsl libraries,
2353           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
2354           from support/regression/Makefile.in
2355         * support/regression/Makefile.in: added
2356         * device/lib/pic16/Makefile.common.in: force make to use bash shell
2357         * sim/ucsim/libtool: regenerated on sparc-solaris
2358         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2359           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
2360           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
2361           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
2362           sparc-solaris, which doesn't use GNU ld linker
2363         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
2364         * as/Makefile: find on sparc-solaris does not support -maxdepth option
2365
2366 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
2367
2368         * src/mcs51/peeph.def: updated comments
2369
2370 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2371
2372         * device/lib/_gptrget.c,
2373         * device/lib/_gptrput.c: slightly shorter
2374         * doc/sdccman.lyx: incremented version
2375         * src/mcs51/peeph.def: moved peephole comments to the line of first
2376           change to better keep line correlation, reanimated 186.e
2377         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
2378
2379 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2380
2381         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
2382           David Saxton with quotes around file name.
2383
2384 2005-08-15 Borut Razem <borut.razem AT siol.net>
2385
2386         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
2387           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
2388           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
2389           make tests run on x86_64 platform
2390
2391 2005-08-13 Raphael Neider <rneider AT web.de>
2392
2393         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
2394           as it might be executed DURING a build (parallel make is wonderful)
2395
2396 2005-08-13 Raphael Neider <rneider AT web.de>
2397
2398         * device/lib/Makefile.in (port-specific-objects-pic16):
2399           revert to cp $(PORT)/bin/*.* $(PORTDIR)
2400         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
2401           dependency
2402         * device/lib/pic16/Makefile.rules: build subdirs before creating
2403           the library, removed builddir rule, create $(builddir) early in
2404           recurse rule, use empty recurse rule for leaf directories
2405         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
2406           mkdir errors (race condition), removed duplicate suffix "hex"
2407           from clean rules
2408         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
2409         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
2410           prevents mkdir -p from aborting on Alpha
2411
2412 2005-08-12 Raphael Neider <rneider AT web.de>
2413
2414         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
2415           db-statements in order to allow for arrays of pointers in code
2416           sections to be placed without interspersed 0-padding, fixes
2417           bug #1256215
2418         * (emitStatistics): fixed division by zero for pic18f1220
2419         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
2420           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
2421         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
2422         * (pic16_pCodeConstString): keep track of already emitted string
2423           literals to prevent "duplicate definitions of symbol _str_NR"
2424         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
2425           debug message
2426         * device/lib/Makefile.in: ignore failing PIC16 library builds
2427         * device/lib/pic16/Makefile: do not build if gputils are missing
2428         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
2429
2430 2005-08-10 Raphael Neider <rneider AT web.de>
2431
2432         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
2433           my last commit)
2434
2435 2005-08-10 Raphael Neider <rneider AT web.de>
2436
2437         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
2438           Rokas' patch to add the new fixed point type "__fixed16x16"
2439         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
2440           functions for __fixed16x16 arithmetics
2441         * device/lib/pic16: reimplemented the build system to support
2442           a separate build directory, better handling of libio (create
2443           the library in a separate subdir for each architecture) and
2444           easier configuration (centralized in Makefile.common)
2445
2446 2005-08-07 Raphael Neider <rneider AT web.de>
2447
2448         * src/pic16/gen.c (genrshTwo): fixed sign extension
2449         * src/pic16/device.c: added pic18f2320, 4220 and 4320
2450         * device/include/pic16/pic18f2220.h: changed some bit definitions,
2451           added T0CONbits
2452         * device/include/pic16/pic18f4220.h: NEW, header for
2453           pic18f4220 and pic18f4320
2454         * device/include/pic16/pic18fregs.h: added new devices,
2455           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
2456         * device/include/pic16/signal.h: resolved name clashes
2457           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
2458           to also allow testing for interrupt enable bits, added
2459           comments on how to use the macros
2460         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
2461         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
2462           register definitions for the devices
2463         * device/lib/pic16/pics.all: added new devices
2464         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
2465           allocated memory
2466         * device/lib/pic16/libc/stdlib/memfree: do not count
2467           the block header as free memory
2468         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
2469           simplified and added missing end-of-blocklist-marker
2470           (reported by Peter Onion, fixes #1252814)
2471         * (_mergeHeapBlock): fixed loop condition
2472         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
2473           len==0, restructured code
2474         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
2475           up a bit, reduced bitfield accesses, prevent endless loops
2476           in case of heap corruption
2477         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
2478           "unreferenced arguments/must return a value" warnings
2479         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
2480           replaced BAUDREG with SPBRG
2481         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
2482           device/lib/pic16/debug/gstack/gstack.c: replaced
2483           _naked, _asm, _endasm with __naked, __asm, __endasm
2484
2485 2005-08-05 Raphael Neider <rneider AT web.de>
2486
2487         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
2488           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
2489
2490 2005-08-05 Borut Razem <borut.razem AT siol.net>
2491
2492         * device/lib/Makefile.in: added missing ';'
2493         * configure: removed ^M characters
2494
2495 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2496
2497         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
2498           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
2499           License
2500
2501 2005-08-04 Borut Razem <borut.razem AT siol.net>
2502
2503         * configure.in: pic16 libraries build 2nd try - enable running
2504           configure in device/lib/pic16
2505         * configure: regenerated from configure.in
2506         * device/lib/Makefile.in: create $(PORT)/bin directory
2507
2508 2005-08-03 Raphael Neider <rneider AT web.de>
2509
2510         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
2511           to get/set values via pointers
2512         * (genUnpackBits,genPackBits): changed detection of
2513           ptr->bitfield vs. sym.bitfield, fixed access via generic
2514           pointers, removed dead (wrong) code for multibyte bitfields
2515         * (genNearPointerGet, genGenPointerGet): removed useless code,
2516           fixed bitfield detection, fixes #1250594
2517         * (genNearPointerSet): removed useless code
2518         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
2519           and introduced macro pic16_emitpcode that conditionally emits
2520           the origin of the following pCode (useful for debugging SDCC)
2521         * src/pic16/pcode.c: changed (and disabled) some debug outputs
2522         * (createDefmap): fixed handling of LFSR for --optimize-df
2523
2524 2005-08-02 Borut Razem <borut.razem AT siol.net>
2525
2526         * device/lib/Makefile.in: pic16 libraries build enabled since
2527           gputils-0.13.2 are now localy installed at sourceforge's compile farm
2528
2529 2005-08-02 Raphael Neider <rneider AT web.de>
2530
2531         * src/pic16/gen.c (genPackBits): removed deprecated warning
2532         * (genGenPointerSet): fixed bitfield detection
2533
2534 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2535
2536         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
2537
2538 2005-07-31 Raphael Neider <rneider AT web.de>
2539
2540         * device/lib/pic16/libdev/pic18f458.c,
2541           device/include/pic16/pic18f458.h: added missing T0CONbits
2542
2543 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2544
2545         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
2546
2547 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
2548
2549         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
2550
2551 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2552
2553         * device/include/mcs51/at89c51ed2.h: added.
2554
2555 2005-07-23 Raphael Neider <rneider AT web.de>
2556
2557         * src/pic/gen.h: added emitpcode macro for debugging
2558         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
2559           and replace by macro adding debug information on demand
2560         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
2561         * (gencjne): tried to fix; replaced with correct (slower) code
2562         * (gen{Unp,P}ackBits): fixed single bit access
2563         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
2564         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
2565           previous instruction
2566         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
2567           register has to be handled with care (forbidding movement
2568           of assignments/uses, removing assignments completely, ...)
2569         * (pCodeOptime2pCodes): make use of regIsSpecial
2570         * added lots of debugging output (commented out)
2571         * src/pic/rallloc.c (deassignLRs): prevent operand registers
2572           from being reused as result UNLESS it is known to work
2573
2574 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
2575
2576         * support/Util/dbuf.h: include <stddef.h> for size_t
2577         * .version: changed to version 2.5.2
2578
2579 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2580
2581         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
2582
2583 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2584
2585         * src/hc08/gen.c (genMinus): fixed bug #1241835,
2586           (genModOneByte): removed needless psha/pula
2587
2588 2005-07-22 Raphael Neider <rneider AT web.de>
2589
2590         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
2591           have PIC14 handled like PIC16, fixes broken pic14 linker calls
2592         * src/pic/gen.c (resolveIfx): do not "invent" labels
2593         * (genSkipc): changed to positive logic
2594         * (genSkipCond): removed as no longer needed
2595         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
2596           backport from PIC16
2597         * (genLeftShift): check operands are in different registers
2598         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
2599           INCF does not update CARRY...
2600         * src/pic/main.c: fixed _linkCmd
2601         * src/pic/pcode.c (unlinkpCode): added inactive code
2602         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
2603           alive (do not assign result and operand overlapping registers)
2604
2605 2005-07-22 Raphael Neider <rneider AT web.de>
2606
2607         * src/pic/device.c (dump_sfr): replaced register declaration with
2608           call to emitSymbolToFile() to avoid duplicate symbols
2609         * (assignRelocatableRegisters): do not declare external symbols
2610         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
2611           right (take size of type, not etype)
2612         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
2613         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
2614         * (packRegsForAccUse): disabled assignment of WREG as
2615           the result reg to prevent occurence of just fixed #1235003,
2616           fixes #1242954
2617         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
2618           symbols (avoids duplicate symbols in .asm file)
2619         * (pic14emitRegularMap): use emitSymbolToFile()
2620         * src/pic/gen.c (aopOp): fixed spillLocation handling
2621         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
2622         * (genDataPointerSet): removed unneccessary variables/output
2623
2624 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
2625
2626         * as/mcs51/lkarea.c: enlarged codemap for banked memory
2627         * device/lib/mcs51/crtbank.asm: added # to 0x0F
2628
2629 2005-07-21 Raphael Neider <rneider AT web.de>
2630
2631         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
2632           architecture cannot handle them efficiently, fixes bug #1235003
2633         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
2634           check for empty sets before using them (fixes bug #1232190)
2635
2636 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
2637
2638         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
2639           (lnksect2): generate warnings for memory overlap
2640         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
2641           constseg to set the name of these segments so you can instruct the linker
2642           to place them in banks
2643         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
2644         * src/SDCCglobl.h: added MODEL_HUGE to enum,
2645           added code_seg and const_seg to options
2646         * src/SDCCglue.c (emitMaps): use options.const_seg,
2647           (createInterruptVect): put interrupt vectors in segment HOME,
2648           (glue): put HOME before static segment and put the main glue in HOME,
2649           (glue): use options.code_seg
2650         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
2651         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
2652           these segments so you can instruct the linker to place them in banks
2653           (linkEdit): use code_loc for HOME segment which should be the first
2654           segment in code memory now
2655         * src/SDCCmem.c: fixed more stuff like bug 1238386
2656         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
2657           (changePointer): don't change function pointers to code pointers for
2658           banked functions,
2659           (compareType): added exceptional check for banked function pointers
2660         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
2661         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
2662           after static in code memory
2663         * src/mcs51/gen.c: added aopLiteralLong prototype,
2664           (aopForSym): use getSize for functions,
2665           (genCall): generate banked calls over one trampoline __sdcc_banked_call
2666           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
2667           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
2668           the segment,
2669           (genPcall): use call for literal function pointers and generate banked
2670           calls over the one trampoline so there's only one place for the user to
2671           modify according to his/hers hardware,
2672           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
2673           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
2674         * src/mcs51/main.c: added keyword banked,
2675           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
2676         * support/Util/SDCCerr.c,
2677         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
2678           needed for passing the bank and address to the trampoline
2679         * device/lib/mcs51/crtbank.asm: added for bankswitching
2680         * device/lib/mcs51/Makefile: added crtbank
2681
2682 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2683
2684         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
2685           for fields at offset 0 of a struct or union as reported
2686           on 2005-07-07 in the developer mailing list.
2687
2688 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
2689
2690         * src/SDCCmem.c: fixed bug 1238386
2691
2692 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2693
2694         * src/mcs51/peeph.def: added labelrefcounting for peepholes
2695           (patch #1144962), added peephole 300, enabled 259.x
2696         * doc/sdccman.lyx: removed screenshot and provided link instead
2697
2698 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2699
2700         * doc/sdccman.lyx: added section about debugging with ddd
2701         * doc/figures/ddd_example.eps: screenshot of debugging session
2702
2703 2005-07-04 Raphael Neider <rneider AT web.de>
2704
2705         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
2706           like CODE pointers, fixes #1115683
2707         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
2708           call, fixes bugs #1232211, #1228110,
2709           fixed wrong casts to pCodeFlow from pCodeInstructions
2710
2711 2005-07-04 Raphael Neider <rneider AT web.de>
2712
2713         * src/pic/gen.c (popGet): changed assert to allow for
2714           bit operands
2715         * (popGetAddr): changed signature to provide
2716           an additional index, patched all call sites
2717         * (genCmpEq): handle literal-like operands correctly
2718         * (genAddrOf): added sanity checks on __code/__data pointers
2719         * (genAssign): added handling of symbols from __code section
2720         * (gencjne): do not generate code for comparisons whose result
2721           is neither stored nor used, fixes bug #1171114
2722         * (AccLsh, AccRsh): operate on operand instead of WREG
2723         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
2724           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
2725           by known count
2726         * rewrote complete shift-by-literal logic, commented unused
2727           functions out
2728         * (genConstPointerGet): get multiple bytes (if result size > 1),
2729           fixed handling of non-immediate addresses
2730         * (genPointerGet): handle CODE pointers like CONST pointers
2731         * (genpic14Code): insert C-SRC lines as Cource-pCodes
2732         * ({aop,op}_isLitLike): NEW, single place to decide whether an
2733           operand is to be treated as a literal or not
2734         * (mov2w,genPcall,genCmpEq),
2735           src/pic/genarith.c: use aop_isLitLike() to decide between
2736           literal/register contents
2737         * (addSign): added missing offset
2738         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2739           only emit comment in debug-mode,
2740           use {aop,op}_isLitLike throughout the file
2741         * src/pic/glue.c: fix initializers for pointers (work in progress)
2742         * src/pic/pcode.c (get_op): honor index on _const symbols
2743         * ({reset,dump}pCodeStatistics): NEW, estimate code size
2744         * (dumppBlock): added pCode size estimation
2745         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2746           check for IS_SYMOP before OP_SYMBOL'ing
2747         * fixed indentation, compacted switch-statements
2748         * (allocReg): find free register and allocate it instead of
2749           allocating new registers all the time
2750         * (deassignLRs): prevent POINTER_GET's from being assigned the same
2751           registers as its operands (necessary only for multibyte GETs)
2752
2753 2005-07-01 Raphael Neider <rneider AT web.de>
2754
2755         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2756           debugging .asm-output macros FENTRY + FEXIT
2757         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2758           way... I wonder...
2759         * (emitpComment): NEW, printf to pCode
2760         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2761           offset handling
2762         * (popGetAddr): NEW, variant of popGet to access an immediates
2763           high(er) bytes instead of the n'th byte of memory they reference,
2764           replaced popGet with popGetAddr where neccessary
2765         * (genDataPointerGet): reactivated and fixed implementation
2766         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2767           accesses
2768         * (genDataPointerSet): fixed multibyte assignments
2769         * (genpic14Code): fixed --i-code-in-asm handling
2770         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2771         * (genPlus): fixed index-out-of-bounds error
2772         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2773         * src/pic/ralloc.c: added debugging output macro FENTRY2
2774         * (spillThis): fixed indentation, enbraced for-body for clarity
2775         * (rematStr): commented out as now unused
2776         * (regTypeNum): commented out special spill case (overwrites
2777           arbitrary values)
2778         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2779
2780 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2781
2782         * doc/sdccman.lyx: documented sfr16/sfr32,
2783           added example for using storage class with function pointers
2784         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2785
2786 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2787
2788         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
2789         * device/lib/_itoa.c,
2790         * device/lib/_ltoa.c: optimized codesize
2791         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
2792           but don't know how to suppress the double warning.
2793         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
2794         * support/Util/SDCCerr.c,
2795         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
2796
2797 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
2798
2799         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
2800           fixed old K&R prototypes
2801         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
2802         * device/lib/_gptrget.c,
2803         * device/lib/_gptrgetc.c,
2804         * device/lib/_gptrput.c: changed versions for new memory indicator values,
2805           also new versions for small generic pointers and banked generic pointers
2806         * src/port.h: added const_name
2807         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
2808         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
2809         * src/SDCCcse.c (findPrevIc): check all associative operators
2810         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
2811         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
2812         * src/SDCCmem.c: updated comments,
2813           set far-space to 0 for pdata, results in optimized code
2814         * src/SDCCmem.h: added macro CONST_NAME
2815         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
2816           moving the info into the highest bits, see also gptrget/gptrput
2817         * src/src.dsp: added sdcc.ico to project files
2818         * src/avr/gen.c (genCast): fixed bug 0x%d
2819         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
2820         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
2821           relation between ptr_type and DCL_TYPE,
2822           (genCast): fixed bug 0x%d
2823         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
2824           (CODE)" for const_name
2825         * src/hc08/gen.c (genCast): fixed bug 0x%d
2826         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
2827           (hc08_port): added "CONST (CODE)" for const_name
2828         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2829           (aopForRemat, adjustArithmeticResult): disconnected direct relation
2830           between ptr_type and DCL_TYPE,
2831           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2832           operand* and took AOP() inside function so sfr-ness can be checked,
2833           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2834           new prototype,
2835           (genFunction, genEndFunction): optimized stack setup,
2836           (genMinus): optimized for literals with ending zeroes (in bytes),
2837           (genCast): fixed bug 0x%d
2838         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2839           (mcs51_port): added "CONST (CODE)" for const_name
2840         * src/mcs51/peeph.def: made rule 226 more generic
2841         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2842         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2843         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2844         * src/z80/main.c (z80_port): added NULL for const_name,
2845           (gbz80_port): added NULL for const_name
2846         * support/regression/tests/bug663539.c,
2847         * support/regression/tests/sfr16.c: new tests
2848
2849 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2850
2851         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2852
2853 2005-06-24 Raphael Neider <rneider AT web.de>
2854
2855         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2856           corrected typos...
2857         * device/include/pic16/signal.h: added USBIF
2858           and SIG_USB
2859
2860 2005-06-24 Raphael Neider <rneider AT web.de>
2861
2862         * device/lib/pic16/libdev/pic18f2455.c,
2863           device/include/pic16/pic18f2455.h: NEW
2864         * device/include/pic16/pic18fregs.h,
2865           device/lib/pic16/pics.all,
2866           src/pic16/device.c: added 18f2455
2867         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2868           device/include/pic16/{pic18f[68][567].h,usart.h}:
2869           replaced MULTIPLE_USARTS define with more relaible
2870           compatibility sfrs (for USART access)
2871
2872 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2873
2874         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2875           and the output asm file line is printed on two lines.
2876
2877 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2878
2879         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2880           BGT, BLE, BHI, and BLS instructions
2881         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2882           genCmpEq): removed
2883         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2884           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2885           fixes bug #1216342
2886         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2887
2888 2005-06-15 Raphael Neider <rneider AT web.de>
2889
2890         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2891         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2892         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2893           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2894           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2895
2896 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2897
2898         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2899           Marcel Telka in bug #1215704
2900
2901 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2902
2903         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2904           located in shared memory bank.
2905
2906 2005-05-31 Raphael Neider <rneider AT web.de>
2907
2908         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2909           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2910           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2911
2912 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2913
2914         * device/lib/_strncpy.c: fixed the fix
2915
2916 2005-05-26 Raphael Neider <rneider AT web.de>
2917
2918         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2919           initializers with \0, bug #1208187
2920         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2921           intializers with \0, bug #1208187
2922
2923 2005-05-26 Raphael Neider <rneider AT web.de>
2924
2925         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2926           initializers with \0, bug #1208187
2927         * src/pic16/main.c (_process_pragma): added sanity checks
2928           for stack position and size, emit warnings when appropriate
2929
2930 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2931
2932         * device/lib/_strncpy.c: fixed not filling with \0
2933
2934 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2935
2936         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2937           createFunction),
2938         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2939           compound_statement),
2940         * src/SDCCsymt.h,
2941         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2942
2943 2005-05-24 Raphael Neider <rneider AT web.de>
2944
2945         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2946
2947 2005-05-24 Raphael Neider <rneider AT web.de>
2948
2949         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2950           TRISE definitions, closes bug #1162453
2951
2952 2005-05-22 Raphael Neider <rneider AT web.de>
2953
2954         * src/pic16/main.c (_process_pragma): check for missing
2955           arguments to pragmas code and udata
2956         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2957           consistency fixes to match other headers (thanks to Jim Paris)
2958         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2959
2960 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2961
2962         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2963
2964 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2965
2966         * support/regression/tests/bug1198642.c: new test
2967         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2968         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2969         * support/scripts/resource.h,
2970         * support/scripts/resource.rc,
2971         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2972         * support/scripts/sdcc.ico: added 32x32 icon
2973
2974 2005-05-18 Raphael Neider <rneider AT web.de>
2975
2976         * device/lib/pic16/libdev/pic18f*.c,
2977         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2978           keywords to "__sfr" and "__at (X)"
2979         * device/include/pic16/pic18fregs.h: added pic18f4520
2980         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2981           #1203088 (MPLAB compatibility)
2982
2983 2005-05-17 Raphael Neider <rneider AT web.de>
2984
2985         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2986         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2987         * device/lib/pic16/pics.all: added new devices
2988         * src/pic16/device.c: added support for pic18f4520
2989
2990 2005-05-16 Raphael Neider <rneider AT web.de>
2991         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2992         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2993         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2994           convenience function for bit access
2995
2996 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2997
2998         * device/lib/printf_large.c: fixed bug 1193299
2999         * support/regression/tests/bug1057979.c: added test %3.3s
3000
3001 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3002
3003         * device/include/mcs51/8051.h,
3004         * device/include/mcs51/8052.h: made parseable with lint
3005         * device/include/mcs51/lint.h: added include file for (sp)lint
3006         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
3007         * doc/cdbfileformat.lyx,
3008         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
3009
3010 2005-05-14 Raphael Neider <rneider AT web.de>
3011
3012         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
3013         * device/lib/pic16/libc/stdlib/itoa.c (new)
3014         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
3015         * device/lib/pic16/libio/Makefile: exclude subdir according to
3016           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
3017         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
3018         * src/pic16/gen.c (genFunction): prevent annoying warning
3019         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
3020           nameclashes on BeOS
3021         * support/cpp2/cppmain.c (cpp_output_string): new
3022         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
3023           fixes bug 1116802
3024
3025 2005-05-13 Borut Razem <borut.razem AT siol.net>
3026
3027         * src/SDCCmain.c (linkEdit): fixed bug 1195202
3028
3029 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3030
3031         * .version: changed to version 2.5.1; back to bleeding edge development
3032
3033 2005-05-11 Borut Razem <borut.razem AT siol.net>
3034
3035         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
3036           generate PDF version 1.3 documents
3037
3038 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3039
3040         * .version: changed to version 2.5.0
3041
3042 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3043
3044         * doc/sdccman.lyx: updated weblinks, index and smaller updates
3045
3046 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3047
3048         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
3049         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
3050         well as many smaller updates.
3051         * .version: changed to version 2.5.0-pre1
3052
3053 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3054
3055         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
3056
3057 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
3058
3059         * support/regression/tests/bug1185672.c: added
3060         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
3061           bug 1185672
3062         * src/mcs51/gen.c (genCall): added comments, made it look safer
3063         * src/mcs51/gen.c (genEndFunction): simplified
3064
3065 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
3066
3067         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
3068
3069 2005-04-14 Borut Razem <borut.razem AT siol.net>
3070
3071         * fixed bug 1045046 - SIGSEGV with really simple code?:
3072           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
3073           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
3074
3075 2005-04-14 Borut Razem <borut.razem AT siol.net>
3076
3077         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
3078           src/pic16/device.h: temporarily disabled experimental #inline pragma
3079           for 2.5.0 release
3080
3081 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
3082
3083         * device/include/z80/stdio.h,
3084         * device/include/z80/string.h: removed these highly incomplete files so
3085           SDCC can use the default ones in device/include/
3086
3087 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3088
3089         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
3090         gcc warning.
3091         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
3092         fix sdcpp warnings.
3093
3094 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3095
3096         * device/include/malloc.h: removed redundant __reentrant prototypes
3097         * device/lib/_mullong.c: added working xstack variant in asm (C version
3098           doesn't pass regression tests)
3099         * device/lib/bpx.c: used __data and made bpx char for mcs51
3100         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
3101           (createFunction): fixed bug with xstackPtr
3102         * src/SDCCcse.c: corrected comments
3103         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
3104           (killDeadCode, eBBlockFromiCode): removed unused code
3105         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
3106           corrected comments
3107         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
3108           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
3109           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
3110           (genModOneByte): fixed warning in MSVC
3111         * src/mcs51/main.c (): added comments
3112         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
3113
3114 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3115
3116         * src/SDCCmain.c (linkEdit): oops, changed one line too many
3117
3118 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
3119
3120         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
3121
3122 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
3123
3124         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
3125         characters arrays of larger size than the declared one.
3126
3127 2005-04-10 Borut Razem <borut.razem AT siol.net>
3128
3129         * src/pic/gen.c (genInline),
3130           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
3131           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
3132           (findNextInstruction), (findPrevInstruction),
3133           (findInstructionUsingLabel),
3134           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
3135         * src/pic/pcode.c (findLabel): added missing '\n'
3136         * src/src.dsp: added SDCCdwarf2.c to the project
3137
3138 2005-04-09 Borut Razem <borut.razem AT siol.net>
3139
3140         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
3141
3142 2005-04-08 Raphael Neider <rneider AT web.de>
3143
3144         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
3145           into the chain after a given one) and mergeDefmapSymbols (combine
3146           defmap entries for each symbol per pcode)
3147         * (createDefmap): have defmap entries merged in the end
3148         * (defmapReplaceSymRef): split defmap entries covering two accesses to
3149           a symbol before replacing one access type's symbol, merge symbols in
3150           the end (replacement symbol might already have an entry)
3151         * (assignValnums): keep reference to written WREG intact
3152
3153 2005-04-08 Raphael Neider <rneider AT web.de>
3154
3155         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
3156           Alpha)
3157
3158 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
3159
3160         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
3161         bytes
3162
3163 2005-04-07 Raphael Neider <rneider AT web.de>
3164
3165         * device/include/pic16/usart.h: added compatibility defines for
3166           devices with more than one USART
3167         * device/include/pic16/pic18f[68][567]20.h: activated above defines
3168
3169 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3170
3171         * device/lib/Makefile.in: updated for port specific include
3172
3173 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3174
3175         * support/regression/ports/mcs51/spec.mk: added mcs51 include
3176
3177 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3178
3179         * device/include/8051.h,
3180         * device/include/8052.h,
3181         * device/include/at89S8252.h,
3182         * device/include/at89c55.h,
3183         * device/include/at89x051.h,
3184         * device/include/at89x51.h,
3185         * device/include/at89x52.h,
3186         * device/include/mcs51reg.h,
3187         * device/include/reg51.h,
3188         * device/include/reg764.h,
3189         * device/include/regc515c.h,
3190         * device/include/sab80515.h: (re)moved these 12 files
3191         * device/include/mcs51/8051.h,
3192         * device/include/mcs51/8052.h,
3193         * device/include/mcs51/at89S8252.h,
3194         * device/include/mcs51/at89c55.h,
3195         * device/include/mcs51/at89x051.h,
3196         * device/include/mcs51/at89x51.h,
3197         * device/include/mcs51/at89x52.h,
3198         * device/include/mcs51/mcs51reg.h,
3199         * device/include/mcs51/reg51.h,
3200         * device/include/mcs51/reg764.h,
3201         * device/include/mcs51/regc515c.h,
3202         * device/include/mcs51/sab80515.h: and added them here
3203
3204 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
3205
3206         * device/include/stdarg.h: changed SDCC specific keywords to double
3207           underlined form.
3208         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
3209           mcs51 and ds390.
3210         * device/include/hc08/mc68hc908gp32.h,
3211         * device/include/hc08/mc68hc908jb8.h,
3212         * device/include/hc08/mc68hc908jkjl.h,
3213         * device/include/hc08/mc68hc908qy.h: fixed comments
3214         * device/include/mcs51/README: updated
3215         * device/include/mcs51/c8051f120.h: added PINRSF
3216         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
3217         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
3218           amidst code. Also inline is not supported.
3219
3220 2005-04-06 Raphael Neider <rneider AT web.de>
3221
3222         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
3223         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
3224           callers stack/frame pointers
3225
3226 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
3227
3228         * device/include/pic16/usart.h: added, missing in previous commit,
3229         * device/include/pic16/adc.h: fixed typo,
3230         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
3231         commit,
3232         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
3233         <p18fxxx.inc>
3234         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
3235         uninitialized because a bug appears with gplink
3236         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
3237         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
3238         complains for unrecognised option
3239
3240 2005-04-05 Raphael Neider <rneider AT web.de>
3241
3242         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
3243           structs as well (using memcpy)
3244         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
3245           on ISRs (GOTO has no label)
3246         * src/pic16/device.h: added OF_OPTIMIZE_DF
3247         * src/pic16/main.c: added compiler switch --optimize-df to enable the
3248           new data flow analysis/optimization
3249         * src/pic16/pcode.c: added (prototypes for and implementation of)
3250           dataflow analysis functions, fixed pCodeInstructions' inCond and
3251           outCond values, made RCALL a branch instruction
3252         * (pic16_unlinkpCode): keep C line if possible
3253         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
3254           C line moved if possible
3255         * (pic16_getRegFrompCodeOp): NEW, improved version of...
3256         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
3257           to use new pic16_getRegFrompCodeOp (works for more SFRs)
3258         * (pic16_BuildFlow): fixed skip instructions with label (did not start
3259           new flow)
3260         * (pic16_getJumptabpCode): NEW, needed in...
3261         * (LinkFlow): fixed handling of jumptables, calls and conditional
3262           branches
3263         * (pic16_InsertCommentAfter): NEW
3264         * (pic16_pCodeReplace): made verbose and flow preserving
3265         * (AnalyzeFlow): added call to data flow analysis
3266         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
3267         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
3268         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
3269
3270 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3271
3272         * src/SDCCast.c (decorateType): fixed bug #1105626
3273
3274 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
3275
3276         * device/include/asm/pic16/features.h,
3277         * pic18f*.h headers,
3278         * device/include/pic16/adc.h,
3279         * device/include/pic16/delay.h,
3280         * device/include/pic16/i2c.h,
3281         * device/include/pic16/malloc.h,
3282         * device/include/pic16/stdio.h,
3283         * device/include/pic16/stdlib.h,
3284         * device/include/pic16/string.h,
3285         * device/lib/pic16/libc/stdio/printf_tiny.c,
3286         * device/lib/pic16/libc/stdio/printf_small.c,
3287         * device/lib/pic16/libc/stdio/strmgpsim.c,
3288         * device/lib/pic16/libc/stdio/strmmssp.c,
3289         * device/lib/pic16/libc/stdio/strmusart.c,
3290         * device/lib/pic16/libc/stdio/vfprintf.c,
3291         * device/lib/pic16/libc/stdlib/ltoa.c,
3292         * device/lib/pic16/libc/stdlib/putchar.c,
3293         * device/lib/pic16/libc/stdlib/x_ftoa.c,
3294         * device/lib/pic16/libc/stdlib/memchrpgm.c,
3295         * device/lib/pic16/libc/stdlib/memchrram.c,
3296         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
3297         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
3298         * device/lib/pic16/libio/adc/adcbusy.c,
3299         * device/lib/pic16/libio/adc/adcread.c,
3300         * device/lib/pic16/libio/adc/adcsetch.c,
3301         * device/lib/pic16/libio/usart/ubaud.c,
3302         * device/lib/pic16/libio/usart/ubusy.c,
3303         * device/lib/pic16/libio/usart/udrdy.c,
3304         * device/lib/pic16/libio/usart/uopen.c,
3305         * device/lib/pic16/libio/usart/uputc.c,
3306         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
3307         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
3308         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
3309         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
3310         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
3311         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3312         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3313         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3314         specific keywords to double underlined form,
3315         * device/lib/pic16/libc/Makefile.rules,
3316         * device/lib/pic16/libsdcc/Makefile.rules,
3317         * device/lib/pic16/libm/Makefile,
3318         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3319         to compile with C standard set in Makefile.common
3320         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3321         rand.c and crc.c in compilation process,
3322         * device/lib/pic16/libsdcc/int/divuint.c,
3323         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3324         `c' from signed to unsigned,
3325         * device/lib/pic16/startup/crt0.c,
3326         * device/lib/pic16/startup/crt0i.c,
3327         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3328         keywords to double underlined form, bug fixes in _do_cinit function
3329         which prevented the correct initialization of the .idata segment,
3330         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3331         core to enter a infinite loop
3332         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3333
3334 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3335
3336         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3337
3338 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3339
3340         * device/include/Makefile.in: add support for hc08 subdirectory
3341         * device/include/hc08/: new subdirectory
3342         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3343         Lucas Loizaga, thanks!
3344         * device/include/hc08/mc68hc908qy.h,
3345         * device/include/hc08/mc68hc908gp32.h,
3346         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3347         their own directory. Changed internal macro names to use the compiler
3348         reserved namespace. Changed SDCC specific keywords to double
3349         underlined form.
3350         * device/include/math.h,
3351         * device/include/malloc.h,
3352         * device/include/stdarg.h,
3353         * device/include/stdbool.h
3354         * device/include/string.h,
3355         * device/include/tinibios.h,
3356         * device/include/ds400rom.h,
3357         * device/include/8051.h,
3358         * device/include/8052.h,
3359         * device/include/80c51xa.h,
3360         * device/include/at89c55.h,
3361         * device/include/at89S8252.h,
3362         * device/include/at89x51.h,
3363         * device/include/at89x52.h,
3364         * device/include/ds80c390.h,
3365         * device/include/reg764.h,
3366         * device/include/regc515c.h,
3367         * device/include/sab80515.h,
3368         * device/include/mcs51/c8051f000.h,
3369         * device/include/mcs51/c8051f018.h,
3370         * device/include/mcs51/c8051f020.h,
3371         * device/include/mcs51/c8051f040.h,
3372         * device/include/mcs51/c8051f060.h,
3373         * device/include/mcs51/c8051f120.h,
3374         * device/include/mcs51/c8051f300.h,
3375         * device/include/mcs51/c8051f310.h,
3376         * device/include/mcs51/c8051f320.h,
3377         * device/include/mcs51/c8051f330.h,
3378         * device/include/mcs51/c8051f350.h,
3379         * device/include/z180.h: Changed SDCC specific keywords to double
3380         underlined form.
3381
3382 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
3383
3384         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
3385         18F4455,
3386         * (pic16_assignConfigWordValue): disable testing of configuration
3387         register value with config mask,
3388         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
3389         function with port->fun_prefix,
3390         * (genFunction): when generating a naked interrupt function never
3391         create an absolute segment placed in interrupt vector address, place
3392         the actual interrupt function at IVA instead, when an interrupt
3393         function is generated with unspecified interrupt then do not create
3394         the absolute section,
3395         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
3396         code for generating a call to generic pointer get/put function with
3397         a call to function pic16_callGenericPointer(),
3398         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
3399         the call to the generic pointer get/put functions with prefixing the
3400         function name with port->fun_prefix,
3401         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
3402         * src/pic16/main.c (_process_pragma): prefix function with
3403         port->fun_prefix,
3404         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
3405         calling assembler, old 18Fxxxx macro is deprecated,
3406         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
3407         PC_ASMDIR in while condition,
3408         * (findInstruction): add PC_ASMDIR in while condition,
3409         * (buildCallTree): prefix main with port->fun_prefix,
3410         * (pic16_pCode2str): fixed bug that didn't emit the memory access
3411         identifier for variable with banked access in instructions BTFSS,
3412         BTFSC, BCF, BSF, BTG
3413         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
3414         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
3415         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
3416         perform optimization when enviroment variable NO_REG_OPT is set,
3417         * (insideLRBlock): NEW, return 1 if register is inside an
3418         INF_LOCALREGS block,
3419         * (RemoveRegFromLRBlock): remove a register that is completely
3420         eliminated by register optimization, but it is still left in local
3421         register store/restore in/from stack block,
3422         * (Remove2pcodes): after removing register, check to see if it
3423         should be removed from local register store/restore in/from stack
3424         block,
3425         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
3426         DUMMY_READ_VOLATILE,
3427
3428         * device/include/pic16/adc.h: minor prototype modifications and
3429         update,
3430         * device/include/pic16/malloc.h: added GPL notice various
3431         modifications,
3432         * device/include/pic16/stdint.h: NEW, standard header for ints
3433         * device/include/pic16/delay.h: NEW, header for delay functions,
3434         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
3435         delay1mtcy,
3436         * device/include/pic16/signal.h: NEW, header providing helper macros
3437         for implementing signal handlers,
3438         * device/include/pic16/stdio.h: added prototypes for functions,
3439         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
3440         prototypes for stdin and stdout, added macro PUTCHAR to
3441         automatically implement putchar function prototype,
3442         * device/include/pic16/usart.h: modified and updated USART library,
3443         * device/lib/pic16/libio/adc/,
3444         * device/lib/pic16/libio/i2c: some modifications to improve library
3445         performance,
3446         * device/lib/pic16/libc/stdio/: modifications for the new printf*
3447         family of functions,
3448         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
3449         family of functions and other sources,
3450         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
3451         of the PIC18Fxx[28] devices,
3452         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
3453         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
3454         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
3455         _do_cinit function, because the previous failed when local variables
3456         where not placed in the same memory bank,
3457         * device/lib/pic16/libsdcc/char/: various modifications to improve
3458         library performance,
3459         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
3460         information on the new functions of the c library and more...
3461
3462 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3463
3464         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
3465
3466 2005-03-26 Raphael Neider <rneider AT web.de>
3467
3468         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
3469           if condition == CARRY)
3470         * (genCmp): adapted to new genSkipc semantics
3471         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
3472           on rIfx (genCmp was broken)
3473
3474 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3475
3476         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
3477         * src/z80/main.c (_keywords[]),
3478         * src/SDCCglobal.h (struct options),
3479         * src/SDCC.y,
3480         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
3481         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
3482         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
3483         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
3484         always available in leading double underscore form. The C99 support is
3485         mostly missing, but it's a start.
3486         * support/regression/tests/bug-227710.c: fixed nonconforming use of
3487         reserved identifier "__data".
3488
3489 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
3490
3491         * src/mcs51/peeph.def: fixed bug 1170013
3492
3493 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
3494
3495         * device/include/mcs51reg.h: fixed bug 842007
3496
3497 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3498
3499         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
3500         last time.
3501
3502 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3503
3504         * src/port.h (struct PORT),
3505         * src/avr/ralloc.c (avr_assignRegisters),
3506         * src/avr/main.c,
3507         * src/ds390/ralloc.c (ds390_assignRegisters),
3508         * src/ds390/main.c,
3509         * src/hc08/ralloc.c (hc08_assignRegisters),
3510         * src/hc08/main.c,
3511         * src/mcs51/ralloc.c (mcs51_assignRegisters),
3512         * src/mcs51/main.c,
3513         * src/pic/ralloc.c (pic14_assignRegisters),
3514         * src/pic/main.c,
3515         * src/pic16/ralloc.c (pic16_assignRegisters),
3516         * src/pic16/main.c,
3517         * src/xa51/ralloc.c (xa51_assignRegisters),
3518         * src/xa51/main.c,
3519         * src/z80/ralloc.c (z80_assignRegisters),
3520         * src/z80/ralloc.h,
3521         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
3522         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
3523         * src/SDCCcse.h,
3524         * src/SDCCdflow.c (computeDataFlow),
3525         * src/SDCCdflow.h,
3526         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
3527         * src/SDCCloop.h,
3528         * src/SDCCcflow.c (*),
3529         * src/SDCCcflow.h,
3530         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
3531         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
3532         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
3533         immedDom() returning wrong block; probably fixes bug #1160833)
3534
3535 2005-03-20 Borut Razem <borut.razem AT siol.net>
3536
3537         * support/scripts/inc2h.pl: WIN32 port
3538
3539 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
3540
3541         * device/lib/makefile.in: added abs.c and labs.c
3542
3543 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
3544
3545         * device/include/stdint.h: added
3546         * device/lib/abs.c: added
3547         * device/lib/labs.c: added
3548         * device/include/stdlib.h: added abs() and labs() prototypes
3549         * device/lib/libsdcc.lib: added abs and labs
3550         * device/include/float.h,
3551         * device/lib/_fsmul.c,
3552         * device/lib/printf_fast.c,
3553         * device/lib/printf_tiny.c: updated comments
3554
3555 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3556
3557         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
3558         bug #1164313
3559
3560 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3561
3562         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
3563         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
3564
3565 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
3566
3567         * device/lib/printf_large.c: removed inline assembly for portability and
3568           readability. Use printf_fast if speed or size are more important.
3569         * src/pic16/gen.c: removed conditions around use of DEBUGpc
3570         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
3571
3572 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
3573
3574         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
3575         prevent compiler warning
3576
3577 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
3578
3579         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
3580         moved to level 0 and declared as static. Also they are explicit
3581         placed in access bank. This was necessery because some times they
3582         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
3583         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
3584         optimizations. Currently only compare to unsigned char is implemented,
3585         * src/pic16/gen.c: added fReturnIdx array,
3586         * (struct resolvedIfx) is moved to gen.h and made public,
3587         * (struct _G): added sregsAlloc and sregsAllocSet fields,
3588         * (aopForSym): added an optimization to directly store in stack of
3589         the operand of a SEND iCode,
3590         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
3591         but as registers instead (AOP_REG) using the fReturnIdx array,
3592         * (pic16_freeAsmop): remove the freed register from the
3593         _G.sregsAlloc field,
3594         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
3595         a compare of 'WREG',
3596         * (pic16_popGetTempRegCond): changed function prototype, now
3597         function takes also a bitVector argument v which holds the current
3598         set of registers that are allocated for stack access by aopForSym,
3599         registers allocated in aopForSym for accessing stack symbols are not
3600         any more part of the functions usedRegs field,
3601         * (genCall): some times aopOp is called for a stack variable to be
3602         send, aopForSym might perform the push, if this is true make sure
3603         that genCall doesn't push the variable twice by testing _G.resDirect,
3604         * (genFunction): changed testing for unspecified interrupt number
3605         from 256 to INTNO_UNSPEC,
3606         * modified selection scheme of frame pointer generation. Previously
3607         if function did use local registers a frame pointer was generated,
3608         now a frame pointer is generated only if function has arguments
3609         (that need PLUSW2 register access), or has stack arguments, or the
3610         compiler is not instructed to omit the frame pointer,
3611         * (genEndFunction): before restoring local registers that were saved
3612         in the function preamble, also restore the registers that *might*
3613         have been allocated for stack access,
3614         * (genRet): removed some old comments,
3615         * (genCmp, the active (RN's) version): added a call to the
3616         pic16_genCmp_special function to perform the compare with a more
3617         robust and optimized way,
3618         * (genInline): a feature has been added in inline code generation,
3619         which allows a wildcard variable substitution when writing inline
3620         assembly. Code is incomplete and experimental therefore undocumented,
3621         * (genCast): changed order of aopOp for result and right to allow
3622         aopForSym to directly load the result if possible,
3623         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
3624         perform an optimized compare on some selected special occasions,
3625         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
3626         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
3627         generate an IVT any more,
3628         * src/pic16/main.c (pic16_optionsTable): added command line option
3629         --optimize-cmp,
3630         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
3631         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
3632         macros,
3633         * src/pic16/NOTES: Raphael Neider added in list of active developers
3634         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
3635         jumptable_end to prevent bug #,
3636         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
3637         inCond and outCond fields,
3638         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
3639         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
3640         turn off register spilling,
3641         * (packRegsForOneUse): synced with other ports' versions although it
3642         is not used currently,
3643         * (pic16_packRegisters): added an optimization while reading
3644         structure bitfields, some registers may be saved (malloc code is
3645         decreased by 80 bytes)
3646
3647 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
3648
3649         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
3650         left is a bitfield, if yes, then don't optimize assignment. Perhaps
3651         this can be optimized more?
3652
3653 2005-03-10 Raphael Neider <rneider AT web.de>
3654
3655         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
3656           genNearPointerGet): (hopefully) fixed access to bitfields via
3657           pointers (p->bitN = x; and x = p->bitN; failed)
3658
3659 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
3660
3661         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
3662
3663 2005-03-09 Raphael Neider <rneider AT web.de>
3664
3665         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
3666
3667 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
3668
3669         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
3670         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
3671           (regTypeNum): set REG_BIT type if necessary
3672         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
3673         * support/regression/tests/critical.c: check bug 1144613
3674
3675 2005-03-02 Raphael Neider <rneider AT web.de>
3676
3677         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
3678
3679 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3680
3681         * src/avr/ralloc.c (serialRegAssign),
3682         * src/ds390/ralloc.c (serialRegAssign),
3683         * src/hc08/ralloc.c (serialRegAssign),
3684         * src/mcs51/ralloc.c (serialRegAssign),
3685         * src/pic/ralloc.c (serialRegAssign),
3686         * src/pic16/ralloc.c (serialRegAssign),
3687         * src/xa51/ralloc.c (serialRegAssign),
3688         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
3689
3690 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
3691
3692         * src/SDCCast.c (decorateType): fixed bug 1124787
3693
3694 2005-02-20 Hubert Sack <sack AT digiplan.de>
3695         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3696
3697         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
3698         patch #1121755
3699
3700 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3701
3702         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
3703         to keep the correct label reference count when adding/removing references
3704         to labels. A peephole file using this is appended to patch #1144962.
3705
3706 2005-02-14 Raphael Neider <rneider AT web.de>
3707
3708         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
3709         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
3710         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
3711           retrievals of result operand's value on assignment
3712
3713 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
3714
3715         * device/include/pic16/string.h: modified prototype for memccpy()
3716         to memccpy(void *, void *, char, size_t)
3717         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
3718         check whether to omit frame pointer or not,
3719         * (genInline): convert all occurences of "\n" to LF in inline
3720         assembler blocks, this helps formatting the inline text,
3721         * (pic16_loadFSR0): modified prototype,
3722         * (genNearPointerGet, genNearPointerSet): reorganization of code,
3723         removed some 8051 legacy code,
3724         * (genPackBits): enabled handling bitfields exceeding one byte in size,
3725         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
3726         before allocating temporary registers in functions,
3727
3728 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3729
3730         * support/regression/tests/bitvars.c: corrected the "fix"
3731
3732 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3733
3734         * support/regression/tests/bitvars.c,
3735         * support/regression/tests/bitwise.c,
3736         * support/regression/tests/rotate.c: "fixed" problems on Alpha
3737
3738 2005-02-10 Raphael Neider <rneider AT web.de>
3739
3740         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3741           different size for Alpha
3742         * src/pic16/gen.c (genCmpEq) : improved compare with 0
3743
3744 2005-02-09 Raphael Neider <rneider AT web.de>
3745
3746         * src/SDCC.lex(doPragma) : save and restore warning options as well
3747           (also added new stack plus clone- and copyAndFreeSDCCERRG())
3748         * have #pragma less_pedantic set the errorlevel to WARNING
3749           (fixes #1117001)
3750         * (cloneOptimize) : fixed wrong malloc's size
3751         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3752           facilitate correct handling of #pragma (save|restore)
3753
3754 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3755
3756         * src/mcs51/gen.c: removed non-standard C nameless struct/union
3757
3758 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3759
3760         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3761
3762 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3763
3764         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3765
3766 2005-02-02 Raphael Neider <rneider AT web.de>
3767
3768         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3769         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3770         * (pic16_storeForReturn): fixed to allow returning function pointers
3771         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3772         * device/include/pic16/{stddef.h,stdbool.h}: added
3773
3774 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3775
3776         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3777
3778 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3779
3780         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3781         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3782          appeared to be required
3783
3784 2005-01-31 Borut Razem <borut.razem AT siol.net>
3785
3786         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3787           include/mcs51 and include/z80 directories to the package
3788
3789 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3790
3791         * src/hc08/gen.c (genFunction): fixed bug #1112752
3792
3793 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3794
3795         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
3796
3797 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3798
3799         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
3800
3801 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
3802
3803         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
3804
3805 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
3806
3807         * device/include/c8051fxxx.h: removed these 6 files
3808         * device/include/mcs51/c8051fxxx.h: added these 11 new files
3809
3810 2005-01-26 Raphael Neider <rneider AT web.de>
3811
3812         * src/pic16/gen.c (genAssign): fixed assignment from longs
3813           in codespace (were cut to three bytes)
3814         * (genDummyRead): implemented (except for CODESPACE...),
3815           fixed bug #1108575
3816         * src/pic16/glue.c (emitStatistics): beautified
3817         * device/lib/pic16/libm/Makefile: added include path
3818
3819 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3820
3821         * src/z80/gen.c (aopPut): fixed bug #1103902
3822
3823 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3824
3825         * device/lib/expf.c: fixed bug #1095792
3826
3827 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3828
3829         * device/lib/pic16/libm: added Math library sources
3830
3831 2005-01-24 Raphael Neider <rneider AT web.de>
3832
3833         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3834           to enable upcast to pCodeOpReg2 (there is no type tag to
3835           differenciate the two and pic16_popGet2p cast into PCOR2)
3836         * src/pic16/main.c (_process_pragma): fixed another malloc bug
3837           (sizeof(sectNames) changed to sizeof(sectName))
3838           Both patches fix segfaults under MinGW.
3839
3840 2005-01-23 Raphael Neider <rneider AT web.de>
3841
3842         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3843           Safe_[mc]?alloc()'ed variables
3844         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3845           of (byte sized) temporaries (assign them to WREG for now)
3846         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3847           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3848           this might fix SIGSEGVs on MinGW...
3849         * src/SDCCopt.c (killDeadCode): restored original behaviour
3850           (volatile operands might get thrown away though)
3851
3852 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3853
3854         * src/pic16/gen.c: fixed bug #1106975,
3855         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3856         pointer update, INTCON is saved, global interrupts are disabled and
3857         restored after updateing TOS.
3858         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3859         * added function attribute 'shadowregs' to take advantage of shadow
3860         registers,
3861         * added function attribute 'wparam' as an alternative to the wparam
3862         pragma,
3863         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3864         user declares a non-ISR function as 'shadowregs',
3865         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3866
3867 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3868
3869         * .version: bumped version number to 2.4.8
3870         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3871         pic16 port,
3872         * device/lib/pic16/libio/i2c/: I2C module support library,
3873         * device/include/pic16/i2c.h: I2C support library header,
3874         * device/lib/pic16/libc/stdio/: standard IO support sources,
3875         * (printf_small.c): printf_small() source, supports float print,
3876         * (printf_tiny.c): printf_tiny() source, does not support floats,
3877         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3878         enable global optimizations for entire library source, other
3879         Makefiles in the source tree are also modified to reflect this,
3880         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3881         function,
3882         * doc/sdccman.lyx: updated to reflect new changes,
3883         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3884         sym->onStack if-case,
3885         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3886         sbit, idata, _idata, xdata, _xdata,
3887         * added pragma library, to link an external library, (see doc),
3888         * removed command line options, --pomit-config-words, --pomit-ivt,
3889         --pleave-reset-vector,
3890         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3891         when calling assembler to reflect memory model used, also define
3892         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3893         reflect stack model used,
3894         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3895         on stack return NULL,
3896
3897 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3898
3899         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3900           of the operands is volatile. Fixes #1020220
3901
3902 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3903
3904         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3905         * (OptimizeRegUsage): make sure that there is really no other flow where
3906           the first pCode is used
3907
3908 2005-01-22 Raphael Neider <rneider AT web.de>
3909
3910         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3911           to fix #1106967 (pCode->seq are not set up correctly)
3912
3913 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3914
3915         * src/SDCCglue.c (glue): make sure code area is declared before the
3916         static initialization area.
3917
3918 2005-01-21 Raphael Neider <rneider AT web.de>
3919
3920         * device/lib/Makefile.in: fixed test for pic16 install dir
3921         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3922           optimizations
3923         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3924           added --optimize-goto compiler switch and pragma wparam documentation
3925         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3926         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3927           and PRODH closing bug #1071770 (peephole optimizer)
3928
3929 2005-01-19 Raphael Neider <rneider AT web.de>
3930
3931         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3932           cmdLine buffers (used when calling sdcpp...) are large enough
3933           (MAX_PATH=256 truncates arguments leading to system halts when
3934           used in MinGW...)
3935         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3936         * (genUminus): rewritten to for efficiency
3937         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3938           used uninitialized in some cases)
3939         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3940           copy the third byte from the int -- now assumes 0x80 (data memory)
3941         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3942           operands (genAddLit expects the iCode's operands to swapped as
3943           well), fixed leftover bytes (crashed for short left operands)
3944         * (pic16_genMinusDec): performance improvements, removed false
3945           PIC14 emitSKPNCs
3946         * (pic16_genMinus): fixed to cope with differently sized operands
3947         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3948           for --obanksel > 1
3949         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3950         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3951           new banksel optimization
3952         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3953           analysis for temporary registers (segfaults...)
3954         * src/pic16/peeph.def: added rule
3955
3956 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3957
3958         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3959         which converts a float number to its ASCII representation
3960         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3961         functions to convert the fractional and integer part of a float to ASCII,
3962         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3963         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3964         ram
3965         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3966         _STATMEM macros,
3967         * device/include/pic16/adc.h: added GPL info,
3968         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3969         a pCodeOp as tested operand,
3970         * (genNearPointerGet): optimized bit testing, does not use
3971         intermediate register for bit value, test directly instead with
3972         BTFSS, BTFSC, works only for single bits,
3973         * (genpic16Code): dump the name of the iCode in the asm,
3974         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3975         renamed to pic16_decodeOp,
3976         * (serialRegAssign): do not allocate a temporary register for iCode
3977         sequences that test a single bit for 1/0
3978
3979 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3980
3981         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3982         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3983         access stack and frame pointers. They are initially assigned to
3984         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3985         accessing SFRs. Updated all occurences of modification of stack or
3986         frame pointer in gen.c and pcode.c,
3987         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3988         assigning of a literal value to pointers,
3989         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3990         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3991         selected
3992
3993 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3994
3995         * doc/sdccman.lyx: update documentation about stack pragma, added
3996         some info for stack memory models
3997
3998 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3999
4000         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
4001
4002 2005-01-08 Raphael Neider <rneider AT web.de>
4003
4004         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
4005           udata sections to fix bug #1097823
4006
4007 2005-01-05 Raphael Neider <rneider AT web.de>
4008
4009         * src/pic16/gen.c (genGenericShift): added handling of differently
4010           sized left operand and result
4011
4012 2005-01-04 Raphael Neider <rneider AT web.de>
4013
4014         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
4015         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
4016           to hold the condition bit)
4017         * added new version of genCmp (old code available via #define)
4018         * added new version of genShiftLeft/genShiftRight in a generic
4019           way, now supports shifting by negative values
4020         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
4021           shiftCount (expected by genGenericShift)
4022         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
4023         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
4024           dump
4025         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
4026           is an invalid literal too...)
4027
4028 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
4029
4030         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
4031         from Raphael Neider,
4032         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
4033         for 8-bit literals. This fixes some literal operands which are sign
4034         extended to 16-bits ints when instruction needs only 8-bits.
4035
4036 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
4037
4038         * device/lib/logf.c: added mcs51 assembly version
4039         * device/lib/expf.c: added mcs51 assembly version
4040         * device/lib/_logexpf.c: new shared asm code for expf and logf
4041         * device/include/math.h: add defines for assembly math library
4042         * device/lib/Makefile.in: build new _logexpf.c
4043         * device/lib/libfloat.lib: use new _logexpf.c
4044
4045 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4046
4047         * src/pic/device.c
4048         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
4049           device types which have less than 0x7f registers.
4050
4051 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4052
4053         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
4054
4055 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4056
4057         * device/lib/printf_fast.c: only build on supported arch.
4058         * device/lib/printf_tiny.c: only build on supported arch.
4059         * device/lib/printf_fast_f.c: only build if asm float lib
4060         * device/lib/_fsget1arg.c: only build if asm float lib
4061         * device/lib/_fsget2args.c: only build if asm float lib
4062         * device/lib/_fsnormalize.c: only build if asm float lib
4063         * device/lib/_fsreturnval.c: only build if asm float lib
4064         * device/lib/_fsrshift.c: only build if asm float lib
4065         * device/lib/_fsswapargs.c: only build if asm float lib
4066         * device/include/stdio.h: don't provide print_fast,
4067           print_fast_f, print_tiny prototypes if --xstack used
4068
4069 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
4070
4071         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
4072         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
4073           to the SOURCES
4074
4075 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4076
4077         * device/lib/printf_fast_f.c: same as printf_fast, but
4078           with floating point enabled
4079         * device/lib/printf_fast.c: minor tweaks
4080         * device/include/stdio.h: add printf_fast_f
4081
4082 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4083
4084         * src/SDCCmain.c: make --float-reent default for mcs51
4085         * device/lib/_fsadd.c: added mcs51 assembly version
4086         * device/lib/_fssub.c: added mcs51 assembly version
4087         * device/lib/_fsmul.c: added mcs51 assembly version
4088         * device/lib/_fsdiv.c: added mcs51 assembly version
4089         * device/lib/_fseq.c: added mcs51 assembly version
4090         * device/lib/_fsneq.c: added mcs51 assembly version
4091         * device/lib/_fsgt.c: added mcs51 assembly version
4092         * device/lib/_fslt.c: added mcs51 assembly version
4093         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
4094         * device/lib/Makefile.in: add _fscmp to build
4095         * device/lib/libfloat.lib: add _fscmp to build
4096
4097 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4098
4099         * device/lib/_fs2slong.c: added mcs51 assembly version
4100         * device/lib/_fs2sint.c: added mcs51 assembly version
4101         * device/lib/_fs2schar.c: added mcs51 assembly version
4102         * device/lib/_fs2ulong.c: added mcs51 assembly version
4103         * device/lib/_fs2uint.c: added mcs51 assembly version
4104         * device/lib/_fs2uchar.c: added mcs51 assembly version
4105         * device/lib/_slong2fs.c: added mcs51 assembly version
4106         * device/lib/_sint2fs.c: added mcs51 assembly version
4107         * device/lib/_schar2fs.c: added mcs51 assembly version
4108         * device/lib/_ulong2fs.c: added mcs51 assembly version
4109         * device/lib/_uint2fs.c: added mcs51 assembly version
4110         * device/lib/_uchar2fs.c: added mcs51 assembly version
4111         * device/include/float.h: added #define to select asm vs c
4112
4113 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
4114
4115         * device/lib/printf_fast.c: improvements to float output
4116         * device/include/float.h: add defines for assembly float library
4117         * device/lib/_fsget1arg.c: receive 1 float arg
4118         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
4119         * device/lib/_fsnormalize.c: normalize a float
4120         * device/lib/_fsreturnval.c: return float, various helper routines
4121         * device/lib/_fsrshift.c: right shift a float's mantissa
4122         * device/lib/_fsswapargs.c: swap 2 floats
4123         * device/lib/Makefile.in: build these 6 new files for mcs51
4124         * device/lib/libfloat.lib: add these 6 files to the library
4125
4126 2004-12-26 Borut Razem <borut.razem AT siol.net>
4127
4128         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
4129           built by gcc 3.4.2
4130
4131 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
4132
4133         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
4134           and fully reentrant and register bank neutral.
4135         * device/lib/printf_fast.c: added float (not enabled by default),
4136           added compact/slower integer (also not enabled by default),
4137           improved size/speed of fast integer code, other minor changes
4138         * device/include/stdio.h, device/lib/Makefile.in,
4139           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
4140
4141 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
4142
4143         * src/pic16/pcode.c: declaring variables other than at the start of a
4144           block is not supported in C by VC6.
4145
4146 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
4147
4148         * applied a previous patch from Raphael Neider that wasn't included
4149         in the previous commits, which fixes infinite loops within jumptable
4150         improvements,
4151         * made some fixes that previous patches introduced
4152
4153 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
4154
4155         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
4156         that fixes an issue with AOP_PCODE asmop's offset,
4157         * (pic16_popCopyReg): update instance field too,
4158         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
4159         function of pic port,
4160         * (genCmp, genAnd, genAssign),
4161         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
4162
4163 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
4164
4165         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
4166         variables initial values to idata section,
4167         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
4168         variables in some functions. This utilizes parmBytes field of iCode
4169         structure to hold the offset of the variable in stack. (might be
4170         able to use the stack field too?)
4171         * applied patch from Raphael Neider # ### , # ###
4172         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
4173         variable initial values in idata section,
4174         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
4175         for static variables with initial value
4176         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
4177         applied fix in while loop from Raphael Neider.
4178
4179 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
4180
4181         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
4182         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
4183         * src/ds390/ralloc.c (serialRegAssign): spill bits
4184         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
4185         * support/Util/SDCCerr.c,
4186         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
4187         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
4188         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
4189
4190 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
4191
4192         * device/include/sdcc-lib.h: inserted LGPL, added includes
4193           asm/ds390/features.h and asm/mcs51/features.h
4194         * device/include/asm/default/features.h,
4195         * device/include/asm/gbz80/features.h,
4196         * device/include/asm/z80/features.h: added empty _AUTOMEM
4197           and _STATMEM
4198         * device/include/asm/ds390/features.h,
4199         * device/include/asm/mcs51/features.h: added files with defines for
4200           _AUTOMEM and _STATMEM indicating automatic and static storage class
4201         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
4202         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
4203         * src/SDCCicode.c (geniCodeCast),
4204         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
4205         * src/SDCCloop.c (loopInduction): removed unused variable lr
4206         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
4207           to convertToFcall to include char modulo (RFE 1065037), added check
4208           if left operand is unsigned and use abs of literal value
4209         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
4210           as it doesn't work after conversion from peephole.def to peephole.rul
4211         * src/mcs51/gen.c (toBoolean): added check for size,
4212           (genModOneByte): optimized code for signed char modulo a literal
4213           power of 2 (thanks to Hubert Sack),
4214           (genRRC): removed unnecessary "clr c",
4215           (genRLC): replaced "add a,acc" with cheaper "rlc a"
4216         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
4217           jump optimization,
4218           swapped rules 256.c and 256.d,
4219           extended 256.d by using new multiple checks (thanks Erik),
4220           added rules 256.e and 256.f,
4221           updated rule 261.a and 261.b to new generated code
4222         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
4223
4224 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4225
4226         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
4227           induction related bugs, including first part of bug #1074377
4228
4229 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
4230
4231         * applied patch from bug-report #1076292,
4232         * applied patches for genAnd and Goto-optimizations for Raphael
4233         Neider,
4234         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
4235         dump a less iCode information,
4236         * src/pic16/device.h (pic16_options_t): added field debgen,
4237         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
4238         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
4239         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
4240         puclic,
4241         * (various functions): added macros FENTRY and FENTRY2 to functions,
4242         to emit function prologue,
4243         * (various functions): fixed indentation,
4244         * (genNearPointerGet): fixed loading of FSR0,
4245         * (genPackBits): applied patch from Raphael Neider to fix updating
4246         of FSR0 and touching only the modified bits,
4247         * src/pic16/genarith.c (various functions): added macros FENTRY to
4248         emit function prologue in comments,
4249         * src/pic16/pcode.h: added functions debugf2, debugf3,
4250         * src/pic16/ralloc.c: partial fix for packForPush caused
4251         segmentation fault,
4252
4253 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4254
4255         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
4256           <stsp AT users.sourceforge.net> with reversed byte order
4257         * support/regression/tests/rotate.c: added (ds390 skips some tests)
4258
4259 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4260
4261         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
4262           bug #1074377
4263         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
4264         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
4265
4266 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4267
4268         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
4269
4270 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4271
4272         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
4273           conditions,
4274           (setFromConditionArgs): friendly operand parser for peephole rules,
4275           (operandBaseName, operandsNotRelated): new peephole condition
4276           "operandsNotRelated" -- similar to "operandsNotSame", but takes
4277           architecture specific register naming into account, handles n-way
4278           comparisons, and supports quoted literals
4279         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
4280
4281 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4282
4283         * src/mcs51/peeph.def: fixed bug #1076940
4284
4285 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4286
4287         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
4288
4289 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4290
4291         Adding support for replacing ljmps with sjmps in jumptables
4292         generated for switch statements. For now you need to set the
4293         environment variable SDCC_SJMP_JUMPTABLE to enable this.
4294         Now 4 algorithms for mcs51 jumptable generation are used:
4295         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
4296         addresses loaded pc-relative for up to 112 cases and stack-pushing
4297         target addresses loaded with offset from dptr for up to 256 cases.
4298
4299         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
4300         * src/mcs51/main.c: adapted constants for switch table generation
4301         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
4302
4303 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
4304
4305         * device/lib/printf_large.c (_print_format): fixed bug 1073386
4306         * support/regression/tests/bug1057979.c: added test for bug 1073386
4307
4308 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4309
4310         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
4311         compilers
4312
4313 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4314
4315         * src/pic16/device.h,
4316         * src/pic16/genarith.c,
4317         * src/pic16/glue.c,
4318         * src/pic16/main.c,
4319         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4320
4321 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4322
4323         Large cummulative patch for pic16 port.
4324         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4325         to call when a stack overflow occurs,
4326         * (malloc.h): added CVS Id tag,
4327         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4328         variable,
4329         * added libc directory. The current version of LibC contains string
4330         functions, ctype functions and macros and some functions of the
4331         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4332         be extensively tested in the future. Standard disclaimer here.
4333         Library is not automatically build yet. But one can build it by
4334         invoking 'make' inside the libc directory.
4335         * added ADC library under libio. Preliminary version yet.
4336
4337         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4338         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4339         aopForRemat() now and not by pic16_aopOp(),
4340         * (pic16_popGetTempReg): removed warning messgae when allocating
4341         temporary registers, its a buggy feature and will be removed,
4342         * (pic16_popGet): set register instance field in AOP_CRY,
4343         * (pic16_outBitC): fixed for results in size greater than 1,
4344         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4345         * (pic16_storeForReturn): optimized return of 0,
4346         * (genCmp): experimental code for new genCmp which uses PIC18's
4347         special compare&skip instructions. Initial tests fail some times
4348         with variables grater than 1 byte in size, so new code is disabled,
4349         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
4350         a single bit,
4351         * (genCast): began a fix to optimize the casting of a bit to another
4352         bit, now assigning a bitfield to another bitfield will fail, sorry,
4353         * src/pic16/main.c: disabled the use of lr-support feature,
4354         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
4355         * added some function prototypes, added function _debugf prototype,
4356         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
4357         bits with offset (case PO_GPR_BIT),
4358         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
4359         command line,
4360         * (isBankInstruction): modified to return 0 for no banking instruction,
4361         and 1 for banking instruction,
4362         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
4363         caused stop processing pCodes after a inline assembly block,
4364         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
4365         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
4366         registers when it shouldn't,
4367         * src/pic16/ralloc.c (allocReg): add preliminary support for
4368         supporting a limited set of temporary registers,
4369
4370 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4371
4372         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
4373           genDataPointerSet): ensure assignments always copy in MSB to LSB
4374           order,
4375           (loadRegFromAop): recognize CLRH optimization,
4376           (genFunction): optimize RECEIVE iCodes in reentrant functions
4377
4378 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4379
4380         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
4381           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
4382           selected.
4383         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
4384         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
4385           contiguous with data
4386
4387 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4388
4389         * device/lib/_gptrget.c (_gptrget),
4390         * device/lib/_gptrgetc.c (_gptrgetc),
4391         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
4392           instead of sjmp to ret
4393         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
4394           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
4395
4396 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
4397
4398         * .version: bumped version to 2.4.7
4399         * device/lib/_gptrget.c (_gptrget): is now _naked
4400         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
4401         * device/lib/_gptrput.c (_gptrput): is now _naked
4402         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
4403           (createFunction): fixed xstack
4404         * src/SDCCglue.c (emitMaps): set allocation required for bit area
4405         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
4406           or bit either,
4407           (geniCodeCritical): store original interrupt state in an iTemp bit
4408           var unless stack-auto
4409         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
4410         * src/SDCCmain.c (setIncludePath): added include/target to search path
4411         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
4412         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
4413           prototype,
4414           (processFuncArgs): put bit vars in bit area
4415         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
4416           unsaveRBank): fixed xstack,
4417           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
4418           (genFunction, genEndFunction): fixed xstack,
4419           (genAssign): optimization don't walk backwards through mem
4420         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
4421         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
4422         * support/regression/Makefile: also make library (for stack-auto) when
4423           making "all" and added "test-mcs51-xstack-auto"
4424         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
4425         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
4426         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
4427         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
4428         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
4429           make-library by MAKE_LIBRARY
4430         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
4431           regression tests for xstack
4432         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
4433         * support/regression/tests/critical.c: test for critical on mcs51
4434
4435 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4436
4437         * support/regression/ports/ucz80/spec.mk: use include and lib files from
4438           built version of sdcc instead of installed version
4439
4440 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
4441
4442         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
4443         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
4444           vprintf.c now
4445         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
4446         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
4447           WARNING: remove device/lib/build/z80/printf.o by hand when
4448           updating from previous build!
4449         * device/lib/z80/printf.c: updated comment
4450         * support/regression/tests/bug1057979.c: test all ports now
4451         * support/regression/tests/bug1065458.c: file added
4452
4453 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4454
4455         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
4456           *_start and *_end symbols for static functions
4457
4458 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
4459
4460         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
4461           and search crt0.o in all library paths,
4462           (setIncludePath): proper handling of --nostdinc,
4463           (setLibPath): proper handling of --nostdlib
4464         * support/regression/Makefile,
4465         * support/regression/ports/ds390/spec.mk,
4466         * support/regression/ports/gbz80/spec.mk,
4467         * support/regression/ports/hc08/spec.mk,
4468         * support/regression/ports/mcs51/spec.mk,
4469         * support/regression/ports/mcs51-large/spec.mk,
4470         * support/regression/ports/mcs51-stack-auto/spec.mk,
4471         * support/regression/ports/z80/spec.mk: use include and lib files from
4472           built version of sdcc instead of installed version
4473         * doc/sdccman.lyx: fixed typo in --nostdinc
4474
4475 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
4476
4477         * src/pic/pcode.c,
4478         * src/pic/device.c,
4479         * src/pic/ralloc.c,
4480         * src/pic/gen.c : added support to generate code for struct bit fields.
4481
4482 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
4483
4484         * as/xa51/xa_version.h,
4485         * device/include/errno.h,
4486         * device/include/regc515c.h,
4487         * device/lib/_itoa.c,
4488         * device/lib/_ltoa.c,
4489         * device/lib/ser_ir_cts_rts.c,
4490         * sim/ucsim/xa.src/glob.cc,
4491         * sim/ucsim/xa.src/inst_gen.cc,
4492         * sim/ucsim/xa.src/xa_bit.cc,
4493         * sim/ucsim/xa.src/xa_sfr.cc,
4494         * sim/ucsim/z80.src/inst_dd.cc,
4495         * sim/ucsim/z80.src/inst_fdcb.cc,
4496         * support/scripts/keil2sdcc.pl,
4497         * src/pic16/pic16.dsp,
4498         * src/pic16/pic16a.dsp: corrected cvs line endings
4499         * device/lib/printf_large.c: fixed bug 1057979
4500         * src/pic16/gen.c: fixed non-C standard code
4501         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
4502         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
4503         * support/regression/ports/mcs51/support.c: reload T1 asap
4504         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
4505           pdata use and clear idata startup behaviour
4506         * support/regression/tests/bug1057979.c: added
4507
4508 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
4509
4510         * device/examples/ds390/ow390/ad26.h,
4511         * device/examples/ds390/ow390/cnt1d.h,
4512         * device/examples/ds390/ow390/crcutil.c,
4513         * device/examples/ds390/ow390/ownet.h,
4514         * device/examples/ds390/ow390/owsesu.c,
4515         * device/examples/ds390/ow390/swt12.h,
4516         * device/examples/ds390/ow390/swtoper.c,
4517         * device/examples/ds390/ow390/temp10.h,
4518         * device/examples/ds390/ow390/thermodl.c,
4519         * device/examples/ds390/tinitalk/tinitalk.dsp,
4520         * device/examples/ds390/tinitalk/tinitalk.dsw,
4521         * device/examples/mcs51/clock/hw.h,
4522         * device/examples/mcs51/simple2/go.bat,
4523         * device/examples/serialcomm/windows/serial.h,
4524         * device/examples/xa51/dummy.c,
4525         * device/examples/xa51/hello.c,
4526         * device/include/80c51xa.h,
4527         * device/include/at89x051.h: corrected cvs line endings
4528
4529 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
4530
4531         * src/pic16/main.c (options): added command line --gstack, to trace
4532         stack over/under flows,
4533         * added pragma 'wparam' to allow passing first byte of function
4534         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
4535         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
4536         call to __gstack_test function and sets up the symbol as extern,
4537         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
4538         * popaop): added call to pic16_testStackOverflow,
4539         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
4540         wparamList list,
4541         * (genCall, genPcall): now all parameters are passed via stack
4542         except in functions that are pass to wparam pragma in which WREG is
4543         used too,
4544         * (genPcall): REENTRANT flag is checked to see if variable prototype
4545         contains reentrant keyword, don't call a non-reentrant function, via
4546         a reentrant function pointer or vice versa, functions are never
4547         passed via WREG,
4548         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
4549         D.Winkler,
4550         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
4551         SIGSEGV when accessing a NULL register stucture,
4552         * (pic16_printGPointerType): modified to handle UPPER modifier for
4553         function initializers, changed prototype of function to simpler one,
4554         * (pic16_printIvalFuncPtr): check to see if function is already
4555         added in externs list,
4556         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
4557         optimized a move from W to SFR with a move to the same register
4558         later after a CALL,
4559         * device/lib/pic16/debug: NEW directory, contains debug features
4560         which are enabled when linking with libdebug.lib, currently command
4561         line option --gstack enables stack pointer tracing for over/under
4562         flow, corresponding sources are in debug/gstack
4563
4564 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
4565
4566         * doc/sdccman.lyx: updated SDCC version,
4567         * (PIC16 port): update list of command line options,
4568         * src/pic16/device.h (structure pic16_options_t): added field gstack
4569         to enable stack overflow tracing on push/pops,
4570         * src/pic16/device.c (statistics structure): added statistics
4571         structure,
4572         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
4573         pic16_dump_int_registers): increase statistics counters for each
4574         * variable which is encountered
4575         * (pic16_dump_usection): emit each .udata variable to its own udata
4576         section,
4577         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
4578         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
4579         parameters via stack, otherwise use old scheme,
4580         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
4581         assembler output file,
4582         * src/pic16/main.c: added command line options --gstack to enable
4583         push/pop tracing for stack overflow,
4584         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
4585         instructions): added size of each instruction,
4586         * (pic16_countInstruction): estimate size of instructions in
4587         the_pFile list, inline assembly blocks are not counted,
4588         * (pic16_FixRegisterBanking): trace previous register usage, when
4589         banksel optimizations is greater than 0, don't emit a redudant
4590         banksel directive,
4591
4592 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
4593
4594         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
4595         * src/pic16/ralloc.c : applied same fix for pic16.
4596         * src/pic/gen.c : tidied it up a little.
4597
4598 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4599
4600         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
4601         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
4602
4603 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4604
4605         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
4606
4607 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4608
4609         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
4610         non-reentrant function __modsint in the interrupt function (thus
4611         corrupting math operations during serial I/O)
4612         * device/lib/ser_ir.c: as above, changed buffersize
4613         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
4614         256.c,d for zeroing
4615         * doc/Makefile: added option -t for rsync
4616
4617 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4618
4619         * src/SDCCast.h (struct ast),
4620         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
4621
4622 2004-10-20 Borut Razem <borut.razem AT siol.net>
4623
4624         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
4625         package
4626
4627 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
4628
4629         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
4630         makefile targets,
4631         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
4632         support functions to replace long sequences of MOVFF's from access
4633         bank registers to stack and vice versa,
4634         * src/pic16/device.h: added new field opt_flags, where optimization
4635         flags can be set to enable certain features,
4636         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
4637         * pBlock, (genFunction, genEndFunction): surroung loop for
4638         saving/loading used registers in stack with PC_INFO pCodes,
4639         INF_LREGS. Code in between can then be optimized by pCode optimizer
4640         to support function calls,
4641         * (genDataPointerSet): fixed bug which loaded float fields in
4642         structures with corrupt data,
4643         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
4644         in a standard way debug info on stderr. Feature used for developing
4645         and debugging only,
4646         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
4647         obsolete chunks of code,
4648         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
4649         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
4650         * pic16/src/pcode.c (pic16_newpCodeInfo,
4651         * (pic16_newpCodeOpLocalRegs),
4652         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
4653         feature,
4654         * (pic16_pCodeConstString): printing of the initial value of a
4655         symbol as a comment is inhibited since parsing was already done by
4656         copyStr and output is corrupt,
4657         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
4658
4659 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4660
4661         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
4662
4663 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
4664
4665         * as/mcs51/lkarea.c: removed old K&R style,
4666           (lnksect): changed check on boundary error,
4667           (lnksect2): changed check on boundary error,
4668           (lnksect2): extend XSTK to end of page if size = 1
4669         * as/mcs51/lkmain.c: removed old K&R style,
4670           (Areas51): create l_IRAM symbol
4671         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
4672         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
4673           model-mcs51-stack-auto, added model-mcs51-xstack-auto
4674         * device/lib/_mullong.c: added version to be compiled with xstack
4675         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
4676         * device/lib/mcs51/crtxclear.asm: clear pdata as well
4677         * device/lib/mcs51/crtxstack.asm: fixed comment
4678         * src/SDCCglue.c: maxInterrupts defaults to 0,
4679           (emitMaps): added pdata,
4680           (createInterruptVect): (re)moved default,
4681           (glue): added pdata,
4682           (glue): moved __start__xstack to XSTK with default size 1
4683         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
4684           and options.float_rent when options.stackAuto is set,
4685           (linkEdit): only write XDATA_NAME if provided on command line
4686         * src/SDCCmem.h,
4687         * src/SDCCmem.c: added pdata
4688         * src/port.h: added pdata_name to PORT
4689         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
4690           (saveRegisters, unsaveRegisters): removed usage of B,
4691           (genMinus): fixed accumulator clash,
4692           (genJumpTab): added comment, this needs another look
4693         * src/mcs51/gen.c: added check for "B in use" paranoia,
4694           added pushB() and popB()
4695         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
4696           chance
4697         * src/avr/main.c,
4698         * src/ds390/main.c,
4699         * src/hc08/main.c,
4700         * src/mcs51/main.c,
4701         * src/pic/main.c,
4702         * src/pic16/main.c,
4703         * src/xa51/main.c,
4704         * src/z80/main.c: (reset_regparms) made void parameter explicit and
4705           added PSEG (PAG,XDATA) or NULL to port specifier
4706         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
4707         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
4708           (_mcs51_genInitStartup): removed __start__xstack equ,
4709           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
4710         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
4711         * src/z80/gen.c (_rleAppend): fixed warnings
4712         * support/regression/tests/zeropad.c: added pdata test
4713         * .version: bumped to 2.4.6
4714
4715 2004-10-17 Borut Razem <borut.razem AT siol.net>
4716
4717         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
4718         as a part of nightly build
4719
4720 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
4721
4722         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
4723         WREG holds the first byte function parameters,
4724         * (aopForSym): take special case for symbols which are in FARSPACE
4725         but in CODESPACE too,
4726         * (assignResultValue): modified to take into account _G.useWreg,
4727         * (genCall): don't use wreg for parameter passing when function is
4728         declared as reentrant, too, added optimization INCF to stack
4729         pointer when stack parameter count is 1,
4730         * (genFunction, genEndFunction): refurnished and fixed to not using
4731         wreg for passing parameters when function has varargs or is
4732         reentrant, fixed bug with symbol name compare for generating
4733         functions in absolute address,
4734         * (pic16_storeForReturn): refurnished,
4735         * (genCmp): began writing a new version of the function, not ready
4736         yet, therefore it is disabled,
4737         * (genAssign): do not read code memory when assigning a function to
4738         a pointer function,
4739         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
4740         array of characters, not pointer,
4741         * (pic16initialComments): in debug mode emit an .ident directive for
4742         the assembler,
4743         * (_process_pragma): emit a new warning type (internal to pic16)
4744         when setting stack to default length, emit a similar warning when
4745         placing a function at absolute address and address is not word aligned
4746         * (_pic16_parseOptions): added 'return TRUE' statement,
4747         * (_pic16_linkEdit): if compiling a source, then add the source's
4748         file object, first in the list of objects to link,
4749
4750 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
4751
4752         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
4753         * src/pic/main.c : removed VC warning.
4754         * src/pic/gen.c : changed comment.
4755
4756 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
4757
4758         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
4759         reference to a deprecated symbol _GPTRREG was causing failure to
4760         link. Thanks G. M. Gallant for the info.
4761
4762 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
4763
4764         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
4765         comments for Bugs item #954788.
4766
4767 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
4768
4769         * src/pic16/device.c (pic16_dump_gsection,
4770         * pic16_groupRegistersInSection): handle symbols declared to be in
4771         access bank differently,
4772         * src/pic16/gen.c (struct _G): added field resDirect,
4773         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
4774         send values read from stack directly to result and don't allocate
4775         temporary values,
4776         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
4777         same registers,
4778         * (pic16_sameRegsOfs): NEW,
4779         * (freeAsmop): if _G.resDirect is set then do not mark registers as
4780         free because they were not allocated from temporary pool,
4781         * pic16_popRegFromString): workaround to fix a problem with
4782         allocating variables twice or never,
4783         * (genGenPointerGet): using PRODL instead of FSR0H,
4784         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
4785         instead of FSR0H,
4786         * (genAssign): take advantage of the _G.resDirect flag,
4787         * (genCast): around line 11844, use mov2f instead of directly
4788         MOVFF'ing between operands to account for literal values,
4789         * src/pic16/genutils.c: some new debug functions for gpsim have been
4790         added,
4791         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
4792         float with integer part only,
4793         * src/pic16/main.c (_process_pragma): handle pragma udata access to
4794         place variables in access bank
4795         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
4796         updated sources to reflect recent changes in gen.c
4797
4798 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
4799
4800         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
4801         sources that searched for headers in installation path, now the
4802         device/include/pic16 is used,
4803         * src/pic16/glue.c (pic16glue),
4804         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
4805         .line directives if not in debug mode, this suppresses assembler's
4806         warnings for ignored directives
4807
4808 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
4809
4810         * src/port.h: made reset_regparms prototype void parameter explicit.
4811         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
4812         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
4813         * doc/sdccman.lyx: documented warning disabling and how to use
4814           printf_large to make it print floats.
4815         * device/include/stdbool.h: NEW
4816         * device/lib/_atof.c,
4817         * device/lib/_divuint.c,
4818         * device/lib/_divulong.c,
4819         * device/lib/expf.c,
4820         * device/lib/printf_large.c,
4821         * device/lib/sincosf.c,
4822         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
4823         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
4824           a completely reentrant lib.
4825
4826 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
4827
4828         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
4829         * device/include/pic16/stdio.h: fixed bug with colon
4830
4831 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
4832
4833         * device/include/pic16/stdio.h,
4834         * device/include/pic16/stdlib.h,
4835         * device/include/pic16/math.h: NEW
4836         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
4837         declared as _naked to reduce overhead
4838         * device/lib/Makefile.in (target port-specific-objects-pic16):
4839         changed * to *.* so to ignore the CVS directory,
4840         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4841         stacked variables back in stack,
4842         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4843         corruption
4844
4845 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4846
4847         * .version: bumped version number to 2.4.5
4848         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4849         * support/Util/SDCCerr.c (messages structure): added entry for
4850         W_POSSBUG2
4851
4852         Large cumulative patch for pic16 port and libraries.
4853         * device/include/pic16/sdcc-lib.h,
4854         * device/include/pic16/stdarg.h,
4855         * device/include/asm/pic16/features.h,
4856         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4857         * device/include/pic16/float.h: changes reentrant keyword with
4858         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4859         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4860         updated target build-libraries to include objects from gptr,
4861         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4862         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4863         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4864         all function headings,
4865         * src/SDCCmain.c: added global parameter userIncDirsSet,
4866         * (parseCmdLine): when option -I is encountered add directory to
4867         userIncDirsSet too,
4868         * src/version.awk: added space between control and long,
4869         * src/pic16/NOTES: added some notes for the port,
4870         * src/pic16/gen.c: added prototype for mov2fp function,
4871         * (fReturnpic16[]): properly named return value registers,
4872         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4873         * (aopForSym): added code to handle symbols with onStack flag set,
4874         symbols onStack are allocated PTRSIZE bytes,
4875         * (aopFreeAsmop): handles special case where asmops are stack objects,
4876         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4877         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4878         added argument lock to trace flaws in allocating temporary registers
4879         when developing port,
4880         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4881         * (pic16_popRegFromString): reenabled allocating a direct register
4882         from string,
4883         * (assignResultValue): various beautifications,
4884         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4885         referenced function argument,
4886         * (genIpush): reenabled to allow stacked arguments, handles only
4887         ic->parmPush iCodes,
4888         * (genCall, genPcall): major changes to allow for variable argument
4889         functions, fixed a bug with falsely restoring stack pointer after
4890         returning from call,
4891         * (genFunction): pending code for critical function,
4892         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4893         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4894         * (genNearPointerGet): fixed bug with indirect reading, was always
4895         reading from INDF0
4896         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4897         pointers,
4898         * (genAddrOf): rewrote code to take address of a stacked function parameter
4899         * (genCast): fixed casting to generic pointer type,
4900         * src/pic16/gen.h: added AOP_STA,
4901         * (struct asmop): added field stk,
4902         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4903         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4904         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4905         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4906         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4907         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4908         generic pointers,
4909         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4910         and library paths,
4911         * (pic16_port structure): generic pointer size is set to 3,
4912         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4913         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4914         compiler warning,
4915         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4916         operand is an iTemp,
4917
4918 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4919
4920         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4921         * debugger/mcs51/simi.c: addapt new syntax of s51
4922
4923 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4924
4925         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4926         * src/pic16/pcode.c: commented out some calls to free() in order to
4927         fix bug #989576,
4928
4929 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4930
4931         * src/SDCCicode.h,
4932         * src/SDCCicode.c (isiCodeInFunctionCall),
4933         * src/avr/ralloc.c (selectSpil),
4934         * src/pic/ralloc.c (selectSpil),
4935         * src/pic16/ralloc.c (selectSpil),
4936         * src/ds390/ralloc.c (selectSpil),
4937         * src/hc08/ralloc.c (selectSpil),
4938         * src/xa51/ralloc.c (selectSpil),
4939         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4940         stack in the middle of a function call sequence (fixes bug #1020268)
4941         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4942         costs associated with the minimum switch case.
4943
4944 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4945
4946         * src/SDCC.lex: fixed bug #1030549
4947
4948 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4949
4950         * src/SDCCcse.h (struct cseDef),
4951         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4952         over a function call if the CSE is derived from a symbol whose
4953         address has been taken (fixes bug #1029883)
4954         * support/regression/tests/bug-1029883: a new regression test for
4955         this bug
4956
4957 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4958
4959         * src/hc08/gen.c (emitinline): fixed bug #1029778
4960         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4961         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4962         and starts toward RFE #905167)
4963
4964 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4965
4966         * src/pic16/gen.c (mov2f): New function to move an operand to
4967         another without considering if it is a literal or a register,
4968         * (pic16_sameRegs): don't check if they are both AOP_REG,
4969         * (AccRsh): removed andmask=0 lines,
4970         * (genLeftShift): duplicated to be improved in future versions,
4971         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4972         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4973         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4974         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4975         * (insertBankSwitch): fixed inserting banksel directives algorithm
4976         for instructions that follow a skip instruction, this fixes a report
4977         for broken subtraction code generation,
4978         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4979         iCode is a left op, just in case result and right share the same
4980         registers
4981
4982 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4983
4984         * src/hc08/main.c,
4985         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4986         preservation of HX
4987         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4988         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4989         on 2004-09-12; it was buggy
4990
4991 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4992
4993         * src/SDCCsymt.h: removed RESULT_CHECK
4994         * src/SDCCast.c,
4995         * src/SDCCglue.c,
4996         * src/SDCCval.c,
4997         * src/pic/glue.c,
4998         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4999
5000 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
5001
5002         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
5003         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
5004         configuration values no more rejected by compiler, they are assigned
5005         to configuration registers with a warning message instead,
5006         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
5007         the for-loop so last conf register is emitted too,
5008         * (_pic16_initPaths): link library libsdcc.lib by default,
5009         * (_hasNativeMulFor): modified test for multiplication according to
5010         Raphael Neider's remarks. Integer multiplication is also done with
5011         support functions,
5012         * device/include/pic16/pic18fregs.h: corrected type error in while
5013         testing and including 18f6720 header file
5014
5015 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
5016
5017         * src/pic16/device.h (pic16_options): removed field use_crt,
5018         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
5019         until an optimization to handle single bits is added,
5020         * (pic16_loadFSR0): moved before genUnpackBits,
5021         * (genAnd): some white lines removed,
5022         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
5023         leave_reset flags in pic16_options when using crt modules,
5024
5025 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
5026
5027         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
5028           for bugs 898889 & 979599. Also used some safer print instructions.
5029
5030 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
5031
5032         * src/pic16/device.h (pic16_options_t): added field use_crt,
5033         crt_name, no_crt,
5034         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
5035         catch a probable future bug,
5036         * src/pic16/gen.c: aopIdx function commented out,
5037         * (genAssign): commented out old code which used aopIdx,
5038         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
5039         code, added if conditionals to take into account the --use-crt
5040         command line options,
5041         * src/pic16/main.c (pic16_optionsTable): added new command line
5042         options, --use-crt= and --no-crt,
5043         * (_pic16_linkEdit): now the proper crt object is added in the
5044         linker command line except than when --no-crt is specified,
5045         * src/pic16/pcode.c,
5046         * src/pic16/pcode.h: added some structures and functions for a new
5047         optimization scheme to compansate for instruction overhead between
5048         same iCodes, this scheme is currently under development and is not
5049         working in any way,
5050         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
5051         to && operator,
5052         * device/lib/pic16/startup/crt0i.c,
5053         * device/lib/pic16/startup/crt0iz.c: added global char variable
5054         __uflags to force the generation of an idata section
5055
5056 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
5057
5058         * doc/Makefile,
5059         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
5060         * doc/sdccman.lyx: updated sdcc version to 2.4.4
5061
5062 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5063
5064         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
5065         Frieder) and clarified the default code optimization mode
5066
5067 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5068
5069         * src/SDCC.lex (doPragma, process_pragma),
5070         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
5071         "opt_code_size", and "opt_code_balanced"
5072         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
5073         regrouped options by category, added support for category headers
5074         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
5075         and "--opt-code-size"
5076         * doc/sdccman.lyx: documented these new options and pragmas
5077         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
5078         preference into account
5079
5080 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5081
5082         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
5083           geniCodePreDec): Fixed bug 904237 by generating a warning
5084         * src/SDCCerr.h,
5085         * src/SDCCerr.c: added warning W_SIZEOF_VOID
5086
5087 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
5088
5089         * src/pic/device.c : When no max ram set validate full memory range.
5090         * src/pic/pcode.c,
5091         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
5092
5093 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5094
5095         * device/lib/_gptrget.c,
5096         * device/lib/_gptrput.c: updated comment
5097         * device/lib/calloc.c,
5098         * device/lib/free.c,
5099         * device/lib/malloc.c,
5100         * device/lib/realloc.c: added LGPL, made them reentrant-safe
5101         * src/SDCCcse.c (cseBBlock),
5102         * src/SDCCicode.c (printOperand, geniCodeArray),
5103         * src/SDCCicode.h (struct operand): fixed bug 868103
5104         * support/regression/tests/bug-868103.c: added
5105         * src/SDCCast.c (searchLitOp),
5106         * src/SDCCcse.h (struct cseDef),
5107         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
5108         * src/SDCCicode.h (struct operand),
5109         * src/SDCCsymt.h (struct sym_link),
5110         * src/avr/gen.c (hasInc),
5111         * src/ds390/gen.c (hasInc),
5112         * src/hc08/gen.c (genPlusIncr, hasInc),
5113         * src/mcs51/gen.c (hasInc),
5114         * src/pic16/glue.c (pic16_printIvalChar),
5115         * src/pic16/ralloc.c (regWithIdx),
5116         * src/xa51/gen.c (hasInc) : removed warnings
5117         * src/SDCCast.c (createBlock): added comment ???
5118         * src/hc08/ralloc.c: updated comments
5119
5120 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5121
5122         * doc/sdccman.lyx: updated section on switch statements, added
5123         section about semaphore locking
5124         * doc/Makefile: added option -info for latex2html
5125         * device/lib/_gptrget.c,
5126         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
5127
5128 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5129
5130         * src/pic/device.h,
5131         * src/pic/device.c,
5132         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
5133          maxram is less than 0x100.
5134
5135 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5136
5137         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
5138
5139 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5140
5141         * src/port.h,
5142         * src/mcs51/main.c,
5143         * src/ds390/main.c,
5144         * src/z80/main.c,
5145         * src/hc08/main.c,
5146         * src/pic/main.c,
5147         * src/pic16/main.c,
5148         * src/avr/main.c,
5149         * src/xa51/main.c
5150         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
5151         a jump table is the best form for a switch statement, including
5152         automatic insertion of missing cases to make the case range
5153         continuous. Developed in collaboration with Frieder Ferlemann.
5154
5155 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5156
5157         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
5158         accumulator result if it needs sign extension
5159
5160 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5161
5162         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
5163
5164 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5165
5166         * device/lib/gbz80/printf.c,
5167         * device/lib/z80/printf.c: removed define for NULL
5168
5169 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5170
5171         * as/xa51/xa_link.c,
5172         * device/examples/ds390/ow390/ad26.c,
5173         * device/examples/ds390/ow390/cnt1d.c,
5174         * device/examples/ds390/ow390/counter.c,
5175         * device/examples/ds390/ow390/ds2480.h,
5176         * device/examples/ds390/ow390/ds2480ut.c,
5177         * device/examples/ds390/ow390/findtype.c,
5178         * device/examples/ds390/ow390/gethumd.c,
5179         * device/examples/ds390/ow390/owllu.c,
5180         * device/examples/ds390/ow390/ownetu.c,
5181         * device/examples/ds390/ow390/swt12.c,
5182         * device/examples/ds390/ow390/swtloop.c,
5183         * device/examples/ds390/ow390/temp.c,
5184         * device/examples/ds390/ow390/temp10.c,
5185         * device/examples/ds390/ow390/thermo21.c,
5186         * device/examples/ds390/ow390/tinilnk.c,
5187         * device/examples/ds390/ow390/tstfind.c,
5188         * device/examples/serialcomm/windows/serial.cpp,
5189         * device/examples/serialcomm/windows/test_serialcomm.cpp,
5190         * device/include/reg51.h: fixed line endings for cvs
5191
5192 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5193
5194         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
5195         packRegsForAccUse, packRegisters): new accumulator register
5196         packing algorithm
5197         * support/regression/ports/hc08/support.c (_putchar): suppress
5198         warning of unused variable
5199         * src/SDCCicode.c: added SWAP entry to codeTable
5200
5201 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
5202
5203         * device/lib/sprintf.c: forgot to add this file before previous commit
5204
5205 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
5206
5207         * src/pic16/gen.c (genPackBits): added operand right in function
5208         parameters, load result directly if p_type is POINTER (that is
5209         called by genNearPointerSet)
5210         * (genUnPackBits): added operand left in function parameters,
5211         * (genNearPointerGet, genNearPointerSet): prevent the loading of
5212         FSR0 if accessing bitfields,
5213
5214 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
5215
5216         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
5217           _print_format; updated printf, sprintf, vsprintf
5218         * device/include/asm/default/features.h: corrected comment/define
5219         * device/lib/Makefile.in: added sprintf.c
5220         * device/lib/libsdcc.lib: added sprintf module
5221         * device/lib/printf_large.c,
5222         * device/lib/vprintf.c,
5223         * device/lib/sprintf.c: totally refactored printf_large and vprintf
5224           into these 3 files
5225         * support/regression/Makefile: changed ALL_PORTS into a usefull default
5226         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
5227         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
5228           hc08 test
5229         * support/regression/tests/zeropad.c: define idata as data for hc08
5230
5231 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5232
5233         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
5234         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
5235         labels are referenced at least once (even if a reference is not found)
5236         * src/hc08/gen.c (emitcode): set isComment flag for comments
5237         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
5238         loads), rules 6a..6b (optimize jumps to return)
5239
5240 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5241
5242         * device/lib/acosf.c (acosf),
5243         * device/lib/asinf.c (asinf),
5244         * device/lib/atanf.c (atanf),
5245         * device/lib/ceilf.c (ceilf),
5246         * device/lib/cosf.c (cosf),
5247         * device/lib/coshf.c (coshf),
5248         * device/lib/cotf.c (cotf),
5249         * device/lib/fabsf.c (fabsf),
5250         * device/lib/floorf.c (floorf),
5251         * device/lib/log10f.c (log10f),
5252         * device/lib/logf.c (logf),
5253         * device/lib/sinf.c (sinf),
5254         * device/lib/sinhf.c (sinhf),
5255         * device/lib/sqrtf.c (sqrtf),
5256         * device/lib/tanf.c (tanf),
5257         * device/lib/tanhf.c (tanhf),
5258         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
5259         replaced all instances of "reentrant" in the library functions
5260         defined in math.h with this macro.
5261         * support/regression/tests/float_trans.c: reenabled test for hc08
5262
5263 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
5264
5265         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
5266         erroneously deleted
5267
5268 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5269
5270         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
5271         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
5272         multi-byte volatile operands are used
5273         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
5274         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
5275         initialization to area GSINIT0 so that it would always precede
5276         any static initializers in GSINIT
5277         * support/regression/tests/zeropad.c: fixed idata define for hc08
5278         * support/regression/tests/bug-927659.c,
5279         * support/regression/tests/float_trans.c: disabled tests for hc08
5280         pending missing library routines
5281         * .version: increased version number to 2.4.4 - hc08 port now passes
5282         regression tests
5283
5284
5285 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
5286
5287         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
5288         * Makefile.common.in,
5289         * as/Makefile,
5290         * as/hc08/Makefile.in,
5291         * as/mcs51/Makefile.in,
5292         * as/z80/Makefile.in,
5293         * debugger/mcs51/Makefile.in,
5294         * device/include/Makefile.in,
5295         * device/lib/Makefile.in,
5296         * doc/Makefile,
5297         * link/Makefile,
5298         * link/z80/Makefile.in,
5299         * packihx/Makefile.in,
5300         * sim/ucsim/main_in.mk,
5301         * sim/ucsim/avr.src/Makefile.in,
5302         * sim/ucsim/doc/Makefile.in,
5303         * sim/ucsim/gui.src/serio.src/Makefile.in,
5304         * sim/ucsim/hc08.src/Makefile.in,
5305         * sim/ucsim/s51.src/Makefile.in,
5306         * sim/ucsim/xa.src/Makefile.in,
5307         * sim/ucsim/z80.src/Makefile.in,
5308         * src/Makefile.in,
5309         * support/cpp2/Makefile.in,
5310         * support/librarian/Makefile,
5311         * support/makebin/Makefile: added DESTDIR to the install path proposed
5312         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5313         * doc/sdccman.lyx: added DESTDIR documentation
5314
5315 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5316
5317         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5318         instruction for interrupt handlers, use fast returns when returning
5319         from high priority interrupts
5320
5321 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5322
5323         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5324         code generation
5325         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5326         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5327         bugs, ported much of Bernhard's code from mcs51
5328         * src/mcs51/gen.c (genSend),
5329         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5330         than one when calling a reentrant function
5331         * device/lib/_mullong.c: defined an alternate struct layout for big
5332         endian ports (hc08)
5333
5334 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5335
5336         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5337         test
5338
5339 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5340
5341         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5342         are sane and complete before asking the port its prefered parameter
5343         passing method (fixes bug #1017633)
5344         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5345         and _ret3
5346
5347 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5348
5349         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
5350         problem in bitfields >= 8 bits.
5351
5352 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5353
5354         * src/SDCCsymt.c: undid changes that were not meant to be committed
5355
5356 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5357
5358         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
5359
5360 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5361
5362         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
5363           copied and wrong bit got inverted
5364
5365 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5366
5367         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
5368         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
5369         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
5370         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
5371         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
5372         assignments to bitfields at known addresses
5373         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
5374         reads from bitfields at known addresses
5375         * src/hc08/ralloc.c (packRegisters),
5376         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
5377         genhc08Code): optimize pointer get values used as conditionals
5378         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
5379         and branch
5380
5381 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5382
5383         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
5384         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
5385         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
5386         as conditionals
5387
5388 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5389
5390         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
5391
5392 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5393
5394         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
5395         related problems
5396
5397 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
5398
5399         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
5400
5401 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5402
5403         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
5404         mcs51 port
5405
5406 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
5407
5408         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
5409
5410 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5411
5412         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
5413         cases use more compact code.
5414
5415 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
5416
5417         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
5418
5419 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5420
5421         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
5422
5423 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5424
5425         * src/SDCCsymt.h,
5426         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
5427         parameter of changePointer() from symbol* to sym_link*
5428         * src/SDCCast.c (decorateType): call changePointer() for CAST op
5429         * src/SDCCsymt.c (compareType): void* type is castable to other
5430         pointers, but not necesarily an exact match.
5431         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
5432         is no longer blindly treated as an exact match.
5433         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
5434
5435 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
5436
5437         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
5438
5439 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
5440
5441         * src/pic/gen.c,
5442         * src/pic/pcode.c,
5443         * src/pic/ralloc.h,
5444         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
5445
5446 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
5447
5448         * src/pic/device.c,
5449         * src/pic/device.h,
5450         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
5451
5452 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5453
5454         * src/mcs51/gen.c (emitcode): fixed bug #992819
5455
5456 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
5457
5458         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
5459           there's no need to make it worse
5460
5461 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5462
5463         * src/mcs51/ralloc.c (deassignLR),
5464         * src/ds390/ralloc.c (deassignLR),
5465         * src/hc08/ralloc.c (deassignLR),
5466         * src/z80/ralloc.c (deassignLR),
5467         * src/pic/ralloc.c (deassignLR),
5468         * src/pic16/ralloc.c (deassignLR),
5469         * src/avr/ralloc.c (deassignLR),
5470         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
5471         rlivePoint): fixed another part of bug #971834
5472
5473 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5474
5475         * src/z80/main.c: enabled "critical" keyword
5476         * src/z80/mappings.i,
5477         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
5478         functions (fixes bug #979646)
5479         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
5480
5481 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5482
5483         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
5484           such as c:\mydir.
5485
5486 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
5487
5488         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
5489           doesn't disable too much optimizations
5490
5491 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5492
5493         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
5494
5495 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
5496
5497         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
5498
5499 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5500
5501         * src/pic/gen.c tidied up tabs
5502         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
5503         * src/pic/main.c tidied up tabs
5504         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
5505         * src/pic/pcoderegs.c tidied up tabs
5506         * src/pic/ralloc.c tidied up tabs
5507
5508 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
5509
5510         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
5511         to S_FIXED for pic16 port and when symbol is not in level 0,
5512         allocate for S_REGISTER storage class and pic16 port, too,
5513         * src/pic16/device.h: prototype for checkSym,
5514         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
5515         * (pic16_assignConfigWordValue): test the value and the mask to
5516         validate that the value is suitable for the configuration word,
5517         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
5518         collect extern declared symbols, don't emit symbol twice, check
5519         first if symbol is in publics set first,
5520         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
5521         * added command line '--fstack' which enables an experimental
5522         feature for stack access, too buggy to be used yet...
5523         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
5524         * (pic16_allocDirReg): when register has storage class S_REGISTER
5525         allocate in pic16_dynAccessRegs,
5526         * device/include/pic16/pic18f????.h: modified configuration word
5527         naming convention, words started as CONFIG0H but should be CONFIG1H
5528
5529 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
5530
5531         * device/include/mcs51reg.h: fixed bug 970993
5532
5533 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
5534
5535         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
5536         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
5537         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
5538         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
5539         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
5540         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
5541           error/warning numbers,
5542           added function setWarningDisabled()
5543         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
5544         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
5545           _memcmp.c _memmove.c calloc.c realloc.c free.c
5546         * support/regression/tests/malloc.c: added tests for new functionality
5547         * support/regression/tests/zeropad.c: added tests for truncated initializers
5548           and initialized char arrays starting with '\x0'
5549         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
5550
5551 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
5552
5553         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
5554
5555 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5556
5557         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
5558         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
5559         peephole 177.e. Thanks to anonymous
5560
5561 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
5562
5563         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
5564         function isn't used in the source but referenced as a
5565         variable initializer then declare it as extern in .asm file
5566
5567 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
5568
5569         * .version: increased version number to 2.4.3
5570
5571         Adding version extension according to ChangeLog CVS revision
5572         * src/Makefile.in (target all): added dependency 'version.h'
5573         * (rule version.h): added rule to create version.h from ChangeLog,
5574         * (rule dep): added dependency version.h,
5575         * src/version.awk: AWK script to create version.h
5576         * src/SDCCdwarf2.c (dwWriteModule),
5577         * src/SDCCglue.c (initialComments),
5578         * src/SDCCmain.c (printVersionInfo): modified to write after
5579         version string the version extension number,
5580         * src/SDCCutil.c: included "version.h"
5581         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
5582         number,
5583         * src/SDCCutil.h: added prototype for getBuildNumber
5584
5585         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
5586         includeDirsSet, too,
5587         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
5588         const char [] is found in function prototype...
5589
5590         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
5591         moving to WREG with source is already in WREG,
5592         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
5593         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
5594         * (aopForSym): stack'ed symbols are partially supported, added
5595         if-clause to support symbols in FARSPACE,
5596         * (sameRegs): added test for AOP_ACC to see if registers are same,
5597         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
5598         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
5599         * (pic16_popRegFromString): will not allocate a new register if it
5600         doesn't find one by name, bug may have introduced...
5601         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
5602         * (genIpush): revived to use pic16 port's stack,
5603         * (genAddrOf): added incomplete case for stack'ed operand,
5604         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
5605         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
5606         can handle multibyte operands,
5607         * src/pic16/glue.c (pic16_printIval*): some debug info added,
5608         * (pic16initialComments): added message for MPLAB compatibility
5609         mode enabled,
5610         * src/pic16/main.h: prototype for pic16_mplab_comp,
5611         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
5612         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
5613         * (_pic16_linkEdit): NEW, handles link stage, transferred here
5614         because of increased complexity of procedure,
5615         * (_process_pragma): stack pragma changed to format 'stack pos len',
5616         emit symbol '_stack_end' to conform with gplink,
5617         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
5618         to search for register,
5619         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
5620         PO_GPR_REGISTER,
5621         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
5622         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
5623         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5624         case for PO_GPR_REGISTER,
5625         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
5626         dies, the new era is ahead !...
5627         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
5628         pic16_dynInternalRegs,
5629         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
5630         * (pic16_allocDirReg): minor optimizations and bug fixes,
5631         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
5632
5633         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
5634         load stack and frame pointer with address of 'stack_end' symbol
5635
5636 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
5637
5638         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
5639         without source code but only variable initializers
5640
5641 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
5642
5643         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
5644         external are not declared as extern to reduce overhead while linking
5645
5646 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
5647
5648         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
5649
5650 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
5651
5652         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
5653           Yee Keat for the patch
5654         * src/SDCCast.c (decorateType): fixed bug #979599
5655         * src/ds390/gen.h: removed local fReturnSizeDS390
5656         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
5657         * src/ds390/gen.c (genAnd, genOr, genXor),
5658         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
5659
5660 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
5661
5662         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
5663         add relFilesSet to $3, manipulate $2 to handle linking of object
5664         files without source files in command line,
5665         * device/include/pic16 (all headers): added ID location macros,
5666         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
5667         entries for ID location bytes,
5668         * (pic16_assignIdByteValue): NEW,
5669         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
5670         added field dumpcalltree to pic16_options_t,
5671         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
5672         is used instead of pic16_Gstack_base_addr, check if (ifx) before
5673         emitting rFalseIfx label after check_carry label,
5674         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
5675         pic16_emitDIRegs), NEW
5676         * (pic16glue): dump .calltree file when option --calltree found,
5677         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
5678         * (_pic16_genAssemblerPreamble): emit ID locations after
5679         configuration registers,
5680         * (pic16_linkCmd): modifications of the link command,
5681         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
5682         * (pic16_pCodeInitRegisters): don't init stack registers,
5683         * (pic16_findPrevInstruction): fixed bug,
5684         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
5685         bug with immediate registers,
5686         * (buildCallTree): traces stack push and pop,
5687         * (pct2): dump also stack usage for each function,
5688         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
5689         * (pic16_allocDirReg): various modifications,
5690         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
5691         fixed to 1,
5692
5693 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
5694
5695         * src/pic16/pcode.c: removed buggy double colon
5696
5697 2004-07-01 Borut Razem <borut.razem AT siol.net>
5698
5699         * support/scripts/sdcc.nsi: added include/pic16 to setup
5700
5701 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
5702
5703         * device/lib/Makefile.in: fixed bug in target objects-pic16,
5704         * device/lib/pic16/Makefile: prefixed with dash (-) command under
5705         target 'clean',
5706         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
5707         specific command line arguments. Also added sample lkr script
5708         for placing a variable at a specific memory bank.
5709         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
5710         at a specific memory bank,
5711         * (pic16_dump_isection): fixed bug which caused string literals to
5712         be omitted when dumping idata section,
5713         * (pic16_groupRegistersInSection): added code to handle registers
5714         in specific memory banks,
5715         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
5716         public, all references are renamed too,
5717         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
5718         AOP_DPTR2,
5719         * (pic16_storeForReturn): added case to handle when dest is WREG,
5720         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
5721         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
5722         pic16_rel_udata, check to see if that register is marked as being
5723         a member of a specific memory bank,
5724         * (pic16_printIvalCharPtr): added code to add string literals either
5725         to code or the idata sections,
5726         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
5727         also accept the 'udata' pragma,
5728         * src/pic16/main.h: new structure types sectName and sectSym
5729         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
5730         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
5731         * (pic16_findPrevInstruction): fixed, it returned nothing,
5732         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
5733         instruction combinations,
5734         * (pic16_FixRegisterBanking): heavily reorganised,
5735         * (pic16_AnalyzeBanking): if generating banksel directives is
5736         disabled, then don't call FixRegisterBanking at all,
5737         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
5738         completely removed,
5739         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
5740
5741 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
5742
5743         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
5744         Phuah Yee Keat <yk.phuah AT nestac.com>
5745
5746 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5747
5748         * src/pic16/glue.c (pic16createInterruptVect): function now emits
5749         correctly the IVT even if it is relocated to some other location
5750
5751 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5752
5753         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
5754         * device/include/pic16/pic18f2220.h: NEW,
5755         * device/lib/pic16/libdev/pic18f2220.c: NEW,
5756         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
5757         * src/pic16/device.c (struct Pics16): added info for 18f2220,
5758         * src/pic16/device.h (struct pic16_options): added ivt_loc and
5759         nodefaultlibs, ivt_loc is the location of the interrupt vector
5760         table, and nodefaultlibs signs that default libraries should not be
5761         linked in link stage,
5762         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
5763         according to --ivt-loc argument,
5764         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
5765         when pragma stack is found,
5766
5767 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5768
5769         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
5770         256 (range check), 257 (do while), 258.a-f (bit banging
5771         f.e. on 3-wire SPI bus)
5772
5773 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5774
5775         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
5776         variables used exclusively within a loop
5777
5778 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
5779
5780         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
5781
5782 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5783
5784         * src/SDCClrange.c (computeClash): fixed bug #971834
5785
5786 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5787
5788         * src/mcs51/gen.c (genCmp): fixed bug #975903
5789         * src/hc08/gen.c (operandsEqu),
5790         * src/ds390/gen.c (operandsEqu),
5791         * src/z80/gen.c (operandsEqu),
5792         * src/pic/gen.c (operandsEqu),
5793         * src/pic16/gen.c (operandsEqu),
5794         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
5795         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
5796
5797 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5798
5799         * src/SDCCcse.c (cseBBlock): fixed bug #966963
5800
5801 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
5802
5803         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
5804         default case in switch statement,
5805         * glue.c (pic16_initPointer): expr is initialised via decoarteType
5806         to eliminate problem with initialisation of pointers, but problem
5807         still exists,
5808         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
5809         * (emitStaticSegment): removed various lines emitting debug info,
5810         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
5811         added processor registers for utilizing EEPROM,
5812         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
5813         configurable and set 8
5814
5815 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
5816
5817         * .version: increased version number to 2.4.2,
5818
5819         Cumulative patch for pic16 port
5820         * src/pic16/device.c: changed scheme to dump initial values for
5821         variables in idata segment, all print_idata* functions were removed,
5822         now the pic16_printIval* will be called,
5823         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
5824         * _pic16_printPointerType, pic16_printPointerType,
5825         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
5826         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
5827         NEW, similar to the respective functions in SDCCglue.c,
5828         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
5829         way, emitting hex bytes,
5830         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
5831
5832 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5833
5834         * src/avr/ralloc.c (serialRegAssign),
5835         * src/xa51/ralloc.c (serialRegAssign),
5836         * src/pic/ralloc.c (serialRegAssign),
5837         * src/pic16/ralloc.c (serialRegAssign),
5838         * src/hc08/ralloc.c (serialRegAssign),
5839         * src/z80/ralloc.c (serialRegAssign),
5840         * src/ds390/ralloc.c (serialRegAssign),
5841         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5842
5843 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5844
5845         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5846         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5847
5848 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5849
5850         Cumulative patch for pic16 port:
5851         * src/pic16/device.h (typedef PIC16_device) modified fields for
5852         defining microcontrollers,
5853         * src/pic16/device.c: added new info for all devices in Pics16 array,
5854         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5855         to be optimised out by the pCode optimiser,
5856         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5857         specially, bug reported by G.M. Gallant,
5858         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5859         as force'd so that cannot be optimised out by pCode optimiser,
5860         * src/pic16/pcode.c,
5861         * src/pic16/pcodepeeph.c,
5862         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5863         they are disabled by default, but can be enabled explicit with
5864         command argument --denable-peeps, for testing,
5865         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5866         --pomit-ivt in COMPILE_FLAGS
5867
5868 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5869
5870         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5871           compilation on MSVC
5872
5873 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5874
5875         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5876
5877 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5878
5879         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5880         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5881
5882 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5883
5884         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5885         would only assign 0x300001 register.
5886
5887 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5888
5889         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5890         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5891
5892 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5893
5894         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5895         for ds80c400
5896         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5897         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5898         added peephole 254 (left shift), 255 (jump table)
5899
5900 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5901
5902         * device/lib/Makefile.in: removed comment line with model-pic16,
5903         * (target port-specific-objects-pic16): the libraries and objects
5904         are copied to the build directory form the device/lib/pic16/bin
5905         directory
5906
5907         Cumulative patch concerning pic16 port:
5908         * library directory has been re-organized,
5909         * added support for PIC18F1220,
5910         * added headers and library sources for chips 18f1220,18f6520,
5911         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5912
5913         * configuration registers setting has changed, now each supported
5914         device has a complete description of the registers it uses,
5915         * all initialisations are moved to idata sections, these section
5916         can be absolute or relocatable,
5917         * fixed initialisation of codespace variables,
5918         * fixed warning about PCLATU and gpsim,
5919         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5920         * (genAssign): use table reads when assigning from variables in codespace,
5921         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5922         char/int variables placed in codespace,
5923         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5924         registers set in .asm file, no need for --pomit-config-words anymore,
5925         * (pic16glue): some 8051 legacy segments are commented out
5926         (to be removed completely),
5927         * added support for alternative assembler and linker with --asm=
5928         and --link= command line arguments,
5929         * peepholes are disabled automatically in the port, no need to
5930         specify on command line,
5931         * port supports natively char/int/long multiplication, but converts
5932         all divisions to support functions,
5933         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5934         to the file set in variable $2,
5935         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5936         strings in ASCII format and not in hex,
5937         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5938         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5939         allocate proper register if iCodes aren't temporary,
5940
5941 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5942
5943         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5944
5945 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5946
5947         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5948         is commented out
5949
5950 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5951
5952         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5953         computed address is reused
5954         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5955         multi-byte bitfields
5956
5957 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5958
5959         * src/z80/gen.c: (genArrayInit): must check for pointers too
5960
5961 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5962
5963         * support/regression/tests/zeropad.c: never meant to commit the
5964           nestedstruct test: removed, added check for GCC version
5965
5966 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5967
5968         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5969         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5970         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5971           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5972           bugs 928906 and 954082 half-empty initializers
5973         * src/SDCCsymt.h,
5974         * src/SDCCsymt.c (getAllocSize): added for above fix
5975         * src/z80/gen.c (genArrayInit): fixed bug 741044
5976         * support/regression/tests/zeropad.c: added tests
5977
5978 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5979
5980         * src/pic16/device.c (pic16_dump_section): corrected bug which
5981         caused some symbols of the libraries to be misplaced
5982
5983 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5984
5985         * src/pic16/glue.c,
5986         * src/pic16/ralloc.h,
5987         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5988         to fix conflict with pic port
5989
5990 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5991
5992         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5993         externs configuration variables,
5994         * src/pic16/ralloc.h,
5995         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5996         prototype in header, commented out some debug messages
5997
5998 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5999
6000         * src/pic16/glue.c,
6001         * src/pic16/main.c,
6002         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
6003         for gpasm COFF object generation. Thanks to D. Hawkins for
6004         his patch info
6005
6006 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6007
6008         * src/ds390/main.c,
6009         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
6010         Brock for spotting this)
6011         * src/ds390/gen.c (genEndFunction),
6012         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
6013         interrupt handler and critical. Disable push/pop optimizations when
6014         peephole optimizations disabled.
6015
6016 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6017
6018         Updated pic16 library sources and headers.
6019         * device/lib/pic16/pic18f*/ ,
6020         * device/include/pic16/*.h: modified to handle structured SFR
6021         definitions
6022
6023 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6024
6025         * src/port.h (PORT structure): added hook initPaths, now each
6026         port can declare its own default search paths,
6027         which can been seen with the --print-search-dirs option,
6028         see pic16 port for example,
6029         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
6030         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
6031         * (doPrintSearchDirs): NEW, replaces in a central manner the
6032         printing of search dirs which was split in set*Paths functions,
6033         * (main): added call to port->initPaths and doPrintSearchDirs,
6034         * src/avr/main.c,
6035         * src/ds390/main.c,
6036         * src/hc08/main.c,
6037         * src/izt/i186.c,
6038         * src/izt/tlcs900h.c,
6039         * src/mcs51/main.c,
6040         * src/pic/main.c,
6041         * src/pic16/main.c: modified port structures to reflect addition of
6042         initPaths hook,
6043
6044         * src/pic16/device.c (regCompare): registers are finally sorted by name,
6045         * (pic16_dump_section): for registers in same address reserve memory once,
6046         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
6047         to no_banksel,
6048         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
6049         result is greater in size than right or left,
6050         * (pic16_genUMult8X8_8): there are some cases where the result can
6051         be 16 bits size, so handle these,
6052         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
6053         * (pic16_outBitC): modified to emit pcodes,
6054         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
6055         or not,
6056         * (genDivOneByte): implemented algorithm to divide 8-bits,
6057         * (genCmp): uncommented goto, but issues still exist,
6058         * (genAnd): fixed a bug with variables >8bits,
6059         * (genPackBits): optimization added that uses BCF/BSF to change a
6060         single bit,
6061         * (genAssign): fixed bug when assigning floating point literals,
6062         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
6063         __sdcc_gsinit_startup label,
6064         * src/pic16/main.c (_pic16_init): removed search directory
6065         initialisations,
6066         * (_pic16_initPaths): NEW, used to initialise search directories,
6067         * (_hasNativeMulFor): support functions for all except char/int
6068         multiplication, and char division,
6069         * (PIC16_port struct): modified entry for native mul support,
6070         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
6071         no_banksel option,
6072         * (buildCallTree): call to register_usage is ifdef'ed out,
6073
6074 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6075
6076         * device/include/string.h: applied Stas Sergeev's patch to make this
6077         header file compatible with the preprocessor -Wundef option
6078         * src/SDCCmain.c (main): abort compilation if preprocessor reports
6079         failure (fixes bug #941458)
6080
6081 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6082
6083         * src/SDCCopt.c (killDeadCode): fixed bug #907733
6084         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
6085         that the variable, not the function, should be static
6086         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
6087         to be consistent with non-literal case
6088
6089 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6090
6091         * src/SDCCast.c (isConformingBody): fixed bug #949967
6092         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
6093         convilong): fixed bug #952086
6094
6095 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6096
6097         * src/SDCCmem.c (allocVariables): fixed bug #955321
6098
6099 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6100
6101         * src/hc08/main.c (_hc08_genAssemblerEnd),
6102         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
6103         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
6104         completely eliminated the use of a temporary file
6105         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
6106         when more than one file linked
6107         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
6108
6109 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6110
6111         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
6112         which fixes bug #543481
6113         * support/regression/tests/bug-751703.c: fixed comments left from a
6114         cut and paste error
6115         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
6116         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
6117         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
6118         scopes
6119         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
6120         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
6121         are now changed to underscores in moduleName
6122
6123 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6124
6125         * as/mcs51/lkmem.c: better fix for bug #954173
6126
6127 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
6128         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6129
6130         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
6131         * device/include/c8051f000.h,
6132         * device/include/c8051f120.h,
6133         * device/include/c8051f300.h,
6134         * device/include/c8051f310.h,
6135         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
6136         PWM16) and detab'ed
6137
6138 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6139
6140         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
6141         and mailing lists, doc'ed --no-peep-comments, removed reference
6142         to knoppix (newest version has no LyX/LaTeX), other minor changes
6143         * src/SDCCglue.c (glue): save 2 bytes stack space with
6144         option --main-return. The ljmp could probably be avoided too
6145
6146 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6147
6148         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
6149
6150 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6151
6152         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
6153         * src/SDCCopt.c (isLocalWithoutDef),
6154         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
6155         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
6156         (credit to Maarten Brock for patch #949363, on which this is based)
6157         * support/regression/tests/bug-751703.c: some test cases of extern used
6158         within inner scopes.
6159
6160 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6161
6162         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
6163         SPEC_STRUCT
6164         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
6165         struct definitions
6166         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
6167         dwWriteLabel): fix to create valid debugger symbols even when
6168         the module name has non-alphanumeric symbols in it
6169         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
6170         when a variable's allocation has been optimized away
6171
6172
6173 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6174
6175         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
6176         * src/hc08/main.c,
6177         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
6178         * src/mcs51/main.c,
6179         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
6180         * src/ds390/main.c,
6181         * src/z80/gen.c (z80_emitDebuggerSymbol),
6182         * src/z80/main.c,
6183         * src/pic/gen.c (pic14_emitDebuggerSymbol),
6184         * src/pic/main.c,
6185         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
6186         * src/pic16/main.c,
6187         * src/avr/gen.c (avr_emitDebuggerSymbol),
6188         * src/avr/main.c,
6189         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
6190         * src/xa51/main.c,
6191         * src/SDCCdebug.c (emitDebuggerSymbol),
6192         * src/SDCCdebug.h,
6193         * src/port.h: added a debugger struct to the port struct. Added a
6194         callback for defining debugger symbols
6195
6196         * src/SDCCast.c (createLabel),
6197         * src/SDCC.y (labeled_statement): mark all compiler generated labels
6198         with isitmp = 1
6199         * src/SDCCicode.h,
6200         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
6201         iCode back to the ast for the function
6202
6203         * src/hc08/ralloc.c (hc08_assignRegisters),
6204         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
6205         unneeded fields from the regs struct.
6206         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
6207         pushReg() & pullReg() functions instead of emitcode()
6208
6209         * src/hc08/gen.c (genLabel, genhc08Code),
6210         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
6211
6212         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
6213         debugger hooks
6214
6215         * src/hc08/gen.c (genEndFunction, genhc08Code),
6216         * src/hc08/gen.h,
6217         * src/mcs51/gen.c (genEndFunction, gen51Code),
6218         * src/mcs51/gen.h,
6219         * src/ds390/gen.c (genEndFunction, gen390Code),
6220         * src/ds390/gen.h,
6221         * src/z80/gen.c (genEndFunction, genZ80Code),
6222         * src/z80/gen.h,
6223         * src/z80/z80.h,
6224         * src/pic/gen.c (genEndFunction, genpic14Code),
6225         * src/pic/gen.h,
6226         * src/pic16/gen.c (genEndFunction, genpic16Code),
6227         * src/pic16/gen.h,
6228         * src/avr/gen.c (genEndFunction, genAVRCode),
6229         * src/avr/gen.h,
6230         * src/xa51/gen.c (genEndFunction, genXA51Code),
6231         * src/xa51/gen.h,
6232         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
6233         specific code to cdbFile.c and out of the backend code generators
6234
6235         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
6236         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
6237         starting address is now 0
6238
6239         * as/hc08/asm.h,
6240         * as/hc08/m08pst.c,
6241         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
6242         assembler directive for DWARF support
6243         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
6244
6245         * src/src.dsp,
6246         * src/Makefile.in,
6247         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
6248
6249 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6250
6251         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
6252         and inappropriate peephole optimization in jump tables
6253
6254 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6255
6256         * as/hc08/m08pst.c,
6257         * src/SDCCglue.c: sdccopt works for the hc08 port now
6258
6259 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
6260
6261         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
6262
6263 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6264
6265         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
6266
6267 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6268
6269         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
6270         rules
6271         * src/SDCCmain.c,
6272         * src/SDCCglobl.h,
6273         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
6274         comments from the peephole optimizer replacement rules
6275         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
6276         symbols
6277         * src/SDCCcse.c (updateSpillLocation),
6278         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
6279         equivalents
6280         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
6281         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
6282         objects far pointers
6283
6284 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6285
6286         * src/SDCCsymt.h: a missing part of my last change
6287         * src/pic/ralloc.c (regTypeNum),
6288         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
6289
6290 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6291
6292         * src/SDCCicode.h,
6293         * src/SDCCicode.c (aggrToPtrDclType),
6294         * src/SDCCptropt.h,
6295         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
6296         ptrPseudoSymConvert),
6297         * src/pic/ralloc.c (regTypeNum),
6298         * src/pic16/ralloc.c (regTypeNum),
6299         * src/hc08/ralloc.c (regTypeNum),
6300         * src/ds390/ralloc.c (regTypeNum),
6301         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
6302         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
6303
6304 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6305
6306         * link/z80/lkmain.c (afile),
6307         * as/hc08/lkmain.c (afile),
6308         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
6309         prevent a pointer problem when a filename has no directory and
6310         no extension specified.
6311
6312 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6313
6314         * link/z80/lkmain.c (afile): allow periods in directory names
6315         * link/z80/lkmain.c (afile),
6316         * as/mcs51/lkmain.c (afile),
6317         * as/hc08/lkmain.c (afile): allow linker script file to have an
6318         extension other than ".lnk"
6319         * link/z80/lklex.c (getfid),
6320         * link/z80/lkmain.c (parse),
6321         * as/mcs51/lklex.c (getfid),
6322         * as/mcs51/lkmain.c (parse),
6323         * as/hc08/lklex.c (getfid),
6324         * as/hc08/lkmain.c (parse): Support comments in the linker script
6325         file on lines by themselves and after filenames
6326
6327 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6328
6329         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6330
6331 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6332
6333         * src/z80/peeph-z80.def: removed some peephole rules that don't
6334         work with multibyte arithmetic (fixed bug #937126)
6335         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6336         to registers and not global variables
6337         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6338         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6339         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6340         checking for assignments not internally generated (fixed bug #931895)
6341         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6342         structure member (fixed bug #930072)
6343
6344 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6345
6346         * src/SDCCmain.c (linkEdit),
6347         * src/hc08/main.c (_hc08_parseOptions),
6348         * as/hc08/Makefile.in,
6349         * as/hc08/aslink.h,
6350         * as/hc08/asm.h,
6351         * as/hc08/m08pst.c,
6352         * as/hc08/lkrloc.c (relr, rele),
6353         * as/hc08/lkarea.c (lnkarea)
6354         * as/hc08/lkmain.c (afile, parse),
6355         * as/hc08/lkelf.c: support for ELF output
6356         * as/hc08/lks19.c (s19),
6357         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
6358
6359 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6360
6361         * as/mcs51/lkihx.c: Fixed bug #899105.
6362
6363 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6364
6365         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
6366         .dsp files from Unix to DOS.
6367
6368 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6369
6370         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
6371         function pointers; we have been compliant for several months now.
6372         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
6373         change that was accidently commented out
6374         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
6375         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
6376         bug #922319
6377
6378 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6379
6380         * src/hc08/gen.c: output of all of the internal debugging information
6381         is now controlled by the D() macro; it is disabled by default
6382
6383 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6384
6385         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
6386         harder to keep the same registers during a CAST iCode
6387         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
6388         long via int can be done in a single cast, if the signedness is
6389         correct.
6390         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
6391         putchar() in tinibios.c in ds390's library
6392
6393 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
6394
6395         * src/SDCCast.c (decorateType): fixed bug #898889,
6396         cast result of a literal complement too
6397         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
6398         fixed check for bitfields
6399
6400 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
6401
6402         * src/SDCCicode.c (geniCodeLogic): made it static,
6403         (geniCodeLogicAndOr): added in order to fix bug #905492,
6404         (ast2iCode): fixed bug #905492
6405         * support/regression/tests/bug-905492.c: added
6406         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
6407         (processParms): fixed bug #927659: don't copy parms, this will clear
6408         decorated flag
6409         * support/regression/tests/bug-927659.c: added
6410
6411 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
6412
6413         * src/SDCCast.c (addCast): don't cast float to char
6414         * device/lib/libsdcc.lib: added _memmove
6415
6416 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
6417
6418         * device/lib/large/Makefile: fixed parallel execution by
6419         replacing `make` by `$(MAKE)`
6420
6421 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6422
6423         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
6424         offsets (fixes bug #923936)
6425
6426 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
6427
6428         * device/lib/small/Makefile: fixed parallel execution by
6429         replacing `make` by `$(MAKE)`
6430
6431 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6432
6433         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
6434
6435 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
6436
6437         * src/pic/gen.c (genCpl): multi-byte complements were not working.
6438         * src/regression/Makefile: Regression test was not running.
6439
6440 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6441
6442         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
6443         complement if possible
6444         * src/SDCCval.c (valComplement),
6445         * src/SDCCicode.c (operandOperation): fixed complement of literal
6446         * support/regression/tests/onebyte.c (testComplement): added
6447
6448 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
6449
6450         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
6451         return an optimized tree; actually replace actParm with the new tree
6452         * src/SDCCast.h: added some parantheses to remove side effects
6453         * support/regression/tests/bug-920866.c
6454
6455 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
6456         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
6457         Bit operands were not being handled properly in the pic14 port.
6458         (now src/regression/add.c passes again).
6459
6460 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6461
6462         * src/SDCC.y (labeled_statement): case and default no longer require
6463         a following statement (RFE #893037)
6464
6465 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6466
6467         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
6468         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
6469         disabled (fixes bug #916294)
6470         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
6471         "mov a,acc"; patch provided by Lenny Story
6472         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
6473
6474 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6475
6476         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
6477         functions
6478         * src/ds390/gen.c (genFunction, genEndFunction),
6479         * src/ds390/ralloc.c (ds390_assignRegisters),
6480         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
6481         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
6482         pushed if there are parameters passed on the stack. Also, a cleaner
6483         way to decide if r0/r1 should be pushed/popped. (Together they fix
6484         bug #918693)
6485
6486 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6487
6488         * doc/sdccman.lyx,
6489         * device/lib/mcs51/crtpagesfr.asm,
6490         * device/lib/mcs51/crtxinit.asm,
6491         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
6492         to avoid confusion with Si Lab's SFRPAGE register.
6493
6494 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6495
6496         * src/SDCCglue.c (emitMaps): allow public sfr variables
6497         * src/SDCCglue.c (initialComments): include compiler build date
6498         with compiler version and put the timestamp of the generated
6499         assembly file on a serperate line to be less confusing.
6500         * src/port.h: added genInitStartup hook
6501         * src/avr/main.c,
6502         * src/ds390/main.c,
6503         * src/hc08/main.c,
6504         * src/pic/main.c,
6505         * src/pic16/main.c,
6506         * src/xa51/main.c,
6507         * src/z80/main.c: genInitStartup initialize as NULL (default to
6508         historical behaviour)
6509         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
6510         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
6511         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
6512         library instead of hard coding it into the compiler.
6513         * support/regression/ports/mcs51-stack-auto/spec.mk,
6514         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
6515         * device/lib/mcs51/Makefile,
6516         * device/lib/small/Makefile,
6517         * device/lib/large/Makefile,
6518         * device/lib/mcs51/crtpagesfr.asm,
6519         * device/lib/mcs51/crtstart.asm,
6520         * device/lib/mcs51/crtxclear.asm,
6521         * device/lib/mcs51/crtxinit.asm,
6522         * device/lib/mcs51/crtclear.asm,
6523         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
6524         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
6525         and into user configurable files.
6526         * device/lib/clean.mk: clean mcs51 directory too
6527         * support/regression/tests/longlit.c: added static to T1 declaration
6528         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
6529         accesses in the initialization code
6530
6531 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6532
6533         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
6534         OSCTRIMVAL as noted in bug #916008
6535
6536 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6537
6538         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
6539         in loops with multiple exits (reported as incorrect registers
6540         used by Martin Helmling in Sdcc-user list)
6541
6542 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6543
6544         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
6545         made ds390 register extensions look less like error messages
6546
6547 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6548
6549         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
6550         reported by Adam Wozniak in Sdcc-user list
6551
6552 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
6553
6554         * src/SDCCast.c (decorateType): fixed with bug and promotion in
6555         arithmetic optimizations, added debug output
6556
6557 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
6558
6559         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
6560         * sdcc.spec: updated and split sdcc into 3 rpms
6561         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
6562         needed for literals of LEFT_OP and '+'
6563         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
6564         introduced RESULT_TYPE_NOPROM
6565         (geniCodeMultiply): fixed logic for decision if mul is optimized to
6566         left shift
6567         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
6568         limited promotion to int only for '*'
6569         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
6570
6571 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
6572
6573         * src/pic16/gen.c (genSkip),
6574         (genc16bit2lit), (gencjneshort): commented out
6575         (is_LitOp): new helper function, checks operand type
6576         (genCmpEq): rewritten
6577
6578 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
6579
6580         * support/regression/tests/bug-908454.c: added
6581
6582 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
6583
6584         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
6585         * src/SDCCicode.c (usualBinaryConversions): op needs int type
6586         (geniCodeCast): cosmetic, don't preserve bit storage class
6587         (geniCodeLeftShift): added promotion
6588         (geniCodeLogic): fixed regression
6589         * src/SDCCsymt.c (computeTypeOr): accept bits too
6590         (compareType): 2nd part of fix for bug #908454, needed for bitfields
6591
6592 2004-03-07  Borut Razem <borut.razem AT siol.net>
6593
6594         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
6595
6596 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
6597
6598         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
6599         version of pic16_genPackRegisters which does not check if ic is a
6600         CAST operator,
6601         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
6602         function cause string1.c regression test fails
6603
6604 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
6605
6606         * sim/ucsim/configure.in,
6607         * sim/ucsim/configure,
6608         * sim/ucsim/doc/Makefile.in: use docdir
6609         * src/SDCC.y: fixed sbit atrributes
6610         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
6611         * src/SDCCast.c (decorateType): |^& need special promotion handling
6612         * src/SDCCast.h,
6613         * src/SDCCsymt.h: moved definition of RESULT_TYPE
6614         * src/SDCCsymt.h (computeType),
6615         * src/SDCCicode.c: computeType() needs op
6616         * src/SDCCsymt.c (checkTypeSanity),
6617         * doc/sddman.lyx: "plain" bitfields are unsigned
6618         * src/SDCCsymt.c (computeTypeOr): added
6619         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
6620         |^& ops
6621         * src/SDCCval.c (val*): computeType() needs op
6622         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
6623         * support/regression/tests/onebyte.c: added tests for |^&
6624
6625 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
6626
6627         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
6628         for writing icode into asm output.
6629
6630 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
6631
6632         * src/pic16/device.c: added some debug lines enabled
6633         with macro DEBUG_CHECK,
6634         * src/pic16/genarith.c: more debug in genPlus,
6635         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
6636         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
6637         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
6638         * (aopForSym): onStack symbols are re-placed in data memspace,
6639         and onStack flag is cleared,
6640         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
6641         copy temporary pcodeop,
6642         * (genPcall): added warning for not updating PCLATU,
6643         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
6644         always true for pic16 port,
6645         * (genMultOneWord): NEW, supports integer multiplication,
6646         * (genMult): modified to call genMultOneWord,
6647         * (ifxForOp): added warning when return NULL,
6648         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
6649         flag is set before call to operandFromSymbol for implicit
6650         added structures,
6651         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
6652         options.intlong_rent are set by default,
6653         * (_hasNativeMulFor): modified to allow port generation of integer
6654         multiplication,
6655         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
6656         set regtype to REG_SFR for all registers, restricting seting the
6657         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
6658
6659 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6660
6661         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
6662         more than 500 times in the regression tests
6663
6664 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6665
6666         * support/Util/SDCCerr.h,
6667         * support/Util/SDCCerr.c,
6668         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6669         enumerator_list),
6670         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
6671         for symbol conflicts.
6672         * support/valdiags/tests/enum.c,
6673         * support/valdiags/tests/tentdecl.c,
6674         * support/valdiags/tests/struct.c: expect possible error messages
6675         referring to original symbol definitions.
6676         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
6677         * src/SDCCsymt.h,
6678         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
6679
6680 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
6681
6682         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
6683
6684 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
6685
6686         * src/pic16/ralloc.c (newReg): fixed bug #908929
6687
6688 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6689
6690         * src/ds390/gen.c: added missing #include "main.h"
6691
6692 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
6693
6694         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
6695         checking if symbol is already in set,
6696         * src/pic16/device.h: prototype for checkAddSym,
6697         * src/pic16/gen.c: (_G): added entry interruptvector,
6698         * (assignResultValue): removed some commented out lines,
6699         * (genFunction): check for ISR via sym->type, absolute section for
6700         interrupt code is created via a new pBlock, the goto instruction is
6701         placed now correctly at the interrupt vector position, changed all
6702         references from ivec to _G.interruptvector,
6703         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
6704         is the interrupt is a high priority one, same for return from ISR,
6705         * src/pic16/glue.c: changed all calls of addSetHead for publics and
6706         externs to calls of checkAddSym,
6707         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
6708         pic16_pcode_verbose flag is set,
6709         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
6710         * src/pic16/pcoderegs.c: message about how many registers are saved
6711         will only be emitted if pic16_pcode_verbose flag is set,
6712
6713 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6714
6715         * src/ds390/ralloc.h,
6716         * src/ds390/ralloc.c (ds390_regWithIdx),
6717         * src/ds390/gen.c (emitcode),
6718         * src/ds390/main.h,
6719         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
6720         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6721         ds390operandCompare, getRegsRead, getRegsWritten,
6722         initializeAsmLineNode): customized instruction size calculation for
6723         ds390, started basis for some register optimizations
6724         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
6725         corresponding assembly output
6726         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
6727         missing push/pop of r0/r1. Optimized push/pops
6728
6729 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6730
6731         * src/mcs51/main.c (instructionSize): fixed ACALL size
6732         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
6733
6734 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
6735
6736         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
6737         the sorting of rlist with NULL elements
6738         * (print_idataType, print_idata): NEW to create idata sections
6739         * src/pic16/device.h: idataSymSet new variable
6740         * src/pic16/gen.c (genFunction): fixed some bugs in string
6741         comparing, improved the absolute section creation for ISRs,
6742         added FSR0L/FSR0H in registers that are saved in an ISR,
6743         * (genInline): fixed the processing of inline snippets,
6744         now they undergo no process by the peephole optimizer
6745         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
6746         are placed in idataSymSet,
6747         * (pic16emitStaticSeg): extern symbols are added in externs,
6748         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
6749         switching when aboslute variables are placed in access bank memory
6750         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
6751         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
6752         commented out with #if,
6753         * (pic16_packRegisters): reintroduce the check for CAST because some
6754         symbols are not correctly handled,
6755         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
6756         pCodeInstruction instead of pCode,
6757         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
6758         pCodeAsmDir definition,
6759         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
6760         directive, then the argument directive is emitted without the leading
6761         tab, hack for inline labels which must be in the first column,
6762         * (compareLabel,pic16_findNextInstruction),
6763         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
6764         * (insertBankSwitch): modified for the new pCodeAsmDir,
6765
6766 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6767         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
6768
6769         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
6770         instance,
6771         * (pushSide): commented out with #if,
6772         * (assignResultValue): fixed some typos in saving
6773         registers,
6774         * (genPcall): FIXED and sync'ed with genCall,
6775         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
6776         * (genNearPointerGet): fixed to handle some more cases,
6777         implementation scheme via table reads,
6778         * (genConstPointerGet): modified to access code memory correct,
6779         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
6780         and improved to handle some cases
6781         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
6782         instead of "RETLW" for init data
6783         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
6784         not IN_DIRSPACE, work around to reduce bank switching when aboslute
6785         variables are placed in access bank memory (<0x80 and >=0xf80),
6786         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
6787         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
6788         TBLWT_POSTDEC,TBLWT_PREINC
6789         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
6790         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
6791         directives
6792         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
6793         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
6794         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
6795         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
6796
6797 2004-02-29  Borut Razem <borut.razem AT siol.net>
6798
6799         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
6800         support/Util/findme.h, support/Util/system.h: enhance binary relative
6801         search for lib and include by using findProgramPath()
6802
6803 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6804
6805         * src/SDCCpeeph.h,
6806         * src/SDCCpeeph.c (pcDistance),
6807         * src/port.h,
6808         * src/mcs51/ralloc.h,
6809         * src/mcs51/ralloc.c (mcs51_regWithIdx),
6810         * src/mcs51/main.h,
6811         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
6812         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6813         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
6814         size calculation port specific, started basis for some register
6815         optimizations
6816         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
6817         missing push/pop of r0/r1. Optimized push/pops
6818         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
6819         * device/lib/_modsint.c (_modsint),
6820         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
6821         and stack version so regression tests pass
6822
6823 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
6824
6825         * src/Makefile.in (dep): include SLIBOBJS in dependency check
6826         * src/SDCCast.c (decorateType): catch another small optimization
6827         with '?' operator
6828         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
6829         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
6830         modified to finally use computeType() all over SDCC,
6831         see Feature Request #877103
6832         * src/SDCCval.h: cosmetic
6833         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
6834         valCompare(); regression tested in muldiv.c
6835         * support/regression/tests/muldiv.c (testMod): mod sign follows
6836         dividend only
6837
6838 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
6839
6840         * src/SDCCast.c (decorateType): fixed bug #902362
6841         * doc/INSTALL.txt: fixed install instructions for win32
6842
6843 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6844
6845         * device/include/Makefile.in (install): fixed by replacing spaces
6846         by tabs
6847         * doc/README.txt,
6848         * doc/INSTALL.txt: updated for release
6849         * doc/sdccman.lyx: added warning for --xstack being buggy
6850
6851 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6852
6853         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6854         to eliminate build warnings.
6855         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6856
6857 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6858            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6859
6860         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6861         removed -penable-stack, added comment for stack pragma, added
6862         warning for not initializing the stack/frame registers, removed
6863         comment at interrupts section
6864
6865         Stack is made permanent, there is no ability to disable stack usage.
6866         * src/pic16/device.h,
6867         * src/pic16/device.c: removed all references to USE_STACK macro,
6868         * src/pic16/device.c (pic16_dump_section): when no elements in
6869         rlist, free rlist before return,
6870         * (pic16_dump_int_registers): NEW, internal registers are a new set
6871         of general purpose registers reused by each function,
6872         * (checkAddReg): returns 1 if registers is added to set,
6873         * (pic16_groupRegistersInSection): when a registers is of type
6874         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6875         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6876         SRCASECMP macro is moved here from device.c
6877         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6878         PO_PCLATU, PO_PRODL, PO_PRODH,
6879         * (pic16_pCodeOpType, genMinus,
6880         changed compares to "a" register, with AOP_ACC,
6881         * (pic16_genPlus): fixed some bugs and indented properly,
6882         * (pic16_addSign): changed size to size+offset in the MOVWF
6883         instruction,
6884         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6885         multiply 8-bit operand by literal, result is 8-bit,
6886         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6887         multiply 2 8-bit operand, result is 8-bit,
6888         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6889         genUMult8X*_16,
6890         * src/pic16/gen.c: changed accUse to contain WREG only,
6891         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6892         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6893         true, do not use immediate addressing any more unless sym is a
6894         pointer in codespace,
6895         * (aopForRemat): do not use immediate addressing when symbol not in
6896         codespace and when symbol's address is requested,
6897         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6898         accUse size (= 1),
6899         * (aopGet): added case for AOP_ACC and don't return "accumulator
6900         bug" but WREG instead,
6901         * (popGetTempReg): pushes contents of temporary register in stack,
6902         * (popReleaseTempReg): pops contents of temporary register from
6903         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6904         * (pic16_popGet): separated case AOP_ACC to return register WREG
6905         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6906         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6907         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6908         the use of immediate pointers to certain cases only.
6909
6910         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6911         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6912         * (assignResultValue, genCall, genRet): modified to use the new
6913         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6914         genPcall is still broken,
6915         * (genFunction): added code to create 'A' type pBlocks when
6916         interrupt functions are generated, code not extensively tested yet,
6917         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6918         * (genEndFunction): modified so ISRs pop stored registers from stack,
6919         * (genMultOneByte): cleanup,
6920         * (AccRsh): added flag andmask, to and result with appropriate mask,
6921         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6922         * (genDataPointerGet): fixed and reenabled its use,
6923         * (genNearDataPointerGet): bugs fixed,
6924         * (genDataPointerSet): bugs fixed,
6925         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6926         pic16_DumpSymbol, pic16_DumpOp,
6927         * src/pic16/genutils.h: function prototypes for the above functions,
6928         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6929         pointers,
6930         * (pic16emitRegularMap): many many many improvements, but needs a
6931         major cleanup,
6932         * src/pic16/main.c: enable_stack in pic16_options is removed,
6933         * (_pic16_parseOptions): removed command line options -penable-stack,
6934         * (_process_pragma): emit stack symbol only when stack pragma is
6935         processed,
6936         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6937         redirected to FSR0L/FSR0H pair,
6938         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6939         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6940         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6941         for immediates,
6942         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6943         * (dumpPicOptype): NEW,
6944         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6945         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6946         with movff instruction,
6947         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6948         added pic16_int_regs, some packRegsFor* functions are commented out,
6949         because produce errors,
6950         * src/pic16/NOTES: minor modifications
6951
6952 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6953
6954         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6955         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6956         --pack-iram.
6957         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6958         * as/mcs51/lkaomf51.c: fixed bug #895763
6959
6960 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6961
6962         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6963
6964 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6965
6966         * doc/sdccman.lyx: added details about the HC08 storage classes and
6967         interrupts, fixed the register usage info for z80 & gbz80
6968
6969 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6970
6971         * doc/sdccman.lyx: added more pic16 port documentation
6972         * device/include/pic16/: added header pic18fregs.h
6973
6974 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6975
6976         * doc/sdccman.lyx: added Vangelis' contribution
6977
6978 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6979
6980         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6981         extend to the next CALL or PCALL, not just to the next CALL.
6982
6983 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6984
6985         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6986
6987 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6988
6989         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6990         bug #895752 and a better fix for bug #716790
6991
6992 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6993
6994         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6995
6996 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6997
6998         * doc/sdccman.lyx: minor changes, minor changed
6999
7000 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
7001
7002         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
7003         which can't handle SDCC_NEWONEBYTEOPS,
7004         (geniCodeMultiply): removed conversion from mult to shift for pic14
7005         and pic16
7006
7007 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7008
7009         * src/hc08/gen.h,
7010         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
7011         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
7012         thus fixing bug #895406
7013
7014 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
7015
7016         * device/lib/_modsint.c,
7017         * device/lib/_modslong.c: sign follows divisor only
7018         * src/hc08/gen.c (genMultOneByte): if result size is 1,
7019         signs or signedness can be ignored
7020         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
7021         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
7022         added optimization for IFX,
7023         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
7024         arguments;
7025         reenabled optimization for IFX, which was removed on 2004-01-11
7026         * src/SDCCast.h: added return type IFX
7027         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
7028         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
7029         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
7030         SDCC_OLDONEBYTEOPS selects the old behaviour
7031         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
7032         changed again and commented promotion rule
7033         * src/SDCCval.c (valDiv): promotion no longer necessary
7034         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
7035         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
7036         rewritten
7037         * support/regression/tests/onebyte.c: added
7038
7039 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
7040
7041         * gen.c (genInline): reverted to old code for assemnling inline
7042         code because of bug reported James Chadd
7043
7044 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
7045
7046         * ralloc.h: missing declarations from previous patch,
7047         seems that patch for ralloc.h was never applied, fixed
7048
7049 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7050            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7051
7052         * pcode.c,
7053         * pcode.h,
7054         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
7055         indirect addressing. Marked FSR0 as deprecated
7056         * gen.c (pointerCode): commented out, not needed now
7057         (pic16_popGet2p): new MOVFF helper function
7058         (genGenPointerGet),
7059         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
7060         (shiftRLong): removed duplicate debugging info
7061
7062 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7063
7064         * src/ds390/gen.c (genNearPointerGet),
7065         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
7066         optimization with bits, but not bitfields.
7067         * src/ds390/ralloc.c (packRegisters),
7068         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
7069
7070 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
7071
7072         * src/SDCCcse.c (algebraicOpts): copy operands before modification
7073
7074 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7075
7076         * src/SDCCsymt.h,
7077         * src/SDCCicode.c (operandFromSymbol),
7078         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
7079         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
7080         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
7081         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
7082         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
7083         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
7084         bug #892038
7085         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
7086         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
7087         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
7088         * src/SDCCsymt.c (newSymbol),
7089         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7090         enumerator_list),
7091         * src/SDCCval.h,
7092         * src/SDCCval.c (newiList): fixed bug #885705
7093
7094 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7095
7096         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
7097         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
7098
7099 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7100
7101         * device/include/c8051f120.h,
7102         * device/include/c8051f300.h,
7103         * device/include/c8051f310.h: added/updated header files for Silicon
7104         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7105         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
7106         in new section Submitting patches
7107
7108 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7109
7110         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
7111         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7112         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7113         genGenPointerSet),
7114         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
7115         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7116         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7117         genGenPointerSet),
7118         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
7119         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7120         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7121         genGenPointerSet),
7122         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
7123         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7124         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7125         genGenPointerSet): fixed bug #892400
7126         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
7127         to eliminate build warnings.
7128         * src/SDCCast.c (processParms),
7129         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
7130         fixed bug 751859
7131         * support/valdiag/valdiag.py: added GCC to the list of defines active
7132         when compiling with gcc
7133
7134 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7135
7136         * support/Util/SDCCerr.h,
7137         * support/Util/SDCCerr.c,
7138         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
7139         with an incomplete type (fixed bug #883734)
7140         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
7141
7142 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7143
7144         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
7145
7146 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7147
7148         * src/SDCCast.c (decorateType),
7149         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
7150         function pointer implementation
7151         * support/regression/tests/funptrs.c: added tests to verify both forms
7152         of function pointers work correctly. Added tests to verify parameters
7153         are passed in the correct order.
7154
7155 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
7156
7157         * device.c (regCompare): registers are sorted by ascending
7158         address and increasing size,
7159         * main.c (_pic16_finaliseOptions): removed the declaration
7160         of compiler macro MCU. Now a macro of the format pic18fxxxx
7161         will be defined from the command line
7162
7163 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7164             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7165
7166         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
7167         PCOP_RLCF was overwritten!
7168         * gen.c (genSkip): commented out calls to pic16_emitcode,
7169         * (genCmpEQ): fixed "long" compares, only high word did get compared,
7170         * (genlshTwo),
7171         * (genRRC): added debugging info,
7172         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
7173         overwritten while shifting,
7174         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
7175         overwritten while shifting,
7176         * (AccLsh),
7177         * (AccRsh),
7178         * (shiftLLeftOrResult),
7179         * (shiftRLeftOrResult),
7180         * (shiftRLong),
7181         * (shiftLLong): Implemented with pic16_emitpcode
7182         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
7183         * (genLeftShift): Fixed bug, operand for shift by variable always
7184         was "and"ed with 0x0f,
7185         * (genLeftShiftLiteral),
7186         * (genrshTwo),
7187         * (genRightShiftLiteral): added debugging info,
7188         * (genrshFour): added comment,
7189         * (genRightShift): determined signedness from operand "left"
7190         instead of "result"
7191
7192 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7193
7194         * src/SDCCicode.c (geniCodeParms),
7195         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
7196         function pointers, fixed function pointer bugs #861242 and #861896
7197
7198 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7199
7200         * device/include/c8051f000.h,
7201         * device/include/c8051f120.h,
7202         * device/include/c8051f300.h: added header files for Silicon
7203         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7204
7205 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
7206
7207         * src/SDCCast.c (processParams): added new type flow and restructured
7208         (gatherAutoInit): added new type flow
7209         (addCast): cosmetic changes
7210         (getLeftResultType): added new type flow for array indices, patch
7211         provided by Stas, see FR #877103
7212         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
7213         array index patch by Stas
7214         * src/SDCCast.h: added prototype getResultTypeFromType()
7215         * src/SDCCval.h,
7216         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
7217         * src/pic/glue.c (pic14emitStaticSeg),
7218         * src/pic16/glue.c (pic16emitStaticSeg),
7219         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
7220         for initialization of symbols
7221         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
7222         * support/Util/SDCCerr.h:
7223         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
7224         * .version: bumped version number to 2.3.8
7225         * device/include/Makefile.in (install),
7226         * doc/Makefile (install): changed to 'rm `find ...`' construct to
7227         avoid warnings
7228
7229 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
7230
7231         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
7232         Slade Rich fixed an optimization bug
7233         * src/pic/pcodepeep.c,
7234         * src/pic/pcoderegs.c
7235         * doc/Makefile (install): added test for directory
7236
7237 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7238
7239         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
7240         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
7241         * src/pic/ralloc.c (getRegPtr, getRegGpr),
7242         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
7243         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
7244         * as/mcs51/asexpr.c (term),
7245         * as/hc08/asexpr.c (term): fixed bug #887146
7246
7247 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7248
7249         * src/z80/gen.c (genMult): handle single byte result product
7250         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
7251         DUMMY_READ_VOLATILE (fixed bug #886367)
7252
7253 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7254
7255         * support/regression/tests/libmullong.c: fixed logic, on little endian
7256         hosts we ended without a mullong_wrapper()
7257
7258 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7259
7260         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
7261         virus/worm forged address usage.
7262
7263 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7264
7265         Fixed promotion, it should be done on AST level:
7266         * src/SDCCast.c (addCast): added promotion to int
7267         (decorateType): updated call to upCast()
7268         * src/SDCCicode.c (geniCodeLeftShift): removed call to
7269         usualUnaryConversions()
7270
7271 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
7272
7273         * support/regression/tests/literalop.c (mulWrapper): Added a
7274         wrapper to remove integer overflow warnings.
7275
7276         * support/regression/tests/float_trans.c: Made work on host.
7277
7278         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
7279         location of sz80.
7280
7281         * support/regression/generate-cases.py (main): Changed from inline
7282         to a main method.
7283
7284         * doc/Makefile (install): Changed to depth first to get rid of
7285         missing directory install warning.
7286
7287         * as/Makefile (install-doc): Made work on Mac.
7288
7289 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
7290
7291         * src/SDCCast.c: added an additional type flow in decorateType() of
7292         opposite direction, see feature request #860006; it's enabled at runtime
7293         by setting the environment variable SDCC_NEWTYPEFLOW
7294         * src/SDCCast.h: changed prototype of decorateType()
7295         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
7296         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
7297         'char' to 'int' can be omitted, if both operands are 'unsigned char';
7298         see feature request #877103
7299         * src/SDCCval.c: updated call of decorateType()
7300         (valBitwise): fixed bug #882876
7301         (valMinus): added promotion
7302         (valLogicAndOr): result is unsigned
7303         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
7304         * src/SDCCsymt.c (computeType),
7305         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
7306         must not cause an unsigned operation
7307         * src/pic/glue (pic14emitRegularMap),
7308         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
7309
7310 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
7311
7312         * src/pic/pcode.c (PCodeID): commented out left over debug code
7313
7314 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7315
7316         * support/valdiag/tests/overflow.c: added shift tests
7317         * src/pic/device.c,
7318         * src/pic/gen.c,
7319         * src/pic/gen.h,
7320         * src/pic/glue.c,
7321         * src/pic/main.c,
7322         * src/pic/pcode.c,
7323         * src/pic/pcode.h,
7324         * src/pic/pcodepeep.c,
7325         * src/pic/pcoderegs.c,
7326         * src/pic/ralloc.c,
7327         * src/pic/ralloc.h: applied patch from Slade Rich;
7328         added support for multiple code pages and multiple RAM banks on the
7329         PIC 14 port. The ASM files now no longer simply assume all the
7330         code / RAM are in the same page / bank. This means the linker can
7331         safely allocate code/RAM of separate ASM files to different pages/banks.
7332         * doc/sdccman.lyx: added Slade's tips
7333         * src/mcs51/peeph.def: fixed bug #880768
7334
7335 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7336
7337         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7338         * src/SDCCast.c (decorateType): fixed bug #880197
7339
7340 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7341
7342         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7343         getopt.h.
7344
7345         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7346         strtof is not part of C89 and isn't included with Mac OS X.
7347
7348 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7349
7350         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
7351         shiftL2Left2Result): fixed bug #879326
7352         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
7353         (genMultOneByte): fixed bug in signed vs unsigned multiplication
7354         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
7355         address fetch for clr instruction
7356         * device/lib/hc08/_mulint.c: created optimized assembly version
7357         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
7358
7359 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
7360
7361         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
7362         proposed in FR #877103
7363
7364 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
7365
7366         * src/SDCCval.c (cheapestVal): added missing checks
7367         * src/SDCCicode.c (usualBinaryConversions): fixed condition
7368         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
7369
7370 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
7371
7372         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
7373         equal operands
7374
7375 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
7376
7377         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
7378         loaded with the linker search paths (-L arguments) and the libraries
7379         to be linked with the current source (-l arguments). Changes
7380         currently will affect only the pic16 port.
7381         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
7382         include path the port specific paths and port specific libraries,
7383         * gplink command now contains the $3 argument,
7384         * src/pic16/device.h,
7385         * src/pic16/device.c,: structure PIC_device is made public and
7386         renamed to PIC16_device, the same for variable Pics which is renamed
7387         to Pics16. Updated all references to them.
7388         * src/pic16/glue.c (pic16glue): corrected bug with code
7389         initialization which bypassed the variable initializations block.
7390
7391         * device/lib/pic16/Makefile.rules: removed --penable-stack from
7392         COMPILE_FLAGS and added the --nostdinc option
7393
7394 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7395
7396         * device/include/mc68hc908jb8.h: Register defs for another member
7397         of the hc08 family. Contributed by Bjorn Bringert - thanks!
7398
7399 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
7400
7401         Documenting changes from previous commits.
7402         * configure.in (version 1.56),
7403         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
7404         when generating output files to configure the pic16 library,
7405         but now I've commented it out, since gputils aren't installed in the
7406         SF compile farm, so library won't compile
7407
7408         * device/lib/Makefile.in (version 1.56): initially I've added in
7409         target 'all' the prerequestive 'model-pic16' so it compiled the
7410         pic16 library, but now I've commented it out for the same reasons
7411         above,
7412         * added targets 'model-pic16' and 'objects-pic16' to compile the
7413         library
7414         * added target 'port-specific-objects-pic16' to handle the
7415         generated libraries and copy them into the build/ directory
7416         * added target 'clean-intermediate-pic16' to clean intermediate
7417         files into pic16 directory
7418         * in target 'installdirs' added line to create directory pic16 in
7419         the installation path
7420
7421         * device/include/Makefile.in (version 1.11): in target 'install'
7422         added lines to copy all header files to installation path,
7423         * in target 'installdirs' added line create directory for pic16
7424         headers in the installation path
7425
7426 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
7427
7428         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
7429          a function call
7430
7431 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
7432
7433         * configure,
7434         * device/lib/configure.in,
7435         * device/lib/configure: fixed for autoconf 2.57
7436
7437 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7438
7439         * src/z80/main.c (_parseOptions): fixed the portmode= command line
7440         option so that it actually works. Made it specific to the z80, since
7441         the gbz80 doesn't have these kinds of I/O ports.
7442
7443 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7444
7445         * device/include/z180.h,
7446         * device/lib/_memcpy.c,
7447         * device/lib/_memmove.c,
7448         * device/lib/_mulint.c,
7449         * device/lib/ser_ir.c,
7450         * device/lib/ser_ir_cts_rts.c,
7451         * device/lib/_strcmp.c,
7452         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
7453         * src/z80/main.c (_process_pragma): add support for pragmas bank and
7454         portmode; added deprecation warning for bank= and protmode= forms.
7455         Also, guard against buffer overflow.
7456         * src/z80/gen.c (aopGet): generate better code for sfr banked read
7457
7458 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7459
7460         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
7461         changed interrupt vector table generation to only emit declared vectors.
7462         * device/include/Makefile.in: added missing backslash
7463         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
7464
7465 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7466
7467         Mainly changes to support compilation of the device libraries
7468         * src/pic16/device.c: stack is allocated via symbol and not
7469         via literal number. The symbol is placed in the corresponding
7470         position of the data ram
7471         * (pic16_dump_section): relocatable and absolute uninitialized
7472         data are now emitted in sorted order to reduce section naming,
7473         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
7474         weren't marked as being in the access bank,
7475
7476 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7477
7478         Added portion of GNU PIC Library under the directory
7479         device/include/pic16 and device/lib/pic16. These files
7480         contain the declarations of SFRs for the PIC18Fxx2 devices.
7481         The directory is initialized via configure from toplevel.
7482
7483 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
7484
7485         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
7486         the spilllocations to be compared correctly
7487
7488 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7489
7490         * src/SDCCast.c (decorateType): fixed bug introduced today
7491
7492 2004-01-12  Borut Razem <borut.razem AT siol.net>
7493
7494         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
7495         doc/sdccman.lyx: upper case pragmas are deprecated
7496
7497 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7498
7499         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
7500         in simpler and even better code
7501
7502 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
7503
7504         * src/SDCCicode.c (operandOperation): fixed bug #874819
7505         * src/SDCCast.c (decorateType): fixed
7506         char foo (unsigned long ul) { return ul > 0; }
7507
7508 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7509
7510         * doc/sdccman.lyx: Moved and added some sections, small changes
7511         all over. Telling LaTeX to be less strict with word spacing
7512         to better keep the right margin. Changed some notes about
7513         maintainance of the ports in section 3.2.1 - is it OK like this?
7514
7515 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
7516
7517         SDCC source changes:
7518         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
7519         convilong): modified to inform the pic16 port that builtin functions
7520         are external
7521
7522         PIC16 PORT specific changes:
7523         * src/pic16/device.c pic16_dump_equates() added,
7524         processor registers declared internally by the port are emitted in
7525         the translation as equates,
7526         * src/pic16/gen.c: inline code is passed unprocessed to the
7527         translation,
7528         * (pic16_popGetLit2): fnuction modified to take second operand as
7529         pCodeOp pointer and not as literal,
7530         * (popRegFromIdx): prefixed with pic16_,
7531         * (pic16_popCombine2): modified to receive already allocated pCode
7532         operands,
7533         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
7534         * (genFunction): initializes local stack frame and pushes on stack
7535         all the registers used by this function,
7536         * (genEndFunction): restores all registers from stack and restores
7537         stack frame,
7538         * src/pic16/glue.c (pic16emitRegularMap): various changes and
7539         improvements,
7540         * (pic16glue): changed the program startup sequence,
7541         * added new dbName code 'A' for functions placed in absolute section
7542         * src/pic16/main.c: added function attribute _naked,
7543         * added pragma 'code' to place a fnuction at an absolute address,
7544         * added command line arguments --debug-ralloc and --pcode-verbose,
7545         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
7546         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
7547         * (pic16_newpCodeOpLit2): modified to take the second operand as
7548         pCodeOp pointer,
7549         * (pic16_printpBlock): modified to emit each function in a separate
7550         section,
7551         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
7552         UPPER for immediate operands,
7553         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
7554         instruction,
7555         * src/pic16/peeph.def: all peepholes with movff are commented out,
7556         because there is a problem in the pcode peep optimizer,
7557         * src/pic16/ralloc.c: the register allocator can now reuse local
7558         function symbols for another function. This saves register usage.
7559         * src/pic16/ralloc.h: added flag isLocal in structure regs,
7560
7561         Added file src/pic16/NOTES with information about program writing on
7562         the current port version.
7563
7564 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7565
7566         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
7567         and peephole 252 (array access)
7568
7569 2004-01-09  Borut Razem <borut.razem AT siol.net>
7570
7571         * src/SDCCmain.c : fixed #872250: -l command line defined library
7572           files are scanned before standard library files
7573
7574 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7575
7576         * src/SDCCast.c (decorateType): fixed bug #874046
7577
7578 2004-01-09  Borut Razem <borut.razem AT siol.net>
7579
7580         * support/scripts/sdcc.nsi: remove previous installation
7581
7582 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7583
7584         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
7585         bytes for last interrupt vector (mcs51)
7586         * sdcc.spec: fixed typo
7587
7588 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7589
7590         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
7591         gen51Code): more efficient parameter receive for --model-large
7592         ("bug" #845294)
7593
7594 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7595
7596         * src/ds390/main.c,
7597         * src/z80/main.c: added missed needLinkerScript flags (more than
7598         one port structure defined in these file)
7599         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
7600         bug #795325
7601
7602 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
7603
7604         * src/SDCCmain.c: removed various references to DEFAULT_PORT
7605         * src/port.h: added flag needLinkerScript in port->linker
7606         structure to inform whether to create a .lnk file or not,
7607         * src/avr/main.c,
7608         * src/ds390/main.c,
7609         * src/hc08/main.c,
7610         * src/mcs51/main.c,
7611         * src/pic/main.c,
7612         * src/pic16/main.c,
7613         * src/xa51/main.c,
7614         * src/z80/main.c: changed appropriately to configure
7615         needLinkerScript flag
7616         * src/pic/gen.c,
7617         * src/pic16/gen.c (genAddrOf): fixed bug #863624
7618         * src/pic/glue.c: added variable udata_section_name to
7619         override default uninitialized data segment definition for
7620         devices only with SHAREBANK memory (reported from Erik Epetrich)
7621         * (pic14emitOverlay): modified to emit a commented overlay segment
7622         directive when no overlay data exist
7623         * (picglue): modified to emit uninitialized data segment
7624         according to udata_section_name
7625         * src/pic/main.c (_pic14_parseOptions): added command line
7626         options --udata-section-name=[name] to override default
7627         udata definition name
7628         * modified _linkCmd and _asmCmd to include compiler passed
7629         arguments via -W option
7630         * src/pic16/main.c: added $l in _asmCmd, changed extension for
7631         object file from '.rel' to '.o' in port->linker structure,
7632         changed size of fptr from 2 to 3 in port structure
7633
7634 2004-01-07  Borut Razem <borut.razem AT siol.net>
7635
7636         * support/scripts/sdcc.nsi: update PATH
7637         * support/scripts/sdcc.ico: craeted
7638
7639 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
7640
7641         * device/include/Makefile.in: fix install
7642         * doc/Makefile: fix install
7643
7644 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7645
7646         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
7647         in bug #860505
7648         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
7649         how the function variable allocation summary is displayed; also
7650         include information about variables allocated to the overlay
7651         segment
7652
7653 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7654
7655         * as/mcs51/lkmain.c: Help about -Y option
7656         * as/mcs51/lkarea.c: Fixed gcc warnings
7657
7658 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7659
7660         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
7661         fixed warning
7662         * support/valdiag/tests/overflow.c: added
7663         * src/SDCCast.c (decorateType),
7664         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
7665         LEFT_OP (left shift)
7666
7667 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7668
7669         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
7670         (default behaviour).
7671
7672 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7673
7674         A python script to validate compiler diagnostic messages. It can be
7675         used to verify that sdcc complains about bad c source code and
7676         gives a good location of the error.
7677         * support/valdiag/Makefile,
7678         * support/valdiag/valdiag.py,
7679         * support/valdiag/tests/*
7680
7681 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7682
7683         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
7684         * src/SDCCsymt.c (newEnumType),
7685         * src/SDCCsymt.h
7686         * support/Util/SDCCerr.c,
7687         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
7688         enum related bugs.
7689         * support/regression/tests/enum.c: added test for enum values that
7690         require at least 2 bytes of storage.
7691
7692 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7693
7694         * src/common.h: added ifndef/define/endif macros
7695         around the header file.
7696         Bug reported from Jesus Calvino-Fraga
7697
7698 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7699
7700         * sdcc.spec: updated
7701         * device/include/Makefile.in: don't install CVS directories
7702         * device/lib/Makefile.in: added removal of CVS directories after install
7703         * doc/Makefile: fixed install, added local_icons
7704         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
7705         * src/mcs51/gen.c (genRightShift): fixed bug #870788
7706         * src/ds390/gen.c (genRightShift): fixed bug #870788
7707         * src/SDCCast.c (decorateType): fixed bug #870781
7708
7709 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7710
7711         PIC16 port related changes:
7712         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
7713         added variable stackPos,
7714
7715         * gen.c: genCall, assignResultValue: added support for
7716         pushing/retrieving function parameters to/from stack,
7717         genFunction,genEndFunction: setup stack frame for the
7718         generated function,
7719         genAddrOf: will be changed according to bug 863624
7720
7721         * added files genutils.c and genutils.h which contain gen*
7722         debugged and optimised functions extracted from gen.c
7723
7724         * glue.c: added variable 'externs' which holds extern symbols,
7725         pic16emitRegularMap: is modified to properly handle relocatable
7726          symbols under the new scheme,
7727         pic16createInterruptVect: is modified
7728         pic16printPublics: is modified to emit 'global' assembler directives,
7729         added pic16_printExterns to print extern symbols,
7730         pic16glue: initializes stack/frame pointer in the beginning of
7731         the assembly output. Temporary hack, will be corrected later,
7732         because gplink yet does not support stack and SDCC does not
7733         yet support a type of crt0.o object to create the final binary.
7734
7735         * Removed many lines that contain 8051 legacy code.
7736         * The code is finally placed under a 'code' directive.
7737         * Added port specific options.
7738
7739         * _process_pragma: simplified since now we do not need *special*
7740         include file to define SFR registers. But a separate header
7741         will be needed. This will be developed later.
7742         * _pic16_parseOptions: added, parses port specific options:
7743         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
7744         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
7745         --preplace-udata-with=
7746
7747         * _pic16_setDefaultOptions: modified to initialize section names,
7748         but hack is temporarly out of order since it needs improvement.
7749         * _pic16_genAssemblerPreamble: configuration words are emitted by
7750         their address instead of their name. This part is incomplete and
7751         supports only the 18Fxx2 devices. Other devices will emit an error
7752         during assembly since they do not contain the same set of config
7753         registers
7754         * _pic16_genIVT: is modified,
7755
7756         * pcode.c: added definitions for some hardware registers that are needed
7757         for stack support
7758         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
7759         All PCI entries are updated. Now LFSR is supported.
7760         * Removed pic16_pciTRIS is mentioned by mdubuc in source
7761         * added pic16_newpCodeOpLit2 to support instructions with
7762         two literal arguments
7763         * pic16_pCode2str: corrected code that emits assembler instructions
7764         with two literal operands and those that have an access bit modifier
7765         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
7766         this fixes a bug which caused some labels to be lost, when an
7767         assembler directive was added, i.e. banksel,
7768         * pic16_FixRegisterBanking: improved logic that causes the insertion
7769         of bank switching,
7770         * InlineFunction: functions that are called once, are not any more
7771         inlined. This can be a port option in the future,
7772
7773         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
7774
7775         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
7776         hold the corresponding uninitialized symbols,
7777         * pic16_allocProcessorRegister: registers have explicit marked the
7778         accessBank field,
7779         * pic16_allocInternalRegister: registers are explicit marked as
7780         not used,
7781         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
7782         processing list, so bit registers were lost,
7783         *
7784
7785         * ralloc.h: added field 'accessBank' and original symbol operand
7786         in register definition,
7787         * removed the field isMapped from register definition,
7788
7789         ** Several functions have been removed from various sources:
7790         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
7791         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
7792         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
7793         pic16_assignRelocatableRegisters
7794
7795         ** others have been introduced:
7796         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
7797         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
7798
7799 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
7800
7801         * support/scripts/inc2h.pl: changed definition of BIT_AT
7802         to emit 'sbit at' instead of 'bit at'. This was a request.
7803
7804         PIC16 port related preliminary changes:
7805         * gen.c: prefixed function popRegFromString with
7806         pic16_ and all references to it corrected
7807         * pcode.c: all pic16_pc_* hardware registers prefixed
7808         with underscore (_),
7809         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
7810         * ralloc.c: newReg(): when register is REG_SFR then
7811         set address to rIdx,
7812         pic16_allocProcessorRegister(): marks register wasUsed=0
7813         pic16_writeUsedRegs(): added a call to assign processor
7814         registers via pic16_assignFixedRegisters
7815
7816 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7817
7818         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
7819         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
7820         variables in unused register banks.  Also the SSEG is placed
7821         wherever there is enough space for it, and IDATA can be anywhere
7822         in internal RAM.  For now compile using -Wl-Y[stack_size].
7823         The mem file is different for this option as well, since it
7824         makes no sense of talking about DSEG lenght.
7825
7826 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
7827
7828         * src/SDCClrange.c: fixed bug 869095 that caused segfault
7829         in certain cases, e.g. when ROM assignment, patch provided
7830         from Albert den Haan.
7831
7832 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
7833
7834         Many signedness and type propagation fixes:
7835         * src/SDCCicode.c: made geniCodeCast() static
7836         replaced SPEC_ by IS_ (cosmetic)
7837         (operandOperation): fixed div and mod operation
7838         (usualBinaryConversions): added support for promotion of char
7839         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
7840         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7841         (geniCodeAdd): an array index will stay unsigned, even if promoted
7842         from char to int
7843         (geniCodeArray): ditto
7844         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7845         * src/SDCCsymt.c (computeType): added more support for char;
7846         promotion of char is selectable by promoteCharToInt, fixed signedness
7847         for all cases
7848         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7849         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7850         * src/SDCCval (val*): replaced signedness calculation by
7851         computeType()
7852         rearranged if-branches (cosmetic)
7853         (valShift): added warning W_SHIFT_CHANGED
7854         (valCompare): fixed problem with different types
7855         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7856         * support/regression/tests/literalop.c: added many cases
7857         * support/regression/tests/ast_constant_folding.c: changed finally to
7858         'unsigned int'
7859         * .version: new year, new version: 2.3.7
7860         * src/SDCCmain.c (main): applied patch #866468
7861         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7862         provided by Scott Bronson
7863         * doc/sdccman.lyx: updated documentation for sdcdb
7864         updated and added chapter tips
7865
7866 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7867
7868         * src/SDCCsymt.h: missing from yesterday's commits
7869
7870 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7871
7872         * src/SDCC.y (struct_or_union_specifier),
7873         * support/Util/SDCCerr.c,
7874         * support/Util/SDCCerr.h: verify that struct & union tags are used
7875         as declared.
7876
7877 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7878
7879         * src/SDCCglobl.h: missing from yesterday's commits
7880
7881 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7882
7883         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7884         sft_attributes, struct_declaration, parameter_declaration,
7885         type_name, start_block, declaration_list),
7886         * src/SDCC.lex (check_type): support redefinition of typedef names
7887
7888 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7889
7890         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7891         aligned xdata arrays. Erik helped me with the if clause.
7892
7893 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7894
7895         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7896         warning
7897
7898 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7899
7900         * src/SDCCast.h,
7901         * src/SDCCast.c (newAst_),
7902         * src/SDCCicode.h,
7903         * src/SDCCicode.c (ast2iCode, newiCode),
7904         * src/SDCCglobl.h,
7905         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7906         expr, statement, expression_statement, selection_statement,
7907         iteration_statement, expr_opt, jump_statement): foundation for tracking
7908         sequence points
7909         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7910         point code too)
7911
7912 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7913
7914         * support/Util/SDCCerr.c,
7915         * src/SDCCast.h,
7916         * src/SDCCast.c (createCase, createDefault, decorateType),
7917         * src/SDCClabel.c (labelUnreach),
7918         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7919         to error messages.
7920         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7921         (with thanks to Stas Sergeev)
7922         * device/include/time.h,
7923         * device/lib/time.c (CheckTime): suppress unreachable code warning
7924
7925 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7926
7927         * src/SDCCast.c (createIvalCharPtr),
7928         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7929         bug #753752)
7930         * support/regression/tests/nullstring.c: tests for these two bugs
7931
7932 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7933
7934         * support/Util/SDCCerr.h,
7935         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7936         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7937         about storage class and 'at' used inside struct or union
7938         * src/SDCCBBlock.c (iCodeFromeBBlock),
7939         * src/SDCCcse.c (ifxOptimize),
7940         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7941         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7942         printIval, emitStaticSeg, emitOverlay),
7943         * src/SDCClabel.c (deleteIfx),
7944         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7945         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7946         gatherAutoInit, processParms),
7947         * support/Util/SDCCerr.h,
7948         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7949         reporting for post-parse errors.
7950
7951 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7952
7953         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7954         implicit casts via union; they don't work on big endian systems
7955         (possible fix for bug #861138)
7956
7957 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7958
7959         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7960         * src/mcs51/main.c: fixed the fix for bug #737001
7961
7962 2003-12-15  Borut Razem <borut.razem AT siol.net>
7963
7964         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7965
7966 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7967
7968         * support/makebin/makebin.c: put output in binary mode
7969
7970 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7971
7972         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7973         xdata and data memory on startup. Set the environment variable
7974         SDCC_NOGENRAMCLEAR to disable this.
7975         * src/mcs51/peephole.def,
7976         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7977         (allows non-interrupt and interrupt code to safely compete for a resource
7978         without the non-interrupt code having to disable interrupts)
7979
7980 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7981
7982         * src/SDCCicode.c (geniCodeAdd),
7983         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7984         with valFromType if type might be a pointer and host is big endian).
7985         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7986         types, not just integer types.
7987         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7988         multiply defined with mismatching "at" address.
7989
7990 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7991
7992         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7993         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7994         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7995         with embedded nulls (fixed bug #753752)
7996
7997 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7998
7999         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
8000         Apparently this did not see much testing (endless loop)
8001
8002 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8003
8004         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
8005
8006 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8007
8008         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
8009         gracefully handle NULL memmap pointers
8010
8011 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8012
8013         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
8014         instead of deleting the iCode when an operand is volatile
8015         * src/z80/gen.c (genDummyRead),
8016         * src/mcs51/gen.c (genDummyRead),
8017         * src/ds390/gen.c (genDummyRead),
8018         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
8019         not just IC_RIGHT
8020         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
8021         * src/SDCC.y: fixed bug #850420
8022
8023 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8024
8025         Applied z80 i/o port patch from Peter Townson and fixed some operators
8026         to better handle operands in A register.
8027         * device/include/z180.h
8028         * src/SDCC.y
8029         * src/SDCCglue.c
8030         * src/z80/gen.c
8031         * src/z80/gen.h
8032         * src/z80/main.c
8033         * src/z80/peeph-z80.def
8034         * src/z80/peeph.def
8035         * src/z80/z80.h
8036
8037 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8038
8039         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
8040
8041 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8042
8043         * device/lib/hc08/_mullong.c: Removed extra #endif
8044
8045 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8046
8047         * sim/ucsim/hc08.src/inst.cc,
8048         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
8049         carries from x to h
8050         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
8051         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
8052         * device/include/stdarg.h: fixed varargs for hc08
8053         * device/lib/Makefile.in,
8054         * device/lib/hc08/Makefile,
8055         * device/lib/hc08/_mulint.c,
8056         * device/lib/hc08/_mullong.c: fixed some endian problems
8057
8058 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8059
8060         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
8061         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
8062         * device/lib/_gptrget.c,
8063         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
8064
8065 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8066
8067         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
8068         * src/SDCCast.c (astErrors): fixed bug #846007
8069         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
8070
8071 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8072
8073         * src/SDCCast.c (decorateType): disabled a transformation I added in
8074         revision 1.188 (access to fields of a structure at an absolute address);
8075         it breaks with bitfields, extern declarations, and gcse analysis.
8076         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
8077         could be assigned through a pointer, so don't complain.
8078         * src/SDCCast.c (astErrors),
8079         * src/SDCCast.h,
8080         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
8081
8082 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
8083
8084         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
8085         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
8086         output of __config directives, since gpasm now supports them
8087         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
8088         pre-processor macro, i.e. -DMCU=p18f452
8089         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
8090         and modified to handle 'cast' icode similarly to '=' icode
8091         * src/pic16/device.h (typedef struct PIC_device): added field
8092         'extMIface' to indicate that chip has external memory interface
8093         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
8094         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
8095         18F8720
8096
8097 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8098
8099         * src/SDCC.y (pointer): fixed bug #846006
8100         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
8101         * src/SDCCast.c (decorateType): fixed bug #846009
8102         * src/ds390/peeph.def,
8103         * src/ds390/gen.c (genAnd, genOr),
8104         * src/mcs51/peeph.def,
8105         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
8106
8107 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8108
8109         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
8110         * src/SDCCdflow.c
8111         * src/SDCCcse.c
8112         * src/SDCCcse.h
8113         * src/SDCCBBlock.h
8114         * src/SDCCBBlock.c
8115
8116 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
8117
8118         fixed bug #845089
8119         * src/SDCCbitv.h,
8120         * src/SDCCbitv.c: added function to free a bitvector
8121         * src/SDCClrange.h,
8122         * src/SDCClrange.c: added function to recompute the liveranges
8123         * src/avr/ralloc.c,
8124         * src/ds390/ralloc.c,
8125         * src/hc08/ralloc.c,
8126         * src/mcs51/ralloc.c,
8127         * src/pic/ralloc.c,
8128         * src/pic16/ralloc.c,
8129         * src/xa51/ralloc.c,
8130         * src/z80/ralloc.c: recompute the liveranges after register packing
8131
8132 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
8133
8134         * src/SDCCloop.c (newInduction): fixed bug #845630
8135
8136 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8137
8138         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
8139         inadvertantly left behind from my 2003-11-12 change
8140
8141 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8142
8143         Updated headers I neglected to commit yesterday.
8144         * src/SDCClrange.h,
8145         * src/SDCCicode.h
8146
8147 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8148
8149         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
8150         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
8151         * src/SDCCopt.c (eBBlockFromiCode),
8152         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
8153         the creation of the key hash table from the sequencing so it can be used
8154         earlier (for some GCSE bug fixes still pending)
8155
8156 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8157
8158         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
8159         * support/regression/tests/addsub.c: testing genPlus shortcut
8160
8161 2003-11-15  Borut Razem <borut.razem AT siol.net>
8162
8163         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
8164
8165 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8166
8167         * src/SDCCcse.c (cseBBlock): fixed bug #527779
8168         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
8169         ordering is immaterial.
8170         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
8171
8172 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8173
8174         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
8175         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
8176         (SIGSEV) of bug #840381
8177         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
8178         unlink new file before rename if new and old filenames are the same)
8179
8180 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8181
8182         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
8183         uninitialized variables) for the mcs51. Set environment variable
8184         SDCC_GENRAMCLEAR to test.
8185         xdata initialization slightly shorter
8186
8187 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8188
8189         * src/SDCCsymt.h,
8190         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
8191         #838241 & 780691 (basicly the same bug)
8192         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
8193         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
8194
8195 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
8196
8197         * src/SDCCmain.c (linkEdit): "fix" #834252
8198
8199 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8200
8201         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
8202         * src/SDCCast.h,
8203         * src/SDCC.y: fixed bug #819403
8204
8205 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8206
8207         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
8208         the reentrant attribute.
8209         * src/hc08/gen.c (genPackBits): added missing stack readjustment
8210         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
8211         simulation
8212         * src/SDCCast.c (decorateType): fixed bug with storage class not being
8213         updated during pointer dereference; f.e. ~(((char *)1)*) was being
8214         erroneously reduced to a literal.
8215         * src/hc08/ralloc.c (packRegisters, rematStr),
8216         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
8217         some cases
8218
8219 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8220
8221         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
8222         * doc/sdccman.lyx: changed from 'article' to 'book'
8223         * doc/Makefile: readded test_suite_spec and cdbfileformat
8224
8225 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
8226
8227         * device/include/stdlib.h: include malloc.h to comply with ANSI
8228         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
8229
8230 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8231
8232         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
8233         * doc/clean.mk: also remove *.out files
8234         * doc/sdccman.lyx: some additions, larger top/bottom margins
8235
8236 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8237
8238         * src/SDCC.y: fixed bug #837365
8239         * support/regression/tests/bitopcse.c
8240         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
8241         a symbol (might be valop instead)
8242         * device/lib/Makefile.in: added errno.c to HC08SOURCES
8243         * device/lib/clean.mk: added hc08 to the cleaning list
8244
8245 2003-11-04  Borut Razem <borut.razem AT siol.net>
8246
8247         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
8248           made 2003-11-04
8249         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8250           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
8251           malloc is declared in standard stdlib.h
8252
8253 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8254
8255         * device/lib/hc08/Makefile: need to clean .rel not .o files
8256         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
8257
8258 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8259
8260         * src/port.h,
8261         * src/hc08/main.c,
8262         * src/mcs51/main.c,
8263         * src/ds390/main.c,
8264         * src/z80/main.c,
8265         * src/avr/main.c,
8266         * src/pic/main.c,
8267         * src/pic16/main.c,
8268         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
8269         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
8270         tests (which uses the port's oclsExpense function)
8271         * src/SDCC.y,
8272         * src/SDCCast.c,
8273         * src/SDCCicode.c,
8274         * src/hc08/gen.c,
8275         * src/ds390/gen.c,
8276         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
8277
8278 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8279
8280         * src/SDCCcse.c (ifxOptimize),
8281         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
8282         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
8283         deleting the IFX iCode.
8284         * src/hc08/ralloc.c: reduced unneeded slocs
8285         * src/hc08/gen.c: fixed bug in asmopToBoolean
8286
8287 2003-11-04  Borut Razem <borut.razem AT siol.net>
8288
8289         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
8290           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8291           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
8292           transferred to configure
8293
8294 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
8295
8296         Use headers defined in the C[++] standards:
8297         * sim/ucsim/gui.src/serio.src/fileio.cc
8298         * sim/ucsim/gui.src/serio.src/frontend.cc
8299         * sim/ucsim/gui.src/serio.src/main.cc
8300         * sim/ucsim/gui.src/serio.src/posix_signal.cc
8301         * support/Util/NewAlloc.c
8302         * as/hc08/lklibr.c
8303         * as/mcs51/lklibr.c
8304         * as/z80/aslist.c
8305         * as/z80/assym.c
8306
8307 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8308
8309         * Added MSVC projects for hc08 assembler and linker:
8310         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
8311         /as/hc08/link_hc08.dsp
8312
8313 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8314
8315         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8316
8317 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8318
8319         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8320
8321 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8322
8323         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8324
8325 2003-10-31  Borut Razem <borut.razem AT siol.net>
8326
8327         * support/cpp2/cpplib.h,
8328           support/cpp2/cpplib.c,
8329           support/cpp2/cpplex.c,
8330           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8331           to switch _asm block preprocessing on / off. Default is
8332           #pragma preproc_asm +
8333
8334 2003-10-31  Borut Razem <borut.razem AT siol.net>
8335
8336         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8337           when outputting comment blocks (when executed with -C option) and
8338           _asm (SDCPP specific) blocks
8339
8340 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8341
8342         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8343
8344 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8345
8346         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8347
8348 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
8349
8350         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
8351         * src/SDCCast.c (decorateType): fixed bug #832664
8352
8353 2003-10-31  Borut Razem <borut.razem AT siol.net>
8354
8355         * support\cpp2\cpplex.c: fixed for SDCPP:
8356           comments(when executed with -C option) and _asm blocks
8357           were included even if they where in skipped #if block.
8358           Applied solution from GCC cpp 3.3.2
8359
8360 2003-10-31  Borut Razem <borut.razem AT siol.net>
8361
8362         * src/SDCC.lex: sdcc now understands both formats:
8363           '# <line_number> <file_name>' and
8364           '#line <line_number> <file_name>'
8365         * support/cpp2/cppmain.c: sdcpp now generates the standard
8366           '# <line_number> <file_name>' instead of former
8367           '#line <line_number> <file_name>'
8368
8369 2003-10-30  Borut Razem <borut.razem AT siol.net>
8370
8371         * support/cpp2/cpphash.h,
8372         * support/cpp2/cpplib.h
8373         * support/cpp2/cpplex.c,
8374         * support/cpp2/cppmain.c,
8375         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
8376
8377 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8378
8379         Fixed a number of problems revealed by bug #827883.
8380         * src/SDCCloop.c (loopInvariants): Spill location of the
8381         result operand should be recomputed if extracted from
8382         a loop. Also, don't extract assignments of an iTemp
8383         from a literal.
8384         * src/SDCCast.c (isConformingBody): loop reversal should
8385         not occur if the control variable is involved with a
8386         relational operator.
8387
8388 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
8389
8390         * .version: bumped to 2.3.6 to reflect the big improvements
8391         made by Erik and Klaus. Thanks!
8392
8393 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
8394
8395         Replaced the livrange code.
8396         * src/SDCClrange.c: added new LR code
8397         * src/SDCCloop.c,
8398         * src/SDCCBBlock.h: removed remainig parts from old LR code
8399         * src/ds390/ralloc.c,
8400         * src/ds390/gen.c: minor fixes to make it work with new code
8401
8402 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8403
8404         * as/hc08/asm.h,
8405         * as/hc08/lkrloc.c,
8406         * src/hc08/gen.c,
8407         * src/hc08/ralloc.c: Fix various warnings related to the hc08
8408         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
8409         (tweaked fix for bug #818696)
8410
8411 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8412
8413         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
8414
8415 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8416
8417         * src/SDCCmain.c,
8418         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
8419         * src/mcs51/gen.c (gencjneshort),
8420         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
8421         more efficient (per Scott Bronson's suggestion)
8422
8423 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8424
8425         Extended the semantics of the critical keyword to include
8426         individual statements. See RFE #827755 and #799831
8427         * src/SDCC.y
8428         * src/SDCCicode.c
8429         * src/SDCCopt.c
8430         * src/SDCCast.c
8431         * support/Util/SDCCerr.c
8432         * support/Util/SDCCerr.h
8433         * src/mcs51/gen.c
8434         * src/ds390/gen.c
8435         * src/hc08/gen.c
8436
8437 2003-10-19  Borut Razem <borut.razem AT siol.net>
8438
8439         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
8440
8441 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8442
8443         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
8444         Fixed bug #818696
8445         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
8446         and predecrement operand is displayed
8447
8448 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8449
8450         * src/SDCCval.c (valMinus): fixed bug #826041
8451
8452 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8453
8454         Some hc08 related updates that I missed earlier
8455         * sim/ucsim/stypes.h
8456         * support/regression/ports/hc08/spec.mk
8457
8458 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8459
8460         New target "hc08" for the Motorola 68hc08 family of micros
8461
8462         * configure
8463         * configure.in
8464         * Makefile
8465         * src/hc08/*
8466         * src/SDCCmain.c
8467         * src/port.h
8468         * sim/ucsim/hc08.src/*
8469         * sim/ucsim/configure.in
8470         * src/ucsim/configure
8471         * sim/ucsim/packages_in.mk
8472         * as/hc08/*
8473         * as/Makefile
8474         * device/include/mc68hc908qy.h
8475         * device/lib/hc08/*
8476         * device/lib/Makefile.in
8477         * support/regression/ports/hc08/*
8478         * support/regression/Makefile
8479
8480 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8481
8482         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
8483         regression test
8484         * src/ds390/gen.c (genCast): fixed bug #821957
8485
8486 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8487
8488         * device/lib/logf.c: "fixed" overlay bug
8489         * support/regression/ports/host/spec.mk: added m library
8490         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
8491         * support/regression/tests/float_trans: added (for Eric)
8492
8493 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
8494
8495         * src/mcs51/gen.c (genCpl): fixed bug
8496         http://sf.net/mailarchive/message.php?msg_id=6263915
8497
8498 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
8499
8500         * src/SDCCast.c (decorateType): added extended constant folding
8501         * src/SDCCsymt.c (computeType): cleanup
8502         * src/SDCCval.c (valShift): minor optimization
8503         * support/regression/tests/ast_constant_folding.c: added
8504
8505 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8506
8507         * src/SDCCmain.c: removed some unintended changes
8508
8509 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8510
8511         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
8512         * src/z80/gen.c: fixed part of bug #817589
8513         * src/SDCCsymt.c (checkFunction): fixed bug #817895
8514
8515 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
8516
8517         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
8518         * src/SDCCcflow.c
8519         * src/SDCCcse.c
8520         * src/SDCCdflow.c
8521         * src/SDCClabel.c
8522         * src/SDCClrange.c
8523         * src/SDCCmem.c
8524         * src/SDCCopt.c
8525         * src/SDCCpeeph.c
8526         * src/SDCCset.c
8527         * src/avr/ralloc.c
8528         * src/ds390/ralloc.c
8529         * src/izt/ralloc.c
8530         * src/mcs51/ralloc.c
8531         * src/pic/ralloc.c
8532         * src/pic16/ralloc.c
8533         * src/xa51/ralloc.c
8534         * src/z80/ralloc.c
8535         * src/z80/gen.c: removed unused label "release:"
8536
8537 2003-10-06  Borut Razem <borut.razem AT siol.net>
8538
8539         * src/SDCC.lex: removed definition of unused variables
8540           save_optimize and save_options
8541
8542 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
8543
8544         * clean.mk: removed '=' in "-maxdepth=1"
8545         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
8546         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
8547
8548 2003-10-06  Borut Razem <borut.razem AT siol.net>
8549
8550         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
8551           my_unput() replaced by unput()
8552
8553 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
8554
8555         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
8556         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
8557         type-punned pointer will break strict-aliasing rules"
8558         Old LR behaviour is again default; Klaus' LR can be choosen by
8559         defining the environment variable LRKLAUS
8560         * src/SDCCBBlock.h
8561         * src/SDCCloop.c
8562         * src/SDCClrange.c
8563         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
8564         * clean.mk: fixed removal of files in bin/CVS/
8565         * device/lib/clean.mk: fixed removal of directories small and large
8566         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
8567         * src/SDCCicode.c,
8568         * src/SDCCval.c: removed superflous test for pedantic
8569
8570 2003-10-05  Borut Razem <borut.razem AT siol.net>
8571
8572         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
8573           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
8574           message "unmatched #pragma SAVE and #pragma RESTORE"
8575
8576 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8577
8578         * doc/sdccman.lyx: various additions and updates (interrupts, inline
8579           assembly, critical functions, atomic, nojtbound)
8580
8581 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
8582
8583         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
8584         * src/SDCCBBlock.h
8585         * src/SDCCloop.c
8586         * src/SDCCloop.h
8587         * src/SDCClrange.c
8588
8589 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8590
8591         * src/z80/gen.h,
8592         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8593         * src/mcs51/gen.h
8594         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8595         * src/ds390/gen.h
8596         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8597         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
8598         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
8599
8600 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8601
8602         * src/z80/gen.c (genRet): fixed bug #524753
8603         * src/z80/gen.c (genCast): fixed internal error on cast from
8604         pointer to long
8605         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
8606         fix for bug #477835 to the z80
8607         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
8608         for tracking iCodes in the peephole optimizer for z80
8609
8610 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8611
8612         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
8613         the other part of bug #814548
8614         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
8615
8616 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
8617
8618         * src/SDCCcse.c: fixed part of bug #814548
8619
8620 2003-09-28  Borut Razem <borut.razem AT siol.net>
8621
8622         * src/asm.c: rewrite of printILine() to use temporary file instead
8623           a pipe
8624         * src/xa51/main.c: commented out declaration of int rewinds
8625
8626 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8627
8628         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
8629
8630 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8631
8632         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
8633         * src/asm.c (printILine): Fixed bug #811015
8634
8635 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8636
8637         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
8638         freeing.
8639
8640 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8641
8642         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
8643         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
8644         to correctly handle general case of AOP_PAIRPTR
8645         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
8646
8647 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8648
8649         * src/mcs51/ralloc.c (fillGaps),
8650         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
8651         register positioning bug)
8652
8653 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
8654
8655         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
8656
8657 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8658
8659         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
8660         genCodePointerGet, genGenPointerGet, genFarPointerSet,
8661         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
8662         (ralloc doesn't intentionally do this now, but perhaps later)
8663         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
8664         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
8665         register positioning bugs (Fixed bug #762602 and #795325)
8666         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
8667         (Fixed bug #808779)
8668         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
8669         lines that --i-code-in-asm generates
8670
8671 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8672
8673         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
8674         trying to fclose a FILE* that was already closed.
8675
8676 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8677
8678         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
8679         of const struct should be treated as if const themselves)
8680
8681 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
8682
8683         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
8684
8685 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8686
8687         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
8688         Unix (/n) and DOS (/r/n) line terminations.
8689
8690 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8691
8692         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
8693         bug #613775
8694
8695 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8696
8697         * src/mcs51/gen.c (genFunction, genEndFunction),
8698         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
8699         and restore of EA so that stack offsets to parameters are
8700         correct when using both critical and reentrant/stack-auto.
8701         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
8702         size (can be triggered in error if sloc is shared between
8703         different sized objects)
8704         * device/include/float.h: fixed macros to explicitly use
8705         unsigned long where needed
8706
8707 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
8708
8709         Feature req. 799831: added code to allow nesting of critical functions
8710         * src/mcs51/gen.c (genFunction, genEndFunction)
8711         * src/ds390/gen.c (genFunction, genEndFunction)
8712
8713 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8714
8715         * src/SDCCsymt.c (sclsFromPtr),
8716         * src/SDCCsymt.h,
8717         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
8718         support for standard C idiom of memory mapped variables; for
8719         example, *((xdata int*)0x1234) = 1 is now internally equivalent
8720         to xdata int at 0x1234 tempvar = 1.
8721         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
8722         provided by Akiya ISHIDA
8723
8724 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
8725
8726         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
8727         * src/SDCCval.c (constVal): added reduction from int to char
8728         * src/SDCCval.c (valMult, valDiv): fixed sign handling
8729         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
8730         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
8731         to ignore the sign
8732         * support/regression/tests/shifts.c: fixed
8733
8734 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8735
8736         * src/z80/gen.c (genXor): Fixed bug #805445
8737
8738 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8739
8740         Fixed bug #621531 (const & volatile confusion in the type chain).
8741         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
8742         refer to the const or volatile state of the pointer itself.
8743
8744         * src/SDCCast.c
8745         * src/SDCCglue.c
8746         * src/SDCCicode.c
8747         * src/SDCCsymt.c
8748         * src/SDCCval.c
8749         * src/SDCC.y
8750         * src/SDCCsymt.h
8751         * src/pic/gen.c
8752         * src/pic/ralloc.c
8753         * src/pic16/gen.c
8754         * src/pic16/ralloc.c
8755         * support/regression/tests/const.c
8756
8757 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8758
8759         When checking for duplicated modules, use absolute paths
8760         instead of relative paths.  Files changed:
8761
8762         * as/mcs51/lklib.c
8763         * link/z80/lklib.c
8764
8765 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8766
8767         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
8768
8769 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8770
8771         * device/include/string.h: added size_t typedef, changed
8772         prototypes to use size_t, eliminated separate reentrant and
8773         non-reentrant declarations, added _memmove declaration
8774         * device/lib/_memcpy.c: changed to use size_t instead of int,
8775         changed /4 to >>2 to avoid division library call
8776         * device/lib/_memcmp.c,
8777         * device/lib/_memset.c,
8778         * device/lib/_strncat.c,
8779         * device/lib/_strncpy.c,
8780         * device/lib/_strncmp.c: changed to use size_t instead of int
8781         * device/lib/_memmove.c: new file (fixed bug #772294)
8782         * device/lib/Makefile.in: added _memmove.c
8783         * device/lib/z80/asm_strings.s: fixed bug #772290
8784         * support/regression/tests/bitfields.c: attempt to fix host assertion
8785         failure on amd64-unknown-linux2.2
8786
8787 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8788
8789         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
8790         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
8791         * as/z80/asmain.c (main): fixed bug #801766
8792
8793 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
8794
8795         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
8796         compilers
8797
8798 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8799
8800         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
8801         reported in bug #800609
8802
8803 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
8804
8805         * Top header beautifications in src/pic16 directory:
8806           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
8807           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
8808           pcoderegs.h, ralloc.c, ralloc.h
8809         * main.c: added top header and GPL license notice
8810         * pcode.c: fixed the if-conditional warning
8811
8812 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
8813
8814         * device/lib/_mullong.c: replaced int by short for gcc
8815
8816 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8817
8818         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
8819         and JUMPTABLE iCodes properly now (worked by accident before)
8820         * src/mcs51/gen.c (leftRightUseAcc),
8821         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
8822         iCode properly now. Use getSize instead of nRegs since a & b
8823         aren't part of the nRegs tally.
8824
8825 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
8826
8827         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
8828         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
8829           before instructions that use the _STATUS register
8830
8831 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
8832
8833         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
8834         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
8835         fetching of the pointer
8836         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
8837         copied from genNearPointerSet()
8838         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
8839         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
8840         If they pop r0/r1 they must be called in the opposite order than aopOp().
8841         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8842         (resp. --stack-auto), prepared for --xstack
8843
8844 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8845
8846         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8847
8848 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8849
8850         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8851         these ports have their own __sdcc_external_start()
8852
8853 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8854
8855         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8856         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8857         type for bits was changed. It resulted in bit variables becoming
8858         global, which is not permitted in PIC 14 assembly output.
8859
8860 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8861
8862         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8863
8864 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8865
8866         Z80 and MCS51 linkers complaint if a public symbol is defined
8867         in more than one library module:
8868
8869         * as/mcs51/lklib.c
8870         * link/z80/lklib.c
8871         * as/mcs51/Makefile.in
8872
8873 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8874
8875         A few small changes that speed up the peephole optimizer.
8876
8877         * src/SDCCpeeph.c
8878
8879 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8880
8881         Try to make the peephole optimizer smarter by maintaining
8882         an association between the assembly source code and the
8883         iCodes that originated them. Put this information to use
8884         with a new peephole rule condition "notVolatile" so that
8885         the rules can be aggressive yet still safe.
8886
8887         * src/SDCCpeeph.c
8888         * src/SDCCpeeph.h
8889         * src/mcs51/gen.c
8890         * src/mcs51/peeph.def
8891
8892 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8893
8894         Fixed bug #741761
8895
8896         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8897         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8898         if the left or right operand symbols have the accuse flag set.
8899
8900 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8901
8902         Changed the type of the result of the ! (NOT) operator to char;
8903         previously it returned the same type as the source. This allows
8904         us to eliminate all the genFloatNot functions (all of its target
8905         implementations were very buggy) since !float can use the same
8906         code as !long now.
8907
8908         * src/SDCCicode.c (ast2iCode): ! returns char
8909         * src/mcs51/gen.c (genNot, genNotFloat),
8910         * src/ds390/gen.c (genNot, genNotFloat),
8911         * src/z80/gen.c (genNot, genNotFloat),
8912         * src/pic/gen.c (genNot, genNotFloat),
8913         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8914
8915 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8916
8917         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8918         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8919            during interrupts. Ensure WSAVE is located at a shared bank address.
8920         2. Fixed page selection in some places
8921         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8922            the registers name strings.
8923         4. Fixed "signed / unsigned compare" compiler warnings.
8924         5. The PIC port manages its own allocation of the general purpose
8925            registers, but makes no attempt to reuse them. As a result when
8926            compiling it soon runs out of general purpose registers. Some
8927            additional code was added to the files pcode.c and device.c to walk
8928            through the function call tree and rename the registers so that they
8929            get reused.
8930
8931         * src/pic/device.c
8932         * src/pic/gen.c
8933         * src/pic/glue.c
8934         * src/pic/pcode.c
8935         * src/pic/pcode.h
8936         * src/pic/ralloc.c
8937         * src/pic/ralloc.h
8938         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8939         genPlus() & genMinus() when the result is the same as left or right
8940
8941 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8942
8943         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8944
8945 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8946
8947         Made bitfield a distinct type from bit so that bitfields
8948         convert as per ANSI C and bits retain their traditional
8949         boolean style behaviour. Implemented bitfield support in
8950         the z80 port.
8951
8952         * src/SDCCsymt.h,
8953         * src/SDCCsymt.c,
8954         * src/SDCCast.c,
8955         * src/cdbFile.c,
8956         * src/mcs51/gen.c,
8957         * src/ds390/gen.c: bit v bitfield split
8958         * src/z80/gen.c: New support for bitfields
8959         * support/regression/tests/bitfields.c: reenabled z80,
8960         added more tests
8961
8962 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8963
8964         Rules 246.x, 247.x relate to bitfields, the others speed up
8965         access to xdata mapped I/O devices.
8966
8967         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8968
8969 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8970
8971         Cleaned up genPackBits and genUnpackBits and added two helper
8972         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8973         for literal assignments in genPackBits (thanks to Frieder for
8974         reminding me).
8975
8976         * src/mcs51/gen.c
8977         * src/ds390/gen.c
8978
8979 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8980
8981         Fixed bug #748310 (pointer to function type mishandled when the
8982         function name is omitted). Also fixed a SIGSEGV when a function
8983         attribute (reentrant, etc) is used on a non-function or on a
8984         function but misplaced before the parameter list.
8985
8986         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8987         bug #748310
8988         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8989         * support/Util/SDCCerr.h,
8990         * support/Util/SDCCerr.c: Added func attr misuse error msg
8991
8992 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8993
8994         Fixed bug #787649 by anonymous
8995         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8996         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8997
8998 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8999
9000         Fixed numerous bitfield problems.
9001
9002         * src/SDCC.y: More bitfield related error checking
9003         * src/SDCCsymt.h,
9004         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
9005         * support/Util/SDCCerr.h,
9006         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
9007         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9008         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9009         * support/regression/tests/bitfields.c: tests added
9010
9011 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9012
9013         Made the constant following the "interrupt" keyword optional. If
9014         omitted, the function will not automatically be given an entry
9015         in the interrupt vector table (similar to #pragma NOIV, but
9016         less syntacticly kludgy). The interrupt number is also now
9017         range checked. Also fixed a bug in the high order bit example
9018         in the manual.
9019
9020         * src/SDCC.y
9021         * src/SDCCmem.c
9022         * src/SDCCglue.c
9023         * src/SDCCsymt.h
9024         * support/Util/SDCCerr.c
9025         * support/Util/SDCCerr.h
9026         * doc/sdccman.lyx
9027
9028 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9029
9030         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
9031         * src/SDCCicode.c (operandOperation): rewritten some ops
9032         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
9033         * src/SDCCsymt.c (computeType): literals are handled the same way as any
9034         other type
9035         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
9036         be re-activated by defining REDUCE_LITERALS)
9037         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
9038         unsigned, but are signed by default
9039         * src/SDCCval.c (constVal): rearranged
9040         * src/SDCCval.c (valMod): preliminary fix
9041         * src/SDCCval.c (valCastLiteral): use TYPE_* types
9042         * support/regression/literalop.c: added, work in progress
9043
9044 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9045
9046         Generate warnings for useless declarations like "char data;"
9047         that don't do what new users expect.
9048
9049         * src/SDCC.y
9050         * support/Util/SDCCerr.h
9051         * support/Util/SDCCerr.c
9052
9053 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
9054
9055         * src/SDCCval.c (valMult): fix overflow detection of negative int
9056
9057 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9058
9059         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
9060
9061         Changes to support big endian targets:
9062
9063         * src/ports.h
9064         * src/SDCCglue.c
9065         * src/avr/main.c
9066         * src/ds390/main.c
9067         * src/izt/i186.c
9068         * src/mcs51/main.c
9069         * src/pic/main.c
9070         * src/pic16/main.c
9071         * src/xa51/main.c
9072         * src/z80/main.c
9073
9074 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
9075
9076         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
9077         * device/lib/time.c: fixed warning "integer overflow in expression"
9078
9079 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
9080
9081         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
9082         * src/SDCCval.c (constVal): changed default to signed; hex and octal
9083         constants are unsigned; added recognition of "u" flag for unsigned
9084         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
9085         * src/SDCCval.c (valDiv, valMod): fixed signdness
9086         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
9087         signedness of modulo, left and right shift
9088         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
9089         * support/Util/SDCCerr.h: added warning W_INT_OVL
9090         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
9091         * src/SDCCast.c (ast_print): improved output of constants
9092
9093 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9094
9095         Fixed some warnings when building with MSVC:
9096
9097         * as\mcs51\asdata.c
9098         * as\z80\asdata.c
9099         * as\mcs51\asm.h
9100         * as\z80\asm.h
9101         * link\z80\aslink.h
9102         * link\z80\lkdata.c
9103         * link\z80\lkeval.c
9104         * link\z80\lkgb.c
9105         * link\z80\lkihx.c
9106         * link\z80\lks19.c
9107         * link\z80\lksym.c
9108         * support\cpp2\cpplib.c
9109         * src\ds390\gen.c
9110         * src\mcs51\gen.c
9111
9112 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
9113
9114         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
9115
9116 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9117
9118         * support\librarian\clean.mk: Do not remove Makefile.
9119         * support\librarian\Makefile: added.
9120
9121 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9122
9123         Added librarian to MSVC build:
9124         * all.dsp
9125         * sdcc.dsw
9126         * support\librarian\librarian.dsp
9127
9128         'configure' not needed for librarian, removed:
9129         * support\librarian\configure
9130         * support\librarian\configure.in
9131         * support\librarian\config_in.h
9132         * support\librarian\Makefile.in
9133
9134         Hopefully these ones built the librarian and the rest of sdcc properly:
9135         * Makefile
9136         * Makefile.common.in
9137
9138         Messed up 'configure', so revert to previous version:
9139         * configure
9140         * configure.in
9141
9142 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
9143
9144         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
9145         there, while the mantissa of a double is "only" 53 bits wide.
9146
9147 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9148
9149         Adding sdcclib to the build.  MSVC project coming soon.
9150         Files added/changed:
9151
9152         * support\librarian\clean.mk
9153         * support\librarian\configure
9154         * support\librarian\configure.in
9155         * support\librarian\config_in.h
9156         * support\librarian\Makefile.bcc
9157         * support\librarian\Makefile.in
9158         * support\librarian\sdcclib.c
9159         * Makefile.bcc
9160         * Makefile
9161         * Makefile.common.in
9162         * configure
9163         * configure.in
9164
9165 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9166
9167         Linker now complaints if linked modules have conflicting options, for
9168         example, one compiled using --model-large and another one compiled with
9169         --model-small.  The following files were modified:
9170
9171         * as\mcs51\asdata.c
9172         * as\mcs51\aslink.h
9173         * as\mcs51\asm.h
9174         * as\mcs51\asmain.c
9175         * as\mcs51\asout.c
9176         * as\mcs51\i51pst.c
9177         * as\mcs51\lkdata.c
9178         * as\mcs51\lklibr.c
9179         * as\mcs51\lkmain.c
9180         * as\z80\asdata.c
9181         * as\z80\asm.h
9182         * as\z80\asmain.c
9183         * as\z80\asout.c
9184         * as\z80\z80pst.c
9185         * link\z80\aslink.h
9186         * link\z80\lkdata.c
9187         * link\z80\lklibr.c
9188         * link\z80\lkmain.c
9189         * src\SDCCglue.c
9190
9191 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9192
9193         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
9194         as/mcs51/lklibr.c: Generate a warning when a library is not found.
9195
9196 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
9197
9198         * src/z80/mappings.i: fix _mul[us][int,long] entries
9199
9200 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9201
9202         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
9203
9204 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9205
9206         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
9207         * support/regression/tests/bitopcse.c: added
9208         fixed warning:
9209         * src/avr/gen.c:
9210         * src/pic/gen.c:
9211         * src/pic16/gen.c:
9212         * src/z80/gen.c:
9213         * src/xa51/gen.c:
9214
9215 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9216
9217         added support for new library format to z80, gbz80 linkers:
9218         *link/z80/aslink.h
9219         *link/z80/lklex.c
9220         *link/z80/lklib.c
9221         *link/z80/lklist.c
9222
9223 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9224
9225         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
9226         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
9227
9228 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
9229
9230         added DUMMY_READ_VOLATILE:
9231         * src/SDCC.y:
9232         * src/avr/gen.c:
9233         * src/xa51/gen.c:
9234         * src/z80/gen.c:
9235         * src/pic/gen.c:
9236         * src/pic16/gen.c:
9237         * src/mcs51/gen.c:
9238         * src/ds390/gen.c:
9239         * src/SDCCcse.c (algebraicOpts): many improvements
9240         * src/SDCCcse.h: removed algebraicOpts()
9241         * src/SDCCicode.c (picDummyRead): added
9242
9243 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9244
9245         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
9246         "Insufficient space in data memory".
9247
9248 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9249
9250         * src/mcs51/gen.c: fixed bug #771358
9251         * src/z80/gen.c: fixed bug #759087
9252
9253 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
9254
9255         * src/pic16/glue.c: minor cleanup by Vangelis
9256
9257 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9258
9259         * device/include/regc515c.h: fixed #758477
9260         * device/lib/_gptrget.c: saving some cycles in generic pointer get
9261         * device/lib/_gptrput.c: saved a few bytes
9262         * my tab spacing is 8, yours too?)
9263         * device/lib/_ser.c: process RX bytes earlier than TX bytes
9264         * device/lib/serial.c: process RX bytes earlier than TX bytes
9265         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
9266
9267 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9268
9269         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
9270
9271 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9272
9273     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
9274
9275 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
9276
9277         * device/lib/Makefile.in: bad fix, reverted to 1.43
9278
9279 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
9280
9281         * device/lib/Makefile.in: added missing z80 object files
9282
9283 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
9284
9285         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
9286         pic16 progress by Vangelis:
9287         * src/SDCCglobl.h:
9288         * src/SDCCmain.c:
9289         * src/pic/Makefile:
9290         * src/pic:
9291         * pic/Makefile:
9292         * pic16/device.c:
9293         * pic16/device.h:
9294         * pic16/gen.c:
9295         * pic16/gen.h:
9296         * pic16/genarith.c:
9297         * pic16/glue.c:
9298         * pic16/main.c:
9299         * pic16/pcode.c:
9300         * pic16/pcode.h:
9301         * pic16/pcodepeep.c:
9302         * pic16/peeph.def:
9303
9304 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9305
9306     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
9307
9308 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9309
9310     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
9311     added gbz80 build to MSVC project.
9312     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9313     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9314     from 8051 stuff and setup so it links using a .lnk file.
9315
9316 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9317
9318     * support/librarian/sdcclib.c: sdcc librarian.
9319     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9320     with sdcclib.
9321
9322 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9323
9324     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9325
9326 2003-07-02  Borut Razem <borut.razem AT siol.net>
9327
9328         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9329         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9330         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9331         src/xa51/main.c, src/z80/main.c:
9332         virtualization of glue() function: each port has it's own glue function,
9333         which is accessed by do_glue function pointer in PORT.general structure
9334
9335 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9336
9337         * DS800C400 fun, improved ROM interface and tinibios.
9338
9339 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9340
9341         * More support for DS80C400. Now includes beginning of interface to ROM.
9342
9343 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9344
9345         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9346
9347 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9348
9349         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
9350
9351 2003-06-19  Borut Razem <borut.razem AT siol.net>
9352
9353         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
9354
9355 2003-06-19  Borut Razem <borut.razem AT siol.net>
9356
9357         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
9358         fixed Z80 port - crt0.o: cannot open.
9359
9360 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
9361
9362         * support/Util/MySystem.c (merge_command): revert bad fix
9363
9364 2003-06-18  Borut Razem <borut.razem AT siol.net>
9365
9366         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
9367
9368 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9369
9370         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9371         option --use-stdout sends errors to stdout instead of stderr.
9372
9373 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
9374
9375         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
9376
9377 2003-06-15  Borut Razem <borut.razem AT siol.net>
9378
9379         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
9380         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
9381         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
9382         fixed width array of pointers replaced with sets;
9383         multiple include and lib paths ared transferred to preprocessor and linker
9384         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
9385         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
9386         fixed width array of pointers
9387         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
9388         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
9389         fixupPath(), getPathDifference()
9390         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
9391         fixed width array of pointers
9392
9393 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
9394
9395         * src/pic16/ralloc.c: fix warnings
9396         * src/pic16/pcode.c: fix warning
9397
9398 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
9399
9400          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
9401         know all the details, but essentially this set of changes enable
9402         the pic16 port to generate movff instructions and generate assembler
9403         directives,
9404         * src/SDCCmain.c:
9405         * src/pic16/gen.c:
9406         * src/pic16/glue.c:
9407         * src/pic16/pcode.c:
9408         * src/pic16/device.c:
9409         * src/pic16/main.c:
9410         * src/pic16/pcode.h:
9411         * src/pic16/pcoderegs.c:
9412         * src/pic16/ralloc.c:
9413         * src/pic16/ralloc.h:
9414
9415 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9416
9417         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9418         added option --vc, so sdcc errors and warnings are compatible with
9419         Microsoft Visual Studio.
9420
9421 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9422
9423         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
9424           device/lib/libfloat.lib: added atof function.
9425
9426 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
9427
9428         * doc/sdccman.lyx: updated to Lyx 1.3
9429         * doc/cdbfileformat.lyx: updated to Lyx 1.3
9430         * doc/test_suite_spec.lyx: updated to Lyx 1.3
9431         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
9432
9433 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
9434
9435         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
9436
9437 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9438
9439         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
9440           additions to the "related tools/documentation" section
9441
9442 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
9443
9444         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
9445
9446 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
9447
9448         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
9449         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
9450
9451 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
9452
9453         * doc/sdccman.lyx: fix double dash and other minor things
9454         * doc/Makefile: fix double dash
9455
9456 2003-05-28  Karl Bongers(patches from Martin Helmling)
9457         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
9458           condition and ignore commands.
9459
9460 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9461
9462         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
9463           is in parts still quite out of date, I did changes as far as I felt makes sense
9464           for a non-native english speaker.
9465           Please feel free to add to the manual or to correct my changes.
9466         * doc/Makefile: undid touching the date of intermediate tex files.
9467
9468 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9469
9470         * doc/sdccman.lyx: Manual has an index now
9471
9472 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
9473
9474         Finalize muluint/mulsint and mululong/mulslong merging:
9475         * device/lib/_mulint.c
9476         * device/lib/_mullong.c
9477         * device/lib/gbz80/mul.s
9478         * device/lib/gbz80/stubs.s
9479         * device/lib/z80/mul.s
9480         * device/lib/z80/stubs.s
9481         * src/SDCCsymt.c (initCSupport)
9482
9483 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9484
9485         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
9486         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
9487           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
9488           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
9489           instead of /Zm500.
9490
9491 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9492
9493         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
9494           the regression tests I'm not brave enough to enable 245.b, 245.c
9495         * doc/sdccman.lyx: added latex preamble for hyperref package.
9496           Using pdflatex this will give you a hyperlinked pdf file with
9497           bookmarks. (prepend '%' before /usepackage if this breaks something)
9498
9499 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9500
9501          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
9502
9503 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
9504
9505         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
9506
9507 2003-05-21    <johan AT balder>
9508
9509         * src/SDCCglue.c (printIval): fixed bug #739934
9510
9511 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9512
9513         Applied patch from bug 737905 (renamed yylineo to mylineno):
9514         * src/altlex.c
9515         * src/SDCCast.c
9516         * src/SDCglobl.h
9517         * src/SDCC.lex
9518         * src/SDCCsymt.c
9519         * src/SDCCval.c
9520         * src/pic16/pcode.c: Cleaned warnings
9521         * src/pic16/pcodeflow.c: Cleaned warnings
9522         * src/pic16/pcoderegs.c: Cleaned warnings
9523
9524 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
9525
9526         * src/pic16/pcode.c: Cleaned warnings
9527         * src/pic16/pcodepeep.c: Cleaned warnings
9528         * src/pic16/ralloc.c: Cleaned warnings
9529
9530 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9531
9532         * doc/sdccman.lyx: fixed bug 739745
9533         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
9534
9535 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
9536
9537         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
9538         it can be defined with CFLAGS when running configure
9539         * src/SDCCmain.c: fixed compiling + linking with object files
9540
9541 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
9542
9543         * configure.in: configure for pic16 port,
9544             added --disable-pic16-port
9545         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
9546         * src/SDCCmain.c: linkOptions is changed to set *,
9547             added if/endif conditional macros to remove options help
9548             messages from optionsTable when a port is not configured, added
9549             support for the PIc16 port in the ports table, when executing
9550             the compiler with no port specified on command line, a default
9551             port is selected with the new macro DEFAULT_PORT which is
9552             defined in port.h, in setDefaultOptions() linkOptions is removed
9553             from initialization assignment, since now it is a set,
9554             parseCmdLine uses setParseWithComma for linkOptions, in
9555             linkEdit() linkOptions are accessed with new function indexSet()
9556             which returns the i'th item of a set variable. See SDCCset.c, in
9557             linkEdit() when calling buildCmdLine(), added linkOptions as
9558             last argument. Now users can pass arguments to gplink via the
9559             -Wl option, main() uses pic16glue() to glue up pic16 programs
9560         * src/SDCCpeeph.c: various changes to support pic16
9561         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
9562             return the i'th item of the set
9563         * src/SDCCset.h: added function prototype for indexSet()
9564         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
9565         * src/clean.mk: added pic16 in CLEANALLPORTS variable
9566         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
9567             added macro DEFAULT_PORT
9568         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
9569         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
9570             generated
9571         * src/pic16/glue.c: commented out some error producing lines
9572         * src/pic16/main.c: __config directives are commented out to stop
9573             gpasm complaining and test the linkage with gplink, _linkCmd and
9574             _asmCmd changed to be more gplink and gpasm friendly
9575         * src/pic16/peeph.def: peep rule 3 is commented out, since it
9576             produced an error when parsed, peep rule 12 is added to utilize
9577             movff, but it is commented out since the pCode does not support
9578             yet a command with 2 address arguments
9579
9580 2003-05-18    <johan AT balder>
9581
9582         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9583         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9584 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
9585
9586         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
9587   Added feature to script commands from file.
9588
9589 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
9590
9591         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
9592         * src/SDCCutil.c: include ctype.h for win32
9593
9594 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
9595
9596         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
9597
9598 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
9599
9600         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
9601   Fixed so you can set breakpoints prior to run, run does not stop
9602   on entry now.  Add tbreak.  Other enhancements and fixes for use
9603   with ddd.
9604
9605 2003-05-12  Borut Razem <borut.razem AT siol.net>
9606
9607         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
9608
9609 2003-05-11  Borut Razem <borut.razem AT siol.net>
9610
9611         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
9612         the path of bin directory, so that PATH is the only env. variable, which has to be set
9613         in case of standard installation.
9614         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
9615         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
9616         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
9617
9618 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9619
9620         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
9621         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
9622         temp files are in the port dir; clean the gen/test directory when
9623         generating new test.c
9624         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
9625         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
9626         * support/regression/tests/zeropad.c: added
9627
9628 2003-05-09    <johan AT balder>
9629
9630         * src/SDCCglue.c: fixed bug #597940
9631
9632 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
9633
9634         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9635   cache sfr, optimize next,step, fix off by one sourceline,
9636   support ddd list function.
9637         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
9638
9639 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9640
9641         * support/regression/HTMLgen.py: added compare_s2f()
9642         * support/regression/Makefile: redo 1.27
9643         * support/regression/generate-cases.py: redo 1.5
9644
9645 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
9646
9647         * support/regression/tests/float.c: workaround 33 bit hex constant
9648         * support/regression/tests/simplefloat.c: fix division for host
9649
9650 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
9651
9652         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
9653         that tame's the PIC's over-aggressive optimizer.
9654
9655 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9656
9657          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
9658          support for MSVC.
9659
9660 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
9661
9662         Initial support for DS80C400. "Hello world" runs on TINIm400
9663         (with polled I/O).
9664
9665 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
9666
9667          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9668          * Some notes on ddd usage added in debugger/README
9669          Martin Helmling adding more features and fixes for ddd GUI debugger.
9670          Code added for nexti, stepi, up, down, and other adjustments.
9671
9672 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
9673
9674         * src/pic/pCodepeep.c non-wildcard asmops are now handled
9675         * src/pic/peeph.def Added two rules to optimize carry manipulation
9676         * src/pic/* removed debug printfs
9677
9678 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
9679
9680         * debugger/mcs51/cmd.c: added header newalloc.h
9681
9682 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
9683
9684         * as/Makefile: new EXEEXT
9685         * as/z80/Makefile: remove trailing slash of BUILDIR
9686         * as/z80/clean.mk: new EXEEXT
9687         * Makefile.common.in: add to CFLAGS (and others), don't replace it
9688         * support/cpp2/Makefile.in: new EXEEXT
9689         * src/pic/glue.c (pic14emitRegularMap): fixed warning
9690
9691 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
9692
9693         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
9694         EXEEXT was introduced to fix all related problems with targets
9695         "clean", "install" and "uninstall"; a couple of further flaws
9696         especially with "clean" have been fixed too
9697         * as/mcs51/Makefile.in
9698         * as/mcs51/clean.mk
9699         * as/z80/Makefile
9700         * Makefile
9701         * clean.mk
9702         * debugger/mcs51/Makefile.in
9703         * debugger/mcs51/clean.mk
9704         * link/z80/Makefile
9705         * link/z80/Makefile.in
9706         * link/z80/clean.mk
9707         * link/Makefile
9708         * packihx/Makefile.in
9709         * packihx/clean.mk
9710         * sim/ucsim/Makefile
9711         * sim/ucsim/clean.mk
9712         * sim/ucsim/avr.src/Makefile.in
9713         * sim/ucsim/avr.src/clean.mk
9714         * sim/ucsim/s51.src/Makefile.in
9715         * sim/ucsim/s51.src/clean.mk
9716         * sim/ucsim/xa.src/Makefile.in
9717         * sim/ucsim/xa.src/clean.mk
9718         * sim/ucsim/z80.src/Makefile.in
9719         * sim/ucsim/z80.src/clean.mk
9720         * sim/ucsim/main_in.mk
9721         * sim/ucsim/packages_in.mk
9722         * sim/ucsim/gui.src/Makefile.in
9723         * sim/ucsim/gui.src/serio.src/Makefile.in
9724         * sim/ucsim/gui.src/serio.src/clean.mk
9725         * src/Makefile.in
9726         * src/clean.mk
9727         * support/cpp2/Makefile.in
9728         * support/cpp2/clean.mk
9729         * support/makebin/Makefile
9730         * support/makebin/clean.mk
9731         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
9732         * doc/sdccman.lyx: --program-suffix no longer needed
9733
9734 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
9735
9736          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
9737          Martin Helmling added support for ddd GUI debugger.
9738          Code added to display assembly, set variables, and other commands
9739          to interface to ddd.
9740
9741 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
9742
9743         * as/Makefile: fix target clean
9744         * as/clean.mk: fix target clean
9745         * as/z80/clean.mk: fix target clean
9746
9747 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
9748
9749         * Makefile.common.in: added  AT EXEEXT AT
9750         * configure.in: removed all mingw32 stuff
9751         * configure: rebuilt from configure.in
9752         * doc/sdccman.lyx: updated section "installation"
9753         * support/scripts/sdcc_mingw32: adapted to configure
9754         * support/scripts/sdcc_cygwin_mingw32: added
9755
9756 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
9757
9758         * src/pic Added object file support for the PIC port
9759         * src/pic Applied patch from Craig Franklin (this started the object file support)
9760         * src/regression Updated the PIC regression tests for object files
9761
9762 2003-04-20  Borut Razem <borut.razem AT siol.net>
9763
9764         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
9765           lklex.c: In function `getfid':
9766           lklex.c:203: warning: array subscript has type `char'
9767         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
9768           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
9769         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
9770           stack handling macros
9771
9772 2003-04-19  Borut Razem <borut.razem AT siol.net>
9773
9774         * "handling space characters in file path" task:
9775         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
9776         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
9777         * support/Util/MySystem.h: make it self-sufficient
9778         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
9779           src/z80/main.c, sdcc/as/mcs51/lklex.c:
9780           handling space characters in file path
9781         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
9782           (it will be used by assemblers, which have their own includes, e.g. gpasm)
9783         * support/Util/MySystem.c: handling space characters in executable's path
9784
9785 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
9786
9787         * as/z80/Makefile: fix permanent rebuild of z80
9788         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
9789         * support/regression/tests/bitfields.c: added Johan's bitfields.c
9790
9791 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
9792
9793         * src/SDCCopt.c: add special case optimization to replace modulo by
9794           a power of two with a bitwise AND.
9795
9796 2003-04-18    <johan AT balder>
9797
9798         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
9799
9800 2003-04-17    <johan AT balder>
9801
9802         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
9803         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
9804
9805 2003-04-13  Borut Razem <borut.razem AT siol.net>
9806
9807         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
9808         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
9809           fixed mingw problem in adl_NORMALIZE_PATH
9810
9811 2003-04-12  Borut Razem <borut.razem AT siol.net>
9812
9813         * fixed "#pragma SAVE/RESTORE can not be nested":
9814         * src/SDCC.lex: reworked pragma handling functions
9815         * sdcc/src/SDCCglobl.h: reworked stack handling macros
9816         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
9817
9818 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9819
9820         * src/SDCCutil.c (pathEquivalent): defined but not used
9821         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
9822         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
9823         * configure: rebuilt from configure.in
9824         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9825         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9826         * device/include/Makefile.in: replace sdcc_datadir
9827         * device/lib/Makefile.in: replace sdcc_datadir
9828         * Makefile.common.in: add LDFLAGS from configure
9829         * packihx/Makefile.in: use LDFLAGS
9830         * src/Makefile.in: use LDFLAGS
9831         * support/cpp2/Makefile.in: add LDFLAGS from configure
9832         * support/makebin/Makefile: use LDFLAGS
9833         * .version: bumped version number to 2.3.5
9834
9835 2003-04-12  Borut Razem <borut.razem AT siol.net>
9836
9837         * completed "different paths" task:
9838         * src/SDCCmacro.c: fixed bug in handling quotes
9839         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
9840         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9841
9842 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9843
9844         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9845
9846 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9847
9848         * ds390/gen.c ds390/peeph.def: fix bug 706781
9849
9850 2003-04-11  Borut Razem <borut.razem AT siol.net>
9851
9852         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9853
9854 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9855
9856         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9857         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9858          set - this bit used to not be set...).
9859         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9860           bad code in PIC Port
9861         * src/regression/and2.c added to test bug 609268
9862         * src/regression/Makefile added and2.c to regression test
9863
9864
9865 2003-04-08    <johan AT CP255758-A>
9866
9867         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9868         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9869         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9870
9871 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9872
9873         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9874         fix bug #487815
9875         * support/cpp2/Makefile.in: fix bug #487815
9876         * configure: rebuilt from configure.in
9877         * Makefile.common.in: docdir changed, new path suffixes
9878         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9879         * sdcc_vc_in.h: reflect changes from sdccconf.h
9880         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9881         * src/SDCCutil.h: remove BINDIR hack
9882         * doc/sdccman.lyx: update new path hierarchy
9883
9884 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9885
9886         * src/SDCCpeeph.c: added okToRemoveSLOC test
9887
9888 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9889
9890         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9891
9892 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9893
9894         * src/SDCCpeeph.c: added labelIsReturnOnly test
9895         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9896
9897 2003-04-05    <johan AT balder>
9898
9899         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9900         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9901         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9902         * src/SDCCast.c: fixed a warning
9903         * src/SDCCast.h: fixed a warning
9904         * src/SDCCicode.c (operandFromAst): fixed a warning
9905
9906 2003-04-04    <johan AT balder>
9907
9908         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9909         * src/SDCCast.c (decorateType): fixed bug #715076
9910         * src/SDCC.y: fixed bug #702907
9911
9912 2003-04-03    <johan AT balder>
9913
9914         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9915         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9916         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9917         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9918         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9919
9920 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9921
9922         * _decdptr.c: fix return values
9923         * _gptrget.c: fix return values
9924         * _gptrgetc.c: fix return values
9925         * _gptrput.c: fix return values
9926         * _mulint.c: fix return values
9927         * as/z80/Makefile: fix 'make -j' problem
9928
9929 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9930
9931         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9932         * configure.in: big cleanup, updated to autoconf 2.5x
9933         * configure: rebuilt from configure.in
9934         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9935         * sdcc_vc_in.h: reflect changes from sdccconf.h
9936         * doc/Makefile: fixed a flaw in "make install"
9937
9938 2003-04-02    <johan AT balder>
9939
9940         * src/ds390/gen.c (genCmp): no comments
9941         * src/mcs51/gen.c (genCmp): no comments
9942         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9943         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9944
9945 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9946
9947         * support/regression/generate-cases.py: place generated file in given sub directory
9948         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9949         * support/regression/Makefile: improvements for 'make -j';
9950         side effect: it's simpler and faster now
9951
9952 2003-03-31  Borut Razem <borut.razem AT siol.net>
9953
9954         * src/z80/main.c: link-{port} and as-{port} defined without path
9955         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9956
9957 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9958
9959         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9960
9961 2003-03-30  Borut Razem <borut.razem AT siol.net>
9962
9963         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9964           changed type of list parameter to set
9965         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9966         * src/port.h: changed type of do_assemble() parameter to set
9967         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9968           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9969           definition of "cppoutfilename" macro with NULL value in preProcess()
9970         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9971         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9972         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9973           replaced with set *binPathSet
9974         * shash_add() deallocates the item, if allready exsists, before adding the new one
9975         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9976
9977 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9978
9979         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9980           a nested for loop bug in the PIC port
9981         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9982           for loops
9983
9984 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9985
9986         * support/Util/dbuf.h: remove C++ stuff to make it portable
9987
9988 2003-03-28  Borut Razem <borut.razem AT siol.net>
9989
9990         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9991           literal strings in stringLiteral()
9992         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9993         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9994           to the project
9995
9996 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9997
9998         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9999
10000 2003-03-26    <johan AT balder>
10001
10002         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
10003         * src/ds390/gen.c (saveRegisters): catched symbol abuse
10004         * src/SDCCast.c (decorateType): fixed " -v < 3"
10005
10006 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
10007
10008         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
10009         Added Lenny Story's debug infrastructure changes:
10010         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
10011         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
10012         * src/cdbFile.c: added
10013         * src/SDCCdebug.c: added
10014         * src/SDCCdebug.h: added
10015         * src/SDCCast.c (createFunction)
10016         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
10017         * src/SDCCmain.c (parseCmdLine, main)
10018         * src/SDCCmem.c (redoStackOffsets)
10019         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
10020         * src/SDCCsymt.h
10021         * src/common.h
10022         * src/avr/gen.c (genAVRCode)
10023         * src/ds390/gen.c (gen390Code)
10024         * src/mcs51/gen.c (gen51Code)
10025         * src/pic/gen.c (genpic14Code)
10026         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
10027         * src/xa51/gen.c (genXA51Code)
10028         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
10029
10030 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10031
10032         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
10033         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
10034
10035 2003-03-22    <johan AT balder>
10036
10037         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
10038
10039 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
10040
10041         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
10042         * doc/cdbfileformat.lyx: added, written by Lenny Story
10043         * doc/Makefile: added cdbfileformat.lyx
10044         * doc/clean.mk: added cdbfileformat.lyx
10045
10046 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
10047
10048         * src/mcs51/peeph.def: fix bug #705773
10049
10050 2003-03-20    <johan AT balder>
10051
10052         An sfr/sbit can have an "at #" AND an initializer
10053         * src/SDCCsymt.c (checkSClass):
10054         * src/SDCCmem.c (allocGlobal):
10055         * src/SDCCmem.c (allocLocal):
10056         * src/SDCCast.c (createBlock):
10057
10058 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
10059
10060         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
10061
10062 2003-03-16    <johan AT balder>
10063
10064         Undid the hackup of const and volatile, the problem is much bigger
10065         * src/SDCC.y:1.65
10066         * src/SDCCast.c:1.171
10067         * src/SDCCglue.c:1.138
10068         * src/SDCCicode.c:1.146
10069         * src/SDCCsymt.c:1.150
10070         * src/SDCCval.c:1.65
10071
10072 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
10073
10074         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
10075         * src/ds390/gen.c (genAddrOf): fixed bug #704087
10076
10077 2003-03-13    <johan AT balder>
10078
10079         Hackup const and volatile modifiers in type chains a bit:
10080         * src/SDCC.y:1.63
10081         * src/SDCCast.c:1.169
10082         * src/SDCCglue.c:1.136
10083         * src/SDCCicode.c:1.143
10084         * src/SDCCsymt.c1.146
10085         * src/SDCCsymt.h1.59
10086         * src/SDCCval.c:1.63
10087
10088 2003-03-12    <johan AT balder>
10089
10090         * src/SDCCBBlock.h: more LRH debugging junk
10091         * src/SDCCcflow.h: more LRH debugging junk
10092         * src/SDCCloop.c: more LRH debugging junk
10093         * src/SDCC.y (struct_declaration): fixed bug #697590
10094         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
10095         * src/ds390/gen.c (aopForRemat): fixed bug #700031
10096         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
10097
10098 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10099         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
10100         test function names must now match exactly).
10101         * src/SDCCcse.c: added special case in findCheaperOp to allow
10102         extending a short integer. Makes less awful code for bug 700121 test case.
10103
10104 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10105
10106         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
10107         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
10108
10109 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10110
10111         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
10112         actually called (operandsNotEqual() was called for all
10113         operandsNotEqualX tests).
10114
10115 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10116
10117         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
10118         with shorter literals. Fixes bug 700121.
10119
10120 2003-03-11    <johan AT balder>
10121
10122         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
10123
10124 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
10125
10126         * src/SDCCloop.c (mergeRegions): an evil beast is dead
10127         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
10128
10129 2003-03-10  Borut Razem <borut.razem AT siol.net>
10130
10131         * src/SDCCmain.c: pipe preprocessor's output
10132         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10133         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10134         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10135         which closes all pipes in pipeSet set
10136         * src/SDCCset.c: free deleted item in function deleteSetItem()
10137         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10138         moved from z80 to src subproject
10139         * .version: increased version number to 2.3.4
10140
10141 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
10142
10143         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
10144         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
10145         * support/regression/ports/xa51/spec.mk: fix typo
10146
10147 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
10148
10149         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
10150
10151 2003-03-09  Borut Razem <borut.razem AT siol.net>
10152
10153         * src/SDCCmain.c: pipe preprocessor's output
10154         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10155         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10156         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10157         which closes all pipes in pipeSet set
10158         * src/SDCCset.c: free deleted item in function deleteSetItem()
10159         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10160         moved from z80 to src subproject
10161
10162 2003-03-09  Borut Razem <borut.razem AT siol.net>
10163
10164         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
10165         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
10166         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
10167         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
10168         * src/SDCCglobl.h: unification of WIN32 native definitions
10169
10170 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10171
10172         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
10173
10174 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10175
10176         * src/configure.in:   check for endianess (even while cross-compiling)
10177         * src/configure:      check for endianess (even while cross-compiling)
10178         * src/configure_in.h: check for endianess (even while cross-compiling)
10179         * src/avr/gen.c:        remove old endianess stuff
10180         * src/mcs51/gen.c:      remove old endianess stuff
10181         * src/ds390/gen.c:      remove old endianess stuff
10182         * src/pic/gen.c:        remove old endianess stuff
10183         * src/pic/genarith.c:   remove old endianess stuff
10184         * src/pic/glue.c:       fix endianess check
10185         * src/pic16/gen.c:      remove old endianess stuff
10186         * src/pic16/genarith.c: remove old endianess stuff
10187         * src/pic16/glue.c:     fix endianess check
10188         * src/xa51/gen.c:       remove old endianess stuff
10189         * src/z80/gen.c:        fix endianess check
10190         * src/SDCCglue.c:       fix endianess check
10191         * src/ds390/peeph.def: fix bug 700036
10192
10193 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10194
10195         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
10196         * src/configure: find appropriate data-types on host for SDCC's int and long
10197         * src/configure.in: find appropriate data-types on host for SDCC's int and long
10198         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
10199         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
10200
10201 2003-03-07    <johan AT balder>
10202
10203         Just a big NOOP:
10204                 some minor cleanups before the big shot
10205                 OP_DEFS and OP_USES now use Kevin's protection
10206                 new option --nolabelopt
10207
10208         * src/SDCCBBlock.c:
10209         * src/SDCCast.c,:
10210         * src/SDCCcflow.c:
10211         * src/SDCCcse.c:
10212         * src/SDCCicode.c:
10213         * src/SDCCicode.h:
10214         * src/SDCClabel.c:
10215         * src/SDCCloop.c:
10216         * src/SDCCmain.c:
10217         * src/ds390/ralloc.c:
10218         * src/mcs51/ralloc.c:
10219         * src/pic/ralloc.c:
10220         * src/xa51/ralloc.c:
10221         * src/z80/ralloc.c:
10222
10223 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
10224
10225         * src/pic/pcode.c (get_op): fix 64 bit warnings
10226         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
10227         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
10228         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
10229         * support/regression/tests/malloc.c: fix 64 bit warnings
10230
10231 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
10232
10233         * src/mcs51/gen.c (genMinus): fixed bug 696436
10234
10235 2003-03-02  Borut Razem <borut.razem AT siol.net>
10236
10237         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
10238
10239 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
10240
10241         * configure.in: test for mkstemp
10242         * sdccconf_in.h: add HAVE_MKSTEMP
10243
10244 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
10245
10246         * device/include/ctype.h: removed warning while using --stack-auto
10247         * device/include/malloc.h: removed warning while using --stack-auto
10248         * device/include/string.h: removed warning while using --stack-auto
10249
10250 2003-02-23  Borut Razem <borut.razem AT siol.net>
10251
10252         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
10253         because NDEBUG is defined (see man assert)
10254         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
10255
10256 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10257
10258         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
10259         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
10260
10261 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10262
10263         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
10264         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
10265
10266 2003-02-18    <johan AT balder>
10267
10268         * as/mcs51/asmain.c (asmbl): module can start with a digit
10269         * as/z80/asmain.c (asmbl): module can start with a digit
10270
10271 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
10272
10273         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
10274         * src/asm.c: fix pipe() for Mingw32
10275
10276 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
10277
10278         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
10279         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
10280         make -V work again; --c1mode reads now from stdin
10281         * doc/sdccman.lyx: added --c1mode
10282         * support/Util/SDCCerr.c: new messages for c1 mode
10283         * support/Util/SDCCerr.h: new messages for c1 mode
10284         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
10285
10286 2003-02-15    <johan AT balder>
10287
10288         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
10289
10290 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
10291
10292         * doc/sdccman.lyx: Environment variables, -o and other minor things
10293
10294 2003-02-14    <johan AT balder>
10295
10296         * src/xa51/main.c: before anyone really tries to use it :)
10297
10298         * Install doc's in share/sdcc/doc
10299         * removed some obsolete files
10300         * Do a proper make distclean and uninstall
10301         M Makefile.common.in
10302         R sdccbuild.sh
10303         M as/Makefile
10304         M device/include/Makefile.in
10305         M device/lib/Makefile.in
10306         M doc/sdccman.lyx
10307         M link/Makefile
10308         M sim/ucsim/doc/Makefile.in
10309         M src/clean.mk
10310         R src/avr/peeph.rul
10311         R src/xa51/peeph.rul
10312         M support/cpp2/Makefile.in
10313         M support/makebin/Makefile
10314
10315
10316 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10317
10318         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10319
10320 2003-02-10  Borut Razem <borut.razem AT siol.net>
10321
10322         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10323         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10324         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10325         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10326         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10327         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10328         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10329         src/z80/Makefile.bcc: Borland Makefile cleanup
10330         * as/z80/Makefile.bcc: Added Borland Makefile
10331         * support/cpp2/borland.h: Removed
10332
10333 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10334
10335         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10336         * src/SDCC.lex: new pragma NOIV
10337         * src/SDCCglobl.h: new pragma NOIV
10338         * src/SDCCmem.c: new pragma NOIV
10339
10340 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10341
10342         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10343
10344 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10345
10346         * src/SDCCmain.c: signal handling is switched off by --debug
10347         * doc/Makefile: small fix for install; use clean.mk again
10348         * doc/clean.mk: clean *.pdf and *.html too
10349
10350 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
10351
10352         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
10353         * device/lib/printfl.c: fix a ds390 bug by making it portable
10354         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
10355         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
10356         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
10357         * debugger/mcs51/cmd.c: converted multi-line string literals
10358         * sim/ucsim/globals.cc: converted multi-line string literals
10359         * src/SDCCmain.c: introduced signal handler to remove temp files
10360         * doc/Makefile: small tweaks, implement clean
10361         * doc: removed generated files
10362
10363 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10364
10365         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
10366         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
10367         Address Record is not correctly generated for DS390."
10368
10369 2003-02-02  Borut Razem <borut.razem AT siol.net>
10370
10371         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
10372         * as/mcs51/asm.h: fixed compilation with Borland C
10373         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
10374         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
10375         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
10376         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
10377         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
10378         src/z80/Makefile.bcc: delete $(LIB) only if exist
10379         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
10380
10381 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
10382
10383         * device/include/malloc.h: introduced NULL
10384         * device/include/string.h: introduced NULL
10385         * device/include/stdlib.h: introduced NULL
10386         * device/lib/_memcpy.c: removed NULL
10387         * device/lib/_strcat.c: removed NULL
10388         * device/lib/_strchr.c: removed NULL
10389         * device/lib/_strcmp.c: removed NULL
10390         * device/lib/_strcpy.c: removed NULL
10391         * device/lib/_strcspn.c: removed NULL
10392         * device/lib/_strlen.c: removed NULL
10393         * device/lib/_strncat.c: removed NULL
10394         * device/lib/_strncmp.c: removed NULL
10395         * device/lib/_strncpy.c: removed NULL
10396         * device/lib/_strpbrk.c: removed NULL
10397         * device/lib/_strrchr.c: removed NULL
10398         * device/lib/_strspn.c: removed NULL
10399         * device/lib/_strstr.c: removed NULL
10400         * device/lib/_strtok.c: removed NULL
10401         * device/lib/malloc.c: removed NULL, include own header
10402
10403 2003-02-02    <johan AT balder>
10404
10405         * 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
10406         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
10407         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
10408         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
10409         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
10410         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
10411
10412 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10413
10414         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
10415         area 'DATA'"
10416
10417 2003-02-01    <johan AT balder>
10418
10419         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
10420
10421 2003-01-31    <johan AT CP255758-A>
10422
10423         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
10424
10425 2003-01-30    <johan AT balder>
10426
10427         * src/SDCCBBlock.c: automatic bug detection
10428         * src/SDCCicode.c: automatic bug detection
10429
10430 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10431
10432         * src/SDCCglobl.h:   now --xram-size 0 works
10433         * src/SDCCmain.c:    now --xram-size 0 works
10434
10435 2003-01-29    <johan AT balder>
10436
10437         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
10438
10439 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10440
10441         * as/mcs51/aslink.h: Added options --xram-size and --code-size
10442         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
10443         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
10444         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
10445         * src/SDCCglobl.h:   Added options --xram-size and --code-size
10446         * src/SDCCmain.c:    Added options --xram-size and --code-size
10447
10448 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
10449
10450         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
10451         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
10452
10453 2003-01-27    <johan AT balder>
10454
10455         * src/SDCC.y: fixed bug #613764
10456
10457 2003-01-26    <johan AT balder>
10458
10459         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
10460         * src/SDCCsymt.h: fixed bug #673374
10461         * src/SDCCglue.c: fixed bug #661910
10462         * src/SDCCast.c: fixed bug #458099 and 673374
10463
10464 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
10465
10466         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
10467         * as/mcs51/strcmpi.h: added
10468         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
10469         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
10470         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
10471         * as/mcs51/assym.c: strcmpi -> as_strcmpi
10472         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
10473         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
10474         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
10475         * as/mcs51/Makefile.aslink: new module strcmpi
10476         * as/mcs51/Makefile.asx8051: new module strcmpi
10477         * as/mcs51/Makefil.bcc: new module strcmpi
10478         * as/mcs51/Makefile.in: new module strcmpi
10479         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
10480
10481 2003-01-26    <johan AT balder>
10482
10483         * src/SDCCglue.c: reverted back to 1.124
10484         * src/SDCCast.c: reverted back to 1.156
10485         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
10486
10487 2003-01-25    <johan AT balder>
10488
10489         * src/SDCCglue.c: A better fix for bug #661910
10490         * src/SDCCast.c: A better fix for bug #661910
10491         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
10492
10493 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10494
10495         * src/Makefile.in: remove spawn.o
10496         * src/SDCCmain.c: remove spawn.h
10497         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
10498         * src/spawn.c: removed
10499         * src/spawn.h: removed
10500         * support/regression/ports/ds390/spec.mk: link with -r
10501
10502 2003-01-24    <johan AT CP255758-A>
10503
10504         * src/ds390/gen.c (aopOp): fixed bug #667458
10505         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
10506         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
10507         (createIvalCharPtr): an ival doesn't always have a storage class anymore
10508
10509 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10510
10511         * src/mcs51/peeph.def: better assembler identation by Frieder
10512         * src/mcs51/gen.c: better assembler identation by Frieder
10513
10514 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
10515
10516         * as/z80/string.h: removed for gcc 3.2
10517         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
10518         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
10519
10520 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10521
10522         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
10523         * src/SDCCpeeph.c (replaceRule): fix bug #663503
10524         * support/regression/Makefile: separate temp files for ports
10525         * support/regression/generate-cases.py: separate temp files for ports
10526         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10527         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10528
10529 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10530
10531         * moved tinitalk to device/examples/ds390
10532
10533 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
10534
10535         * as/mcs51/lkmem.c: rflag is for DS390
10536         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
10537         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
10538                          (linkEdit): move mem- and map-files the same way as ihx-files
10539         * src/z80/main.c (_setDefaultOptions): removed --generic
10540         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
10541         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
10542         * src/pic/glue.c (picglue): --c1mode works again
10543         * src/pic16/glue.c (pic16glue): --c1mode works again
10544         * src/asm.c (printCLine): fix #660034
10545
10546 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
10547
10548         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
10549         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
10550         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
10551         * as/mcs51/lkmem (summary): better fix for sp problem
10552         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
10553         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
10554         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
10555                                               remove --stack-after-data
10556
10557 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
10558
10559         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
10560         * src/SDCCutil.c (join): ugly bug: missing '\0'
10561         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
10562
10563 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10564
10565         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
10566         * src/port.h: typo
10567         * src/pic/main.c (_asmCmd): gpasm supports -o
10568         * src/z80/main.c: more general macros
10569         * device/lib/Makefile.in: remove intermediate files
10570
10571 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10572
10573         * .version: Bumped version number to 2.3.3
10574         * src/SDCCBBlock.c: new option -o
10575         * src/SDCCglobl.h: new option -o
10576         * src/SDCCglue.c: new option -o
10577         * src/SDCCmain.c: new option -o
10578         * src/asm.c: new option -o
10579         * src/ds390/main.c: new option -o
10580         * src/pic/glue.c: new option -o
10581         * src/pic/pcode.c: new option -o
10582         * src/pic/ralloc.c: new option -o
10583         * src/pic16/glue.c: new option -o
10584         * src/pic16/pcode.c: new option -o
10585         * src/pic16/ralloc.c: new option -o
10586         * src/z80/main.c: new option -o
10587         * device/lib/Makefile.in: use -o
10588         * support/regression/ports/ds390/spec.mk: use -o
10589         * support/regression/ports/gbz80/spec.mk: use -o
10590         * support/regression/ports/mcs51/spec.mk: use -o
10591         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
10592         * support/regression/ports/z80/spec.mk: use -o
10593         * support/regression/ports/ucz80/spec.mk: use -o
10594         * support/regression/ports/xa51/spec.mk: use -o
10595         * support/regression/fwk/lib/timeout.c: fix usage string
10596
10597 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
10598         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
10599
10600 2003-01-07    <johan AT balder>
10601
10602         * src/SDCCast.c (decorateType): fixed bug #600035
10603
10604 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
10605         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
10606         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
10607         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
10608         * src/pic/pcode.c: outcommented unused variable to remove warnings
10609         * src/pic/ralloc.c: outcommented unused variable to remove warnings
10610
10611 2003-01-06    <karl AT turbobit.com>
10612         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
10613    regression tests.
10614
10615 2003-01-06    <johan AT balder>
10616
10617         * src/SDCCicode.c: fixed array add
10618
10619 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
10620         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
10621         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
10622
10623 2003-01-04    <johan AT balder>
10624
10625         * src/SDCCval.c (getNelements): fixed the initialized array of structures
10626
10627 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10628         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
10629
10630 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10631         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
10632         * support/regression/tests/bug-524697.c: fit mem usage into 8032
10633
10634 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10635         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
10636
10637 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
10638         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
10639
10640 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
10641         * src/mcs51/main.c: removed {bindir}{sep} from aslink
10642
10643 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10644
10645     * in \sdcc\as\mcs51\ changed these files in order to create an
10646     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
10647     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
10648     following files to include the previous two files: aslink.dsp,
10649     Makefile.aslink, Makefile.bcc, and Makefile.in.
10650
10651     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
10652     .adb instead of .cdb
10653
10654 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10655
10656         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
10657         value from option --iram-size.
10658
10659 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10660
10661         * \sdcc\as\mcs51\lklist.c: added boundary check before using
10662         dram[] array.
10663
10664 2002-09-18    <wiml AT hhhh.org>
10665
10666         * SDCClrange.h: exposed setFromRange() and setToRange()
10667         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
10668           packRegsForAccUse() (bug 542397)
10669         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
10670           multiple times and emitting the fetch operations more than once
10671           added aopGetUsesAcc() function to allow binary operators to
10672           fetch their operands in the correct order; made genMinus() emit
10673           compact code for X = LITERAL - Y
10674
10675 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10676         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
10677         sprintf() in line 1267.
10678
10679 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10680         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
10681         like ports.
10682
10683 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10684         Changes to aslink (All the changes are marked with 'JCF'):
10685
10686         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
10687         summary().
10688
10689         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
10690         area BSEG.  Also moves, if possible, the DATA area down into the internal
10691         ram so more space is available.
10692
10693         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
10694         sflag.
10695
10696         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
10697         not bytes.  Function summary() which creates a memory usage summary
10698         file with extension .mem.  Reports of overlaping stack and small stack
10699         size.  If the space for the stack is less than 16 bytes aslink trows a
10700         warning.
10701
10702         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
10703         the 8051.  Option 'y' for memory summary output file.
10704
10705         Changes to sdcc (All the changes are marked with 'JCF'):
10706
10707         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
10708
10709         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
10710         overlaying area for it (uses RegBankUsed[4]).
10711
10712         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
10713         bank zero as used by default.  By default aslink locates the stack
10714         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
10715         the creation of the .mem file.  Delegates the allocation of data area
10716         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
10717         the begining of the stack area to aslink.
10718
10719         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
10720         glue() in SDCCglue.c creates an area for it.
10721
10722 2002-09-03  Borut Razem <borut.razem AT siol.net>
10723         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
10724         sdcc/src/pic/glue.c:
10725         introduced atexit() handler for teporay files removal in case of
10726         errors, assertions, ...
10727
10728 2002-08-29  Borut Razem <borut.razem AT siol.net>
10729         * sdcc/support/cpp2/auto-host_vc_in.h:
10730         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
10731         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
10732         Maybe there is a similar problem with BORLANDC? It should be checked!
10733
10734         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
10735         corrected improper use of assert: the assignment to clr variable was done inside the assert.
10736         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
10737         was not executed, and the compiler (cl) launched a warning:
10738         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
10739
10740 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10741         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
10742
10743 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
10744         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
10745
10746         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10747           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
10748           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
10749           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10750           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
10751           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
10752           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
10753         - added Release configuration in VS projects
10754         - review of compiler an linker options
10755         - VC .exe files are generated in bin_vc directory, not to interfere
10756           with binaries generated from other projects (cygwin, mingw, bcc ...)
10757
10758         * sdcc/src/yacc.dsp: added
10759
10760         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
10761         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
10762         and insert the version number definitions from .version
10763
10764         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
10765
10766         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
10767         added - genarate auto-host.h using auto-host_vc_in.h as template
10768
10769         * sdcc/sdcc_vc.h,
10770         removed from CVS, generated automatically
10771
10772 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
10773         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
10774
10775 2002-08-11  Borut Razem <borut.razem AT siol.net>
10776         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
10777
10778 2002-08-10  Borut Razem <borut.razem AT siol.net>
10779         * src/SDCCmain.c (main):
10780         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
10781         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
10782         The consequence was that some temporary files were not removed.
10783
10784         * src/SDCCglue.c:
10785         unification of code in functions tempfilename() and tempfile():
10786         function tempnam() is defined in Visual Studio 6.0 and .NET
10787
10788         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
10789
10790         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10791           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
10792         - removed compiler command line option /WX: Treats all warnings as errors
10793         - update a list of source files, included into the project
10794
10795         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10796           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
10797         changed project type to Generic Project so that can be correcly converted to VS.NET project
10798
10799         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
10800
10801         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
10802
10803         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
10804
10805         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
10806         added return 0 statements after assert() to make compiler happy
10807
10808         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
10809         added newline in the def file to keep MSC compiler satisfied
10810
10811         * sdcc/src/z80/gen.c:
10812         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
10813           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
10814         - solved MSC error in function aopDump()
10815
10816         * sdcc_vc.h: define PREFIX as "\\sdcc"
10817
10818 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
10819         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
10820
10821 2002-06-22  Scott Dattalo <scott AT dattalo.com>
10822         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
10823         - Rewrote the register banking algorithm.
10824         - Added pCode live-range analysis to registers (for now, only non-used and
10825         singly-used registers optimized away)
10826
10827         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
10828
10829         * 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.
10830
10831 2002-05-10  Scott Dattalo <scott AT dattalo.com>
10832         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
10833
10834 2002-04-22  Michael Hope  <michaelh AT vroom>
10835
10836         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
10837
10838         * configure.in (DD_COPT): Added include support required for gbdk.
10839
10840         * .version: Bumped version number just to increase it.
10841
10842         * src/SDCCmain.c: Added -nostdinc to the default options.
10843
10844 2002-04-15  Michael Hope  <michaelh AT vroom>
10845
10846         * device/lib/z80/printf.c (sprintf): Added.
10847
10848         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10849
10850         * src/z80/peeph.def: Added transpose redundent load rule.
10851
10852         * src/z80/main.c: Added force callee saves for jaune.
10853
10854         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10855
10856         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10857
10858 2002-03-28  Johan Knol  <johan AT balder>
10859
10860         * src/SDCCval.c: fixed bug #532436
10861
10862 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10863         * /src/port.h:
10864         Added "char *Processor" field to the port structure.
10865
10866         * /src/SDCCmain.c:
10867         Added -p option. Allows port dependent processor to be specified.
10868
10869         * all ports:
10870         Initialized the new field char *Processor field to NULL in all ports
10871
10872         * /src/pic/*:
10873         Compiler generated registers for interrupt context saving
10874         were not getting allocated.
10875
10876 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10877
10878         * /src/SDCCast.c:
10879         Fixed left shift. Will promote the left side of a left shift
10880         if a) left shifting more than size of operand or b) when assigned
10881         to something size > size of left side
10882
10883 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10884         * src/pic/*
10885         tons of changes. Register allocation has been
10886         rewritten. Added customization for the various PICs. Flow
10887         analysis is restructured. ...
10888
10889         * src/pic/device.h:
10890         Added
10891
10892         * src/pic/device.c:
10893         Added. device.c is a PIC port hack to accomodate variations
10894         in PIC devices.
10895
10896 2002-03-13  Michael Hope  <michaelh AT vroom>
10897
10898         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10899
10900 2002-03-04  johanknol  <johanknol AT manik>
10901
10902         * /src/SDCCval.c: fixed
10903
10904         const unsigned char arr[][2] = { { 0, 1 } };
10905         t18.c:1: error: Initializer element is not constant
10906
10907 2002-03-04  bela  <bela AT manik>
10908
10909         * /device/include/mcs51reg.h:
10910         ds89c420 register definition update
10911
10912 2002-03-03    <johan AT FRIJA>
10913
10914         * support/Util/SDCCerr.c: did something, but don't no why anymore
10915
10916         * support/regression/tests/bug-524691.c: made it a little less shy
10917
10918         * src/SDCCast.c (decorateType): fixed bug #524697
10919
10920         * src/SDCCast.c: made some lineno improvements
10921
10922         * src/SDCCval.c (getNelements): changed warning to error
10923
10924         * src/SDCCglue.c (printIvalArray): changed warning to error
10925
10926         * src/SDCCicode.c: fixed a warning for mingw
10927
10928         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10929
10930         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10931
10932 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10933
10934         * src/ds390/peeph.def:
10935         Added some more peephole rules
10936
10937         * src/ds390/gen.c: Various fixes & enhancements
10938
10939         * src/SDCClrange.c, src/SDCClrange.h:
10940         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10941
10942         * src/ds390/ralloc.c:
10943         various fixes & enhancements (ds390) specific
10944
10945         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10946         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10947         from rallocs.
10948
10949         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10950
10951 2002-03-02    <johan AT FRIJA>
10952
10953         * src/SDCCast.c (decorateType): fixed bug #524708
10954
10955         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10956
10957         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10958
10959 2002-03-01  Michael Hope  <michaelh AT vroom>
10960
10961         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10962
10963         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10964
10965 2002-03-01    <johan AT FRIJA>
10966
10967         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10968
10969         * src/SDCCast.c (decorateType): fixed bug #524209
10970
10971         * src/SDCCval.c (valNot): fixed bug #524195
10972
10973 2002-02-26    <johan AT balder>
10974
10975         * src/xa51/gen.c: fixed a warning
10976
10977         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10978
10979         * src/SDCCast.c (decorateType): fixed bug #522534
10980
10981 2002-02-23    <johan AT balder>
10982
10983         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10984
10985 2002-02-22    <johan AT balder>
10986
10987         * src/SDCCast.c: fixed bug #514865
10988
10989         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10990
10991 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10992
10993         * sdcc/src/SDCCloop.c:
10994         Previous fix was not good. basic blocks that have "break" or "return" are
10995         not really partof a loop , but live ranges used in these blocks should
10996         be live thru the entire loop, so set partOfLoop but don't add them to
10997         loop region
10998
10999 2002-02-21    <johan AT FRIJA>
11000
11001         * src/SDCCcse.c: fixed bug #514308
11002
11003 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
11004
11005         * src/SDCCloop.c:
11006         Fixed BUG #519583. If a conditional block ended in a return/break
11007         statement inside a loop, it was not being considered part of the loop.
11008
11009         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
11010
11011 2002-02-10  Karl Bongers <karl AT turbobit.com>
11012
11013         * debugger/*:
11014         Fixed up SDCDB debugger somewhat.  Updated debugger/README
11015         with lots of comments and notes.
11016
11017         * device/examples/test2.c:
11018         Fix bug, "red" variable not being initialized(compiler complained).
11019
11020         * device/examples/Makefile, examples/test3.c:
11021         Add Makefile in device/examples folder, compiles test3.c
11022         for use as a multiple module SDCDB test case.
11023
11024         * sim/ucsim/cmd.src/cmdset.cc:
11025         Took out debug printfs in ucsim "next" command.
11026
11027         * sim/ucsim/xa.src:
11028         Karl and Johan start ucsim XA support.  Most dissassembly working,
11029         about 75% emulation done(plenty of work remaining).
11030
11031         * sim/ucsim/z80.src:
11032         Add Z80 support to ucsim, add test-ucz80 regression test,
11033         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
11034         Notice z80 compiler fails on examples/test3.c/crc code.
11035
11036 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
11037
11038         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
11039         Added support for --parms-in-bank1
11040
11041         * src/ds390/peeph.def:
11042         added a few more peephole optimzations
11043
11044         * src/ds390/main.c:
11045         1) added __builtin_inp & __builtin_outp used to read in data of given length
11046            from a memory mapped port
11047         2) added __builtin_memcmp
11048         3) added __builtin_swapw swap bytes of a short
11049
11050         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
11051         1) handle multiple send & receives from register bank1
11052         2) ralloc can now allocate DPTR1 to some liveRanges
11053
11054         * src/SDCCsymt.c, src/SDCCsymt.h:
11055         changes to handle multiple sends & receives
11056
11057         * src/SDCCptropt.h:
11058         added some pointer arithmetic optimization
11059
11060         * src/SDCCptropt.c:
11061         added some pointer arithmetic optimizations but not stable yet so not
11062         called from anywhere (will get this working shortly)
11063
11064         * src/SDCCopt.c: fixed for multiple sends & receives
11065
11066         * src/SDCCmain.c:
11067         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
11068         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
11069            set preprocessor defines (depending on options)
11070
11071         * src/SDCCicode.c, src/SDCCicode.h:
11072         changes made to handle multiple sends & receives
11073
11074         * src/SDCCglobl.h:
11075         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
11076
11077         * src/SDCCcse.c, src/SDCCcse.h:
11078         added function findbackward def (to be used in upcoming optimization)
11079
11080         * src/SDCCcflow.c, src/SDCCcflow.h:
11081         added function returnAtEnd - to determine if a basic block terminates with
11082         a RETURN iCode
11083
11084         * src/SDCCast.c, src/SDCCast.h:
11085         added option parms-in-bank1
11086
11087         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
11088         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
11089         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
11090         adjusted for --parms-in-bank1 option
11091
11092         * device/include/string.h:
11093         donot redefine "reentrant" keyword
11094
11095         * device/include/ds80c390.h: Added some more SFRs
11096
11097 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
11098
11099         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
11100
11101 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
11102
11103         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
11104
11105 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
11106
11107         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
11108
11109 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
11110
11111         * Added --xram-movc option
11112
11113 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
11114
11115         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
11116
11117 2002-01-11  Johan Knol
11118
11119         * Added math lib of Jesus Calvino-Fraga
11120
11121 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
11122
11123         * src/SDCCmain.c (processFile): fix processing of ../../src.c
11124         * support/regression/Makefile: new target test-mcs51-stack-auto
11125         * support/regression/ports/mcs51-stack-auto/spec.mk: added
11126
11127 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11128
11129         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
11130
11131 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11132
11133         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
11134
11135 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
11136
11137         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
11138
11139         * src/SDCCglue.h: add definition for printIvalChar()
11140
11141 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11142
11143         * src/SDCCast.c: fix #498138 by Johan
11144
11145         * src/SDCCglue.c: fix #498138 by Johan
11146
11147 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11148
11149         * support/regression/Makefile: fix clean
11150
11151         * support/regression/ports/ds390/support.c: fix transmission of last character
11152
11153 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
11154
11155         * /sdcc/src/ds390/gen.c:
11156         a) improved computing address of stack variable
11157         b) took out some #if 0 code
11158         c) improved parmBytes adjustment
11159         d) improved genPlusIncr & genMinusIncr
11160         e) genCmp could generate bad code (when left assigned to DPTR)
11161         f) Fixed bug in hasInc
11162
11163         * /sdcc/src/ds390/ralloc.c:
11164         a) packRegsForSupport could mess up live information (Fixed)
11165         b) packRegsDPTRuse could be incorrect for left & right shift
11166
11167         * /sdcc/src/mcs51/ralloc.c:
11168         packRegsForSupport could mess up the live information (Fixed)
11169
11170         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
11171
11172         * /sdcc/src/SDCCast.c:
11173         can reverse a loop even if function call is present as long
11174         as the loop control variable is local & is not passed as parameter
11175
11176 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11177
11178         * /sdcc/ChangeLog: *** empty log message ***
11179
11180         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
11181         More builtin function additions for TININative
11182
11183         * /sdcc/src/ds390/ralloc.c:
11184         Had broken the regression testsuite
11185
11186         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
11187
11188         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
11189         Added funcattr hasStackParms will be set for reentrant functions when there
11190         are paramteres on the stack, this helps in minimizing frame pointer generation
11191         typeFromStr can handle function pointers now
11192
11193         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
11194         *** empty log message ***
11195
11196 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11197
11198         * /src/ds390/gen.c, /src/ds390/main.c:
11199         More builtin function additions for TININative
11200
11201         * /src/ds390/ralloc.c:
11202         Had broken the regression testsuite
11203
11204         * /src/SDCCast.c: Fixed a bug in dumptree
11205
11206         * /src/SDCCsymt.c, /src/SDCCsymt.h:
11207         Added funcattr hasStackParms will be set for reentrant functions when there
11208         are paramteres on the stack, this helps in minimizing frame pointer generation
11209         typeFromStr can handle function pointers now
11210
11211         * /doc/builtins.txt, /doc/TININative.txt:
11212         *** empty log message ***
11213
11214
11215 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11216
11217         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
11218         ALPHA version for -mTININative
11219
11220         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
11221         updated to reflect changes in the port structure
11222
11223         * /src/port.h:
11224         added function do_assemble (similar to do_link) if non-null this function
11225         will be called to do assembly (-mTININative) requires a multi command
11226         assembly
11227         added function genAssemblerEnd will be called to generate assembler Epilogue
11228
11229         * /src/SDCCsymt.c:
11230         added _JavaNative to debug info printing
11231
11232         * /src/SDCCmain.c: added option --tini-libid
11233         added port->do_assemble function (-mTININative) has a multi command assemble
11234
11235         * /src/SDCCglue.c: Disabled "constExpr" check
11236         added port->genAssemblerEnd function
11237
11238         * /src/SDCCglobl.h: Added option --tini-libid value
11239
11240         * /src/SDCCast.h:
11241         tookout optimizeCompare from the header (has no external references)
11242
11243         * /src/SDCCast.c: made one more function "static"
11244
11245 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
11246
11247         * src/z80/mappings.i: Added z80asm support.
11248
11249         * src/z80/main.c: Added z80asm support on --asm=z80asm
11250
11251         * src/z80/gen.c: Fixed asm portability issues.
11252
11253         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
11254
11255         * src/SDCCglue.c (printExterns): Added global/extern split.
11256
11257 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
11258
11259         * support/regression/Makefile: added test for mcs51 model large
11260
11261         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
11262
11263         * support/regression/ports/gbz80/spec.mk: added -mgbz80
11264
11265 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
11266
11267         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
11268
11269 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
11270
11271         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
11272
11273         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
11274
11275 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
11276
11277         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
11278
11279         * support/regression/tests/simplefloat.c: Port to mcs51.
11280
11281 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
11282         * support/regression/tests/bug-485362.c: Added.
11283
11284         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
11285
11286         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
11287
11288         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
11289
11290         * src/z80/gen.c (aopDump): Added a dump function.
11291
11292 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
11293         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
11294
11295         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
11296
11297         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
11298
11299         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
11300
11301         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
11302
11303         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
11304
11305         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
11306
11307         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
11308
11309         * support/regression/ports/ds390/support.c: Use tinibios.
11310
11311         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11312
11313 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11314
11315         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11316         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11317
11318         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11319
11320         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11321
11322 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11323
11324         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11325
11326         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11327         (packRegsForIYUse): Created and optimised.
11328
11329 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11330
11331         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11332 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11333
11334         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11335
11336         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11337
11338         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11339
11340 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11341
11342         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11343
11344         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11345
11346 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11347
11348         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
11349
11350         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
11351
11352         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
11353
11354 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11355
11356         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
11357         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
11358         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
11359
11360         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
11361
11362         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
11363         (genNotFloat): Added.
11364         (genUminusFloat): Added.
11365
11366         * device/lib/z80/Makefile: Added floating pt stubs.
11367
11368         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
11369
11370         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
11371
11372         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
11373
11374 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11375
11376         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
11377
11378         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
11379
11380         * sdcc/support/regression/Makefile: Add port ds390.
11381
11382         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
11383
11384         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
11385
11386         * sdcc/support/regression/ports/ds390/spec.mk: Added.
11387
11388         * sdcc/support/regression/ports/ds390/support.c: Added.
11389
11390         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
11391
11392         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
11393
11394         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
11395
11396 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11397
11398         * device/include/malloc.h: Added z80 and gbz80 support.
11399
11400         * device/lib/gbz80/heap.s: Added.
11401
11402         * device/lib/z80/heap.s: Added.
11403
11404         * device/lib/malloc.c: Added z80 and gbz80 support.
11405
11406         * support/regression/tests/malloc.c (testMalloc): Added.
11407
11408         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
11409
11410         * support/regression/tests/bug-478094.c: Added.
11411
11412         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
11413
11414 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
11415
11416         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
11417
11418         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
11419
11420         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
11421
11422         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
11423
11424         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
11425
11426 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11427
11428         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
11429
11430 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
11431
11432         * support/regression/tests/bug-477927.c: Added.
11433
11434         * src/z80/peeph.def: Added minor rules.
11435
11436         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
11437
11438         * src/z80/peeph.def: Added jump optimisation modification.
11439
11440 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
11441
11442         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
11443
11444 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
11445
11446         * support/regression/tests/funptrs.c: Added.
11447
11448 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
11449
11450         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
11451
11452 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
11453
11454         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
11455
11456         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
11457
11458         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
11459         (movLeft2ResultLong): Created.
11460
11461         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
11462         (joinPushes): Added.  Joins two char pushes into a word push.
11463
11464 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
11465
11466         * support/cpp2/Makefile.in (install): Added creation of dest dir.
11467
11468         * support/makebin/Makefile (install): Added creation of dest dir.
11469
11470 2001-10-24 Karl Bongers <karl AT turbobit.com>
11471
11472         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
11473
11474 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
11475
11476         * src/z80/ralloc.c: Turned off faulty pack for one use.
11477
11478         * src/z80/peeph-gbz80.def: Removed redundent restart options.
11479
11480         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
11481
11482 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
11483
11484         * support/regression/Makefile: Improved clean
11485
11486         * support/regression/ports/gbz80/spec.mk: Added clean
11487
11488         * support/regression/ports/host/spec.mk: Added clean
11489
11490         * support/regression/ports/z80/spec.mk: Added clean
11491
11492         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
11493
11494         * support/regression/ports/mcs51/timeout.c: little improvements
11495
11496 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
11497
11498         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
11499
11500         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
11501
11502         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
11503
11504 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
11505
11506         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
11507
11508         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
11509
11510 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
11511         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
11512
11513         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
11514
11515         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
11516
11517         * src/mcs51/main.c (_linkCmd): Added bin path to command.
11518
11519         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
11520
11521         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
11522
11523         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
11524
11525         * support/regression/tests/longor.c: Added.
11526
11527 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
11528
11529         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
11530
11531         * as/mcs51/aslink.h: define PATH_MAX
11532
11533         * as/mcs51/asm.h: define PATH_MAX
11534
11535         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
11536
11537         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
11538
11539         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
11540
11541         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
11542
11543         * src/SDCCglobl.h: define PATH_MAX
11544
11545         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
11546
11547         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
11548
11549 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
11550
11551         * src/z80/gen.c (gencjneshort): Fixed
11552
11553         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
11554
11555 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
11556
11557         * support/regression/tests/bug-469671.c: Added.
11558
11559         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
11560
11561 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
11562
11563         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
11564
11565         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
11566
11567 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
11568
11569         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
11570
11571         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
11572
11573         * src/device/lib/_mullong.c : removed hint: nooverlay bug
11574
11575         * src/device/lib/_divuint.c : removed hint: nooverlay bug
11576
11577         * src/device/lib/_divulong.c: removed hint: nooverlay bug
11578
11579         * src/device/lib/_moduint.c : removed hint: nooverlay bug
11580
11581         * src/device/lib/_modulong.c: removed hint: nooverlay bug
11582
11583 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
11584
11585         * 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.
11586
11587         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
11588
11589         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
11590
11591 2001-10-07    <johan AT FRIJA>
11592
11593         * device/lib/gets.c (gets): fixed the return value.
11594
11595 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
11596         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
11597
11598         * 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.
11599
11600         * 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.
11601
11602         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
11603
11604         * src/pic/gen.c: Removed Safe_strdup.
11605
11606         * configure.in: Added option to enable libgc support.
11607
11608         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
11609         (bitVectUnion): Optimised.
11610         (bitVectIntersect): Optimised.
11611         (bitVectBitsInCommon): Optimised.
11612         (bitVectCplAnd): Optimised.
11613
11614         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
11615
11616 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11617
11618         * src/SDCCmain.c: distinguish between assembler debug and plain options
11619
11620         * src/avr/main.c:   remove standard assembler options
11621
11622         * src/ds390/main.c: remove standard assembler options
11623
11624         * src/mcs51/main.c: remove standard assembler options
11625
11626         * src/port.h: removed "PENDING" comment
11627
11628 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11629
11630         * src/device/lib/_mulint.c  : new, with assember functions
11631
11632         * src/device/lib/_mullong.c : new, with assember functions
11633
11634         * src/device/lib/_divuint.c : with assember functions
11635
11636         * src/device/lib/_divsint.c : with assember functions
11637
11638         * src/device/lib/_divulong.c: with assember functions
11639
11640         * src/device/lib/_divslong.c: with assember functions
11641
11642         * src/device/lib/_moduint.c : with assember functions
11643
11644         * src/device/lib/_modsint.c : with assember functions
11645
11646         * src/device/lib/_modulong.c: with assember functions
11647
11648         * src/device/lib/_modslong.c: with assember functions
11649
11650         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
11651
11652         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
11653
11654         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
11655                                       replaced _mululong.c and _mulslong.c by _mullong.c
11656
11657 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11658
11659         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
11660
11661 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11662
11663         * src/SDCCglue.c: test, if win32api is available for MINGW
11664
11665 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11666
11667         * src/SDCCsymt.c: no more _modifier in printTypeChain()
11668         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
11669         * support/regression/ports/gbz80/spec.mk: removed GENERIC
11670         * support/regression/ports/host/spec.mk: removed GENERIC
11671         * support/regression/ports/mcs51/spec.mk: removed GENERIC
11672         * support/regression/ports/z80/spec.mk: removed GENERIC
11673
11674 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
11675
11676         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
11677
11678         * support/regression/tests/bug-467035.c: Created.
11679
11680 2001-10-01    <johan AT FRIJA>
11681
11682         * src/SDCC.y: fixed bug #466586 part 1
11683
11684 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
11685
11686         * SDCCicode.c: z80 has no generic pointers
11687         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
11688
11689 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
11690
11691         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
11692
11693 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
11694
11695         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
11696
11697         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
11698
11699 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
11700
11701         * configure.in: Fixed up so that ucsim is only configured once.
11702
11703         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
11704
11705         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
11706         (getPathDifference): As above.
11707
11708         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
11709
11710         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
11711
11712 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
11713         * .version: Updated to 2.3.1
11714
11715         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
11716         Added copyright header.
11717
11718         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
11719         (assemble): Added support for macro based assembler commands.
11720         (linkEdit): Added support for macro based linker commands.
11721         (preProcess): Changed the pre-processor to use macros.
11722         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
11723         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
11724
11725         * device/lib/z80/crt0.s: Added module name for debugging.
11726
11727 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
11728
11729         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11730
11731         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
11732
11733         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
11734
11735         * src/Makefile.in: Added SDCCmacro and SDCCutil
11736
11737 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
11738
11739         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11740
11741 2001-09-16    <johan AT FRIJA>
11742
11743         * 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.
11744
11745 2001-09-15    <johan AT FRIJA>
11746
11747         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
11748         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
11749
11750 2001-09-11    <johan AT FRIJA>
11751
11752         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
11753
11754 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
11755
11756         * support/regression/tests/bug-460444.c: Added test case.
11757
11758         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
11759         (genCast): Added justification for all of the asserts.
11760
11761 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
11762
11763         * support/regression/support.c: _xdata replaced by xdata
11764
11765         * support/regression/spec.mk: removed _generic
11766
11767 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
11768
11769         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
11770
11771         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
11772         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
11773
11774         * src/z80/peeph.def: Added a rule to optimise shift then compare.
11775
11776         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
11777
11778         * support/regression/tests/bug-460010.c: Added test case.
11779
11780         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
11781
11782 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
11783
11784         * support/regression/Makefile: inter-port-clean adjusted for mcs51
11785
11786         * support/regression/testfwk.c: removed workaround for bug #436344
11787
11788         * support/regression/tests/bp.c: use less memory with mcs51
11789
11790         * support/regression/tests/bug-441448.c: use less memory
11791
11792         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
11793
11794         * support/regression/collate-results.py: typo
11795
11796 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
11797
11798         * support/regression/tests/fetchoverlap.c: Added new test case.
11799
11800         * support/regression/tests/bp.c: Added new test case.
11801
11802         * support/regression/tests/bug-448984.c: Added new test case.
11803
11804         * support/regression/tests/pow2shifts.c: Added new test case.
11805
11806         * src/z80/gen.c: Turned off the noise it normally generates for the release.
11807         (genlshTwo): Fixed right shift for count > 8.
11808
11809         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
11810
11811 2001-09-08    <johan AT FRIJA>
11812
11813         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
11814
11815 2001-09-07    <johan AT FRIJA>
11816
11817         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
11818
11819         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
11820
11821 2001-09-06    <johan AT FRIJA>
11822
11823         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
11824         * bernhard noted me at this: "() equals to (void)" (1.38)
11825
11826 2001-09-05    <johan AT FRIJA>
11827
11828         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
11829
11830 2001-09-04    <johan AT FRIJA>
11831
11832         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
11833
11834
11835 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
11836
11837         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
11838
11839 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
11840
11841         * link/z80/aslink.h: Fixed path for PATH_MAX
11842
11843 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11844
11845         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11846
11847         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11848
11849         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11850
11851         * 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.
11852
11853 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11854
11855         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11856         (genCmp): Fixed up genCmp for the GB with longs.
11857
11858         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11859
11860         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11861
11862         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11863
11864         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11865
11866 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11867
11868         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11869
11870 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11871
11872         * 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.
11873
11874         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11875
11876 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11877
11878         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11879
11880         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11881
11882 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11883
11884   * sim/ucsim/configure:    little improvement of Cygwin-detection
11885   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11886   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11887   * support/regression/tests/bug-221100.c: small changes for mcs51
11888   * support/regression/tests/bug-221168.c: small changes for mcs51
11889   * support/regression/tests/bug-227710.c: small changes for mcs51
11890   * support/regression/tests/staticinit.c: small changes for mcs51
11891   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11892   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11893   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11894
11895 $Revision$