708f9a3d3bb98b08b28ce7418677667927ab4db2
[fw/sdcc] / ChangeLog
1 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
2
3         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
4         * src/mcs51/gen.c (gen51Code): show final register usage after
5         fillGaps in asm with --i-code-in-asm
6         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
7         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
8         incUsed, rliveClear, adjustIChain): made static,
9         (setFromRange): excluded because it's unused,
10         (findPrevUseSym, markWholeLoop): added,
11         (findPrevUse): rewritten; fixes bug 895992; now a complete search
12         through all branches of predecessors enables sdcc to emit the warning
13         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
14         (rlivePoint): made static, added parameter emitWarnings which is only
15         true during the first run out of two,
16         (findRecursiveSucc, findRecursivePred): removed,
17         (computeLiveRanges): made static, added parameter emitWarnings,
18         (dumpIcRlive): added for debugging only
19         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
20         removed prototype of setFromRange()
21         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
22         in call of computeLiveRanges()
23         * support/regression/tests/bug-895992.c: added
24         * support/regression/tests/bug-971834.c: added
25         * support/valdiag/tests/bug-895992.c: added
26         * support/valdiag/tests/bug-971834.c: added
27
28 2005-12-18 Raphael Neider <rneider AT web.de>
29
30         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
31           (genUnpackBits): improved code for direct operands,
32           (genPackBits): improved code for literal assignment to bitfields
33             and for direct destination operands (no FSR indirection),
34             prevented redundant AND, fixes #1362800,
35           (AccLsh): added parameter to disable masking of the result
36         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
37           skip instructions with side-effects (like incfsz),
38           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
39         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
40         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
41           fixes #1375263
42
43 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
44
45         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
46         volatile variables as spill location
47
48 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
49
50         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
51         replacing literals
52         * support/regression/tests/bug-1376320.c: added
53
54 2005-12-08 Raphael Neider <rneider AT web.de>
55
56         * src/pic/device.c: renamed is_shared to pic14_is_shared
57         * src/pic/gen.c (genIfx): re-enabled handling of sbits
58         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
59           (is_valid_identifier): added for above workaround
60
61 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
62
63         * device/lib/Makefile.in: fixed to enable port-specific-objects
64         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
65           char, thanks Hubert Sack
66         * doc/sdccman.lyx: documented --xstack-loc,
67           elaborated a bit more on interrupts and pitfalls,
68           removed "setjmp/longjmp unsupported",
69           documented some unsupported C99 features
70         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
71         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
72           if, thanks Hubert Sack
73         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
74         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
75           make make_library
76         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
77           regression tests can report resource usage (rfe 700441)
78         * support/regression/collate-results.py: report resource usage
79         * support/regression/ports/ds390/spec.mk,
80         * support/regression/ports/hc08/spec.mk,
81         * support/regression/ports/mcs51/spec.mk,
82         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
83         * support/regression/ports/ds390/uCsim.cmd,
84         * support/regression/ports/hc08/uCsim.cmd,
85         * support/regression/ports/mcs51/uCsim.cmd,
86         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
87         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
88           library, use the default one
89         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
90           building the library
91
92 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
93
94         * config.dsp: added dependency on .version and configure_vc.awk
95         * device/include/setjmp.h: updated for --stack-auto and --xstack
96         * device/include/mcs51/at89c51snd1c.h: corrected line endings
97         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
98         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
99         * device/lib/libsdcc.lib: added _setjmp
100         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
101           (decorateType): fixed bug 1372851,
102           (optimizeGetHbit): fixed warning
103         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
104           array initialisation
105         * support/regression/tests/bug1057979.c: added test for bug 1358192
106         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
107
108 2005-12-03 Borut Razem <borut.razem AT siol.net>
109
110         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
111           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
112
113 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
114
115         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
116         createIval): implement symbol independant "flexible array member",
117         (createIvalCharPtr): implemented flexible array initialisation with a
118         string
119         * src/SDCCsymt.c (copyStruct): removed,
120         (getSize): fixed misleading comment,
121         (getAllocSize): removed, the additional allocation size is now in
122         sym->flexArrayLength,
123         (checkStructFlexArray): new, syntax checks for flexible array members,
124         (compStructSize): added syntax checks for "flexible array members"
125         (copyStruct): removed,
126         (copyLinkChain): removed inefficient fix for bug 770487
127         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
128         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
129         symbol->flexArrayLength
130         * src/SDCCerr.c,
131         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
132         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
133         * support/regression/tests/structflexarray.c: added
134         * support/valdiag/tests/structflexiblearray.c: added
135
136 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
137
138         * src/SDCCast.c (decorateType): fixed bug 1368489
139         * support/Util/SDCCerr.c,
140         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
141
142 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
143
144         * device/include/mcs51/at89c51snd1c.h: added file submitted by
145           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
146
147 2005-11-27 Borut Razem <borut.razem AT siol.net>
148
149         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
150           support/cpp2/mkdeps.h: added command line option
151           -obj-ext=<extension> to SDCPP to define object file externion, used
152           for generation of make dependencies (-M)
153         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
154
155 2005-11-26 Borut Razem <borut.razem AT siol.net>
156
157         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
158           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
159           added pic and pic16 libraries
160
161 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
162
163         * device/include/float.h: Corrected typo in prototype of __fsgt
164
165 2005-11-25 Borut Razem <borut.razem AT siol.net>
166
167         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
168           added creation of model-mcs51-stack-auto libraries
169
170 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
171
172         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
173         and fields-list too
174         * src/SDCCast.c (createIvalArray): removed obsolete comment
175
176 2005-11-24 Borut Razem <borut.razem AT siol.net>
177
178         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
179           added missing device/lib/mcs51/crt*.asm sources
180
181 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
182
183         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
184
185 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
186
187         * device/lib/_fs2schar.c,
188         * device/lib/_fs2sint.c,
189         * device/lib/_fs2slong.c: optimized inline asm
190
191 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
192
193         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
194           Better handling of floats between -1.0 and 0.0.
195
196 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
197
198         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
199           (the missing "if"s prohibited removal of redundant labels)
200
201 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
202
203         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
204           Properly convert floats between -1.0 and 0.0 to long, int, and char
205           types (max integer value of negative floats tends to zero).
206         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
207           Removed changes made so to work properly with floats between
208           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
209           and _fs2char.c
210
211 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
212
213         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
214         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
215         (genCast) cosmetic change
216         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
217         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
218         from mcs51
219         * support/regression/tests/bitfields (testSignedBitfields): added
220
221 2005-11-18 Borut Razem <borut.razem AT siol.net>
222
223         * sdcc/device/lib/Makefile.in: remove all unnecessary files
224         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
225           introduced SILENT option to make building of pic16 libraries less
226
227 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
228
229         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
230           Now they work properly with floats between -1.0 and 0.0
231         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
232
233 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
234
235         * src/SDCCicode.c (printOperand): added missing else
236
237 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
238
239         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
240         reformatted for better readability
241         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
242         signed bitfields
243
244 2005-11-17 Borut Razem <borut.razem AT siol.net>
245
246         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
247           introduced SILENT option to make building of pic16 libraries less
248           verbose - used for nightly snapshot build
249         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
250           available on Win32 platforms.
251         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
252           medium, large, pic and pic16
253
254 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
255
256         * device/lib/printf_large.c: Temporary patch for bug 1358192:
257           printf("%f"...) sets fraction to zero.
258
259 2005-11-16 Raphael Neider <rneider AT web.de>
260
261         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
262           fixes #1357221
263         * src/pic/gen.c (genIfx): implemented for CARRY bit
264         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
265           to generic pointers, fixes #1357332,
266           (pic16_movLit2f): NEW,
267           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
268
269 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
270
271         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
272
273 2005-11-11 Raphael Neider <rneider AT web.de>
274
275         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
276         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
277           compute pointer's type from operand,
278           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
279           improved single bit reads, fixes bug #1353379
280
281 2005-11-09 Borut Razem <borut.razem AT siol.net>
282
283         * support/scripts/sdcc.nsi: added lib/pic to the package
284
285 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
286
287         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
288
289 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
290
291         * support/regression/tests/bug1348008.c: added
292         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
293         * support/regression/tests/bug1337835.c: updated comment
294
295 2005-11-06 Borut Razem <borut.razem AT siol.net>
296
297         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
298           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
299           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
300           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
301           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
302           dynamic construction of cl_error_class and derivates - 2.nd try
303
304 2005-11-05 Borut Razem <borut.razem AT siol.net>
305
306         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
307           bug, which caused Bus Errors on sparc solaris
308
309 2005-11-04 Borut Razem <borut.razem AT siol.net>
310
311         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
312           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
313           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
314           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
315           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
316           and derivates to resolve the initialization problem on OSX
317
318 2005-11-02 Borut Razem <borut.razem AT siol.net>
319
320         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
321           corrected typo - #include <winsock2.h>
322
323 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
324
325         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
326           (_asxxxx_mapping): added org directive for future enhancements
327
328 2005-11-01 Borut Razem <borut.razem AT siol.net>
329
330         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
331           enabled sockets on WIN32
332         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
333
334 2005-10-31 Borut Razem <borut.razem AT siol.net>
335
336         * support/regression/generate-cases.py: escape backslashes in {testcase}:
337           WIN32 backslash path delimiters should be escaped when used in C strings
338         * support/regression/tests/bitfields.c: exclude failing assertions for
339           __CYGWIN32__ and __MINGW32__ hosts
340
341 2005-10-30 Borut Razem <borut.razem AT siol.net>
342
343         * src/SDCCutil.c: corrected double comparison typo
344
345 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
346
347         * device/lib/medium/Makefile: added for new memory model medium
348         * device/include/asm/mcs51/features.h: updated for medium/pdata
349         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
350           added Multiply & Accumulate sbit's and MAC0_PAGE define
351         * device/include/mcs51/c8051f300.h: added sfr16 definitions
352         * device/include/mcs51/c8051f310.h: added sfr16 definitions
353         * device/lib/_mullong.c: update for medium model
354         * device/lib/incl.mk: added medium model
355         * doc/sdccman.lyx: documented medium model
356         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
357         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
358         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
359         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
360           (allocParms): set SCLS and OCLS to pdata for medium model
361         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
362           for pdata,
363           (powof2): return <0 if not power of 2
364         * src/avr/gen.c (genBitWise): use updated powof2
365         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
366           (shiftR2Left2Result): small optimization in setup, save acc when storing,
367           (shiftLLeftOrResult): use B if necessary
368         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
369         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
370         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
371         * support/regression/Makefile.in: added test-mcs51-medium
372         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
373
374 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
375
376         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
377         specifier unsigned
378         * device/lib/time.c (mktime): fixed bug 1334315
379
380 2005-10-28 Raphael Neider <rneider AT web.de>
381
382         * device/include/pic/p16f_common.inc: added common declarations
383         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
384
385 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
386
387         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
388           (aopPutUsesAcc): added to predict accumulator use,
389           (assignResultValue): save acc if necessary,
390           (genMinusDec): store result if indirectly addressed,
391           (genDivOneByte):  save acc if necessary,
392           (movLeft2Result): bugfix if left already in acc,
393           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
394             attention to accumulator use (esp. pdata),
395           (genReceive): receive pdata correctly
396         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
397         * src/SDCCicode.h: added isOperandInPagedSpace prototype
398
399 2005-10-27 Raphael Neider <rneider AT web.de>
400
401         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
402
403 2005-10-27 Raphael Neider <rneider AT web.de>
404
405         * .version: changed version to 2.5.4
406         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
407         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
408           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
409             arithmetics support routines
410         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
411         * device/lib/Makefile.in: also create installdir for pic
412
413         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
414           pic14 port as well
415         * src/pic/device.c (dump_sfr): rewritten to delegate register
416           placement to the linker (use `extern sym' rather than sym EQU addr),
417           (validAddress): fixed to check last specified address
418         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
419           (popGetLit): truncate literal value to 8 bit,
420           (popGet): moved assert to more appropriate place
421           (popGetExternal): create pCode operand from and mark the according
422             symbol as being `extern'
423           (popGetAddr): added sanity check on immediate's offset, provide
424             GPOINTER tag on demand
425           (aopPut): fixed for immediates,
426           (mov2w_op): move operand's address or contents to WREG (depending on
427             operand type), safer variant of mov2w,
428           (movwf,call_libraryfunc): NEW, handy abbreviations,
429           (get_argument_pcop,get_return_val_pcop,pass_argument,
430           get_returnvalue): interface for accessing function parameters and
431             return values,
432           (assignResultValuei,genRet): use new parameter/return value interface
433           (pic14_getDataSize): back to old version handling generic pointers,
434           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
435             provided implementation and/or fixed old one,
436           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
437             calls, removed legacy 8051 reference code
438           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
439           (loadSignToC): NEW, move the operands sign bit to CARRY,
440           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
441             genRightShiftSigned, accepts negative shift counts,
442           (setup_fsr): load FSR and adjust IRP (indirect memory access),
443           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
444             generic pointers, __data pointers and __code pointers,
445           (genUnpackBits,genPackBits): rewritten to work with generic pointers
446             and signed bitfields, limit bitfields to 8 bit,
447           (genDataPointerGet): fixed number of bytes read,
448           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
449           (genPointerGet,genPointerSet): fixed handling of __code pointers,
450             pointers to constant data are no longer assumed to point to __code
451             space, removed invalid pointer types,
452           (bitpatternFromVal): retrieve the PICs representation of an integer
453             or float literal,
454           (genDataPointerSet): fixed assigning to po_immediate operands,
455           (genGenPointerSet): implemented as library call,
456           (genIfx): fixed incorrect condition,
457           (genAddrOf): limit generic pointers' addresses to 2 bytes,
458             provide GPOINTER tag according to destination's storage class,
459           (genCast): added code to handle casting to generic pointers, added
460             sign-/zero extension of the result
461           (aop_isLitLike,op_isLitLike): fixed handling of immediates
462         * src/pic/gen.h: added macros to access IRP bit in STATUS register
463         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
464           extend the result
465         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
466           address/register resides in the shared banks
467           (emitSymbolToFile): improved to handle global and `pinned' symbols,
468             put all variables into separate sections (have the linker arrange
469             them)
470           (picglue): put init code and interrupt handlers in separate sections
471         * src/pic/main.c: added port specific options table, modified to PORT
472           structure to make GPOINTERs 3 byte, added pic14_options
473           (_pic14_do_link): private linking routine (update paths to libraries,
474             add libsdcc.lib by default)
475         * src/pic/main.h: declare pic14_options
476         * src/pic/pcode.c: fixed instructions i/o relations,
477           (RegCond): reverted to correct version,
478           (newpCodeOpLit): truncate literals to 8 bit,
479           (genericPrint): added debug output,
480           (getRegFromInstruction): fixed for various operand types, simplified
481           (BuildFlow): fixed broken handling of isntructions with labels
482           (LinkFlow): start at last instruction in flow (skip trailing comments),
483             pass the flow on to the next instruction after CALL
484           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
485           (insertPCodeInstruction): fixed inserting after a skip instruction,
486           (DoBankSelect): fixed for labeled instructions
487           (OptimizepBlock): honor --nopeep switch
488           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
489         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
490         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
491           (pCodeOptime2pCodes): allow disabling this optimization via
492             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
493             but is still buggy), started implementation of a dataflow based
494             pCode optimization (CSE + dead code elimination)
495           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
496         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
497           names are independant of the stack location and therefore portable across
498           devices
499
500 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
501
502         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
503           (selectSpil): fixed bug 1337835 by not spilling bit variables
504         * support/regression/tests/bug1337835.c: added test for this bug
505         * src/mcs51/peeph.def: restart after rule 3.c,
506           addded rules 263.x to optimize loading constants
507
508 2005-10-26 Raphael Neider <rneider AT web.de>
509
510         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
511         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
512           (genAssign): emit warning when casting literals to generic pointer
513             type, also applies when taking the address of a fixed variable,
514           (genCast): improved casting to generic pointers
515         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
516           extern variables, added verbose error message
517         * device/include/pic16/{string.h,errno.h}: added #pragma library c
518
519 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
520
521         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
522         carry must be complemented too
523         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
524         could be emitted by genMinus
525         * src/SDCCval.c (constVal): fixed bug 1305065
526
527 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
528
529         * src/SDCCast.c (addCast): added promotion for bit variables
530         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
531         promotion casts + optimisation
532         (optimizeGetWord): fix warning 'i' might be used uninitialized
533         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
534         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
535
536 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
537
538         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
539         all chars are promoted to int; promotion should be handled in SDCCast.c
540
541 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
542
543         * device/lib/_strcmp.c: Fixed bug 1326457
544
545 2005-10-11 Raphael Neider <rneider AT web.de>
546
547         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
548         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
549
550 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
551
552         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
553         * support/regression/tests/sfr16.c: added test for the sfr32 bug
554
555 2005-10-04 Raphael Neider <rneider AT web.de>
556
557         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
558           device/lib/pic16/pics.all: added pic18f1320
559         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
560
561 2005-09-30 Raphael Neider <rneider AT web.de>
562
563         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
564         * src/pic16/devices.inc: NEW, provides device descriptions
565         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
566
567 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
568
569         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
570           GETHBIT
571
572 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
573
574         * doc/sdccman.lyx: updated Highest Order Bit documentation,
575           documented Any Order Bit, Higher Order Byte and Higher Order Word
576         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
577         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
578           (optimizeGetAbit): new, to get any bit, not only the high bit,
579           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
580           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
581           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
582           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
583             RIGHT_OP: also try GETBYTE, GETWORD optimization,
584             GETABIT, GETBYTE, GETWORD: decorate them,
585           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
586           (ast_print): added GETABIT, GETBYTE, GETWORD
587         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
588         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
589           (geniCodeBinary): new generic binary icode,
590           (ast2iCode): added GETABIT, GETBYTE, GETWORD
591         * src/port.h: updated comment for PORT.hasExtBitOp
592         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
593           (genGetByte): new, to get a single byte,
594           (genGetWord): new, to get a word from a long,
595           (gen51Code): added GETABIT, GETBYTE, GETWORD
596         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
597
598 2005-09-23 Raphael Neider <rneider AT web.de>
599
600         * configure.in, configure: have device/lib/pic configured
601         * device/lib/Makefile.in: added model-pic14
602         * device/lib/clean.mk: added pic/ to clean rule
603         * device/lib/pic: added rudimentary pic14 library providing support
604           functions for multiplication/division/generic pointer access
605         * src/SDCCopt.c (convilong): mark support functions as extern
606           for pic14 port as well
607         * src/pic/gen.c (genMult): added assertions,
608           (genpic14Code): emit warning on unhandled iCodes
609         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
610         * src/pic/pcode.c (pCodeOpCopy),
611         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
612           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
613           SFR_REGISTER}), made safe for future extensions
614         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
615           instructions even if preceeded by SKIP instructions (also remove
616           them); removed unused code
617         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
618           prevents leaving parts of the structure uninitialized after copying
619
620 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
621
622         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
623           ago by me
624         * support/regression/tests/addsub.c: added test for the bug
625
626 2005-09-21 Raphael Neider <rneider AT web.de>
627
628         * device/include/pic16/pic18f1220.h,
629           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
630         * device/lib/pic16/Makefile.rules: added missing opening paren
631         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
632           are provided in genutils.c,
633           (genUminusFloat,genUminus,genCmpEq): added asserts on different
634           operand/result sizes,
635           (genCmp): assert on NULL pointers first, then check deref'ed values
636         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
637           result size
638
639 2005-09-18 Raphael Neider <rneider AT web.de>
640
641         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
642           as these are now unused,
643           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
644         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
645           local, avoids uninitialized pointer dereference on r->name
646         * src/pic16/ralloc.c (newReg): fixed indentation
647
648 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
649
650         * src/SDCCval.c (constVal): fixed bug 730366
651         * support/Util/SDCCerr.c,
652         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
653
654 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
655
656         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
657
658 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
659
660         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
661
662 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
663
664         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
665           (hex2dec): made hex_digit unsigned char, removed ascii dependance
666         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
667           (hex2dec): made hex_digit unsigned char, removed ascii dependance
668         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
669         * packihx/packihx.c (hexDigit): made c unsigned char
670         * as/mcs51/lklibr.c (fndsym),
671         * link/z80/lkgb.c (gb),
672         * link/z80/lklibr.c (fndsym),
673         * link/z80/lkrloc.c (relr),
674         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
675         * src/SDCC.lex (checkCurrFile, process_pragma),
676         * src/SDCCglue.c (spacesToUnderscores),
677         * src/SDCCmain.c (setParseWithComma, processFile),
678         * src/asm.c (tvsprintf, printCLine),
679         * src/avr/gen.c (emitcode, aopPut),
680         * src/ds390/gen.c (emitcode),
681         * src/hc08/gen.c (emitcode, emitinline),
682         * src/mcs51/gen.c (emitcode, genInline),
683         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
684           tokenizeLineNode),
685         * src/pic/ralloc.c (debugLog),
686         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
687           tokenizeLineNode),
688         * src/pic16/ralloc.c (debugLog),
689         * src/z80/main.c (_process_pragma):
690            made all ctype.h function calls safe
691         * src/SDCCopt.c: include math.h for fabs
692         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
693           and used them throughout the code to make ctype.h function calls safe
694         * src/ds390/main.c (asmLineNodeFromLineNode),
695         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
696         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
697            unsigned char*
698         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
699           (newpCodeAsmDir): made ctype.h function calls safe
700         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
701           pic16_emitcode):  made lbp unsigned char*
702         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
703           (pic16_newpCodeAsmDir): made ctype.h function calls safe
704         * src/xa51/gen.c (emitcode),
705         * src/z80/gen.c (_emit2): made lbp unsigned char*
706         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
707            char*
708
709 2005-09-05 Raphael Neider <rneider AT web.de>
710
711         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
712           access bank splitpoint
713
714 2005-09-05 Raphael Neider <rneider AT web.de>
715
716         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
717
718 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
719
720         * .version: changed to version 2.5.3
721         * doc/sdccman.lyx: changed version to 2.5.3,
722           documented --codeseg and --constseg and pragma codeseg and constseg,
723           documented bit parameters (reentrant) and bit returning
724         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
725            currFunc->recvSize, but is this ok for all ports?
726           (ast2iCode): result of ~ on unsigned char must be cast to int for
727            bool to work
728         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
729           function pointers in bit space
730         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
731           (processFuncArgs): call port.reg_parm() with reentrancy info
732         * src/port.h,
733         * src/avr/main.c,
734         * src/ds390/main.c,
735         * src/hc08/main.c,
736         * src/pic/main.c,
737         * src/pic16/main.c,
738         * src/xa51/main.c,
739         * src/z80/main.c: port.reg_parm prototype extended with
740           "bool reentrant" parameter
741         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
742           options.stackAuto for allocating bit register parameters
743         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
744           (genSend): set BitBankUsed if it is,
745           (selectRegBank): factored out of genCall for use in genPcall,
746           (genCall): removed redundant dtype assignmen, use selectRegBank,
747           (genPcall): handle returning in Carry properly, save in F0 if needed,
748           (genReceive): handle bit register parameters
749         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
750           (mcs51_assignRegisters): enable bit registers for all reentrant
751            functions and don't set BitBankUsed unconditionally
752         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
753         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
754         * support/regression/tests/funptrs.c: added tests for BOOL and for return
755
756 2005-08-27 Borut Razem <borut.razem AT siol.net>
757
758         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
759         ppc-osx (Darwin) does not support -u option. It seems that it is
760         supported only on Linux - GNU cp
761
762 2005-08-25 Borut Razem <borut.razem AT siol.net>
763
764         * sim/ucsim/gui.src/serio.src/Makefile.in,
765           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
766           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
767           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
768           install and strip, since the strip at /usr/ccs/bin should be used
769           on solaris
770
771 2005-08-24 Borut Razem <borut.razem AT siol.net>
772
773         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
774
775 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
776
777         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
778         ffffffffu
779
780 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
781
782         * as/mcs51/aslink.h: completed lkrloc.c prototypes
783         * as/mcs51/lkmain.c (link_main): fixed warning
784         * device/include/stdbool.h: ds390 has no advanced bit support yet
785         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
786         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
787         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
788           and updated their macros
789         * src/SDCCval.c (constVal): updated comment for renamed b_long
790
791 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
792
793         * as/mcs51/asdata.c: changed ctype['['] to BINOP
794         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
795           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
796           (oprio): set priority for '['
797         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
798            and adb_24_bit
799         * as/mcs51/asm.h: added defines R_BIT and S_BIT
800         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
801         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
802         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
803           added overlayable BIT_BANK area
804         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
805           (summary2): explain 'T' in legenda
806         * as/mcs51/lkrloc.c: replaced old K&R style,
807           (relr): added R_BIT processing,
808           (errmsg): added "Bit-addressable relocation error",
809           (adb_bit): added for converting from byte- to bit-addressable space,
810           (adb_24_bit): added for converting from byte- to bit-addressable space
811         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
812            used in reentrant functions now even as return value
813         * device/lib/_gptrput.c (_gptrput): removed obsolete code
814         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
815           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
816         * src/SDCCglobl.h: added indicator BitBankUsed
817         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
818            the bit registers b0-b7
819         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
820           (geniCodeCast): fixed bug 1263853,
821           (geniCodeLogicAndOr): put result in bool or char,
822           (geniCodeReceive): added parameter func for accessing the return type,
823           (geniCodeFunctionBody): pass func to geniCodeReceive
824         * src/SDCCmain.c: added indicator BitBankUsed
825         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
826         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
827           (checkSClass): don't put automatic bool/bit on stack,
828           (checkFunction): removed check on function cannot return bit
829         * src/SDCCsymt.h: added newBoolLink prototype
830         * src/mcs51/gen.c (rb1regs): added bit registers,
831           (movc): created for assigning to carry,
832           (pushReg, popReg): created for pushing registers,
833           (sameRegs): check both AOP_REG and AOP_CRY types,
834           (aopOp): handle bit registers,
835           (aopPut): optimization no self-assign,
836           (saveRegisters): push reg->base (bits) only once for bit registers,
837            and use pushReg,
838           (unsaveRegisters): pop reg->base only once and use popReg,
839           (assignResultValue): added parameter func and return in carry for bits,
840           (genIpush): optimization no reload in A if not changed,
841           (genSend): bit parameters in reentrant functions are passed in bit
842            registers by first assigning to bits in B, then save registers and
843            copy B to bits,
844           (genCall): handle returning in Carry properly, save it in F0 if needed,
845           (genPcall): updated assignResultValue call, this is not safe yet for bit
846            returning function !!!
847           (genFunction): don't generate equ's for bit registers and use pushReg,
848           (genEndFunction): take care of bit returning functions and use popReg,
849           (genRet): return bit in Carry,
850           (genIfx): optimize bit registers and other directly addressable bits,
851           (genReceive): updated assignResultValue call
852         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
853           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
854            registers when using stack-auto
855         * src/mcs51/ralloc.c (_G): added allBitregs,
856           (regs8051): added the bit registers,
857           (createStackSpil): use macro IS_BIT,
858           (getRegBit): added to allocate a bit register, else spill,
859           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
860           (updateRegUsage): factored out to ease stepping while debugging,
861           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
862            also allocate bit registers,
863           (fillGaps): handle bit registers,
864           (findAllBitregs): added to create bit vector with all bit registers,
865           (mcs51_allBitregs): returns this bit vector,
866           (mcs51_assignRegisters): when using stack-auto use bit registers for
867            passing parameters and creating local variables
868         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
869
870 2005-08-22 Borut Razem <borut.razem AT siol.net>
871
872         * device/lib/Makefile.in: replaced find option -or with -o
873           to make it run on solaris
874
875 2005-08-22 Raphael Neider <rneider AT web.de>
876
877         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
878           fixes #1265442 (crash on Solaris)
879
880 2005-08-20 Borut Razem <borut.razem AT siol.net>
881
882         * configure, configure.in: added tests for libsocket and libnsl libraries,
883           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
884           from support/regression/Makefile.in
885         * support/regression/Makefile.in: added
886         * device/lib/pic16/Makefile.common.in: force make to use bash shell
887         * sim/ucsim/libtool: regenerated on sparc-solaris
888         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
889           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
890           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
891           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
892           sparc-solaris, which doesn't use GNU ld linker
893         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
894         * as/Makefile: find on sparc-solaris does not support -maxdepth option
895
896 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
897
898         * src/mcs51/peeph.def: updated comments
899
900 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
901
902         * device/lib/_gptrget.c,
903         * device/lib/_gptrput.c: slightly shorter
904         * doc/sdccman.lyx: incremented version
905         * src/mcs51/peeph.def: moved peephole comments to the line of first
906           change to better keep line correlation, reanimated 186.e
907         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
908
909 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
910
911         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
912           David Saxton with quotes around file name.
913
914 2005-08-15 Borut Razem <borut.razem AT siol.net>
915
916         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
917           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
918           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
919           make tests run on x86_64 platform
920
921 2005-08-13 Raphael Neider <rneider AT web.de>
922
923         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
924           as it might be executed DURING a build (parallel make is wonderful)
925
926 2005-08-13 Raphael Neider <rneider AT web.de>
927
928         * device/lib/Makefile.in (port-specific-objects-pic16):
929           revert to cp $(PORT)/bin/*.* $(PORTDIR)
930         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
931           dependency
932         * device/lib/pic16/Makefile.rules: build subdirs before creating
933           the library, removed builddir rule, create $(builddir) early in
934           recurse rule, use empty recurse rule for leaf directories
935         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
936           mkdir errors (race condition), removed duplicate suffix "hex"
937           from clean rules
938         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
939         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
940           prevents mkdir -p from aborting on Alpha
941
942 2005-08-12 Raphael Neider <rneider AT web.de>
943
944         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
945           db-statements in order to allow for arrays of pointers in code
946           sections to be placed without interspersed 0-padding, fixes
947           bug #1256215
948         * (emitStatistics): fixed division by zero for pic18f1220
949         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
950           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
951         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
952         * (pic16_pCodeConstString): keep track of already emitted string
953           literals to prevent "duplicate definitions of symbol _str_NR"
954         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
955           debug message
956         * device/lib/Makefile.in: ignore failing PIC16 library builds
957         * device/lib/pic16/Makefile: do not build if gputils are missing
958         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
959
960 2005-08-10 Raphael Neider <rneider AT web.de>
961
962         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
963           my last commit)
964
965 2005-08-10 Raphael Neider <rneider AT web.de>
966
967         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
968           Rokas' patch to add the new fixed point type "__fixed16x16"
969         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
970           functions for __fixed16x16 arithmetics
971         * device/lib/pic16: reimplemented the build system to support
972           a separate build directory, better handling of libio (create
973           the library in a separate subdir for each architecture) and
974           easier configuration (centralized in Makefile.common)
975
976 2005-08-07 Raphael Neider <rneider AT web.de>
977
978         * src/pic16/gen.c (genrshTwo): fixed sign extension
979         * src/pic16/device.c: added pic18f2320, 4220 and 4320
980         * device/include/pic16/pic18f2220.h: changed some bit definitions,
981           added T0CONbits
982         * device/include/pic16/pic18f4220.h: NEW, header for
983           pic18f4220 and pic18f4320
984         * device/include/pic16/pic18fregs.h: added new devices,
985           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
986         * device/include/pic16/signal.h: resolved name clashes
987           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
988           to also allow testing for interrupt enable bits, added
989           comments on how to use the macros
990         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
991         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
992           register definitions for the devices
993         * device/lib/pic16/pics.all: added new devices
994         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
995           allocated memory
996         * device/lib/pic16/libc/stdlib/memfree: do not count
997           the block header as free memory
998         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
999           simplified and added missing end-of-blocklist-marker
1000           (reported by Peter Onion, fixes #1252814)
1001         * (_mergeHeapBlock): fixed loop condition
1002         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1003           len==0, restructured code
1004         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1005           up a bit, reduced bitfield accesses, prevent endless loops
1006           in case of heap corruption
1007         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1008           "unreferenced arguments/must return a value" warnings
1009         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1010           replaced BAUDREG with SPBRG
1011         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1012           device/lib/pic16/debug/gstack/gstack.c: replaced
1013           _naked, _asm, _endasm with __naked, __asm, __endasm
1014
1015 2005-08-05 Raphael Neider <rneider AT web.de>
1016
1017         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1018           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1019
1020 2005-08-05 Borut Razem <borut.razem AT siol.net>
1021
1022         * device/lib/Makefile.in: added missing ';'
1023         * configure: removed ^M characters
1024
1025 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1026
1027         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1028           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1029           License
1030
1031 2005-08-04 Borut Razem <borut.razem AT siol.net>
1032
1033         * configure.in: pic16 libraries build 2nd try - enable running
1034           configure in device/lib/pic16
1035         * configure: regenerated from configure.in
1036         * device/lib/Makefile.in: create $(PORT)/bin directory
1037
1038 2005-08-03 Raphael Neider <rneider AT web.de>
1039
1040         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1041           to get/set values via pointers
1042         * (genUnpackBits,genPackBits): changed detection of
1043           ptr->bitfield vs. sym.bitfield, fixed access via generic
1044           pointers, removed dead (wrong) code for multibyte bitfields
1045         * (genNearPointerGet, genGenPointerGet): removed useless code,
1046           fixed bitfield detection, fixes #1250594
1047         * (genNearPointerSet): removed useless code
1048         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1049           and introduced macro pic16_emitpcode that conditionally emits
1050           the origin of the following pCode (useful for debugging SDCC)
1051         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1052         * (createDefmap): fixed handling of LFSR for --optimize-df
1053
1054 2005-08-02 Borut Razem <borut.razem AT siol.net>
1055
1056         * device/lib/Makefile.in: pic16 libraries build enabled since
1057           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1058
1059 2005-08-02 Raphael Neider <rneider AT web.de>
1060
1061         * src/pic16/gen.c (genPackBits): removed deprecated warning
1062         * (genGenPointerSet): fixed bitfield detection
1063
1064 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1065
1066         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1067
1068 2005-07-31 Raphael Neider <rneider AT web.de>
1069
1070         * device/lib/pic16/libdev/pic18f458.c,
1071           device/include/pic16/pic18f458.h: added missing T0CONbits
1072
1073 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1074
1075         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1076
1077 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1078
1079         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1080
1081 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1082
1083         * device/include/mcs51/at89c51ed2.h: added.
1084
1085 2005-07-23 Raphael Neider <rneider AT web.de>
1086
1087         * src/pic/gen.h: added emitpcode macro for debugging
1088         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1089           and replace by macro adding debug information on demand
1090         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1091         * (gencjne): tried to fix; replaced with correct (slower) code
1092         * (gen{Unp,P}ackBits): fixed single bit access
1093         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1094         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1095           previous instruction
1096         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1097           register has to be handled with care (forbidding movement
1098           of assignments/uses, removing assignments completely, ...)
1099         * (pCodeOptime2pCodes): make use of regIsSpecial
1100         * added lots of debugging output (commented out)
1101         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1102           from being reused as result UNLESS it is known to work
1103
1104 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1105
1106         * support/Util/dbuf.h: include <stddef.h> for size_t
1107         * .version: changed to version 2.5.2
1108
1109 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1110
1111         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1112
1113 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1114
1115         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1116           (genModOneByte): removed needless psha/pula
1117
1118 2005-07-22 Raphael Neider <rneider AT web.de>
1119
1120         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1121           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1122         * src/pic/gen.c (resolveIfx): do not "invent" labels
1123         * (genSkipc): changed to positive logic
1124         * (genSkipCond): removed as no longer needed
1125         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1126           backport from PIC16
1127         * (genLeftShift): check operands are in different registers
1128         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1129           INCF does not update CARRY...
1130         * src/pic/main.c: fixed _linkCmd
1131         * src/pic/pcode.c (unlinkpCode): added inactive code
1132         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1133           alive (do not assign result and operand overlapping registers)
1134
1135 2005-07-22 Raphael Neider <rneider AT web.de>
1136
1137         * src/pic/device.c (dump_sfr): replaced register declaration with
1138           call to emitSymbolToFile() to avoid duplicate symbols
1139         * (assignRelocatableRegisters): do not declare external symbols
1140         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1141           right (take size of type, not etype)
1142         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1143         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1144         * (packRegsForAccUse): disabled assignment of WREG as
1145           the result reg to prevent occurence of just fixed #1235003,
1146           fixes #1242954
1147         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1148           symbols (avoids duplicate symbols in .asm file)
1149         * (pic14emitRegularMap): use emitSymbolToFile()
1150         * src/pic/gen.c (aopOp): fixed spillLocation handling
1151         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1152         * (genDataPointerSet): removed unneccessary variables/output
1153
1154 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1155
1156         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1157         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1158
1159 2005-07-21 Raphael Neider <rneider AT web.de>
1160
1161         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1162           architecture cannot handle them efficiently, fixes bug #1235003
1163         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1164           check for empty sets before using them (fixes bug #1232190)
1165
1166 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1167
1168         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1169           (lnksect2): generate warnings for memory overlap
1170         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1171           constseg to set the name of these segments so you can instruct the linker
1172           to place them in banks
1173         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1174         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1175           added code_seg and const_seg to options
1176         * src/SDCCglue.c (emitMaps): use options.const_seg,
1177           (createInterruptVect): put interrupt vectors in segment HOME,
1178           (glue): put HOME before static segment and put the main glue in HOME,
1179           (glue): use options.code_seg
1180         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1181         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1182           these segments so you can instruct the linker to place them in banks
1183           (linkEdit): use code_loc for HOME segment which should be the first
1184           segment in code memory now
1185         * src/SDCCmem.c: fixed more stuff like bug 1238386
1186         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1187           (changePointer): don't change function pointers to code pointers for
1188           banked functions,
1189           (compareType): added exceptional check for banked function pointers
1190         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1191         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1192           after static in code memory
1193         * src/mcs51/gen.c: added aopLiteralLong prototype,
1194           (aopForSym): use getSize for functions,
1195           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1196           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1197           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1198           the segment,
1199           (genPcall): use call for literal function pointers and generate banked
1200           calls over the one trampoline so there's only one place for the user to
1201           modify according to his/hers hardware,
1202           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1203           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1204         * src/mcs51/main.c: added keyword banked,
1205           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1206         * support/Util/SDCCerr.c,
1207         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1208           needed for passing the bank and address to the trampoline
1209         * device/lib/mcs51/crtbank.asm: added for bankswitching
1210         * device/lib/mcs51/Makefile: added crtbank
1211
1212 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1213
1214         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1215           for fields at offset 0 of a struct or union as reported
1216           on 2005-07-07 in the developer mailing list.
1217
1218 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1219
1220         * src/SDCCmem.c: fixed bug 1238386
1221
1222 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1223
1224         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1225           (patch #1144962), added peephole 300, enabled 259.x
1226         * doc/sdccman.lyx: removed screenshot and provided link instead
1227
1228 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1229
1230         * doc/sdccman.lyx: added section about debugging with ddd
1231         * doc/figures/ddd_example.eps: screenshot of debugging session
1232
1233 2005-07-04 Raphael Neider <rneider AT web.de>
1234
1235         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1236           like CODE pointers, fixes #1115683
1237         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1238           call, fixes bugs #1232211, #1228110,
1239           fixed wrong casts to pCodeFlow from pCodeInstructions
1240
1241 2005-07-04 Raphael Neider <rneider AT web.de>
1242
1243         * src/pic/gen.c (popGet): changed assert to allow for
1244           bit operands
1245         * (popGetAddr): changed signature to provide
1246           an additional index, patched all call sites
1247         * (genCmpEq): handle literal-like operands correctly
1248         * (genAddrOf): added sanity checks on __code/__data pointers
1249         * (genAssign): added handling of symbols from __code section
1250         * (gencjne): do not generate code for comparisons whose result
1251           is neither stored nor used, fixes bug #1171114
1252         * (AccLsh, AccRsh): operate on operand instead of WREG
1253         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1254           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1255           by known count
1256         * rewrote complete shift-by-literal logic, commented unused
1257           functions out
1258         * (genConstPointerGet): get multiple bytes (if result size > 1),
1259           fixed handling of non-immediate addresses
1260         * (genPointerGet): handle CODE pointers like CONST pointers
1261         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1262         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1263           operand is to be treated as a literal or not
1264         * (mov2w,genPcall,genCmpEq),
1265           src/pic/genarith.c: use aop_isLitLike() to decide between
1266           literal/register contents
1267         * (addSign): added missing offset
1268         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1269           only emit comment in debug-mode,
1270           use {aop,op}_isLitLike throughout the file
1271         * src/pic/glue.c: fix initializers for pointers (work in progress)
1272         * src/pic/pcode.c (get_op): honor index on _const symbols
1273         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1274         * (dumppBlock): added pCode size estimation
1275         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1276           check for IS_SYMOP before OP_SYMBOL'ing
1277         * fixed indentation, compacted switch-statements
1278         * (allocReg): find free register and allocate it instead of
1279           allocating new registers all the time
1280         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1281           registers as its operands (necessary only for multibyte GETs)
1282
1283 2005-07-01 Raphael Neider <rneider AT web.de>
1284
1285         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1286           debugging .asm-output macros FENTRY + FEXIT
1287         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1288           way... I wonder...
1289         * (emitpComment): NEW, printf to pCode
1290         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1291           offset handling
1292         * (popGetAddr): NEW, variant of popGet to access an immediates
1293           high(er) bytes instead of the n'th byte of memory they reference,
1294           replaced popGet with popGetAddr where neccessary
1295         * (genDataPointerGet): reactivated and fixed implementation
1296         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1297           accesses
1298         * (genDataPointerSet): fixed multibyte assignments
1299         * (genpic14Code): fixed --i-code-in-asm handling
1300         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1301         * (genPlus): fixed index-out-of-bounds error
1302         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1303         * src/pic/ralloc.c: added debugging output macro FENTRY2
1304         * (spillThis): fixed indentation, enbraced for-body for clarity
1305         * (rematStr): commented out as now unused
1306         * (regTypeNum): commented out special spill case (overwrites
1307           arbitrary values)
1308         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1309
1310 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1311
1312         * doc/sdccman.lyx: documented sfr16/sfr32,
1313           added example for using storage class with function pointers
1314         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1315
1316 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1317
1318         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1319         * device/lib/_itoa.c,
1320         * device/lib/_ltoa.c: optimized codesize
1321         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1322           but don't know how to suppress the double warning.
1323         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1324         * support/Util/SDCCerr.c,
1325         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1326
1327 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1328
1329         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1330           fixed old K&R prototypes
1331         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1332         * device/lib/_gptrget.c,
1333         * device/lib/_gptrgetc.c,
1334         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1335           also new versions for small generic pointers and banked generic pointers
1336         * src/port.h: added const_name
1337         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1338         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1339         * src/SDCCcse.c (findPrevIc): check all associative operators
1340         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1341         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1342         * src/SDCCmem.c: updated comments,
1343           set far-space to 0 for pdata, results in optimized code
1344         * src/SDCCmem.h: added macro CONST_NAME
1345         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1346           moving the info into the highest bits, see also gptrget/gptrput
1347         * src/src.dsp: added sdcc.ico to project files
1348         * src/avr/gen.c (genCast): fixed bug 0x%d
1349         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1350         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1351           relation between ptr_type and DCL_TYPE,
1352           (genCast): fixed bug 0x%d
1353         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1354           (CODE)" for const_name
1355         * src/hc08/gen.c (genCast): fixed bug 0x%d
1356         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1357           (hc08_port): added "CONST (CODE)" for const_name
1358         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1359           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1360           between ptr_type and DCL_TYPE,
1361           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1362           operand* and took AOP() inside function so sfr-ness can be checked,
1363           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1364           new prototype,
1365           (genFunction, genEndFunction): optimized stack setup,
1366           (genMinus): optimized for literals with ending zeroes (in bytes),
1367           (genCast): fixed bug 0x%d
1368         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1369           (mcs51_port): added "CONST (CODE)" for const_name
1370         * src/mcs51/peeph.def: made rule 226 more generic
1371         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1372         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1373         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1374         * src/z80/main.c (z80_port): added NULL for const_name,
1375           (gbz80_port): added NULL for const_name
1376         * support/regression/tests/bug663539.c,
1377         * support/regression/tests/sfr16.c: new tests
1378
1379 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1380
1381         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1382
1383 2005-06-24 Raphael Neider <rneider AT web.de>
1384
1385         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1386           corrected typos...
1387         * device/include/pic16/signal.h: added USBIF
1388           and SIG_USB
1389
1390 2005-06-24 Raphael Neider <rneider AT web.de>
1391
1392         * device/lib/pic16/libdev/pic18f2455.c,
1393           device/include/pic16/pic18f2455.h: NEW
1394         * device/include/pic16/pic18fregs.h,
1395           device/lib/pic16/pics.all,
1396           src/pic16/device.c: added 18f2455
1397         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1398           device/include/pic16/{pic18f[68][567].h,usart.h}:
1399           replaced MULTIPLE_USARTS define with more relaible
1400           compatibility sfrs (for USART access)
1401
1402 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1403
1404         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1405           and the output asm file line is printed on two lines.
1406
1407 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1408
1409         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1410           BGT, BLE, BHI, and BLS instructions
1411         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1412           genCmpEq): removed
1413         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1414           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1415           fixes bug #1216342
1416         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1417
1418 2005-06-15 Raphael Neider <rneider AT web.de>
1419
1420         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1421         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1422         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1423           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1424           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1425
1426 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1427
1428         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1429           Marcel Telka in bug #1215704
1430
1431 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1432
1433         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1434           located in shared memory bank.
1435
1436 2005-05-31 Raphael Neider <rneider AT web.de>
1437
1438         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1439           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1440           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1441
1442 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1443
1444         * device/lib/_strncpy.c: fixed the fix
1445
1446 2005-05-26 Raphael Neider <rneider AT web.de>
1447
1448         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1449           initializers with \0, bug #1208187
1450         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1451           intializers with \0, bug #1208187
1452
1453 2005-05-26 Raphael Neider <rneider AT web.de>
1454
1455         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1456           initializers with \0, bug #1208187
1457         * src/pic16/main.c (_process_pragma): added sanity checks
1458           for stack position and size, emit warnings when appropriate
1459
1460 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1461
1462         * device/lib/_strncpy.c: fixed not filling with \0
1463
1464 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1465
1466         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1467           createFunction),
1468         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1469           compound_statement),
1470         * src/SDCCsymt.h,
1471         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1472
1473 2005-05-24 Raphael Neider <rneider AT web.de>
1474
1475         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1476
1477 2005-05-24 Raphael Neider <rneider AT web.de>
1478
1479         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1480           TRISE definitions, closes bug #1162453
1481
1482 2005-05-22 Raphael Neider <rneider AT web.de>
1483
1484         * src/pic16/main.c (_process_pragma): check for missing
1485           arguments to pragmas code and udata
1486         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1487           consistency fixes to match other headers (thanks to Jim Paris)
1488         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1489
1490 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1491
1492         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1493
1494 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1495
1496         * support/regression/tests/bug1198642.c: new test
1497         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1498         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1499         * support/scripts/resource.h,
1500         * support/scripts/resource.rc,
1501         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1502         * support/scripts/sdcc.ico: added 32x32 icon
1503
1504 2005-05-18 Raphael Neider <rneider AT web.de>
1505
1506         * device/lib/pic16/libdev/pic18f*.c,
1507         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1508           keywords to "__sfr" and "__at (X)"
1509         * device/include/pic16/pic18fregs.h: added pic18f4520
1510         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1511           #1203088 (MPLAB compatibility)
1512
1513 2005-05-17 Raphael Neider <rneider AT web.de>
1514
1515         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1516         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1517         * device/lib/pic16/pics.all: added new devices
1518         * src/pic16/device.c: added support for pic18f4520
1519
1520 2005-05-16 Raphael Neider <rneider AT web.de>
1521         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1522         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1523         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1524           convenience function for bit access
1525
1526 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1527
1528         * device/lib/printf_large.c: fixed bug 1193299
1529         * support/regression/tests/bug1057979.c: added test %3.3s
1530
1531 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1532
1533         * device/include/mcs51/8051.h,
1534         * device/include/mcs51/8052.h: made parseable with lint
1535         * device/include/mcs51/lint.h: added include file for (sp)lint
1536         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1537         * doc/cdbfileformat.lyx,
1538         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1539
1540 2005-05-14 Raphael Neider <rneider AT web.de>
1541
1542         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1543         * device/lib/pic16/libc/stdlib/itoa.c (new)
1544         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1545         * device/lib/pic16/libio/Makefile: exclude subdir according to
1546           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1547         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1548         * src/pic16/gen.c (genFunction): prevent annoying warning
1549         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1550           nameclashes on BeOS
1551         * support/cpp2/cppmain.c (cpp_output_string): new
1552         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1553           fixes bug 1116802
1554
1555 2005-05-13 Borut Razem <borut.razem AT siol.net>
1556
1557         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1558
1559 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1560
1561         * .version: changed to version 2.5.1; back to bleeding edge development
1562
1563 2005-05-11 Borut Razem <borut.razem AT siol.net>
1564
1565         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1566           generate PDF version 1.3 documents
1567
1568 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1569
1570         * .version: changed to version 2.5.0
1571
1572 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1573
1574         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1575
1576 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1577
1578         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1579         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1580         well as many smaller updates.
1581         * .version: changed to version 2.5.0-pre1
1582
1583 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1584
1585         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1586
1587 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1588
1589         * support/regression/tests/bug1185672.c: added
1590         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1591           bug 1185672
1592         * src/mcs51/gen.c (genCall): added comments, made it look safer
1593         * src/mcs51/gen.c (genEndFunction): simplified
1594
1595 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1596
1597         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1598
1599 2005-04-14 Borut Razem <borut.razem AT siol.net>
1600
1601         * fixed bug 1045046 - SIGSEGV with really simple code?:
1602           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1603           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1604
1605 2005-04-14 Borut Razem <borut.razem AT siol.net>
1606
1607         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1608           src/pic16/device.h: temporarily disabled experimental #inline pragma
1609           for 2.5.0 release
1610
1611 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1612
1613         * device/include/z80/stdio.h,
1614         * device/include/z80/string.h: removed these highly incomplete files so
1615           SDCC can use the default ones in device/include/
1616
1617 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1618
1619         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1620         gcc warning.
1621         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1622         fix sdcpp warnings.
1623
1624 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1625
1626         * device/include/malloc.h: removed redundant __reentrant prototypes
1627         * device/lib/_mullong.c: added working xstack variant in asm (C version
1628           doesn't pass regression tests)
1629         * device/lib/bpx.c: used __data and made bpx char for mcs51
1630         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1631           (createFunction): fixed bug with xstackPtr
1632         * src/SDCCcse.c: corrected comments
1633         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1634           (killDeadCode, eBBlockFromiCode): removed unused code
1635         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1636           corrected comments
1637         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1638           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1639           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1640           (genModOneByte): fixed warning in MSVC
1641         * src/mcs51/main.c (): added comments
1642         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1643
1644 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1645
1646         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1647
1648 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1649
1650         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1651
1652 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1653
1654         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1655         characters arrays of larger size than the declared one.
1656
1657 2005-04-10 Borut Razem <borut.razem AT siol.net>
1658
1659         * src/pic/gen.c (genInline),
1660           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1661           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1662           (findNextInstruction), (findPrevInstruction),
1663           (findInstructionUsingLabel),
1664           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1665         * src/pic/pcode.c (findLabel): added missing '\n'
1666         * src/src.dsp: added SDCCdwarf2.c to the project
1667
1668 2005-04-09 Borut Razem <borut.razem AT siol.net>
1669
1670         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1671
1672 2005-04-08 Raphael Neider <rneider AT web.de>
1673
1674         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1675           into the chain after a given one) and mergeDefmapSymbols (combine
1676           defmap entries for each symbol per pcode)
1677         * (createDefmap): have defmap entries merged in the end
1678         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1679           a symbol before replacing one access type's symbol, merge symbols in
1680           the end (replacement symbol might already have an entry)
1681         * (assignValnums): keep reference to written WREG intact
1682
1683 2005-04-08 Raphael Neider <rneider AT web.de>
1684
1685         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1686           Alpha)
1687
1688 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1689
1690         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1691         bytes
1692
1693 2005-04-07 Raphael Neider <rneider AT web.de>
1694
1695         * device/include/pic16/usart.h: added compatibility defines for
1696           devices with more than one USART
1697         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1698
1699 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1700
1701         * device/lib/Makefile.in: updated for port specific include
1702
1703 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1704
1705         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1706
1707 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1708
1709         * device/include/8051.h,
1710         * device/include/8052.h,
1711         * device/include/at89S8252.h,
1712         * device/include/at89c55.h,
1713         * device/include/at89x051.h,
1714         * device/include/at89x51.h,
1715         * device/include/at89x52.h,
1716         * device/include/mcs51reg.h,
1717         * device/include/reg51.h,
1718         * device/include/reg764.h,
1719         * device/include/regc515c.h,
1720         * device/include/sab80515.h: (re)moved these 12 files
1721         * device/include/mcs51/8051.h,
1722         * device/include/mcs51/8052.h,
1723         * device/include/mcs51/at89S8252.h,
1724         * device/include/mcs51/at89c55.h,
1725         * device/include/mcs51/at89x051.h,
1726         * device/include/mcs51/at89x51.h,
1727         * device/include/mcs51/at89x52.h,
1728         * device/include/mcs51/mcs51reg.h,
1729         * device/include/mcs51/reg51.h,
1730         * device/include/mcs51/reg764.h,
1731         * device/include/mcs51/regc515c.h,
1732         * device/include/mcs51/sab80515.h: and added them here
1733
1734 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1735
1736         * device/include/stdarg.h: changed SDCC specific keywords to double
1737           underlined form.
1738         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1739           mcs51 and ds390.
1740         * device/include/hc08/mc68hc908gp32.h,
1741         * device/include/hc08/mc68hc908jb8.h,
1742         * device/include/hc08/mc68hc908jkjl.h,
1743         * device/include/hc08/mc68hc908qy.h: fixed comments
1744         * device/include/mcs51/README: updated
1745         * device/include/mcs51/c8051f120.h: added PINRSF
1746         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1747         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1748           amidst code. Also inline is not supported.
1749
1750 2005-04-06 Raphael Neider <rneider AT web.de>
1751
1752         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1753         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1754           callers stack/frame pointers
1755
1756 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1757
1758         * device/include/pic16/usart.h: added, missing in previous commit,
1759         * device/include/pic16/adc.h: fixed typo,
1760         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1761         commit,
1762         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1763         <p18fxxx.inc>
1764         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1765         uninitialized because a bug appears with gplink
1766         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1767         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1768         complains for unrecognised option
1769
1770 2005-04-05 Raphael Neider <rneider AT web.de>
1771
1772         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1773           structs as well (using memcpy)
1774         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1775           on ISRs (GOTO has no label)
1776         * src/pic16/device.h: added OF_OPTIMIZE_DF
1777         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1778           new data flow analysis/optimization
1779         * src/pic16/pcode.c: added (prototypes for and implementation of)
1780           dataflow analysis functions, fixed pCodeInstructions' inCond and
1781           outCond values, made RCALL a branch instruction
1782         * (pic16_unlinkpCode): keep C line if possible
1783         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1784           C line moved if possible
1785         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1786         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1787           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1788         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1789           new flow)
1790         * (pic16_getJumptabpCode): NEW, needed in...
1791         * (LinkFlow): fixed handling of jumptables, calls and conditional
1792           branches
1793         * (pic16_InsertCommentAfter): NEW
1794         * (pic16_pCodeReplace): made verbose and flow preserving
1795         * (AnalyzeFlow): added call to data flow analysis
1796         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1797         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1798         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1799
1800 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1801
1802         * src/SDCCast.c (decorateType): fixed bug #1105626
1803
1804 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1805
1806         * device/include/asm/pic16/features.h,
1807         * pic18f*.h headers,
1808         * device/include/pic16/adc.h,
1809         * device/include/pic16/delay.h,
1810         * device/include/pic16/i2c.h,
1811         * device/include/pic16/malloc.h,
1812         * device/include/pic16/stdio.h,
1813         * device/include/pic16/stdlib.h,
1814         * device/include/pic16/string.h,
1815         * device/lib/pic16/libc/stdio/printf_tiny.c,
1816         * device/lib/pic16/libc/stdio/printf_small.c,
1817         * device/lib/pic16/libc/stdio/strmgpsim.c,
1818         * device/lib/pic16/libc/stdio/strmmssp.c,
1819         * device/lib/pic16/libc/stdio/strmusart.c,
1820         * device/lib/pic16/libc/stdio/vfprintf.c,
1821         * device/lib/pic16/libc/stdlib/ltoa.c,
1822         * device/lib/pic16/libc/stdlib/putchar.c,
1823         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1824         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1825         * device/lib/pic16/libc/stdlib/memchrram.c,
1826         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1827         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1828         * device/lib/pic16/libio/adc/adcbusy.c,
1829         * device/lib/pic16/libio/adc/adcread.c,
1830         * device/lib/pic16/libio/adc/adcsetch.c,
1831         * device/lib/pic16/libio/usart/ubaud.c,
1832         * device/lib/pic16/libio/usart/ubusy.c,
1833         * device/lib/pic16/libio/usart/udrdy.c,
1834         * device/lib/pic16/libio/usart/uopen.c,
1835         * device/lib/pic16/libio/usart/uputc.c,
1836         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1837         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1838         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1839         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1840         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1841         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1842         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1843         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1844         specific keywords to double underlined form,
1845         * device/lib/pic16/libc/Makefile.rules,
1846         * device/lib/pic16/libsdcc/Makefile.rules,
1847         * device/lib/pic16/libm/Makefile,
1848         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1849         to compile with C standard set in Makefile.common
1850         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1851         rand.c and crc.c in compilation process,
1852         * device/lib/pic16/libsdcc/int/divuint.c,
1853         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1854         `c' from signed to unsigned,
1855         * device/lib/pic16/startup/crt0.c,
1856         * device/lib/pic16/startup/crt0i.c,
1857         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1858         keywords to double underlined form, bug fixes in _do_cinit function
1859         which prevented the correct initialization of the .idata segment,
1860         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1861         core to enter a infinite loop
1862         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1863
1864 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1865
1866         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1867
1868 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1869
1870         * device/include/Makefile.in: add support for hc08 subdirectory
1871         * device/include/hc08/: new subdirectory
1872         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1873         Lucas Loizaga, thanks!
1874         * device/include/hc08/mc68hc908qy.h,
1875         * device/include/hc08/mc68hc908gp32.h,
1876         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1877         their own directory. Changed internal macro names to use the compiler
1878         reserved namespace. Changed SDCC specific keywords to double
1879         underlined form.
1880         * device/include/math.h,
1881         * device/include/malloc.h,
1882         * device/include/stdarg.h,
1883         * device/include/stdbool.h
1884         * device/include/string.h,
1885         * device/include/tinibios.h,
1886         * device/include/ds400rom.h,
1887         * device/include/8051.h,
1888         * device/include/8052.h,
1889         * device/include/80c51xa.h,
1890         * device/include/at89c55.h,
1891         * device/include/at89S8252.h,
1892         * device/include/at89x51.h,
1893         * device/include/at89x52.h,
1894         * device/include/ds80c390.h,
1895         * device/include/reg764.h,
1896         * device/include/regc515c.h,
1897         * device/include/sab80515.h,
1898         * device/include/mcs51/c8051f000.h,
1899         * device/include/mcs51/c8051f018.h,
1900         * device/include/mcs51/c8051f020.h,
1901         * device/include/mcs51/c8051f040.h,
1902         * device/include/mcs51/c8051f060.h,
1903         * device/include/mcs51/c8051f120.h,
1904         * device/include/mcs51/c8051f300.h,
1905         * device/include/mcs51/c8051f310.h,
1906         * device/include/mcs51/c8051f320.h,
1907         * device/include/mcs51/c8051f330.h,
1908         * device/include/mcs51/c8051f350.h,
1909         * device/include/z180.h: Changed SDCC specific keywords to double
1910         underlined form.
1911
1912 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1913
1914         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1915         18F4455,
1916         * (pic16_assignConfigWordValue): disable testing of configuration
1917         register value with config mask,
1918         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1919         function with port->fun_prefix,
1920         * (genFunction): when generating a naked interrupt function never
1921         create an absolute segment placed in interrupt vector address, place
1922         the actual interrupt function at IVA instead, when an interrupt
1923         function is generated with unspecified interrupt then do not create
1924         the absolute section,
1925         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1926         code for generating a call to generic pointer get/put function with
1927         a call to function pic16_callGenericPointer(),
1928         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1929         the call to the generic pointer get/put functions with prefixing the
1930         function name with port->fun_prefix,
1931         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1932         * src/pic16/main.c (_process_pragma): prefix function with
1933         port->fun_prefix,
1934         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1935         calling assembler, old 18Fxxxx macro is deprecated,
1936         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1937         PC_ASMDIR in while condition,
1938         * (findInstruction): add PC_ASMDIR in while condition,
1939         * (buildCallTree): prefix main with port->fun_prefix,
1940         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1941         identifier for variable with banked access in instructions BTFSS,
1942         BTFSC, BCF, BSF, BTG
1943         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1944         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1945         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1946         perform optimization when enviroment variable NO_REG_OPT is set,
1947         * (insideLRBlock): NEW, return 1 if register is inside an
1948         INF_LOCALREGS block,
1949         * (RemoveRegFromLRBlock): remove a register that is completely
1950         eliminated by register optimization, but it is still left in local
1951         register store/restore in/from stack block,
1952         * (Remove2pcodes): after removing register, check to see if it
1953         should be removed from local register store/restore in/from stack
1954         block,
1955         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1956         DUMMY_READ_VOLATILE,
1957
1958         * device/include/pic16/adc.h: minor prototype modifications and
1959         update,
1960         * device/include/pic16/malloc.h: added GPL notice various
1961         modifications,
1962         * device/include/pic16/stdint.h: NEW, standard header for ints
1963         * device/include/pic16/delay.h: NEW, header for delay functions,
1964         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1965         delay1mtcy,
1966         * device/include/pic16/signal.h: NEW, header providing helper macros
1967         for implementing signal handlers,
1968         * device/include/pic16/stdio.h: added prototypes for functions,
1969         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1970         prototypes for stdin and stdout, added macro PUTCHAR to
1971         automatically implement putchar function prototype,
1972         * device/include/pic16/usart.h: modified and updated USART library,
1973         * device/lib/pic16/libio/adc/,
1974         * device/lib/pic16/libio/i2c: some modifications to improve library
1975         performance,
1976         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1977         family of functions,
1978         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1979         family of functions and other sources,
1980         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1981         of the PIC18Fxx[28] devices,
1982         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1983         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1984         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1985         _do_cinit function, because the previous failed when local variables
1986         where not placed in the same memory bank,
1987         * device/lib/pic16/libsdcc/char/: various modifications to improve
1988         library performance,
1989         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1990         information on the new functions of the c library and more...
1991
1992 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1993
1994         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1995
1996 2005-03-26 Raphael Neider <rneider AT web.de>
1997
1998         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1999           if condition == CARRY)
2000         * (genCmp): adapted to new genSkipc semantics
2001         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2002           on rIfx (genCmp was broken)
2003
2004 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2005
2006         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2007         * src/z80/main.c (_keywords[]),
2008         * src/SDCCglobal.h (struct options),
2009         * src/SDCC.y,
2010         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2011         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2012         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2013         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2014         always available in leading double underscore form. The C99 support is
2015         mostly missing, but it's a start.
2016         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2017         reserved identifier "__data".
2018
2019 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2020
2021         * src/mcs51/peeph.def: fixed bug 1170013
2022
2023 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2024
2025         * device/include/mcs51reg.h: fixed bug 842007
2026
2027 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2028
2029         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2030         last time.
2031
2032 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2033
2034         * src/port.h (struct PORT),
2035         * src/avr/ralloc.c (avr_assignRegisters),
2036         * src/avr/main.c,
2037         * src/ds390/ralloc.c (ds390_assignRegisters),
2038         * src/ds390/main.c,
2039         * src/hc08/ralloc.c (hc08_assignRegisters),
2040         * src/hc08/main.c,
2041         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2042         * src/mcs51/main.c,
2043         * src/pic/ralloc.c (pic14_assignRegisters),
2044         * src/pic/main.c,
2045         * src/pic16/ralloc.c (pic16_assignRegisters),
2046         * src/pic16/main.c,
2047         * src/xa51/ralloc.c (xa51_assignRegisters),
2048         * src/xa51/main.c,
2049         * src/z80/ralloc.c (z80_assignRegisters),
2050         * src/z80/ralloc.h,
2051         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2052         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2053         * src/SDCCcse.h,
2054         * src/SDCCdflow.c (computeDataFlow),
2055         * src/SDCCdflow.h,
2056         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2057         * src/SDCCloop.h,
2058         * src/SDCCcflow.c (*),
2059         * src/SDCCcflow.h,
2060         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2061         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2062         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2063         immedDom() returning wrong block; probably fixes bug #1160833)
2064
2065 2005-03-20 Borut Razem <borut.razem AT siol.net>
2066
2067         * support/scripts/inc2h.pl: WIN32 port
2068
2069 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2070
2071         * device/lib/makefile.in: added abs.c and labs.c
2072
2073 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2074
2075         * device/include/stdint.h: added
2076         * device/lib/abs.c: added
2077         * device/lib/labs.c: added
2078         * device/include/stdlib.h: added abs() and labs() prototypes
2079         * device/lib/libsdcc.lib: added abs and labs
2080         * device/include/float.h,
2081         * device/lib/_fsmul.c,
2082         * device/lib/printf_fast.c,
2083         * device/lib/printf_tiny.c: updated comments
2084
2085 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2086
2087         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2088         bug #1164313
2089
2090 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2091
2092         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2093         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2094
2095 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2096
2097         * device/lib/printf_large.c: removed inline assembly for portability and
2098           readability. Use printf_fast if speed or size are more important.
2099         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2100         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2101
2102 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2103
2104         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2105         prevent compiler warning
2106
2107 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2108
2109         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2110         moved to level 0 and declared as static. Also they are explicit
2111         placed in access bank. This was necessery because some times they
2112         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2113         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2114         optimizations. Currently only compare to unsigned char is implemented,
2115         * src/pic16/gen.c: added fReturnIdx array,
2116         * (struct resolvedIfx) is moved to gen.h and made public,
2117         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2118         * (aopForSym): added an optimization to directly store in stack of
2119         the operand of a SEND iCode,
2120         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2121         but as registers instead (AOP_REG) using the fReturnIdx array,
2122         * (pic16_freeAsmop): remove the freed register from the
2123         _G.sregsAlloc field,
2124         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2125         a compare of 'WREG',
2126         * (pic16_popGetTempRegCond): changed function prototype, now
2127         function takes also a bitVector argument v which holds the current
2128         set of registers that are allocated for stack access by aopForSym,
2129         registers allocated in aopForSym for accessing stack symbols are not
2130         any more part of the functions usedRegs field,
2131         * (genCall): some times aopOp is called for a stack variable to be
2132         send, aopForSym might perform the push, if this is true make sure
2133         that genCall doesn't push the variable twice by testing _G.resDirect,
2134         * (genFunction): changed testing for unspecified interrupt number
2135         from 256 to INTNO_UNSPEC,
2136         * modified selection scheme of frame pointer generation. Previously
2137         if function did use local registers a frame pointer was generated,
2138         now a frame pointer is generated only if function has arguments
2139         (that need PLUSW2 register access), or has stack arguments, or the
2140         compiler is not instructed to omit the frame pointer,
2141         * (genEndFunction): before restoring local registers that were saved
2142         in the function preamble, also restore the registers that *might*
2143         have been allocated for stack access,
2144         * (genRet): removed some old comments,
2145         * (genCmp, the active (RN's) version): added a call to the
2146         pic16_genCmp_special function to perform the compare with a more
2147         robust and optimized way,
2148         * (genInline): a feature has been added in inline code generation,
2149         which allows a wildcard variable substitution when writing inline
2150         assembly. Code is incomplete and experimental therefore undocumented,
2151         * (genCast): changed order of aopOp for result and right to allow
2152         aopForSym to directly load the result if possible,
2153         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2154         perform an optimized compare on some selected special occasions,
2155         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2156         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2157         generate an IVT any more,
2158         * src/pic16/main.c (pic16_optionsTable): added command line option
2159         --optimize-cmp,
2160         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2161         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2162         macros,
2163         * src/pic16/NOTES: Raphael Neider added in list of active developers
2164         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2165         jumptable_end to prevent bug #,
2166         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2167         inCond and outCond fields,
2168         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2169         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2170         turn off register spilling,
2171         * (packRegsForOneUse): synced with other ports' versions although it
2172         is not used currently,
2173         * (pic16_packRegisters): added an optimization while reading
2174         structure bitfields, some registers may be saved (malloc code is
2175         decreased by 80 bytes)
2176
2177 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2178
2179         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2180         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2181         this can be optimized more?
2182
2183 2005-03-10 Raphael Neider <rneider AT web.de>
2184
2185         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2186           genNearPointerGet): (hopefully) fixed access to bitfields via
2187           pointers (p->bitN = x; and x = p->bitN; failed)
2188
2189 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2190
2191         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2192
2193 2005-03-09 Raphael Neider <rneider AT web.de>
2194
2195         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2196
2197 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2198
2199         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2200         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2201           (regTypeNum): set REG_BIT type if necessary
2202         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2203         * support/regression/tests/critical.c: check bug 1144613
2204
2205 2005-03-02 Raphael Neider <rneider AT web.de>
2206
2207         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2208
2209 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2210
2211         * src/avr/ralloc.c (serialRegAssign),
2212         * src/ds390/ralloc.c (serialRegAssign),
2213         * src/hc08/ralloc.c (serialRegAssign),
2214         * src/mcs51/ralloc.c (serialRegAssign),
2215         * src/pic/ralloc.c (serialRegAssign),
2216         * src/pic16/ralloc.c (serialRegAssign),
2217         * src/xa51/ralloc.c (serialRegAssign),
2218         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2219
2220 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2221
2222         * src/SDCCast.c (decorateType): fixed bug 1124787
2223
2224 2005-02-20 Hubert Sack <sack AT digiplan.de>
2225         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2226
2227         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2228         patch #1121755
2229
2230 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2231
2232         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2233         to keep the correct label reference count when adding/removing references
2234         to labels. A peephole file using this is appended to patch #1144962.
2235
2236 2005-02-14 Raphael Neider <rneider AT web.de>
2237
2238         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2239         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2240         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2241           retrievals of result operand's value on assignment
2242
2243 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2244
2245         * device/include/pic16/string.h: modified prototype for memccpy()
2246         to memccpy(void *, void *, char, size_t)
2247         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2248         check whether to omit frame pointer or not,
2249         * (genInline): convert all occurences of "\n" to LF in inline
2250         assembler blocks, this helps formatting the inline text,
2251         * (pic16_loadFSR0): modified prototype,
2252         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2253         removed some 8051 legacy code,
2254         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2255         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2256         before allocating temporary registers in functions,
2257
2258 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2259
2260         * support/regression/tests/bitvars.c: corrected the "fix"
2261
2262 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2263
2264         * support/regression/tests/bitvars.c,
2265         * support/regression/tests/bitwise.c,
2266         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2267
2268 2005-02-10 Raphael Neider <rneider AT web.de>
2269
2270         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2271           different size for Alpha
2272         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2273
2274 2005-02-09 Raphael Neider <rneider AT web.de>
2275
2276         * src/SDCC.lex(doPragma) : save and restore warning options as well
2277           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2278         * have #pragma less_pedantic set the errorlevel to WARNING
2279           (fixes #1117001)
2280         * (cloneOptimize) : fixed wrong malloc's size
2281         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2282           facilitate correct handling of #pragma (save|restore)
2283
2284 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2285
2286         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2287
2288 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2289
2290         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2291
2292 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2293
2294         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2295
2296 2005-02-02 Raphael Neider <rneider AT web.de>
2297
2298         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2299         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2300         * (pic16_storeForReturn): fixed to allow returning function pointers
2301         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2302         * device/include/pic16/{stddef.h,stdbool.h}: added
2303
2304 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2305
2306         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2307
2308 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2309
2310         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2311         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2312          appeared to be required
2313
2314 2005-01-31 Borut Razem <borut.razem AT siol.net>
2315
2316         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2317           include/mcs51 and include/z80 directories to the package
2318
2319 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2320
2321         * src/hc08/gen.c (genFunction): fixed bug #1112752
2322
2323 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2324
2325         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2326
2327 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2328
2329         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2330
2331 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2332
2333         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2334
2335 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2336
2337         * device/include/c8051fxxx.h: removed these 6 files
2338         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2339
2340 2005-01-26 Raphael Neider <rneider AT web.de>
2341
2342         * src/pic16/gen.c (genAssign): fixed assignment from longs
2343           in codespace (were cut to three bytes)
2344         * (genDummyRead): implemented (except for CODESPACE...),
2345           fixed bug #1108575
2346         * src/pic16/glue.c (emitStatistics): beautified
2347         * device/lib/pic16/libm/Makefile: added include path
2348
2349 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2350
2351         * src/z80/gen.c (aopPut): fixed bug #1103902
2352
2353 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2354
2355         * device/lib/expf.c: fixed bug #1095792
2356
2357 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2358
2359         * device/lib/pic16/libm: added Math library sources
2360
2361 2005-01-24 Raphael Neider <rneider AT web.de>
2362
2363         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2364           to enable upcast to pCodeOpReg2 (there is no type tag to
2365           differenciate the two and pic16_popGet2p cast into PCOR2)
2366         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2367           (sizeof(sectNames) changed to sizeof(sectName))
2368           Both patches fix segfaults under MinGW.
2369
2370 2005-01-23 Raphael Neider <rneider AT web.de>
2371
2372         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2373           Safe_[mc]?alloc()'ed variables
2374         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2375           of (byte sized) temporaries (assign them to WREG for now)
2376         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2377           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2378           this might fix SIGSEGVs on MinGW...
2379         * src/SDCCopt.c (killDeadCode): restored original behaviour
2380           (volatile operands might get thrown away though)
2381
2382 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2383
2384         * src/pic16/gen.c: fixed bug #1106975,
2385         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2386         pointer update, INTCON is saved, global interrupts are disabled and
2387         restored after updateing TOS.
2388         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2389         * added function attribute 'shadowregs' to take advantage of shadow
2390         registers,
2391         * added function attribute 'wparam' as an alternative to the wparam
2392         pragma,
2393         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2394         user declares a non-ISR function as 'shadowregs',
2395         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2396
2397 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2398
2399         * .version: bumped version number to 2.4.8
2400         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2401         pic16 port,
2402         * device/lib/pic16/libio/i2c/: I2C module support library,
2403         * device/include/pic16/i2c.h: I2C support library header,
2404         * device/lib/pic16/libc/stdio/: standard IO support sources,
2405         * (printf_small.c): printf_small() source, supports float print,
2406         * (printf_tiny.c): printf_tiny() source, does not support floats,
2407         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2408         enable global optimizations for entire library source, other
2409         Makefiles in the source tree are also modified to reflect this,
2410         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2411         function,
2412         * doc/sdccman.lyx: updated to reflect new changes,
2413         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2414         sym->onStack if-case,
2415         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2416         sbit, idata, _idata, xdata, _xdata,
2417         * added pragma library, to link an external library, (see doc),
2418         * removed command line options, --pomit-config-words, --pomit-ivt,
2419         --pleave-reset-vector,
2420         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2421         when calling assembler to reflect memory model used, also define
2422         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2423         reflect stack model used,
2424         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2425         on stack return NULL,
2426
2427 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2428
2429         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2430           of the operands is volatile. Fixes #1020220
2431
2432 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2433
2434         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2435         * (OptimizeRegUsage): make sure that there is really no other flow where
2436           the first pCode is used
2437
2438 2005-01-22 Raphael Neider <rneider AT web.de>
2439
2440         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2441           to fix #1106967 (pCode->seq are not set up correctly)
2442
2443 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2444
2445         * src/SDCCglue.c (glue): make sure code area is declared before the
2446         static initialization area.
2447
2448 2005-01-21 Raphael Neider <rneider AT web.de>
2449
2450         * device/lib/Makefile.in: fixed test for pic16 install dir
2451         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2452           optimizations
2453         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2454           added --optimize-goto compiler switch and pragma wparam documentation
2455         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2456         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2457           and PRODH closing bug #1071770 (peephole optimizer)
2458
2459 2005-01-19 Raphael Neider <rneider AT web.de>
2460
2461         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2462           cmdLine buffers (used when calling sdcpp...) are large enough
2463           (MAX_PATH=256 truncates arguments leading to system halts when
2464           used in MinGW...)
2465         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2466         * (genUminus): rewritten to for efficiency
2467         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2468           used uninitialized in some cases)
2469         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2470           copy the third byte from the int -- now assumes 0x80 (data memory)
2471         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2472           operands (genAddLit expects the iCode's operands to swapped as
2473           well), fixed leftover bytes (crashed for short left operands)
2474         * (pic16_genMinusDec): performance improvements, removed false
2475           PIC14 emitSKPNCs
2476         * (pic16_genMinus): fixed to cope with differently sized operands
2477         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2478           for --obanksel > 1
2479         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2480         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2481           new banksel optimization
2482         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2483           analysis for temporary registers (segfaults...)
2484         * src/pic16/peeph.def: added rule
2485
2486 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2487
2488         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2489         which converts a float number to its ASCII representation
2490         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2491         functions to convert the fractional and integer part of a float to ASCII,
2492         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2493         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2494         ram
2495         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2496         _STATMEM macros,
2497         * device/include/pic16/adc.h: added GPL info,
2498         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2499         a pCodeOp as tested operand,
2500         * (genNearPointerGet): optimized bit testing, does not use
2501         intermediate register for bit value, test directly instead with
2502         BTFSS, BTFSC, works only for single bits,
2503         * (genpic16Code): dump the name of the iCode in the asm,
2504         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2505         renamed to pic16_decodeOp,
2506         * (serialRegAssign): do not allocate a temporary register for iCode
2507         sequences that test a single bit for 1/0
2508
2509 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2510
2511         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2512         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2513         access stack and frame pointers. They are initially assigned to
2514         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2515         accessing SFRs. Updated all occurences of modification of stack or
2516         frame pointer in gen.c and pcode.c,
2517         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2518         assigning of a literal value to pointers,
2519         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2520         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2521         selected
2522
2523 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2524
2525         * doc/sdccman.lyx: update documentation about stack pragma, added
2526         some info for stack memory models
2527
2528 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2529
2530         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2531
2532 2005-01-08 Raphael Neider <rneider AT web.de>
2533
2534         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2535           udata sections to fix bug #1097823
2536
2537 2005-01-05 Raphael Neider <rneider AT web.de>
2538
2539         * src/pic16/gen.c (genGenericShift): added handling of differently
2540           sized left operand and result
2541
2542 2005-01-04 Raphael Neider <rneider AT web.de>
2543
2544         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2545         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2546           to hold the condition bit)
2547         * added new version of genCmp (old code available via #define)
2548         * added new version of genShiftLeft/genShiftRight in a generic
2549           way, now supports shifting by negative values
2550         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2551           shiftCount (expected by genGenericShift)
2552         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2553         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2554           dump
2555         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2556           is an invalid literal too...)
2557
2558 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2559
2560         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2561         from Raphael Neider,
2562         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2563         for 8-bit literals. This fixes some literal operands which are sign
2564         extended to 16-bits ints when instruction needs only 8-bits.
2565
2566 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2567
2568         * device/lib/logf.c: added mcs51 assembly version
2569         * device/lib/expf.c: added mcs51 assembly version
2570         * device/lib/_logexpf.c: new shared asm code for expf and logf
2571         * device/include/math.h: add defines for assembly math library
2572         * device/lib/Makefile.in: build new _logexpf.c
2573         * device/lib/libfloat.lib: use new _logexpf.c
2574
2575 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2576
2577         * src/pic/device.c
2578         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2579           device types which have less than 0x7f registers.
2580
2581 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2582
2583         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2584
2585 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2586
2587         * device/lib/printf_fast.c: only build on supported arch.
2588         * device/lib/printf_tiny.c: only build on supported arch.
2589         * device/lib/printf_fast_f.c: only build if asm float lib
2590         * device/lib/_fsget1arg.c: only build if asm float lib
2591         * device/lib/_fsget2args.c: only build if asm float lib
2592         * device/lib/_fsnormalize.c: only build if asm float lib
2593         * device/lib/_fsreturnval.c: only build if asm float lib
2594         * device/lib/_fsrshift.c: only build if asm float lib
2595         * device/lib/_fsswapargs.c: only build if asm float lib
2596         * device/include/stdio.h: don't provide print_fast,
2597           print_fast_f, print_tiny prototypes if --xstack used
2598
2599 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2600
2601         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2602         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2603           to the SOURCES
2604
2605 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2606
2607         * device/lib/printf_fast_f.c: same as printf_fast, but
2608           with floating point enabled
2609         * device/lib/printf_fast.c: minor tweaks
2610         * device/include/stdio.h: add printf_fast_f
2611
2612 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2613
2614         * src/SDCCmain.c: make --float-reent default for mcs51
2615         * device/lib/_fsadd.c: added mcs51 assembly version
2616         * device/lib/_fssub.c: added mcs51 assembly version
2617         * device/lib/_fsmul.c: added mcs51 assembly version
2618         * device/lib/_fsdiv.c: added mcs51 assembly version
2619         * device/lib/_fseq.c: added mcs51 assembly version
2620         * device/lib/_fsneq.c: added mcs51 assembly version
2621         * device/lib/_fsgt.c: added mcs51 assembly version
2622         * device/lib/_fslt.c: added mcs51 assembly version
2623         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2624         * device/lib/Makefile.in: add _fscmp to build
2625         * device/lib/libfloat.lib: add _fscmp to build
2626
2627 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2628
2629         * device/lib/_fs2slong.c: added mcs51 assembly version
2630         * device/lib/_fs2sint.c: added mcs51 assembly version
2631         * device/lib/_fs2schar.c: added mcs51 assembly version
2632         * device/lib/_fs2ulong.c: added mcs51 assembly version
2633         * device/lib/_fs2uint.c: added mcs51 assembly version
2634         * device/lib/_fs2uchar.c: added mcs51 assembly version
2635         * device/lib/_slong2fs.c: added mcs51 assembly version
2636         * device/lib/_sint2fs.c: added mcs51 assembly version
2637         * device/lib/_schar2fs.c: added mcs51 assembly version
2638         * device/lib/_ulong2fs.c: added mcs51 assembly version
2639         * device/lib/_uint2fs.c: added mcs51 assembly version
2640         * device/lib/_uchar2fs.c: added mcs51 assembly version
2641         * device/include/float.h: added #define to select asm vs c
2642
2643 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2644
2645         * device/lib/printf_fast.c: improvements to float output
2646         * device/include/float.h: add defines for assembly float library
2647         * device/lib/_fsget1arg.c: receive 1 float arg
2648         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2649         * device/lib/_fsnormalize.c: normalize a float
2650         * device/lib/_fsreturnval.c: return float, various helper routines
2651         * device/lib/_fsrshift.c: right shift a float's mantissa
2652         * device/lib/_fsswapargs.c: swap 2 floats
2653         * device/lib/Makefile.in: build these 6 new files for mcs51
2654         * device/lib/libfloat.lib: add these 6 files to the library
2655
2656 2004-12-26 Borut Razem <borut.razem AT siol.net>
2657
2658         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2659           built by gcc 3.4.2
2660
2661 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2662
2663         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2664           and fully reentrant and register bank neutral.
2665         * device/lib/printf_fast.c: added float (not enabled by default),
2666           added compact/slower integer (also not enabled by default),
2667           improved size/speed of fast integer code, other minor changes
2668         * device/include/stdio.h, device/lib/Makefile.in,
2669           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2670
2671 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2672
2673         * src/pic16/pcode.c: declaring variables other than at the start of a
2674           block is not supported in C by VC6.
2675
2676 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2677
2678         * applied a previous patch from Raphael Neider that wasn't included
2679         in the previous commits, which fixes infinite loops within jumptable
2680         improvements,
2681         * made some fixes that previous patches introduced
2682
2683 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2684
2685         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2686         that fixes an issue with AOP_PCODE asmop's offset,
2687         * (pic16_popCopyReg): update instance field too,
2688         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2689         function of pic port,
2690         * (genCmp, genAnd, genAssign),
2691         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2692
2693 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2694
2695         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2696         variables initial values to idata section,
2697         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2698         variables in some functions. This utilizes parmBytes field of iCode
2699         structure to hold the offset of the variable in stack. (might be
2700         able to use the stack field too?)
2701         * applied patch from Raphael Neider # ### , # ###
2702         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2703         variable initial values in idata section,
2704         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2705         for static variables with initial value
2706         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2707         applied fix in while loop from Raphael Neider.
2708
2709 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2710
2711         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2712         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2713         * src/ds390/ralloc.c (serialRegAssign): spill bits
2714         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2715         * support/Util/SDCCerr.c,
2716         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2717         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2718         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2719
2720 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2721
2722         * device/include/sdcc-lib.h: inserted LGPL, added includes
2723           asm/ds390/features.h and asm/mcs51/features.h
2724         * device/include/asm/default/features.h,
2725         * device/include/asm/gbz80/features.h,
2726         * device/include/asm/z80/features.h: added empty _AUTOMEM
2727           and _STATMEM
2728         * device/include/asm/ds390/features.h,
2729         * device/include/asm/mcs51/features.h: added files with defines for
2730           _AUTOMEM and _STATMEM indicating automatic and static storage class
2731         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2732         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2733         * src/SDCCicode.c (geniCodeCast),
2734         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2735         * src/SDCCloop.c (loopInduction): removed unused variable lr
2736         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2737           to convertToFcall to include char modulo (RFE 1065037), added check
2738           if left operand is unsigned and use abs of literal value
2739         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2740           as it doesn't work after conversion from peephole.def to peephole.rul
2741         * src/mcs51/gen.c (toBoolean): added check for size,
2742           (genModOneByte): optimized code for signed char modulo a literal
2743           power of 2 (thanks to Hubert Sack),
2744           (genRRC): removed unnecessary "clr c",
2745           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2746         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2747           jump optimization,
2748           swapped rules 256.c and 256.d,
2749           extended 256.d by using new multiple checks (thanks Erik),
2750           added rules 256.e and 256.f,
2751           updated rule 261.a and 261.b to new generated code
2752         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2753
2754 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2755
2756         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2757           induction related bugs, including first part of bug #1074377
2758
2759 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2760
2761         * applied patch from bug-report #1076292,
2762         * applied patches for genAnd and Goto-optimizations for Raphael
2763         Neider,
2764         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2765         dump a less iCode information,
2766         * src/pic16/device.h (pic16_options_t): added field debgen,
2767         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2768         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2769         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2770         puclic,
2771         * (various functions): added macros FENTRY and FENTRY2 to functions,
2772         to emit function prologue,
2773         * (various functions): fixed indentation,
2774         * (genNearPointerGet): fixed loading of FSR0,
2775         * (genPackBits): applied patch from Raphael Neider to fix updating
2776         of FSR0 and touching only the modified bits,
2777         * src/pic16/genarith.c (various functions): added macros FENTRY to
2778         emit function prologue in comments,
2779         * src/pic16/pcode.h: added functions debugf2, debugf3,
2780         * src/pic16/ralloc.c: partial fix for packForPush caused
2781         segmentation fault,
2782
2783 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2784
2785         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2786           <stsp AT users.sourceforge.net> with reversed byte order
2787         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2788
2789 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2790
2791         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2792           bug #1074377
2793         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2794         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2795
2796 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2797
2798         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2799
2800 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2801
2802         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2803           conditions,
2804           (setFromConditionArgs): friendly operand parser for peephole rules,
2805           (operandBaseName, operandsNotRelated): new peephole condition
2806           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2807           architecture specific register naming into account, handles n-way
2808           comparisons, and supports quoted literals
2809         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2810
2811 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2812
2813         * src/mcs51/peeph.def: fixed bug #1076940
2814
2815 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2816
2817         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2818
2819 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2820
2821         Adding support for replacing ljmps with sjmps in jumptables
2822         generated for switch statements. For now you need to set the
2823         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2824         Now 4 algorithms for mcs51 jumptable generation are used:
2825         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2826         addresses loaded pc-relative for up to 112 cases and stack-pushing
2827         target addresses loaded with offset from dptr for up to 256 cases.
2828
2829         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2830         * src/mcs51/main.c: adapted constants for switch table generation
2831         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2832
2833 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2834
2835         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2836         * support/regression/tests/bug1057979.c: added test for bug 1073386
2837
2838 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2839
2840         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2841         compilers
2842
2843 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2844
2845         * src/pic16/device.h,
2846         * src/pic16/genarith.c,
2847         * src/pic16/glue.c,
2848         * src/pic16/main.c,
2849         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2850
2851 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2852
2853         Large cummulative patch for pic16 port.
2854         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2855         to call when a stack overflow occurs,
2856         * (malloc.h): added CVS Id tag,
2857         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2858         variable,
2859         * added libc directory. The current version of LibC contains string
2860         functions, ctype functions and macros and some functions of the
2861         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2862         be extensively tested in the future. Standard disclaimer here.
2863         Library is not automatically build yet. But one can build it by
2864         invoking 'make' inside the libc directory.
2865         * added ADC library under libio. Preliminary version yet.
2866
2867         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2868         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2869         aopForRemat() now and not by pic16_aopOp(),
2870         * (pic16_popGetTempReg): removed warning messgae when allocating
2871         temporary registers, its a buggy feature and will be removed,
2872         * (pic16_popGet): set register instance field in AOP_CRY,
2873         * (pic16_outBitC): fixed for results in size greater than 1,
2874         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2875         * (pic16_storeForReturn): optimized return of 0,
2876         * (genCmp): experimental code for new genCmp which uses PIC18's
2877         special compare&skip instructions. Initial tests fail some times
2878         with variables grater than 1 byte in size, so new code is disabled,
2879         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2880         a single bit,
2881         * (genCast): began a fix to optimize the casting of a bit to another
2882         bit, now assigning a bitfield to another bitfield will fail, sorry,
2883         * src/pic16/main.c: disabled the use of lr-support feature,
2884         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2885         * added some function prototypes, added function _debugf prototype,
2886         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2887         bits with offset (case PO_GPR_BIT),
2888         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2889         command line,
2890         * (isBankInstruction): modified to return 0 for no banking instruction,
2891         and 1 for banking instruction,
2892         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2893         caused stop processing pCodes after a inline assembly block,
2894         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2895         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2896         registers when it shouldn't,
2897         * src/pic16/ralloc.c (allocReg): add preliminary support for
2898         supporting a limited set of temporary registers,
2899
2900 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2901
2902         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2903           genDataPointerSet): ensure assignments always copy in MSB to LSB
2904           order,
2905           (loadRegFromAop): recognize CLRH optimization,
2906           (genFunction): optimize RECEIVE iCodes in reentrant functions
2907
2908 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2909
2910         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2911           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2912           selected.
2913         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2914         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2915           contiguous with data
2916
2917 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2918
2919         * device/lib/_gptrget.c (_gptrget),
2920         * device/lib/_gptrgetc.c (_gptrgetc),
2921         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2922           instead of sjmp to ret
2923         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2924           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2925
2926 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2927
2928         * .version: bumped version to 2.4.7
2929         * device/lib/_gptrget.c (_gptrget): is now _naked
2930         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2931         * device/lib/_gptrput.c (_gptrput): is now _naked
2932         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2933           (createFunction): fixed xstack
2934         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2935         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2936           or bit either,
2937           (geniCodeCritical): store original interrupt state in an iTemp bit
2938           var unless stack-auto
2939         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2940         * src/SDCCmain.c (setIncludePath): added include/target to search path
2941         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2942         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2943           prototype,
2944           (processFuncArgs): put bit vars in bit area
2945         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2946           unsaveRBank): fixed xstack,
2947           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2948           (genFunction, genEndFunction): fixed xstack,
2949           (genAssign): optimization don't walk backwards through mem
2950         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2951         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2952         * support/regression/Makefile: also make library (for stack-auto) when
2953           making "all" and added "test-mcs51-xstack-auto"
2954         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2955         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2956         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2957         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2958         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2959           make-library by MAKE_LIBRARY
2960         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2961           regression tests for xstack
2962         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2963         * support/regression/tests/critical.c: test for critical on mcs51
2964
2965 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2966
2967         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2968           built version of sdcc instead of installed version
2969
2970 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2971
2972         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2973         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2974           vprintf.c now
2975         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2976         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2977           WARNING: remove device/lib/build/z80/printf.o by hand when
2978           updating from previous build!
2979         * device/lib/z80/printf.c: updated comment
2980         * support/regression/tests/bug1057979.c: test all ports now
2981         * support/regression/tests/bug1065458.c: file added
2982
2983 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2984
2985         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2986           *_start and *_end symbols for static functions
2987
2988 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2989
2990         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2991           and search crt0.o in all library paths,
2992           (setIncludePath): proper handling of --nostdinc,
2993           (setLibPath): proper handling of --nostdlib
2994         * support/regression/Makefile,
2995         * support/regression/ports/ds390/spec.mk,
2996         * support/regression/ports/gbz80/spec.mk,
2997         * support/regression/ports/hc08/spec.mk,
2998         * support/regression/ports/mcs51/spec.mk,
2999         * support/regression/ports/mcs51-large/spec.mk,
3000         * support/regression/ports/mcs51-stack-auto/spec.mk,
3001         * support/regression/ports/z80/spec.mk: use include and lib files from
3002           built version of sdcc instead of installed version
3003         * doc/sdccman.lyx: fixed typo in --nostdinc
3004
3005 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3006
3007         * src/pic/pcode.c,
3008         * src/pic/device.c,
3009         * src/pic/ralloc.c,
3010         * src/pic/gen.c : added support to generate code for struct bit fields.
3011
3012 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3013
3014         * as/xa51/xa_version.h,
3015         * device/include/errno.h,
3016         * device/include/regc515c.h,
3017         * device/lib/_itoa.c,
3018         * device/lib/_ltoa.c,
3019         * device/lib/ser_ir_cts_rts.c,
3020         * sim/ucsim/xa.src/glob.cc,
3021         * sim/ucsim/xa.src/inst_gen.cc,
3022         * sim/ucsim/xa.src/xa_bit.cc,
3023         * sim/ucsim/xa.src/xa_sfr.cc,
3024         * sim/ucsim/z80.src/inst_dd.cc,
3025         * sim/ucsim/z80.src/inst_fdcb.cc,
3026         * support/scripts/keil2sdcc.pl,
3027         * src/pic16/pic16.dsp,
3028         * src/pic16/pic16a.dsp: corrected cvs line endings
3029         * device/lib/printf_large.c: fixed bug 1057979
3030         * src/pic16/gen.c: fixed non-C standard code
3031         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3032         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3033         * support/regression/ports/mcs51/support.c: reload T1 asap
3034         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3035           pdata use and clear idata startup behaviour
3036         * support/regression/tests/bug1057979.c: added
3037
3038 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3039
3040         * device/examples/ds390/ow390/ad26.h,
3041         * device/examples/ds390/ow390/cnt1d.h,
3042         * device/examples/ds390/ow390/crcutil.c,
3043         * device/examples/ds390/ow390/ownet.h,
3044         * device/examples/ds390/ow390/owsesu.c,
3045         * device/examples/ds390/ow390/swt12.h,
3046         * device/examples/ds390/ow390/swtoper.c,
3047         * device/examples/ds390/ow390/temp10.h,
3048         * device/examples/ds390/ow390/thermodl.c,
3049         * device/examples/ds390/tinitalk/tinitalk.dsp,
3050         * device/examples/ds390/tinitalk/tinitalk.dsw,
3051         * device/examples/mcs51/clock/hw.h,
3052         * device/examples/mcs51/simple2/go.bat,
3053         * device/examples/serialcomm/windows/serial.h,
3054         * device/examples/xa51/dummy.c,
3055         * device/examples/xa51/hello.c,
3056         * device/include/80c51xa.h,
3057         * device/include/at89x051.h: corrected cvs line endings
3058
3059 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3060
3061         * src/pic16/main.c (options): added command line --gstack, to trace
3062         stack over/under flows,
3063         * added pragma 'wparam' to allow passing first byte of function
3064         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3065         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3066         call to __gstack_test function and sets up the symbol as extern,
3067         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3068         * popaop): added call to pic16_testStackOverflow,
3069         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3070         wparamList list,
3071         * (genCall, genPcall): now all parameters are passed via stack
3072         except in functions that are pass to wparam pragma in which WREG is
3073         used too,
3074         * (genPcall): REENTRANT flag is checked to see if variable prototype
3075         contains reentrant keyword, don't call a non-reentrant function, via
3076         a reentrant function pointer or vice versa, functions are never
3077         passed via WREG,
3078         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3079         D.Winkler,
3080         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3081         SIGSEGV when accessing a NULL register stucture,
3082         * (pic16_printGPointerType): modified to handle UPPER modifier for
3083         function initializers, changed prototype of function to simpler one,
3084         * (pic16_printIvalFuncPtr): check to see if function is already
3085         added in externs list,
3086         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3087         optimized a move from W to SFR with a move to the same register
3088         later after a CALL,
3089         * device/lib/pic16/debug: NEW directory, contains debug features
3090         which are enabled when linking with libdebug.lib, currently command
3091         line option --gstack enables stack pointer tracing for over/under
3092         flow, corresponding sources are in debug/gstack
3093
3094 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3095
3096         * doc/sdccman.lyx: updated SDCC version,
3097         * (PIC16 port): update list of command line options,
3098         * src/pic16/device.h (structure pic16_options_t): added field gstack
3099         to enable stack overflow tracing on push/pops,
3100         * src/pic16/device.c (statistics structure): added statistics
3101         structure,
3102         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3103         pic16_dump_int_registers): increase statistics counters for each
3104         * variable which is encountered
3105         * (pic16_dump_usection): emit each .udata variable to its own udata
3106         section,
3107         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3108         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3109         parameters via stack, otherwise use old scheme,
3110         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3111         assembler output file,
3112         * src/pic16/main.c: added command line options --gstack to enable
3113         push/pop tracing for stack overflow,
3114         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3115         instructions): added size of each instruction,
3116         * (pic16_countInstruction): estimate size of instructions in
3117         the_pFile list, inline assembly blocks are not counted,
3118         * (pic16_FixRegisterBanking): trace previous register usage, when
3119         banksel optimizations is greater than 0, don't emit a redudant
3120         banksel directive,
3121
3122 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3123
3124         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3125         * src/pic16/ralloc.c : applied same fix for pic16.
3126         * src/pic/gen.c : tidied it up a little.
3127
3128 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3129
3130         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3131         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3132
3133 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3134
3135         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3136
3137 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3138
3139         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3140         non-reentrant function __modsint in the interrupt function (thus
3141         corrupting math operations during serial I/O)
3142         * device/lib/ser_ir.c: as above, changed buffersize
3143         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3144         256.c,d for zeroing
3145         * doc/Makefile: added option -t for rsync
3146
3147 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3148
3149         * src/SDCCast.h (struct ast),
3150         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3151
3152 2004-10-20 Borut Razem <borut.razem AT siol.net>
3153
3154         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3155         package
3156
3157 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3158
3159         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3160         makefile targets,
3161         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3162         support functions to replace long sequences of MOVFF's from access
3163         bank registers to stack and vice versa,
3164         * src/pic16/device.h: added new field opt_flags, where optimization
3165         flags can be set to enable certain features,
3166         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3167         * pBlock, (genFunction, genEndFunction): surroung loop for
3168         saving/loading used registers in stack with PC_INFO pCodes,
3169         INF_LREGS. Code in between can then be optimized by pCode optimizer
3170         to support function calls,
3171         * (genDataPointerSet): fixed bug which loaded float fields in
3172         structures with corrupt data,
3173         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3174         in a standard way debug info on stderr. Feature used for developing
3175         and debugging only,
3176         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3177         obsolete chunks of code,
3178         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3179         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3180         * pic16/src/pcode.c (pic16_newpCodeInfo,
3181         * (pic16_newpCodeOpLocalRegs),
3182         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3183         feature,
3184         * (pic16_pCodeConstString): printing of the initial value of a
3185         symbol as a comment is inhibited since parsing was already done by
3186         copyStr and output is corrupt,
3187         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3188
3189 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3190
3191         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3192
3193 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3194
3195         * as/mcs51/lkarea.c: removed old K&R style,
3196           (lnksect): changed check on boundary error,
3197           (lnksect2): changed check on boundary error,
3198           (lnksect2): extend XSTK to end of page if size = 1
3199         * as/mcs51/lkmain.c: removed old K&R style,
3200           (Areas51): create l_IRAM symbol
3201         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3202         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3203           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3204         * device/lib/_mullong.c: added version to be compiled with xstack
3205         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3206         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3207         * device/lib/mcs51/crtxstack.asm: fixed comment
3208         * src/SDCCglue.c: maxInterrupts defaults to 0,
3209           (emitMaps): added pdata,
3210           (createInterruptVect): (re)moved default,
3211           (glue): added pdata,
3212           (glue): moved __start__xstack to XSTK with default size 1
3213         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3214           and options.float_rent when options.stackAuto is set,
3215           (linkEdit): only write XDATA_NAME if provided on command line
3216         * src/SDCCmem.h,
3217         * src/SDCCmem.c: added pdata
3218         * src/port.h: added pdata_name to PORT
3219         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3220           (saveRegisters, unsaveRegisters): removed usage of B,
3221           (genMinus): fixed accumulator clash,
3222           (genJumpTab): added comment, this needs another look
3223         * src/mcs51/gen.c: added check for "B in use" paranoia,
3224           added pushB() and popB()
3225         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3226           chance
3227         * src/avr/main.c,
3228         * src/ds390/main.c,
3229         * src/hc08/main.c,
3230         * src/mcs51/main.c,
3231         * src/pic/main.c,
3232         * src/pic16/main.c,
3233         * src/xa51/main.c,
3234         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3235           added PSEG (PAG,XDATA) or NULL to port specifier
3236         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3237         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3238           (_mcs51_genInitStartup): removed __start__xstack equ,
3239           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3240         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3241         * src/z80/gen.c (_rleAppend): fixed warnings
3242         * support/regression/tests/zeropad.c: added pdata test
3243         * .version: bumped to 2.4.6
3244
3245 2004-10-17 Borut Razem <borut.razem AT siol.net>
3246
3247         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3248         as a part of nightly build
3249
3250 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3251
3252         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3253         WREG holds the first byte function parameters,
3254         * (aopForSym): take special case for symbols which are in FARSPACE
3255         but in CODESPACE too,
3256         * (assignResultValue): modified to take into account _G.useWreg,
3257         * (genCall): don't use wreg for parameter passing when function is
3258         declared as reentrant, too, added optimization INCF to stack
3259         pointer when stack parameter count is 1,
3260         * (genFunction, genEndFunction): refurnished and fixed to not using
3261         wreg for passing parameters when function has varargs or is
3262         reentrant, fixed bug with symbol name compare for generating
3263         functions in absolute address,
3264         * (pic16_storeForReturn): refurnished,
3265         * (genCmp): began writing a new version of the function, not ready
3266         yet, therefore it is disabled,
3267         * (genAssign): do not read code memory when assigning a function to
3268         a pointer function,
3269         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3270         array of characters, not pointer,
3271         * (pic16initialComments): in debug mode emit an .ident directive for
3272         the assembler,
3273         * (_process_pragma): emit a new warning type (internal to pic16)
3274         when setting stack to default length, emit a similar warning when
3275         placing a function at absolute address and address is not word aligned
3276         * (_pic16_parseOptions): added 'return TRUE' statement,
3277         * (_pic16_linkEdit): if compiling a source, then add the source's
3278         file object, first in the list of objects to link,
3279
3280 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3281
3282         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3283         * src/pic/main.c : removed VC warning.
3284         * src/pic/gen.c : changed comment.
3285
3286 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3287
3288         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3289         reference to a deprecated symbol _GPTRREG was causing failure to
3290         link. Thanks G. M. Gallant for the info.
3291
3292 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3293
3294         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3295         comments for Bugs item #954788.
3296
3297 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3298
3299         * src/pic16/device.c (pic16_dump_gsection,
3300         * pic16_groupRegistersInSection): handle symbols declared to be in
3301         access bank differently,
3302         * src/pic16/gen.c (struct _G): added field resDirect,
3303         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3304         send values read from stack directly to result and don't allocate
3305         temporary values,
3306         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3307         same registers,
3308         * (pic16_sameRegsOfs): NEW,
3309         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3310         free because they were not allocated from temporary pool,
3311         * pic16_popRegFromString): workaround to fix a problem with
3312         allocating variables twice or never,
3313         * (genGenPointerGet): using PRODL instead of FSR0H,
3314         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3315         instead of FSR0H,
3316         * (genAssign): take advantage of the _G.resDirect flag,
3317         * (genCast): around line 11844, use mov2f instead of directly
3318         MOVFF'ing between operands to account for literal values,
3319         * src/pic16/genutils.c: some new debug functions for gpsim have been
3320         added,
3321         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3322         float with integer part only,
3323         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3324         place variables in access bank
3325         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3326         updated sources to reflect recent changes in gen.c
3327
3328 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3329
3330         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3331         sources that searched for headers in installation path, now the
3332         device/include/pic16 is used,
3333         * src/pic16/glue.c (pic16glue),
3334         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3335         .line directives if not in debug mode, this suppresses assembler's
3336         warnings for ignored directives
3337
3338 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3339
3340         * src/port.h: made reset_regparms prototype void parameter explicit.
3341         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3342         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3343         * doc/sdccman.lyx: documented warning disabling and how to use
3344           printf_large to make it print floats.
3345         * device/include/stdbool.h: NEW
3346         * device/lib/_atof.c,
3347         * device/lib/_divuint.c,
3348         * device/lib/_divulong.c,
3349         * device/lib/expf.c,
3350         * device/lib/printf_large.c,
3351         * device/lib/sincosf.c,
3352         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3353         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3354           a completely reentrant lib.
3355
3356 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3357
3358         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3359         * device/include/pic16/stdio.h: fixed bug with colon
3360
3361 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3362
3363         * device/include/pic16/stdio.h,
3364         * device/include/pic16/stdlib.h,
3365         * device/include/pic16/math.h: NEW
3366         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3367         declared as _naked to reduce overhead
3368         * device/lib/Makefile.in (target port-specific-objects-pic16):
3369         changed * to *.* so to ignore the CVS directory,
3370         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3371         stacked variables back in stack,
3372         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3373         corruption
3374
3375 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3376
3377         * .version: bumped version number to 2.4.5
3378         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3379         * support/Util/SDCCerr.c (messages structure): added entry for
3380         W_POSSBUG2
3381
3382         Large cumulative patch for pic16 port and libraries.
3383         * device/include/pic16/sdcc-lib.h,
3384         * device/include/pic16/stdarg.h,
3385         * device/include/asm/pic16/features.h,
3386         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3387         * device/include/pic16/float.h: changes reentrant keyword with
3388         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3389         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3390         updated target build-libraries to include objects from gptr,
3391         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3392         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3393         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3394         all function headings,
3395         * src/SDCCmain.c: added global parameter userIncDirsSet,
3396         * (parseCmdLine): when option -I is encountered add directory to
3397         userIncDirsSet too,
3398         * src/version.awk: added space between control and long,
3399         * src/pic16/NOTES: added some notes for the port,
3400         * src/pic16/gen.c: added prototype for mov2fp function,
3401         * (fReturnpic16[]): properly named return value registers,
3402         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3403         * (aopForSym): added code to handle symbols with onStack flag set,
3404         symbols onStack are allocated PTRSIZE bytes,
3405         * (aopFreeAsmop): handles special case where asmops are stack objects,
3406         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3407         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3408         added argument lock to trace flaws in allocating temporary registers
3409         when developing port,
3410         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3411         * (pic16_popRegFromString): reenabled allocating a direct register
3412         from string,
3413         * (assignResultValue): various beautifications,
3414         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3415         referenced function argument,
3416         * (genIpush): reenabled to allow stacked arguments, handles only
3417         ic->parmPush iCodes,
3418         * (genCall, genPcall): major changes to allow for variable argument
3419         functions, fixed a bug with falsely restoring stack pointer after
3420         returning from call,
3421         * (genFunction): pending code for critical function,
3422         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3423         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3424         * (genNearPointerGet): fixed bug with indirect reading, was always
3425         reading from INDF0
3426         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3427         pointers,
3428         * (genAddrOf): rewrote code to take address of a stacked function parameter
3429         * (genCast): fixed casting to generic pointer type,
3430         * src/pic16/gen.h: added AOP_STA,
3431         * (struct asmop): added field stk,
3432         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3433         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3434         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3435         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3436         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3437         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3438         generic pointers,
3439         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3440         and library paths,
3441         * (pic16_port structure): generic pointer size is set to 3,
3442         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3443         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3444         compiler warning,
3445         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3446         operand is an iTemp,
3447
3448 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3449
3450         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3451         * debugger/mcs51/simi.c: addapt new syntax of s51
3452
3453 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3454
3455         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3456         * src/pic16/pcode.c: commented out some calls to free() in order to
3457         fix bug #989576,
3458
3459 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3460
3461         * src/SDCCicode.h,
3462         * src/SDCCicode.c (isiCodeInFunctionCall),
3463         * src/avr/ralloc.c (selectSpil),
3464         * src/pic/ralloc.c (selectSpil),
3465         * src/pic16/ralloc.c (selectSpil),
3466         * src/ds390/ralloc.c (selectSpil),
3467         * src/hc08/ralloc.c (selectSpil),
3468         * src/xa51/ralloc.c (selectSpil),
3469         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3470         stack in the middle of a function call sequence (fixes bug #1020268)
3471         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3472         costs associated with the minimum switch case.
3473
3474 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3475
3476         * src/SDCC.lex: fixed bug #1030549
3477
3478 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3479
3480         * src/SDCCcse.h (struct cseDef),
3481         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3482         over a function call if the CSE is derived from a symbol whose
3483         address has been taken (fixes bug #1029883)
3484         * support/regression/tests/bug-1029883: a new regression test for
3485         this bug
3486
3487 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3488
3489         * src/hc08/gen.c (emitinline): fixed bug #1029778
3490         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3491         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3492         and starts toward RFE #905167)
3493
3494 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3495
3496         * src/pic16/gen.c (mov2f): New function to move an operand to
3497         another without considering if it is a literal or a register,
3498         * (pic16_sameRegs): don't check if they are both AOP_REG,
3499         * (AccRsh): removed andmask=0 lines,
3500         * (genLeftShift): duplicated to be improved in future versions,
3501         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3502         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3503         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3504         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3505         * (insertBankSwitch): fixed inserting banksel directives algorithm
3506         for instructions that follow a skip instruction, this fixes a report
3507         for broken subtraction code generation,
3508         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3509         iCode is a left op, just in case result and right share the same
3510         registers
3511
3512 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3513
3514         * src/hc08/main.c,
3515         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3516         preservation of HX
3517         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3518         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3519         on 2004-09-12; it was buggy
3520
3521 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3522
3523         * src/SDCCsymt.h: removed RESULT_CHECK
3524         * src/SDCCast.c,
3525         * src/SDCCglue.c,
3526         * src/SDCCval.c,
3527         * src/pic/glue.c,
3528         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3529
3530 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3531
3532         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3533         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3534         configuration values no more rejected by compiler, they are assigned
3535         to configuration registers with a warning message instead,
3536         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3537         the for-loop so last conf register is emitted too,
3538         * (_pic16_initPaths): link library libsdcc.lib by default,
3539         * (_hasNativeMulFor): modified test for multiplication according to
3540         Raphael Neider's remarks. Integer multiplication is also done with
3541         support functions,
3542         * device/include/pic16/pic18fregs.h: corrected type error in while
3543         testing and including 18f6720 header file
3544
3545 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3546
3547         * src/pic16/device.h (pic16_options): removed field use_crt,
3548         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3549         until an optimization to handle single bits is added,
3550         * (pic16_loadFSR0): moved before genUnpackBits,
3551         * (genAnd): some white lines removed,
3552         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3553         leave_reset flags in pic16_options when using crt modules,
3554
3555 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3556
3557         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3558           for bugs 898889 & 979599. Also used some safer print instructions.
3559
3560 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3561
3562         * src/pic16/device.h (pic16_options_t): added field use_crt,
3563         crt_name, no_crt,
3564         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3565         catch a probable future bug,
3566         * src/pic16/gen.c: aopIdx function commented out,
3567         * (genAssign): commented out old code which used aopIdx,
3568         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3569         code, added if conditionals to take into account the --use-crt
3570         command line options,
3571         * src/pic16/main.c (pic16_optionsTable): added new command line
3572         options, --use-crt= and --no-crt,
3573         * (_pic16_linkEdit): now the proper crt object is added in the
3574         linker command line except than when --no-crt is specified,
3575         * src/pic16/pcode.c,
3576         * src/pic16/pcode.h: added some structures and functions for a new
3577         optimization scheme to compansate for instruction overhead between
3578         same iCodes, this scheme is currently under development and is not
3579         working in any way,
3580         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3581         to && operator,
3582         * device/lib/pic16/startup/crt0i.c,
3583         * device/lib/pic16/startup/crt0iz.c: added global char variable
3584         __uflags to force the generation of an idata section
3585
3586 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3587
3588         * doc/Makefile,
3589         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3590         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3591
3592 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3593
3594         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3595         Frieder) and clarified the default code optimization mode
3596
3597 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3598
3599         * src/SDCC.lex (doPragma, process_pragma),
3600         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3601         "opt_code_size", and "opt_code_balanced"
3602         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3603         regrouped options by category, added support for category headers
3604         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3605         and "--opt-code-size"
3606         * doc/sdccman.lyx: documented these new options and pragmas
3607         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3608         preference into account
3609
3610 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3611
3612         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3613           geniCodePreDec): Fixed bug 904237 by generating a warning
3614         * src/SDCCerr.h,
3615         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3616
3617 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3618
3619         * src/pic/device.c : When no max ram set validate full memory range.
3620         * src/pic/pcode.c,
3621         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3622
3623 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3624
3625         * device/lib/_gptrget.c,
3626         * device/lib/_gptrput.c: updated comment
3627         * device/lib/calloc.c,
3628         * device/lib/free.c,
3629         * device/lib/malloc.c,
3630         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3631         * src/SDCCcse.c (cseBBlock),
3632         * src/SDCCicode.c (printOperand, geniCodeArray),
3633         * src/SDCCicode.h (struct operand): fixed bug 868103
3634         * support/regression/tests/bug-868103.c: added
3635         * src/SDCCast.c (searchLitOp),
3636         * src/SDCCcse.h (struct cseDef),
3637         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3638         * src/SDCCicode.h (struct operand),
3639         * src/SDCCsymt.h (struct sym_link),
3640         * src/avr/gen.c (hasInc),
3641         * src/ds390/gen.c (hasInc),
3642         * src/hc08/gen.c (genPlusIncr, hasInc),
3643         * src/mcs51/gen.c (hasInc),
3644         * src/pic16/glue.c (pic16_printIvalChar),
3645         * src/pic16/ralloc.c (regWithIdx),
3646         * src/xa51/gen.c (hasInc) : removed warnings
3647         * src/SDCCast.c (createBlock): added comment ???
3648         * src/hc08/ralloc.c: updated comments
3649
3650 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3651
3652         * doc/sdccman.lyx: updated section on switch statements, added
3653         section about semaphore locking
3654         * doc/Makefile: added option -info for latex2html
3655         * device/lib/_gptrget.c,
3656         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3657
3658 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3659
3660         * src/pic/device.h,
3661         * src/pic/device.c,
3662         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3663          maxram is less than 0x100.
3664
3665 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3666
3667         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3668
3669 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3670
3671         * src/port.h,
3672         * src/mcs51/main.c,
3673         * src/ds390/main.c,
3674         * src/z80/main.c,
3675         * src/hc08/main.c,
3676         * src/pic/main.c,
3677         * src/pic16/main.c,
3678         * src/avr/main.c,
3679         * src/xa51/main.c
3680         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3681         a jump table is the best form for a switch statement, including
3682         automatic insertion of missing cases to make the case range
3683         continuous. Developed in collaboration with Frieder Ferlemann.
3684
3685 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3686
3687         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3688         accumulator result if it needs sign extension
3689
3690 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3691
3692         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3693
3694 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3695
3696         * device/lib/gbz80/printf.c,
3697         * device/lib/z80/printf.c: removed define for NULL
3698
3699 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3700
3701         * as/xa51/xa_link.c,
3702         * device/examples/ds390/ow390/ad26.c,
3703         * device/examples/ds390/ow390/cnt1d.c,
3704         * device/examples/ds390/ow390/counter.c,
3705         * device/examples/ds390/ow390/ds2480.h,
3706         * device/examples/ds390/ow390/ds2480ut.c,
3707         * device/examples/ds390/ow390/findtype.c,
3708         * device/examples/ds390/ow390/gethumd.c,
3709         * device/examples/ds390/ow390/owllu.c,
3710         * device/examples/ds390/ow390/ownetu.c,
3711         * device/examples/ds390/ow390/swt12.c,
3712         * device/examples/ds390/ow390/swtloop.c,
3713         * device/examples/ds390/ow390/temp.c,
3714         * device/examples/ds390/ow390/temp10.c,
3715         * device/examples/ds390/ow390/thermo21.c,
3716         * device/examples/ds390/ow390/tinilnk.c,
3717         * device/examples/ds390/ow390/tstfind.c,
3718         * device/examples/serialcomm/windows/serial.cpp,
3719         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3720         * device/include/reg51.h: fixed line endings for cvs
3721
3722 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3723
3724         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3725         packRegsForAccUse, packRegisters): new accumulator register
3726         packing algorithm
3727         * support/regression/ports/hc08/support.c (_putchar): suppress
3728         warning of unused variable
3729         * src/SDCCicode.c: added SWAP entry to codeTable
3730
3731 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3732
3733         * device/lib/sprintf.c: forgot to add this file before previous commit
3734
3735 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3736
3737         * src/pic16/gen.c (genPackBits): added operand right in function
3738         parameters, load result directly if p_type is POINTER (that is
3739         called by genNearPointerSet)
3740         * (genUnPackBits): added operand left in function parameters,
3741         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3742         FSR0 if accessing bitfields,
3743
3744 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3745
3746         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3747           _print_format; updated printf, sprintf, vsprintf
3748         * device/include/asm/default/features.h: corrected comment/define
3749         * device/lib/Makefile.in: added sprintf.c
3750         * device/lib/libsdcc.lib: added sprintf module
3751         * device/lib/printf_large.c,
3752         * device/lib/vprintf.c,
3753         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3754           into these 3 files
3755         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3756         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3757         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3758           hc08 test
3759         * support/regression/tests/zeropad.c: define idata as data for hc08
3760
3761 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3762
3763         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3764         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3765         labels are referenced at least once (even if a reference is not found)
3766         * src/hc08/gen.c (emitcode): set isComment flag for comments
3767         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3768         loads), rules 6a..6b (optimize jumps to return)
3769
3770 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3771
3772         * device/lib/acosf.c (acosf),
3773         * device/lib/asinf.c (asinf),
3774         * device/lib/atanf.c (atanf),
3775         * device/lib/ceilf.c (ceilf),
3776         * device/lib/cosf.c (cosf),
3777         * device/lib/coshf.c (coshf),
3778         * device/lib/cotf.c (cotf),
3779         * device/lib/fabsf.c (fabsf),
3780         * device/lib/floorf.c (floorf),
3781         * device/lib/log10f.c (log10f),
3782         * device/lib/logf.c (logf),
3783         * device/lib/sinf.c (sinf),
3784         * device/lib/sinhf.c (sinhf),
3785         * device/lib/sqrtf.c (sqrtf),
3786         * device/lib/tanf.c (tanf),
3787         * device/lib/tanhf.c (tanhf),
3788         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3789         replaced all instances of "reentrant" in the library functions
3790         defined in math.h with this macro.
3791         * support/regression/tests/float_trans.c: reenabled test for hc08
3792
3793 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3794
3795         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3796         erroneously deleted
3797
3798 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3799
3800         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3801         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3802         multi-byte volatile operands are used
3803         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3804         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3805         initialization to area GSINIT0 so that it would always precede
3806         any static initializers in GSINIT
3807         * support/regression/tests/zeropad.c: fixed idata define for hc08
3808         * support/regression/tests/bug-927659.c,
3809         * support/regression/tests/float_trans.c: disabled tests for hc08
3810         pending missing library routines
3811         * .version: increased version number to 2.4.4 - hc08 port now passes
3812         regression tests
3813
3814
3815 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3816
3817         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3818         * Makefile.common.in,
3819         * as/Makefile,
3820         * as/hc08/Makefile.in,
3821         * as/mcs51/Makefile.in,
3822         * as/z80/Makefile.in,
3823         * debugger/mcs51/Makefile.in,
3824         * device/include/Makefile.in,
3825         * device/lib/Makefile.in,
3826         * doc/Makefile,
3827         * link/Makefile,
3828         * link/z80/Makefile.in,
3829         * packihx/Makefile.in,
3830         * sim/ucsim/main_in.mk,
3831         * sim/ucsim/avr.src/Makefile.in,
3832         * sim/ucsim/doc/Makefile.in,
3833         * sim/ucsim/gui.src/serio.src/Makefile.in,
3834         * sim/ucsim/hc08.src/Makefile.in,
3835         * sim/ucsim/s51.src/Makefile.in,
3836         * sim/ucsim/xa.src/Makefile.in,
3837         * sim/ucsim/z80.src/Makefile.in,
3838         * src/Makefile.in,
3839         * support/cpp2/Makefile.in,
3840         * support/librarian/Makefile,
3841         * support/makebin/Makefile: added DESTDIR to the install path proposed
3842         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3843         * doc/sdccman.lyx: added DESTDIR documentation
3844
3845 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3846
3847         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3848         instruction for interrupt handlers, use fast returns when returning
3849         from high priority interrupts
3850
3851 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3852
3853         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3854         code generation
3855         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3856         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3857         bugs, ported much of Bernhard's code from mcs51
3858         * src/mcs51/gen.c (genSend),
3859         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3860         than one when calling a reentrant function
3861         * device/lib/_mullong.c: defined an alternate struct layout for big
3862         endian ports (hc08)
3863
3864 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3865
3866         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3867         test
3868
3869 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3870
3871         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3872         are sane and complete before asking the port its prefered parameter
3873         passing method (fixes bug #1017633)
3874         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3875         and _ret3
3876
3877 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3878
3879         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3880         problem in bitfields >= 8 bits.
3881
3882 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3883
3884         * src/SDCCsymt.c: undid changes that were not meant to be committed
3885
3886 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3887
3888         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3889
3890 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3891
3892         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3893           copied and wrong bit got inverted
3894
3895 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3896
3897         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3898         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3899         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3900         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3901         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3902         assignments to bitfields at known addresses
3903         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3904         reads from bitfields at known addresses
3905         * src/hc08/ralloc.c (packRegisters),
3906         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3907         genhc08Code): optimize pointer get values used as conditionals
3908         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3909         and branch
3910
3911 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3912
3913         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3914         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3915         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3916         as conditionals
3917
3918 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3919
3920         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3921
3922 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3923
3924         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3925         related problems
3926
3927 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3928
3929         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3930
3931 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3932
3933         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3934         mcs51 port
3935
3936 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3937
3938         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3939
3940 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3941
3942         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3943         cases use more compact code.
3944
3945 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3946
3947         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3948
3949 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3950
3951         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3952
3953 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3954
3955         * src/SDCCsymt.h,
3956         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3957         parameter of changePointer() from symbol* to sym_link*
3958         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3959         * src/SDCCsymt.c (compareType): void* type is castable to other
3960         pointers, but not necesarily an exact match.
3961         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3962         is no longer blindly treated as an exact match.
3963         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3964
3965 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3966
3967         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3968
3969 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3970
3971         * src/pic/gen.c,
3972         * src/pic/pcode.c,
3973         * src/pic/ralloc.h,
3974         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3975
3976 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3977
3978         * src/pic/device.c,
3979         * src/pic/device.h,
3980         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3981
3982 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3983
3984         * src/mcs51/gen.c (emitcode): fixed bug #992819
3985
3986 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3987
3988         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3989           there's no need to make it worse
3990
3991 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3992
3993         * src/mcs51/ralloc.c (deassignLR),
3994         * src/ds390/ralloc.c (deassignLR),
3995         * src/hc08/ralloc.c (deassignLR),
3996         * src/z80/ralloc.c (deassignLR),
3997         * src/pic/ralloc.c (deassignLR),
3998         * src/pic16/ralloc.c (deassignLR),
3999         * src/avr/ralloc.c (deassignLR),
4000         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4001         rlivePoint): fixed another part of bug #971834
4002
4003 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4004
4005         * src/z80/main.c: enabled "critical" keyword
4006         * src/z80/mappings.i,
4007         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4008         functions (fixes bug #979646)
4009         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4010
4011 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4012
4013         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4014           such as c:\mydir.
4015
4016 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4017
4018         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4019           doesn't disable too much optimizations
4020
4021 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4022
4023         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4024
4025 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4026
4027         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4028
4029 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4030
4031         * src/pic/gen.c tidied up tabs
4032         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4033         * src/pic/main.c tidied up tabs
4034         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4035         * src/pic/pcoderegs.c tidied up tabs
4036         * src/pic/ralloc.c tidied up tabs
4037
4038 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4039
4040         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4041         to S_FIXED for pic16 port and when symbol is not in level 0,
4042         allocate for S_REGISTER storage class and pic16 port, too,
4043         * src/pic16/device.h: prototype for checkSym,
4044         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4045         * (pic16_assignConfigWordValue): test the value and the mask to
4046         validate that the value is suitable for the configuration word,
4047         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4048         collect extern declared symbols, don't emit symbol twice, check
4049         first if symbol is in publics set first,
4050         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4051         * added command line '--fstack' which enables an experimental
4052         feature for stack access, too buggy to be used yet...
4053         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4054         * (pic16_allocDirReg): when register has storage class S_REGISTER
4055         allocate in pic16_dynAccessRegs,
4056         * device/include/pic16/pic18f????.h: modified configuration word
4057         naming convention, words started as CONFIG0H but should be CONFIG1H
4058
4059 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4060
4061         * device/include/mcs51reg.h: fixed bug 970993
4062
4063 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4064
4065         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4066         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4067         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4068         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4069         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4070         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4071           error/warning numbers,
4072           added function setWarningDisabled()
4073         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4074         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4075           _memcmp.c _memmove.c calloc.c realloc.c free.c
4076         * support/regression/tests/malloc.c: added tests for new functionality
4077         * support/regression/tests/zeropad.c: added tests for truncated initializers
4078           and initialized char arrays starting with '\x0'
4079         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4080
4081 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4082
4083         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4084
4085 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4086
4087         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4088         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4089         peephole 177.e. Thanks to anonymous
4090
4091 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4092
4093         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4094         function isn't used in the source but referenced as a
4095         variable initializer then declare it as extern in .asm file
4096
4097 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4098
4099         * .version: increased version number to 2.4.3
4100
4101         Adding version extension according to ChangeLog CVS revision
4102         * src/Makefile.in (target all): added dependency 'version.h'
4103         * (rule version.h): added rule to create version.h from ChangeLog,
4104         * (rule dep): added dependency version.h,
4105         * src/version.awk: AWK script to create version.h
4106         * src/SDCCdwarf2.c (dwWriteModule),
4107         * src/SDCCglue.c (initialComments),
4108         * src/SDCCmain.c (printVersionInfo): modified to write after
4109         version string the version extension number,
4110         * src/SDCCutil.c: included "version.h"
4111         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4112         number,
4113         * src/SDCCutil.h: added prototype for getBuildNumber
4114
4115         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4116         includeDirsSet, too,
4117         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4118         const char [] is found in function prototype...
4119
4120         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4121         moving to WREG with source is already in WREG,
4122         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4123         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4124         * (aopForSym): stack'ed symbols are partially supported, added
4125         if-clause to support symbols in FARSPACE,
4126         * (sameRegs): added test for AOP_ACC to see if registers are same,
4127         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4128         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4129         * (pic16_popRegFromString): will not allocate a new register if it
4130         doesn't find one by name, bug may have introduced...
4131         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4132         * (genIpush): revived to use pic16 port's stack,
4133         * (genAddrOf): added incomplete case for stack'ed operand,
4134         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4135         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4136         can handle multibyte operands,
4137         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4138         * (pic16initialComments): added message for MPLAB compatibility
4139         mode enabled,
4140         * src/pic16/main.h: prototype for pic16_mplab_comp,
4141         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4142         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4143         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4144         because of increased complexity of procedure,
4145         * (_process_pragma): stack pragma changed to format 'stack pos len',
4146         emit symbol '_stack_end' to conform with gplink,
4147         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4148         to search for register,
4149         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4150         PO_GPR_REGISTER,
4151         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4152         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4153         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4154         case for PO_GPR_REGISTER,
4155         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4156         dies, the new era is ahead !...
4157         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4158         pic16_dynInternalRegs,
4159         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4160         * (pic16_allocDirReg): minor optimizations and bug fixes,
4161         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4162
4163         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4164         load stack and frame pointer with address of 'stack_end' symbol
4165
4166 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4167
4168         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4169         without source code but only variable initializers
4170
4171 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4172
4173         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4174         external are not declared as extern to reduce overhead while linking
4175
4176 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4177
4178         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4179
4180 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4181
4182         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4183           Yee Keat for the patch
4184         * src/SDCCast.c (decorateType): fixed bug #979599
4185         * src/ds390/gen.h: removed local fReturnSizeDS390
4186         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4187         * src/ds390/gen.c (genAnd, genOr, genXor),
4188         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4189
4190 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4191
4192         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4193         add relFilesSet to $3, manipulate $2 to handle linking of object
4194         files without source files in command line,
4195         * device/include/pic16 (all headers): added ID location macros,
4196         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4197         entries for ID location bytes,
4198         * (pic16_assignIdByteValue): NEW,
4199         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4200         added field dumpcalltree to pic16_options_t,
4201         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4202         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4203         emitting rFalseIfx label after check_carry label,
4204         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4205         pic16_emitDIRegs), NEW
4206         * (pic16glue): dump .calltree file when option --calltree found,
4207         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4208         * (_pic16_genAssemblerPreamble): emit ID locations after
4209         configuration registers,
4210         * (pic16_linkCmd): modifications of the link command,
4211         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4212         * (pic16_pCodeInitRegisters): don't init stack registers,
4213         * (pic16_findPrevInstruction): fixed bug,
4214         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4215         bug with immediate registers,
4216         * (buildCallTree): traces stack push and pop,
4217         * (pct2): dump also stack usage for each function,
4218         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4219         * (pic16_allocDirReg): various modifications,
4220         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4221         fixed to 1,
4222
4223 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4224
4225         * src/pic16/pcode.c: removed buggy double colon
4226
4227 2004-07-01 Borut Razem <borut.razem AT siol.net>
4228
4229         * support/scripts/sdcc.nsi: added include/pic16 to setup
4230
4231 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4232
4233         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4234         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4235         target 'clean',
4236         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4237         specific command line arguments. Also added sample lkr script
4238         for placing a variable at a specific memory bank.
4239         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4240         at a specific memory bank,
4241         * (pic16_dump_isection): fixed bug which caused string literals to
4242         be omitted when dumping idata section,
4243         * (pic16_groupRegistersInSection): added code to handle registers
4244         in specific memory banks,
4245         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4246         public, all references are renamed too,
4247         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4248         AOP_DPTR2,
4249         * (pic16_storeForReturn): added case to handle when dest is WREG,
4250         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4251         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4252         pic16_rel_udata, check to see if that register is marked as being
4253         a member of a specific memory bank,
4254         * (pic16_printIvalCharPtr): added code to add string literals either
4255         to code or the idata sections,
4256         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4257         also accept the 'udata' pragma,
4258         * src/pic16/main.h: new structure types sectName and sectSym
4259         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4260         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4261         * (pic16_findPrevInstruction): fixed, it returned nothing,
4262         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4263         instruction combinations,
4264         * (pic16_FixRegisterBanking): heavily reorganised,
4265         * (pic16_AnalyzeBanking): if generating banksel directives is
4266         disabled, then don't call FixRegisterBanking at all,
4267         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4268         completely removed,
4269         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4270
4271 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4272
4273         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4274         Phuah Yee Keat <yk.phuah AT nestac.com>
4275
4276 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4277
4278         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4279         correctly the IVT even if it is relocated to some other location
4280
4281 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4282
4283         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4284         * device/include/pic16/pic18f2220.h: NEW,
4285         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4286         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4287         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4288         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4289         nodefaultlibs, ivt_loc is the location of the interrupt vector
4290         table, and nodefaultlibs signs that default libraries should not be
4291         linked in link stage,
4292         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4293         according to --ivt-loc argument,
4294         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4295         when pragma stack is found,
4296
4297 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4298
4299         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4300         256 (range check), 257 (do while), 258.a-f (bit banging
4301         f.e. on 3-wire SPI bus)
4302
4303 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4304
4305         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4306         variables used exclusively within a loop
4307
4308 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4309
4310         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4311
4312 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4313
4314         * src/SDCClrange.c (computeClash): fixed bug #971834
4315
4316 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4317
4318         * src/mcs51/gen.c (genCmp): fixed bug #975903
4319         * src/hc08/gen.c (operandsEqu),
4320         * src/ds390/gen.c (operandsEqu),
4321         * src/z80/gen.c (operandsEqu),
4322         * src/pic/gen.c (operandsEqu),
4323         * src/pic16/gen.c (operandsEqu),
4324         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4325         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4326
4327 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4328
4329         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4330
4331 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4332
4333         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4334         default case in switch statement,
4335         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4336         to eliminate problem with initialisation of pointers, but problem
4337         still exists,
4338         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4339         * (emitStaticSegment): removed various lines emitting debug info,
4340         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4341         added processor registers for utilizing EEPROM,
4342         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4343         configurable and set 8
4344
4345 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4346
4347         * .version: increased version number to 2.4.2,
4348
4349         Cumulative patch for pic16 port
4350         * src/pic16/device.c: changed scheme to dump initial values for
4351         variables in idata segment, all print_idata* functions were removed,
4352         now the pic16_printIval* will be called,
4353         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4354         * _pic16_printPointerType, pic16_printPointerType,
4355         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4356         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4357         NEW, similar to the respective functions in SDCCglue.c,
4358         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4359         way, emitting hex bytes,
4360         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4361
4362 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4363
4364         * src/avr/ralloc.c (serialRegAssign),
4365         * src/xa51/ralloc.c (serialRegAssign),
4366         * src/pic/ralloc.c (serialRegAssign),
4367         * src/pic16/ralloc.c (serialRegAssign),
4368         * src/hc08/ralloc.c (serialRegAssign),
4369         * src/z80/ralloc.c (serialRegAssign),
4370         * src/ds390/ralloc.c (serialRegAssign),
4371         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4372
4373 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4374
4375         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4376         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4377
4378 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4379
4380         Cumulative patch for pic16 port:
4381         * src/pic16/device.h (typedef PIC16_device) modified fields for
4382         defining microcontrollers,
4383         * src/pic16/device.c: added new info for all devices in Pics16 array,
4384         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4385         to be optimised out by the pCode optimiser,
4386         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4387         specially, bug reported by G.M. Gallant,
4388         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4389         as force'd so that cannot be optimised out by pCode optimiser,
4390         * src/pic16/pcode.c,
4391         * src/pic16/pcodepeeph.c,
4392         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4393         they are disabled by default, but can be enabled explicit with
4394         command argument --denable-peeps, for testing,
4395         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4396         --pomit-ivt in COMPILE_FLAGS
4397
4398 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4399
4400         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4401           compilation on MSVC
4402
4403 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4404
4405         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4406
4407 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4408
4409         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4410         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4411
4412 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4413
4414         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4415         would only assign 0x300001 register.
4416
4417 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4418
4419         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4420         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4421
4422 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4423
4424         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4425         for ds80c400
4426         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4427         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4428         added peephole 254 (left shift), 255 (jump table)
4429
4430 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4431
4432         * device/lib/Makefile.in: removed comment line with model-pic16,
4433         * (target port-specific-objects-pic16): the libraries and objects
4434         are copied to the build directory form the device/lib/pic16/bin
4435         directory
4436
4437         Cumulative patch concerning pic16 port:
4438         * library directory has been re-organized,
4439         * added support for PIC18F1220,
4440         * added headers and library sources for chips 18f1220,18f6520,
4441         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4442
4443         * configuration registers setting has changed, now each supported
4444         device has a complete description of the registers it uses,
4445         * all initialisations are moved to idata sections, these section
4446         can be absolute or relocatable,
4447         * fixed initialisation of codespace variables,
4448         * fixed warning about PCLATU and gpsim,
4449         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4450         * (genAssign): use table reads when assigning from variables in codespace,
4451         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4452         char/int variables placed in codespace,
4453         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4454         registers set in .asm file, no need for --pomit-config-words anymore,
4455         * (pic16glue): some 8051 legacy segments are commented out
4456         (to be removed completely),
4457         * added support for alternative assembler and linker with --asm=
4458         and --link= command line arguments,
4459         * peepholes are disabled automatically in the port, no need to
4460         specify on command line,
4461         * port supports natively char/int/long multiplication, but converts
4462         all divisions to support functions,
4463         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4464         to the file set in variable $2,
4465         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4466         strings in ASCII format and not in hex,
4467         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4468         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4469         allocate proper register if iCodes aren't temporary,
4470
4471 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4472
4473         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4474
4475 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4476
4477         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4478         is commented out
4479
4480 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4481
4482         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4483         computed address is reused
4484         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4485         multi-byte bitfields
4486
4487 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4488
4489         * src/z80/gen.c: (genArrayInit): must check for pointers too
4490
4491 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4492
4493         * support/regression/tests/zeropad.c: never meant to commit the
4494           nestedstruct test: removed, added check for GCC version
4495
4496 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4497
4498         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4499         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4500         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4501           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4502           bugs 928906 and 954082 half-empty initializers
4503         * src/SDCCsymt.h,
4504         * src/SDCCsymt.c (getAllocSize): added for above fix
4505         * src/z80/gen.c (genArrayInit): fixed bug 741044
4506         * support/regression/tests/zeropad.c: added tests
4507
4508 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4509
4510         * src/pic16/device.c (pic16_dump_section): corrected bug which
4511         caused some symbols of the libraries to be misplaced
4512
4513 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4514
4515         * src/pic16/glue.c,
4516         * src/pic16/ralloc.h,
4517         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4518         to fix conflict with pic port
4519
4520 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4521
4522         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4523         externs configuration variables,
4524         * src/pic16/ralloc.h,
4525         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4526         prototype in header, commented out some debug messages
4527
4528 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4529
4530         * src/pic16/glue.c,
4531         * src/pic16/main.c,
4532         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4533         for gpasm COFF object generation. Thanks to D. Hawkins for
4534         his patch info
4535
4536 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4537
4538         * src/ds390/main.c,
4539         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4540         Brock for spotting this)
4541         * src/ds390/gen.c (genEndFunction),
4542         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4543         interrupt handler and critical. Disable push/pop optimizations when
4544         peephole optimizations disabled.
4545
4546 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4547
4548         Updated pic16 library sources and headers.
4549         * device/lib/pic16/pic18f*/ ,
4550         * device/include/pic16/*.h: modified to handle structured SFR
4551         definitions
4552
4553 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4554
4555         * src/port.h (PORT structure): added hook initPaths, now each
4556         port can declare its own default search paths,
4557         which can been seen with the --print-search-dirs option,
4558         see pic16 port for example,
4559         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4560         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4561         * (doPrintSearchDirs): NEW, replaces in a central manner the
4562         printing of search dirs which was split in set*Paths functions,
4563         * (main): added call to port->initPaths and doPrintSearchDirs,
4564         * src/avr/main.c,
4565         * src/ds390/main.c,
4566         * src/hc08/main.c,
4567         * src/izt/i186.c,
4568         * src/izt/tlcs900h.c,
4569         * src/mcs51/main.c,
4570         * src/pic/main.c,
4571         * src/pic16/main.c: modified port structures to reflect addition of
4572         initPaths hook,
4573
4574         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4575         * (pic16_dump_section): for registers in same address reserve memory once,
4576         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4577         to no_banksel,
4578         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4579         result is greater in size than right or left,
4580         * (pic16_genUMult8X8_8): there are some cases where the result can
4581         be 16 bits size, so handle these,
4582         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4583         * (pic16_outBitC): modified to emit pcodes,
4584         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4585         or not,
4586         * (genDivOneByte): implemented algorithm to divide 8-bits,
4587         * (genCmp): uncommented goto, but issues still exist,
4588         * (genAnd): fixed a bug with variables >8bits,
4589         * (genPackBits): optimization added that uses BCF/BSF to change a
4590         single bit,
4591         * (genAssign): fixed bug when assigning floating point literals,
4592         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4593         __sdcc_gsinit_startup label,
4594         * src/pic16/main.c (_pic16_init): removed search directory
4595         initialisations,
4596         * (_pic16_initPaths): NEW, used to initialise search directories,
4597         * (_hasNativeMulFor): support functions for all except char/int
4598         multiplication, and char division,
4599         * (PIC16_port struct): modified entry for native mul support,
4600         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4601         no_banksel option,
4602         * (buildCallTree): call to register_usage is ifdef'ed out,
4603
4604 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4605
4606         * device/include/string.h: applied Stas Sergeev's patch to make this
4607         header file compatible with the preprocessor -Wundef option
4608         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4609         failure (fixes bug #941458)
4610
4611 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4612
4613         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4614         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4615         that the variable, not the function, should be static
4616         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4617         to be consistent with non-literal case
4618
4619 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4620
4621         * src/SDCCast.c (isConformingBody): fixed bug #949967
4622         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4623         convilong): fixed bug #952086
4624
4625 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4626
4627         * src/SDCCmem.c (allocVariables): fixed bug #955321
4628
4629 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4630
4631         * src/hc08/main.c (_hc08_genAssemblerEnd),
4632         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4633         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4634         completely eliminated the use of a temporary file
4635         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4636         when more than one file linked
4637         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4638
4639 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4640
4641         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4642         which fixes bug #543481
4643         * support/regression/tests/bug-751703.c: fixed comments left from a
4644         cut and paste error
4645         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4646         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4647         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4648         scopes
4649         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4650         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4651         are now changed to underscores in moduleName
4652
4653 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4654
4655         * as/mcs51/lkmem.c: better fix for bug #954173
4656
4657 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4658         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4659
4660         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4661         * device/include/c8051f000.h,
4662         * device/include/c8051f120.h,
4663         * device/include/c8051f300.h,
4664         * device/include/c8051f310.h,
4665         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4666         PWM16) and detab'ed
4667
4668 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4669
4670         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4671         and mailing lists, doc'ed --no-peep-comments, removed reference
4672         to knoppix (newest version has no LyX/LaTeX), other minor changes
4673         * src/SDCCglue.c (glue): save 2 bytes stack space with
4674         option --main-return. The ljmp could probably be avoided too
4675
4676 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4677
4678         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4679
4680 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4681
4682         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4683         * src/SDCCopt.c (isLocalWithoutDef),
4684         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4685         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4686         (credit to Maarten Brock for patch #949363, on which this is based)
4687         * support/regression/tests/bug-751703.c: some test cases of extern used
4688         within inner scopes.
4689
4690 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4691
4692         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4693         SPEC_STRUCT
4694         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4695         struct definitions
4696         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4697         dwWriteLabel): fix to create valid debugger symbols even when
4698         the module name has non-alphanumeric symbols in it
4699         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4700         when a variable's allocation has been optimized away
4701
4702
4703 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4704
4705         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4706         * src/hc08/main.c,
4707         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4708         * src/mcs51/main.c,
4709         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4710         * src/ds390/main.c,
4711         * src/z80/gen.c (z80_emitDebuggerSymbol),
4712         * src/z80/main.c,
4713         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4714         * src/pic/main.c,
4715         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4716         * src/pic16/main.c,
4717         * src/avr/gen.c (avr_emitDebuggerSymbol),
4718         * src/avr/main.c,
4719         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4720         * src/xa51/main.c,
4721         * src/SDCCdebug.c (emitDebuggerSymbol),
4722         * src/SDCCdebug.h,
4723         * src/port.h: added a debugger struct to the port struct. Added a
4724         callback for defining debugger symbols
4725
4726         * src/SDCCast.c (createLabel),
4727         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4728         with isitmp = 1
4729         * src/SDCCicode.h,
4730         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4731         iCode back to the ast for the function
4732
4733         * src/hc08/ralloc.c (hc08_assignRegisters),
4734         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4735         unneeded fields from the regs struct.
4736         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4737         pushReg() & pullReg() functions instead of emitcode()
4738
4739         * src/hc08/gen.c (genLabel, genhc08Code),
4740         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4741
4742         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4743         debugger hooks
4744
4745         * src/hc08/gen.c (genEndFunction, genhc08Code),
4746         * src/hc08/gen.h,
4747         * src/mcs51/gen.c (genEndFunction, gen51Code),
4748         * src/mcs51/gen.h,
4749         * src/ds390/gen.c (genEndFunction, gen390Code),
4750         * src/ds390/gen.h,
4751         * src/z80/gen.c (genEndFunction, genZ80Code),
4752         * src/z80/gen.h,
4753         * src/z80/z80.h,
4754         * src/pic/gen.c (genEndFunction, genpic14Code),
4755         * src/pic/gen.h,
4756         * src/pic16/gen.c (genEndFunction, genpic16Code),
4757         * src/pic16/gen.h,
4758         * src/avr/gen.c (genEndFunction, genAVRCode),
4759         * src/avr/gen.h,
4760         * src/xa51/gen.c (genEndFunction, genXA51Code),
4761         * src/xa51/gen.h,
4762         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4763         specific code to cdbFile.c and out of the backend code generators
4764
4765         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4766         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4767         starting address is now 0
4768
4769         * as/hc08/asm.h,
4770         * as/hc08/m08pst.c,
4771         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4772         assembler directive for DWARF support
4773         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4774
4775         * src/src.dsp,
4776         * src/Makefile.in,
4777         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4778
4779 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4780
4781         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4782         and inappropriate peephole optimization in jump tables
4783
4784 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4785
4786         * as/hc08/m08pst.c,
4787         * src/SDCCglue.c: sdccopt works for the hc08 port now
4788
4789 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4790
4791         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4792
4793 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4794
4795         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4796
4797 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4798
4799         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4800         rules
4801         * src/SDCCmain.c,
4802         * src/SDCCglobl.h,
4803         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4804         comments from the peephole optimizer replacement rules
4805         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4806         symbols
4807         * src/SDCCcse.c (updateSpillLocation),
4808         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4809         equivalents
4810         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4811         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4812         objects far pointers
4813
4814 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4815
4816         * src/SDCCsymt.h: a missing part of my last change
4817         * src/pic/ralloc.c (regTypeNum),
4818         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4819
4820 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4821
4822         * src/SDCCicode.h,
4823         * src/SDCCicode.c (aggrToPtrDclType),
4824         * src/SDCCptropt.h,
4825         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4826         ptrPseudoSymConvert),
4827         * src/pic/ralloc.c (regTypeNum),
4828         * src/pic16/ralloc.c (regTypeNum),
4829         * src/hc08/ralloc.c (regTypeNum),
4830         * src/ds390/ralloc.c (regTypeNum),
4831         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4832         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4833
4834 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4835
4836         * link/z80/lkmain.c (afile),
4837         * as/hc08/lkmain.c (afile),
4838         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4839         prevent a pointer problem when a filename has no directory and
4840         no extension specified.
4841
4842 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4843
4844         * link/z80/lkmain.c (afile): allow periods in directory names
4845         * link/z80/lkmain.c (afile),
4846         * as/mcs51/lkmain.c (afile),
4847         * as/hc08/lkmain.c (afile): allow linker script file to have an
4848         extension other than ".lnk"
4849         * link/z80/lklex.c (getfid),
4850         * link/z80/lkmain.c (parse),
4851         * as/mcs51/lklex.c (getfid),
4852         * as/mcs51/lkmain.c (parse),
4853         * as/hc08/lklex.c (getfid),
4854         * as/hc08/lkmain.c (parse): Support comments in the linker script
4855         file on lines by themselves and after filenames
4856
4857 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4858
4859         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4860
4861 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4862
4863         * src/z80/peeph-z80.def: removed some peephole rules that don't
4864         work with multibyte arithmetic (fixed bug #937126)
4865         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4866         to registers and not global variables
4867         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4868         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4869         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4870         checking for assignments not internally generated (fixed bug #931895)
4871         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4872         structure member (fixed bug #930072)
4873
4874 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4875
4876         * src/SDCCmain.c (linkEdit),
4877         * src/hc08/main.c (_hc08_parseOptions),
4878         * as/hc08/Makefile.in,
4879         * as/hc08/aslink.h,
4880         * as/hc08/asm.h,
4881         * as/hc08/m08pst.c,
4882         * as/hc08/lkrloc.c (relr, rele),
4883         * as/hc08/lkarea.c (lnkarea)
4884         * as/hc08/lkmain.c (afile, parse),
4885         * as/hc08/lkelf.c: support for ELF output
4886         * as/hc08/lks19.c (s19),
4887         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4888
4889 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4890
4891         * as/mcs51/lkihx.c: Fixed bug #899105.
4892
4893 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4894
4895         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4896         .dsp files from Unix to DOS.
4897
4898 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4899
4900         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4901         function pointers; we have been compliant for several months now.
4902         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4903         change that was accidently commented out
4904         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4905         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4906         bug #922319
4907
4908 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4909
4910         * src/hc08/gen.c: output of all of the internal debugging information
4911         is now controlled by the D() macro; it is disabled by default
4912
4913 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4914
4915         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4916         harder to keep the same registers during a CAST iCode
4917         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4918         long via int can be done in a single cast, if the signedness is
4919         correct.
4920         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4921         putchar() in tinibios.c in ds390's library
4922
4923 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4924
4925         * src/SDCCast.c (decorateType): fixed bug #898889,
4926         cast result of a literal complement too
4927         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4928         fixed check for bitfields
4929
4930 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4931
4932         * src/SDCCicode.c (geniCodeLogic): made it static,
4933         (geniCodeLogicAndOr): added in order to fix bug #905492,
4934         (ast2iCode): fixed bug #905492
4935         * support/regression/tests/bug-905492.c: added
4936         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4937         (processParms): fixed bug #927659: don't copy parms, this will clear
4938         decorated flag
4939         * support/regression/tests/bug-927659.c: added
4940
4941 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4942
4943         * src/SDCCast.c (addCast): don't cast float to char
4944         * device/lib/libsdcc.lib: added _memmove
4945
4946 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4947
4948         * device/lib/large/Makefile: fixed parallel execution by
4949         replacing `make` by `$(MAKE)`
4950
4951 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4952
4953         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4954         offsets (fixes bug #923936)
4955
4956 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4957
4958         * device/lib/small/Makefile: fixed parallel execution by
4959         replacing `make` by `$(MAKE)`
4960
4961 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4962
4963         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4964
4965 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4966
4967         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4968         * src/regression/Makefile: Regression test was not running.
4969
4970 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4971
4972         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4973         complement if possible
4974         * src/SDCCval.c (valComplement),
4975         * src/SDCCicode.c (operandOperation): fixed complement of literal
4976         * support/regression/tests/onebyte.c (testComplement): added
4977
4978 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4979
4980         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4981         return an optimized tree; actually replace actParm with the new tree
4982         * src/SDCCast.h: added some parantheses to remove side effects
4983         * support/regression/tests/bug-920866.c
4984
4985 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4986         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4987         Bit operands were not being handled properly in the pic14 port.
4988         (now src/regression/add.c passes again).
4989
4990 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4991
4992         * src/SDCC.y (labeled_statement): case and default no longer require
4993         a following statement (RFE #893037)
4994
4995 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4996
4997         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4998         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4999         disabled (fixes bug #916294)
5000         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5001         "mov a,acc"; patch provided by Lenny Story
5002         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5003
5004 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5005
5006         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5007         functions
5008         * src/ds390/gen.c (genFunction, genEndFunction),
5009         * src/ds390/ralloc.c (ds390_assignRegisters),
5010         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5011         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5012         pushed if there are parameters passed on the stack. Also, a cleaner
5013         way to decide if r0/r1 should be pushed/popped. (Together they fix
5014         bug #918693)
5015
5016 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5017
5018         * doc/sdccman.lyx,
5019         * device/lib/mcs51/crtpagesfr.asm,
5020         * device/lib/mcs51/crtxinit.asm,
5021         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5022         to avoid confusion with Si Lab's SFRPAGE register.
5023
5024 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5025
5026         * src/SDCCglue.c (emitMaps): allow public sfr variables
5027         * src/SDCCglue.c (initialComments): include compiler build date
5028         with compiler version and put the timestamp of the generated
5029         assembly file on a serperate line to be less confusing.
5030         * src/port.h: added genInitStartup hook
5031         * src/avr/main.c,
5032         * src/ds390/main.c,
5033         * src/hc08/main.c,
5034         * src/pic/main.c,
5035         * src/pic16/main.c,
5036         * src/xa51/main.c,
5037         * src/z80/main.c: genInitStartup initialize as NULL (default to
5038         historical behaviour)
5039         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5040         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5041         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5042         library instead of hard coding it into the compiler.
5043         * support/regression/ports/mcs51-stack-auto/spec.mk,
5044         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5045         * device/lib/mcs51/Makefile,
5046         * device/lib/small/Makefile,
5047         * device/lib/large/Makefile,
5048         * device/lib/mcs51/crtpagesfr.asm,
5049         * device/lib/mcs51/crtstart.asm,
5050         * device/lib/mcs51/crtxclear.asm,
5051         * device/lib/mcs51/crtxinit.asm,
5052         * device/lib/mcs51/crtclear.asm,
5053         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5054         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5055         and into user configurable files.
5056         * device/lib/clean.mk: clean mcs51 directory too
5057         * support/regression/tests/longlit.c: added static to T1 declaration
5058         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5059         accesses in the initialization code
5060
5061 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5062
5063         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5064         OSCTRIMVAL as noted in bug #916008
5065
5066 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5067
5068         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5069         in loops with multiple exits (reported as incorrect registers
5070         used by Martin Helmling in Sdcc-user list)
5071
5072 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5073
5074         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5075         made ds390 register extensions look less like error messages
5076
5077 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5078
5079         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5080         reported by Adam Wozniak in Sdcc-user list
5081
5082 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5083
5084         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5085         arithmetic optimizations, added debug output
5086
5087 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5088
5089         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5090         * sdcc.spec: updated and split sdcc into 3 rpms
5091         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5092         needed for literals of LEFT_OP and '+'
5093         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5094         introduced RESULT_TYPE_NOPROM
5095         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5096         left shift
5097         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5098         limited promotion to int only for '*'
5099         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5100
5101 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5102
5103         * src/pic16/gen.c (genSkip),
5104         (genc16bit2lit), (gencjneshort): commented out
5105         (is_LitOp): new helper function, checks operand type
5106         (genCmpEq): rewritten
5107
5108 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5109
5110         * support/regression/tests/bug-908454.c: added
5111
5112 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5113
5114         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5115         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5116         (geniCodeCast): cosmetic, don't preserve bit storage class
5117         (geniCodeLeftShift): added promotion
5118         (geniCodeLogic): fixed regression
5119         * src/SDCCsymt.c (computeTypeOr): accept bits too
5120         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5121
5122 2004-03-07  Borut Razem <borut.razem AT siol.net>
5123
5124         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5125
5126 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5127
5128         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5129         version of pic16_genPackRegisters which does not check if ic is a
5130         CAST operator,
5131         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5132         function cause string1.c regression test fails
5133
5134 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5135
5136         * sim/ucsim/configure.in,
5137         * sim/ucsim/configure,
5138         * sim/ucsim/doc/Makefile.in: use docdir
5139         * src/SDCC.y: fixed sbit atrributes
5140         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5141         * src/SDCCast.c (decorateType): |^& need special promotion handling
5142         * src/SDCCast.h,
5143         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5144         * src/SDCCsymt.h (computeType),
5145         * src/SDCCicode.c: computeType() needs op
5146         * src/SDCCsymt.c (checkTypeSanity),
5147         * doc/sddman.lyx: "plain" bitfields are unsigned
5148         * src/SDCCsymt.c (computeTypeOr): added
5149         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5150         |^& ops
5151         * src/SDCCval.c (val*): computeType() needs op
5152         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5153         * support/regression/tests/onebyte.c: added tests for |^&
5154
5155 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5156
5157         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5158         for writing icode into asm output.
5159
5160 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5161
5162         * src/pic16/device.c: added some debug lines enabled
5163         with macro DEBUG_CHECK,
5164         * src/pic16/genarith.c: more debug in genPlus,
5165         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5166         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5167         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5168         * (aopForSym): onStack symbols are re-placed in data memspace,
5169         and onStack flag is cleared,
5170         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5171         copy temporary pcodeop,
5172         * (genPcall): added warning for not updating PCLATU,
5173         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5174         always true for pic16 port,
5175         * (genMultOneWord): NEW, supports integer multiplication,
5176         * (genMult): modified to call genMultOneWord,
5177         * (ifxForOp): added warning when return NULL,
5178         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5179         flag is set before call to operandFromSymbol for implicit
5180         added structures,
5181         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5182         options.intlong_rent are set by default,
5183         * (_hasNativeMulFor): modified to allow port generation of integer
5184         multiplication,
5185         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5186         set regtype to REG_SFR for all registers, restricting seting the
5187         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5188
5189 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5190
5191         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5192         more than 500 times in the regression tests
5193
5194 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5195
5196         * support/Util/SDCCerr.h,
5197         * support/Util/SDCCerr.c,
5198         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5199         enumerator_list),
5200         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5201         for symbol conflicts.
5202         * support/valdiags/tests/enum.c,
5203         * support/valdiags/tests/tentdecl.c,
5204         * support/valdiags/tests/struct.c: expect possible error messages
5205         referring to original symbol definitions.
5206         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5207         * src/SDCCsymt.h,
5208         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5209
5210 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5211
5212         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5213
5214 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5215
5216         * src/pic16/ralloc.c (newReg): fixed bug #908929
5217
5218 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5219
5220         * src/ds390/gen.c: added missing #include "main.h"
5221
5222 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5223
5224         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5225         checking if symbol is already in set,
5226         * src/pic16/device.h: prototype for checkAddSym,
5227         * src/pic16/gen.c: (_G): added entry interruptvector,
5228         * (assignResultValue): removed some commented out lines,
5229         * (genFunction): check for ISR via sym->type, absolute section for
5230         interrupt code is created via a new pBlock, the goto instruction is
5231         placed now correctly at the interrupt vector position, changed all
5232         references from ivec to _G.interruptvector,
5233         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5234         is the interrupt is a high priority one, same for return from ISR,
5235         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5236         externs to calls of checkAddSym,
5237         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5238         pic16_pcode_verbose flag is set,
5239         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5240         * src/pic16/pcoderegs.c: message about how many registers are saved
5241         will only be emitted if pic16_pcode_verbose flag is set,
5242
5243 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5244
5245         * src/ds390/ralloc.h,
5246         * src/ds390/ralloc.c (ds390_regWithIdx),
5247         * src/ds390/gen.c (emitcode),
5248         * src/ds390/main.h,
5249         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5250         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5251         ds390operandCompare, getRegsRead, getRegsWritten,
5252         initializeAsmLineNode): customized instruction size calculation for
5253         ds390, started basis for some register optimizations
5254         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5255         corresponding assembly output
5256         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5257         missing push/pop of r0/r1. Optimized push/pops
5258
5259 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5260
5261         * src/mcs51/main.c (instructionSize): fixed ACALL size
5262         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5263
5264 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5265
5266         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5267         the sorting of rlist with NULL elements
5268         * (print_idataType, print_idata): NEW to create idata sections
5269         * src/pic16/device.h: idataSymSet new variable
5270         * src/pic16/gen.c (genFunction): fixed some bugs in string
5271         comparing, improved the absolute section creation for ISRs,
5272         added FSR0L/FSR0H in registers that are saved in an ISR,
5273         * (genInline): fixed the processing of inline snippets,
5274         now they undergo no process by the peephole optimizer
5275         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5276         are placed in idataSymSet,
5277         * (pic16emitStaticSeg): extern symbols are added in externs,
5278         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5279         switching when aboslute variables are placed in access bank memory
5280         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5281         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5282         commented out with #if,
5283         * (pic16_packRegisters): reintroduce the check for CAST because some
5284         symbols are not correctly handled,
5285         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5286         pCodeInstruction instead of pCode,
5287         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5288         pCodeAsmDir definition,
5289         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5290         directive, then the argument directive is emitted without the leading
5291         tab, hack for inline labels which must be in the first column,
5292         * (compareLabel,pic16_findNextInstruction),
5293         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5294         * (insertBankSwitch): modified for the new pCodeAsmDir,
5295
5296 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5297         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5298
5299         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5300         instance,
5301         * (pushSide): commented out with #if,
5302         * (assignResultValue): fixed some typos in saving
5303         registers,
5304         * (genPcall): FIXED and sync'ed with genCall,
5305         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5306         * (genNearPointerGet): fixed to handle some more cases,
5307         implementation scheme via table reads,
5308         * (genConstPointerGet): modified to access code memory correct,
5309         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5310         and improved to handle some cases
5311         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5312         instead of "RETLW" for init data
5313         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5314         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5315         variables are placed in access bank memory (<0x80 and >=0xf80),
5316         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5317         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5318         TBLWT_POSTDEC,TBLWT_PREINC
5319         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5320         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5321         directives
5322         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5323         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5324         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5325         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5326
5327 2004-02-29  Borut Razem <borut.razem AT siol.net>
5328
5329         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5330         support/Util/findme.h, support/Util/system.h: enhance binary relative
5331         search for lib and include by using findProgramPath()
5332
5333 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5334
5335         * src/SDCCpeeph.h,
5336         * src/SDCCpeeph.c (pcDistance),
5337         * src/port.h,
5338         * src/mcs51/ralloc.h,
5339         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5340         * src/mcs51/main.h,
5341         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5342         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5343         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5344         size calculation port specific, started basis for some register
5345         optimizations
5346         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5347         missing push/pop of r0/r1. Optimized push/pops
5348         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5349         * device/lib/_modsint.c (_modsint),
5350         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5351         and stack version so regression tests pass
5352
5353 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5354
5355         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5356         * src/SDCCast.c (decorateType): catch another small optimization
5357         with '?' operator
5358         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5359         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5360         modified to finally use computeType() all over SDCC,
5361         see Feature Request #877103
5362         * src/SDCCval.h: cosmetic
5363         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5364         valCompare(); regression tested in muldiv.c
5365         * support/regression/tests/muldiv.c (testMod): mod sign follows
5366         dividend only
5367
5368 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5369
5370         * src/SDCCast.c (decorateType): fixed bug #902362
5371         * doc/INSTALL.txt: fixed install instructions for win32
5372
5373 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5374
5375         * device/include/Makefile.in (install): fixed by replacing spaces
5376         by tabs
5377         * doc/README.txt,
5378         * doc/INSTALL.txt: updated for release
5379         * doc/sdccman.lyx: added warning for --xstack being buggy
5380
5381 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5382
5383         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5384         to eliminate build warnings.
5385         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5386
5387 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5388            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5389
5390         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5391         removed -penable-stack, added comment for stack pragma, added
5392         warning for not initializing the stack/frame registers, removed
5393         comment at interrupts section
5394
5395         Stack is made permanent, there is no ability to disable stack usage.
5396         * src/pic16/device.h,
5397         * src/pic16/device.c: removed all references to USE_STACK macro,
5398         * src/pic16/device.c (pic16_dump_section): when no elements in
5399         rlist, free rlist before return,
5400         * (pic16_dump_int_registers): NEW, internal registers are a new set
5401         of general purpose registers reused by each function,
5402         * (checkAddReg): returns 1 if registers is added to set,
5403         * (pic16_groupRegistersInSection): when a registers is of type
5404         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5405         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5406         SRCASECMP macro is moved here from device.c
5407         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5408         PO_PCLATU, PO_PRODL, PO_PRODH,
5409         * (pic16_pCodeOpType, genMinus,
5410         changed compares to "a" register, with AOP_ACC,
5411         * (pic16_genPlus): fixed some bugs and indented properly,
5412         * (pic16_addSign): changed size to size+offset in the MOVWF
5413         instruction,
5414         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5415         multiply 8-bit operand by literal, result is 8-bit,
5416         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5417         multiply 2 8-bit operand, result is 8-bit,
5418         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5419         genUMult8X*_16,
5420         * src/pic16/gen.c: changed accUse to contain WREG only,
5421         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5422         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5423         true, do not use immediate addressing any more unless sym is a
5424         pointer in codespace,
5425         * (aopForRemat): do not use immediate addressing when symbol not in
5426         codespace and when symbol's address is requested,
5427         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5428         accUse size (= 1),
5429         * (aopGet): added case for AOP_ACC and don't return "accumulator
5430         bug" but WREG instead,
5431         * (popGetTempReg): pushes contents of temporary register in stack,
5432         * (popReleaseTempReg): pops contents of temporary register from
5433         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5434         * (pic16_popGet): separated case AOP_ACC to return register WREG
5435         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5436         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5437         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5438         the use of immediate pointers to certain cases only.
5439
5440         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5441         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5442         * (assignResultValue, genCall, genRet): modified to use the new
5443         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5444         genPcall is still broken,
5445         * (genFunction): added code to create 'A' type pBlocks when
5446         interrupt functions are generated, code not extensively tested yet,
5447         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5448         * (genEndFunction): modified so ISRs pop stored registers from stack,
5449         * (genMultOneByte): cleanup,
5450         * (AccRsh): added flag andmask, to and result with appropriate mask,
5451         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5452         * (genDataPointerGet): fixed and reenabled its use,
5453         * (genNearDataPointerGet): bugs fixed,
5454         * (genDataPointerSet): bugs fixed,
5455         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5456         pic16_DumpSymbol, pic16_DumpOp,
5457         * src/pic16/genutils.h: function prototypes for the above functions,
5458         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5459         pointers,
5460         * (pic16emitRegularMap): many many many improvements, but needs a
5461         major cleanup,
5462         * src/pic16/main.c: enable_stack in pic16_options is removed,
5463         * (_pic16_parseOptions): removed command line options -penable-stack,
5464         * (_process_pragma): emit stack symbol only when stack pragma is
5465         processed,
5466         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5467         redirected to FSR0L/FSR0H pair,
5468         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5469         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5470         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5471         for immediates,
5472         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5473         * (dumpPicOptype): NEW,
5474         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5475         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5476         with movff instruction,
5477         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5478         added pic16_int_regs, some packRegsFor* functions are commented out,
5479         because produce errors,
5480         * src/pic16/NOTES: minor modifications
5481
5482 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5483
5484         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5485         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5486         --pack-iram.
5487         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5488         * as/mcs51/lkaomf51.c: fixed bug #895763
5489
5490 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5491
5492         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5493
5494 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5495
5496         * doc/sdccman.lyx: added details about the HC08 storage classes and
5497         interrupts, fixed the register usage info for z80 & gbz80
5498
5499 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5500
5501         * doc/sdccman.lyx: added more pic16 port documentation
5502         * device/include/pic16/: added header pic18fregs.h
5503
5504 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5505
5506         * doc/sdccman.lyx: added Vangelis' contribution
5507
5508 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5509
5510         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5511         extend to the next CALL or PCALL, not just to the next CALL.
5512
5513 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5514
5515         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5516
5517 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5518
5519         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5520         bug #895752 and a better fix for bug #716790
5521
5522 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5523
5524         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5525
5526 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5527
5528         * doc/sdccman.lyx: minor changes, minor changed
5529
5530 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5531
5532         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5533         which can't handle SDCC_NEWONEBYTEOPS,
5534         (geniCodeMultiply): removed conversion from mult to shift for pic14
5535         and pic16
5536
5537 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5538
5539         * src/hc08/gen.h,
5540         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5541         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5542         thus fixing bug #895406
5543
5544 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5545
5546         * device/lib/_modsint.c,
5547         * device/lib/_modslong.c: sign follows divisor only
5548         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5549         signs or signedness can be ignored
5550         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5551         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5552         added optimization for IFX,
5553         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5554         arguments;
5555         reenabled optimization for IFX, which was removed on 2004-01-11
5556         * src/SDCCast.h: added return type IFX
5557         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5558         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5559         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5560         SDCC_OLDONEBYTEOPS selects the old behaviour
5561         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5562         changed again and commented promotion rule
5563         * src/SDCCval.c (valDiv): promotion no longer necessary
5564         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5565         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5566         rewritten
5567         * support/regression/tests/onebyte.c: added
5568
5569 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5570
5571         * gen.c (genInline): reverted to old code for assemnling inline
5572         code because of bug reported James Chadd
5573
5574 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5575
5576         * ralloc.h: missing declarations from previous patch,
5577         seems that patch for ralloc.h was never applied, fixed
5578
5579 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5580            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5581
5582         * pcode.c,
5583         * pcode.h,
5584         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5585         indirect addressing. Marked FSR0 as deprecated
5586         * gen.c (pointerCode): commented out, not needed now
5587         (pic16_popGet2p): new MOVFF helper function
5588         (genGenPointerGet),
5589         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5590         (shiftRLong): removed duplicate debugging info
5591
5592 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5593
5594         * src/ds390/gen.c (genNearPointerGet),
5595         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5596         optimization with bits, but not bitfields.
5597         * src/ds390/ralloc.c (packRegisters),
5598         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5599
5600 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5601
5602         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5603
5604 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5605
5606         * src/SDCCsymt.h,
5607         * src/SDCCicode.c (operandFromSymbol),
5608         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5609         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5610         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5611         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5612         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5613         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5614         bug #892038
5615         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5616         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5617         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5618         * src/SDCCsymt.c (newSymbol),
5619         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5620         enumerator_list),
5621         * src/SDCCval.h,
5622         * src/SDCCval.c (newiList): fixed bug #885705
5623
5624 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5625
5626         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5627         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5628
5629 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5630
5631         * device/include/c8051f120.h,
5632         * device/include/c8051f300.h,
5633         * device/include/c8051f310.h: added/updated header files for Silicon
5634         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5635         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5636         in new section Submitting patches
5637
5638 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5639
5640         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5641         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5642         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5643         genGenPointerSet),
5644         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5645         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5646         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5647         genGenPointerSet),
5648         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5649         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5650         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5651         genGenPointerSet),
5652         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5653         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5654         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5655         genGenPointerSet): fixed bug #892400
5656         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5657         to eliminate build warnings.
5658         * src/SDCCast.c (processParms),
5659         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5660         fixed bug 751859
5661         * support/valdiag/valdiag.py: added GCC to the list of defines active
5662         when compiling with gcc
5663
5664 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5665
5666         * support/Util/SDCCerr.h,
5667         * support/Util/SDCCerr.c,
5668         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5669         with an incomplete type (fixed bug #883734)
5670         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5671
5672 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5673
5674         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5675
5676 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5677
5678         * src/SDCCast.c (decorateType),
5679         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5680         function pointer implementation
5681         * support/regression/tests/funptrs.c: added tests to verify both forms
5682         of function pointers work correctly. Added tests to verify parameters
5683         are passed in the correct order.
5684
5685 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5686
5687         * device.c (regCompare): registers are sorted by ascending
5688         address and increasing size,
5689         * main.c (_pic16_finaliseOptions): removed the declaration
5690         of compiler macro MCU. Now a macro of the format pic18fxxxx
5691         will be defined from the command line
5692
5693 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5694             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5695
5696         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5697         PCOP_RLCF was overwritten!
5698         * gen.c (genSkip): commented out calls to pic16_emitcode,
5699         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5700         * (genlshTwo),
5701         * (genRRC): added debugging info,
5702         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5703         overwritten while shifting,
5704         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5705         overwritten while shifting,
5706         * (AccLsh),
5707         * (AccRsh),
5708         * (shiftLLeftOrResult),
5709         * (shiftRLeftOrResult),
5710         * (shiftRLong),
5711         * (shiftLLong): Implemented with pic16_emitpcode
5712         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5713         * (genLeftShift): Fixed bug, operand for shift by variable always
5714         was "and"ed with 0x0f,
5715         * (genLeftShiftLiteral),
5716         * (genrshTwo),
5717         * (genRightShiftLiteral): added debugging info,
5718         * (genrshFour): added comment,
5719         * (genRightShift): determined signedness from operand "left"
5720         instead of "result"
5721
5722 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5723
5724         * src/SDCCicode.c (geniCodeParms),
5725         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5726         function pointers, fixed function pointer bugs #861242 and #861896
5727
5728 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5729
5730         * device/include/c8051f000.h,
5731         * device/include/c8051f120.h,
5732         * device/include/c8051f300.h: added header files for Silicon
5733         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5734
5735 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5736
5737         * src/SDCCast.c (processParams): added new type flow and restructured
5738         (gatherAutoInit): added new type flow
5739         (addCast): cosmetic changes
5740         (getLeftResultType): added new type flow for array indices, patch
5741         provided by Stas, see FR #877103
5742         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5743         array index patch by Stas
5744         * src/SDCCast.h: added prototype getResultTypeFromType()
5745         * src/SDCCval.h,
5746         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5747         * src/pic/glue.c (pic14emitStaticSeg),
5748         * src/pic16/glue.c (pic16emitStaticSeg),
5749         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5750         for initialization of symbols
5751         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5752         * support/Util/SDCCerr.h:
5753         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5754         * .version: bumped version number to 2.3.8
5755         * device/include/Makefile.in (install),
5756         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5757         avoid warnings
5758
5759 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5760
5761         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5762         Slade Rich fixed an optimization bug
5763         * src/pic/pcodepeep.c,
5764         * src/pic/pcoderegs.c
5765         * doc/Makefile (install): added test for directory
5766
5767 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5768
5769         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5770         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5771         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5772         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5773         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5774         * as/mcs51/asexpr.c (term),
5775         * as/hc08/asexpr.c (term): fixed bug #887146
5776
5777 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5778
5779         * src/z80/gen.c (genMult): handle single byte result product
5780         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5781         DUMMY_READ_VOLATILE (fixed bug #886367)
5782
5783 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5784
5785         * support/regression/tests/libmullong.c: fixed logic, on little endian
5786         hosts we ended without a mullong_wrapper()
5787
5788 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5789
5790         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5791         virus/worm forged address usage.
5792
5793 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5794
5795         Fixed promotion, it should be done on AST level:
5796         * src/SDCCast.c (addCast): added promotion to int
5797         (decorateType): updated call to upCast()
5798         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5799         usualUnaryConversions()
5800
5801 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5802
5803         * support/regression/tests/literalop.c (mulWrapper): Added a
5804         wrapper to remove integer overflow warnings.
5805
5806         * support/regression/tests/float_trans.c: Made work on host.
5807
5808         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5809         location of sz80.
5810
5811         * support/regression/generate-cases.py (main): Changed from inline
5812         to a main method.
5813
5814         * doc/Makefile (install): Changed to depth first to get rid of
5815         missing directory install warning.
5816
5817         * as/Makefile (install-doc): Made work on Mac.
5818
5819 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5820
5821         * src/SDCCast.c: added an additional type flow in decorateType() of
5822         opposite direction, see feature request #860006; it's enabled at runtime
5823         by setting the environment variable SDCC_NEWTYPEFLOW
5824         * src/SDCCast.h: changed prototype of decorateType()
5825         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5826         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5827         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5828         see feature request #877103
5829         * src/SDCCval.c: updated call of decorateType()
5830         (valBitwise): fixed bug #882876
5831         (valMinus): added promotion
5832         (valLogicAndOr): result is unsigned
5833         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5834         * src/SDCCsymt.c (computeType),
5835         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5836         must not cause an unsigned operation
5837         * src/pic/glue (pic14emitRegularMap),
5838         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5839
5840 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5841
5842         * src/pic/pcode.c (PCodeID): commented out left over debug code
5843
5844 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5845
5846         * support/valdiag/tests/overflow.c: added shift tests
5847         * src/pic/device.c,
5848         * src/pic/gen.c,
5849         * src/pic/gen.h,
5850         * src/pic/glue.c,
5851         * src/pic/main.c,
5852         * src/pic/pcode.c,
5853         * src/pic/pcode.h,
5854         * src/pic/pcodepeep.c,
5855         * src/pic/pcoderegs.c,
5856         * src/pic/ralloc.c,
5857         * src/pic/ralloc.h: applied patch from Slade Rich;
5858         added support for multiple code pages and multiple RAM banks on the
5859         PIC 14 port. The ASM files now no longer simply assume all the
5860         code / RAM are in the same page / bank. This means the linker can
5861         safely allocate code/RAM of separate ASM files to different pages/banks.
5862         * doc/sdccman.lyx: added Slade's tips
5863         * src/mcs51/peeph.def: fixed bug #880768
5864
5865 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5866
5867         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5868         * src/SDCCast.c (decorateType): fixed bug #880197
5869
5870 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5871
5872         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5873         getopt.h.
5874
5875         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5876         strtof is not part of C89 and isn't included with Mac OS X.
5877
5878 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5879
5880         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5881         shiftL2Left2Result): fixed bug #879326
5882         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5883         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5884         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5885         address fetch for clr instruction
5886         * device/lib/hc08/_mulint.c: created optimized assembly version
5887         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5888
5889 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5890
5891         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5892         proposed in FR #877103
5893
5894 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5895
5896         * src/SDCCval.c (cheapestVal): added missing checks
5897         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5898         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5899
5900 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5901
5902         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5903         equal operands
5904
5905 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5906
5907         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5908         loaded with the linker search paths (-L arguments) and the libraries
5909         to be linked with the current source (-l arguments). Changes
5910         currently will affect only the pic16 port.
5911         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5912         include path the port specific paths and port specific libraries,
5913         * gplink command now contains the $3 argument,
5914         * src/pic16/device.h,
5915         * src/pic16/device.c,: structure PIC_device is made public and
5916         renamed to PIC16_device, the same for variable Pics which is renamed
5917         to Pics16. Updated all references to them.
5918         * src/pic16/glue.c (pic16glue): corrected bug with code
5919         initialization which bypassed the variable initializations block.
5920
5921         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5922         COMPILE_FLAGS and added the --nostdinc option
5923
5924 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5925
5926         * device/include/mc68hc908jb8.h: Register defs for another member
5927         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5928
5929 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5930
5931         Documenting changes from previous commits.
5932         * configure.in (version 1.56),
5933         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5934         when generating output files to configure the pic16 library,
5935         but now I've commented it out, since gputils aren't installed in the
5936         SF compile farm, so library won't compile
5937
5938         * device/lib/Makefile.in (version 1.56): initially I've added in
5939         target 'all' the prerequestive 'model-pic16' so it compiled the
5940         pic16 library, but now I've commented it out for the same reasons
5941         above,
5942         * added targets 'model-pic16' and 'objects-pic16' to compile the
5943         library
5944         * added target 'port-specific-objects-pic16' to handle the
5945         generated libraries and copy them into the build/ directory
5946         * added target 'clean-intermediate-pic16' to clean intermediate
5947         files into pic16 directory
5948         * in target 'installdirs' added line to create directory pic16 in
5949         the installation path
5950
5951         * device/include/Makefile.in (version 1.11): in target 'install'
5952         added lines to copy all header files to installation path,
5953         * in target 'installdirs' added line create directory for pic16
5954         headers in the installation path
5955
5956 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5957
5958         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5959          a function call
5960
5961 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5962
5963         * configure,
5964         * device/lib/configure.in,
5965         * device/lib/configure: fixed for autoconf 2.57
5966
5967 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5968
5969         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5970         option so that it actually works. Made it specific to the z80, since
5971         the gbz80 doesn't have these kinds of I/O ports.
5972
5973 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5974
5975         * device/include/z180.h,
5976         * device/lib/_memcpy.c,
5977         * device/lib/_memmove.c,
5978         * device/lib/_mulint.c,
5979         * device/lib/ser_ir.c,
5980         * device/lib/ser_ir_cts_rts.c,
5981         * device/lib/_strcmp.c,
5982         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5983         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5984         portmode; added deprecation warning for bank= and protmode= forms.
5985         Also, guard against buffer overflow.
5986         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5987
5988 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5989
5990         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5991         changed interrupt vector table generation to only emit declared vectors.
5992         * device/include/Makefile.in: added missing backslash
5993         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5994
5995 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5996
5997         Mainly changes to support compilation of the device libraries
5998         * src/pic16/device.c: stack is allocated via symbol and not
5999         via literal number. The symbol is placed in the corresponding
6000         position of the data ram
6001         * (pic16_dump_section): relocatable and absolute uninitialized
6002         data are now emitted in sorted order to reduce section naming,
6003         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6004         weren't marked as being in the access bank,
6005
6006 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6007
6008         Added portion of GNU PIC Library under the directory
6009         device/include/pic16 and device/lib/pic16. These files
6010         contain the declarations of SFRs for the PIC18Fxx2 devices.
6011         The directory is initialized via configure from toplevel.
6012
6013 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6014
6015         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6016         the spilllocations to be compared correctly
6017
6018 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6019
6020         * src/SDCCast.c (decorateType): fixed bug introduced today
6021
6022 2004-01-12  Borut Razem <borut.razem AT siol.net>
6023
6024         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6025         doc/sdccman.lyx: upper case pragmas are deprecated
6026
6027 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6028
6029         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6030         in simpler and even better code
6031
6032 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6033
6034         * src/SDCCicode.c (operandOperation): fixed bug #874819
6035         * src/SDCCast.c (decorateType): fixed
6036         char foo (unsigned long ul) { return ul > 0; }
6037
6038 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6039
6040         * doc/sdccman.lyx: Moved and added some sections, small changes
6041         all over. Telling LaTeX to be less strict with word spacing
6042         to better keep the right margin. Changed some notes about
6043         maintainance of the ports in section 3.2.1 - is it OK like this?
6044
6045 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6046
6047         SDCC source changes:
6048         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6049         convilong): modified to inform the pic16 port that builtin functions
6050         are external
6051
6052         PIC16 PORT specific changes:
6053         * src/pic16/device.c pic16_dump_equates() added,
6054         processor registers declared internally by the port are emitted in
6055         the translation as equates,
6056         * src/pic16/gen.c: inline code is passed unprocessed to the
6057         translation,
6058         * (pic16_popGetLit2): fnuction modified to take second operand as
6059         pCodeOp pointer and not as literal,
6060         * (popRegFromIdx): prefixed with pic16_,
6061         * (pic16_popCombine2): modified to receive already allocated pCode
6062         operands,
6063         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6064         * (genFunction): initializes local stack frame and pushes on stack
6065         all the registers used by this function,
6066         * (genEndFunction): restores all registers from stack and restores
6067         stack frame,
6068         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6069         improvements,
6070         * (pic16glue): changed the program startup sequence,
6071         * added new dbName code 'A' for functions placed in absolute section
6072         * src/pic16/main.c: added function attribute _naked,
6073         * added pragma 'code' to place a fnuction at an absolute address,
6074         * added command line arguments --debug-ralloc and --pcode-verbose,
6075         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6076         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6077         * (pic16_newpCodeOpLit2): modified to take the second operand as
6078         pCodeOp pointer,
6079         * (pic16_printpBlock): modified to emit each function in a separate
6080         section,
6081         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6082         UPPER for immediate operands,
6083         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6084         instruction,
6085         * src/pic16/peeph.def: all peepholes with movff are commented out,
6086         because there is a problem in the pcode peep optimizer,
6087         * src/pic16/ralloc.c: the register allocator can now reuse local
6088         function symbols for another function. This saves register usage.
6089         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6090
6091         Added file src/pic16/NOTES with information about program writing on
6092         the current port version.
6093
6094 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6095
6096         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6097         and peephole 252 (array access)
6098
6099 2004-01-09  Borut Razem <borut.razem AT siol.net>
6100
6101         * src/SDCCmain.c : fixed #872250: -l command line defined library
6102           files are scanned before standard library files
6103
6104 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6105
6106         * src/SDCCast.c (decorateType): fixed bug #874046
6107
6108 2004-01-09  Borut Razem <borut.razem AT siol.net>
6109
6110         * support/scripts/sdcc.nsi: remove previous installation
6111
6112 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6113
6114         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6115         bytes for last interrupt vector (mcs51)
6116         * sdcc.spec: fixed typo
6117
6118 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6119
6120         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6121         gen51Code): more efficient parameter receive for --model-large
6122         ("bug" #845294)
6123
6124 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6125
6126         * src/ds390/main.c,
6127         * src/z80/main.c: added missed needLinkerScript flags (more than
6128         one port structure defined in these file)
6129         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6130         bug #795325
6131
6132 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6133
6134         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6135         * src/port.h: added flag needLinkerScript in port->linker
6136         structure to inform whether to create a .lnk file or not,
6137         * src/avr/main.c,
6138         * src/ds390/main.c,
6139         * src/hc08/main.c,
6140         * src/mcs51/main.c,
6141         * src/pic/main.c,
6142         * src/pic16/main.c,
6143         * src/xa51/main.c,
6144         * src/z80/main.c: changed appropriately to configure
6145         needLinkerScript flag
6146         * src/pic/gen.c,
6147         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6148         * src/pic/glue.c: added variable udata_section_name to
6149         override default uninitialized data segment definition for
6150         devices only with SHAREBANK memory (reported from Erik Epetrich)
6151         * (pic14emitOverlay): modified to emit a commented overlay segment
6152         directive when no overlay data exist
6153         * (picglue): modified to emit uninitialized data segment
6154         according to udata_section_name
6155         * src/pic/main.c (_pic14_parseOptions): added command line
6156         options --udata-section-name=[name] to override default
6157         udata definition name
6158         * modified _linkCmd and _asmCmd to include compiler passed
6159         arguments via -W option
6160         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6161         object file from '.rel' to '.o' in port->linker structure,
6162         changed size of fptr from 2 to 3 in port structure
6163
6164 2004-01-07  Borut Razem <borut.razem AT siol.net>
6165
6166         * support/scripts/sdcc.nsi: update PATH
6167         * support/scripts/sdcc.ico: craeted
6168
6169 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6170
6171         * device/include/Makefile.in: fix install
6172         * doc/Makefile: fix install
6173
6174 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6175
6176         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6177         in bug #860505
6178         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6179         how the function variable allocation summary is displayed; also
6180         include information about variables allocated to the overlay
6181         segment
6182
6183 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6184
6185         * as/mcs51/lkmain.c: Help about -Y option
6186         * as/mcs51/lkarea.c: Fixed gcc warnings
6187
6188 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6189
6190         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6191         fixed warning
6192         * support/valdiag/tests/overflow.c: added
6193         * src/SDCCast.c (decorateType),
6194         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6195         LEFT_OP (left shift)
6196
6197 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6198
6199         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6200         (default behaviour).
6201
6202 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6203
6204         A python script to validate compiler diagnostic messages. It can be
6205         used to verify that sdcc complains about bad c source code and
6206         gives a good location of the error.
6207         * support/valdiag/Makefile,
6208         * support/valdiag/valdiag.py,
6209         * support/valdiag/tests/*
6210
6211 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6212
6213         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6214         * src/SDCCsymt.c (newEnumType),
6215         * src/SDCCsymt.h
6216         * support/Util/SDCCerr.c,
6217         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6218         enum related bugs.
6219         * support/regression/tests/enum.c: added test for enum values that
6220         require at least 2 bytes of storage.
6221
6222 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6223
6224         * src/common.h: added ifndef/define/endif macros
6225         around the header file.
6226         Bug reported from Jesus Calvino-Fraga
6227
6228 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6229
6230         * sdcc.spec: updated
6231         * device/include/Makefile.in: don't install CVS directories
6232         * device/lib/Makefile.in: added removal of CVS directories after install
6233         * doc/Makefile: fixed install, added local_icons
6234         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6235         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6236         * src/ds390/gen.c (genRightShift): fixed bug #870788
6237         * src/SDCCast.c (decorateType): fixed bug #870781
6238
6239 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6240
6241         PIC16 port related changes:
6242         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6243         added variable stackPos,
6244
6245         * gen.c: genCall, assignResultValue: added support for
6246         pushing/retrieving function parameters to/from stack,
6247         genFunction,genEndFunction: setup stack frame for the
6248         generated function,
6249         genAddrOf: will be changed according to bug 863624
6250
6251         * added files genutils.c and genutils.h which contain gen*
6252         debugged and optimised functions extracted from gen.c
6253
6254         * glue.c: added variable 'externs' which holds extern symbols,
6255         pic16emitRegularMap: is modified to properly handle relocatable
6256          symbols under the new scheme,
6257         pic16createInterruptVect: is modified
6258         pic16printPublics: is modified to emit 'global' assembler directives,
6259         added pic16_printExterns to print extern symbols,
6260         pic16glue: initializes stack/frame pointer in the beginning of
6261         the assembly output. Temporary hack, will be corrected later,
6262         because gplink yet does not support stack and SDCC does not
6263         yet support a type of crt0.o object to create the final binary.
6264
6265         * Removed many lines that contain 8051 legacy code.
6266         * The code is finally placed under a 'code' directive.
6267         * Added port specific options.
6268
6269         * _process_pragma: simplified since now we do not need *special*
6270         include file to define SFR registers. But a separate header
6271         will be needed. This will be developed later.
6272         * _pic16_parseOptions: added, parses port specific options:
6273         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6274         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6275         --preplace-udata-with=
6276
6277         * _pic16_setDefaultOptions: modified to initialize section names,
6278         but hack is temporarly out of order since it needs improvement.
6279         * _pic16_genAssemblerPreamble: configuration words are emitted by
6280         their address instead of their name. This part is incomplete and
6281         supports only the 18Fxx2 devices. Other devices will emit an error
6282         during assembly since they do not contain the same set of config
6283         registers
6284         * _pic16_genIVT: is modified,
6285
6286         * pcode.c: added definitions for some hardware registers that are needed
6287         for stack support
6288         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6289         All PCI entries are updated. Now LFSR is supported.
6290         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6291         * added pic16_newpCodeOpLit2 to support instructions with
6292         two literal arguments
6293         * pic16_pCode2str: corrected code that emits assembler instructions
6294         with two literal operands and those that have an access bit modifier
6295         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6296         this fixes a bug which caused some labels to be lost, when an
6297         assembler directive was added, i.e. banksel,
6298         * pic16_FixRegisterBanking: improved logic that causes the insertion
6299         of bank switching,
6300         * InlineFunction: functions that are called once, are not any more
6301         inlined. This can be a port option in the future,
6302
6303         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6304
6305         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6306         hold the corresponding uninitialized symbols,
6307         * pic16_allocProcessorRegister: registers have explicit marked the
6308         accessBank field,
6309         * pic16_allocInternalRegister: registers are explicit marked as
6310         not used,
6311         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6312         processing list, so bit registers were lost,
6313         *
6314
6315         * ralloc.h: added field 'accessBank' and original symbol operand
6316         in register definition,
6317         * removed the field isMapped from register definition,
6318
6319         ** Several functions have been removed from various sources:
6320         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6321         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6322         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6323         pic16_assignRelocatableRegisters
6324
6325         ** others have been introduced:
6326         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6327         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6328
6329 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6330
6331         * support/scripts/inc2h.pl: changed definition of BIT_AT
6332         to emit 'sbit at' instead of 'bit at'. This was a request.
6333
6334         PIC16 port related preliminary changes:
6335         * gen.c: prefixed function popRegFromString with
6336         pic16_ and all references to it corrected
6337         * pcode.c: all pic16_pc_* hardware registers prefixed
6338         with underscore (_),
6339         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6340         * ralloc.c: newReg(): when register is REG_SFR then
6341         set address to rIdx,
6342         pic16_allocProcessorRegister(): marks register wasUsed=0
6343         pic16_writeUsedRegs(): added a call to assign processor
6344         registers via pic16_assignFixedRegisters
6345
6346 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6347
6348         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6349         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6350         variables in unused register banks.  Also the SSEG is placed
6351         wherever there is enough space for it, and IDATA can be anywhere
6352         in internal RAM.  For now compile using -Wl-Y[stack_size].
6353         The mem file is different for this option as well, since it
6354         makes no sense of talking about DSEG lenght.
6355
6356 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6357
6358         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6359         in certain cases, e.g. when ROM assignment, patch provided
6360         from Albert den Haan.
6361
6362 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6363
6364         Many signedness and type propagation fixes:
6365         * src/SDCCicode.c: made geniCodeCast() static
6366         replaced SPEC_ by IS_ (cosmetic)
6367         (operandOperation): fixed div and mod operation
6368         (usualBinaryConversions): added support for promotion of char
6369         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6370         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6371         (geniCodeAdd): an array index will stay unsigned, even if promoted
6372         from char to int
6373         (geniCodeArray): ditto
6374         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6375         * src/SDCCsymt.c (computeType): added more support for char;
6376         promotion of char is selectable by promoteCharToInt, fixed signedness
6377         for all cases
6378         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6379         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6380         * src/SDCCval (val*): replaced signedness calculation by
6381         computeType()
6382         rearranged if-branches (cosmetic)
6383         (valShift): added warning W_SHIFT_CHANGED
6384         (valCompare): fixed problem with different types
6385         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6386         * support/regression/tests/literalop.c: added many cases
6387         * support/regression/tests/ast_constant_folding.c: changed finally to
6388         'unsigned int'
6389         * .version: new year, new version: 2.3.7
6390         * src/SDCCmain.c (main): applied patch #866468
6391         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6392         provided by Scott Bronson
6393         * doc/sdccman.lyx: updated documentation for sdcdb
6394         updated and added chapter tips
6395
6396 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6397
6398         * src/SDCCsymt.h: missing from yesterday's commits
6399
6400 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6401
6402         * src/SDCC.y (struct_or_union_specifier),
6403         * support/Util/SDCCerr.c,
6404         * support/Util/SDCCerr.h: verify that struct & union tags are used
6405         as declared.
6406
6407 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6408
6409         * src/SDCCglobl.h: missing from yesterday's commits
6410
6411 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6412
6413         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6414         sft_attributes, struct_declaration, parameter_declaration,
6415         type_name, start_block, declaration_list),
6416         * src/SDCC.lex (check_type): support redefinition of typedef names
6417
6418 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6419
6420         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6421         aligned xdata arrays. Erik helped me with the if clause.
6422
6423 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6424
6425         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6426         warning
6427
6428 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6429
6430         * src/SDCCast.h,
6431         * src/SDCCast.c (newAst_),
6432         * src/SDCCicode.h,
6433         * src/SDCCicode.c (ast2iCode, newiCode),
6434         * src/SDCCglobl.h,
6435         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6436         expr, statement, expression_statement, selection_statement,
6437         iteration_statement, expr_opt, jump_statement): foundation for tracking
6438         sequence points
6439         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6440         point code too)
6441
6442 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6443
6444         * support/Util/SDCCerr.c,
6445         * src/SDCCast.h,
6446         * src/SDCCast.c (createCase, createDefault, decorateType),
6447         * src/SDCClabel.c (labelUnreach),
6448         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6449         to error messages.
6450         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6451         (with thanks to Stas Sergeev)
6452         * device/include/time.h,
6453         * device/lib/time.c (CheckTime): suppress unreachable code warning
6454
6455 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6456
6457         * src/SDCCast.c (createIvalCharPtr),
6458         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6459         bug #753752)
6460         * support/regression/tests/nullstring.c: tests for these two bugs
6461
6462 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6463
6464         * support/Util/SDCCerr.h,
6465         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6466         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6467         about storage class and 'at' used inside struct or union
6468         * src/SDCCBBlock.c (iCodeFromeBBlock),
6469         * src/SDCCcse.c (ifxOptimize),
6470         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6471         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6472         printIval, emitStaticSeg, emitOverlay),
6473         * src/SDCClabel.c (deleteIfx),
6474         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6475         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6476         gatherAutoInit, processParms),
6477         * support/Util/SDCCerr.h,
6478         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6479         reporting for post-parse errors.
6480
6481 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6482
6483         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6484         implicit casts via union; they don't work on big endian systems
6485         (possible fix for bug #861138)
6486
6487 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6488
6489         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6490         * src/mcs51/main.c: fixed the fix for bug #737001
6491
6492 2003-12-15  Borut Razem <borut.razem AT siol.net>
6493
6494         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6495
6496 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6497
6498         * support/makebin/makebin.c: put output in binary mode
6499
6500 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6501
6502         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6503         xdata and data memory on startup. Set the environment variable
6504         SDCC_NOGENRAMCLEAR to disable this.
6505         * src/mcs51/peephole.def,
6506         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6507         (allows non-interrupt and interrupt code to safely compete for a resource
6508         without the non-interrupt code having to disable interrupts)
6509
6510 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6511
6512         * src/SDCCicode.c (geniCodeAdd),
6513         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6514         with valFromType if type might be a pointer and host is big endian).
6515         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6516         types, not just integer types.
6517         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6518         multiply defined with mismatching "at" address.
6519
6520 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6521
6522         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6523         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6524         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6525         with embedded nulls (fixed bug #753752)
6526
6527 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6528
6529         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6530         Apparently this did not see much testing (endless loop)
6531
6532 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6533
6534         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6535
6536 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6537
6538         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6539         gracefully handle NULL memmap pointers
6540
6541 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6542
6543         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6544         instead of deleting the iCode when an operand is volatile
6545         * src/z80/gen.c (genDummyRead),
6546         * src/mcs51/gen.c (genDummyRead),
6547         * src/ds390/gen.c (genDummyRead),
6548         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6549         not just IC_RIGHT
6550         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6551         * src/SDCC.y: fixed bug #850420
6552
6553 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6554
6555         Applied z80 i/o port patch from Peter Townson and fixed some operators
6556         to better handle operands in A register.
6557         * device/include/z180.h
6558         * src/SDCC.y
6559         * src/SDCCglue.c
6560         * src/z80/gen.c
6561         * src/z80/gen.h
6562         * src/z80/main.c
6563         * src/z80/peeph-z80.def
6564         * src/z80/peeph.def
6565         * src/z80/z80.h
6566
6567 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6568
6569         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6570
6571 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6572
6573         * device/lib/hc08/_mullong.c: Removed extra #endif
6574
6575 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6576
6577         * sim/ucsim/hc08.src/inst.cc,
6578         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6579         carries from x to h
6580         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6581         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6582         * device/include/stdarg.h: fixed varargs for hc08
6583         * device/lib/Makefile.in,
6584         * device/lib/hc08/Makefile,
6585         * device/lib/hc08/_mulint.c,
6586         * device/lib/hc08/_mullong.c: fixed some endian problems
6587
6588 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6589
6590         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6591         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6592         * device/lib/_gptrget.c,
6593         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6594
6595 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6596
6597         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6598         * src/SDCCast.c (astErrors): fixed bug #846007
6599         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6600
6601 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6602
6603         * src/SDCCast.c (decorateType): disabled a transformation I added in
6604         revision 1.188 (access to fields of a structure at an absolute address);
6605         it breaks with bitfields, extern declarations, and gcse analysis.
6606         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6607         could be assigned through a pointer, so don't complain.
6608         * src/SDCCast.c (astErrors),
6609         * src/SDCCast.h,
6610         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6611
6612 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6613
6614         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6615         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6616         output of __config directives, since gpasm now supports them
6617         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6618         pre-processor macro, i.e. -DMCU=p18f452
6619         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6620         and modified to handle 'cast' icode similarly to '=' icode
6621         * src/pic16/device.h (typedef struct PIC_device): added field
6622         'extMIface' to indicate that chip has external memory interface
6623         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6624         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6625         18F8720
6626
6627 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6628
6629         * src/SDCC.y (pointer): fixed bug #846006
6630         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6631         * src/SDCCast.c (decorateType): fixed bug #846009
6632         * src/ds390/peeph.def,
6633         * src/ds390/gen.c (genAnd, genOr),
6634         * src/mcs51/peeph.def,
6635         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6636
6637 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6638
6639         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6640         * src/SDCCdflow.c
6641         * src/SDCCcse.c
6642         * src/SDCCcse.h
6643         * src/SDCCBBlock.h
6644         * src/SDCCBBlock.c
6645
6646 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6647
6648         fixed bug #845089
6649         * src/SDCCbitv.h,
6650         * src/SDCCbitv.c: added function to free a bitvector
6651         * src/SDCClrange.h,
6652         * src/SDCClrange.c: added function to recompute the liveranges
6653         * src/avr/ralloc.c,
6654         * src/ds390/ralloc.c,
6655         * src/hc08/ralloc.c,
6656         * src/mcs51/ralloc.c,
6657         * src/pic/ralloc.c,
6658         * src/pic16/ralloc.c,
6659         * src/xa51/ralloc.c,
6660         * src/z80/ralloc.c: recompute the liveranges after register packing
6661
6662 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6663
6664         * src/SDCCloop.c (newInduction): fixed bug #845630
6665
6666 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6667
6668         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6669         inadvertantly left behind from my 2003-11-12 change
6670
6671 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6672
6673         Updated headers I neglected to commit yesterday.
6674         * src/SDCClrange.h,
6675         * src/SDCCicode.h
6676
6677 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6678
6679         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6680         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6681         * src/SDCCopt.c (eBBlockFromiCode),
6682         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6683         the creation of the key hash table from the sequencing so it can be used
6684         earlier (for some GCSE bug fixes still pending)
6685
6686 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6687
6688         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6689         * support/regression/tests/addsub.c: testing genPlus shortcut
6690
6691 2003-11-15  Borut Razem <borut.razem AT siol.net>
6692
6693         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6694
6695 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6696
6697         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6698         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6699         ordering is immaterial.
6700         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6701
6702 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6703
6704         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6705         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6706         (SIGSEV) of bug #840381
6707         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6708         unlink new file before rename if new and old filenames are the same)
6709
6710 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6711
6712         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6713         uninitialized variables) for the mcs51. Set environment variable
6714         SDCC_GENRAMCLEAR to test.
6715         xdata initialization slightly shorter
6716
6717 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6718
6719         * src/SDCCsymt.h,
6720         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6721         #838241 & 780691 (basicly the same bug)
6722         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6723         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6724
6725 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6726
6727         * src/SDCCmain.c (linkEdit): "fix" #834252
6728
6729 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6730
6731         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6732         * src/SDCCast.h,
6733         * src/SDCC.y: fixed bug #819403
6734
6735 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6736
6737         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6738         the reentrant attribute.
6739         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6740         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6741         simulation
6742         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6743         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6744         erroneously reduced to a literal.
6745         * src/hc08/ralloc.c (packRegisters, rematStr),
6746         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6747         some cases
6748
6749 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6750
6751         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6752         * doc/sdccman.lyx: changed from 'article' to 'book'
6753         * doc/Makefile: readded test_suite_spec and cdbfileformat
6754
6755 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6756
6757         * device/include/stdlib.h: include malloc.h to comply with ANSI
6758         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6759
6760 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6761
6762         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6763         * doc/clean.mk: also remove *.out files
6764         * doc/sdccman.lyx: some additions, larger top/bottom margins
6765
6766 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6767
6768         * src/SDCC.y: fixed bug #837365
6769         * support/regression/tests/bitopcse.c
6770         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6771         a symbol (might be valop instead)
6772         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6773         * device/lib/clean.mk: added hc08 to the cleaning list
6774
6775 2003-11-04  Borut Razem <borut.razem AT siol.net>
6776
6777         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6778           made 2003-11-04
6779         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6780           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6781           malloc is declared in standard stdlib.h
6782
6783 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6784
6785         * device/lib/hc08/Makefile: need to clean .rel not .o files
6786         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6787
6788 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6789
6790         * src/port.h,
6791         * src/hc08/main.c,
6792         * src/mcs51/main.c,
6793         * src/ds390/main.c,
6794         * src/z80/main.c,
6795         * src/avr/main.c,
6796         * src/pic/main.c,
6797         * src/pic16/main.c,
6798         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6799         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6800         tests (which uses the port's oclsExpense function)
6801         * src/SDCC.y,
6802         * src/SDCCast.c,
6803         * src/SDCCicode.c,
6804         * src/hc08/gen.c,
6805         * src/ds390/gen.c,
6806         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6807
6808 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6809
6810         * src/SDCCcse.c (ifxOptimize),
6811         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6812         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6813         deleting the IFX iCode.
6814         * src/hc08/ralloc.c: reduced unneeded slocs
6815         * src/hc08/gen.c: fixed bug in asmopToBoolean
6816
6817 2003-11-04  Borut Razem <borut.razem AT siol.net>
6818
6819         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6820           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6821           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6822           transferred to configure
6823
6824 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6825
6826         Use headers defined in the C[++] standards:
6827         * sim/ucsim/gui.src/serio.src/fileio.cc
6828         * sim/ucsim/gui.src/serio.src/frontend.cc
6829         * sim/ucsim/gui.src/serio.src/main.cc
6830         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6831         * support/Util/NewAlloc.c
6832         * as/hc08/lklibr.c
6833         * as/mcs51/lklibr.c
6834         * as/z80/aslist.c
6835         * as/z80/assym.c
6836
6837 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6838
6839         * Added MSVC projects for hc08 assembler and linker:
6840         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6841         /as/hc08/link_hc08.dsp
6842
6843 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6844
6845         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6846
6847 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6848
6849         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6850
6851 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6852
6853         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6854
6855 2003-10-31  Borut Razem <borut.razem AT siol.net>
6856
6857         * support/cpp2/cpplib.h,
6858           support/cpp2/cpplib.c,
6859           support/cpp2/cpplex.c,
6860           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6861           to switch _asm block preprocessing on / off. Default is
6862           #pragma preproc_asm +
6863
6864 2003-10-31  Borut Razem <borut.razem AT siol.net>
6865
6866         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6867           when outputting comment blocks (when executed with -C option) and
6868           _asm (SDCPP specific) blocks
6869
6870 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6871
6872         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6873
6874 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6875
6876         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6877
6878 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6879
6880         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6881         * src/SDCCast.c (decorateType): fixed bug #832664
6882
6883 2003-10-31  Borut Razem <borut.razem AT siol.net>
6884
6885         * support\cpp2\cpplex.c: fixed for SDCPP:
6886           comments(when executed with -C option) and _asm blocks
6887           were included even if they where in skipped #if block.
6888           Applied solution from GCC cpp 3.3.2
6889
6890 2003-10-31  Borut Razem <borut.razem AT siol.net>
6891
6892         * src/SDCC.lex: sdcc now understands both formats:
6893           '# <line_number> <file_name>' and
6894           '#line <line_number> <file_name>'
6895         * support/cpp2/cppmain.c: sdcpp now generates the standard
6896           '# <line_number> <file_name>' instead of former
6897           '#line <line_number> <file_name>'
6898
6899 2003-10-30  Borut Razem <borut.razem AT siol.net>
6900
6901         * support/cpp2/cpphash.h,
6902         * support/cpp2/cpplib.h
6903         * support/cpp2/cpplex.c,
6904         * support/cpp2/cppmain.c,
6905         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6906
6907 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6908
6909         Fixed a number of problems revealed by bug #827883.
6910         * src/SDCCloop.c (loopInvariants): Spill location of the
6911         result operand should be recomputed if extracted from
6912         a loop. Also, don't extract assignments of an iTemp
6913         from a literal.
6914         * src/SDCCast.c (isConformingBody): loop reversal should
6915         not occur if the control variable is involved with a
6916         relational operator.
6917
6918 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6919
6920         * .version: bumped to 2.3.6 to reflect the big improvements
6921         made by Erik and Klaus. Thanks!
6922
6923 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6924
6925         Replaced the livrange code.
6926         * src/SDCClrange.c: added new LR code
6927         * src/SDCCloop.c,
6928         * src/SDCCBBlock.h: removed remainig parts from old LR code
6929         * src/ds390/ralloc.c,
6930         * src/ds390/gen.c: minor fixes to make it work with new code
6931
6932 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6933
6934         * as/hc08/asm.h,
6935         * as/hc08/lkrloc.c,
6936         * src/hc08/gen.c,
6937         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6938         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6939         (tweaked fix for bug #818696)
6940
6941 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6942
6943         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6944
6945 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6946
6947         * src/SDCCmain.c,
6948         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6949         * src/mcs51/gen.c (gencjneshort),
6950         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6951         more efficient (per Scott Bronson's suggestion)
6952
6953 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6954
6955         Extended the semantics of the critical keyword to include
6956         individual statements. See RFE #827755 and #799831
6957         * src/SDCC.y
6958         * src/SDCCicode.c
6959         * src/SDCCopt.c
6960         * src/SDCCast.c
6961         * support/Util/SDCCerr.c
6962         * support/Util/SDCCerr.h
6963         * src/mcs51/gen.c
6964         * src/ds390/gen.c
6965         * src/hc08/gen.c
6966
6967 2003-10-19  Borut Razem <borut.razem AT siol.net>
6968
6969         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6970
6971 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6972
6973         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6974         Fixed bug #818696
6975         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6976         and predecrement operand is displayed
6977
6978 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6979
6980         * src/SDCCval.c (valMinus): fixed bug #826041
6981
6982 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6983
6984         Some hc08 related updates that I missed earlier
6985         * sim/ucsim/stypes.h
6986         * support/regression/ports/hc08/spec.mk
6987
6988 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6989
6990         New target "hc08" for the Motorola 68hc08 family of micros
6991
6992         * configure
6993         * configure.in
6994         * Makefile
6995         * src/hc08/*
6996         * src/SDCCmain.c
6997         * src/port.h
6998         * sim/ucsim/hc08.src/*
6999         * sim/ucsim/configure.in
7000         * src/ucsim/configure
7001         * sim/ucsim/packages_in.mk
7002         * as/hc08/*
7003         * as/Makefile
7004         * device/include/mc68hc908qy.h
7005         * device/lib/hc08/*
7006         * device/lib/Makefile.in
7007         * support/regression/ports/hc08/*
7008         * support/regression/Makefile
7009
7010 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7011
7012         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7013         regression test
7014         * src/ds390/gen.c (genCast): fixed bug #821957
7015
7016 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7017
7018         * device/lib/logf.c: "fixed" overlay bug
7019         * support/regression/ports/host/spec.mk: added m library
7020         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7021         * support/regression/tests/float_trans: added (for Eric)
7022
7023 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7024
7025         * src/mcs51/gen.c (genCpl): fixed bug
7026         http://sf.net/mailarchive/message.php?msg_id=6263915
7027
7028 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7029
7030         * src/SDCCast.c (decorateType): added extended constant folding
7031         * src/SDCCsymt.c (computeType): cleanup
7032         * src/SDCCval.c (valShift): minor optimization
7033         * support/regression/tests/ast_constant_folding.c: added
7034
7035 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7036
7037         * src/SDCCmain.c: removed some unintended changes
7038
7039 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7040
7041         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7042         * src/z80/gen.c: fixed part of bug #817589
7043         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7044
7045 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7046
7047         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7048         * src/SDCCcflow.c
7049         * src/SDCCcse.c
7050         * src/SDCCdflow.c
7051         * src/SDCClabel.c
7052         * src/SDCClrange.c
7053         * src/SDCCmem.c
7054         * src/SDCCopt.c
7055         * src/SDCCpeeph.c
7056         * src/SDCCset.c
7057         * src/avr/ralloc.c
7058         * src/ds390/ralloc.c
7059         * src/izt/ralloc.c
7060         * src/mcs51/ralloc.c
7061         * src/pic/ralloc.c
7062         * src/pic16/ralloc.c
7063         * src/xa51/ralloc.c
7064         * src/z80/ralloc.c
7065         * src/z80/gen.c: removed unused label "release:"
7066
7067 2003-10-06  Borut Razem <borut.razem AT siol.net>
7068
7069         * src/SDCC.lex: removed definition of unused variables
7070           save_optimize and save_options
7071
7072 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7073
7074         * clean.mk: removed '=' in "-maxdepth=1"
7075         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7076         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7077
7078 2003-10-06  Borut Razem <borut.razem AT siol.net>
7079
7080         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7081           my_unput() replaced by unput()
7082
7083 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7084
7085         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7086         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7087         type-punned pointer will break strict-aliasing rules"
7088         Old LR behaviour is again default; Klaus' LR can be choosen by
7089         defining the environment variable LRKLAUS
7090         * src/SDCCBBlock.h
7091         * src/SDCCloop.c
7092         * src/SDCClrange.c
7093         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7094         * clean.mk: fixed removal of files in bin/CVS/
7095         * device/lib/clean.mk: fixed removal of directories small and large
7096         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7097         * src/SDCCicode.c,
7098         * src/SDCCval.c: removed superflous test for pedantic
7099
7100 2003-10-05  Borut Razem <borut.razem AT siol.net>
7101
7102         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7103           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7104           message "unmatched #pragma SAVE and #pragma RESTORE"
7105
7106 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7107
7108         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7109           assembly, critical functions, atomic, nojtbound)
7110
7111 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7112
7113         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7114         * src/SDCCBBlock.h
7115         * src/SDCCloop.c
7116         * src/SDCCloop.h
7117         * src/SDCClrange.c
7118
7119 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7120
7121         * src/z80/gen.h,
7122         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7123         * src/mcs51/gen.h
7124         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7125         * src/ds390/gen.h
7126         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7127         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7128         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7129
7130 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7131
7132         * src/z80/gen.c (genRet): fixed bug #524753
7133         * src/z80/gen.c (genCast): fixed internal error on cast from
7134         pointer to long
7135         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7136         fix for bug #477835 to the z80
7137         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7138         for tracking iCodes in the peephole optimizer for z80
7139
7140 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7141
7142         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7143         the other part of bug #814548
7144         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7145
7146 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7147
7148         * src/SDCCcse.c: fixed part of bug #814548
7149
7150 2003-09-28  Borut Razem <borut.razem AT siol.net>
7151
7152         * src/asm.c: rewrite of printILine() to use temporary file instead
7153           a pipe
7154         * src/xa51/main.c: commented out declaration of int rewinds
7155
7156 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7157
7158         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7159
7160 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7161
7162         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7163         * src/asm.c (printILine): Fixed bug #811015
7164
7165 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7166
7167         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7168         freeing.
7169
7170 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7171
7172         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7173         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7174         to correctly handle general case of AOP_PAIRPTR
7175         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7176
7177 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7178
7179         * src/mcs51/ralloc.c (fillGaps),
7180         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7181         register positioning bug)
7182
7183 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7184
7185         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7186
7187 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7188
7189         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7190         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7191         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7192         (ralloc doesn't intentionally do this now, but perhaps later)
7193         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7194         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7195         register positioning bugs (Fixed bug #762602 and #795325)
7196         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7197         (Fixed bug #808779)
7198         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7199         lines that --i-code-in-asm generates
7200
7201 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7202
7203         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7204         trying to fclose a FILE* that was already closed.
7205
7206 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7207
7208         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7209         of const struct should be treated as if const themselves)
7210
7211 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7212
7213         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7214
7215 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7216
7217         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7218         Unix (/n) and DOS (/r/n) line terminations.
7219
7220 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7221
7222         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7223         bug #613775
7224
7225 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7226
7227         * src/mcs51/gen.c (genFunction, genEndFunction),
7228         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7229         and restore of EA so that stack offsets to parameters are
7230         correct when using both critical and reentrant/stack-auto.
7231         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7232         size (can be triggered in error if sloc is shared between
7233         different sized objects)
7234         * device/include/float.h: fixed macros to explicitly use
7235         unsigned long where needed
7236
7237 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7238
7239         Feature req. 799831: added code to allow nesting of critical functions
7240         * src/mcs51/gen.c (genFunction, genEndFunction)
7241         * src/ds390/gen.c (genFunction, genEndFunction)
7242
7243 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7244
7245         * src/SDCCsymt.c (sclsFromPtr),
7246         * src/SDCCsymt.h,
7247         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7248         support for standard C idiom of memory mapped variables; for
7249         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7250         to xdata int at 0x1234 tempvar = 1.
7251         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7252         provided by Akiya ISHIDA
7253
7254 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7255
7256         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7257         * src/SDCCval.c (constVal): added reduction from int to char
7258         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7259         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7260         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7261         to ignore the sign
7262         * support/regression/tests/shifts.c: fixed
7263
7264 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7265
7266         * src/z80/gen.c (genXor): Fixed bug #805445
7267
7268 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7269
7270         Fixed bug #621531 (const & volatile confusion in the type chain).
7271         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7272         refer to the const or volatile state of the pointer itself.
7273
7274         * src/SDCCast.c
7275         * src/SDCCglue.c
7276         * src/SDCCicode.c
7277         * src/SDCCsymt.c
7278         * src/SDCCval.c
7279         * src/SDCC.y
7280         * src/SDCCsymt.h
7281         * src/pic/gen.c
7282         * src/pic/ralloc.c
7283         * src/pic16/gen.c
7284         * src/pic16/ralloc.c
7285         * support/regression/tests/const.c
7286
7287 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7288
7289         When checking for duplicated modules, use absolute paths
7290         instead of relative paths.  Files changed:
7291
7292         * as/mcs51/lklib.c
7293         * link/z80/lklib.c
7294
7295 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7296
7297         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7298
7299 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7300
7301         * device/include/string.h: added size_t typedef, changed
7302         prototypes to use size_t, eliminated separate reentrant and
7303         non-reentrant declarations, added _memmove declaration
7304         * device/lib/_memcpy.c: changed to use size_t instead of int,
7305         changed /4 to >>2 to avoid division library call
7306         * device/lib/_memcmp.c,
7307         * device/lib/_memset.c,
7308         * device/lib/_strncat.c,
7309         * device/lib/_strncpy.c,
7310         * device/lib/_strncmp.c: changed to use size_t instead of int
7311         * device/lib/_memmove.c: new file (fixed bug #772294)
7312         * device/lib/Makefile.in: added _memmove.c
7313         * device/lib/z80/asm_strings.s: fixed bug #772290
7314         * support/regression/tests/bitfields.c: attempt to fix host assertion
7315         failure on amd64-unknown-linux2.2
7316
7317 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7318
7319         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7320         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7321         * as/z80/asmain.c (main): fixed bug #801766
7322
7323 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7324
7325         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7326         compilers
7327
7328 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7329
7330         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7331         reported in bug #800609
7332
7333 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7334
7335         * Top header beautifications in src/pic16 directory:
7336           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7337           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7338           pcoderegs.h, ralloc.c, ralloc.h
7339         * main.c: added top header and GPL license notice
7340         * pcode.c: fixed the if-conditional warning
7341
7342 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7343
7344         * device/lib/_mullong.c: replaced int by short for gcc
7345
7346 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7347
7348         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7349         and JUMPTABLE iCodes properly now (worked by accident before)
7350         * src/mcs51/gen.c (leftRightUseAcc),
7351         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7352         iCode properly now. Use getSize instead of nRegs since a & b
7353         aren't part of the nRegs tally.
7354
7355 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7356
7357         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7358         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7359           before instructions that use the _STATUS register
7360
7361 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7362
7363         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7364         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7365         fetching of the pointer
7366         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7367         copied from genNearPointerSet()
7368         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7369         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7370         If they pop r0/r1 they must be called in the opposite order than aopOp().
7371         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7372         (resp. --stack-auto), prepared for --xstack
7373
7374 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7375
7376         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7377
7378 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7379
7380         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7381         these ports have their own __sdcc_external_start()
7382
7383 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7384
7385         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7386         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7387         type for bits was changed. It resulted in bit variables becoming
7388         global, which is not permitted in PIC 14 assembly output.
7389
7390 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7391
7392         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7393
7394 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7395
7396         Z80 and MCS51 linkers complaint if a public symbol is defined
7397         in more than one library module:
7398
7399         * as/mcs51/lklib.c
7400         * link/z80/lklib.c
7401         * as/mcs51/Makefile.in
7402
7403 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7404
7405         A few small changes that speed up the peephole optimizer.
7406
7407         * src/SDCCpeeph.c
7408
7409 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7410
7411         Try to make the peephole optimizer smarter by maintaining
7412         an association between the assembly source code and the
7413         iCodes that originated them. Put this information to use
7414         with a new peephole rule condition "notVolatile" so that
7415         the rules can be aggressive yet still safe.
7416
7417         * src/SDCCpeeph.c
7418         * src/SDCCpeeph.h
7419         * src/mcs51/gen.c
7420         * src/mcs51/peeph.def
7421
7422 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7423
7424         Fixed bug #741761
7425
7426         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7427         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7428         if the left or right operand symbols have the accuse flag set.
7429
7430 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7431
7432         Changed the type of the result of the ! (NOT) operator to char;
7433         previously it returned the same type as the source. This allows
7434         us to eliminate all the genFloatNot functions (all of its target
7435         implementations were very buggy) since !float can use the same
7436         code as !long now.
7437
7438         * src/SDCCicode.c (ast2iCode): ! returns char
7439         * src/mcs51/gen.c (genNot, genNotFloat),
7440         * src/ds390/gen.c (genNot, genNotFloat),
7441         * src/z80/gen.c (genNot, genNotFloat),
7442         * src/pic/gen.c (genNot, genNotFloat),
7443         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7444
7445 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7446
7447         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7448         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7449            during interrupts. Ensure WSAVE is located at a shared bank address.
7450         2. Fixed page selection in some places
7451         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7452            the registers name strings.
7453         4. Fixed "signed / unsigned compare" compiler warnings.
7454         5. The PIC port manages its own allocation of the general purpose
7455            registers, but makes no attempt to reuse them. As a result when
7456            compiling it soon runs out of general purpose registers. Some
7457            additional code was added to the files pcode.c and device.c to walk
7458            through the function call tree and rename the registers so that they
7459            get reused.
7460
7461         * src/pic/device.c
7462         * src/pic/gen.c
7463         * src/pic/glue.c
7464         * src/pic/pcode.c
7465         * src/pic/pcode.h
7466         * src/pic/ralloc.c
7467         * src/pic/ralloc.h
7468         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7469         genPlus() & genMinus() when the result is the same as left or right
7470
7471 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7472
7473         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7474
7475 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7476
7477         Made bitfield a distinct type from bit so that bitfields
7478         convert as per ANSI C and bits retain their traditional
7479         boolean style behaviour. Implemented bitfield support in
7480         the z80 port.
7481
7482         * src/SDCCsymt.h,
7483         * src/SDCCsymt.c,
7484         * src/SDCCast.c,
7485         * src/cdbFile.c,
7486         * src/mcs51/gen.c,
7487         * src/ds390/gen.c: bit v bitfield split
7488         * src/z80/gen.c: New support for bitfields
7489         * support/regression/tests/bitfields.c: reenabled z80,
7490         added more tests
7491
7492 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7493
7494         Rules 246.x, 247.x relate to bitfields, the others speed up
7495         access to xdata mapped I/O devices.
7496
7497         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7498
7499 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7500
7501         Cleaned up genPackBits and genUnpackBits and added two helper
7502         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7503         for literal assignments in genPackBits (thanks to Frieder for
7504         reminding me).
7505
7506         * src/mcs51/gen.c
7507         * src/ds390/gen.c
7508
7509 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7510
7511         Fixed bug #748310 (pointer to function type mishandled when the
7512         function name is omitted). Also fixed a SIGSEGV when a function
7513         attribute (reentrant, etc) is used on a non-function or on a
7514         function but misplaced before the parameter list.
7515
7516         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7517         bug #748310
7518         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7519         * support/Util/SDCCerr.h,
7520         * support/Util/SDCCerr.c: Added func attr misuse error msg
7521
7522 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7523
7524         Fixed bug #787649 by anonymous
7525         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7526         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7527
7528 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7529
7530         Fixed numerous bitfield problems.
7531
7532         * src/SDCC.y: More bitfield related error checking
7533         * src/SDCCsymt.h,
7534         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7535         * support/Util/SDCCerr.h,
7536         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7537         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7538         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7539         * support/regression/tests/bitfields.c: tests added
7540
7541 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7542
7543         Made the constant following the "interrupt" keyword optional. If
7544         omitted, the function will not automatically be given an entry
7545         in the interrupt vector table (similar to #pragma NOIV, but
7546         less syntacticly kludgy). The interrupt number is also now
7547         range checked. Also fixed a bug in the high order bit example
7548         in the manual.
7549
7550         * src/SDCC.y
7551         * src/SDCCmem.c
7552         * src/SDCCglue.c
7553         * src/SDCCsymt.h
7554         * support/Util/SDCCerr.c
7555         * support/Util/SDCCerr.h
7556         * doc/sdccman.lyx
7557
7558 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7559
7560         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7561         * src/SDCCicode.c (operandOperation): rewritten some ops
7562         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7563         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7564         other type
7565         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7566         be re-activated by defining REDUCE_LITERALS)
7567         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7568         unsigned, but are signed by default
7569         * src/SDCCval.c (constVal): rearranged
7570         * src/SDCCval.c (valMod): preliminary fix
7571         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7572         * support/regression/literalop.c: added, work in progress
7573
7574 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7575
7576         Generate warnings for useless declarations like "char data;"
7577         that don't do what new users expect.
7578
7579         * src/SDCC.y
7580         * support/Util/SDCCerr.h
7581         * support/Util/SDCCerr.c
7582
7583 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7584
7585         * src/SDCCval.c (valMult): fix overflow detection of negative int
7586
7587 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7588
7589         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7590
7591         Changes to support big endian targets:
7592
7593         * src/ports.h
7594         * src/SDCCglue.c
7595         * src/avr/main.c
7596         * src/ds390/main.c
7597         * src/izt/i186.c
7598         * src/mcs51/main.c
7599         * src/pic/main.c
7600         * src/pic16/main.c
7601         * src/xa51/main.c
7602         * src/z80/main.c
7603
7604 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7605
7606         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7607         * device/lib/time.c: fixed warning "integer overflow in expression"
7608
7609 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7610
7611         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7612         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7613         constants are unsigned; added recognition of "u" flag for unsigned
7614         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7615         * src/SDCCval.c (valDiv, valMod): fixed signdness
7616         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7617         signedness of modulo, left and right shift
7618         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7619         * support/Util/SDCCerr.h: added warning W_INT_OVL
7620         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7621         * src/SDCCast.c (ast_print): improved output of constants
7622
7623 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7624
7625         Fixed some warnings when building with MSVC:
7626
7627         * as\mcs51\asdata.c
7628         * as\z80\asdata.c
7629         * as\mcs51\asm.h
7630         * as\z80\asm.h
7631         * link\z80\aslink.h
7632         * link\z80\lkdata.c
7633         * link\z80\lkeval.c
7634         * link\z80\lkgb.c
7635         * link\z80\lkihx.c
7636         * link\z80\lks19.c
7637         * link\z80\lksym.c
7638         * support\cpp2\cpplib.c
7639         * src\ds390\gen.c
7640         * src\mcs51\gen.c
7641
7642 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7643
7644         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7645
7646 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7647
7648         * support\librarian\clean.mk: Do not remove Makefile.
7649         * support\librarian\Makefile: added.
7650
7651 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7652
7653         Added librarian to MSVC build:
7654         * all.dsp
7655         * sdcc.dsw
7656         * support\librarian\librarian.dsp
7657
7658         'configure' not needed for librarian, removed:
7659         * support\librarian\configure
7660         * support\librarian\configure.in
7661         * support\librarian\config_in.h
7662         * support\librarian\Makefile.in
7663
7664         Hopefully these ones built the librarian and the rest of sdcc properly:
7665         * Makefile
7666         * Makefile.common.in
7667
7668         Messed up 'configure', so revert to previous version:
7669         * configure
7670         * configure.in
7671
7672 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7673
7674         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7675         there, while the mantissa of a double is "only" 53 bits wide.
7676
7677 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7678
7679         Adding sdcclib to the build.  MSVC project coming soon.
7680         Files added/changed:
7681
7682         * support\librarian\clean.mk
7683         * support\librarian\configure
7684         * support\librarian\configure.in
7685         * support\librarian\config_in.h
7686         * support\librarian\Makefile.bcc
7687         * support\librarian\Makefile.in
7688         * support\librarian\sdcclib.c
7689         * Makefile.bcc
7690         * Makefile
7691         * Makefile.common.in
7692         * configure
7693         * configure.in
7694
7695 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7696
7697         Linker now complaints if linked modules have conflicting options, for
7698         example, one compiled using --model-large and another one compiled with
7699         --model-small.  The following files were modified:
7700
7701         * as\mcs51\asdata.c
7702         * as\mcs51\aslink.h
7703         * as\mcs51\asm.h
7704         * as\mcs51\asmain.c
7705         * as\mcs51\asout.c
7706         * as\mcs51\i51pst.c
7707         * as\mcs51\lkdata.c
7708         * as\mcs51\lklibr.c
7709         * as\mcs51\lkmain.c
7710         * as\z80\asdata.c
7711         * as\z80\asm.h
7712         * as\z80\asmain.c
7713         * as\z80\asout.c
7714         * as\z80\z80pst.c
7715         * link\z80\aslink.h
7716         * link\z80\lkdata.c
7717         * link\z80\lklibr.c
7718         * link\z80\lkmain.c
7719         * src\SDCCglue.c
7720
7721 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7722
7723         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7724         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7725
7726 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7727
7728         * src/z80/mappings.i: fix _mul[us][int,long] entries
7729
7730 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7731
7732         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7733
7734 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7735
7736         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7737         * support/regression/tests/bitopcse.c: added
7738         fixed warning:
7739         * src/avr/gen.c:
7740         * src/pic/gen.c:
7741         * src/pic16/gen.c:
7742         * src/z80/gen.c:
7743         * src/xa51/gen.c:
7744
7745 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7746
7747         added support for new library format to z80, gbz80 linkers:
7748         *link/z80/aslink.h
7749         *link/z80/lklex.c
7750         *link/z80/lklib.c
7751         *link/z80/lklist.c
7752
7753 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7754
7755         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7756         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7757
7758 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7759
7760         added DUMMY_READ_VOLATILE:
7761         * src/SDCC.y:
7762         * src/avr/gen.c:
7763         * src/xa51/gen.c:
7764         * src/z80/gen.c:
7765         * src/pic/gen.c:
7766         * src/pic16/gen.c:
7767         * src/mcs51/gen.c:
7768         * src/ds390/gen.c:
7769         * src/SDCCcse.c (algebraicOpts): many improvements
7770         * src/SDCCcse.h: removed algebraicOpts()
7771         * src/SDCCicode.c (picDummyRead): added
7772
7773 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7774
7775         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7776         "Insufficient space in data memory".
7777
7778 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7779
7780         * src/mcs51/gen.c: fixed bug #771358
7781         * src/z80/gen.c: fixed bug #759087
7782
7783 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7784
7785         * src/pic16/glue.c: minor cleanup by Vangelis
7786
7787 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7788
7789         * device/include/regc515c.h: fixed #758477
7790         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7791         * device/lib/_gptrput.c: saved a few bytes
7792         * my tab spacing is 8, yours too?)
7793         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7794         * device/lib/serial.c: process RX bytes earlier than TX bytes
7795         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7796
7797 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7798
7799         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7800
7801 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7802
7803     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7804
7805 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7806
7807         * device/lib/Makefile.in: bad fix, reverted to 1.43
7808
7809 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7810
7811         * device/lib/Makefile.in: added missing z80 object files
7812
7813 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7814
7815         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7816         pic16 progress by Vangelis:
7817         * src/SDCCglobl.h:
7818         * src/SDCCmain.c:
7819         * src/pic/Makefile:
7820         * src/pic:
7821         * pic/Makefile:
7822         * pic16/device.c:
7823         * pic16/device.h:
7824         * pic16/gen.c:
7825         * pic16/gen.h:
7826         * pic16/genarith.c:
7827         * pic16/glue.c:
7828         * pic16/main.c:
7829         * pic16/pcode.c:
7830         * pic16/pcode.h:
7831         * pic16/pcodepeep.c:
7832         * pic16/peeph.def:
7833
7834 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7835
7836     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7837
7838 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7839
7840     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7841     added gbz80 build to MSVC project.
7842     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7843     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7844     from 8051 stuff and setup so it links using a .lnk file.
7845
7846 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7847
7848     * support/librarian/sdcclib.c: sdcc librarian.
7849     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7850     with sdcclib.
7851
7852 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7853
7854     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7855
7856 2003-07-02  Borut Razem <borut.razem AT siol.net>
7857
7858         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7859         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7860         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7861         src/xa51/main.c, src/z80/main.c:
7862         virtualization of glue() function: each port has it's own glue function,
7863         which is accessed by do_glue function pointer in PORT.general structure
7864
7865 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7866
7867         * DS800C400 fun, improved ROM interface and tinibios.
7868
7869 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7870
7871         * More support for DS80C400. Now includes beginning of interface to ROM.
7872
7873 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7874
7875         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7876
7877 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7878
7879         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7880
7881 2003-06-19  Borut Razem <borut.razem AT siol.net>
7882
7883         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7884
7885 2003-06-19  Borut Razem <borut.razem AT siol.net>
7886
7887         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7888         fixed Z80 port - crt0.o: cannot open.
7889
7890 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7891
7892         * support/Util/MySystem.c (merge_command): revert bad fix
7893
7894 2003-06-18  Borut Razem <borut.razem AT siol.net>
7895
7896         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7897
7898 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7899
7900         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7901         option --use-stdout sends errors to stdout instead of stderr.
7902
7903 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7904
7905         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7906
7907 2003-06-15  Borut Razem <borut.razem AT siol.net>
7908
7909         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7910         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7911         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7912         fixed width array of pointers replaced with sets;
7913         multiple include and lib paths ared transferred to preprocessor and linker
7914         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7915         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7916         fixed width array of pointers
7917         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7918         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7919         fixupPath(), getPathDifference()
7920         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7921         fixed width array of pointers
7922
7923 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7924
7925         * src/pic16/ralloc.c: fix warnings
7926         * src/pic16/pcode.c: fix warning
7927
7928 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7929
7930          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7931         know all the details, but essentially this set of changes enable
7932         the pic16 port to generate movff instructions and generate assembler
7933         directives,
7934         * src/SDCCmain.c:
7935         * src/pic16/gen.c:
7936         * src/pic16/glue.c:
7937         * src/pic16/pcode.c:
7938         * src/pic16/device.c:
7939         * src/pic16/main.c:
7940         * src/pic16/pcode.h:
7941         * src/pic16/pcoderegs.c:
7942         * src/pic16/ralloc.c:
7943         * src/pic16/ralloc.h:
7944
7945 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7946
7947         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7948         added option --vc, so sdcc errors and warnings are compatible with
7949         Microsoft Visual Studio.
7950
7951 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7952
7953         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7954           device/lib/libfloat.lib: added atof function.
7955
7956 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7957
7958         * doc/sdccman.lyx: updated to Lyx 1.3
7959         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7960         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7961         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7962
7963 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7964
7965         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7966
7967 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7968
7969         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7970           additions to the "related tools/documentation" section
7971
7972 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7973
7974         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7975
7976 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7977
7978         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7979         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7980
7981 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7982
7983         * doc/sdccman.lyx: fix double dash and other minor things
7984         * doc/Makefile: fix double dash
7985
7986 2003-05-28  Karl Bongers(patches from Martin Helmling)
7987         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7988           condition and ignore commands.
7989
7990 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7991
7992         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7993           is in parts still quite out of date, I did changes as far as I felt makes sense
7994           for a non-native english speaker.
7995           Please feel free to add to the manual or to correct my changes.
7996         * doc/Makefile: undid touching the date of intermediate tex files.
7997
7998 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7999
8000         * doc/sdccman.lyx: Manual has an index now
8001
8002 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8003
8004         Finalize muluint/mulsint and mululong/mulslong merging:
8005         * device/lib/_mulint.c
8006         * device/lib/_mullong.c
8007         * device/lib/gbz80/mul.s
8008         * device/lib/gbz80/stubs.s
8009         * device/lib/z80/mul.s
8010         * device/lib/z80/stubs.s
8011         * src/SDCCsymt.c (initCSupport)
8012
8013 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8014
8015         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8016         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8017           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8018           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8019           instead of /Zm500.
8020
8021 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8022
8023         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8024           the regression tests I'm not brave enough to enable 245.b, 245.c
8025         * doc/sdccman.lyx: added latex preamble for hyperref package.
8026           Using pdflatex this will give you a hyperlinked pdf file with
8027           bookmarks. (prepend '%' before /usepackage if this breaks something)
8028
8029 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8030
8031          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8032
8033 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8034
8035         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8036
8037 2003-05-21    <johan AT balder>
8038
8039         * src/SDCCglue.c (printIval): fixed bug #739934
8040
8041 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8042
8043         Applied patch from bug 737905 (renamed yylineo to mylineno):
8044         * src/altlex.c
8045         * src/SDCCast.c
8046         * src/SDCglobl.h
8047         * src/SDCC.lex
8048         * src/SDCCsymt.c
8049         * src/SDCCval.c
8050         * src/pic16/pcode.c: Cleaned warnings
8051         * src/pic16/pcodeflow.c: Cleaned warnings
8052         * src/pic16/pcoderegs.c: Cleaned warnings
8053
8054 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8055
8056         * src/pic16/pcode.c: Cleaned warnings
8057         * src/pic16/pcodepeep.c: Cleaned warnings
8058         * src/pic16/ralloc.c: Cleaned warnings
8059
8060 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8061
8062         * doc/sdccman.lyx: fixed bug 739745
8063         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8064
8065 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8066
8067         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8068         it can be defined with CFLAGS when running configure
8069         * src/SDCCmain.c: fixed compiling + linking with object files
8070
8071 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8072
8073         * configure.in: configure for pic16 port,
8074             added --disable-pic16-port
8075         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8076         * src/SDCCmain.c: linkOptions is changed to set *,
8077             added if/endif conditional macros to remove options help
8078             messages from optionsTable when a port is not configured, added
8079             support for the PIc16 port in the ports table, when executing
8080             the compiler with no port specified on command line, a default
8081             port is selected with the new macro DEFAULT_PORT which is
8082             defined in port.h, in setDefaultOptions() linkOptions is removed
8083             from initialization assignment, since now it is a set,
8084             parseCmdLine uses setParseWithComma for linkOptions, in
8085             linkEdit() linkOptions are accessed with new function indexSet()
8086             which returns the i'th item of a set variable. See SDCCset.c, in
8087             linkEdit() when calling buildCmdLine(), added linkOptions as
8088             last argument. Now users can pass arguments to gplink via the
8089             -Wl option, main() uses pic16glue() to glue up pic16 programs
8090         * src/SDCCpeeph.c: various changes to support pic16
8091         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8092             return the i'th item of the set
8093         * src/SDCCset.h: added function prototype for indexSet()
8094         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8095         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8096         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8097             added macro DEFAULT_PORT
8098         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8099         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8100             generated
8101         * src/pic16/glue.c: commented out some error producing lines
8102         * src/pic16/main.c: __config directives are commented out to stop
8103             gpasm complaining and test the linkage with gplink, _linkCmd and
8104             _asmCmd changed to be more gplink and gpasm friendly
8105         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8106             produced an error when parsed, peep rule 12 is added to utilize
8107             movff, but it is commented out since the pCode does not support
8108             yet a command with 2 address arguments
8109
8110 2003-05-18    <johan AT balder>
8111
8112         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8113         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8114 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8115
8116         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8117   Added feature to script commands from file.
8118
8119 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8120
8121         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8122         * src/SDCCutil.c: include ctype.h for win32
8123
8124 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8125
8126         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8127
8128 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8129
8130         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8131   Fixed so you can set breakpoints prior to run, run does not stop
8132   on entry now.  Add tbreak.  Other enhancements and fixes for use
8133   with ddd.
8134
8135 2003-05-12  Borut Razem <borut.razem AT siol.net>
8136
8137         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8138
8139 2003-05-11  Borut Razem <borut.razem AT siol.net>
8140
8141         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8142         the path of bin directory, so that PATH is the only env. variable, which has to be set
8143         in case of standard installation.
8144         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8145         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8146         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8147
8148 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8149
8150         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8151         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8152         temp files are in the port dir; clean the gen/test directory when
8153         generating new test.c
8154         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8155         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8156         * support/regression/tests/zeropad.c: added
8157
8158 2003-05-09    <johan AT balder>
8159
8160         * src/SDCCglue.c: fixed bug #597940
8161
8162 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8163
8164         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8165   cache sfr, optimize next,step, fix off by one sourceline,
8166   support ddd list function.
8167         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8168
8169 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8170
8171         * support/regression/HTMLgen.py: added compare_s2f()
8172         * support/regression/Makefile: redo 1.27
8173         * support/regression/generate-cases.py: redo 1.5
8174
8175 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8176
8177         * support/regression/tests/float.c: workaround 33 bit hex constant
8178         * support/regression/tests/simplefloat.c: fix division for host
8179
8180 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8181
8182         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8183         that tame's the PIC's over-aggressive optimizer.
8184
8185 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8186
8187          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8188          support for MSVC.
8189
8190 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8191
8192         Initial support for DS80C400. "Hello world" runs on TINIm400
8193         (with polled I/O).
8194
8195 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8196
8197          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8198          * Some notes on ddd usage added in debugger/README
8199          Martin Helmling adding more features and fixes for ddd GUI debugger.
8200          Code added for nexti, stepi, up, down, and other adjustments.
8201
8202 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8203
8204         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8205         * src/pic/peeph.def Added two rules to optimize carry manipulation
8206         * src/pic/* removed debug printfs
8207
8208 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8209
8210         * debugger/mcs51/cmd.c: added header newalloc.h
8211
8212 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8213
8214         * as/Makefile: new EXEEXT
8215         * as/z80/Makefile: remove trailing slash of BUILDIR
8216         * as/z80/clean.mk: new EXEEXT
8217         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8218         * support/cpp2/Makefile.in: new EXEEXT
8219         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8220
8221 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8222
8223         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8224         EXEEXT was introduced to fix all related problems with targets
8225         "clean", "install" and "uninstall"; a couple of further flaws
8226         especially with "clean" have been fixed too
8227         * as/mcs51/Makefile.in
8228         * as/mcs51/clean.mk
8229         * as/z80/Makefile
8230         * Makefile
8231         * clean.mk
8232         * debugger/mcs51/Makefile.in
8233         * debugger/mcs51/clean.mk
8234         * link/z80/Makefile
8235         * link/z80/Makefile.in
8236         * link/z80/clean.mk
8237         * link/Makefile
8238         * packihx/Makefile.in
8239         * packihx/clean.mk
8240         * sim/ucsim/Makefile
8241         * sim/ucsim/clean.mk
8242         * sim/ucsim/avr.src/Makefile.in
8243         * sim/ucsim/avr.src/clean.mk
8244         * sim/ucsim/s51.src/Makefile.in
8245         * sim/ucsim/s51.src/clean.mk
8246         * sim/ucsim/xa.src/Makefile.in
8247         * sim/ucsim/xa.src/clean.mk
8248         * sim/ucsim/z80.src/Makefile.in
8249         * sim/ucsim/z80.src/clean.mk
8250         * sim/ucsim/main_in.mk
8251         * sim/ucsim/packages_in.mk
8252         * sim/ucsim/gui.src/Makefile.in
8253         * sim/ucsim/gui.src/serio.src/Makefile.in
8254         * sim/ucsim/gui.src/serio.src/clean.mk
8255         * src/Makefile.in
8256         * src/clean.mk
8257         * support/cpp2/Makefile.in
8258         * support/cpp2/clean.mk
8259         * support/makebin/Makefile
8260         * support/makebin/clean.mk
8261         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8262         * doc/sdccman.lyx: --program-suffix no longer needed
8263
8264 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8265
8266          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8267          Martin Helmling added support for ddd GUI debugger.
8268          Code added to display assembly, set variables, and other commands
8269          to interface to ddd.
8270
8271 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8272
8273         * as/Makefile: fix target clean
8274         * as/clean.mk: fix target clean
8275         * as/z80/clean.mk: fix target clean
8276
8277 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8278
8279         * Makefile.common.in: added  AT EXEEXT AT
8280         * configure.in: removed all mingw32 stuff
8281         * configure: rebuilt from configure.in
8282         * doc/sdccman.lyx: updated section "installation"
8283         * support/scripts/sdcc_mingw32: adapted to configure
8284         * support/scripts/sdcc_cygwin_mingw32: added
8285
8286 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8287
8288         * src/pic Added object file support for the PIC port
8289         * src/pic Applied patch from Craig Franklin (this started the object file support)
8290         * src/regression Updated the PIC regression tests for object files
8291
8292 2003-04-20  Borut Razem <borut.razem AT siol.net>
8293
8294         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8295           lklex.c: In function `getfid':
8296           lklex.c:203: warning: array subscript has type `char'
8297         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8298           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8299         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8300           stack handling macros
8301
8302 2003-04-19  Borut Razem <borut.razem AT siol.net>
8303
8304         * "handling space characters in file path" task:
8305         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8306         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8307         * support/Util/MySystem.h: make it self-sufficient
8308         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8309           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8310           handling space characters in file path
8311         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8312           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8313         * support/Util/MySystem.c: handling space characters in executable's path
8314
8315 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8316
8317         * as/z80/Makefile: fix permanent rebuild of z80
8318         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8319         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8320
8321 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8322
8323         * src/SDCCopt.c: add special case optimization to replace modulo by
8324           a power of two with a bitwise AND.
8325
8326 2003-04-18    <johan AT balder>
8327
8328         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8329
8330 2003-04-17    <johan AT balder>
8331
8332         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8333         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8334
8335 2003-04-13  Borut Razem <borut.razem AT siol.net>
8336
8337         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8338         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8339           fixed mingw problem in adl_NORMALIZE_PATH
8340
8341 2003-04-12  Borut Razem <borut.razem AT siol.net>
8342
8343         * fixed "#pragma SAVE/RESTORE can not be nested":
8344         * src/SDCC.lex: reworked pragma handling functions
8345         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8346         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8347
8348 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8349
8350         * src/SDCCutil.c (pathEquivalent): defined but not used
8351         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8352         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8353         * configure: rebuilt from configure.in
8354         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8355         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8356         * device/include/Makefile.in: replace sdcc_datadir
8357         * device/lib/Makefile.in: replace sdcc_datadir
8358         * Makefile.common.in: add LDFLAGS from configure
8359         * packihx/Makefile.in: use LDFLAGS
8360         * src/Makefile.in: use LDFLAGS
8361         * support/cpp2/Makefile.in: add LDFLAGS from configure
8362         * support/makebin/Makefile: use LDFLAGS
8363         * .version: bumped version number to 2.3.5
8364
8365 2003-04-12  Borut Razem <borut.razem AT siol.net>
8366
8367         * completed "different paths" task:
8368         * src/SDCCmacro.c: fixed bug in handling quotes
8369         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8370         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8371
8372 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8373
8374         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8375
8376 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8377
8378         * ds390/gen.c ds390/peeph.def: fix bug 706781
8379
8380 2003-04-11  Borut Razem <borut.razem AT siol.net>
8381
8382         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8383
8384 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8385
8386         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8387         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8388          set - this bit used to not be set...).
8389         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8390           bad code in PIC Port
8391         * src/regression/and2.c added to test bug 609268
8392         * src/regression/Makefile added and2.c to regression test
8393
8394
8395 2003-04-08    <johan AT CP255758-A>
8396
8397         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8398         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8399         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8400
8401 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8402
8403         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8404         fix bug #487815
8405         * support/cpp2/Makefile.in: fix bug #487815
8406         * configure: rebuilt from configure.in
8407         * Makefile.common.in: docdir changed, new path suffixes
8408         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8409         * sdcc_vc_in.h: reflect changes from sdccconf.h
8410         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8411         * src/SDCCutil.h: remove BINDIR hack
8412         * doc/sdccman.lyx: update new path hierarchy
8413
8414 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8415
8416         * src/SDCCpeeph.c: added okToRemoveSLOC test
8417
8418 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8419
8420         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8421
8422 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8423
8424         * src/SDCCpeeph.c: added labelIsReturnOnly test
8425         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8426
8427 2003-04-05    <johan AT balder>
8428
8429         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8430         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8431         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8432         * src/SDCCast.c: fixed a warning
8433         * src/SDCCast.h: fixed a warning
8434         * src/SDCCicode.c (operandFromAst): fixed a warning
8435
8436 2003-04-04    <johan AT balder>
8437
8438         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8439         * src/SDCCast.c (decorateType): fixed bug #715076
8440         * src/SDCC.y: fixed bug #702907
8441
8442 2003-04-03    <johan AT balder>
8443
8444         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8445         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8446         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8447         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8448         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8449
8450 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8451
8452         * _decdptr.c: fix return values
8453         * _gptrget.c: fix return values
8454         * _gptrgetc.c: fix return values
8455         * _gptrput.c: fix return values
8456         * _mulint.c: fix return values
8457         * as/z80/Makefile: fix 'make -j' problem
8458
8459 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8460
8461         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8462         * configure.in: big cleanup, updated to autoconf 2.5x
8463         * configure: rebuilt from configure.in
8464         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8465         * sdcc_vc_in.h: reflect changes from sdccconf.h
8466         * doc/Makefile: fixed a flaw in "make install"
8467
8468 2003-04-02    <johan AT balder>
8469
8470         * src/ds390/gen.c (genCmp): no comments
8471         * src/mcs51/gen.c (genCmp): no comments
8472         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8473         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8474
8475 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8476
8477         * support/regression/generate-cases.py: place generated file in given sub directory
8478         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8479         * support/regression/Makefile: improvements for 'make -j';
8480         side effect: it's simpler and faster now
8481
8482 2003-03-31  Borut Razem <borut.razem AT siol.net>
8483
8484         * src/z80/main.c: link-{port} and as-{port} defined without path
8485         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8486
8487 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8488
8489         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8490
8491 2003-03-30  Borut Razem <borut.razem AT siol.net>
8492
8493         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8494           changed type of list parameter to set
8495         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8496         * src/port.h: changed type of do_assemble() parameter to set
8497         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8498           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8499           definition of "cppoutfilename" macro with NULL value in preProcess()
8500         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8501         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8502         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8503           replaced with set *binPathSet
8504         * shash_add() deallocates the item, if allready exsists, before adding the new one
8505         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8506
8507 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8508
8509         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8510           a nested for loop bug in the PIC port
8511         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8512           for loops
8513
8514 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8515
8516         * support/Util/dbuf.h: remove C++ stuff to make it portable
8517
8518 2003-03-28  Borut Razem <borut.razem AT siol.net>
8519
8520         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8521           literal strings in stringLiteral()
8522         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8523         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8524           to the project
8525
8526 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8527
8528         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8529
8530 2003-03-26    <johan AT balder>
8531
8532         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8533         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8534         * src/SDCCast.c (decorateType): fixed " -v < 3"
8535
8536 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8537
8538         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8539         Added Lenny Story's debug infrastructure changes:
8540         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8541         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8542         * src/cdbFile.c: added
8543         * src/SDCCdebug.c: added
8544         * src/SDCCdebug.h: added
8545         * src/SDCCast.c (createFunction)
8546         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8547         * src/SDCCmain.c (parseCmdLine, main)
8548         * src/SDCCmem.c (redoStackOffsets)
8549         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8550         * src/SDCCsymt.h
8551         * src/common.h
8552         * src/avr/gen.c (genAVRCode)
8553         * src/ds390/gen.c (gen390Code)
8554         * src/mcs51/gen.c (gen51Code)
8555         * src/pic/gen.c (genpic14Code)
8556         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8557         * src/xa51/gen.c (genXA51Code)
8558         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8559
8560 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8561
8562         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8563         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8564
8565 2003-03-22    <johan AT balder>
8566
8567         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8568
8569 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8570
8571         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8572         * doc/cdbfileformat.lyx: added, written by Lenny Story
8573         * doc/Makefile: added cdbfileformat.lyx
8574         * doc/clean.mk: added cdbfileformat.lyx
8575
8576 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8577
8578         * src/mcs51/peeph.def: fix bug #705773
8579
8580 2003-03-20    <johan AT balder>
8581
8582         An sfr/sbit can have an "at #" AND an initializer
8583         * src/SDCCsymt.c (checkSClass):
8584         * src/SDCCmem.c (allocGlobal):
8585         * src/SDCCmem.c (allocLocal):
8586         * src/SDCCast.c (createBlock):
8587
8588 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8589
8590         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8591
8592 2003-03-16    <johan AT balder>
8593
8594         Undid the hackup of const and volatile, the problem is much bigger
8595         * src/SDCC.y:1.65
8596         * src/SDCCast.c:1.171
8597         * src/SDCCglue.c:1.138
8598         * src/SDCCicode.c:1.146
8599         * src/SDCCsymt.c:1.150
8600         * src/SDCCval.c:1.65
8601
8602 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8603
8604         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8605         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8606
8607 2003-03-13    <johan AT balder>
8608
8609         Hackup const and volatile modifiers in type chains a bit:
8610         * src/SDCC.y:1.63
8611         * src/SDCCast.c:1.169
8612         * src/SDCCglue.c:1.136
8613         * src/SDCCicode.c:1.143
8614         * src/SDCCsymt.c1.146
8615         * src/SDCCsymt.h1.59
8616         * src/SDCCval.c:1.63
8617
8618 2003-03-12    <johan AT balder>
8619
8620         * src/SDCCBBlock.h: more LRH debugging junk
8621         * src/SDCCcflow.h: more LRH debugging junk
8622         * src/SDCCloop.c: more LRH debugging junk
8623         * src/SDCC.y (struct_declaration): fixed bug #697590
8624         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8625         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8626         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8627
8628 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8629         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8630         test function names must now match exactly).
8631         * src/SDCCcse.c: added special case in findCheaperOp to allow
8632         extending a short integer. Makes less awful code for bug 700121 test case.
8633
8634 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8635
8636         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8637         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8638
8639 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8640
8641         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8642         actually called (operandsNotEqual() was called for all
8643         operandsNotEqualX tests).
8644
8645 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8646
8647         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8648         with shorter literals. Fixes bug 700121.
8649
8650 2003-03-11    <johan AT balder>
8651
8652         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8653
8654 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8655
8656         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8657         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8658
8659 2003-03-10  Borut Razem <borut.razem AT siol.net>
8660
8661         * src/SDCCmain.c: pipe preprocessor's output
8662         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8663         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8664         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8665         which closes all pipes in pipeSet set
8666         * src/SDCCset.c: free deleted item in function deleteSetItem()
8667         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8668         moved from z80 to src subproject
8669         * .version: increased version number to 2.3.4
8670
8671 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8672
8673         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8674         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8675         * support/regression/ports/xa51/spec.mk: fix typo
8676
8677 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8678
8679         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8680
8681 2003-03-09  Borut Razem <borut.razem AT siol.net>
8682
8683         * src/SDCCmain.c: pipe preprocessor's output
8684         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8685         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8686         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8687         which closes all pipes in pipeSet set
8688         * src/SDCCset.c: free deleted item in function deleteSetItem()
8689         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8690         moved from z80 to src subproject
8691
8692 2003-03-09  Borut Razem <borut.razem AT siol.net>
8693
8694         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8695         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8696         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8697         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8698         * src/SDCCglobl.h: unification of WIN32 native definitions
8699
8700 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8701
8702         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8703
8704 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8705
8706         * src/configure.in:   check for endianess (even while cross-compiling)
8707         * src/configure:      check for endianess (even while cross-compiling)
8708         * src/configure_in.h: check for endianess (even while cross-compiling)
8709         * src/avr/gen.c:        remove old endianess stuff
8710         * src/mcs51/gen.c:      remove old endianess stuff
8711         * src/ds390/gen.c:      remove old endianess stuff
8712         * src/pic/gen.c:        remove old endianess stuff
8713         * src/pic/genarith.c:   remove old endianess stuff
8714         * src/pic/glue.c:       fix endianess check
8715         * src/pic16/gen.c:      remove old endianess stuff
8716         * src/pic16/genarith.c: remove old endianess stuff
8717         * src/pic16/glue.c:     fix endianess check
8718         * src/xa51/gen.c:       remove old endianess stuff
8719         * src/z80/gen.c:        fix endianess check
8720         * src/SDCCglue.c:       fix endianess check
8721         * src/ds390/peeph.def: fix bug 700036
8722
8723 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8724
8725         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8726         * src/configure: find appropriate data-types on host for SDCC's int and long
8727         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8728         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8729         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8730
8731 2003-03-07    <johan AT balder>
8732
8733         Just a big NOOP:
8734                 some minor cleanups before the big shot
8735                 OP_DEFS and OP_USES now use Kevin's protection
8736                 new option --nolabelopt
8737
8738         * src/SDCCBBlock.c:
8739         * src/SDCCast.c,:
8740         * src/SDCCcflow.c:
8741         * src/SDCCcse.c:
8742         * src/SDCCicode.c:
8743         * src/SDCCicode.h:
8744         * src/SDCClabel.c:
8745         * src/SDCCloop.c:
8746         * src/SDCCmain.c:
8747         * src/ds390/ralloc.c:
8748         * src/mcs51/ralloc.c:
8749         * src/pic/ralloc.c:
8750         * src/xa51/ralloc.c:
8751         * src/z80/ralloc.c:
8752
8753 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8754
8755         * src/pic/pcode.c (get_op): fix 64 bit warnings
8756         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8757         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8758         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8759         * support/regression/tests/malloc.c: fix 64 bit warnings
8760
8761 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8762
8763         * src/mcs51/gen.c (genMinus): fixed bug 696436
8764
8765 2003-03-02  Borut Razem <borut.razem AT siol.net>
8766
8767         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8768
8769 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8770
8771         * configure.in: test for mkstemp
8772         * sdccconf_in.h: add HAVE_MKSTEMP
8773
8774 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8775
8776         * device/include/ctype.h: removed warning while using --stack-auto
8777         * device/include/malloc.h: removed warning while using --stack-auto
8778         * device/include/string.h: removed warning while using --stack-auto
8779
8780 2003-02-23  Borut Razem <borut.razem AT siol.net>
8781
8782         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8783         because NDEBUG is defined (see man assert)
8784         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8785
8786 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8787
8788         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8789         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8790
8791 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8792
8793         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8794         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8795
8796 2003-02-18    <johan AT balder>
8797
8798         * as/mcs51/asmain.c (asmbl): module can start with a digit
8799         * as/z80/asmain.c (asmbl): module can start with a digit
8800
8801 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8802
8803         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8804         * src/asm.c: fix pipe() for Mingw32
8805
8806 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8807
8808         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8809         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8810         make -V work again; --c1mode reads now from stdin
8811         * doc/sdccman.lyx: added --c1mode
8812         * support/Util/SDCCerr.c: new messages for c1 mode
8813         * support/Util/SDCCerr.h: new messages for c1 mode
8814         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8815
8816 2003-02-15    <johan AT balder>
8817
8818         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8819
8820 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8821
8822         * doc/sdccman.lyx: Environment variables, -o and other minor things
8823
8824 2003-02-14    <johan AT balder>
8825
8826         * src/xa51/main.c: before anyone really tries to use it :)
8827
8828         * Install doc's in share/sdcc/doc
8829         * removed some obsolete files
8830         * Do a proper make distclean and uninstall
8831         M Makefile.common.in
8832         R sdccbuild.sh
8833         M as/Makefile
8834         M device/include/Makefile.in
8835         M device/lib/Makefile.in
8836         M doc/sdccman.lyx
8837         M link/Makefile
8838         M sim/ucsim/doc/Makefile.in
8839         M src/clean.mk
8840         R src/avr/peeph.rul
8841         R src/xa51/peeph.rul
8842         M support/cpp2/Makefile.in
8843         M support/makebin/Makefile
8844
8845
8846 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8847
8848         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8849
8850 2003-02-10  Borut Razem <borut.razem AT siol.net>
8851
8852         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8853         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8854         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8855         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8856         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8857         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8858         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8859         src/z80/Makefile.bcc: Borland Makefile cleanup
8860         * as/z80/Makefile.bcc: Added Borland Makefile
8861         * support/cpp2/borland.h: Removed
8862
8863 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8864
8865         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8866         * src/SDCC.lex: new pragma NOIV
8867         * src/SDCCglobl.h: new pragma NOIV
8868         * src/SDCCmem.c: new pragma NOIV
8869
8870 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8871
8872         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8873
8874 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8875
8876         * src/SDCCmain.c: signal handling is switched off by --debug
8877         * doc/Makefile: small fix for install; use clean.mk again
8878         * doc/clean.mk: clean *.pdf and *.html too
8879
8880 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8881
8882         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8883         * device/lib/printfl.c: fix a ds390 bug by making it portable
8884         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8885         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8886         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8887         * debugger/mcs51/cmd.c: converted multi-line string literals
8888         * sim/ucsim/globals.cc: converted multi-line string literals
8889         * src/SDCCmain.c: introduced signal handler to remove temp files
8890         * doc/Makefile: small tweaks, implement clean
8891         * doc: removed generated files
8892
8893 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8894
8895         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8896         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8897         Address Record is not correctly generated for DS390."
8898
8899 2003-02-02  Borut Razem <borut.razem AT siol.net>
8900
8901         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8902         * as/mcs51/asm.h: fixed compilation with Borland C
8903         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8904         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8905         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8906         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8907         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8908         src/z80/Makefile.bcc: delete $(LIB) only if exist
8909         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8910
8911 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8912
8913         * device/include/malloc.h: introduced NULL
8914         * device/include/string.h: introduced NULL
8915         * device/include/stdlib.h: introduced NULL
8916         * device/lib/_memcpy.c: removed NULL
8917         * device/lib/_strcat.c: removed NULL
8918         * device/lib/_strchr.c: removed NULL
8919         * device/lib/_strcmp.c: removed NULL
8920         * device/lib/_strcpy.c: removed NULL
8921         * device/lib/_strcspn.c: removed NULL
8922         * device/lib/_strlen.c: removed NULL
8923         * device/lib/_strncat.c: removed NULL
8924         * device/lib/_strncmp.c: removed NULL
8925         * device/lib/_strncpy.c: removed NULL
8926         * device/lib/_strpbrk.c: removed NULL
8927         * device/lib/_strrchr.c: removed NULL
8928         * device/lib/_strspn.c: removed NULL
8929         * device/lib/_strstr.c: removed NULL
8930         * device/lib/_strtok.c: removed NULL
8931         * device/lib/malloc.c: removed NULL, include own header
8932
8933 2003-02-02    <johan AT balder>
8934
8935         * 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
8936         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8937         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8938         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8939         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8940         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8941
8942 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8943
8944         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8945         area 'DATA'"
8946
8947 2003-02-01    <johan AT balder>
8948
8949         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8950
8951 2003-01-31    <johan AT CP255758-A>
8952
8953         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8954
8955 2003-01-30    <johan AT balder>
8956
8957         * src/SDCCBBlock.c: automatic bug detection
8958         * src/SDCCicode.c: automatic bug detection
8959
8960 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8961
8962         * src/SDCCglobl.h:   now --xram-size 0 works
8963         * src/SDCCmain.c:    now --xram-size 0 works
8964
8965 2003-01-29    <johan AT balder>
8966
8967         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8968
8969 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8970
8971         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8972         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8973         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8974         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8975         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8976         * src/SDCCmain.c:    Added options --xram-size and --code-size
8977
8978 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8979
8980         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8981         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8982
8983 2003-01-27    <johan AT balder>
8984
8985         * src/SDCC.y: fixed bug #613764
8986
8987 2003-01-26    <johan AT balder>
8988
8989         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8990         * src/SDCCsymt.h: fixed bug #673374
8991         * src/SDCCglue.c: fixed bug #661910
8992         * src/SDCCast.c: fixed bug #458099 and 673374
8993
8994 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8995
8996         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8997         * as/mcs51/strcmpi.h: added
8998         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8999         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9000         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9001         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9002         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9003         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9004         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9005         * as/mcs51/Makefile.aslink: new module strcmpi
9006         * as/mcs51/Makefile.asx8051: new module strcmpi
9007         * as/mcs51/Makefil.bcc: new module strcmpi
9008         * as/mcs51/Makefile.in: new module strcmpi
9009         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9010
9011 2003-01-26    <johan AT balder>
9012
9013         * src/SDCCglue.c: reverted back to 1.124
9014         * src/SDCCast.c: reverted back to 1.156
9015         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9016
9017 2003-01-25    <johan AT balder>
9018
9019         * src/SDCCglue.c: A better fix for bug #661910
9020         * src/SDCCast.c: A better fix for bug #661910
9021         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9022
9023 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9024
9025         * src/Makefile.in: remove spawn.o
9026         * src/SDCCmain.c: remove spawn.h
9027         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9028         * src/spawn.c: removed
9029         * src/spawn.h: removed
9030         * support/regression/ports/ds390/spec.mk: link with -r
9031
9032 2003-01-24    <johan AT CP255758-A>
9033
9034         * src/ds390/gen.c (aopOp): fixed bug #667458
9035         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9036         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9037         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9038
9039 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9040
9041         * src/mcs51/peeph.def: better assembler identation by Frieder
9042         * src/mcs51/gen.c: better assembler identation by Frieder
9043
9044 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9045
9046         * as/z80/string.h: removed for gcc 3.2
9047         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9048         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9049
9050 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9051
9052         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9053         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9054         * support/regression/Makefile: separate temp files for ports
9055         * support/regression/generate-cases.py: separate temp files for ports
9056         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9057         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9058
9059 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9060
9061         * moved tinitalk to device/examples/ds390
9062
9063 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9064
9065         * as/mcs51/lkmem.c: rflag is for DS390
9066         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9067         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9068                          (linkEdit): move mem- and map-files the same way as ihx-files
9069         * src/z80/main.c (_setDefaultOptions): removed --generic
9070         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9071         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9072         * src/pic/glue.c (picglue): --c1mode works again
9073         * src/pic16/glue.c (pic16glue): --c1mode works again
9074         * src/asm.c (printCLine): fix #660034
9075
9076 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9077
9078         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9079         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9080         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9081         * as/mcs51/lkmem (summary): better fix for sp problem
9082         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9083         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9084         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9085                                               remove --stack-after-data
9086
9087 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9088
9089         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9090         * src/SDCCutil.c (join): ugly bug: missing '\0'
9091         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9092
9093 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9094
9095         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9096         * src/port.h: typo
9097         * src/pic/main.c (_asmCmd): gpasm supports -o
9098         * src/z80/main.c: more general macros
9099         * device/lib/Makefile.in: remove intermediate files
9100
9101 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9102
9103         * .version: Bumped version number to 2.3.3
9104         * src/SDCCBBlock.c: new option -o
9105         * src/SDCCglobl.h: new option -o
9106         * src/SDCCglue.c: new option -o
9107         * src/SDCCmain.c: new option -o
9108         * src/asm.c: new option -o
9109         * src/ds390/main.c: new option -o
9110         * src/pic/glue.c: new option -o
9111         * src/pic/pcode.c: new option -o
9112         * src/pic/ralloc.c: new option -o
9113         * src/pic16/glue.c: new option -o
9114         * src/pic16/pcode.c: new option -o
9115         * src/pic16/ralloc.c: new option -o
9116         * src/z80/main.c: new option -o
9117         * device/lib/Makefile.in: use -o
9118         * support/regression/ports/ds390/spec.mk: use -o
9119         * support/regression/ports/gbz80/spec.mk: use -o
9120         * support/regression/ports/mcs51/spec.mk: use -o
9121         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9122         * support/regression/ports/z80/spec.mk: use -o
9123         * support/regression/ports/ucz80/spec.mk: use -o
9124         * support/regression/ports/xa51/spec.mk: use -o
9125         * support/regression/fwk/lib/timeout.c: fix usage string
9126
9127 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9128         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9129
9130 2003-01-07    <johan AT balder>
9131
9132         * src/SDCCast.c (decorateType): fixed bug #600035
9133
9134 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9135         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9136         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9137         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9138         * src/pic/pcode.c: outcommented unused variable to remove warnings
9139         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9140
9141 2003-01-06    <karl AT turbobit.com>
9142         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9143    regression tests.
9144
9145 2003-01-06    <johan AT balder>
9146
9147         * src/SDCCicode.c: fixed array add
9148
9149 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9150         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9151         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9152
9153 2003-01-04    <johan AT balder>
9154
9155         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9156
9157 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9158         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9159
9160 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9161         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9162         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9163
9164 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9165         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9166
9167 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9168         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9169
9170 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9171         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9172
9173 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9174
9175     * in \sdcc\as\mcs51\ changed these files in order to create an
9176     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9177     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9178     following files to include the previous two files: aslink.dsp,
9179     Makefile.aslink, Makefile.bcc, and Makefile.in.
9180
9181     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9182     .adb instead of .cdb
9183
9184 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9185
9186         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9187         value from option --iram-size.
9188
9189 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9190
9191         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9192         dram[] array.
9193
9194 2002-09-18    <wiml AT hhhh.org>
9195
9196         * SDCClrange.h: exposed setFromRange() and setToRange()
9197         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9198           packRegsForAccUse() (bug 542397)
9199         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9200           multiple times and emitting the fetch operations more than once
9201           added aopGetUsesAcc() function to allow binary operators to
9202           fetch their operands in the correct order; made genMinus() emit
9203           compact code for X = LITERAL - Y
9204
9205 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9206         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9207         sprintf() in line 1267.
9208
9209 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9210         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9211         like ports.
9212
9213 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9214         Changes to aslink (All the changes are marked with 'JCF'):
9215
9216         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9217         summary().
9218
9219         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9220         area BSEG.  Also moves, if possible, the DATA area down into the internal
9221         ram so more space is available.
9222
9223         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9224         sflag.
9225
9226         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9227         not bytes.  Function summary() which creates a memory usage summary
9228         file with extension .mem.  Reports of overlaping stack and small stack
9229         size.  If the space for the stack is less than 16 bytes aslink trows a
9230         warning.
9231
9232         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9233         the 8051.  Option 'y' for memory summary output file.
9234
9235         Changes to sdcc (All the changes are marked with 'JCF'):
9236
9237         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9238
9239         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9240         overlaying area for it (uses RegBankUsed[4]).
9241
9242         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9243         bank zero as used by default.  By default aslink locates the stack
9244         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9245         the creation of the .mem file.  Delegates the allocation of data area
9246         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9247         the begining of the stack area to aslink.
9248
9249         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9250         glue() in SDCCglue.c creates an area for it.
9251
9252 2002-09-03  Borut Razem <borut.razem AT siol.net>
9253         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9254         sdcc/src/pic/glue.c:
9255         introduced atexit() handler for teporay files removal in case of
9256         errors, assertions, ...
9257
9258 2002-08-29  Borut Razem <borut.razem AT siol.net>
9259         * sdcc/support/cpp2/auto-host_vc_in.h:
9260         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9261         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9262         Maybe there is a similar problem with BORLANDC? It should be checked!
9263
9264         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9265         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9266         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9267         was not executed, and the compiler (cl) launched a warning:
9268         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9269
9270 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9271         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9272
9273 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9274         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9275
9276         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9277           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9278           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9279           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9280           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9281           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9282           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9283         - added Release configuration in VS projects
9284         - review of compiler an linker options
9285         - VC .exe files are generated in bin_vc directory, not to interfere
9286           with binaries generated from other projects (cygwin, mingw, bcc ...)
9287
9288         * sdcc/src/yacc.dsp: added
9289
9290         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9291         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9292         and insert the version number definitions from .version
9293
9294         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9295
9296         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9297         added - genarate auto-host.h using auto-host_vc_in.h as template
9298
9299         * sdcc/sdcc_vc.h,
9300         removed from CVS, generated automatically
9301
9302 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9303         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9304
9305 2002-08-11  Borut Razem <borut.razem AT siol.net>
9306         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9307
9308 2002-08-10  Borut Razem <borut.razem AT siol.net>
9309         * src/SDCCmain.c (main):
9310         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9311         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9312         The consequence was that some temporary files were not removed.
9313
9314         * src/SDCCglue.c:
9315         unification of code in functions tempfilename() and tempfile():
9316         function tempnam() is defined in Visual Studio 6.0 and .NET
9317
9318         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9319
9320         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9321           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9322         - removed compiler command line option /WX: Treats all warnings as errors
9323         - update a list of source files, included into the project
9324
9325         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9326           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9327         changed project type to Generic Project so that can be correcly converted to VS.NET project
9328
9329         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9330
9331         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9332
9333         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9334
9335         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9336         added return 0 statements after assert() to make compiler happy
9337
9338         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9339         added newline in the def file to keep MSC compiler satisfied
9340
9341         * sdcc/src/z80/gen.c:
9342         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9343           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9344         - solved MSC error in function aopDump()
9345
9346         * sdcc_vc.h: define PREFIX as "\\sdcc"
9347
9348 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9349         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9350
9351 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9352         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9353         - Rewrote the register banking algorithm.
9354         - Added pCode live-range analysis to registers (for now, only non-used and
9355         singly-used registers optimized away)
9356
9357         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9358
9359         * 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.
9360
9361 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9362         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9363
9364 2002-04-22  Michael Hope  <michaelh AT vroom>
9365
9366         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9367
9368         * configure.in (DD_COPT): Added include support required for gbdk.
9369
9370         * .version: Bumped version number just to increase it.
9371
9372         * src/SDCCmain.c: Added -nostdinc to the default options.
9373
9374 2002-04-15  Michael Hope  <michaelh AT vroom>
9375
9376         * device/lib/z80/printf.c (sprintf): Added.
9377
9378         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9379
9380         * src/z80/peeph.def: Added transpose redundent load rule.
9381
9382         * src/z80/main.c: Added force callee saves for jaune.
9383
9384         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9385
9386         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9387
9388 2002-03-28  Johan Knol  <johan AT balder>
9389
9390         * src/SDCCval.c: fixed bug #532436
9391
9392 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9393         * /src/port.h:
9394         Added "char *Processor" field to the port structure.
9395
9396         * /src/SDCCmain.c:
9397         Added -p option. Allows port dependent processor to be specified.
9398
9399         * all ports:
9400         Initialized the new field char *Processor field to NULL in all ports
9401
9402         * /src/pic/*:
9403         Compiler generated registers for interrupt context saving
9404         were not getting allocated.
9405
9406 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9407
9408         * /src/SDCCast.c:
9409         Fixed left shift. Will promote the left side of a left shift
9410         if a) left shifting more than size of operand or b) when assigned
9411         to something size > size of left side
9412
9413 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9414         * src/pic/*
9415         tons of changes. Register allocation has been
9416         rewritten. Added customization for the various PICs. Flow
9417         analysis is restructured. ...
9418
9419         * src/pic/device.h:
9420         Added
9421
9422         * src/pic/device.c:
9423         Added. device.c is a PIC port hack to accomodate variations
9424         in PIC devices.
9425
9426 2002-03-13  Michael Hope  <michaelh AT vroom>
9427
9428         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9429
9430 2002-03-04  johanknol  <johanknol AT manik>
9431
9432         * /src/SDCCval.c: fixed
9433
9434         const unsigned char arr[][2] = { { 0, 1 } };
9435         t18.c:1: error: Initializer element is not constant
9436
9437 2002-03-04  bela  <bela AT manik>
9438
9439         * /device/include/mcs51reg.h:
9440         ds89c420 register definition update
9441
9442 2002-03-03    <johan AT FRIJA>
9443
9444         * support/Util/SDCCerr.c: did something, but don't no why anymore
9445
9446         * support/regression/tests/bug-524691.c: made it a little less shy
9447
9448         * src/SDCCast.c (decorateType): fixed bug #524697
9449
9450         * src/SDCCast.c: made some lineno improvements
9451
9452         * src/SDCCval.c (getNelements): changed warning to error
9453
9454         * src/SDCCglue.c (printIvalArray): changed warning to error
9455
9456         * src/SDCCicode.c: fixed a warning for mingw
9457
9458         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9459
9460         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9461
9462 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9463
9464         * src/ds390/peeph.def:
9465         Added some more peephole rules
9466
9467         * src/ds390/gen.c: Various fixes & enhancements
9468
9469         * src/SDCClrange.c, src/SDCClrange.h:
9470         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9471
9472         * src/ds390/ralloc.c:
9473         various fixes & enhancements (ds390) specific
9474
9475         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9476         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9477         from rallocs.
9478
9479         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9480
9481 2002-03-02    <johan AT FRIJA>
9482
9483         * src/SDCCast.c (decorateType): fixed bug #524708
9484
9485         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9486
9487         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9488
9489 2002-03-01  Michael Hope  <michaelh AT vroom>
9490
9491         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9492
9493         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9494
9495 2002-03-01    <johan AT FRIJA>
9496
9497         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9498
9499         * src/SDCCast.c (decorateType): fixed bug #524209
9500
9501         * src/SDCCval.c (valNot): fixed bug #524195
9502
9503 2002-02-26    <johan AT balder>
9504
9505         * src/xa51/gen.c: fixed a warning
9506
9507         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9508
9509         * src/SDCCast.c (decorateType): fixed bug #522534
9510
9511 2002-02-23    <johan AT balder>
9512
9513         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9514
9515 2002-02-22    <johan AT balder>
9516
9517         * src/SDCCast.c: fixed bug #514865
9518
9519         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9520
9521 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9522
9523         * sdcc/src/SDCCloop.c:
9524         Previous fix was not good. basic blocks that have "break" or "return" are
9525         not really partof a loop , but live ranges used in these blocks should
9526         be live thru the entire loop, so set partOfLoop but don't add them to
9527         loop region
9528
9529 2002-02-21    <johan AT FRIJA>
9530
9531         * src/SDCCcse.c: fixed bug #514308
9532
9533 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9534
9535         * src/SDCCloop.c:
9536         Fixed BUG #519583. If a conditional block ended in a return/break
9537         statement inside a loop, it was not being considered part of the loop.
9538
9539         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9540
9541 2002-02-10  Karl Bongers <karl AT turbobit.com>
9542
9543         * debugger/*:
9544         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9545         with lots of comments and notes.
9546
9547         * device/examples/test2.c:
9548         Fix bug, "red" variable not being initialized(compiler complained).
9549
9550         * device/examples/Makefile, examples/test3.c:
9551         Add Makefile in device/examples folder, compiles test3.c
9552         for use as a multiple module SDCDB test case.
9553
9554         * sim/ucsim/cmd.src/cmdset.cc:
9555         Took out debug printfs in ucsim "next" command.
9556
9557         * sim/ucsim/xa.src:
9558         Karl and Johan start ucsim XA support.  Most dissassembly working,
9559         about 75% emulation done(plenty of work remaining).
9560
9561         * sim/ucsim/z80.src:
9562         Add Z80 support to ucsim, add test-ucz80 regression test,
9563         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9564         Notice z80 compiler fails on examples/test3.c/crc code.
9565
9566 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9567
9568         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9569         Added support for --parms-in-bank1
9570
9571         * src/ds390/peeph.def:
9572         added a few more peephole optimzations
9573
9574         * src/ds390/main.c:
9575         1) added __builtin_inp & __builtin_outp used to read in data of given length
9576            from a memory mapped port
9577         2) added __builtin_memcmp
9578         3) added __builtin_swapw swap bytes of a short
9579
9580         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9581         1) handle multiple send & receives from register bank1
9582         2) ralloc can now allocate DPTR1 to some liveRanges
9583
9584         * src/SDCCsymt.c, src/SDCCsymt.h:
9585         changes to handle multiple sends & receives
9586
9587         * src/SDCCptropt.h:
9588         added some pointer arithmetic optimization
9589
9590         * src/SDCCptropt.c:
9591         added some pointer arithmetic optimizations but not stable yet so not
9592         called from anywhere (will get this working shortly)
9593
9594         * src/SDCCopt.c: fixed for multiple sends & receives
9595
9596         * src/SDCCmain.c:
9597         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9598         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9599            set preprocessor defines (depending on options)
9600
9601         * src/SDCCicode.c, src/SDCCicode.h:
9602         changes made to handle multiple sends & receives
9603
9604         * src/SDCCglobl.h:
9605         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9606
9607         * src/SDCCcse.c, src/SDCCcse.h:
9608         added function findbackward def (to be used in upcoming optimization)
9609
9610         * src/SDCCcflow.c, src/SDCCcflow.h:
9611         added function returnAtEnd - to determine if a basic block terminates with
9612         a RETURN iCode
9613
9614         * src/SDCCast.c, src/SDCCast.h:
9615         added option parms-in-bank1
9616
9617         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9618         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9619         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9620         adjusted for --parms-in-bank1 option
9621
9622         * device/include/string.h:
9623         donot redefine "reentrant" keyword
9624
9625         * device/include/ds80c390.h: Added some more SFRs
9626
9627 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9628
9629         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9630
9631 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9632
9633         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9634
9635 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9636
9637         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9638
9639 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9640
9641         * Added --xram-movc option
9642
9643 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9644
9645         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9646
9647 2002-01-11  Johan Knol
9648
9649         * Added math lib of Jesus Calvino-Fraga
9650
9651 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9652
9653         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9654         * support/regression/Makefile: new target test-mcs51-stack-auto
9655         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9656
9657 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9658
9659         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9660
9661 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9662
9663         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9664
9665 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9666
9667         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9668
9669         * src/SDCCglue.h: add definition for printIvalChar()
9670
9671 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9672
9673         * src/SDCCast.c: fix #498138 by Johan
9674
9675         * src/SDCCglue.c: fix #498138 by Johan
9676
9677 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9678
9679         * support/regression/Makefile: fix clean
9680
9681         * support/regression/ports/ds390/support.c: fix transmission of last character
9682
9683 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9684
9685         * /sdcc/src/ds390/gen.c:
9686         a) improved computing address of stack variable
9687         b) took out some #if 0 code
9688         c) improved parmBytes adjustment
9689         d) improved genPlusIncr & genMinusIncr
9690         e) genCmp could generate bad code (when left assigned to DPTR)
9691         f) Fixed bug in hasInc
9692
9693         * /sdcc/src/ds390/ralloc.c:
9694         a) packRegsForSupport could mess up live information (Fixed)
9695         b) packRegsDPTRuse could be incorrect for left & right shift
9696
9697         * /sdcc/src/mcs51/ralloc.c:
9698         packRegsForSupport could mess up the live information (Fixed)
9699
9700         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9701
9702         * /sdcc/src/SDCCast.c:
9703         can reverse a loop even if function call is present as long
9704         as the loop control variable is local & is not passed as parameter
9705
9706 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9707
9708         * /sdcc/ChangeLog: *** empty log message ***
9709
9710         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9711         More builtin function additions for TININative
9712
9713         * /sdcc/src/ds390/ralloc.c:
9714         Had broken the regression testsuite
9715
9716         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9717
9718         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9719         Added funcattr hasStackParms will be set for reentrant functions when there
9720         are paramteres on the stack, this helps in minimizing frame pointer generation
9721         typeFromStr can handle function pointers now
9722
9723         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9724         *** empty log message ***
9725
9726 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9727
9728         * /src/ds390/gen.c, /src/ds390/main.c:
9729         More builtin function additions for TININative
9730
9731         * /src/ds390/ralloc.c:
9732         Had broken the regression testsuite
9733
9734         * /src/SDCCast.c: Fixed a bug in dumptree
9735
9736         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9737         Added funcattr hasStackParms will be set for reentrant functions when there
9738         are paramteres on the stack, this helps in minimizing frame pointer generation
9739         typeFromStr can handle function pointers now
9740
9741         * /doc/builtins.txt, /doc/TININative.txt:
9742         *** empty log message ***
9743
9744
9745 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9746
9747         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9748         ALPHA version for -mTININative
9749
9750         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9751         updated to reflect changes in the port structure
9752
9753         * /src/port.h:
9754         added function do_assemble (similar to do_link) if non-null this function
9755         will be called to do assembly (-mTININative) requires a multi command
9756         assembly
9757         added function genAssemblerEnd will be called to generate assembler Epilogue
9758
9759         * /src/SDCCsymt.c:
9760         added _JavaNative to debug info printing
9761
9762         * /src/SDCCmain.c: added option --tini-libid
9763         added port->do_assemble function (-mTININative) has a multi command assemble
9764
9765         * /src/SDCCglue.c: Disabled "constExpr" check
9766         added port->genAssemblerEnd function
9767
9768         * /src/SDCCglobl.h: Added option --tini-libid value
9769
9770         * /src/SDCCast.h:
9771         tookout optimizeCompare from the header (has no external references)
9772
9773         * /src/SDCCast.c: made one more function "static"
9774
9775 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9776
9777         * src/z80/mappings.i: Added z80asm support.
9778
9779         * src/z80/main.c: Added z80asm support on --asm=z80asm
9780
9781         * src/z80/gen.c: Fixed asm portability issues.
9782
9783         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9784
9785         * src/SDCCglue.c (printExterns): Added global/extern split.
9786
9787 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9788
9789         * support/regression/Makefile: added test for mcs51 model large
9790
9791         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9792
9793         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9794
9795 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9796
9797         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9798
9799 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9800
9801         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9802
9803         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9804
9805 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9806
9807         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9808
9809         * support/regression/tests/simplefloat.c: Port to mcs51.
9810
9811 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9812         * support/regression/tests/bug-485362.c: Added.
9813
9814         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9815
9816         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9817
9818         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9819
9820         * src/z80/gen.c (aopDump): Added a dump function.
9821
9822 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9823         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9824
9825         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9826
9827         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9828
9829         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9830
9831         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9832
9833         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9834
9835         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9836
9837         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9838
9839         * support/regression/ports/ds390/support.c: Use tinibios.
9840
9841         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9842
9843 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9844
9845         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9846         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9847
9848         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9849
9850         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9851
9852 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9853
9854         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9855
9856         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9857         (packRegsForIYUse): Created and optimised.
9858
9859 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9860
9861         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9862 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9863
9864         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9865
9866         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9867
9868         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9869
9870 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9871
9872         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9873
9874         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9875
9876 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9877
9878         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9879
9880         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9881
9882         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9883
9884 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9885
9886         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9887         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9888         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9889
9890         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9891
9892         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9893         (genNotFloat): Added.
9894         (genUminusFloat): Added.
9895
9896         * device/lib/z80/Makefile: Added floating pt stubs.
9897
9898         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9899
9900         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9901
9902         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9903
9904 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9905
9906         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9907
9908         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9909
9910         * sdcc/support/regression/Makefile: Add port ds390.
9911
9912         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9913
9914         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9915
9916         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9917
9918         * sdcc/support/regression/ports/ds390/support.c: Added.
9919
9920         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9921
9922         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9923
9924         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9925
9926 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9927
9928         * device/include/malloc.h: Added z80 and gbz80 support.
9929
9930         * device/lib/gbz80/heap.s: Added.
9931
9932         * device/lib/z80/heap.s: Added.
9933
9934         * device/lib/malloc.c: Added z80 and gbz80 support.
9935
9936         * support/regression/tests/malloc.c (testMalloc): Added.
9937
9938         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9939
9940         * support/regression/tests/bug-478094.c: Added.
9941
9942         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9943
9944 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9945
9946         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9947
9948         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9949
9950         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9951
9952         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9953
9954         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9955
9956 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9957
9958         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9959
9960 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9961
9962         * support/regression/tests/bug-477927.c: Added.
9963
9964         * src/z80/peeph.def: Added minor rules.
9965
9966         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9967
9968         * src/z80/peeph.def: Added jump optimisation modification.
9969
9970 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9971
9972         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9973
9974 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9975
9976         * support/regression/tests/funptrs.c: Added.
9977
9978 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9979
9980         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9981
9982 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9983
9984         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9985
9986         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9987
9988         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9989         (movLeft2ResultLong): Created.
9990
9991         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9992         (joinPushes): Added.  Joins two char pushes into a word push.
9993
9994 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9995
9996         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9997
9998         * support/makebin/Makefile (install): Added creation of dest dir.
9999
10000 2001-10-24 Karl Bongers <karl AT turbobit.com>
10001
10002         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10003
10004 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10005
10006         * src/z80/ralloc.c: Turned off faulty pack for one use.
10007
10008         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10009
10010         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10011
10012 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10013
10014         * support/regression/Makefile: Improved clean
10015
10016         * support/regression/ports/gbz80/spec.mk: Added clean
10017
10018         * support/regression/ports/host/spec.mk: Added clean
10019
10020         * support/regression/ports/z80/spec.mk: Added clean
10021
10022         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10023
10024         * support/regression/ports/mcs51/timeout.c: little improvements
10025
10026 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10027
10028         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10029
10030         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10031
10032         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10033
10034 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10035
10036         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10037
10038         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10039
10040 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10041         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10042
10043         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10044
10045         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10046
10047         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10048
10049         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10050
10051         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10052
10053         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10054
10055         * support/regression/tests/longor.c: Added.
10056
10057 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10058
10059         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10060
10061         * as/mcs51/aslink.h: define PATH_MAX
10062
10063         * as/mcs51/asm.h: define PATH_MAX
10064
10065         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10066
10067         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10068
10069         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10070
10071         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10072
10073         * src/SDCCglobl.h: define PATH_MAX
10074
10075         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10076
10077         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10078
10079 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10080
10081         * src/z80/gen.c (gencjneshort): Fixed
10082
10083         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10084
10085 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10086
10087         * support/regression/tests/bug-469671.c: Added.
10088
10089         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10090
10091 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10092
10093         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10094
10095         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10096
10097 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10098
10099         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10100
10101         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10102
10103         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10104
10105         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10106
10107         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10108
10109         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10110
10111         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10112
10113 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10114
10115         * 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.
10116
10117         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10118
10119         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10120
10121 2001-10-07    <johan AT FRIJA>
10122
10123         * device/lib/gets.c (gets): fixed the return value.
10124
10125 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10126         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10127
10128         * 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.
10129
10130         * 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.
10131
10132         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10133
10134         * src/pic/gen.c: Removed Safe_strdup.
10135
10136         * configure.in: Added option to enable libgc support.
10137
10138         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10139         (bitVectUnion): Optimised.
10140         (bitVectIntersect): Optimised.
10141         (bitVectBitsInCommon): Optimised.
10142         (bitVectCplAnd): Optimised.
10143
10144         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10145
10146 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10147
10148         * src/SDCCmain.c: distinguish between assembler debug and plain options
10149
10150         * src/avr/main.c:   remove standard assembler options
10151
10152         * src/ds390/main.c: remove standard assembler options
10153
10154         * src/mcs51/main.c: remove standard assembler options
10155
10156         * src/port.h: removed "PENDING" comment
10157
10158 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10159
10160         * src/device/lib/_mulint.c  : new, with assember functions
10161
10162         * src/device/lib/_mullong.c : new, with assember functions
10163
10164         * src/device/lib/_divuint.c : with assember functions
10165
10166         * src/device/lib/_divsint.c : with assember functions
10167
10168         * src/device/lib/_divulong.c: with assember functions
10169
10170         * src/device/lib/_divslong.c: with assember functions
10171
10172         * src/device/lib/_moduint.c : with assember functions
10173
10174         * src/device/lib/_modsint.c : with assember functions
10175
10176         * src/device/lib/_modulong.c: with assember functions
10177
10178         * src/device/lib/_modslong.c: with assember functions
10179
10180         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10181
10182         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10183
10184         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10185                                       replaced _mululong.c and _mulslong.c by _mullong.c
10186
10187 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10188
10189         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10190
10191 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10192
10193         * src/SDCCglue.c: test, if win32api is available for MINGW
10194
10195 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10196
10197         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10198         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10199         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10200         * support/regression/ports/host/spec.mk: removed GENERIC
10201         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10202         * support/regression/ports/z80/spec.mk: removed GENERIC
10203
10204 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10205
10206         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10207
10208         * support/regression/tests/bug-467035.c: Created.
10209
10210 2001-10-01    <johan AT FRIJA>
10211
10212         * src/SDCC.y: fixed bug #466586 part 1
10213
10214 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10215
10216         * SDCCicode.c: z80 has no generic pointers
10217         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10218
10219 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10220
10221         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10222
10223 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10224
10225         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10226
10227         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10228
10229 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10230
10231         * configure.in: Fixed up so that ucsim is only configured once.
10232
10233         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10234
10235         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10236         (getPathDifference): As above.
10237
10238         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10239
10240         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10241
10242 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10243         * .version: Updated to 2.3.1
10244
10245         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10246         Added copyright header.
10247
10248         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10249         (assemble): Added support for macro based assembler commands.
10250         (linkEdit): Added support for macro based linker commands.
10251         (preProcess): Changed the pre-processor to use macros.
10252         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10253         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10254
10255         * device/lib/z80/crt0.s: Added module name for debugging.
10256
10257 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10258
10259         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10260
10261         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10262
10263         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10264
10265         * src/Makefile.in: Added SDCCmacro and SDCCutil
10266
10267 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10268
10269         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10270
10271 2001-09-16    <johan AT FRIJA>
10272
10273         * 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.
10274
10275 2001-09-15    <johan AT FRIJA>
10276
10277         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10278         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10279
10280 2001-09-11    <johan AT FRIJA>
10281
10282         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10283
10284 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10285
10286         * support/regression/tests/bug-460444.c: Added test case.
10287
10288         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10289         (genCast): Added justification for all of the asserts.
10290
10291 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10292
10293         * support/regression/support.c: _xdata replaced by xdata
10294
10295         * support/regression/spec.mk: removed _generic
10296
10297 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10298
10299         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10300
10301         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10302         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10303
10304         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10305
10306         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10307
10308         * support/regression/tests/bug-460010.c: Added test case.
10309
10310         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10311
10312 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10313
10314         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10315
10316         * support/regression/testfwk.c: removed workaround for bug #436344
10317
10318         * support/regression/tests/bp.c: use less memory with mcs51
10319
10320         * support/regression/tests/bug-441448.c: use less memory
10321
10322         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10323
10324         * support/regression/collate-results.py: typo
10325
10326 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10327
10328         * support/regression/tests/fetchoverlap.c: Added new test case.
10329
10330         * support/regression/tests/bp.c: Added new test case.
10331
10332         * support/regression/tests/bug-448984.c: Added new test case.
10333
10334         * support/regression/tests/pow2shifts.c: Added new test case.
10335
10336         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10337         (genlshTwo): Fixed right shift for count > 8.
10338
10339         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10340
10341 2001-09-08    <johan AT FRIJA>
10342
10343         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10344
10345 2001-09-07    <johan AT FRIJA>
10346
10347         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10348
10349         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10350
10351 2001-09-06    <johan AT FRIJA>
10352
10353         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10354         * bernhard noted me at this: "() equals to (void)" (1.38)
10355
10356 2001-09-05    <johan AT FRIJA>
10357
10358         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10359
10360 2001-09-04    <johan AT FRIJA>
10361
10362         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10363
10364
10365 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10366
10367         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10368
10369 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10370
10371         * link/z80/aslink.h: Fixed path for PATH_MAX
10372
10373 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10374
10375         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10376
10377         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10378
10379         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10380
10381         * 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.
10382
10383 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10384
10385         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10386         (genCmp): Fixed up genCmp for the GB with longs.
10387
10388         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10389
10390         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10391
10392         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10393
10394         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10395
10396 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10397
10398         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10399
10400 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10401
10402         * 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.
10403
10404         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10405
10406 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10407
10408         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10409
10410         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10411
10412 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10413
10414   * sim/ucsim/configure:    little improvement of Cygwin-detection
10415   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10416   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10417   * support/regression/tests/bug-221100.c: small changes for mcs51
10418   * support/regression/tests/bug-221168.c: small changes for mcs51
10419   * support/regression/tests/bug-227710.c: small changes for mcs51
10420   * support/regression/tests/staticinit.c: small changes for mcs51
10421   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10422   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10423   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10424
10425 $Revision$