* as/hc08/aslex.c,
[fw/sdcc] / ChangeLog
1 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
2
3         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
4         ((void (code *) (void)) 0) ();
5         * as/hc08/aslex.c,
6         * as/hc08/aslink.h,
7         * as/hc08/asm.h,
8         * as/hc08/asmain.c,
9         * as/hc08/lkdata.c,
10         * as/hc08/lklex.c,
11         * as/hc08/lkmain.c,
12         * as/mcs51/aslex.c,
13         * as/mcs51/aslink.h,
14         * as/mcs51/asm.h,
15         * as/mcs51/asmain.c,
16         * as/mcs51/lkdata.c,
17         * as/mcs51/lklex.c,
18         * as/mcs51/lkmain.c,
19         * as/z80/aslex.c,
20         * as/z80/asm.h,
21         * as/z80/asmain.c: fixed build on current cygwin:
22         replaced getline() by as_getline()
23
24 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
25
26         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
27         declarator in the symbol chain
28         * src/SDCCsymt.h,
29         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
30         parameter list for function pointers
31         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
32         * support/regression/tests/bug-716242.c: added
33
34 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
35
36         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
37         offset if possible
38         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
39
40 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
41
42         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
43         inifinitely recurseable, added static   
44         * support/regression/tests/bug-1408066.c: added
45
46 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
47
48         * src/SDCCicode.h,
49         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
50         renamed, added possibility to create "postLoopLbl"-labels
51         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
52         newiTempLoopHeaderLabel
53         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
54         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
55         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
56         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
57         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
58         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
59         (basicInduction): fixed bug #136564, made static,
60         (loopInduction): changed parameter of basicInduction, made static,
61         (addPostLoopBlock): added
62         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
63         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
64         findLoopEndSeq
65         * support/regression/tests/bug-136564.c: added
66         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
67         --std-sdcc99 to LIBSDCCFLAGS
68
69 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
70
71         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
72         while loop
73         * support/regression/tests/bug-1406131.c: added
74
75 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
76
77         * src/SDCCast.c (decorateType): fix promotion of unary minus
78         * src/SDCCsymt.c (computeType): beautified
79         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
80         (valUnaryPM, valComplement): fix sign and promotion,
81         (valNot): ANSI: result type is int (SDCC: unsigned char)
82         * support/regression/tests/uminus.c: speedup by removing superflous
83         test case 'int'
84         * support/regression/tests/onebyte.c: added promotion and signedness
85         tests for unary minus
86         * support/regressions/tests/bug-477927.c: disable warning about
87         uninitialized variables
88         * support/regression/tests/not.c: added
89
90 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
91
92         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
93         * src/mcs51/gen.c (gen51Code): show final register usage after
94         fillGaps in asm with --i-code-in-asm
95         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
96         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
97         incUsed, rliveClear, adjustIChain): made static,
98         (setFromRange): excluded because it's unused,
99         (findPrevUseSym, markWholeLoop): added,
100         (findPrevUse): rewritten; fixes bug 895992; now a complete search
101         through all branches of predecessors enables sdcc to emit the warning
102         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
103         (rlivePoint): made static, added parameter emitWarnings which is only
104         true during the first run out of two,
105         (findRecursiveSucc, findRecursivePred): removed,
106         (computeLiveRanges): made static, added parameter emitWarnings,
107         (dumpIcRlive): added for debugging only
108         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
109         removed prototype of setFromRange()
110         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
111         in call of computeLiveRanges()
112         * support/regression/tests/bug-895992.c: added
113         * support/regression/tests/bug-971834.c: added
114         * support/valdiag/tests/bug-895992.c: added
115         * support/valdiag/tests/bug-971834.c: added
116
117 2005-12-18 Raphael Neider <rneider AT web.de>
118
119         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
120           (genUnpackBits): improved code for direct operands,
121           (genPackBits): improved code for literal assignment to bitfields
122             and for direct destination operands (no FSR indirection),
123             prevented redundant AND, fixes #1362800,
124           (AccLsh): added parameter to disable masking of the result
125         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
126           skip instructions with side-effects (like incfsz),
127           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
128         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
129         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
130           fixes #1375263
131
132 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
133
134         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
135         volatile variables as spill location
136
137 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
138
139         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
140         replacing literals
141         * support/regression/tests/bug-1376320.c: added
142
143 2005-12-08 Raphael Neider <rneider AT web.de>
144
145         * src/pic/device.c: renamed is_shared to pic14_is_shared
146         * src/pic/gen.c (genIfx): re-enabled handling of sbits
147         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
148           (is_valid_identifier): added for above workaround
149
150 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
151
152         * device/lib/Makefile.in: fixed to enable port-specific-objects
153         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
154           char, thanks Hubert Sack
155         * doc/sdccman.lyx: documented --xstack-loc,
156           elaborated a bit more on interrupts and pitfalls,
157           removed "setjmp/longjmp unsupported",
158           documented some unsupported C99 features
159         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
160         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
161           if, thanks Hubert Sack
162         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
163         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
164           make make_library
165         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
166           regression tests can report resource usage (rfe 700441)
167         * support/regression/collate-results.py: report resource usage
168         * support/regression/ports/ds390/spec.mk,
169         * support/regression/ports/hc08/spec.mk,
170         * support/regression/ports/mcs51/spec.mk,
171         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
172         * support/regression/ports/ds390/uCsim.cmd,
173         * support/regression/ports/hc08/uCsim.cmd,
174         * support/regression/ports/mcs51/uCsim.cmd,
175         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
176         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
177           library, use the default one
178         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
179           building the library
180
181 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
182
183         * config.dsp: added dependency on .version and configure_vc.awk
184         * device/include/setjmp.h: updated for --stack-auto and --xstack
185         * device/include/mcs51/at89c51snd1c.h: corrected line endings
186         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
187         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
188         * device/lib/libsdcc.lib: added _setjmp
189         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
190           (decorateType): fixed bug 1372851,
191           (optimizeGetHbit): fixed warning
192         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
193           array initialisation
194         * support/regression/tests/bug1057979.c: added test for bug 1358192
195         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
196
197 2005-12-03 Borut Razem <borut.razem AT siol.net>
198
199         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
200           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
201
202 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
203
204         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
205         createIval): implement symbol independant "flexible array member",
206         (createIvalCharPtr): implemented flexible array initialisation with a
207         string
208         * src/SDCCsymt.c (copyStruct): removed,
209         (getSize): fixed misleading comment,
210         (getAllocSize): removed, the additional allocation size is now in
211         sym->flexArrayLength,
212         (checkStructFlexArray): new, syntax checks for flexible array members,
213         (compStructSize): added syntax checks for "flexible array members"
214         (copyStruct): removed,
215         (copyLinkChain): removed inefficient fix for bug 770487
216         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
217         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
218         symbol->flexArrayLength
219         * src/SDCCerr.c,
220         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
221         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
222         * support/regression/tests/structflexarray.c: added
223         * support/valdiag/tests/structflexiblearray.c: added
224
225 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
226
227         * src/SDCCast.c (decorateType): fixed bug 1368489
228         * support/Util/SDCCerr.c,
229         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
230
231 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
232
233         * device/include/mcs51/at89c51snd1c.h: added file submitted by
234           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
235
236 2005-11-27 Borut Razem <borut.razem AT siol.net>
237
238         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
239           support/cpp2/mkdeps.h: added command line option
240           -obj-ext=<extension> to SDCPP to define object file externion, used
241           for generation of make dependencies (-M)
242         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
243
244 2005-11-26 Borut Razem <borut.razem AT siol.net>
245
246         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
247           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
248           added pic and pic16 libraries
249
250 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
251
252         * device/include/float.h: Corrected typo in prototype of __fsgt
253
254 2005-11-25 Borut Razem <borut.razem AT siol.net>
255
256         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
257           added creation of model-mcs51-stack-auto libraries
258
259 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
260
261         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
262         and fields-list too
263         * src/SDCCast.c (createIvalArray): removed obsolete comment
264
265 2005-11-24 Borut Razem <borut.razem AT siol.net>
266
267         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
268           added missing device/lib/mcs51/crt*.asm sources
269
270 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
271
272         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
273
274 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
275
276         * device/lib/_fs2schar.c,
277         * device/lib/_fs2sint.c,
278         * device/lib/_fs2slong.c: optimized inline asm
279
280 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
281
282         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
283           Better handling of floats between -1.0 and 0.0.
284
285 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
286
287         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
288           (the missing "if"s prohibited removal of redundant labels)
289
290 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
291
292         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
293           Properly convert floats between -1.0 and 0.0 to long, int, and char
294           types (max integer value of negative floats tends to zero).
295         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
296           Removed changes made so to work properly with floats between
297           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
298           and _fs2char.c
299
300 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
301
302         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
303         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
304         (genCast) cosmetic change
305         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
306         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
307         from mcs51
308         * support/regression/tests/bitfields (testSignedBitfields): added
309
310 2005-11-18 Borut Razem <borut.razem AT siol.net>
311
312         * sdcc/device/lib/Makefile.in: remove all unnecessary files
313         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
314           introduced SILENT option to make building of pic16 libraries less
315
316 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
317
318         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
319           Now they work properly with floats between -1.0 and 0.0
320         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
321
322 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
323
324         * src/SDCCicode.c (printOperand): added missing else
325
326 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
327
328         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
329         reformatted for better readability
330         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
331         signed bitfields
332
333 2005-11-17 Borut Razem <borut.razem AT siol.net>
334
335         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
336           introduced SILENT option to make building of pic16 libraries less
337           verbose - used for nightly snapshot build
338         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
339           available on Win32 platforms.
340         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
341           medium, large, pic and pic16
342
343 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
344
345         * device/lib/printf_large.c: Temporary patch for bug 1358192:
346           printf("%f"...) sets fraction to zero.
347
348 2005-11-16 Raphael Neider <rneider AT web.de>
349
350         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
351           fixes #1357221
352         * src/pic/gen.c (genIfx): implemented for CARRY bit
353         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
354           to generic pointers, fixes #1357332,
355           (pic16_movLit2f): NEW,
356           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
357
358 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
359
360         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
361
362 2005-11-11 Raphael Neider <rneider AT web.de>
363
364         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
365         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
366           compute pointer's type from operand,
367           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
368           improved single bit reads, fixes bug #1353379
369
370 2005-11-09 Borut Razem <borut.razem AT siol.net>
371
372         * support/scripts/sdcc.nsi: added lib/pic to the package
373
374 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
375
376         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
377
378 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
379
380         * support/regression/tests/bug1348008.c: added
381         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
382         * support/regression/tests/bug1337835.c: updated comment
383
384 2005-11-06 Borut Razem <borut.razem AT siol.net>
385
386         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
387           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
388           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
389           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
390           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
391           dynamic construction of cl_error_class and derivates - 2.nd try
392
393 2005-11-05 Borut Razem <borut.razem AT siol.net>
394
395         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
396           bug, which caused Bus Errors on sparc solaris
397
398 2005-11-04 Borut Razem <borut.razem AT siol.net>
399
400         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
401           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
402           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
403           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
404           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
405           and derivates to resolve the initialization problem on OSX
406
407 2005-11-02 Borut Razem <borut.razem AT siol.net>
408
409         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
410           corrected typo - #include <winsock2.h>
411
412 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
413
414         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
415           (_asxxxx_mapping): added org directive for future enhancements
416
417 2005-11-01 Borut Razem <borut.razem AT siol.net>
418
419         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
420           enabled sockets on WIN32
421         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
422
423 2005-10-31 Borut Razem <borut.razem AT siol.net>
424
425         * support/regression/generate-cases.py: escape backslashes in {testcase}:
426           WIN32 backslash path delimiters should be escaped when used in C strings
427         * support/regression/tests/bitfields.c: exclude failing assertions for
428           __CYGWIN32__ and __MINGW32__ hosts
429
430 2005-10-30 Borut Razem <borut.razem AT siol.net>
431
432         * src/SDCCutil.c: corrected double comparison typo
433
434 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
435
436         * device/lib/medium/Makefile: added for new memory model medium
437         * device/include/asm/mcs51/features.h: updated for medium/pdata
438         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
439           added Multiply & Accumulate sbit's and MAC0_PAGE define
440         * device/include/mcs51/c8051f300.h: added sfr16 definitions
441         * device/include/mcs51/c8051f310.h: added sfr16 definitions
442         * device/lib/_mullong.c: update for medium model
443         * device/lib/incl.mk: added medium model
444         * doc/sdccman.lyx: documented medium model
445         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
446         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
447         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
448         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
449           (allocParms): set SCLS and OCLS to pdata for medium model
450         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
451           for pdata,
452           (powof2): return <0 if not power of 2
453         * src/avr/gen.c (genBitWise): use updated powof2
454         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
455           (shiftR2Left2Result): small optimization in setup, save acc when storing,
456           (shiftLLeftOrResult): use B if necessary
457         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
458         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
459         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
460         * support/regression/Makefile.in: added test-mcs51-medium
461         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
462
463 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
464
465         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
466         specifier unsigned
467         * device/lib/time.c (mktime): fixed bug 1334315
468
469 2005-10-28 Raphael Neider <rneider AT web.de>
470
471         * device/include/pic/p16f_common.inc: added common declarations
472         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
473
474 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
475
476         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
477           (aopPutUsesAcc): added to predict accumulator use,
478           (assignResultValue): save acc if necessary,
479           (genMinusDec): store result if indirectly addressed,
480           (genDivOneByte):  save acc if necessary,
481           (movLeft2Result): bugfix if left already in acc,
482           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
483             attention to accumulator use (esp. pdata),
484           (genReceive): receive pdata correctly
485         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
486         * src/SDCCicode.h: added isOperandInPagedSpace prototype
487
488 2005-10-27 Raphael Neider <rneider AT web.de>
489
490         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
491
492 2005-10-27 Raphael Neider <rneider AT web.de>
493
494         * .version: changed version to 2.5.4
495         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
496         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
497           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
498             arithmetics support routines
499         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
500         * device/lib/Makefile.in: also create installdir for pic
501
502         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
503           pic14 port as well
504         * src/pic/device.c (dump_sfr): rewritten to delegate register
505           placement to the linker (use `extern sym' rather than sym EQU addr),
506           (validAddress): fixed to check last specified address
507         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
508           (popGetLit): truncate literal value to 8 bit,
509           (popGet): moved assert to more appropriate place
510           (popGetExternal): create pCode operand from and mark the according
511             symbol as being `extern'
512           (popGetAddr): added sanity check on immediate's offset, provide
513             GPOINTER tag on demand
514           (aopPut): fixed for immediates,
515           (mov2w_op): move operand's address or contents to WREG (depending on
516             operand type), safer variant of mov2w,
517           (movwf,call_libraryfunc): NEW, handy abbreviations,
518           (get_argument_pcop,get_return_val_pcop,pass_argument,
519           get_returnvalue): interface for accessing function parameters and
520             return values,
521           (assignResultValuei,genRet): use new parameter/return value interface
522           (pic14_getDataSize): back to old version handling generic pointers,
523           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
524             provided implementation and/or fixed old one,
525           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
526             calls, removed legacy 8051 reference code
527           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
528           (loadSignToC): NEW, move the operands sign bit to CARRY,
529           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
530             genRightShiftSigned, accepts negative shift counts,
531           (setup_fsr): load FSR and adjust IRP (indirect memory access),
532           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
533             generic pointers, __data pointers and __code pointers,
534           (genUnpackBits,genPackBits): rewritten to work with generic pointers
535             and signed bitfields, limit bitfields to 8 bit,
536           (genDataPointerGet): fixed number of bytes read,
537           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
538           (genPointerGet,genPointerSet): fixed handling of __code pointers,
539             pointers to constant data are no longer assumed to point to __code
540             space, removed invalid pointer types,
541           (bitpatternFromVal): retrieve the PICs representation of an integer
542             or float literal,
543           (genDataPointerSet): fixed assigning to po_immediate operands,
544           (genGenPointerSet): implemented as library call,
545           (genIfx): fixed incorrect condition,
546           (genAddrOf): limit generic pointers' addresses to 2 bytes,
547             provide GPOINTER tag according to destination's storage class,
548           (genCast): added code to handle casting to generic pointers, added
549             sign-/zero extension of the result
550           (aop_isLitLike,op_isLitLike): fixed handling of immediates
551         * src/pic/gen.h: added macros to access IRP bit in STATUS register
552         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
553           extend the result
554         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
555           address/register resides in the shared banks
556           (emitSymbolToFile): improved to handle global and `pinned' symbols,
557             put all variables into separate sections (have the linker arrange
558             them)
559           (picglue): put init code and interrupt handlers in separate sections
560         * src/pic/main.c: added port specific options table, modified to PORT
561           structure to make GPOINTERs 3 byte, added pic14_options
562           (_pic14_do_link): private linking routine (update paths to libraries,
563             add libsdcc.lib by default)
564         * src/pic/main.h: declare pic14_options
565         * src/pic/pcode.c: fixed instructions i/o relations,
566           (RegCond): reverted to correct version,
567           (newpCodeOpLit): truncate literals to 8 bit,
568           (genericPrint): added debug output,
569           (getRegFromInstruction): fixed for various operand types, simplified
570           (BuildFlow): fixed broken handling of isntructions with labels
571           (LinkFlow): start at last instruction in flow (skip trailing comments),
572             pass the flow on to the next instruction after CALL
573           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
574           (insertPCodeInstruction): fixed inserting after a skip instruction,
575           (DoBankSelect): fixed for labeled instructions
576           (OptimizepBlock): honor --nopeep switch
577           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
578         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
579         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
580           (pCodeOptime2pCodes): allow disabling this optimization via
581             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
582             but is still buggy), started implementation of a dataflow based
583             pCode optimization (CSE + dead code elimination)
584           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
585         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
586           names are independant of the stack location and therefore portable across
587           devices
588
589 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
590
591         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
592           (selectSpil): fixed bug 1337835 by not spilling bit variables
593         * support/regression/tests/bug1337835.c: added test for this bug
594         * src/mcs51/peeph.def: restart after rule 3.c,
595           addded rules 263.x to optimize loading constants
596
597 2005-10-26 Raphael Neider <rneider AT web.de>
598
599         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
600         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
601           (genAssign): emit warning when casting literals to generic pointer
602             type, also applies when taking the address of a fixed variable,
603           (genCast): improved casting to generic pointers
604         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
605           extern variables, added verbose error message
606         * device/include/pic16/{string.h,errno.h}: added #pragma library c
607
608 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
609
610         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
611         carry must be complemented too
612         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
613         could be emitted by genMinus
614         * src/SDCCval.c (constVal): fixed bug 1305065
615
616 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
617
618         * src/SDCCast.c (addCast): added promotion for bit variables
619         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
620         promotion casts + optimisation
621         (optimizeGetWord): fix warning 'i' might be used uninitialized
622         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
623         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
624
625 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
626
627         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
628         all chars are promoted to int; promotion should be handled in SDCCast.c
629
630 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
631
632         * device/lib/_strcmp.c: Fixed bug 1326457
633
634 2005-10-11 Raphael Neider <rneider AT web.de>
635
636         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
637         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
638
639 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
640
641         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
642         * support/regression/tests/sfr16.c: added test for the sfr32 bug
643
644 2005-10-04 Raphael Neider <rneider AT web.de>
645
646         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
647           device/lib/pic16/pics.all: added pic18f1320
648         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
649
650 2005-09-30 Raphael Neider <rneider AT web.de>
651
652         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
653         * src/pic16/devices.inc: NEW, provides device descriptions
654         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
655
656 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
657
658         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
659           GETHBIT
660
661 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
662
663         * doc/sdccman.lyx: updated Highest Order Bit documentation,
664           documented Any Order Bit, Higher Order Byte and Higher Order Word
665         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
666         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
667           (optimizeGetAbit): new, to get any bit, not only the high bit,
668           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
669           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
670           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
671           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
672             RIGHT_OP: also try GETBYTE, GETWORD optimization,
673             GETABIT, GETBYTE, GETWORD: decorate them,
674           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
675           (ast_print): added GETABIT, GETBYTE, GETWORD
676         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
677         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
678           (geniCodeBinary): new generic binary icode,
679           (ast2iCode): added GETABIT, GETBYTE, GETWORD
680         * src/port.h: updated comment for PORT.hasExtBitOp
681         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
682           (genGetByte): new, to get a single byte,
683           (genGetWord): new, to get a word from a long,
684           (gen51Code): added GETABIT, GETBYTE, GETWORD
685         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
686
687 2005-09-23 Raphael Neider <rneider AT web.de>
688
689         * configure.in, configure: have device/lib/pic configured
690         * device/lib/Makefile.in: added model-pic14
691         * device/lib/clean.mk: added pic/ to clean rule
692         * device/lib/pic: added rudimentary pic14 library providing support
693           functions for multiplication/division/generic pointer access
694         * src/SDCCopt.c (convilong): mark support functions as extern
695           for pic14 port as well
696         * src/pic/gen.c (genMult): added assertions,
697           (genpic14Code): emit warning on unhandled iCodes
698         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
699         * src/pic/pcode.c (pCodeOpCopy),
700         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
701           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
702           SFR_REGISTER}), made safe for future extensions
703         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
704           instructions even if preceeded by SKIP instructions (also remove
705           them); removed unused code
706         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
707           prevents leaving parts of the structure uninitialized after copying
708
709 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
710
711         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
712           ago by me
713         * support/regression/tests/addsub.c: added test for the bug
714
715 2005-09-21 Raphael Neider <rneider AT web.de>
716
717         * device/include/pic16/pic18f1220.h,
718           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
719         * device/lib/pic16/Makefile.rules: added missing opening paren
720         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
721           are provided in genutils.c,
722           (genUminusFloat,genUminus,genCmpEq): added asserts on different
723           operand/result sizes,
724           (genCmp): assert on NULL pointers first, then check deref'ed values
725         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
726           result size
727
728 2005-09-18 Raphael Neider <rneider AT web.de>
729
730         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
731           as these are now unused,
732           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
733         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
734           local, avoids uninitialized pointer dereference on r->name
735         * src/pic16/ralloc.c (newReg): fixed indentation
736
737 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
738
739         * src/SDCCval.c (constVal): fixed bug 730366
740         * support/Util/SDCCerr.c,
741         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
742
743 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
744
745         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
746
747 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
748
749         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
750
751 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
752
753         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
754           (hex2dec): made hex_digit unsigned char, removed ascii dependance
755         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
756           (hex2dec): made hex_digit unsigned char, removed ascii dependance
757         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
758         * packihx/packihx.c (hexDigit): made c unsigned char
759         * as/mcs51/lklibr.c (fndsym),
760         * link/z80/lkgb.c (gb),
761         * link/z80/lklibr.c (fndsym),
762         * link/z80/lkrloc.c (relr),
763         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
764         * src/SDCC.lex (checkCurrFile, process_pragma),
765         * src/SDCCglue.c (spacesToUnderscores),
766         * src/SDCCmain.c (setParseWithComma, processFile),
767         * src/asm.c (tvsprintf, printCLine),
768         * src/avr/gen.c (emitcode, aopPut),
769         * src/ds390/gen.c (emitcode),
770         * src/hc08/gen.c (emitcode, emitinline),
771         * src/mcs51/gen.c (emitcode, genInline),
772         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
773           tokenizeLineNode),
774         * src/pic/ralloc.c (debugLog),
775         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
776           tokenizeLineNode),
777         * src/pic16/ralloc.c (debugLog),
778         * src/z80/main.c (_process_pragma):
779            made all ctype.h function calls safe
780         * src/SDCCopt.c: include math.h for fabs
781         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
782           and used them throughout the code to make ctype.h function calls safe
783         * src/ds390/main.c (asmLineNodeFromLineNode),
784         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
785         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
786            unsigned char*
787         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
788           (newpCodeAsmDir): made ctype.h function calls safe
789         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
790           pic16_emitcode):  made lbp unsigned char*
791         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
792           (pic16_newpCodeAsmDir): made ctype.h function calls safe
793         * src/xa51/gen.c (emitcode),
794         * src/z80/gen.c (_emit2): made lbp unsigned char*
795         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
796            char*
797
798 2005-09-05 Raphael Neider <rneider AT web.de>
799
800         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
801           access bank splitpoint
802
803 2005-09-05 Raphael Neider <rneider AT web.de>
804
805         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
806
807 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
808
809         * .version: changed to version 2.5.3
810         * doc/sdccman.lyx: changed version to 2.5.3,
811           documented --codeseg and --constseg and pragma codeseg and constseg,
812           documented bit parameters (reentrant) and bit returning
813         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
814            currFunc->recvSize, but is this ok for all ports?
815           (ast2iCode): result of ~ on unsigned char must be cast to int for
816            bool to work
817         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
818           function pointers in bit space
819         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
820           (processFuncArgs): call port.reg_parm() with reentrancy info
821         * src/port.h,
822         * src/avr/main.c,
823         * src/ds390/main.c,
824         * src/hc08/main.c,
825         * src/pic/main.c,
826         * src/pic16/main.c,
827         * src/xa51/main.c,
828         * src/z80/main.c: port.reg_parm prototype extended with
829           "bool reentrant" parameter
830         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
831           options.stackAuto for allocating bit register parameters
832         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
833           (genSend): set BitBankUsed if it is,
834           (selectRegBank): factored out of genCall for use in genPcall,
835           (genCall): removed redundant dtype assignmen, use selectRegBank,
836           (genPcall): handle returning in Carry properly, save in F0 if needed,
837           (genReceive): handle bit register parameters
838         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
839           (mcs51_assignRegisters): enable bit registers for all reentrant
840            functions and don't set BitBankUsed unconditionally
841         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
842         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
843         * support/regression/tests/funptrs.c: added tests for BOOL and for return
844
845 2005-08-27 Borut Razem <borut.razem AT siol.net>
846
847         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
848         ppc-osx (Darwin) does not support -u option. It seems that it is
849         supported only on Linux - GNU cp
850
851 2005-08-25 Borut Razem <borut.razem AT siol.net>
852
853         * sim/ucsim/gui.src/serio.src/Makefile.in,
854           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
855           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
856           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
857           install and strip, since the strip at /usr/ccs/bin should be used
858           on solaris
859
860 2005-08-24 Borut Razem <borut.razem AT siol.net>
861
862         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
863
864 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
865
866         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
867         ffffffffu
868
869 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
870
871         * as/mcs51/aslink.h: completed lkrloc.c prototypes
872         * as/mcs51/lkmain.c (link_main): fixed warning
873         * device/include/stdbool.h: ds390 has no advanced bit support yet
874         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
875         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
876         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
877           and updated their macros
878         * src/SDCCval.c (constVal): updated comment for renamed b_long
879
880 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
881
882         * as/mcs51/asdata.c: changed ctype['['] to BINOP
883         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
884           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
885           (oprio): set priority for '['
886         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
887            and adb_24_bit
888         * as/mcs51/asm.h: added defines R_BIT and S_BIT
889         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
890         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
891         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
892           added overlayable BIT_BANK area
893         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
894           (summary2): explain 'T' in legenda
895         * as/mcs51/lkrloc.c: replaced old K&R style,
896           (relr): added R_BIT processing,
897           (errmsg): added "Bit-addressable relocation error",
898           (adb_bit): added for converting from byte- to bit-addressable space,
899           (adb_24_bit): added for converting from byte- to bit-addressable space
900         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
901            used in reentrant functions now even as return value
902         * device/lib/_gptrput.c (_gptrput): removed obsolete code
903         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
904           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
905         * src/SDCCglobl.h: added indicator BitBankUsed
906         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
907            the bit registers b0-b7
908         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
909           (geniCodeCast): fixed bug 1263853,
910           (geniCodeLogicAndOr): put result in bool or char,
911           (geniCodeReceive): added parameter func for accessing the return type,
912           (geniCodeFunctionBody): pass func to geniCodeReceive
913         * src/SDCCmain.c: added indicator BitBankUsed
914         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
915         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
916           (checkSClass): don't put automatic bool/bit on stack,
917           (checkFunction): removed check on function cannot return bit
918         * src/SDCCsymt.h: added newBoolLink prototype
919         * src/mcs51/gen.c (rb1regs): added bit registers,
920           (movc): created for assigning to carry,
921           (pushReg, popReg): created for pushing registers,
922           (sameRegs): check both AOP_REG and AOP_CRY types,
923           (aopOp): handle bit registers,
924           (aopPut): optimization no self-assign,
925           (saveRegisters): push reg->base (bits) only once for bit registers,
926            and use pushReg,
927           (unsaveRegisters): pop reg->base only once and use popReg,
928           (assignResultValue): added parameter func and return in carry for bits,
929           (genIpush): optimization no reload in A if not changed,
930           (genSend): bit parameters in reentrant functions are passed in bit
931            registers by first assigning to bits in B, then save registers and
932            copy B to bits,
933           (genCall): handle returning in Carry properly, save it in F0 if needed,
934           (genPcall): updated assignResultValue call, this is not safe yet for bit
935            returning function !!!
936           (genFunction): don't generate equ's for bit registers and use pushReg,
937           (genEndFunction): take care of bit returning functions and use popReg,
938           (genRet): return bit in Carry,
939           (genIfx): optimize bit registers and other directly addressable bits,
940           (genReceive): updated assignResultValue call
941         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
942           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
943            registers when using stack-auto
944         * src/mcs51/ralloc.c (_G): added allBitregs,
945           (regs8051): added the bit registers,
946           (createStackSpil): use macro IS_BIT,
947           (getRegBit): added to allocate a bit register, else spill,
948           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
949           (updateRegUsage): factored out to ease stepping while debugging,
950           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
951            also allocate bit registers,
952           (fillGaps): handle bit registers,
953           (findAllBitregs): added to create bit vector with all bit registers,
954           (mcs51_allBitregs): returns this bit vector,
955           (mcs51_assignRegisters): when using stack-auto use bit registers for
956            passing parameters and creating local variables
957         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
958
959 2005-08-22 Borut Razem <borut.razem AT siol.net>
960
961         * device/lib/Makefile.in: replaced find option -or with -o
962           to make it run on solaris
963
964 2005-08-22 Raphael Neider <rneider AT web.de>
965
966         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
967           fixes #1265442 (crash on Solaris)
968
969 2005-08-20 Borut Razem <borut.razem AT siol.net>
970
971         * configure, configure.in: added tests for libsocket and libnsl libraries,
972           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
973           from support/regression/Makefile.in
974         * support/regression/Makefile.in: added
975         * device/lib/pic16/Makefile.common.in: force make to use bash shell
976         * sim/ucsim/libtool: regenerated on sparc-solaris
977         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
978           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
979           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
980           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
981           sparc-solaris, which doesn't use GNU ld linker
982         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
983         * as/Makefile: find on sparc-solaris does not support -maxdepth option
984
985 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
986
987         * src/mcs51/peeph.def: updated comments
988
989 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
990
991         * device/lib/_gptrget.c,
992         * device/lib/_gptrput.c: slightly shorter
993         * doc/sdccman.lyx: incremented version
994         * src/mcs51/peeph.def: moved peephole comments to the line of first
995           change to better keep line correlation, reanimated 186.e
996         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
997
998 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
999
1000         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1001           David Saxton with quotes around file name.
1002
1003 2005-08-15 Borut Razem <borut.razem AT siol.net>
1004
1005         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1006           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1007           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1008           make tests run on x86_64 platform
1009
1010 2005-08-13 Raphael Neider <rneider AT web.de>
1011
1012         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1013           as it might be executed DURING a build (parallel make is wonderful)
1014
1015 2005-08-13 Raphael Neider <rneider AT web.de>
1016
1017         * device/lib/Makefile.in (port-specific-objects-pic16):
1018           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1019         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1020           dependency
1021         * device/lib/pic16/Makefile.rules: build subdirs before creating
1022           the library, removed builddir rule, create $(builddir) early in
1023           recurse rule, use empty recurse rule for leaf directories
1024         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1025           mkdir errors (race condition), removed duplicate suffix "hex"
1026           from clean rules
1027         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1028         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1029           prevents mkdir -p from aborting on Alpha
1030
1031 2005-08-12 Raphael Neider <rneider AT web.de>
1032
1033         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1034           db-statements in order to allow for arrays of pointers in code
1035           sections to be placed without interspersed 0-padding, fixes
1036           bug #1256215
1037         * (emitStatistics): fixed division by zero for pic18f1220
1038         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1039           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1040         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1041         * (pic16_pCodeConstString): keep track of already emitted string
1042           literals to prevent "duplicate definitions of symbol _str_NR"
1043         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1044           debug message
1045         * device/lib/Makefile.in: ignore failing PIC16 library builds
1046         * device/lib/pic16/Makefile: do not build if gputils are missing
1047         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1048
1049 2005-08-10 Raphael Neider <rneider AT web.de>
1050
1051         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1052           my last commit)
1053
1054 2005-08-10 Raphael Neider <rneider AT web.de>
1055
1056         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1057           Rokas' patch to add the new fixed point type "__fixed16x16"
1058         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1059           functions for __fixed16x16 arithmetics
1060         * device/lib/pic16: reimplemented the build system to support
1061           a separate build directory, better handling of libio (create
1062           the library in a separate subdir for each architecture) and
1063           easier configuration (centralized in Makefile.common)
1064
1065 2005-08-07 Raphael Neider <rneider AT web.de>
1066
1067         * src/pic16/gen.c (genrshTwo): fixed sign extension
1068         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1069         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1070           added T0CONbits
1071         * device/include/pic16/pic18f4220.h: NEW, header for
1072           pic18f4220 and pic18f4320
1073         * device/include/pic16/pic18fregs.h: added new devices,
1074           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1075         * device/include/pic16/signal.h: resolved name clashes
1076           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1077           to also allow testing for interrupt enable bits, added
1078           comments on how to use the macros
1079         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1080         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1081           register definitions for the devices
1082         * device/lib/pic16/pics.all: added new devices
1083         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1084           allocated memory
1085         * device/lib/pic16/libc/stdlib/memfree: do not count
1086           the block header as free memory
1087         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1088           simplified and added missing end-of-blocklist-marker
1089           (reported by Peter Onion, fixes #1252814)
1090         * (_mergeHeapBlock): fixed loop condition
1091         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1092           len==0, restructured code
1093         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1094           up a bit, reduced bitfield accesses, prevent endless loops
1095           in case of heap corruption
1096         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1097           "unreferenced arguments/must return a value" warnings
1098         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1099           replaced BAUDREG with SPBRG
1100         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1101           device/lib/pic16/debug/gstack/gstack.c: replaced
1102           _naked, _asm, _endasm with __naked, __asm, __endasm
1103
1104 2005-08-05 Raphael Neider <rneider AT web.de>
1105
1106         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1107           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1108
1109 2005-08-05 Borut Razem <borut.razem AT siol.net>
1110
1111         * device/lib/Makefile.in: added missing ';'
1112         * configure: removed ^M characters
1113
1114 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1115
1116         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1117           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1118           License
1119
1120 2005-08-04 Borut Razem <borut.razem AT siol.net>
1121
1122         * configure.in: pic16 libraries build 2nd try - enable running
1123           configure in device/lib/pic16
1124         * configure: regenerated from configure.in
1125         * device/lib/Makefile.in: create $(PORT)/bin directory
1126
1127 2005-08-03 Raphael Neider <rneider AT web.de>
1128
1129         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1130           to get/set values via pointers
1131         * (genUnpackBits,genPackBits): changed detection of
1132           ptr->bitfield vs. sym.bitfield, fixed access via generic
1133           pointers, removed dead (wrong) code for multibyte bitfields
1134         * (genNearPointerGet, genGenPointerGet): removed useless code,
1135           fixed bitfield detection, fixes #1250594
1136         * (genNearPointerSet): removed useless code
1137         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1138           and introduced macro pic16_emitpcode that conditionally emits
1139           the origin of the following pCode (useful for debugging SDCC)
1140         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1141         * (createDefmap): fixed handling of LFSR for --optimize-df
1142
1143 2005-08-02 Borut Razem <borut.razem AT siol.net>
1144
1145         * device/lib/Makefile.in: pic16 libraries build enabled since
1146           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1147
1148 2005-08-02 Raphael Neider <rneider AT web.de>
1149
1150         * src/pic16/gen.c (genPackBits): removed deprecated warning
1151         * (genGenPointerSet): fixed bitfield detection
1152
1153 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1154
1155         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1156
1157 2005-07-31 Raphael Neider <rneider AT web.de>
1158
1159         * device/lib/pic16/libdev/pic18f458.c,
1160           device/include/pic16/pic18f458.h: added missing T0CONbits
1161
1162 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1163
1164         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1165
1166 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1167
1168         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1169
1170 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1171
1172         * device/include/mcs51/at89c51ed2.h: added.
1173
1174 2005-07-23 Raphael Neider <rneider AT web.de>
1175
1176         * src/pic/gen.h: added emitpcode macro for debugging
1177         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1178           and replace by macro adding debug information on demand
1179         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1180         * (gencjne): tried to fix; replaced with correct (slower) code
1181         * (gen{Unp,P}ackBits): fixed single bit access
1182         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1183         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1184           previous instruction
1185         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1186           register has to be handled with care (forbidding movement
1187           of assignments/uses, removing assignments completely, ...)
1188         * (pCodeOptime2pCodes): make use of regIsSpecial
1189         * added lots of debugging output (commented out)
1190         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1191           from being reused as result UNLESS it is known to work
1192
1193 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1194
1195         * support/Util/dbuf.h: include <stddef.h> for size_t
1196         * .version: changed to version 2.5.2
1197
1198 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1199
1200         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1201
1202 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1203
1204         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1205           (genModOneByte): removed needless psha/pula
1206
1207 2005-07-22 Raphael Neider <rneider AT web.de>
1208
1209         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1210           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1211         * src/pic/gen.c (resolveIfx): do not "invent" labels
1212         * (genSkipc): changed to positive logic
1213         * (genSkipCond): removed as no longer needed
1214         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1215           backport from PIC16
1216         * (genLeftShift): check operands are in different registers
1217         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1218           INCF does not update CARRY...
1219         * src/pic/main.c: fixed _linkCmd
1220         * src/pic/pcode.c (unlinkpCode): added inactive code
1221         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1222           alive (do not assign result and operand overlapping registers)
1223
1224 2005-07-22 Raphael Neider <rneider AT web.de>
1225
1226         * src/pic/device.c (dump_sfr): replaced register declaration with
1227           call to emitSymbolToFile() to avoid duplicate symbols
1228         * (assignRelocatableRegisters): do not declare external symbols
1229         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1230           right (take size of type, not etype)
1231         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1232         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1233         * (packRegsForAccUse): disabled assignment of WREG as
1234           the result reg to prevent occurence of just fixed #1235003,
1235           fixes #1242954
1236         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1237           symbols (avoids duplicate symbols in .asm file)
1238         * (pic14emitRegularMap): use emitSymbolToFile()
1239         * src/pic/gen.c (aopOp): fixed spillLocation handling
1240         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1241         * (genDataPointerSet): removed unneccessary variables/output
1242
1243 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1244
1245         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1246         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1247
1248 2005-07-21 Raphael Neider <rneider AT web.de>
1249
1250         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1251           architecture cannot handle them efficiently, fixes bug #1235003
1252         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1253           check for empty sets before using them (fixes bug #1232190)
1254
1255 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1256
1257         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1258           (lnksect2): generate warnings for memory overlap
1259         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1260           constseg to set the name of these segments so you can instruct the linker
1261           to place them in banks
1262         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1263         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1264           added code_seg and const_seg to options
1265         * src/SDCCglue.c (emitMaps): use options.const_seg,
1266           (createInterruptVect): put interrupt vectors in segment HOME,
1267           (glue): put HOME before static segment and put the main glue in HOME,
1268           (glue): use options.code_seg
1269         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1270         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1271           these segments so you can instruct the linker to place them in banks
1272           (linkEdit): use code_loc for HOME segment which should be the first
1273           segment in code memory now
1274         * src/SDCCmem.c: fixed more stuff like bug 1238386
1275         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1276           (changePointer): don't change function pointers to code pointers for
1277           banked functions,
1278           (compareType): added exceptional check for banked function pointers
1279         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1280         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1281           after static in code memory
1282         * src/mcs51/gen.c: added aopLiteralLong prototype,
1283           (aopForSym): use getSize for functions,
1284           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1285           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1286           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1287           the segment,
1288           (genPcall): use call for literal function pointers and generate banked
1289           calls over the one trampoline so there's only one place for the user to
1290           modify according to his/hers hardware,
1291           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1292           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1293         * src/mcs51/main.c: added keyword banked,
1294           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1295         * support/Util/SDCCerr.c,
1296         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1297           needed for passing the bank and address to the trampoline
1298         * device/lib/mcs51/crtbank.asm: added for bankswitching
1299         * device/lib/mcs51/Makefile: added crtbank
1300
1301 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1302
1303         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1304           for fields at offset 0 of a struct or union as reported
1305           on 2005-07-07 in the developer mailing list.
1306
1307 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1308
1309         * src/SDCCmem.c: fixed bug 1238386
1310
1311 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1312
1313         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1314           (patch #1144962), added peephole 300, enabled 259.x
1315         * doc/sdccman.lyx: removed screenshot and provided link instead
1316
1317 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1318
1319         * doc/sdccman.lyx: added section about debugging with ddd
1320         * doc/figures/ddd_example.eps: screenshot of debugging session
1321
1322 2005-07-04 Raphael Neider <rneider AT web.de>
1323
1324         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1325           like CODE pointers, fixes #1115683
1326         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1327           call, fixes bugs #1232211, #1228110,
1328           fixed wrong casts to pCodeFlow from pCodeInstructions
1329
1330 2005-07-04 Raphael Neider <rneider AT web.de>
1331
1332         * src/pic/gen.c (popGet): changed assert to allow for
1333           bit operands
1334         * (popGetAddr): changed signature to provide
1335           an additional index, patched all call sites
1336         * (genCmpEq): handle literal-like operands correctly
1337         * (genAddrOf): added sanity checks on __code/__data pointers
1338         * (genAssign): added handling of symbols from __code section
1339         * (gencjne): do not generate code for comparisons whose result
1340           is neither stored nor used, fixes bug #1171114
1341         * (AccLsh, AccRsh): operate on operand instead of WREG
1342         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1343           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1344           by known count
1345         * rewrote complete shift-by-literal logic, commented unused
1346           functions out
1347         * (genConstPointerGet): get multiple bytes (if result size > 1),
1348           fixed handling of non-immediate addresses
1349         * (genPointerGet): handle CODE pointers like CONST pointers
1350         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1351         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1352           operand is to be treated as a literal or not
1353         * (mov2w,genPcall,genCmpEq),
1354           src/pic/genarith.c: use aop_isLitLike() to decide between
1355           literal/register contents
1356         * (addSign): added missing offset
1357         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1358           only emit comment in debug-mode,
1359           use {aop,op}_isLitLike throughout the file
1360         * src/pic/glue.c: fix initializers for pointers (work in progress)
1361         * src/pic/pcode.c (get_op): honor index on _const symbols
1362         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1363         * (dumppBlock): added pCode size estimation
1364         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1365           check for IS_SYMOP before OP_SYMBOL'ing
1366         * fixed indentation, compacted switch-statements
1367         * (allocReg): find free register and allocate it instead of
1368           allocating new registers all the time
1369         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1370           registers as its operands (necessary only for multibyte GETs)
1371
1372 2005-07-01 Raphael Neider <rneider AT web.de>
1373
1374         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1375           debugging .asm-output macros FENTRY + FEXIT
1376         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1377           way... I wonder...
1378         * (emitpComment): NEW, printf to pCode
1379         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1380           offset handling
1381         * (popGetAddr): NEW, variant of popGet to access an immediates
1382           high(er) bytes instead of the n'th byte of memory they reference,
1383           replaced popGet with popGetAddr where neccessary
1384         * (genDataPointerGet): reactivated and fixed implementation
1385         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1386           accesses
1387         * (genDataPointerSet): fixed multibyte assignments
1388         * (genpic14Code): fixed --i-code-in-asm handling
1389         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1390         * (genPlus): fixed index-out-of-bounds error
1391         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1392         * src/pic/ralloc.c: added debugging output macro FENTRY2
1393         * (spillThis): fixed indentation, enbraced for-body for clarity
1394         * (rematStr): commented out as now unused
1395         * (regTypeNum): commented out special spill case (overwrites
1396           arbitrary values)
1397         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1398
1399 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1400
1401         * doc/sdccman.lyx: documented sfr16/sfr32,
1402           added example for using storage class with function pointers
1403         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1404
1405 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1406
1407         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1408         * device/lib/_itoa.c,
1409         * device/lib/_ltoa.c: optimized codesize
1410         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1411           but don't know how to suppress the double warning.
1412         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1413         * support/Util/SDCCerr.c,
1414         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1415
1416 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1417
1418         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1419           fixed old K&R prototypes
1420         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1421         * device/lib/_gptrget.c,
1422         * device/lib/_gptrgetc.c,
1423         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1424           also new versions for small generic pointers and banked generic pointers
1425         * src/port.h: added const_name
1426         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1427         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1428         * src/SDCCcse.c (findPrevIc): check all associative operators
1429         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1430         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1431         * src/SDCCmem.c: updated comments,
1432           set far-space to 0 for pdata, results in optimized code
1433         * src/SDCCmem.h: added macro CONST_NAME
1434         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1435           moving the info into the highest bits, see also gptrget/gptrput
1436         * src/src.dsp: added sdcc.ico to project files
1437         * src/avr/gen.c (genCast): fixed bug 0x%d
1438         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1439         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1440           relation between ptr_type and DCL_TYPE,
1441           (genCast): fixed bug 0x%d
1442         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1443           (CODE)" for const_name
1444         * src/hc08/gen.c (genCast): fixed bug 0x%d
1445         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1446           (hc08_port): added "CONST (CODE)" for const_name
1447         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1448           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1449           between ptr_type and DCL_TYPE,
1450           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1451           operand* and took AOP() inside function so sfr-ness can be checked,
1452           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1453           new prototype,
1454           (genFunction, genEndFunction): optimized stack setup,
1455           (genMinus): optimized for literals with ending zeroes (in bytes),
1456           (genCast): fixed bug 0x%d
1457         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1458           (mcs51_port): added "CONST (CODE)" for const_name
1459         * src/mcs51/peeph.def: made rule 226 more generic
1460         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1461         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1462         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1463         * src/z80/main.c (z80_port): added NULL for const_name,
1464           (gbz80_port): added NULL for const_name
1465         * support/regression/tests/bug663539.c,
1466         * support/regression/tests/sfr16.c: new tests
1467
1468 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1469
1470         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1471
1472 2005-06-24 Raphael Neider <rneider AT web.de>
1473
1474         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1475           corrected typos...
1476         * device/include/pic16/signal.h: added USBIF
1477           and SIG_USB
1478
1479 2005-06-24 Raphael Neider <rneider AT web.de>
1480
1481         * device/lib/pic16/libdev/pic18f2455.c,
1482           device/include/pic16/pic18f2455.h: NEW
1483         * device/include/pic16/pic18fregs.h,
1484           device/lib/pic16/pics.all,
1485           src/pic16/device.c: added 18f2455
1486         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1487           device/include/pic16/{pic18f[68][567].h,usart.h}:
1488           replaced MULTIPLE_USARTS define with more relaible
1489           compatibility sfrs (for USART access)
1490
1491 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1492
1493         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1494           and the output asm file line is printed on two lines.
1495
1496 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1497
1498         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1499           BGT, BLE, BHI, and BLS instructions
1500         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1501           genCmpEq): removed
1502         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1503           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1504           fixes bug #1216342
1505         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1506
1507 2005-06-15 Raphael Neider <rneider AT web.de>
1508
1509         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1510         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1511         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1512           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1513           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1514
1515 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1516
1517         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1518           Marcel Telka in bug #1215704
1519
1520 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1521
1522         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1523           located in shared memory bank.
1524
1525 2005-05-31 Raphael Neider <rneider AT web.de>
1526
1527         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1528           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1529           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1530
1531 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1532
1533         * device/lib/_strncpy.c: fixed the fix
1534
1535 2005-05-26 Raphael Neider <rneider AT web.de>
1536
1537         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1538           initializers with \0, bug #1208187
1539         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1540           intializers with \0, bug #1208187
1541
1542 2005-05-26 Raphael Neider <rneider AT web.de>
1543
1544         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1545           initializers with \0, bug #1208187
1546         * src/pic16/main.c (_process_pragma): added sanity checks
1547           for stack position and size, emit warnings when appropriate
1548
1549 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1550
1551         * device/lib/_strncpy.c: fixed not filling with \0
1552
1553 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1554
1555         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1556           createFunction),
1557         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1558           compound_statement),
1559         * src/SDCCsymt.h,
1560         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1561
1562 2005-05-24 Raphael Neider <rneider AT web.de>
1563
1564         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1565
1566 2005-05-24 Raphael Neider <rneider AT web.de>
1567
1568         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1569           TRISE definitions, closes bug #1162453
1570
1571 2005-05-22 Raphael Neider <rneider AT web.de>
1572
1573         * src/pic16/main.c (_process_pragma): check for missing
1574           arguments to pragmas code and udata
1575         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1576           consistency fixes to match other headers (thanks to Jim Paris)
1577         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1578
1579 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1580
1581         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1582
1583 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1584
1585         * support/regression/tests/bug1198642.c: new test
1586         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1587         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1588         * support/scripts/resource.h,
1589         * support/scripts/resource.rc,
1590         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1591         * support/scripts/sdcc.ico: added 32x32 icon
1592
1593 2005-05-18 Raphael Neider <rneider AT web.de>
1594
1595         * device/lib/pic16/libdev/pic18f*.c,
1596         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1597           keywords to "__sfr" and "__at (X)"
1598         * device/include/pic16/pic18fregs.h: added pic18f4520
1599         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1600           #1203088 (MPLAB compatibility)
1601
1602 2005-05-17 Raphael Neider <rneider AT web.de>
1603
1604         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1605         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1606         * device/lib/pic16/pics.all: added new devices
1607         * src/pic16/device.c: added support for pic18f4520
1608
1609 2005-05-16 Raphael Neider <rneider AT web.de>
1610         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1611         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1612         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1613           convenience function for bit access
1614
1615 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1616
1617         * device/lib/printf_large.c: fixed bug 1193299
1618         * support/regression/tests/bug1057979.c: added test %3.3s
1619
1620 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1621
1622         * device/include/mcs51/8051.h,
1623         * device/include/mcs51/8052.h: made parseable with lint
1624         * device/include/mcs51/lint.h: added include file for (sp)lint
1625         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1626         * doc/cdbfileformat.lyx,
1627         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1628
1629 2005-05-14 Raphael Neider <rneider AT web.de>
1630
1631         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1632         * device/lib/pic16/libc/stdlib/itoa.c (new)
1633         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1634         * device/lib/pic16/libio/Makefile: exclude subdir according to
1635           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1636         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1637         * src/pic16/gen.c (genFunction): prevent annoying warning
1638         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1639           nameclashes on BeOS
1640         * support/cpp2/cppmain.c (cpp_output_string): new
1641         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1642           fixes bug 1116802
1643
1644 2005-05-13 Borut Razem <borut.razem AT siol.net>
1645
1646         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1647
1648 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1649
1650         * .version: changed to version 2.5.1; back to bleeding edge development
1651
1652 2005-05-11 Borut Razem <borut.razem AT siol.net>
1653
1654         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1655           generate PDF version 1.3 documents
1656
1657 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1658
1659         * .version: changed to version 2.5.0
1660
1661 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1662
1663         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1664
1665 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1666
1667         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1668         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1669         well as many smaller updates.
1670         * .version: changed to version 2.5.0-pre1
1671
1672 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1673
1674         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1675
1676 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1677
1678         * support/regression/tests/bug1185672.c: added
1679         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1680           bug 1185672
1681         * src/mcs51/gen.c (genCall): added comments, made it look safer
1682         * src/mcs51/gen.c (genEndFunction): simplified
1683
1684 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1685
1686         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1687
1688 2005-04-14 Borut Razem <borut.razem AT siol.net>
1689
1690         * fixed bug 1045046 - SIGSEGV with really simple code?:
1691           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1692           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1693
1694 2005-04-14 Borut Razem <borut.razem AT siol.net>
1695
1696         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1697           src/pic16/device.h: temporarily disabled experimental #inline pragma
1698           for 2.5.0 release
1699
1700 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1701
1702         * device/include/z80/stdio.h,
1703         * device/include/z80/string.h: removed these highly incomplete files so
1704           SDCC can use the default ones in device/include/
1705
1706 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1707
1708         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1709         gcc warning.
1710         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1711         fix sdcpp warnings.
1712
1713 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1714
1715         * device/include/malloc.h: removed redundant __reentrant prototypes
1716         * device/lib/_mullong.c: added working xstack variant in asm (C version
1717           doesn't pass regression tests)
1718         * device/lib/bpx.c: used __data and made bpx char for mcs51
1719         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1720           (createFunction): fixed bug with xstackPtr
1721         * src/SDCCcse.c: corrected comments
1722         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1723           (killDeadCode, eBBlockFromiCode): removed unused code
1724         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1725           corrected comments
1726         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1727           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1728           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1729           (genModOneByte): fixed warning in MSVC
1730         * src/mcs51/main.c (): added comments
1731         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1732
1733 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1734
1735         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1736
1737 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1738
1739         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1740
1741 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1742
1743         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1744         characters arrays of larger size than the declared one.
1745
1746 2005-04-10 Borut Razem <borut.razem AT siol.net>
1747
1748         * src/pic/gen.c (genInline),
1749           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1750           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1751           (findNextInstruction), (findPrevInstruction),
1752           (findInstructionUsingLabel),
1753           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1754         * src/pic/pcode.c (findLabel): added missing '\n'
1755         * src/src.dsp: added SDCCdwarf2.c to the project
1756
1757 2005-04-09 Borut Razem <borut.razem AT siol.net>
1758
1759         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1760
1761 2005-04-08 Raphael Neider <rneider AT web.de>
1762
1763         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1764           into the chain after a given one) and mergeDefmapSymbols (combine
1765           defmap entries for each symbol per pcode)
1766         * (createDefmap): have defmap entries merged in the end
1767         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1768           a symbol before replacing one access type's symbol, merge symbols in
1769           the end (replacement symbol might already have an entry)
1770         * (assignValnums): keep reference to written WREG intact
1771
1772 2005-04-08 Raphael Neider <rneider AT web.de>
1773
1774         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1775           Alpha)
1776
1777 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1778
1779         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1780         bytes
1781
1782 2005-04-07 Raphael Neider <rneider AT web.de>
1783
1784         * device/include/pic16/usart.h: added compatibility defines for
1785           devices with more than one USART
1786         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1787
1788 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1789
1790         * device/lib/Makefile.in: updated for port specific include
1791
1792 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1793
1794         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1795
1796 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1797
1798         * device/include/8051.h,
1799         * device/include/8052.h,
1800         * device/include/at89S8252.h,
1801         * device/include/at89c55.h,
1802         * device/include/at89x051.h,
1803         * device/include/at89x51.h,
1804         * device/include/at89x52.h,
1805         * device/include/mcs51reg.h,
1806         * device/include/reg51.h,
1807         * device/include/reg764.h,
1808         * device/include/regc515c.h,
1809         * device/include/sab80515.h: (re)moved these 12 files
1810         * device/include/mcs51/8051.h,
1811         * device/include/mcs51/8052.h,
1812         * device/include/mcs51/at89S8252.h,
1813         * device/include/mcs51/at89c55.h,
1814         * device/include/mcs51/at89x051.h,
1815         * device/include/mcs51/at89x51.h,
1816         * device/include/mcs51/at89x52.h,
1817         * device/include/mcs51/mcs51reg.h,
1818         * device/include/mcs51/reg51.h,
1819         * device/include/mcs51/reg764.h,
1820         * device/include/mcs51/regc515c.h,
1821         * device/include/mcs51/sab80515.h: and added them here
1822
1823 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1824
1825         * device/include/stdarg.h: changed SDCC specific keywords to double
1826           underlined form.
1827         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1828           mcs51 and ds390.
1829         * device/include/hc08/mc68hc908gp32.h,
1830         * device/include/hc08/mc68hc908jb8.h,
1831         * device/include/hc08/mc68hc908jkjl.h,
1832         * device/include/hc08/mc68hc908qy.h: fixed comments
1833         * device/include/mcs51/README: updated
1834         * device/include/mcs51/c8051f120.h: added PINRSF
1835         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1836         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1837           amidst code. Also inline is not supported.
1838
1839 2005-04-06 Raphael Neider <rneider AT web.de>
1840
1841         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1842         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1843           callers stack/frame pointers
1844
1845 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1846
1847         * device/include/pic16/usart.h: added, missing in previous commit,
1848         * device/include/pic16/adc.h: fixed typo,
1849         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1850         commit,
1851         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1852         <p18fxxx.inc>
1853         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1854         uninitialized because a bug appears with gplink
1855         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1856         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1857         complains for unrecognised option
1858
1859 2005-04-05 Raphael Neider <rneider AT web.de>
1860
1861         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1862           structs as well (using memcpy)
1863         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1864           on ISRs (GOTO has no label)
1865         * src/pic16/device.h: added OF_OPTIMIZE_DF
1866         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1867           new data flow analysis/optimization
1868         * src/pic16/pcode.c: added (prototypes for and implementation of)
1869           dataflow analysis functions, fixed pCodeInstructions' inCond and
1870           outCond values, made RCALL a branch instruction
1871         * (pic16_unlinkpCode): keep C line if possible
1872         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1873           C line moved if possible
1874         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1875         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1876           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1877         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1878           new flow)
1879         * (pic16_getJumptabpCode): NEW, needed in...
1880         * (LinkFlow): fixed handling of jumptables, calls and conditional
1881           branches
1882         * (pic16_InsertCommentAfter): NEW
1883         * (pic16_pCodeReplace): made verbose and flow preserving
1884         * (AnalyzeFlow): added call to data flow analysis
1885         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1886         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1887         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1888
1889 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1890
1891         * src/SDCCast.c (decorateType): fixed bug #1105626
1892
1893 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1894
1895         * device/include/asm/pic16/features.h,
1896         * pic18f*.h headers,
1897         * device/include/pic16/adc.h,
1898         * device/include/pic16/delay.h,
1899         * device/include/pic16/i2c.h,
1900         * device/include/pic16/malloc.h,
1901         * device/include/pic16/stdio.h,
1902         * device/include/pic16/stdlib.h,
1903         * device/include/pic16/string.h,
1904         * device/lib/pic16/libc/stdio/printf_tiny.c,
1905         * device/lib/pic16/libc/stdio/printf_small.c,
1906         * device/lib/pic16/libc/stdio/strmgpsim.c,
1907         * device/lib/pic16/libc/stdio/strmmssp.c,
1908         * device/lib/pic16/libc/stdio/strmusart.c,
1909         * device/lib/pic16/libc/stdio/vfprintf.c,
1910         * device/lib/pic16/libc/stdlib/ltoa.c,
1911         * device/lib/pic16/libc/stdlib/putchar.c,
1912         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1913         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1914         * device/lib/pic16/libc/stdlib/memchrram.c,
1915         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1916         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1917         * device/lib/pic16/libio/adc/adcbusy.c,
1918         * device/lib/pic16/libio/adc/adcread.c,
1919         * device/lib/pic16/libio/adc/adcsetch.c,
1920         * device/lib/pic16/libio/usart/ubaud.c,
1921         * device/lib/pic16/libio/usart/ubusy.c,
1922         * device/lib/pic16/libio/usart/udrdy.c,
1923         * device/lib/pic16/libio/usart/uopen.c,
1924         * device/lib/pic16/libio/usart/uputc.c,
1925         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1926         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1927         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1928         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1929         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1930         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1931         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1932         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1933         specific keywords to double underlined form,
1934         * device/lib/pic16/libc/Makefile.rules,
1935         * device/lib/pic16/libsdcc/Makefile.rules,
1936         * device/lib/pic16/libm/Makefile,
1937         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1938         to compile with C standard set in Makefile.common
1939         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1940         rand.c and crc.c in compilation process,
1941         * device/lib/pic16/libsdcc/int/divuint.c,
1942         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1943         `c' from signed to unsigned,
1944         * device/lib/pic16/startup/crt0.c,
1945         * device/lib/pic16/startup/crt0i.c,
1946         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1947         keywords to double underlined form, bug fixes in _do_cinit function
1948         which prevented the correct initialization of the .idata segment,
1949         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1950         core to enter a infinite loop
1951         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1952
1953 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1954
1955         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1956
1957 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1958
1959         * device/include/Makefile.in: add support for hc08 subdirectory
1960         * device/include/hc08/: new subdirectory
1961         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1962         Lucas Loizaga, thanks!
1963         * device/include/hc08/mc68hc908qy.h,
1964         * device/include/hc08/mc68hc908gp32.h,
1965         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1966         their own directory. Changed internal macro names to use the compiler
1967         reserved namespace. Changed SDCC specific keywords to double
1968         underlined form.
1969         * device/include/math.h,
1970         * device/include/malloc.h,
1971         * device/include/stdarg.h,
1972         * device/include/stdbool.h
1973         * device/include/string.h,
1974         * device/include/tinibios.h,
1975         * device/include/ds400rom.h,
1976         * device/include/8051.h,
1977         * device/include/8052.h,
1978         * device/include/80c51xa.h,
1979         * device/include/at89c55.h,
1980         * device/include/at89S8252.h,
1981         * device/include/at89x51.h,
1982         * device/include/at89x52.h,
1983         * device/include/ds80c390.h,
1984         * device/include/reg764.h,
1985         * device/include/regc515c.h,
1986         * device/include/sab80515.h,
1987         * device/include/mcs51/c8051f000.h,
1988         * device/include/mcs51/c8051f018.h,
1989         * device/include/mcs51/c8051f020.h,
1990         * device/include/mcs51/c8051f040.h,
1991         * device/include/mcs51/c8051f060.h,
1992         * device/include/mcs51/c8051f120.h,
1993         * device/include/mcs51/c8051f300.h,
1994         * device/include/mcs51/c8051f310.h,
1995         * device/include/mcs51/c8051f320.h,
1996         * device/include/mcs51/c8051f330.h,
1997         * device/include/mcs51/c8051f350.h,
1998         * device/include/z180.h: Changed SDCC specific keywords to double
1999         underlined form.
2000
2001 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2002
2003         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2004         18F4455,
2005         * (pic16_assignConfigWordValue): disable testing of configuration
2006         register value with config mask,
2007         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2008         function with port->fun_prefix,
2009         * (genFunction): when generating a naked interrupt function never
2010         create an absolute segment placed in interrupt vector address, place
2011         the actual interrupt function at IVA instead, when an interrupt
2012         function is generated with unspecified interrupt then do not create
2013         the absolute section,
2014         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2015         code for generating a call to generic pointer get/put function with
2016         a call to function pic16_callGenericPointer(),
2017         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2018         the call to the generic pointer get/put functions with prefixing the
2019         function name with port->fun_prefix,
2020         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2021         * src/pic16/main.c (_process_pragma): prefix function with
2022         port->fun_prefix,
2023         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2024         calling assembler, old 18Fxxxx macro is deprecated,
2025         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2026         PC_ASMDIR in while condition,
2027         * (findInstruction): add PC_ASMDIR in while condition,
2028         * (buildCallTree): prefix main with port->fun_prefix,
2029         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2030         identifier for variable with banked access in instructions BTFSS,
2031         BTFSC, BCF, BSF, BTG
2032         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2033         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2034         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2035         perform optimization when enviroment variable NO_REG_OPT is set,
2036         * (insideLRBlock): NEW, return 1 if register is inside an
2037         INF_LOCALREGS block,
2038         * (RemoveRegFromLRBlock): remove a register that is completely
2039         eliminated by register optimization, but it is still left in local
2040         register store/restore in/from stack block,
2041         * (Remove2pcodes): after removing register, check to see if it
2042         should be removed from local register store/restore in/from stack
2043         block,
2044         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2045         DUMMY_READ_VOLATILE,
2046
2047         * device/include/pic16/adc.h: minor prototype modifications and
2048         update,
2049         * device/include/pic16/malloc.h: added GPL notice various
2050         modifications,
2051         * device/include/pic16/stdint.h: NEW, standard header for ints
2052         * device/include/pic16/delay.h: NEW, header for delay functions,
2053         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2054         delay1mtcy,
2055         * device/include/pic16/signal.h: NEW, header providing helper macros
2056         for implementing signal handlers,
2057         * device/include/pic16/stdio.h: added prototypes for functions,
2058         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2059         prototypes for stdin and stdout, added macro PUTCHAR to
2060         automatically implement putchar function prototype,
2061         * device/include/pic16/usart.h: modified and updated USART library,
2062         * device/lib/pic16/libio/adc/,
2063         * device/lib/pic16/libio/i2c: some modifications to improve library
2064         performance,
2065         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2066         family of functions,
2067         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2068         family of functions and other sources,
2069         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2070         of the PIC18Fxx[28] devices,
2071         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2072         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2073         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2074         _do_cinit function, because the previous failed when local variables
2075         where not placed in the same memory bank,
2076         * device/lib/pic16/libsdcc/char/: various modifications to improve
2077         library performance,
2078         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2079         information on the new functions of the c library and more...
2080
2081 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2082
2083         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2084
2085 2005-03-26 Raphael Neider <rneider AT web.de>
2086
2087         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2088           if condition == CARRY)
2089         * (genCmp): adapted to new genSkipc semantics
2090         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2091           on rIfx (genCmp was broken)
2092
2093 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2094
2095         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2096         * src/z80/main.c (_keywords[]),
2097         * src/SDCCglobal.h (struct options),
2098         * src/SDCC.y,
2099         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2100         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2101         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2102         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2103         always available in leading double underscore form. The C99 support is
2104         mostly missing, but it's a start.
2105         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2106         reserved identifier "__data".
2107
2108 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2109
2110         * src/mcs51/peeph.def: fixed bug 1170013
2111
2112 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2113
2114         * device/include/mcs51reg.h: fixed bug 842007
2115
2116 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2117
2118         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2119         last time.
2120
2121 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2122
2123         * src/port.h (struct PORT),
2124         * src/avr/ralloc.c (avr_assignRegisters),
2125         * src/avr/main.c,
2126         * src/ds390/ralloc.c (ds390_assignRegisters),
2127         * src/ds390/main.c,
2128         * src/hc08/ralloc.c (hc08_assignRegisters),
2129         * src/hc08/main.c,
2130         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2131         * src/mcs51/main.c,
2132         * src/pic/ralloc.c (pic14_assignRegisters),
2133         * src/pic/main.c,
2134         * src/pic16/ralloc.c (pic16_assignRegisters),
2135         * src/pic16/main.c,
2136         * src/xa51/ralloc.c (xa51_assignRegisters),
2137         * src/xa51/main.c,
2138         * src/z80/ralloc.c (z80_assignRegisters),
2139         * src/z80/ralloc.h,
2140         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2141         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2142         * src/SDCCcse.h,
2143         * src/SDCCdflow.c (computeDataFlow),
2144         * src/SDCCdflow.h,
2145         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2146         * src/SDCCloop.h,
2147         * src/SDCCcflow.c (*),
2148         * src/SDCCcflow.h,
2149         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2150         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2151         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2152         immedDom() returning wrong block; probably fixes bug #1160833)
2153
2154 2005-03-20 Borut Razem <borut.razem AT siol.net>
2155
2156         * support/scripts/inc2h.pl: WIN32 port
2157
2158 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2159
2160         * device/lib/makefile.in: added abs.c and labs.c
2161
2162 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2163
2164         * device/include/stdint.h: added
2165         * device/lib/abs.c: added
2166         * device/lib/labs.c: added
2167         * device/include/stdlib.h: added abs() and labs() prototypes
2168         * device/lib/libsdcc.lib: added abs and labs
2169         * device/include/float.h,
2170         * device/lib/_fsmul.c,
2171         * device/lib/printf_fast.c,
2172         * device/lib/printf_tiny.c: updated comments
2173
2174 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2175
2176         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2177         bug #1164313
2178
2179 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2180
2181         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2182         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2183
2184 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2185
2186         * device/lib/printf_large.c: removed inline assembly for portability and
2187           readability. Use printf_fast if speed or size are more important.
2188         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2189         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2190
2191 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2192
2193         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2194         prevent compiler warning
2195
2196 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2197
2198         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2199         moved to level 0 and declared as static. Also they are explicit
2200         placed in access bank. This was necessery because some times they
2201         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2202         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2203         optimizations. Currently only compare to unsigned char is implemented,
2204         * src/pic16/gen.c: added fReturnIdx array,
2205         * (struct resolvedIfx) is moved to gen.h and made public,
2206         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2207         * (aopForSym): added an optimization to directly store in stack of
2208         the operand of a SEND iCode,
2209         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2210         but as registers instead (AOP_REG) using the fReturnIdx array,
2211         * (pic16_freeAsmop): remove the freed register from the
2212         _G.sregsAlloc field,
2213         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2214         a compare of 'WREG',
2215         * (pic16_popGetTempRegCond): changed function prototype, now
2216         function takes also a bitVector argument v which holds the current
2217         set of registers that are allocated for stack access by aopForSym,
2218         registers allocated in aopForSym for accessing stack symbols are not
2219         any more part of the functions usedRegs field,
2220         * (genCall): some times aopOp is called for a stack variable to be
2221         send, aopForSym might perform the push, if this is true make sure
2222         that genCall doesn't push the variable twice by testing _G.resDirect,
2223         * (genFunction): changed testing for unspecified interrupt number
2224         from 256 to INTNO_UNSPEC,
2225         * modified selection scheme of frame pointer generation. Previously
2226         if function did use local registers a frame pointer was generated,
2227         now a frame pointer is generated only if function has arguments
2228         (that need PLUSW2 register access), or has stack arguments, or the
2229         compiler is not instructed to omit the frame pointer,
2230         * (genEndFunction): before restoring local registers that were saved
2231         in the function preamble, also restore the registers that *might*
2232         have been allocated for stack access,
2233         * (genRet): removed some old comments,
2234         * (genCmp, the active (RN's) version): added a call to the
2235         pic16_genCmp_special function to perform the compare with a more
2236         robust and optimized way,
2237         * (genInline): a feature has been added in inline code generation,
2238         which allows a wildcard variable substitution when writing inline
2239         assembly. Code is incomplete and experimental therefore undocumented,
2240         * (genCast): changed order of aopOp for result and right to allow
2241         aopForSym to directly load the result if possible,
2242         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2243         perform an optimized compare on some selected special occasions,
2244         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2245         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2246         generate an IVT any more,
2247         * src/pic16/main.c (pic16_optionsTable): added command line option
2248         --optimize-cmp,
2249         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2250         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2251         macros,
2252         * src/pic16/NOTES: Raphael Neider added in list of active developers
2253         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2254         jumptable_end to prevent bug #,
2255         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2256         inCond and outCond fields,
2257         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2258         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2259         turn off register spilling,
2260         * (packRegsForOneUse): synced with other ports' versions although it
2261         is not used currently,
2262         * (pic16_packRegisters): added an optimization while reading
2263         structure bitfields, some registers may be saved (malloc code is
2264         decreased by 80 bytes)
2265
2266 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2267
2268         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2269         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2270         this can be optimized more?
2271
2272 2005-03-10 Raphael Neider <rneider AT web.de>
2273
2274         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2275           genNearPointerGet): (hopefully) fixed access to bitfields via
2276           pointers (p->bitN = x; and x = p->bitN; failed)
2277
2278 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2279
2280         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2281
2282 2005-03-09 Raphael Neider <rneider AT web.de>
2283
2284         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2285
2286 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2287
2288         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2289         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2290           (regTypeNum): set REG_BIT type if necessary
2291         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2292         * support/regression/tests/critical.c: check bug 1144613
2293
2294 2005-03-02 Raphael Neider <rneider AT web.de>
2295
2296         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2297
2298 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2299
2300         * src/avr/ralloc.c (serialRegAssign),
2301         * src/ds390/ralloc.c (serialRegAssign),
2302         * src/hc08/ralloc.c (serialRegAssign),
2303         * src/mcs51/ralloc.c (serialRegAssign),
2304         * src/pic/ralloc.c (serialRegAssign),
2305         * src/pic16/ralloc.c (serialRegAssign),
2306         * src/xa51/ralloc.c (serialRegAssign),
2307         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2308
2309 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2310
2311         * src/SDCCast.c (decorateType): fixed bug 1124787
2312
2313 2005-02-20 Hubert Sack <sack AT digiplan.de>
2314         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2315
2316         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2317         patch #1121755
2318
2319 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2320
2321         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2322         to keep the correct label reference count when adding/removing references
2323         to labels. A peephole file using this is appended to patch #1144962.
2324
2325 2005-02-14 Raphael Neider <rneider AT web.de>
2326
2327         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2328         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2329         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2330           retrievals of result operand's value on assignment
2331
2332 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2333
2334         * device/include/pic16/string.h: modified prototype for memccpy()
2335         to memccpy(void *, void *, char, size_t)
2336         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2337         check whether to omit frame pointer or not,
2338         * (genInline): convert all occurences of "\n" to LF in inline
2339         assembler blocks, this helps formatting the inline text,
2340         * (pic16_loadFSR0): modified prototype,
2341         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2342         removed some 8051 legacy code,
2343         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2344         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2345         before allocating temporary registers in functions,
2346
2347 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2348
2349         * support/regression/tests/bitvars.c: corrected the "fix"
2350
2351 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2352
2353         * support/regression/tests/bitvars.c,
2354         * support/regression/tests/bitwise.c,
2355         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2356
2357 2005-02-10 Raphael Neider <rneider AT web.de>
2358
2359         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2360           different size for Alpha
2361         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2362
2363 2005-02-09 Raphael Neider <rneider AT web.de>
2364
2365         * src/SDCC.lex(doPragma) : save and restore warning options as well
2366           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2367         * have #pragma less_pedantic set the errorlevel to WARNING
2368           (fixes #1117001)
2369         * (cloneOptimize) : fixed wrong malloc's size
2370         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2371           facilitate correct handling of #pragma (save|restore)
2372
2373 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2374
2375         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2376
2377 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2378
2379         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2380
2381 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2382
2383         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2384
2385 2005-02-02 Raphael Neider <rneider AT web.de>
2386
2387         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2388         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2389         * (pic16_storeForReturn): fixed to allow returning function pointers
2390         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2391         * device/include/pic16/{stddef.h,stdbool.h}: added
2392
2393 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2394
2395         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2396
2397 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2398
2399         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2400         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2401          appeared to be required
2402
2403 2005-01-31 Borut Razem <borut.razem AT siol.net>
2404
2405         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2406           include/mcs51 and include/z80 directories to the package
2407
2408 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2409
2410         * src/hc08/gen.c (genFunction): fixed bug #1112752
2411
2412 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2413
2414         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2415
2416 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2417
2418         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2419
2420 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2421
2422         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2423
2424 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2425
2426         * device/include/c8051fxxx.h: removed these 6 files
2427         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2428
2429 2005-01-26 Raphael Neider <rneider AT web.de>
2430
2431         * src/pic16/gen.c (genAssign): fixed assignment from longs
2432           in codespace (were cut to three bytes)
2433         * (genDummyRead): implemented (except for CODESPACE...),
2434           fixed bug #1108575
2435         * src/pic16/glue.c (emitStatistics): beautified
2436         * device/lib/pic16/libm/Makefile: added include path
2437
2438 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2439
2440         * src/z80/gen.c (aopPut): fixed bug #1103902
2441
2442 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2443
2444         * device/lib/expf.c: fixed bug #1095792
2445
2446 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2447
2448         * device/lib/pic16/libm: added Math library sources
2449
2450 2005-01-24 Raphael Neider <rneider AT web.de>
2451
2452         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2453           to enable upcast to pCodeOpReg2 (there is no type tag to
2454           differenciate the two and pic16_popGet2p cast into PCOR2)
2455         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2456           (sizeof(sectNames) changed to sizeof(sectName))
2457           Both patches fix segfaults under MinGW.
2458
2459 2005-01-23 Raphael Neider <rneider AT web.de>
2460
2461         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2462           Safe_[mc]?alloc()'ed variables
2463         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2464           of (byte sized) temporaries (assign them to WREG for now)
2465         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2466           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2467           this might fix SIGSEGVs on MinGW...
2468         * src/SDCCopt.c (killDeadCode): restored original behaviour
2469           (volatile operands might get thrown away though)
2470
2471 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2472
2473         * src/pic16/gen.c: fixed bug #1106975,
2474         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2475         pointer update, INTCON is saved, global interrupts are disabled and
2476         restored after updateing TOS.
2477         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2478         * added function attribute 'shadowregs' to take advantage of shadow
2479         registers,
2480         * added function attribute 'wparam' as an alternative to the wparam
2481         pragma,
2482         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2483         user declares a non-ISR function as 'shadowregs',
2484         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2485
2486 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2487
2488         * .version: bumped version number to 2.4.8
2489         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2490         pic16 port,
2491         * device/lib/pic16/libio/i2c/: I2C module support library,
2492         * device/include/pic16/i2c.h: I2C support library header,
2493         * device/lib/pic16/libc/stdio/: standard IO support sources,
2494         * (printf_small.c): printf_small() source, supports float print,
2495         * (printf_tiny.c): printf_tiny() source, does not support floats,
2496         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2497         enable global optimizations for entire library source, other
2498         Makefiles in the source tree are also modified to reflect this,
2499         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2500         function,
2501         * doc/sdccman.lyx: updated to reflect new changes,
2502         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2503         sym->onStack if-case,
2504         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2505         sbit, idata, _idata, xdata, _xdata,
2506         * added pragma library, to link an external library, (see doc),
2507         * removed command line options, --pomit-config-words, --pomit-ivt,
2508         --pleave-reset-vector,
2509         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2510         when calling assembler to reflect memory model used, also define
2511         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2512         reflect stack model used,
2513         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2514         on stack return NULL,
2515
2516 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2517
2518         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2519           of the operands is volatile. Fixes #1020220
2520
2521 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2522
2523         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2524         * (OptimizeRegUsage): make sure that there is really no other flow where
2525           the first pCode is used
2526
2527 2005-01-22 Raphael Neider <rneider AT web.de>
2528
2529         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2530           to fix #1106967 (pCode->seq are not set up correctly)
2531
2532 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2533
2534         * src/SDCCglue.c (glue): make sure code area is declared before the
2535         static initialization area.
2536
2537 2005-01-21 Raphael Neider <rneider AT web.de>
2538
2539         * device/lib/Makefile.in: fixed test for pic16 install dir
2540         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2541           optimizations
2542         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2543           added --optimize-goto compiler switch and pragma wparam documentation
2544         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2545         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2546           and PRODH closing bug #1071770 (peephole optimizer)
2547
2548 2005-01-19 Raphael Neider <rneider AT web.de>
2549
2550         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2551           cmdLine buffers (used when calling sdcpp...) are large enough
2552           (MAX_PATH=256 truncates arguments leading to system halts when
2553           used in MinGW...)
2554         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2555         * (genUminus): rewritten to for efficiency
2556         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2557           used uninitialized in some cases)
2558         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2559           copy the third byte from the int -- now assumes 0x80 (data memory)
2560         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2561           operands (genAddLit expects the iCode's operands to swapped as
2562           well), fixed leftover bytes (crashed for short left operands)
2563         * (pic16_genMinusDec): performance improvements, removed false
2564           PIC14 emitSKPNCs
2565         * (pic16_genMinus): fixed to cope with differently sized operands
2566         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2567           for --obanksel > 1
2568         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2569         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2570           new banksel optimization
2571         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2572           analysis for temporary registers (segfaults...)
2573         * src/pic16/peeph.def: added rule
2574
2575 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2576
2577         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2578         which converts a float number to its ASCII representation
2579         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2580         functions to convert the fractional and integer part of a float to ASCII,
2581         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2582         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2583         ram
2584         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2585         _STATMEM macros,
2586         * device/include/pic16/adc.h: added GPL info,
2587         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2588         a pCodeOp as tested operand,
2589         * (genNearPointerGet): optimized bit testing, does not use
2590         intermediate register for bit value, test directly instead with
2591         BTFSS, BTFSC, works only for single bits,
2592         * (genpic16Code): dump the name of the iCode in the asm,
2593         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2594         renamed to pic16_decodeOp,
2595         * (serialRegAssign): do not allocate a temporary register for iCode
2596         sequences that test a single bit for 1/0
2597
2598 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2599
2600         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2601         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2602         access stack and frame pointers. They are initially assigned to
2603         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2604         accessing SFRs. Updated all occurences of modification of stack or
2605         frame pointer in gen.c and pcode.c,
2606         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2607         assigning of a literal value to pointers,
2608         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2609         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2610         selected
2611
2612 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2613
2614         * doc/sdccman.lyx: update documentation about stack pragma, added
2615         some info for stack memory models
2616
2617 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2618
2619         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2620
2621 2005-01-08 Raphael Neider <rneider AT web.de>
2622
2623         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2624           udata sections to fix bug #1097823
2625
2626 2005-01-05 Raphael Neider <rneider AT web.de>
2627
2628         * src/pic16/gen.c (genGenericShift): added handling of differently
2629           sized left operand and result
2630
2631 2005-01-04 Raphael Neider <rneider AT web.de>
2632
2633         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2634         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2635           to hold the condition bit)
2636         * added new version of genCmp (old code available via #define)
2637         * added new version of genShiftLeft/genShiftRight in a generic
2638           way, now supports shifting by negative values
2639         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2640           shiftCount (expected by genGenericShift)
2641         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2642         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2643           dump
2644         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2645           is an invalid literal too...)
2646
2647 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2648
2649         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2650         from Raphael Neider,
2651         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2652         for 8-bit literals. This fixes some literal operands which are sign
2653         extended to 16-bits ints when instruction needs only 8-bits.
2654
2655 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2656
2657         * device/lib/logf.c: added mcs51 assembly version
2658         * device/lib/expf.c: added mcs51 assembly version
2659         * device/lib/_logexpf.c: new shared asm code for expf and logf
2660         * device/include/math.h: add defines for assembly math library
2661         * device/lib/Makefile.in: build new _logexpf.c
2662         * device/lib/libfloat.lib: use new _logexpf.c
2663
2664 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2665
2666         * src/pic/device.c
2667         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2668           device types which have less than 0x7f registers.
2669
2670 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2671
2672         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2673
2674 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2675
2676         * device/lib/printf_fast.c: only build on supported arch.
2677         * device/lib/printf_tiny.c: only build on supported arch.
2678         * device/lib/printf_fast_f.c: only build if asm float lib
2679         * device/lib/_fsget1arg.c: only build if asm float lib
2680         * device/lib/_fsget2args.c: only build if asm float lib
2681         * device/lib/_fsnormalize.c: only build if asm float lib
2682         * device/lib/_fsreturnval.c: only build if asm float lib
2683         * device/lib/_fsrshift.c: only build if asm float lib
2684         * device/lib/_fsswapargs.c: only build if asm float lib
2685         * device/include/stdio.h: don't provide print_fast,
2686           print_fast_f, print_tiny prototypes if --xstack used
2687
2688 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2689
2690         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2691         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2692           to the SOURCES
2693
2694 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2695
2696         * device/lib/printf_fast_f.c: same as printf_fast, but
2697           with floating point enabled
2698         * device/lib/printf_fast.c: minor tweaks
2699         * device/include/stdio.h: add printf_fast_f
2700
2701 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2702
2703         * src/SDCCmain.c: make --float-reent default for mcs51
2704         * device/lib/_fsadd.c: added mcs51 assembly version
2705         * device/lib/_fssub.c: added mcs51 assembly version
2706         * device/lib/_fsmul.c: added mcs51 assembly version
2707         * device/lib/_fsdiv.c: added mcs51 assembly version
2708         * device/lib/_fseq.c: added mcs51 assembly version
2709         * device/lib/_fsneq.c: added mcs51 assembly version
2710         * device/lib/_fsgt.c: added mcs51 assembly version
2711         * device/lib/_fslt.c: added mcs51 assembly version
2712         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2713         * device/lib/Makefile.in: add _fscmp to build
2714         * device/lib/libfloat.lib: add _fscmp to build
2715
2716 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2717
2718         * device/lib/_fs2slong.c: added mcs51 assembly version
2719         * device/lib/_fs2sint.c: added mcs51 assembly version
2720         * device/lib/_fs2schar.c: added mcs51 assembly version
2721         * device/lib/_fs2ulong.c: added mcs51 assembly version
2722         * device/lib/_fs2uint.c: added mcs51 assembly version
2723         * device/lib/_fs2uchar.c: added mcs51 assembly version
2724         * device/lib/_slong2fs.c: added mcs51 assembly version
2725         * device/lib/_sint2fs.c: added mcs51 assembly version
2726         * device/lib/_schar2fs.c: added mcs51 assembly version
2727         * device/lib/_ulong2fs.c: added mcs51 assembly version
2728         * device/lib/_uint2fs.c: added mcs51 assembly version
2729         * device/lib/_uchar2fs.c: added mcs51 assembly version
2730         * device/include/float.h: added #define to select asm vs c
2731
2732 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2733
2734         * device/lib/printf_fast.c: improvements to float output
2735         * device/include/float.h: add defines for assembly float library
2736         * device/lib/_fsget1arg.c: receive 1 float arg
2737         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2738         * device/lib/_fsnormalize.c: normalize a float
2739         * device/lib/_fsreturnval.c: return float, various helper routines
2740         * device/lib/_fsrshift.c: right shift a float's mantissa
2741         * device/lib/_fsswapargs.c: swap 2 floats
2742         * device/lib/Makefile.in: build these 6 new files for mcs51
2743         * device/lib/libfloat.lib: add these 6 files to the library
2744
2745 2004-12-26 Borut Razem <borut.razem AT siol.net>
2746
2747         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2748           built by gcc 3.4.2
2749
2750 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2751
2752         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2753           and fully reentrant and register bank neutral.
2754         * device/lib/printf_fast.c: added float (not enabled by default),
2755           added compact/slower integer (also not enabled by default),
2756           improved size/speed of fast integer code, other minor changes
2757         * device/include/stdio.h, device/lib/Makefile.in,
2758           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2759
2760 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2761
2762         * src/pic16/pcode.c: declaring variables other than at the start of a
2763           block is not supported in C by VC6.
2764
2765 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2766
2767         * applied a previous patch from Raphael Neider that wasn't included
2768         in the previous commits, which fixes infinite loops within jumptable
2769         improvements,
2770         * made some fixes that previous patches introduced
2771
2772 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2773
2774         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2775         that fixes an issue with AOP_PCODE asmop's offset,
2776         * (pic16_popCopyReg): update instance field too,
2777         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2778         function of pic port,
2779         * (genCmp, genAnd, genAssign),
2780         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2781
2782 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2783
2784         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2785         variables initial values to idata section,
2786         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2787         variables in some functions. This utilizes parmBytes field of iCode
2788         structure to hold the offset of the variable in stack. (might be
2789         able to use the stack field too?)
2790         * applied patch from Raphael Neider # ### , # ###
2791         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2792         variable initial values in idata section,
2793         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2794         for static variables with initial value
2795         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2796         applied fix in while loop from Raphael Neider.
2797
2798 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2799
2800         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2801         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2802         * src/ds390/ralloc.c (serialRegAssign): spill bits
2803         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2804         * support/Util/SDCCerr.c,
2805         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2806         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2807         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2808
2809 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2810
2811         * device/include/sdcc-lib.h: inserted LGPL, added includes
2812           asm/ds390/features.h and asm/mcs51/features.h
2813         * device/include/asm/default/features.h,
2814         * device/include/asm/gbz80/features.h,
2815         * device/include/asm/z80/features.h: added empty _AUTOMEM
2816           and _STATMEM
2817         * device/include/asm/ds390/features.h,
2818         * device/include/asm/mcs51/features.h: added files with defines for
2819           _AUTOMEM and _STATMEM indicating automatic and static storage class
2820         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2821         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2822         * src/SDCCicode.c (geniCodeCast),
2823         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2824         * src/SDCCloop.c (loopInduction): removed unused variable lr
2825         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2826           to convertToFcall to include char modulo (RFE 1065037), added check
2827           if left operand is unsigned and use abs of literal value
2828         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2829           as it doesn't work after conversion from peephole.def to peephole.rul
2830         * src/mcs51/gen.c (toBoolean): added check for size,
2831           (genModOneByte): optimized code for signed char modulo a literal
2832           power of 2 (thanks to Hubert Sack),
2833           (genRRC): removed unnecessary "clr c",
2834           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2835         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2836           jump optimization,
2837           swapped rules 256.c and 256.d,
2838           extended 256.d by using new multiple checks (thanks Erik),
2839           added rules 256.e and 256.f,
2840           updated rule 261.a and 261.b to new generated code
2841         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2842
2843 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2844
2845         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2846           induction related bugs, including first part of bug #1074377
2847
2848 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2849
2850         * applied patch from bug-report #1076292,
2851         * applied patches for genAnd and Goto-optimizations for Raphael
2852         Neider,
2853         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2854         dump a less iCode information,
2855         * src/pic16/device.h (pic16_options_t): added field debgen,
2856         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2857         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2858         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2859         puclic,
2860         * (various functions): added macros FENTRY and FENTRY2 to functions,
2861         to emit function prologue,
2862         * (various functions): fixed indentation,
2863         * (genNearPointerGet): fixed loading of FSR0,
2864         * (genPackBits): applied patch from Raphael Neider to fix updating
2865         of FSR0 and touching only the modified bits,
2866         * src/pic16/genarith.c (various functions): added macros FENTRY to
2867         emit function prologue in comments,
2868         * src/pic16/pcode.h: added functions debugf2, debugf3,
2869         * src/pic16/ralloc.c: partial fix for packForPush caused
2870         segmentation fault,
2871
2872 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2873
2874         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2875           <stsp AT users.sourceforge.net> with reversed byte order
2876         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2877
2878 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2879
2880         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2881           bug #1074377
2882         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2883         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2884
2885 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2886
2887         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2888
2889 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2890
2891         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2892           conditions,
2893           (setFromConditionArgs): friendly operand parser for peephole rules,
2894           (operandBaseName, operandsNotRelated): new peephole condition
2895           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2896           architecture specific register naming into account, handles n-way
2897           comparisons, and supports quoted literals
2898         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2899
2900 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2901
2902         * src/mcs51/peeph.def: fixed bug #1076940
2903
2904 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2905
2906         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2907
2908 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2909
2910         Adding support for replacing ljmps with sjmps in jumptables
2911         generated for switch statements. For now you need to set the
2912         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2913         Now 4 algorithms for mcs51 jumptable generation are used:
2914         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2915         addresses loaded pc-relative for up to 112 cases and stack-pushing
2916         target addresses loaded with offset from dptr for up to 256 cases.
2917
2918         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2919         * src/mcs51/main.c: adapted constants for switch table generation
2920         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2921
2922 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2923
2924         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2925         * support/regression/tests/bug1057979.c: added test for bug 1073386
2926
2927 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2928
2929         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2930         compilers
2931
2932 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2933
2934         * src/pic16/device.h,
2935         * src/pic16/genarith.c,
2936         * src/pic16/glue.c,
2937         * src/pic16/main.c,
2938         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2939
2940 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2941
2942         Large cummulative patch for pic16 port.
2943         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2944         to call when a stack overflow occurs,
2945         * (malloc.h): added CVS Id tag,
2946         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2947         variable,
2948         * added libc directory. The current version of LibC contains string
2949         functions, ctype functions and macros and some functions of the
2950         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2951         be extensively tested in the future. Standard disclaimer here.
2952         Library is not automatically build yet. But one can build it by
2953         invoking 'make' inside the libc directory.
2954         * added ADC library under libio. Preliminary version yet.
2955
2956         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2957         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2958         aopForRemat() now and not by pic16_aopOp(),
2959         * (pic16_popGetTempReg): removed warning messgae when allocating
2960         temporary registers, its a buggy feature and will be removed,
2961         * (pic16_popGet): set register instance field in AOP_CRY,
2962         * (pic16_outBitC): fixed for results in size greater than 1,
2963         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2964         * (pic16_storeForReturn): optimized return of 0,
2965         * (genCmp): experimental code for new genCmp which uses PIC18's
2966         special compare&skip instructions. Initial tests fail some times
2967         with variables grater than 1 byte in size, so new code is disabled,
2968         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2969         a single bit,
2970         * (genCast): began a fix to optimize the casting of a bit to another
2971         bit, now assigning a bitfield to another bitfield will fail, sorry,
2972         * src/pic16/main.c: disabled the use of lr-support feature,
2973         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2974         * added some function prototypes, added function _debugf prototype,
2975         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2976         bits with offset (case PO_GPR_BIT),
2977         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2978         command line,
2979         * (isBankInstruction): modified to return 0 for no banking instruction,
2980         and 1 for banking instruction,
2981         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2982         caused stop processing pCodes after a inline assembly block,
2983         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2984         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2985         registers when it shouldn't,
2986         * src/pic16/ralloc.c (allocReg): add preliminary support for
2987         supporting a limited set of temporary registers,
2988
2989 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2990
2991         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2992           genDataPointerSet): ensure assignments always copy in MSB to LSB
2993           order,
2994           (loadRegFromAop): recognize CLRH optimization,
2995           (genFunction): optimize RECEIVE iCodes in reentrant functions
2996
2997 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2998
2999         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3000           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3001           selected.
3002         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3003         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3004           contiguous with data
3005
3006 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3007
3008         * device/lib/_gptrget.c (_gptrget),
3009         * device/lib/_gptrgetc.c (_gptrgetc),
3010         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3011           instead of sjmp to ret
3012         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3013           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3014
3015 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3016
3017         * .version: bumped version to 2.4.7
3018         * device/lib/_gptrget.c (_gptrget): is now _naked
3019         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3020         * device/lib/_gptrput.c (_gptrput): is now _naked
3021         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3022           (createFunction): fixed xstack
3023         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3024         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3025           or bit either,
3026           (geniCodeCritical): store original interrupt state in an iTemp bit
3027           var unless stack-auto
3028         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3029         * src/SDCCmain.c (setIncludePath): added include/target to search path
3030         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3031         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3032           prototype,
3033           (processFuncArgs): put bit vars in bit area
3034         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3035           unsaveRBank): fixed xstack,
3036           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3037           (genFunction, genEndFunction): fixed xstack,
3038           (genAssign): optimization don't walk backwards through mem
3039         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3040         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3041         * support/regression/Makefile: also make library (for stack-auto) when
3042           making "all" and added "test-mcs51-xstack-auto"
3043         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3044         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3045         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3046         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3047         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3048           make-library by MAKE_LIBRARY
3049         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3050           regression tests for xstack
3051         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3052         * support/regression/tests/critical.c: test for critical on mcs51
3053
3054 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3055
3056         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3057           built version of sdcc instead of installed version
3058
3059 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3060
3061         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3062         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3063           vprintf.c now
3064         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3065         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3066           WARNING: remove device/lib/build/z80/printf.o by hand when
3067           updating from previous build!
3068         * device/lib/z80/printf.c: updated comment
3069         * support/regression/tests/bug1057979.c: test all ports now
3070         * support/regression/tests/bug1065458.c: file added
3071
3072 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3073
3074         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3075           *_start and *_end symbols for static functions
3076
3077 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3078
3079         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3080           and search crt0.o in all library paths,
3081           (setIncludePath): proper handling of --nostdinc,
3082           (setLibPath): proper handling of --nostdlib
3083         * support/regression/Makefile,
3084         * support/regression/ports/ds390/spec.mk,
3085         * support/regression/ports/gbz80/spec.mk,
3086         * support/regression/ports/hc08/spec.mk,
3087         * support/regression/ports/mcs51/spec.mk,
3088         * support/regression/ports/mcs51-large/spec.mk,
3089         * support/regression/ports/mcs51-stack-auto/spec.mk,
3090         * support/regression/ports/z80/spec.mk: use include and lib files from
3091           built version of sdcc instead of installed version
3092         * doc/sdccman.lyx: fixed typo in --nostdinc
3093
3094 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3095
3096         * src/pic/pcode.c,
3097         * src/pic/device.c,
3098         * src/pic/ralloc.c,
3099         * src/pic/gen.c : added support to generate code for struct bit fields.
3100
3101 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3102
3103         * as/xa51/xa_version.h,
3104         * device/include/errno.h,
3105         * device/include/regc515c.h,
3106         * device/lib/_itoa.c,
3107         * device/lib/_ltoa.c,
3108         * device/lib/ser_ir_cts_rts.c,
3109         * sim/ucsim/xa.src/glob.cc,
3110         * sim/ucsim/xa.src/inst_gen.cc,
3111         * sim/ucsim/xa.src/xa_bit.cc,
3112         * sim/ucsim/xa.src/xa_sfr.cc,
3113         * sim/ucsim/z80.src/inst_dd.cc,
3114         * sim/ucsim/z80.src/inst_fdcb.cc,
3115         * support/scripts/keil2sdcc.pl,
3116         * src/pic16/pic16.dsp,
3117         * src/pic16/pic16a.dsp: corrected cvs line endings
3118         * device/lib/printf_large.c: fixed bug 1057979
3119         * src/pic16/gen.c: fixed non-C standard code
3120         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3121         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3122         * support/regression/ports/mcs51/support.c: reload T1 asap
3123         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3124           pdata use and clear idata startup behaviour
3125         * support/regression/tests/bug1057979.c: added
3126
3127 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3128
3129         * device/examples/ds390/ow390/ad26.h,
3130         * device/examples/ds390/ow390/cnt1d.h,
3131         * device/examples/ds390/ow390/crcutil.c,
3132         * device/examples/ds390/ow390/ownet.h,
3133         * device/examples/ds390/ow390/owsesu.c,
3134         * device/examples/ds390/ow390/swt12.h,
3135         * device/examples/ds390/ow390/swtoper.c,
3136         * device/examples/ds390/ow390/temp10.h,
3137         * device/examples/ds390/ow390/thermodl.c,
3138         * device/examples/ds390/tinitalk/tinitalk.dsp,
3139         * device/examples/ds390/tinitalk/tinitalk.dsw,
3140         * device/examples/mcs51/clock/hw.h,
3141         * device/examples/mcs51/simple2/go.bat,
3142         * device/examples/serialcomm/windows/serial.h,
3143         * device/examples/xa51/dummy.c,
3144         * device/examples/xa51/hello.c,
3145         * device/include/80c51xa.h,
3146         * device/include/at89x051.h: corrected cvs line endings
3147
3148 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3149
3150         * src/pic16/main.c (options): added command line --gstack, to trace
3151         stack over/under flows,
3152         * added pragma 'wparam' to allow passing first byte of function
3153         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3154         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3155         call to __gstack_test function and sets up the symbol as extern,
3156         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3157         * popaop): added call to pic16_testStackOverflow,
3158         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3159         wparamList list,
3160         * (genCall, genPcall): now all parameters are passed via stack
3161         except in functions that are pass to wparam pragma in which WREG is
3162         used too,
3163         * (genPcall): REENTRANT flag is checked to see if variable prototype
3164         contains reentrant keyword, don't call a non-reentrant function, via
3165         a reentrant function pointer or vice versa, functions are never
3166         passed via WREG,
3167         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3168         D.Winkler,
3169         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3170         SIGSEGV when accessing a NULL register stucture,
3171         * (pic16_printGPointerType): modified to handle UPPER modifier for
3172         function initializers, changed prototype of function to simpler one,
3173         * (pic16_printIvalFuncPtr): check to see if function is already
3174         added in externs list,
3175         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3176         optimized a move from W to SFR with a move to the same register
3177         later after a CALL,
3178         * device/lib/pic16/debug: NEW directory, contains debug features
3179         which are enabled when linking with libdebug.lib, currently command
3180         line option --gstack enables stack pointer tracing for over/under
3181         flow, corresponding sources are in debug/gstack
3182
3183 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3184
3185         * doc/sdccman.lyx: updated SDCC version,
3186         * (PIC16 port): update list of command line options,
3187         * src/pic16/device.h (structure pic16_options_t): added field gstack
3188         to enable stack overflow tracing on push/pops,
3189         * src/pic16/device.c (statistics structure): added statistics
3190         structure,
3191         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3192         pic16_dump_int_registers): increase statistics counters for each
3193         * variable which is encountered
3194         * (pic16_dump_usection): emit each .udata variable to its own udata
3195         section,
3196         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3197         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3198         parameters via stack, otherwise use old scheme,
3199         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3200         assembler output file,
3201         * src/pic16/main.c: added command line options --gstack to enable
3202         push/pop tracing for stack overflow,
3203         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3204         instructions): added size of each instruction,
3205         * (pic16_countInstruction): estimate size of instructions in
3206         the_pFile list, inline assembly blocks are not counted,
3207         * (pic16_FixRegisterBanking): trace previous register usage, when
3208         banksel optimizations is greater than 0, don't emit a redudant
3209         banksel directive,
3210
3211 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3212
3213         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3214         * src/pic16/ralloc.c : applied same fix for pic16.
3215         * src/pic/gen.c : tidied it up a little.
3216
3217 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3218
3219         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3220         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3221
3222 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3223
3224         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3225
3226 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3227
3228         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3229         non-reentrant function __modsint in the interrupt function (thus
3230         corrupting math operations during serial I/O)
3231         * device/lib/ser_ir.c: as above, changed buffersize
3232         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3233         256.c,d for zeroing
3234         * doc/Makefile: added option -t for rsync
3235
3236 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3237
3238         * src/SDCCast.h (struct ast),
3239         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3240
3241 2004-10-20 Borut Razem <borut.razem AT siol.net>
3242
3243         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3244         package
3245
3246 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3247
3248         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3249         makefile targets,
3250         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3251         support functions to replace long sequences of MOVFF's from access
3252         bank registers to stack and vice versa,
3253         * src/pic16/device.h: added new field opt_flags, where optimization
3254         flags can be set to enable certain features,
3255         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3256         * pBlock, (genFunction, genEndFunction): surroung loop for
3257         saving/loading used registers in stack with PC_INFO pCodes,
3258         INF_LREGS. Code in between can then be optimized by pCode optimizer
3259         to support function calls,
3260         * (genDataPointerSet): fixed bug which loaded float fields in
3261         structures with corrupt data,
3262         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3263         in a standard way debug info on stderr. Feature used for developing
3264         and debugging only,
3265         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3266         obsolete chunks of code,
3267         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3268         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3269         * pic16/src/pcode.c (pic16_newpCodeInfo,
3270         * (pic16_newpCodeOpLocalRegs),
3271         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3272         feature,
3273         * (pic16_pCodeConstString): printing of the initial value of a
3274         symbol as a comment is inhibited since parsing was already done by
3275         copyStr and output is corrupt,
3276         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3277
3278 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3279
3280         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3281
3282 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3283
3284         * as/mcs51/lkarea.c: removed old K&R style,
3285           (lnksect): changed check on boundary error,
3286           (lnksect2): changed check on boundary error,
3287           (lnksect2): extend XSTK to end of page if size = 1
3288         * as/mcs51/lkmain.c: removed old K&R style,
3289           (Areas51): create l_IRAM symbol
3290         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3291         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3292           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3293         * device/lib/_mullong.c: added version to be compiled with xstack
3294         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3295         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3296         * device/lib/mcs51/crtxstack.asm: fixed comment
3297         * src/SDCCglue.c: maxInterrupts defaults to 0,
3298           (emitMaps): added pdata,
3299           (createInterruptVect): (re)moved default,
3300           (glue): added pdata,
3301           (glue): moved __start__xstack to XSTK with default size 1
3302         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3303           and options.float_rent when options.stackAuto is set,
3304           (linkEdit): only write XDATA_NAME if provided on command line
3305         * src/SDCCmem.h,
3306         * src/SDCCmem.c: added pdata
3307         * src/port.h: added pdata_name to PORT
3308         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3309           (saveRegisters, unsaveRegisters): removed usage of B,
3310           (genMinus): fixed accumulator clash,
3311           (genJumpTab): added comment, this needs another look
3312         * src/mcs51/gen.c: added check for "B in use" paranoia,
3313           added pushB() and popB()
3314         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3315           chance
3316         * src/avr/main.c,
3317         * src/ds390/main.c,
3318         * src/hc08/main.c,
3319         * src/mcs51/main.c,
3320         * src/pic/main.c,
3321         * src/pic16/main.c,
3322         * src/xa51/main.c,
3323         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3324           added PSEG (PAG,XDATA) or NULL to port specifier
3325         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3326         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3327           (_mcs51_genInitStartup): removed __start__xstack equ,
3328           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3329         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3330         * src/z80/gen.c (_rleAppend): fixed warnings
3331         * support/regression/tests/zeropad.c: added pdata test
3332         * .version: bumped to 2.4.6
3333
3334 2004-10-17 Borut Razem <borut.razem AT siol.net>
3335
3336         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3337         as a part of nightly build
3338
3339 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3340
3341         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3342         WREG holds the first byte function parameters,
3343         * (aopForSym): take special case for symbols which are in FARSPACE
3344         but in CODESPACE too,
3345         * (assignResultValue): modified to take into account _G.useWreg,
3346         * (genCall): don't use wreg for parameter passing when function is
3347         declared as reentrant, too, added optimization INCF to stack
3348         pointer when stack parameter count is 1,
3349         * (genFunction, genEndFunction): refurnished and fixed to not using
3350         wreg for passing parameters when function has varargs or is
3351         reentrant, fixed bug with symbol name compare for generating
3352         functions in absolute address,
3353         * (pic16_storeForReturn): refurnished,
3354         * (genCmp): began writing a new version of the function, not ready
3355         yet, therefore it is disabled,
3356         * (genAssign): do not read code memory when assigning a function to
3357         a pointer function,
3358         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3359         array of characters, not pointer,
3360         * (pic16initialComments): in debug mode emit an .ident directive for
3361         the assembler,
3362         * (_process_pragma): emit a new warning type (internal to pic16)
3363         when setting stack to default length, emit a similar warning when
3364         placing a function at absolute address and address is not word aligned
3365         * (_pic16_parseOptions): added 'return TRUE' statement,
3366         * (_pic16_linkEdit): if compiling a source, then add the source's
3367         file object, first in the list of objects to link,
3368
3369 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3370
3371         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3372         * src/pic/main.c : removed VC warning.
3373         * src/pic/gen.c : changed comment.
3374
3375 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3376
3377         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3378         reference to a deprecated symbol _GPTRREG was causing failure to
3379         link. Thanks G. M. Gallant for the info.
3380
3381 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3382
3383         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3384         comments for Bugs item #954788.
3385
3386 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3387
3388         * src/pic16/device.c (pic16_dump_gsection,
3389         * pic16_groupRegistersInSection): handle symbols declared to be in
3390         access bank differently,
3391         * src/pic16/gen.c (struct _G): added field resDirect,
3392         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3393         send values read from stack directly to result and don't allocate
3394         temporary values,
3395         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3396         same registers,
3397         * (pic16_sameRegsOfs): NEW,
3398         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3399         free because they were not allocated from temporary pool,
3400         * pic16_popRegFromString): workaround to fix a problem with
3401         allocating variables twice or never,
3402         * (genGenPointerGet): using PRODL instead of FSR0H,
3403         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3404         instead of FSR0H,
3405         * (genAssign): take advantage of the _G.resDirect flag,
3406         * (genCast): around line 11844, use mov2f instead of directly
3407         MOVFF'ing between operands to account for literal values,
3408         * src/pic16/genutils.c: some new debug functions for gpsim have been
3409         added,
3410         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3411         float with integer part only,
3412         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3413         place variables in access bank
3414         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3415         updated sources to reflect recent changes in gen.c
3416
3417 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3418
3419         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3420         sources that searched for headers in installation path, now the
3421         device/include/pic16 is used,
3422         * src/pic16/glue.c (pic16glue),
3423         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3424         .line directives if not in debug mode, this suppresses assembler's
3425         warnings for ignored directives
3426
3427 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3428
3429         * src/port.h: made reset_regparms prototype void parameter explicit.
3430         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3431         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3432         * doc/sdccman.lyx: documented warning disabling and how to use
3433           printf_large to make it print floats.
3434         * device/include/stdbool.h: NEW
3435         * device/lib/_atof.c,
3436         * device/lib/_divuint.c,
3437         * device/lib/_divulong.c,
3438         * device/lib/expf.c,
3439         * device/lib/printf_large.c,
3440         * device/lib/sincosf.c,
3441         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3442         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3443           a completely reentrant lib.
3444
3445 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3446
3447         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3448         * device/include/pic16/stdio.h: fixed bug with colon
3449
3450 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3451
3452         * device/include/pic16/stdio.h,
3453         * device/include/pic16/stdlib.h,
3454         * device/include/pic16/math.h: NEW
3455         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3456         declared as _naked to reduce overhead
3457         * device/lib/Makefile.in (target port-specific-objects-pic16):
3458         changed * to *.* so to ignore the CVS directory,
3459         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3460         stacked variables back in stack,
3461         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3462         corruption
3463
3464 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3465
3466         * .version: bumped version number to 2.4.5
3467         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3468         * support/Util/SDCCerr.c (messages structure): added entry for
3469         W_POSSBUG2
3470
3471         Large cumulative patch for pic16 port and libraries.
3472         * device/include/pic16/sdcc-lib.h,
3473         * device/include/pic16/stdarg.h,
3474         * device/include/asm/pic16/features.h,
3475         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3476         * device/include/pic16/float.h: changes reentrant keyword with
3477         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3478         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3479         updated target build-libraries to include objects from gptr,
3480         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3481         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3482         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3483         all function headings,
3484         * src/SDCCmain.c: added global parameter userIncDirsSet,
3485         * (parseCmdLine): when option -I is encountered add directory to
3486         userIncDirsSet too,
3487         * src/version.awk: added space between control and long,
3488         * src/pic16/NOTES: added some notes for the port,
3489         * src/pic16/gen.c: added prototype for mov2fp function,
3490         * (fReturnpic16[]): properly named return value registers,
3491         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3492         * (aopForSym): added code to handle symbols with onStack flag set,
3493         symbols onStack are allocated PTRSIZE bytes,
3494         * (aopFreeAsmop): handles special case where asmops are stack objects,
3495         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3496         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3497         added argument lock to trace flaws in allocating temporary registers
3498         when developing port,
3499         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3500         * (pic16_popRegFromString): reenabled allocating a direct register
3501         from string,
3502         * (assignResultValue): various beautifications,
3503         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3504         referenced function argument,
3505         * (genIpush): reenabled to allow stacked arguments, handles only
3506         ic->parmPush iCodes,
3507         * (genCall, genPcall): major changes to allow for variable argument
3508         functions, fixed a bug with falsely restoring stack pointer after
3509         returning from call,
3510         * (genFunction): pending code for critical function,
3511         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3512         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3513         * (genNearPointerGet): fixed bug with indirect reading, was always
3514         reading from INDF0
3515         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3516         pointers,
3517         * (genAddrOf): rewrote code to take address of a stacked function parameter
3518         * (genCast): fixed casting to generic pointer type,
3519         * src/pic16/gen.h: added AOP_STA,
3520         * (struct asmop): added field stk,
3521         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3522         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3523         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3524         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3525         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3526         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3527         generic pointers,
3528         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3529         and library paths,
3530         * (pic16_port structure): generic pointer size is set to 3,
3531         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3532         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3533         compiler warning,
3534         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3535         operand is an iTemp,
3536
3537 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3538
3539         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3540         * debugger/mcs51/simi.c: addapt new syntax of s51
3541
3542 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3543
3544         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3545         * src/pic16/pcode.c: commented out some calls to free() in order to
3546         fix bug #989576,
3547
3548 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3549
3550         * src/SDCCicode.h,
3551         * src/SDCCicode.c (isiCodeInFunctionCall),
3552         * src/avr/ralloc.c (selectSpil),
3553         * src/pic/ralloc.c (selectSpil),
3554         * src/pic16/ralloc.c (selectSpil),
3555         * src/ds390/ralloc.c (selectSpil),
3556         * src/hc08/ralloc.c (selectSpil),
3557         * src/xa51/ralloc.c (selectSpil),
3558         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3559         stack in the middle of a function call sequence (fixes bug #1020268)
3560         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3561         costs associated with the minimum switch case.
3562
3563 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3564
3565         * src/SDCC.lex: fixed bug #1030549
3566
3567 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3568
3569         * src/SDCCcse.h (struct cseDef),
3570         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3571         over a function call if the CSE is derived from a symbol whose
3572         address has been taken (fixes bug #1029883)
3573         * support/regression/tests/bug-1029883: a new regression test for
3574         this bug
3575
3576 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3577
3578         * src/hc08/gen.c (emitinline): fixed bug #1029778
3579         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3580         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3581         and starts toward RFE #905167)
3582
3583 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3584
3585         * src/pic16/gen.c (mov2f): New function to move an operand to
3586         another without considering if it is a literal or a register,
3587         * (pic16_sameRegs): don't check if they are both AOP_REG,
3588         * (AccRsh): removed andmask=0 lines,
3589         * (genLeftShift): duplicated to be improved in future versions,
3590         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3591         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3592         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3593         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3594         * (insertBankSwitch): fixed inserting banksel directives algorithm
3595         for instructions that follow a skip instruction, this fixes a report
3596         for broken subtraction code generation,
3597         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3598         iCode is a left op, just in case result and right share the same
3599         registers
3600
3601 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3602
3603         * src/hc08/main.c,
3604         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3605         preservation of HX
3606         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3607         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3608         on 2004-09-12; it was buggy
3609
3610 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3611
3612         * src/SDCCsymt.h: removed RESULT_CHECK
3613         * src/SDCCast.c,
3614         * src/SDCCglue.c,
3615         * src/SDCCval.c,
3616         * src/pic/glue.c,
3617         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3618
3619 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3620
3621         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3622         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3623         configuration values no more rejected by compiler, they are assigned
3624         to configuration registers with a warning message instead,
3625         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3626         the for-loop so last conf register is emitted too,
3627         * (_pic16_initPaths): link library libsdcc.lib by default,
3628         * (_hasNativeMulFor): modified test for multiplication according to
3629         Raphael Neider's remarks. Integer multiplication is also done with
3630         support functions,
3631         * device/include/pic16/pic18fregs.h: corrected type error in while
3632         testing and including 18f6720 header file
3633
3634 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3635
3636         * src/pic16/device.h (pic16_options): removed field use_crt,
3637         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3638         until an optimization to handle single bits is added,
3639         * (pic16_loadFSR0): moved before genUnpackBits,
3640         * (genAnd): some white lines removed,
3641         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3642         leave_reset flags in pic16_options when using crt modules,
3643
3644 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3645
3646         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3647           for bugs 898889 & 979599. Also used some safer print instructions.
3648
3649 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3650
3651         * src/pic16/device.h (pic16_options_t): added field use_crt,
3652         crt_name, no_crt,
3653         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3654         catch a probable future bug,
3655         * src/pic16/gen.c: aopIdx function commented out,
3656         * (genAssign): commented out old code which used aopIdx,
3657         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3658         code, added if conditionals to take into account the --use-crt
3659         command line options,
3660         * src/pic16/main.c (pic16_optionsTable): added new command line
3661         options, --use-crt= and --no-crt,
3662         * (_pic16_linkEdit): now the proper crt object is added in the
3663         linker command line except than when --no-crt is specified,
3664         * src/pic16/pcode.c,
3665         * src/pic16/pcode.h: added some structures and functions for a new
3666         optimization scheme to compansate for instruction overhead between
3667         same iCodes, this scheme is currently under development and is not
3668         working in any way,
3669         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3670         to && operator,
3671         * device/lib/pic16/startup/crt0i.c,
3672         * device/lib/pic16/startup/crt0iz.c: added global char variable
3673         __uflags to force the generation of an idata section
3674
3675 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3676
3677         * doc/Makefile,
3678         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3679         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3680
3681 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3682
3683         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3684         Frieder) and clarified the default code optimization mode
3685
3686 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3687
3688         * src/SDCC.lex (doPragma, process_pragma),
3689         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3690         "opt_code_size", and "opt_code_balanced"
3691         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3692         regrouped options by category, added support for category headers
3693         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3694         and "--opt-code-size"
3695         * doc/sdccman.lyx: documented these new options and pragmas
3696         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3697         preference into account
3698
3699 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3700
3701         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3702           geniCodePreDec): Fixed bug 904237 by generating a warning
3703         * src/SDCCerr.h,
3704         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3705
3706 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3707
3708         * src/pic/device.c : When no max ram set validate full memory range.
3709         * src/pic/pcode.c,
3710         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3711
3712 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3713
3714         * device/lib/_gptrget.c,
3715         * device/lib/_gptrput.c: updated comment
3716         * device/lib/calloc.c,
3717         * device/lib/free.c,
3718         * device/lib/malloc.c,
3719         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3720         * src/SDCCcse.c (cseBBlock),
3721         * src/SDCCicode.c (printOperand, geniCodeArray),
3722         * src/SDCCicode.h (struct operand): fixed bug 868103
3723         * support/regression/tests/bug-868103.c: added
3724         * src/SDCCast.c (searchLitOp),
3725         * src/SDCCcse.h (struct cseDef),
3726         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3727         * src/SDCCicode.h (struct operand),
3728         * src/SDCCsymt.h (struct sym_link),
3729         * src/avr/gen.c (hasInc),
3730         * src/ds390/gen.c (hasInc),
3731         * src/hc08/gen.c (genPlusIncr, hasInc),
3732         * src/mcs51/gen.c (hasInc),
3733         * src/pic16/glue.c (pic16_printIvalChar),
3734         * src/pic16/ralloc.c (regWithIdx),
3735         * src/xa51/gen.c (hasInc) : removed warnings
3736         * src/SDCCast.c (createBlock): added comment ???
3737         * src/hc08/ralloc.c: updated comments
3738
3739 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3740
3741         * doc/sdccman.lyx: updated section on switch statements, added
3742         section about semaphore locking
3743         * doc/Makefile: added option -info for latex2html
3744         * device/lib/_gptrget.c,
3745         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3746
3747 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3748
3749         * src/pic/device.h,
3750         * src/pic/device.c,
3751         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3752          maxram is less than 0x100.
3753
3754 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3755
3756         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3757
3758 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3759
3760         * src/port.h,
3761         * src/mcs51/main.c,
3762         * src/ds390/main.c,
3763         * src/z80/main.c,
3764         * src/hc08/main.c,
3765         * src/pic/main.c,
3766         * src/pic16/main.c,
3767         * src/avr/main.c,
3768         * src/xa51/main.c
3769         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3770         a jump table is the best form for a switch statement, including
3771         automatic insertion of missing cases to make the case range
3772         continuous. Developed in collaboration with Frieder Ferlemann.
3773
3774 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3775
3776         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3777         accumulator result if it needs sign extension
3778
3779 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3780
3781         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3782
3783 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3784
3785         * device/lib/gbz80/printf.c,
3786         * device/lib/z80/printf.c: removed define for NULL
3787
3788 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3789
3790         * as/xa51/xa_link.c,
3791         * device/examples/ds390/ow390/ad26.c,
3792         * device/examples/ds390/ow390/cnt1d.c,
3793         * device/examples/ds390/ow390/counter.c,
3794         * device/examples/ds390/ow390/ds2480.h,
3795         * device/examples/ds390/ow390/ds2480ut.c,
3796         * device/examples/ds390/ow390/findtype.c,
3797         * device/examples/ds390/ow390/gethumd.c,
3798         * device/examples/ds390/ow390/owllu.c,
3799         * device/examples/ds390/ow390/ownetu.c,
3800         * device/examples/ds390/ow390/swt12.c,
3801         * device/examples/ds390/ow390/swtloop.c,
3802         * device/examples/ds390/ow390/temp.c,
3803         * device/examples/ds390/ow390/temp10.c,
3804         * device/examples/ds390/ow390/thermo21.c,
3805         * device/examples/ds390/ow390/tinilnk.c,
3806         * device/examples/ds390/ow390/tstfind.c,
3807         * device/examples/serialcomm/windows/serial.cpp,
3808         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3809         * device/include/reg51.h: fixed line endings for cvs
3810
3811 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3812
3813         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3814         packRegsForAccUse, packRegisters): new accumulator register
3815         packing algorithm
3816         * support/regression/ports/hc08/support.c (_putchar): suppress
3817         warning of unused variable
3818         * src/SDCCicode.c: added SWAP entry to codeTable
3819
3820 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3821
3822         * device/lib/sprintf.c: forgot to add this file before previous commit
3823
3824 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3825
3826         * src/pic16/gen.c (genPackBits): added operand right in function
3827         parameters, load result directly if p_type is POINTER (that is
3828         called by genNearPointerSet)
3829         * (genUnPackBits): added operand left in function parameters,
3830         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3831         FSR0 if accessing bitfields,
3832
3833 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3834
3835         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3836           _print_format; updated printf, sprintf, vsprintf
3837         * device/include/asm/default/features.h: corrected comment/define
3838         * device/lib/Makefile.in: added sprintf.c
3839         * device/lib/libsdcc.lib: added sprintf module
3840         * device/lib/printf_large.c,
3841         * device/lib/vprintf.c,
3842         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3843           into these 3 files
3844         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3845         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3846         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3847           hc08 test
3848         * support/regression/tests/zeropad.c: define idata as data for hc08
3849
3850 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3851
3852         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3853         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3854         labels are referenced at least once (even if a reference is not found)
3855         * src/hc08/gen.c (emitcode): set isComment flag for comments
3856         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3857         loads), rules 6a..6b (optimize jumps to return)
3858
3859 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3860
3861         * device/lib/acosf.c (acosf),
3862         * device/lib/asinf.c (asinf),
3863         * device/lib/atanf.c (atanf),
3864         * device/lib/ceilf.c (ceilf),
3865         * device/lib/cosf.c (cosf),
3866         * device/lib/coshf.c (coshf),
3867         * device/lib/cotf.c (cotf),
3868         * device/lib/fabsf.c (fabsf),
3869         * device/lib/floorf.c (floorf),
3870         * device/lib/log10f.c (log10f),
3871         * device/lib/logf.c (logf),
3872         * device/lib/sinf.c (sinf),
3873         * device/lib/sinhf.c (sinhf),
3874         * device/lib/sqrtf.c (sqrtf),
3875         * device/lib/tanf.c (tanf),
3876         * device/lib/tanhf.c (tanhf),
3877         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3878         replaced all instances of "reentrant" in the library functions
3879         defined in math.h with this macro.
3880         * support/regression/tests/float_trans.c: reenabled test for hc08
3881
3882 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3883
3884         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3885         erroneously deleted
3886
3887 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3888
3889         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3890         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3891         multi-byte volatile operands are used
3892         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3893         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3894         initialization to area GSINIT0 so that it would always precede
3895         any static initializers in GSINIT
3896         * support/regression/tests/zeropad.c: fixed idata define for hc08
3897         * support/regression/tests/bug-927659.c,
3898         * support/regression/tests/float_trans.c: disabled tests for hc08
3899         pending missing library routines
3900         * .version: increased version number to 2.4.4 - hc08 port now passes
3901         regression tests
3902
3903
3904 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3905
3906         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3907         * Makefile.common.in,
3908         * as/Makefile,
3909         * as/hc08/Makefile.in,
3910         * as/mcs51/Makefile.in,
3911         * as/z80/Makefile.in,
3912         * debugger/mcs51/Makefile.in,
3913         * device/include/Makefile.in,
3914         * device/lib/Makefile.in,
3915         * doc/Makefile,
3916         * link/Makefile,
3917         * link/z80/Makefile.in,
3918         * packihx/Makefile.in,
3919         * sim/ucsim/main_in.mk,
3920         * sim/ucsim/avr.src/Makefile.in,
3921         * sim/ucsim/doc/Makefile.in,
3922         * sim/ucsim/gui.src/serio.src/Makefile.in,
3923         * sim/ucsim/hc08.src/Makefile.in,
3924         * sim/ucsim/s51.src/Makefile.in,
3925         * sim/ucsim/xa.src/Makefile.in,
3926         * sim/ucsim/z80.src/Makefile.in,
3927         * src/Makefile.in,
3928         * support/cpp2/Makefile.in,
3929         * support/librarian/Makefile,
3930         * support/makebin/Makefile: added DESTDIR to the install path proposed
3931         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3932         * doc/sdccman.lyx: added DESTDIR documentation
3933
3934 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3935
3936         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3937         instruction for interrupt handlers, use fast returns when returning
3938         from high priority interrupts
3939
3940 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3941
3942         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3943         code generation
3944         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3945         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3946         bugs, ported much of Bernhard's code from mcs51
3947         * src/mcs51/gen.c (genSend),
3948         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3949         than one when calling a reentrant function
3950         * device/lib/_mullong.c: defined an alternate struct layout for big
3951         endian ports (hc08)
3952
3953 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3954
3955         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3956         test
3957
3958 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3959
3960         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3961         are sane and complete before asking the port its prefered parameter
3962         passing method (fixes bug #1017633)
3963         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3964         and _ret3
3965
3966 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3967
3968         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3969         problem in bitfields >= 8 bits.
3970
3971 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3972
3973         * src/SDCCsymt.c: undid changes that were not meant to be committed
3974
3975 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3976
3977         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3978
3979 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3980
3981         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3982           copied and wrong bit got inverted
3983
3984 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3985
3986         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3987         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3988         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3989         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3990         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3991         assignments to bitfields at known addresses
3992         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3993         reads from bitfields at known addresses
3994         * src/hc08/ralloc.c (packRegisters),
3995         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3996         genhc08Code): optimize pointer get values used as conditionals
3997         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3998         and branch
3999
4000 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4001
4002         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4003         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4004         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4005         as conditionals
4006
4007 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4008
4009         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4010
4011 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4012
4013         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4014         related problems
4015
4016 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4017
4018         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4019
4020 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4021
4022         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4023         mcs51 port
4024
4025 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4026
4027         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4028
4029 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4030
4031         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4032         cases use more compact code.
4033
4034 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4035
4036         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4037
4038 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4039
4040         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4041
4042 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4043
4044         * src/SDCCsymt.h,
4045         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4046         parameter of changePointer() from symbol* to sym_link*
4047         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4048         * src/SDCCsymt.c (compareType): void* type is castable to other
4049         pointers, but not necesarily an exact match.
4050         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4051         is no longer blindly treated as an exact match.
4052         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4053
4054 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4055
4056         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4057
4058 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4059
4060         * src/pic/gen.c,
4061         * src/pic/pcode.c,
4062         * src/pic/ralloc.h,
4063         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4064
4065 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4066
4067         * src/pic/device.c,
4068         * src/pic/device.h,
4069         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4070
4071 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4072
4073         * src/mcs51/gen.c (emitcode): fixed bug #992819
4074
4075 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4076
4077         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4078           there's no need to make it worse
4079
4080 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4081
4082         * src/mcs51/ralloc.c (deassignLR),
4083         * src/ds390/ralloc.c (deassignLR),
4084         * src/hc08/ralloc.c (deassignLR),
4085         * src/z80/ralloc.c (deassignLR),
4086         * src/pic/ralloc.c (deassignLR),
4087         * src/pic16/ralloc.c (deassignLR),
4088         * src/avr/ralloc.c (deassignLR),
4089         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4090         rlivePoint): fixed another part of bug #971834
4091
4092 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4093
4094         * src/z80/main.c: enabled "critical" keyword
4095         * src/z80/mappings.i,
4096         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4097         functions (fixes bug #979646)
4098         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4099
4100 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4101
4102         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4103           such as c:\mydir.
4104
4105 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4106
4107         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4108           doesn't disable too much optimizations
4109
4110 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4111
4112         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4113
4114 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4115
4116         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4117
4118 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4119
4120         * src/pic/gen.c tidied up tabs
4121         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4122         * src/pic/main.c tidied up tabs
4123         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4124         * src/pic/pcoderegs.c tidied up tabs
4125         * src/pic/ralloc.c tidied up tabs
4126
4127 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4128
4129         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4130         to S_FIXED for pic16 port and when symbol is not in level 0,
4131         allocate for S_REGISTER storage class and pic16 port, too,
4132         * src/pic16/device.h: prototype for checkSym,
4133         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4134         * (pic16_assignConfigWordValue): test the value and the mask to
4135         validate that the value is suitable for the configuration word,
4136         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4137         collect extern declared symbols, don't emit symbol twice, check
4138         first if symbol is in publics set first,
4139         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4140         * added command line '--fstack' which enables an experimental
4141         feature for stack access, too buggy to be used yet...
4142         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4143         * (pic16_allocDirReg): when register has storage class S_REGISTER
4144         allocate in pic16_dynAccessRegs,
4145         * device/include/pic16/pic18f????.h: modified configuration word
4146         naming convention, words started as CONFIG0H but should be CONFIG1H
4147
4148 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4149
4150         * device/include/mcs51reg.h: fixed bug 970993
4151
4152 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4153
4154         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4155         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4156         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4157         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4158         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4159         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4160           error/warning numbers,
4161           added function setWarningDisabled()
4162         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4163         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4164           _memcmp.c _memmove.c calloc.c realloc.c free.c
4165         * support/regression/tests/malloc.c: added tests for new functionality
4166         * support/regression/tests/zeropad.c: added tests for truncated initializers
4167           and initialized char arrays starting with '\x0'
4168         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4169
4170 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4171
4172         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4173
4174 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4175
4176         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4177         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4178         peephole 177.e. Thanks to anonymous
4179
4180 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4181
4182         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4183         function isn't used in the source but referenced as a
4184         variable initializer then declare it as extern in .asm file
4185
4186 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4187
4188         * .version: increased version number to 2.4.3
4189
4190         Adding version extension according to ChangeLog CVS revision
4191         * src/Makefile.in (target all): added dependency 'version.h'
4192         * (rule version.h): added rule to create version.h from ChangeLog,
4193         * (rule dep): added dependency version.h,
4194         * src/version.awk: AWK script to create version.h
4195         * src/SDCCdwarf2.c (dwWriteModule),
4196         * src/SDCCglue.c (initialComments),
4197         * src/SDCCmain.c (printVersionInfo): modified to write after
4198         version string the version extension number,
4199         * src/SDCCutil.c: included "version.h"
4200         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4201         number,
4202         * src/SDCCutil.h: added prototype for getBuildNumber
4203
4204         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4205         includeDirsSet, too,
4206         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4207         const char [] is found in function prototype...
4208
4209         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4210         moving to WREG with source is already in WREG,
4211         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4212         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4213         * (aopForSym): stack'ed symbols are partially supported, added
4214         if-clause to support symbols in FARSPACE,
4215         * (sameRegs): added test for AOP_ACC to see if registers are same,
4216         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4217         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4218         * (pic16_popRegFromString): will not allocate a new register if it
4219         doesn't find one by name, bug may have introduced...
4220         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4221         * (genIpush): revived to use pic16 port's stack,
4222         * (genAddrOf): added incomplete case for stack'ed operand,
4223         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4224         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4225         can handle multibyte operands,
4226         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4227         * (pic16initialComments): added message for MPLAB compatibility
4228         mode enabled,
4229         * src/pic16/main.h: prototype for pic16_mplab_comp,
4230         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4231         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4232         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4233         because of increased complexity of procedure,
4234         * (_process_pragma): stack pragma changed to format 'stack pos len',
4235         emit symbol '_stack_end' to conform with gplink,
4236         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4237         to search for register,
4238         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4239         PO_GPR_REGISTER,
4240         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4241         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4242         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4243         case for PO_GPR_REGISTER,
4244         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4245         dies, the new era is ahead !...
4246         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4247         pic16_dynInternalRegs,
4248         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4249         * (pic16_allocDirReg): minor optimizations and bug fixes,
4250         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4251
4252         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4253         load stack and frame pointer with address of 'stack_end' symbol
4254
4255 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4256
4257         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4258         without source code but only variable initializers
4259
4260 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4261
4262         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4263         external are not declared as extern to reduce overhead while linking
4264
4265 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4266
4267         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4268
4269 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4270
4271         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4272           Yee Keat for the patch
4273         * src/SDCCast.c (decorateType): fixed bug #979599
4274         * src/ds390/gen.h: removed local fReturnSizeDS390
4275         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4276         * src/ds390/gen.c (genAnd, genOr, genXor),
4277         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4278
4279 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4280
4281         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4282         add relFilesSet to $3, manipulate $2 to handle linking of object
4283         files without source files in command line,
4284         * device/include/pic16 (all headers): added ID location macros,
4285         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4286         entries for ID location bytes,
4287         * (pic16_assignIdByteValue): NEW,
4288         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4289         added field dumpcalltree to pic16_options_t,
4290         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4291         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4292         emitting rFalseIfx label after check_carry label,
4293         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4294         pic16_emitDIRegs), NEW
4295         * (pic16glue): dump .calltree file when option --calltree found,
4296         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4297         * (_pic16_genAssemblerPreamble): emit ID locations after
4298         configuration registers,
4299         * (pic16_linkCmd): modifications of the link command,
4300         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4301         * (pic16_pCodeInitRegisters): don't init stack registers,
4302         * (pic16_findPrevInstruction): fixed bug,
4303         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4304         bug with immediate registers,
4305         * (buildCallTree): traces stack push and pop,
4306         * (pct2): dump also stack usage for each function,
4307         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4308         * (pic16_allocDirReg): various modifications,
4309         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4310         fixed to 1,
4311
4312 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4313
4314         * src/pic16/pcode.c: removed buggy double colon
4315
4316 2004-07-01 Borut Razem <borut.razem AT siol.net>
4317
4318         * support/scripts/sdcc.nsi: added include/pic16 to setup
4319
4320 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4321
4322         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4323         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4324         target 'clean',
4325         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4326         specific command line arguments. Also added sample lkr script
4327         for placing a variable at a specific memory bank.
4328         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4329         at a specific memory bank,
4330         * (pic16_dump_isection): fixed bug which caused string literals to
4331         be omitted when dumping idata section,
4332         * (pic16_groupRegistersInSection): added code to handle registers
4333         in specific memory banks,
4334         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4335         public, all references are renamed too,
4336         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4337         AOP_DPTR2,
4338         * (pic16_storeForReturn): added case to handle when dest is WREG,
4339         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4340         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4341         pic16_rel_udata, check to see if that register is marked as being
4342         a member of a specific memory bank,
4343         * (pic16_printIvalCharPtr): added code to add string literals either
4344         to code or the idata sections,
4345         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4346         also accept the 'udata' pragma,
4347         * src/pic16/main.h: new structure types sectName and sectSym
4348         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4349         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4350         * (pic16_findPrevInstruction): fixed, it returned nothing,
4351         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4352         instruction combinations,
4353         * (pic16_FixRegisterBanking): heavily reorganised,
4354         * (pic16_AnalyzeBanking): if generating banksel directives is
4355         disabled, then don't call FixRegisterBanking at all,
4356         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4357         completely removed,
4358         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4359
4360 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4361
4362         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4363         Phuah Yee Keat <yk.phuah AT nestac.com>
4364
4365 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4366
4367         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4368         correctly the IVT even if it is relocated to some other location
4369
4370 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4371
4372         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4373         * device/include/pic16/pic18f2220.h: NEW,
4374         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4375         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4376         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4377         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4378         nodefaultlibs, ivt_loc is the location of the interrupt vector
4379         table, and nodefaultlibs signs that default libraries should not be
4380         linked in link stage,
4381         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4382         according to --ivt-loc argument,
4383         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4384         when pragma stack is found,
4385
4386 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4387
4388         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4389         256 (range check), 257 (do while), 258.a-f (bit banging
4390         f.e. on 3-wire SPI bus)
4391
4392 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4393
4394         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4395         variables used exclusively within a loop
4396
4397 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4398
4399         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4400
4401 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4402
4403         * src/SDCClrange.c (computeClash): fixed bug #971834
4404
4405 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4406
4407         * src/mcs51/gen.c (genCmp): fixed bug #975903
4408         * src/hc08/gen.c (operandsEqu),
4409         * src/ds390/gen.c (operandsEqu),
4410         * src/z80/gen.c (operandsEqu),
4411         * src/pic/gen.c (operandsEqu),
4412         * src/pic16/gen.c (operandsEqu),
4413         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4414         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4415
4416 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4417
4418         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4419
4420 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4421
4422         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4423         default case in switch statement,
4424         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4425         to eliminate problem with initialisation of pointers, but problem
4426         still exists,
4427         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4428         * (emitStaticSegment): removed various lines emitting debug info,
4429         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4430         added processor registers for utilizing EEPROM,
4431         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4432         configurable and set 8
4433
4434 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4435
4436         * .version: increased version number to 2.4.2,
4437
4438         Cumulative patch for pic16 port
4439         * src/pic16/device.c: changed scheme to dump initial values for
4440         variables in idata segment, all print_idata* functions were removed,
4441         now the pic16_printIval* will be called,
4442         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4443         * _pic16_printPointerType, pic16_printPointerType,
4444         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4445         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4446         NEW, similar to the respective functions in SDCCglue.c,
4447         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4448         way, emitting hex bytes,
4449         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4450
4451 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4452
4453         * src/avr/ralloc.c (serialRegAssign),
4454         * src/xa51/ralloc.c (serialRegAssign),
4455         * src/pic/ralloc.c (serialRegAssign),
4456         * src/pic16/ralloc.c (serialRegAssign),
4457         * src/hc08/ralloc.c (serialRegAssign),
4458         * src/z80/ralloc.c (serialRegAssign),
4459         * src/ds390/ralloc.c (serialRegAssign),
4460         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4461
4462 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4463
4464         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4465         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4466
4467 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4468
4469         Cumulative patch for pic16 port:
4470         * src/pic16/device.h (typedef PIC16_device) modified fields for
4471         defining microcontrollers,
4472         * src/pic16/device.c: added new info for all devices in Pics16 array,
4473         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4474         to be optimised out by the pCode optimiser,
4475         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4476         specially, bug reported by G.M. Gallant,
4477         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4478         as force'd so that cannot be optimised out by pCode optimiser,
4479         * src/pic16/pcode.c,
4480         * src/pic16/pcodepeeph.c,
4481         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4482         they are disabled by default, but can be enabled explicit with
4483         command argument --denable-peeps, for testing,
4484         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4485         --pomit-ivt in COMPILE_FLAGS
4486
4487 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4488
4489         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4490           compilation on MSVC
4491
4492 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4493
4494         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4495
4496 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4497
4498         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4499         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4500
4501 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4502
4503         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4504         would only assign 0x300001 register.
4505
4506 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4507
4508         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4509         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4510
4511 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4512
4513         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4514         for ds80c400
4515         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4516         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4517         added peephole 254 (left shift), 255 (jump table)
4518
4519 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4520
4521         * device/lib/Makefile.in: removed comment line with model-pic16,
4522         * (target port-specific-objects-pic16): the libraries and objects
4523         are copied to the build directory form the device/lib/pic16/bin
4524         directory
4525
4526         Cumulative patch concerning pic16 port:
4527         * library directory has been re-organized,
4528         * added support for PIC18F1220,
4529         * added headers and library sources for chips 18f1220,18f6520,
4530         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4531
4532         * configuration registers setting has changed, now each supported
4533         device has a complete description of the registers it uses,
4534         * all initialisations are moved to idata sections, these section
4535         can be absolute or relocatable,
4536         * fixed initialisation of codespace variables,
4537         * fixed warning about PCLATU and gpsim,
4538         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4539         * (genAssign): use table reads when assigning from variables in codespace,
4540         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4541         char/int variables placed in codespace,
4542         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4543         registers set in .asm file, no need for --pomit-config-words anymore,
4544         * (pic16glue): some 8051 legacy segments are commented out
4545         (to be removed completely),
4546         * added support for alternative assembler and linker with --asm=
4547         and --link= command line arguments,
4548         * peepholes are disabled automatically in the port, no need to
4549         specify on command line,
4550         * port supports natively char/int/long multiplication, but converts
4551         all divisions to support functions,
4552         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4553         to the file set in variable $2,
4554         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4555         strings in ASCII format and not in hex,
4556         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4557         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4558         allocate proper register if iCodes aren't temporary,
4559
4560 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4561
4562         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4563
4564 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4565
4566         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4567         is commented out
4568
4569 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4570
4571         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4572         computed address is reused
4573         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4574         multi-byte bitfields
4575
4576 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4577
4578         * src/z80/gen.c: (genArrayInit): must check for pointers too
4579
4580 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4581
4582         * support/regression/tests/zeropad.c: never meant to commit the
4583           nestedstruct test: removed, added check for GCC version
4584
4585 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4586
4587         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4588         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4589         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4590           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4591           bugs 928906 and 954082 half-empty initializers
4592         * src/SDCCsymt.h,
4593         * src/SDCCsymt.c (getAllocSize): added for above fix
4594         * src/z80/gen.c (genArrayInit): fixed bug 741044
4595         * support/regression/tests/zeropad.c: added tests
4596
4597 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4598
4599         * src/pic16/device.c (pic16_dump_section): corrected bug which
4600         caused some symbols of the libraries to be misplaced
4601
4602 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4603
4604         * src/pic16/glue.c,
4605         * src/pic16/ralloc.h,
4606         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4607         to fix conflict with pic port
4608
4609 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4610
4611         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4612         externs configuration variables,
4613         * src/pic16/ralloc.h,
4614         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4615         prototype in header, commented out some debug messages
4616
4617 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4618
4619         * src/pic16/glue.c,
4620         * src/pic16/main.c,
4621         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4622         for gpasm COFF object generation. Thanks to D. Hawkins for
4623         his patch info
4624
4625 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4626
4627         * src/ds390/main.c,
4628         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4629         Brock for spotting this)
4630         * src/ds390/gen.c (genEndFunction),
4631         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4632         interrupt handler and critical. Disable push/pop optimizations when
4633         peephole optimizations disabled.
4634
4635 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4636
4637         Updated pic16 library sources and headers.
4638         * device/lib/pic16/pic18f*/ ,
4639         * device/include/pic16/*.h: modified to handle structured SFR
4640         definitions
4641
4642 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4643
4644         * src/port.h (PORT structure): added hook initPaths, now each
4645         port can declare its own default search paths,
4646         which can been seen with the --print-search-dirs option,
4647         see pic16 port for example,
4648         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4649         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4650         * (doPrintSearchDirs): NEW, replaces in a central manner the
4651         printing of search dirs which was split in set*Paths functions,
4652         * (main): added call to port->initPaths and doPrintSearchDirs,
4653         * src/avr/main.c,
4654         * src/ds390/main.c,
4655         * src/hc08/main.c,
4656         * src/izt/i186.c,
4657         * src/izt/tlcs900h.c,
4658         * src/mcs51/main.c,
4659         * src/pic/main.c,
4660         * src/pic16/main.c: modified port structures to reflect addition of
4661         initPaths hook,
4662
4663         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4664         * (pic16_dump_section): for registers in same address reserve memory once,
4665         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4666         to no_banksel,
4667         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4668         result is greater in size than right or left,
4669         * (pic16_genUMult8X8_8): there are some cases where the result can
4670         be 16 bits size, so handle these,
4671         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4672         * (pic16_outBitC): modified to emit pcodes,
4673         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4674         or not,
4675         * (genDivOneByte): implemented algorithm to divide 8-bits,
4676         * (genCmp): uncommented goto, but issues still exist,
4677         * (genAnd): fixed a bug with variables >8bits,
4678         * (genPackBits): optimization added that uses BCF/BSF to change a
4679         single bit,
4680         * (genAssign): fixed bug when assigning floating point literals,
4681         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4682         __sdcc_gsinit_startup label,
4683         * src/pic16/main.c (_pic16_init): removed search directory
4684         initialisations,
4685         * (_pic16_initPaths): NEW, used to initialise search directories,
4686         * (_hasNativeMulFor): support functions for all except char/int
4687         multiplication, and char division,
4688         * (PIC16_port struct): modified entry for native mul support,
4689         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4690         no_banksel option,
4691         * (buildCallTree): call to register_usage is ifdef'ed out,
4692
4693 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4694
4695         * device/include/string.h: applied Stas Sergeev's patch to make this
4696         header file compatible with the preprocessor -Wundef option
4697         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4698         failure (fixes bug #941458)
4699
4700 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4701
4702         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4703         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4704         that the variable, not the function, should be static
4705         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4706         to be consistent with non-literal case
4707
4708 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4709
4710         * src/SDCCast.c (isConformingBody): fixed bug #949967
4711         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4712         convilong): fixed bug #952086
4713
4714 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4715
4716         * src/SDCCmem.c (allocVariables): fixed bug #955321
4717
4718 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4719
4720         * src/hc08/main.c (_hc08_genAssemblerEnd),
4721         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4722         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4723         completely eliminated the use of a temporary file
4724         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4725         when more than one file linked
4726         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4727
4728 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4729
4730         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4731         which fixes bug #543481
4732         * support/regression/tests/bug-751703.c: fixed comments left from a
4733         cut and paste error
4734         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4735         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4736         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4737         scopes
4738         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4739         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4740         are now changed to underscores in moduleName
4741
4742 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4743
4744         * as/mcs51/lkmem.c: better fix for bug #954173
4745
4746 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4747         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4748
4749         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4750         * device/include/c8051f000.h,
4751         * device/include/c8051f120.h,
4752         * device/include/c8051f300.h,
4753         * device/include/c8051f310.h,
4754         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4755         PWM16) and detab'ed
4756
4757 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4758
4759         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4760         and mailing lists, doc'ed --no-peep-comments, removed reference
4761         to knoppix (newest version has no LyX/LaTeX), other minor changes
4762         * src/SDCCglue.c (glue): save 2 bytes stack space with
4763         option --main-return. The ljmp could probably be avoided too
4764
4765 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4766
4767         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4768
4769 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4770
4771         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4772         * src/SDCCopt.c (isLocalWithoutDef),
4773         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4774         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4775         (credit to Maarten Brock for patch #949363, on which this is based)
4776         * support/regression/tests/bug-751703.c: some test cases of extern used
4777         within inner scopes.
4778
4779 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4780
4781         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4782         SPEC_STRUCT
4783         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4784         struct definitions
4785         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4786         dwWriteLabel): fix to create valid debugger symbols even when
4787         the module name has non-alphanumeric symbols in it
4788         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4789         when a variable's allocation has been optimized away
4790
4791
4792 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4793
4794         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4795         * src/hc08/main.c,
4796         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4797         * src/mcs51/main.c,
4798         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4799         * src/ds390/main.c,
4800         * src/z80/gen.c (z80_emitDebuggerSymbol),
4801         * src/z80/main.c,
4802         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4803         * src/pic/main.c,
4804         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4805         * src/pic16/main.c,
4806         * src/avr/gen.c (avr_emitDebuggerSymbol),
4807         * src/avr/main.c,
4808         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4809         * src/xa51/main.c,
4810         * src/SDCCdebug.c (emitDebuggerSymbol),
4811         * src/SDCCdebug.h,
4812         * src/port.h: added a debugger struct to the port struct. Added a
4813         callback for defining debugger symbols
4814
4815         * src/SDCCast.c (createLabel),
4816         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4817         with isitmp = 1
4818         * src/SDCCicode.h,
4819         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4820         iCode back to the ast for the function
4821
4822         * src/hc08/ralloc.c (hc08_assignRegisters),
4823         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4824         unneeded fields from the regs struct.
4825         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4826         pushReg() & pullReg() functions instead of emitcode()
4827
4828         * src/hc08/gen.c (genLabel, genhc08Code),
4829         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4830
4831         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4832         debugger hooks
4833
4834         * src/hc08/gen.c (genEndFunction, genhc08Code),
4835         * src/hc08/gen.h,
4836         * src/mcs51/gen.c (genEndFunction, gen51Code),
4837         * src/mcs51/gen.h,
4838         * src/ds390/gen.c (genEndFunction, gen390Code),
4839         * src/ds390/gen.h,
4840         * src/z80/gen.c (genEndFunction, genZ80Code),
4841         * src/z80/gen.h,
4842         * src/z80/z80.h,
4843         * src/pic/gen.c (genEndFunction, genpic14Code),
4844         * src/pic/gen.h,
4845         * src/pic16/gen.c (genEndFunction, genpic16Code),
4846         * src/pic16/gen.h,
4847         * src/avr/gen.c (genEndFunction, genAVRCode),
4848         * src/avr/gen.h,
4849         * src/xa51/gen.c (genEndFunction, genXA51Code),
4850         * src/xa51/gen.h,
4851         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4852         specific code to cdbFile.c and out of the backend code generators
4853
4854         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4855         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4856         starting address is now 0
4857
4858         * as/hc08/asm.h,
4859         * as/hc08/m08pst.c,
4860         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4861         assembler directive for DWARF support
4862         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4863
4864         * src/src.dsp,
4865         * src/Makefile.in,
4866         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4867
4868 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4869
4870         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4871         and inappropriate peephole optimization in jump tables
4872
4873 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4874
4875         * as/hc08/m08pst.c,
4876         * src/SDCCglue.c: sdccopt works for the hc08 port now
4877
4878 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4879
4880         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4881
4882 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4883
4884         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4885
4886 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4887
4888         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4889         rules
4890         * src/SDCCmain.c,
4891         * src/SDCCglobl.h,
4892         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4893         comments from the peephole optimizer replacement rules
4894         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4895         symbols
4896         * src/SDCCcse.c (updateSpillLocation),
4897         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4898         equivalents
4899         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4900         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4901         objects far pointers
4902
4903 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4904
4905         * src/SDCCsymt.h: a missing part of my last change
4906         * src/pic/ralloc.c (regTypeNum),
4907         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4908
4909 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4910
4911         * src/SDCCicode.h,
4912         * src/SDCCicode.c (aggrToPtrDclType),
4913         * src/SDCCptropt.h,
4914         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4915         ptrPseudoSymConvert),
4916         * src/pic/ralloc.c (regTypeNum),
4917         * src/pic16/ralloc.c (regTypeNum),
4918         * src/hc08/ralloc.c (regTypeNum),
4919         * src/ds390/ralloc.c (regTypeNum),
4920         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4921         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4922
4923 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4924
4925         * link/z80/lkmain.c (afile),
4926         * as/hc08/lkmain.c (afile),
4927         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4928         prevent a pointer problem when a filename has no directory and
4929         no extension specified.
4930
4931 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4932
4933         * link/z80/lkmain.c (afile): allow periods in directory names
4934         * link/z80/lkmain.c (afile),
4935         * as/mcs51/lkmain.c (afile),
4936         * as/hc08/lkmain.c (afile): allow linker script file to have an
4937         extension other than ".lnk"
4938         * link/z80/lklex.c (getfid),
4939         * link/z80/lkmain.c (parse),
4940         * as/mcs51/lklex.c (getfid),
4941         * as/mcs51/lkmain.c (parse),
4942         * as/hc08/lklex.c (getfid),
4943         * as/hc08/lkmain.c (parse): Support comments in the linker script
4944         file on lines by themselves and after filenames
4945
4946 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4947
4948         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4949
4950 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4951
4952         * src/z80/peeph-z80.def: removed some peephole rules that don't
4953         work with multibyte arithmetic (fixed bug #937126)
4954         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4955         to registers and not global variables
4956         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4957         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4958         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4959         checking for assignments not internally generated (fixed bug #931895)
4960         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4961         structure member (fixed bug #930072)
4962
4963 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4964
4965         * src/SDCCmain.c (linkEdit),
4966         * src/hc08/main.c (_hc08_parseOptions),
4967         * as/hc08/Makefile.in,
4968         * as/hc08/aslink.h,
4969         * as/hc08/asm.h,
4970         * as/hc08/m08pst.c,
4971         * as/hc08/lkrloc.c (relr, rele),
4972         * as/hc08/lkarea.c (lnkarea)
4973         * as/hc08/lkmain.c (afile, parse),
4974         * as/hc08/lkelf.c: support for ELF output
4975         * as/hc08/lks19.c (s19),
4976         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4977
4978 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4979
4980         * as/mcs51/lkihx.c: Fixed bug #899105.
4981
4982 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4983
4984         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4985         .dsp files from Unix to DOS.
4986
4987 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4988
4989         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4990         function pointers; we have been compliant for several months now.
4991         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4992         change that was accidently commented out
4993         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4994         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4995         bug #922319
4996
4997 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4998
4999         * src/hc08/gen.c: output of all of the internal debugging information
5000         is now controlled by the D() macro; it is disabled by default
5001
5002 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5003
5004         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5005         harder to keep the same registers during a CAST iCode
5006         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5007         long via int can be done in a single cast, if the signedness is
5008         correct.
5009         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5010         putchar() in tinibios.c in ds390's library
5011
5012 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5013
5014         * src/SDCCast.c (decorateType): fixed bug #898889,
5015         cast result of a literal complement too
5016         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5017         fixed check for bitfields
5018
5019 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5020
5021         * src/SDCCicode.c (geniCodeLogic): made it static,
5022         (geniCodeLogicAndOr): added in order to fix bug #905492,
5023         (ast2iCode): fixed bug #905492
5024         * support/regression/tests/bug-905492.c: added
5025         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5026         (processParms): fixed bug #927659: don't copy parms, this will clear
5027         decorated flag
5028         * support/regression/tests/bug-927659.c: added
5029
5030 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5031
5032         * src/SDCCast.c (addCast): don't cast float to char
5033         * device/lib/libsdcc.lib: added _memmove
5034
5035 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5036
5037         * device/lib/large/Makefile: fixed parallel execution by
5038         replacing `make` by `$(MAKE)`
5039
5040 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5041
5042         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5043         offsets (fixes bug #923936)
5044
5045 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5046
5047         * device/lib/small/Makefile: fixed parallel execution by
5048         replacing `make` by `$(MAKE)`
5049
5050 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5051
5052         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5053
5054 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5055
5056         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5057         * src/regression/Makefile: Regression test was not running.
5058
5059 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5060
5061         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5062         complement if possible
5063         * src/SDCCval.c (valComplement),
5064         * src/SDCCicode.c (operandOperation): fixed complement of literal
5065         * support/regression/tests/onebyte.c (testComplement): added
5066
5067 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5068
5069         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5070         return an optimized tree; actually replace actParm with the new tree
5071         * src/SDCCast.h: added some parantheses to remove side effects
5072         * support/regression/tests/bug-920866.c
5073
5074 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5075         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5076         Bit operands were not being handled properly in the pic14 port.
5077         (now src/regression/add.c passes again).
5078
5079 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5080
5081         * src/SDCC.y (labeled_statement): case and default no longer require
5082         a following statement (RFE #893037)
5083
5084 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5085
5086         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5087         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5088         disabled (fixes bug #916294)
5089         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5090         "mov a,acc"; patch provided by Lenny Story
5091         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5092
5093 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5094
5095         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5096         functions
5097         * src/ds390/gen.c (genFunction, genEndFunction),
5098         * src/ds390/ralloc.c (ds390_assignRegisters),
5099         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5100         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5101         pushed if there are parameters passed on the stack. Also, a cleaner
5102         way to decide if r0/r1 should be pushed/popped. (Together they fix
5103         bug #918693)
5104
5105 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5106
5107         * doc/sdccman.lyx,
5108         * device/lib/mcs51/crtpagesfr.asm,
5109         * device/lib/mcs51/crtxinit.asm,
5110         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5111         to avoid confusion with Si Lab's SFRPAGE register.
5112
5113 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5114
5115         * src/SDCCglue.c (emitMaps): allow public sfr variables
5116         * src/SDCCglue.c (initialComments): include compiler build date
5117         with compiler version and put the timestamp of the generated
5118         assembly file on a serperate line to be less confusing.
5119         * src/port.h: added genInitStartup hook
5120         * src/avr/main.c,
5121         * src/ds390/main.c,
5122         * src/hc08/main.c,
5123         * src/pic/main.c,
5124         * src/pic16/main.c,
5125         * src/xa51/main.c,
5126         * src/z80/main.c: genInitStartup initialize as NULL (default to
5127         historical behaviour)
5128         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5129         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5130         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5131         library instead of hard coding it into the compiler.
5132         * support/regression/ports/mcs51-stack-auto/spec.mk,
5133         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5134         * device/lib/mcs51/Makefile,
5135         * device/lib/small/Makefile,
5136         * device/lib/large/Makefile,
5137         * device/lib/mcs51/crtpagesfr.asm,
5138         * device/lib/mcs51/crtstart.asm,
5139         * device/lib/mcs51/crtxclear.asm,
5140         * device/lib/mcs51/crtxinit.asm,
5141         * device/lib/mcs51/crtclear.asm,
5142         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5143         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5144         and into user configurable files.
5145         * device/lib/clean.mk: clean mcs51 directory too
5146         * support/regression/tests/longlit.c: added static to T1 declaration
5147         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5148         accesses in the initialization code
5149
5150 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5151
5152         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5153         OSCTRIMVAL as noted in bug #916008
5154
5155 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5156
5157         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5158         in loops with multiple exits (reported as incorrect registers
5159         used by Martin Helmling in Sdcc-user list)
5160
5161 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5162
5163         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5164         made ds390 register extensions look less like error messages
5165
5166 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5167
5168         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5169         reported by Adam Wozniak in Sdcc-user list
5170
5171 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5172
5173         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5174         arithmetic optimizations, added debug output
5175
5176 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5177
5178         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5179         * sdcc.spec: updated and split sdcc into 3 rpms
5180         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5181         needed for literals of LEFT_OP and '+'
5182         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5183         introduced RESULT_TYPE_NOPROM
5184         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5185         left shift
5186         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5187         limited promotion to int only for '*'
5188         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5189
5190 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5191
5192         * src/pic16/gen.c (genSkip),
5193         (genc16bit2lit), (gencjneshort): commented out
5194         (is_LitOp): new helper function, checks operand type
5195         (genCmpEq): rewritten
5196
5197 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5198
5199         * support/regression/tests/bug-908454.c: added
5200
5201 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5202
5203         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5204         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5205         (geniCodeCast): cosmetic, don't preserve bit storage class
5206         (geniCodeLeftShift): added promotion
5207         (geniCodeLogic): fixed regression
5208         * src/SDCCsymt.c (computeTypeOr): accept bits too
5209         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5210
5211 2004-03-07  Borut Razem <borut.razem AT siol.net>
5212
5213         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5214
5215 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5216
5217         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5218         version of pic16_genPackRegisters which does not check if ic is a
5219         CAST operator,
5220         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5221         function cause string1.c regression test fails
5222
5223 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5224
5225         * sim/ucsim/configure.in,
5226         * sim/ucsim/configure,
5227         * sim/ucsim/doc/Makefile.in: use docdir
5228         * src/SDCC.y: fixed sbit atrributes
5229         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5230         * src/SDCCast.c (decorateType): |^& need special promotion handling
5231         * src/SDCCast.h,
5232         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5233         * src/SDCCsymt.h (computeType),
5234         * src/SDCCicode.c: computeType() needs op
5235         * src/SDCCsymt.c (checkTypeSanity),
5236         * doc/sddman.lyx: "plain" bitfields are unsigned
5237         * src/SDCCsymt.c (computeTypeOr): added
5238         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5239         |^& ops
5240         * src/SDCCval.c (val*): computeType() needs op
5241         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5242         * support/regression/tests/onebyte.c: added tests for |^&
5243
5244 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5245
5246         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5247         for writing icode into asm output.
5248
5249 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5250
5251         * src/pic16/device.c: added some debug lines enabled
5252         with macro DEBUG_CHECK,
5253         * src/pic16/genarith.c: more debug in genPlus,
5254         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5255         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5256         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5257         * (aopForSym): onStack symbols are re-placed in data memspace,
5258         and onStack flag is cleared,
5259         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5260         copy temporary pcodeop,
5261         * (genPcall): added warning for not updating PCLATU,
5262         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5263         always true for pic16 port,
5264         * (genMultOneWord): NEW, supports integer multiplication,
5265         * (genMult): modified to call genMultOneWord,
5266         * (ifxForOp): added warning when return NULL,
5267         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5268         flag is set before call to operandFromSymbol for implicit
5269         added structures,
5270         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5271         options.intlong_rent are set by default,
5272         * (_hasNativeMulFor): modified to allow port generation of integer
5273         multiplication,
5274         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5275         set regtype to REG_SFR for all registers, restricting seting the
5276         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5277
5278 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5279
5280         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5281         more than 500 times in the regression tests
5282
5283 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5284
5285         * support/Util/SDCCerr.h,
5286         * support/Util/SDCCerr.c,
5287         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5288         enumerator_list),
5289         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5290         for symbol conflicts.
5291         * support/valdiags/tests/enum.c,
5292         * support/valdiags/tests/tentdecl.c,
5293         * support/valdiags/tests/struct.c: expect possible error messages
5294         referring to original symbol definitions.
5295         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5296         * src/SDCCsymt.h,
5297         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5298
5299 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5300
5301         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5302
5303 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5304
5305         * src/pic16/ralloc.c (newReg): fixed bug #908929
5306
5307 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5308
5309         * src/ds390/gen.c: added missing #include "main.h"
5310
5311 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5312
5313         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5314         checking if symbol is already in set,
5315         * src/pic16/device.h: prototype for checkAddSym,
5316         * src/pic16/gen.c: (_G): added entry interruptvector,
5317         * (assignResultValue): removed some commented out lines,
5318         * (genFunction): check for ISR via sym->type, absolute section for
5319         interrupt code is created via a new pBlock, the goto instruction is
5320         placed now correctly at the interrupt vector position, changed all
5321         references from ivec to _G.interruptvector,
5322         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5323         is the interrupt is a high priority one, same for return from ISR,
5324         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5325         externs to calls of checkAddSym,
5326         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5327         pic16_pcode_verbose flag is set,
5328         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5329         * src/pic16/pcoderegs.c: message about how many registers are saved
5330         will only be emitted if pic16_pcode_verbose flag is set,
5331
5332 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5333
5334         * src/ds390/ralloc.h,
5335         * src/ds390/ralloc.c (ds390_regWithIdx),
5336         * src/ds390/gen.c (emitcode),
5337         * src/ds390/main.h,
5338         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5339         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5340         ds390operandCompare, getRegsRead, getRegsWritten,
5341         initializeAsmLineNode): customized instruction size calculation for
5342         ds390, started basis for some register optimizations
5343         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5344         corresponding assembly output
5345         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5346         missing push/pop of r0/r1. Optimized push/pops
5347
5348 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5349
5350         * src/mcs51/main.c (instructionSize): fixed ACALL size
5351         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5352
5353 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5354
5355         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5356         the sorting of rlist with NULL elements
5357         * (print_idataType, print_idata): NEW to create idata sections
5358         * src/pic16/device.h: idataSymSet new variable
5359         * src/pic16/gen.c (genFunction): fixed some bugs in string
5360         comparing, improved the absolute section creation for ISRs,
5361         added FSR0L/FSR0H in registers that are saved in an ISR,
5362         * (genInline): fixed the processing of inline snippets,
5363         now they undergo no process by the peephole optimizer
5364         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5365         are placed in idataSymSet,
5366         * (pic16emitStaticSeg): extern symbols are added in externs,
5367         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5368         switching when aboslute variables are placed in access bank memory
5369         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5370         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5371         commented out with #if,
5372         * (pic16_packRegisters): reintroduce the check for CAST because some
5373         symbols are not correctly handled,
5374         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5375         pCodeInstruction instead of pCode,
5376         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5377         pCodeAsmDir definition,
5378         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5379         directive, then the argument directive is emitted without the leading
5380         tab, hack for inline labels which must be in the first column,
5381         * (compareLabel,pic16_findNextInstruction),
5382         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5383         * (insertBankSwitch): modified for the new pCodeAsmDir,
5384
5385 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5386         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5387
5388         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5389         instance,
5390         * (pushSide): commented out with #if,
5391         * (assignResultValue): fixed some typos in saving
5392         registers,
5393         * (genPcall): FIXED and sync'ed with genCall,
5394         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5395         * (genNearPointerGet): fixed to handle some more cases,
5396         implementation scheme via table reads,
5397         * (genConstPointerGet): modified to access code memory correct,
5398         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5399         and improved to handle some cases
5400         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5401         instead of "RETLW" for init data
5402         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5403         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5404         variables are placed in access bank memory (<0x80 and >=0xf80),
5405         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5406         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5407         TBLWT_POSTDEC,TBLWT_PREINC
5408         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5409         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5410         directives
5411         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5412         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5413         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5414         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5415
5416 2004-02-29  Borut Razem <borut.razem AT siol.net>
5417
5418         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5419         support/Util/findme.h, support/Util/system.h: enhance binary relative
5420         search for lib and include by using findProgramPath()
5421
5422 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5423
5424         * src/SDCCpeeph.h,
5425         * src/SDCCpeeph.c (pcDistance),
5426         * src/port.h,
5427         * src/mcs51/ralloc.h,
5428         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5429         * src/mcs51/main.h,
5430         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5431         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5432         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5433         size calculation port specific, started basis for some register
5434         optimizations
5435         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5436         missing push/pop of r0/r1. Optimized push/pops
5437         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5438         * device/lib/_modsint.c (_modsint),
5439         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5440         and stack version so regression tests pass
5441
5442 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5443
5444         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5445         * src/SDCCast.c (decorateType): catch another small optimization
5446         with '?' operator
5447         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5448         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5449         modified to finally use computeType() all over SDCC,
5450         see Feature Request #877103
5451         * src/SDCCval.h: cosmetic
5452         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5453         valCompare(); regression tested in muldiv.c
5454         * support/regression/tests/muldiv.c (testMod): mod sign follows
5455         dividend only
5456
5457 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5458
5459         * src/SDCCast.c (decorateType): fixed bug #902362
5460         * doc/INSTALL.txt: fixed install instructions for win32
5461
5462 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5463
5464         * device/include/Makefile.in (install): fixed by replacing spaces
5465         by tabs
5466         * doc/README.txt,
5467         * doc/INSTALL.txt: updated for release
5468         * doc/sdccman.lyx: added warning for --xstack being buggy
5469
5470 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5471
5472         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5473         to eliminate build warnings.
5474         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5475
5476 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5477            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5478
5479         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5480         removed -penable-stack, added comment for stack pragma, added
5481         warning for not initializing the stack/frame registers, removed
5482         comment at interrupts section
5483
5484         Stack is made permanent, there is no ability to disable stack usage.
5485         * src/pic16/device.h,
5486         * src/pic16/device.c: removed all references to USE_STACK macro,
5487         * src/pic16/device.c (pic16_dump_section): when no elements in
5488         rlist, free rlist before return,
5489         * (pic16_dump_int_registers): NEW, internal registers are a new set
5490         of general purpose registers reused by each function,
5491         * (checkAddReg): returns 1 if registers is added to set,
5492         * (pic16_groupRegistersInSection): when a registers is of type
5493         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5494         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5495         SRCASECMP macro is moved here from device.c
5496         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5497         PO_PCLATU, PO_PRODL, PO_PRODH,
5498         * (pic16_pCodeOpType, genMinus,
5499         changed compares to "a" register, with AOP_ACC,
5500         * (pic16_genPlus): fixed some bugs and indented properly,
5501         * (pic16_addSign): changed size to size+offset in the MOVWF
5502         instruction,
5503         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5504         multiply 8-bit operand by literal, result is 8-bit,
5505         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5506         multiply 2 8-bit operand, result is 8-bit,
5507         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5508         genUMult8X*_16,
5509         * src/pic16/gen.c: changed accUse to contain WREG only,
5510         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5511         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5512         true, do not use immediate addressing any more unless sym is a
5513         pointer in codespace,
5514         * (aopForRemat): do not use immediate addressing when symbol not in
5515         codespace and when symbol's address is requested,
5516         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5517         accUse size (= 1),
5518         * (aopGet): added case for AOP_ACC and don't return "accumulator
5519         bug" but WREG instead,
5520         * (popGetTempReg): pushes contents of temporary register in stack,
5521         * (popReleaseTempReg): pops contents of temporary register from
5522         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5523         * (pic16_popGet): separated case AOP_ACC to return register WREG
5524         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5525         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5526         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5527         the use of immediate pointers to certain cases only.
5528
5529         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5530         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5531         * (assignResultValue, genCall, genRet): modified to use the new
5532         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5533         genPcall is still broken,
5534         * (genFunction): added code to create 'A' type pBlocks when
5535         interrupt functions are generated, code not extensively tested yet,
5536         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5537         * (genEndFunction): modified so ISRs pop stored registers from stack,
5538         * (genMultOneByte): cleanup,
5539         * (AccRsh): added flag andmask, to and result with appropriate mask,
5540         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5541         * (genDataPointerGet): fixed and reenabled its use,
5542         * (genNearDataPointerGet): bugs fixed,
5543         * (genDataPointerSet): bugs fixed,
5544         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5545         pic16_DumpSymbol, pic16_DumpOp,
5546         * src/pic16/genutils.h: function prototypes for the above functions,
5547         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5548         pointers,
5549         * (pic16emitRegularMap): many many many improvements, but needs a
5550         major cleanup,
5551         * src/pic16/main.c: enable_stack in pic16_options is removed,
5552         * (_pic16_parseOptions): removed command line options -penable-stack,
5553         * (_process_pragma): emit stack symbol only when stack pragma is
5554         processed,
5555         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5556         redirected to FSR0L/FSR0H pair,
5557         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5558         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5559         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5560         for immediates,
5561         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5562         * (dumpPicOptype): NEW,
5563         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5564         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5565         with movff instruction,
5566         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5567         added pic16_int_regs, some packRegsFor* functions are commented out,
5568         because produce errors,
5569         * src/pic16/NOTES: minor modifications
5570
5571 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5572
5573         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5574         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5575         --pack-iram.
5576         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5577         * as/mcs51/lkaomf51.c: fixed bug #895763
5578
5579 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5580
5581         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5582
5583 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5584
5585         * doc/sdccman.lyx: added details about the HC08 storage classes and
5586         interrupts, fixed the register usage info for z80 & gbz80
5587
5588 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5589
5590         * doc/sdccman.lyx: added more pic16 port documentation
5591         * device/include/pic16/: added header pic18fregs.h
5592
5593 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5594
5595         * doc/sdccman.lyx: added Vangelis' contribution
5596
5597 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5598
5599         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5600         extend to the next CALL or PCALL, not just to the next CALL.
5601
5602 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5603
5604         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5605
5606 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5607
5608         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5609         bug #895752 and a better fix for bug #716790
5610
5611 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5612
5613         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5614
5615 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5616
5617         * doc/sdccman.lyx: minor changes, minor changed
5618
5619 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5620
5621         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5622         which can't handle SDCC_NEWONEBYTEOPS,
5623         (geniCodeMultiply): removed conversion from mult to shift for pic14
5624         and pic16
5625
5626 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5627
5628         * src/hc08/gen.h,
5629         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5630         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5631         thus fixing bug #895406
5632
5633 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5634
5635         * device/lib/_modsint.c,
5636         * device/lib/_modslong.c: sign follows divisor only
5637         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5638         signs or signedness can be ignored
5639         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5640         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5641         added optimization for IFX,
5642         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5643         arguments;
5644         reenabled optimization for IFX, which was removed on 2004-01-11
5645         * src/SDCCast.h: added return type IFX
5646         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5647         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5648         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5649         SDCC_OLDONEBYTEOPS selects the old behaviour
5650         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5651         changed again and commented promotion rule
5652         * src/SDCCval.c (valDiv): promotion no longer necessary
5653         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5654         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5655         rewritten
5656         * support/regression/tests/onebyte.c: added
5657
5658 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5659
5660         * gen.c (genInline): reverted to old code for assemnling inline
5661         code because of bug reported James Chadd
5662
5663 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5664
5665         * ralloc.h: missing declarations from previous patch,
5666         seems that patch for ralloc.h was never applied, fixed
5667
5668 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5669            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5670
5671         * pcode.c,
5672         * pcode.h,
5673         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5674         indirect addressing. Marked FSR0 as deprecated
5675         * gen.c (pointerCode): commented out, not needed now
5676         (pic16_popGet2p): new MOVFF helper function
5677         (genGenPointerGet),
5678         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5679         (shiftRLong): removed duplicate debugging info
5680
5681 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5682
5683         * src/ds390/gen.c (genNearPointerGet),
5684         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5685         optimization with bits, but not bitfields.
5686         * src/ds390/ralloc.c (packRegisters),
5687         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5688
5689 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5690
5691         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5692
5693 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5694
5695         * src/SDCCsymt.h,
5696         * src/SDCCicode.c (operandFromSymbol),
5697         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5698         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5699         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5700         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5701         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5702         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5703         bug #892038
5704         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5705         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5706         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5707         * src/SDCCsymt.c (newSymbol),
5708         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5709         enumerator_list),
5710         * src/SDCCval.h,
5711         * src/SDCCval.c (newiList): fixed bug #885705
5712
5713 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5714
5715         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5716         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5717
5718 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5719
5720         * device/include/c8051f120.h,
5721         * device/include/c8051f300.h,
5722         * device/include/c8051f310.h: added/updated header files for Silicon
5723         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5724         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5725         in new section Submitting patches
5726
5727 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5728
5729         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5730         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5731         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5732         genGenPointerSet),
5733         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5734         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5735         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5736         genGenPointerSet),
5737         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5738         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5739         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5740         genGenPointerSet),
5741         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5742         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5743         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5744         genGenPointerSet): fixed bug #892400
5745         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5746         to eliminate build warnings.
5747         * src/SDCCast.c (processParms),
5748         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5749         fixed bug 751859
5750         * support/valdiag/valdiag.py: added GCC to the list of defines active
5751         when compiling with gcc
5752
5753 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5754
5755         * support/Util/SDCCerr.h,
5756         * support/Util/SDCCerr.c,
5757         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5758         with an incomplete type (fixed bug #883734)
5759         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5760
5761 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5762
5763         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5764
5765 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5766
5767         * src/SDCCast.c (decorateType),
5768         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5769         function pointer implementation
5770         * support/regression/tests/funptrs.c: added tests to verify both forms
5771         of function pointers work correctly. Added tests to verify parameters
5772         are passed in the correct order.
5773
5774 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5775
5776         * device.c (regCompare): registers are sorted by ascending
5777         address and increasing size,
5778         * main.c (_pic16_finaliseOptions): removed the declaration
5779         of compiler macro MCU. Now a macro of the format pic18fxxxx
5780         will be defined from the command line
5781
5782 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5783             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5784
5785         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5786         PCOP_RLCF was overwritten!
5787         * gen.c (genSkip): commented out calls to pic16_emitcode,
5788         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5789         * (genlshTwo),
5790         * (genRRC): added debugging info,
5791         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5792         overwritten while shifting,
5793         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5794         overwritten while shifting,
5795         * (AccLsh),
5796         * (AccRsh),
5797         * (shiftLLeftOrResult),
5798         * (shiftRLeftOrResult),
5799         * (shiftRLong),
5800         * (shiftLLong): Implemented with pic16_emitpcode
5801         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5802         * (genLeftShift): Fixed bug, operand for shift by variable always
5803         was "and"ed with 0x0f,
5804         * (genLeftShiftLiteral),
5805         * (genrshTwo),
5806         * (genRightShiftLiteral): added debugging info,
5807         * (genrshFour): added comment,
5808         * (genRightShift): determined signedness from operand "left"
5809         instead of "result"
5810
5811 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5812
5813         * src/SDCCicode.c (geniCodeParms),
5814         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5815         function pointers, fixed function pointer bugs #861242 and #861896
5816
5817 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5818
5819         * device/include/c8051f000.h,
5820         * device/include/c8051f120.h,
5821         * device/include/c8051f300.h: added header files for Silicon
5822         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5823
5824 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5825
5826         * src/SDCCast.c (processParams): added new type flow and restructured
5827         (gatherAutoInit): added new type flow
5828         (addCast): cosmetic changes
5829         (getLeftResultType): added new type flow for array indices, patch
5830         provided by Stas, see FR #877103
5831         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5832         array index patch by Stas
5833         * src/SDCCast.h: added prototype getResultTypeFromType()
5834         * src/SDCCval.h,
5835         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5836         * src/pic/glue.c (pic14emitStaticSeg),
5837         * src/pic16/glue.c (pic16emitStaticSeg),
5838         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5839         for initialization of symbols
5840         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5841         * support/Util/SDCCerr.h:
5842         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5843         * .version: bumped version number to 2.3.8
5844         * device/include/Makefile.in (install),
5845         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5846         avoid warnings
5847
5848 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5849
5850         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5851         Slade Rich fixed an optimization bug
5852         * src/pic/pcodepeep.c,
5853         * src/pic/pcoderegs.c
5854         * doc/Makefile (install): added test for directory
5855
5856 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5857
5858         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5859         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5860         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5861         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5862         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5863         * as/mcs51/asexpr.c (term),
5864         * as/hc08/asexpr.c (term): fixed bug #887146
5865
5866 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5867
5868         * src/z80/gen.c (genMult): handle single byte result product
5869         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5870         DUMMY_READ_VOLATILE (fixed bug #886367)
5871
5872 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5873
5874         * support/regression/tests/libmullong.c: fixed logic, on little endian
5875         hosts we ended without a mullong_wrapper()
5876
5877 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5878
5879         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5880         virus/worm forged address usage.
5881
5882 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5883
5884         Fixed promotion, it should be done on AST level:
5885         * src/SDCCast.c (addCast): added promotion to int
5886         (decorateType): updated call to upCast()
5887         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5888         usualUnaryConversions()
5889
5890 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5891
5892         * support/regression/tests/literalop.c (mulWrapper): Added a
5893         wrapper to remove integer overflow warnings.
5894
5895         * support/regression/tests/float_trans.c: Made work on host.
5896
5897         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5898         location of sz80.
5899
5900         * support/regression/generate-cases.py (main): Changed from inline
5901         to a main method.
5902
5903         * doc/Makefile (install): Changed to depth first to get rid of
5904         missing directory install warning.
5905
5906         * as/Makefile (install-doc): Made work on Mac.
5907
5908 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5909
5910         * src/SDCCast.c: added an additional type flow in decorateType() of
5911         opposite direction, see feature request #860006; it's enabled at runtime
5912         by setting the environment variable SDCC_NEWTYPEFLOW
5913         * src/SDCCast.h: changed prototype of decorateType()
5914         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5915         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5916         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5917         see feature request #877103
5918         * src/SDCCval.c: updated call of decorateType()
5919         (valBitwise): fixed bug #882876
5920         (valMinus): added promotion
5921         (valLogicAndOr): result is unsigned
5922         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5923         * src/SDCCsymt.c (computeType),
5924         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5925         must not cause an unsigned operation
5926         * src/pic/glue (pic14emitRegularMap),
5927         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5928
5929 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5930
5931         * src/pic/pcode.c (PCodeID): commented out left over debug code
5932
5933 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5934
5935         * support/valdiag/tests/overflow.c: added shift tests
5936         * src/pic/device.c,
5937         * src/pic/gen.c,
5938         * src/pic/gen.h,
5939         * src/pic/glue.c,
5940         * src/pic/main.c,
5941         * src/pic/pcode.c,
5942         * src/pic/pcode.h,
5943         * src/pic/pcodepeep.c,
5944         * src/pic/pcoderegs.c,
5945         * src/pic/ralloc.c,
5946         * src/pic/ralloc.h: applied patch from Slade Rich;
5947         added support for multiple code pages and multiple RAM banks on the
5948         PIC 14 port. The ASM files now no longer simply assume all the
5949         code / RAM are in the same page / bank. This means the linker can
5950         safely allocate code/RAM of separate ASM files to different pages/banks.
5951         * doc/sdccman.lyx: added Slade's tips
5952         * src/mcs51/peeph.def: fixed bug #880768
5953
5954 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5955
5956         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5957         * src/SDCCast.c (decorateType): fixed bug #880197
5958
5959 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5960
5961         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5962         getopt.h.
5963
5964         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5965         strtof is not part of C89 and isn't included with Mac OS X.
5966
5967 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5968
5969         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5970         shiftL2Left2Result): fixed bug #879326
5971         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5972         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5973         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5974         address fetch for clr instruction
5975         * device/lib/hc08/_mulint.c: created optimized assembly version
5976         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5977
5978 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5979
5980         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5981         proposed in FR #877103
5982
5983 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5984
5985         * src/SDCCval.c (cheapestVal): added missing checks
5986         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5987         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5988
5989 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5990
5991         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5992         equal operands
5993
5994 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5995
5996         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5997         loaded with the linker search paths (-L arguments) and the libraries
5998         to be linked with the current source (-l arguments). Changes
5999         currently will affect only the pic16 port.
6000         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6001         include path the port specific paths and port specific libraries,
6002         * gplink command now contains the $3 argument,
6003         * src/pic16/device.h,
6004         * src/pic16/device.c,: structure PIC_device is made public and
6005         renamed to PIC16_device, the same for variable Pics which is renamed
6006         to Pics16. Updated all references to them.
6007         * src/pic16/glue.c (pic16glue): corrected bug with code
6008         initialization which bypassed the variable initializations block.
6009
6010         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6011         COMPILE_FLAGS and added the --nostdinc option
6012
6013 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6014
6015         * device/include/mc68hc908jb8.h: Register defs for another member
6016         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6017
6018 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6019
6020         Documenting changes from previous commits.
6021         * configure.in (version 1.56),
6022         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6023         when generating output files to configure the pic16 library,
6024         but now I've commented it out, since gputils aren't installed in the
6025         SF compile farm, so library won't compile
6026
6027         * device/lib/Makefile.in (version 1.56): initially I've added in
6028         target 'all' the prerequestive 'model-pic16' so it compiled the
6029         pic16 library, but now I've commented it out for the same reasons
6030         above,
6031         * added targets 'model-pic16' and 'objects-pic16' to compile the
6032         library
6033         * added target 'port-specific-objects-pic16' to handle the
6034         generated libraries and copy them into the build/ directory
6035         * added target 'clean-intermediate-pic16' to clean intermediate
6036         files into pic16 directory
6037         * in target 'installdirs' added line to create directory pic16 in
6038         the installation path
6039
6040         * device/include/Makefile.in (version 1.11): in target 'install'
6041         added lines to copy all header files to installation path,
6042         * in target 'installdirs' added line create directory for pic16
6043         headers in the installation path
6044
6045 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6046
6047         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6048          a function call
6049
6050 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6051
6052         * configure,
6053         * device/lib/configure.in,
6054         * device/lib/configure: fixed for autoconf 2.57
6055
6056 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6057
6058         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6059         option so that it actually works. Made it specific to the z80, since
6060         the gbz80 doesn't have these kinds of I/O ports.
6061
6062 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6063
6064         * device/include/z180.h,
6065         * device/lib/_memcpy.c,
6066         * device/lib/_memmove.c,
6067         * device/lib/_mulint.c,
6068         * device/lib/ser_ir.c,
6069         * device/lib/ser_ir_cts_rts.c,
6070         * device/lib/_strcmp.c,
6071         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6072         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6073         portmode; added deprecation warning for bank= and protmode= forms.
6074         Also, guard against buffer overflow.
6075         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6076
6077 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6078
6079         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6080         changed interrupt vector table generation to only emit declared vectors.
6081         * device/include/Makefile.in: added missing backslash
6082         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6083
6084 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6085
6086         Mainly changes to support compilation of the device libraries
6087         * src/pic16/device.c: stack is allocated via symbol and not
6088         via literal number. The symbol is placed in the corresponding
6089         position of the data ram
6090         * (pic16_dump_section): relocatable and absolute uninitialized
6091         data are now emitted in sorted order to reduce section naming,
6092         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6093         weren't marked as being in the access bank,
6094
6095 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6096
6097         Added portion of GNU PIC Library under the directory
6098         device/include/pic16 and device/lib/pic16. These files
6099         contain the declarations of SFRs for the PIC18Fxx2 devices.
6100         The directory is initialized via configure from toplevel.
6101
6102 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6103
6104         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6105         the spilllocations to be compared correctly
6106
6107 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6108
6109         * src/SDCCast.c (decorateType): fixed bug introduced today
6110
6111 2004-01-12  Borut Razem <borut.razem AT siol.net>
6112
6113         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6114         doc/sdccman.lyx: upper case pragmas are deprecated
6115
6116 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6117
6118         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6119         in simpler and even better code
6120
6121 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6122
6123         * src/SDCCicode.c (operandOperation): fixed bug #874819
6124         * src/SDCCast.c (decorateType): fixed
6125         char foo (unsigned long ul) { return ul > 0; }
6126
6127 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6128
6129         * doc/sdccman.lyx: Moved and added some sections, small changes
6130         all over. Telling LaTeX to be less strict with word spacing
6131         to better keep the right margin. Changed some notes about
6132         maintainance of the ports in section 3.2.1 - is it OK like this?
6133
6134 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6135
6136         SDCC source changes:
6137         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6138         convilong): modified to inform the pic16 port that builtin functions
6139         are external
6140
6141         PIC16 PORT specific changes:
6142         * src/pic16/device.c pic16_dump_equates() added,
6143         processor registers declared internally by the port are emitted in
6144         the translation as equates,
6145         * src/pic16/gen.c: inline code is passed unprocessed to the
6146         translation,
6147         * (pic16_popGetLit2): fnuction modified to take second operand as
6148         pCodeOp pointer and not as literal,
6149         * (popRegFromIdx): prefixed with pic16_,
6150         * (pic16_popCombine2): modified to receive already allocated pCode
6151         operands,
6152         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6153         * (genFunction): initializes local stack frame and pushes on stack
6154         all the registers used by this function,
6155         * (genEndFunction): restores all registers from stack and restores
6156         stack frame,
6157         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6158         improvements,
6159         * (pic16glue): changed the program startup sequence,
6160         * added new dbName code 'A' for functions placed in absolute section
6161         * src/pic16/main.c: added function attribute _naked,
6162         * added pragma 'code' to place a fnuction at an absolute address,
6163         * added command line arguments --debug-ralloc and --pcode-verbose,
6164         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6165         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6166         * (pic16_newpCodeOpLit2): modified to take the second operand as
6167         pCodeOp pointer,
6168         * (pic16_printpBlock): modified to emit each function in a separate
6169         section,
6170         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6171         UPPER for immediate operands,
6172         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6173         instruction,
6174         * src/pic16/peeph.def: all peepholes with movff are commented out,
6175         because there is a problem in the pcode peep optimizer,
6176         * src/pic16/ralloc.c: the register allocator can now reuse local
6177         function symbols for another function. This saves register usage.
6178         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6179
6180         Added file src/pic16/NOTES with information about program writing on
6181         the current port version.
6182
6183 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6184
6185         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6186         and peephole 252 (array access)
6187
6188 2004-01-09  Borut Razem <borut.razem AT siol.net>
6189
6190         * src/SDCCmain.c : fixed #872250: -l command line defined library
6191           files are scanned before standard library files
6192
6193 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6194
6195         * src/SDCCast.c (decorateType): fixed bug #874046
6196
6197 2004-01-09  Borut Razem <borut.razem AT siol.net>
6198
6199         * support/scripts/sdcc.nsi: remove previous installation
6200
6201 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6202
6203         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6204         bytes for last interrupt vector (mcs51)
6205         * sdcc.spec: fixed typo
6206
6207 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6208
6209         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6210         gen51Code): more efficient parameter receive for --model-large
6211         ("bug" #845294)
6212
6213 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6214
6215         * src/ds390/main.c,
6216         * src/z80/main.c: added missed needLinkerScript flags (more than
6217         one port structure defined in these file)
6218         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6219         bug #795325
6220
6221 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6222
6223         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6224         * src/port.h: added flag needLinkerScript in port->linker
6225         structure to inform whether to create a .lnk file or not,
6226         * src/avr/main.c,
6227         * src/ds390/main.c,
6228         * src/hc08/main.c,
6229         * src/mcs51/main.c,
6230         * src/pic/main.c,
6231         * src/pic16/main.c,
6232         * src/xa51/main.c,
6233         * src/z80/main.c: changed appropriately to configure
6234         needLinkerScript flag
6235         * src/pic/gen.c,
6236         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6237         * src/pic/glue.c: added variable udata_section_name to
6238         override default uninitialized data segment definition for
6239         devices only with SHAREBANK memory (reported from Erik Epetrich)
6240         * (pic14emitOverlay): modified to emit a commented overlay segment
6241         directive when no overlay data exist
6242         * (picglue): modified to emit uninitialized data segment
6243         according to udata_section_name
6244         * src/pic/main.c (_pic14_parseOptions): added command line
6245         options --udata-section-name=[name] to override default
6246         udata definition name
6247         * modified _linkCmd and _asmCmd to include compiler passed
6248         arguments via -W option
6249         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6250         object file from '.rel' to '.o' in port->linker structure,
6251         changed size of fptr from 2 to 3 in port structure
6252
6253 2004-01-07  Borut Razem <borut.razem AT siol.net>
6254
6255         * support/scripts/sdcc.nsi: update PATH
6256         * support/scripts/sdcc.ico: craeted
6257
6258 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6259
6260         * device/include/Makefile.in: fix install
6261         * doc/Makefile: fix install
6262
6263 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6264
6265         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6266         in bug #860505
6267         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6268         how the function variable allocation summary is displayed; also
6269         include information about variables allocated to the overlay
6270         segment
6271
6272 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6273
6274         * as/mcs51/lkmain.c: Help about -Y option
6275         * as/mcs51/lkarea.c: Fixed gcc warnings
6276
6277 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6278
6279         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6280         fixed warning
6281         * support/valdiag/tests/overflow.c: added
6282         * src/SDCCast.c (decorateType),
6283         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6284         LEFT_OP (left shift)
6285
6286 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6287
6288         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6289         (default behaviour).
6290
6291 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6292
6293         A python script to validate compiler diagnostic messages. It can be
6294         used to verify that sdcc complains about bad c source code and
6295         gives a good location of the error.
6296         * support/valdiag/Makefile,
6297         * support/valdiag/valdiag.py,
6298         * support/valdiag/tests/*
6299
6300 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6301
6302         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6303         * src/SDCCsymt.c (newEnumType),
6304         * src/SDCCsymt.h
6305         * support/Util/SDCCerr.c,
6306         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6307         enum related bugs.
6308         * support/regression/tests/enum.c: added test for enum values that
6309         require at least 2 bytes of storage.
6310
6311 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6312
6313         * src/common.h: added ifndef/define/endif macros
6314         around the header file.
6315         Bug reported from Jesus Calvino-Fraga
6316
6317 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6318
6319         * sdcc.spec: updated
6320         * device/include/Makefile.in: don't install CVS directories
6321         * device/lib/Makefile.in: added removal of CVS directories after install
6322         * doc/Makefile: fixed install, added local_icons
6323         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6324         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6325         * src/ds390/gen.c (genRightShift): fixed bug #870788
6326         * src/SDCCast.c (decorateType): fixed bug #870781
6327
6328 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6329
6330         PIC16 port related changes:
6331         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6332         added variable stackPos,
6333
6334         * gen.c: genCall, assignResultValue: added support for
6335         pushing/retrieving function parameters to/from stack,
6336         genFunction,genEndFunction: setup stack frame for the
6337         generated function,
6338         genAddrOf: will be changed according to bug 863624
6339
6340         * added files genutils.c and genutils.h which contain gen*
6341         debugged and optimised functions extracted from gen.c
6342
6343         * glue.c: added variable 'externs' which holds extern symbols,
6344         pic16emitRegularMap: is modified to properly handle relocatable
6345          symbols under the new scheme,
6346         pic16createInterruptVect: is modified
6347         pic16printPublics: is modified to emit 'global' assembler directives,
6348         added pic16_printExterns to print extern symbols,
6349         pic16glue: initializes stack/frame pointer in the beginning of
6350         the assembly output. Temporary hack, will be corrected later,
6351         because gplink yet does not support stack and SDCC does not
6352         yet support a type of crt0.o object to create the final binary.
6353
6354         * Removed many lines that contain 8051 legacy code.
6355         * The code is finally placed under a 'code' directive.
6356         * Added port specific options.
6357
6358         * _process_pragma: simplified since now we do not need *special*
6359         include file to define SFR registers. But a separate header
6360         will be needed. This will be developed later.
6361         * _pic16_parseOptions: added, parses port specific options:
6362         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6363         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6364         --preplace-udata-with=
6365
6366         * _pic16_setDefaultOptions: modified to initialize section names,
6367         but hack is temporarly out of order since it needs improvement.
6368         * _pic16_genAssemblerPreamble: configuration words are emitted by
6369         their address instead of their name. This part is incomplete and
6370         supports only the 18Fxx2 devices. Other devices will emit an error
6371         during assembly since they do not contain the same set of config
6372         registers
6373         * _pic16_genIVT: is modified,
6374
6375         * pcode.c: added definitions for some hardware registers that are needed
6376         for stack support
6377         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6378         All PCI entries are updated. Now LFSR is supported.
6379         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6380         * added pic16_newpCodeOpLit2 to support instructions with
6381         two literal arguments
6382         * pic16_pCode2str: corrected code that emits assembler instructions
6383         with two literal operands and those that have an access bit modifier
6384         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6385         this fixes a bug which caused some labels to be lost, when an
6386         assembler directive was added, i.e. banksel,
6387         * pic16_FixRegisterBanking: improved logic that causes the insertion
6388         of bank switching,
6389         * InlineFunction: functions that are called once, are not any more
6390         inlined. This can be a port option in the future,
6391
6392         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6393
6394         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6395         hold the corresponding uninitialized symbols,
6396         * pic16_allocProcessorRegister: registers have explicit marked the
6397         accessBank field,
6398         * pic16_allocInternalRegister: registers are explicit marked as
6399         not used,
6400         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6401         processing list, so bit registers were lost,
6402         *
6403
6404         * ralloc.h: added field 'accessBank' and original symbol operand
6405         in register definition,
6406         * removed the field isMapped from register definition,
6407
6408         ** Several functions have been removed from various sources:
6409         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6410         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6411         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6412         pic16_assignRelocatableRegisters
6413
6414         ** others have been introduced:
6415         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6416         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6417
6418 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6419
6420         * support/scripts/inc2h.pl: changed definition of BIT_AT
6421         to emit 'sbit at' instead of 'bit at'. This was a request.
6422
6423         PIC16 port related preliminary changes:
6424         * gen.c: prefixed function popRegFromString with
6425         pic16_ and all references to it corrected
6426         * pcode.c: all pic16_pc_* hardware registers prefixed
6427         with underscore (_),
6428         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6429         * ralloc.c: newReg(): when register is REG_SFR then
6430         set address to rIdx,
6431         pic16_allocProcessorRegister(): marks register wasUsed=0
6432         pic16_writeUsedRegs(): added a call to assign processor
6433         registers via pic16_assignFixedRegisters
6434
6435 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6436
6437         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6438         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6439         variables in unused register banks.  Also the SSEG is placed
6440         wherever there is enough space for it, and IDATA can be anywhere
6441         in internal RAM.  For now compile using -Wl-Y[stack_size].
6442         The mem file is different for this option as well, since it
6443         makes no sense of talking about DSEG lenght.
6444
6445 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6446
6447         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6448         in certain cases, e.g. when ROM assignment, patch provided
6449         from Albert den Haan.
6450
6451 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6452
6453         Many signedness and type propagation fixes:
6454         * src/SDCCicode.c: made geniCodeCast() static
6455         replaced SPEC_ by IS_ (cosmetic)
6456         (operandOperation): fixed div and mod operation
6457         (usualBinaryConversions): added support for promotion of char
6458         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6459         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6460         (geniCodeAdd): an array index will stay unsigned, even if promoted
6461         from char to int
6462         (geniCodeArray): ditto
6463         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6464         * src/SDCCsymt.c (computeType): added more support for char;
6465         promotion of char is selectable by promoteCharToInt, fixed signedness
6466         for all cases
6467         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6468         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6469         * src/SDCCval (val*): replaced signedness calculation by
6470         computeType()
6471         rearranged if-branches (cosmetic)
6472         (valShift): added warning W_SHIFT_CHANGED
6473         (valCompare): fixed problem with different types
6474         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6475         * support/regression/tests/literalop.c: added many cases
6476         * support/regression/tests/ast_constant_folding.c: changed finally to
6477         'unsigned int'
6478         * .version: new year, new version: 2.3.7
6479         * src/SDCCmain.c (main): applied patch #866468
6480         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6481         provided by Scott Bronson
6482         * doc/sdccman.lyx: updated documentation for sdcdb
6483         updated and added chapter tips
6484
6485 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6486
6487         * src/SDCCsymt.h: missing from yesterday's commits
6488
6489 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6490
6491         * src/SDCC.y (struct_or_union_specifier),
6492         * support/Util/SDCCerr.c,
6493         * support/Util/SDCCerr.h: verify that struct & union tags are used
6494         as declared.
6495
6496 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6497
6498         * src/SDCCglobl.h: missing from yesterday's commits
6499
6500 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6501
6502         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6503         sft_attributes, struct_declaration, parameter_declaration,
6504         type_name, start_block, declaration_list),
6505         * src/SDCC.lex (check_type): support redefinition of typedef names
6506
6507 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6508
6509         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6510         aligned xdata arrays. Erik helped me with the if clause.
6511
6512 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6513
6514         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6515         warning
6516
6517 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6518
6519         * src/SDCCast.h,
6520         * src/SDCCast.c (newAst_),
6521         * src/SDCCicode.h,
6522         * src/SDCCicode.c (ast2iCode, newiCode),
6523         * src/SDCCglobl.h,
6524         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6525         expr, statement, expression_statement, selection_statement,
6526         iteration_statement, expr_opt, jump_statement): foundation for tracking
6527         sequence points
6528         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6529         point code too)
6530
6531 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6532
6533         * support/Util/SDCCerr.c,
6534         * src/SDCCast.h,
6535         * src/SDCCast.c (createCase, createDefault, decorateType),
6536         * src/SDCClabel.c (labelUnreach),
6537         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6538         to error messages.
6539         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6540         (with thanks to Stas Sergeev)
6541         * device/include/time.h,
6542         * device/lib/time.c (CheckTime): suppress unreachable code warning
6543
6544 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6545
6546         * src/SDCCast.c (createIvalCharPtr),
6547         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6548         bug #753752)
6549         * support/regression/tests/nullstring.c: tests for these two bugs
6550
6551 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6552
6553         * support/Util/SDCCerr.h,
6554         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6555         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6556         about storage class and 'at' used inside struct or union
6557         * src/SDCCBBlock.c (iCodeFromeBBlock),
6558         * src/SDCCcse.c (ifxOptimize),
6559         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6560         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6561         printIval, emitStaticSeg, emitOverlay),
6562         * src/SDCClabel.c (deleteIfx),
6563         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6564         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6565         gatherAutoInit, processParms),
6566         * support/Util/SDCCerr.h,
6567         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6568         reporting for post-parse errors.
6569
6570 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6571
6572         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6573         implicit casts via union; they don't work on big endian systems
6574         (possible fix for bug #861138)
6575
6576 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6577
6578         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6579         * src/mcs51/main.c: fixed the fix for bug #737001
6580
6581 2003-12-15  Borut Razem <borut.razem AT siol.net>
6582
6583         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6584
6585 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6586
6587         * support/makebin/makebin.c: put output in binary mode
6588
6589 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6590
6591         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6592         xdata and data memory on startup. Set the environment variable
6593         SDCC_NOGENRAMCLEAR to disable this.
6594         * src/mcs51/peephole.def,
6595         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6596         (allows non-interrupt and interrupt code to safely compete for a resource
6597         without the non-interrupt code having to disable interrupts)
6598
6599 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6600
6601         * src/SDCCicode.c (geniCodeAdd),
6602         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6603         with valFromType if type might be a pointer and host is big endian).
6604         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6605         types, not just integer types.
6606         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6607         multiply defined with mismatching "at" address.
6608
6609 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6610
6611         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6612         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6613         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6614         with embedded nulls (fixed bug #753752)
6615
6616 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6617
6618         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6619         Apparently this did not see much testing (endless loop)
6620
6621 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6622
6623         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6624
6625 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6626
6627         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6628         gracefully handle NULL memmap pointers
6629
6630 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6631
6632         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6633         instead of deleting the iCode when an operand is volatile
6634         * src/z80/gen.c (genDummyRead),
6635         * src/mcs51/gen.c (genDummyRead),
6636         * src/ds390/gen.c (genDummyRead),
6637         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6638         not just IC_RIGHT
6639         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6640         * src/SDCC.y: fixed bug #850420
6641
6642 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6643
6644         Applied z80 i/o port patch from Peter Townson and fixed some operators
6645         to better handle operands in A register.
6646         * device/include/z180.h
6647         * src/SDCC.y
6648         * src/SDCCglue.c
6649         * src/z80/gen.c
6650         * src/z80/gen.h
6651         * src/z80/main.c
6652         * src/z80/peeph-z80.def
6653         * src/z80/peeph.def
6654         * src/z80/z80.h
6655
6656 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6657
6658         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6659
6660 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6661
6662         * device/lib/hc08/_mullong.c: Removed extra #endif
6663
6664 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6665
6666         * sim/ucsim/hc08.src/inst.cc,
6667         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6668         carries from x to h
6669         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6670         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6671         * device/include/stdarg.h: fixed varargs for hc08
6672         * device/lib/Makefile.in,
6673         * device/lib/hc08/Makefile,
6674         * device/lib/hc08/_mulint.c,
6675         * device/lib/hc08/_mullong.c: fixed some endian problems
6676
6677 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6678
6679         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6680         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6681         * device/lib/_gptrget.c,
6682         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6683
6684 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6685
6686         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6687         * src/SDCCast.c (astErrors): fixed bug #846007
6688         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6689
6690 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6691
6692         * src/SDCCast.c (decorateType): disabled a transformation I added in
6693         revision 1.188 (access to fields of a structure at an absolute address);
6694         it breaks with bitfields, extern declarations, and gcse analysis.
6695         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6696         could be assigned through a pointer, so don't complain.
6697         * src/SDCCast.c (astErrors),
6698         * src/SDCCast.h,
6699         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6700
6701 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6702
6703         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6704         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6705         output of __config directives, since gpasm now supports them
6706         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6707         pre-processor macro, i.e. -DMCU=p18f452
6708         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6709         and modified to handle 'cast' icode similarly to '=' icode
6710         * src/pic16/device.h (typedef struct PIC_device): added field
6711         'extMIface' to indicate that chip has external memory interface
6712         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6713         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6714         18F8720
6715
6716 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6717
6718         * src/SDCC.y (pointer): fixed bug #846006
6719         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6720         * src/SDCCast.c (decorateType): fixed bug #846009
6721         * src/ds390/peeph.def,
6722         * src/ds390/gen.c (genAnd, genOr),
6723         * src/mcs51/peeph.def,
6724         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6725
6726 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6727
6728         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6729         * src/SDCCdflow.c
6730         * src/SDCCcse.c
6731         * src/SDCCcse.h
6732         * src/SDCCBBlock.h
6733         * src/SDCCBBlock.c
6734
6735 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6736
6737         fixed bug #845089
6738         * src/SDCCbitv.h,
6739         * src/SDCCbitv.c: added function to free a bitvector
6740         * src/SDCClrange.h,
6741         * src/SDCClrange.c: added function to recompute the liveranges
6742         * src/avr/ralloc.c,
6743         * src/ds390/ralloc.c,
6744         * src/hc08/ralloc.c,
6745         * src/mcs51/ralloc.c,
6746         * src/pic/ralloc.c,
6747         * src/pic16/ralloc.c,
6748         * src/xa51/ralloc.c,
6749         * src/z80/ralloc.c: recompute the liveranges after register packing
6750
6751 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6752
6753         * src/SDCCloop.c (newInduction): fixed bug #845630
6754
6755 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6756
6757         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6758         inadvertantly left behind from my 2003-11-12 change
6759
6760 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6761
6762         Updated headers I neglected to commit yesterday.
6763         * src/SDCClrange.h,
6764         * src/SDCCicode.h
6765
6766 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6767
6768         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6769         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6770         * src/SDCCopt.c (eBBlockFromiCode),
6771         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6772         the creation of the key hash table from the sequencing so it can be used
6773         earlier (for some GCSE bug fixes still pending)
6774
6775 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6776
6777         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6778         * support/regression/tests/addsub.c: testing genPlus shortcut
6779
6780 2003-11-15  Borut Razem <borut.razem AT siol.net>
6781
6782         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6783
6784 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6785
6786         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6787         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6788         ordering is immaterial.
6789         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6790
6791 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6792
6793         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6794         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6795         (SIGSEV) of bug #840381
6796         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6797         unlink new file before rename if new and old filenames are the same)
6798
6799 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6800
6801         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6802         uninitialized variables) for the mcs51. Set environment variable
6803         SDCC_GENRAMCLEAR to test.
6804         xdata initialization slightly shorter
6805
6806 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6807
6808         * src/SDCCsymt.h,
6809         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6810         #838241 & 780691 (basicly the same bug)
6811         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6812         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6813
6814 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6815
6816         * src/SDCCmain.c (linkEdit): "fix" #834252
6817
6818 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6819
6820         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6821         * src/SDCCast.h,
6822         * src/SDCC.y: fixed bug #819403
6823
6824 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6825
6826         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6827         the reentrant attribute.
6828         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6829         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6830         simulation
6831         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6832         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6833         erroneously reduced to a literal.
6834         * src/hc08/ralloc.c (packRegisters, rematStr),
6835         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6836         some cases
6837
6838 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6839
6840         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6841         * doc/sdccman.lyx: changed from 'article' to 'book'
6842         * doc/Makefile: readded test_suite_spec and cdbfileformat
6843
6844 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6845
6846         * device/include/stdlib.h: include malloc.h to comply with ANSI
6847         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6848
6849 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6850
6851         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6852         * doc/clean.mk: also remove *.out files
6853         * doc/sdccman.lyx: some additions, larger top/bottom margins
6854
6855 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6856
6857         * src/SDCC.y: fixed bug #837365
6858         * support/regression/tests/bitopcse.c
6859         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6860         a symbol (might be valop instead)
6861         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6862         * device/lib/clean.mk: added hc08 to the cleaning list
6863
6864 2003-11-04  Borut Razem <borut.razem AT siol.net>
6865
6866         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6867           made 2003-11-04
6868         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6869           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6870           malloc is declared in standard stdlib.h
6871
6872 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6873
6874         * device/lib/hc08/Makefile: need to clean .rel not .o files
6875         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6876
6877 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6878
6879         * src/port.h,
6880         * src/hc08/main.c,
6881         * src/mcs51/main.c,
6882         * src/ds390/main.c,
6883         * src/z80/main.c,
6884         * src/avr/main.c,
6885         * src/pic/main.c,
6886         * src/pic16/main.c,
6887         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6888         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6889         tests (which uses the port's oclsExpense function)
6890         * src/SDCC.y,
6891         * src/SDCCast.c,
6892         * src/SDCCicode.c,
6893         * src/hc08/gen.c,
6894         * src/ds390/gen.c,
6895         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6896
6897 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6898
6899         * src/SDCCcse.c (ifxOptimize),
6900         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6901         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6902         deleting the IFX iCode.
6903         * src/hc08/ralloc.c: reduced unneeded slocs
6904         * src/hc08/gen.c: fixed bug in asmopToBoolean
6905
6906 2003-11-04  Borut Razem <borut.razem AT siol.net>
6907
6908         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6909           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6910           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6911           transferred to configure
6912
6913 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6914
6915         Use headers defined in the C[++] standards:
6916         * sim/ucsim/gui.src/serio.src/fileio.cc
6917         * sim/ucsim/gui.src/serio.src/frontend.cc
6918         * sim/ucsim/gui.src/serio.src/main.cc
6919         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6920         * support/Util/NewAlloc.c
6921         * as/hc08/lklibr.c
6922         * as/mcs51/lklibr.c
6923         * as/z80/aslist.c
6924         * as/z80/assym.c
6925
6926 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6927
6928         * Added MSVC projects for hc08 assembler and linker:
6929         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6930         /as/hc08/link_hc08.dsp
6931
6932 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6933
6934         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6935
6936 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6937
6938         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6939
6940 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6941
6942         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6943
6944 2003-10-31  Borut Razem <borut.razem AT siol.net>
6945
6946         * support/cpp2/cpplib.h,
6947           support/cpp2/cpplib.c,
6948           support/cpp2/cpplex.c,
6949           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6950           to switch _asm block preprocessing on / off. Default is
6951           #pragma preproc_asm +
6952
6953 2003-10-31  Borut Razem <borut.razem AT siol.net>
6954
6955         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6956           when outputting comment blocks (when executed with -C option) and
6957           _asm (SDCPP specific) blocks
6958
6959 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6960
6961         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6962
6963 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6964
6965         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6966
6967 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6968
6969         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6970         * src/SDCCast.c (decorateType): fixed bug #832664
6971
6972 2003-10-31  Borut Razem <borut.razem AT siol.net>
6973
6974         * support\cpp2\cpplex.c: fixed for SDCPP:
6975           comments(when executed with -C option) and _asm blocks
6976           were included even if they where in skipped #if block.
6977           Applied solution from GCC cpp 3.3.2
6978
6979 2003-10-31  Borut Razem <borut.razem AT siol.net>
6980
6981         * src/SDCC.lex: sdcc now understands both formats:
6982           '# <line_number> <file_name>' and
6983           '#line <line_number> <file_name>'
6984         * support/cpp2/cppmain.c: sdcpp now generates the standard
6985           '# <line_number> <file_name>' instead of former
6986           '#line <line_number> <file_name>'
6987
6988 2003-10-30  Borut Razem <borut.razem AT siol.net>
6989
6990         * support/cpp2/cpphash.h,
6991         * support/cpp2/cpplib.h
6992         * support/cpp2/cpplex.c,
6993         * support/cpp2/cppmain.c,
6994         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6995
6996 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6997
6998         Fixed a number of problems revealed by bug #827883.
6999         * src/SDCCloop.c (loopInvariants): Spill location of the
7000         result operand should be recomputed if extracted from
7001         a loop. Also, don't extract assignments of an iTemp
7002         from a literal.
7003         * src/SDCCast.c (isConformingBody): loop reversal should
7004         not occur if the control variable is involved with a
7005         relational operator.
7006
7007 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7008
7009         * .version: bumped to 2.3.6 to reflect the big improvements
7010         made by Erik and Klaus. Thanks!
7011
7012 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7013
7014         Replaced the livrange code.
7015         * src/SDCClrange.c: added new LR code
7016         * src/SDCCloop.c,
7017         * src/SDCCBBlock.h: removed remainig parts from old LR code
7018         * src/ds390/ralloc.c,
7019         * src/ds390/gen.c: minor fixes to make it work with new code
7020
7021 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7022
7023         * as/hc08/asm.h,
7024         * as/hc08/lkrloc.c,
7025         * src/hc08/gen.c,
7026         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7027         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7028         (tweaked fix for bug #818696)
7029
7030 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7031
7032         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7033
7034 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7035
7036         * src/SDCCmain.c,
7037         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7038         * src/mcs51/gen.c (gencjneshort),
7039         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7040         more efficient (per Scott Bronson's suggestion)
7041
7042 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7043
7044         Extended the semantics of the critical keyword to include
7045         individual statements. See RFE #827755 and #799831
7046         * src/SDCC.y
7047         * src/SDCCicode.c
7048         * src/SDCCopt.c
7049         * src/SDCCast.c
7050         * support/Util/SDCCerr.c
7051         * support/Util/SDCCerr.h
7052         * src/mcs51/gen.c
7053         * src/ds390/gen.c
7054         * src/hc08/gen.c
7055
7056 2003-10-19  Borut Razem <borut.razem AT siol.net>
7057
7058         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7059
7060 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7061
7062         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7063         Fixed bug #818696
7064         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7065         and predecrement operand is displayed
7066
7067 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7068
7069         * src/SDCCval.c (valMinus): fixed bug #826041
7070
7071 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7072
7073         Some hc08 related updates that I missed earlier
7074         * sim/ucsim/stypes.h
7075         * support/regression/ports/hc08/spec.mk
7076
7077 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7078
7079         New target "hc08" for the Motorola 68hc08 family of micros
7080
7081         * configure
7082         * configure.in
7083         * Makefile
7084         * src/hc08/*
7085         * src/SDCCmain.c
7086         * src/port.h
7087         * sim/ucsim/hc08.src/*
7088         * sim/ucsim/configure.in
7089         * src/ucsim/configure
7090         * sim/ucsim/packages_in.mk
7091         * as/hc08/*
7092         * as/Makefile
7093         * device/include/mc68hc908qy.h
7094         * device/lib/hc08/*
7095         * device/lib/Makefile.in
7096         * support/regression/ports/hc08/*
7097         * support/regression/Makefile
7098
7099 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7100
7101         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7102         regression test
7103         * src/ds390/gen.c (genCast): fixed bug #821957
7104
7105 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7106
7107         * device/lib/logf.c: "fixed" overlay bug
7108         * support/regression/ports/host/spec.mk: added m library
7109         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7110         * support/regression/tests/float_trans: added (for Eric)
7111
7112 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7113
7114         * src/mcs51/gen.c (genCpl): fixed bug
7115         http://sf.net/mailarchive/message.php?msg_id=6263915
7116
7117 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7118
7119         * src/SDCCast.c (decorateType): added extended constant folding
7120         * src/SDCCsymt.c (computeType): cleanup
7121         * src/SDCCval.c (valShift): minor optimization
7122         * support/regression/tests/ast_constant_folding.c: added
7123
7124 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7125
7126         * src/SDCCmain.c: removed some unintended changes
7127
7128 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7129
7130         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7131         * src/z80/gen.c: fixed part of bug #817589
7132         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7133
7134 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7135
7136         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7137         * src/SDCCcflow.c
7138         * src/SDCCcse.c
7139         * src/SDCCdflow.c
7140         * src/SDCClabel.c
7141         * src/SDCClrange.c
7142         * src/SDCCmem.c
7143         * src/SDCCopt.c
7144         * src/SDCCpeeph.c
7145         * src/SDCCset.c
7146         * src/avr/ralloc.c
7147         * src/ds390/ralloc.c
7148         * src/izt/ralloc.c
7149         * src/mcs51/ralloc.c
7150         * src/pic/ralloc.c
7151         * src/pic16/ralloc.c
7152         * src/xa51/ralloc.c
7153         * src/z80/ralloc.c
7154         * src/z80/gen.c: removed unused label "release:"
7155
7156 2003-10-06  Borut Razem <borut.razem AT siol.net>
7157
7158         * src/SDCC.lex: removed definition of unused variables
7159           save_optimize and save_options
7160
7161 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7162
7163         * clean.mk: removed '=' in "-maxdepth=1"
7164         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7165         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7166
7167 2003-10-06  Borut Razem <borut.razem AT siol.net>
7168
7169         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7170           my_unput() replaced by unput()
7171
7172 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7173
7174         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7175         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7176         type-punned pointer will break strict-aliasing rules"
7177         Old LR behaviour is again default; Klaus' LR can be choosen by
7178         defining the environment variable LRKLAUS
7179         * src/SDCCBBlock.h
7180         * src/SDCCloop.c
7181         * src/SDCClrange.c
7182         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7183         * clean.mk: fixed removal of files in bin/CVS/
7184         * device/lib/clean.mk: fixed removal of directories small and large
7185         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7186         * src/SDCCicode.c,
7187         * src/SDCCval.c: removed superflous test for pedantic
7188
7189 2003-10-05  Borut Razem <borut.razem AT siol.net>
7190
7191         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7192           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7193           message "unmatched #pragma SAVE and #pragma RESTORE"
7194
7195 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7196
7197         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7198           assembly, critical functions, atomic, nojtbound)
7199
7200 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7201
7202         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7203         * src/SDCCBBlock.h
7204         * src/SDCCloop.c
7205         * src/SDCCloop.h
7206         * src/SDCClrange.c
7207
7208 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7209
7210         * src/z80/gen.h,
7211         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7212         * src/mcs51/gen.h
7213         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7214         * src/ds390/gen.h
7215         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7216         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7217         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7218
7219 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7220
7221         * src/z80/gen.c (genRet): fixed bug #524753
7222         * src/z80/gen.c (genCast): fixed internal error on cast from
7223         pointer to long
7224         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7225         fix for bug #477835 to the z80
7226         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7227         for tracking iCodes in the peephole optimizer for z80
7228
7229 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7230
7231         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7232         the other part of bug #814548
7233         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7234
7235 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7236
7237         * src/SDCCcse.c: fixed part of bug #814548
7238
7239 2003-09-28  Borut Razem <borut.razem AT siol.net>
7240
7241         * src/asm.c: rewrite of printILine() to use temporary file instead
7242           a pipe
7243         * src/xa51/main.c: commented out declaration of int rewinds
7244
7245 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7246
7247         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7248
7249 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7250
7251         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7252         * src/asm.c (printILine): Fixed bug #811015
7253
7254 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7255
7256         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7257         freeing.
7258
7259 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7260
7261         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7262         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7263         to correctly handle general case of AOP_PAIRPTR
7264         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7265
7266 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7267
7268         * src/mcs51/ralloc.c (fillGaps),
7269         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7270         register positioning bug)
7271
7272 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7273
7274         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7275
7276 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7277
7278         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7279         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7280         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7281         (ralloc doesn't intentionally do this now, but perhaps later)
7282         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7283         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7284         register positioning bugs (Fixed bug #762602 and #795325)
7285         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7286         (Fixed bug #808779)
7287         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7288         lines that --i-code-in-asm generates
7289
7290 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7291
7292         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7293         trying to fclose a FILE* that was already closed.
7294
7295 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7296
7297         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7298         of const struct should be treated as if const themselves)
7299
7300 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7301
7302         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7303
7304 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7305
7306         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7307         Unix (/n) and DOS (/r/n) line terminations.
7308
7309 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7310
7311         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7312         bug #613775
7313
7314 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7315
7316         * src/mcs51/gen.c (genFunction, genEndFunction),
7317         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7318         and restore of EA so that stack offsets to parameters are
7319         correct when using both critical and reentrant/stack-auto.
7320         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7321         size (can be triggered in error if sloc is shared between
7322         different sized objects)
7323         * device/include/float.h: fixed macros to explicitly use
7324         unsigned long where needed
7325
7326 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7327
7328         Feature req. 799831: added code to allow nesting of critical functions
7329         * src/mcs51/gen.c (genFunction, genEndFunction)
7330         * src/ds390/gen.c (genFunction, genEndFunction)
7331
7332 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7333
7334         * src/SDCCsymt.c (sclsFromPtr),
7335         * src/SDCCsymt.h,
7336         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7337         support for standard C idiom of memory mapped variables; for
7338         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7339         to xdata int at 0x1234 tempvar = 1.
7340         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7341         provided by Akiya ISHIDA
7342
7343 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7344
7345         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7346         * src/SDCCval.c (constVal): added reduction from int to char
7347         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7348         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7349         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7350         to ignore the sign
7351         * support/regression/tests/shifts.c: fixed
7352
7353 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7354
7355         * src/z80/gen.c (genXor): Fixed bug #805445
7356
7357 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7358
7359         Fixed bug #621531 (const & volatile confusion in the type chain).
7360         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7361         refer to the const or volatile state of the pointer itself.
7362
7363         * src/SDCCast.c
7364         * src/SDCCglue.c
7365         * src/SDCCicode.c
7366         * src/SDCCsymt.c
7367         * src/SDCCval.c
7368         * src/SDCC.y
7369         * src/SDCCsymt.h
7370         * src/pic/gen.c
7371         * src/pic/ralloc.c
7372         * src/pic16/gen.c
7373         * src/pic16/ralloc.c
7374         * support/regression/tests/const.c
7375
7376 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7377
7378         When checking for duplicated modules, use absolute paths
7379         instead of relative paths.  Files changed:
7380
7381         * as/mcs51/lklib.c
7382         * link/z80/lklib.c
7383
7384 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7385
7386         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7387
7388 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7389
7390         * device/include/string.h: added size_t typedef, changed
7391         prototypes to use size_t, eliminated separate reentrant and
7392         non-reentrant declarations, added _memmove declaration
7393         * device/lib/_memcpy.c: changed to use size_t instead of int,
7394         changed /4 to >>2 to avoid division library call
7395         * device/lib/_memcmp.c,
7396         * device/lib/_memset.c,
7397         * device/lib/_strncat.c,
7398         * device/lib/_strncpy.c,
7399         * device/lib/_strncmp.c: changed to use size_t instead of int
7400         * device/lib/_memmove.c: new file (fixed bug #772294)
7401         * device/lib/Makefile.in: added _memmove.c
7402         * device/lib/z80/asm_strings.s: fixed bug #772290
7403         * support/regression/tests/bitfields.c: attempt to fix host assertion
7404         failure on amd64-unknown-linux2.2
7405
7406 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7407
7408         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7409         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7410         * as/z80/asmain.c (main): fixed bug #801766
7411
7412 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7413
7414         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7415         compilers
7416
7417 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7418
7419         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7420         reported in bug #800609
7421
7422 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7423
7424         * Top header beautifications in src/pic16 directory:
7425           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7426           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7427           pcoderegs.h, ralloc.c, ralloc.h
7428         * main.c: added top header and GPL license notice
7429         * pcode.c: fixed the if-conditional warning
7430
7431 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7432
7433         * device/lib/_mullong.c: replaced int by short for gcc
7434
7435 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7436
7437         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7438         and JUMPTABLE iCodes properly now (worked by accident before)
7439         * src/mcs51/gen.c (leftRightUseAcc),
7440         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7441         iCode properly now. Use getSize instead of nRegs since a & b
7442         aren't part of the nRegs tally.
7443
7444 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7445
7446         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7447         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7448           before instructions that use the _STATUS register
7449
7450 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7451
7452         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7453         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7454         fetching of the pointer
7455         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7456         copied from genNearPointerSet()
7457         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7458         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7459         If they pop r0/r1 they must be called in the opposite order than aopOp().
7460         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7461         (resp. --stack-auto), prepared for --xstack
7462
7463 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7464
7465         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7466
7467 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7468
7469         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7470         these ports have their own __sdcc_external_start()
7471
7472 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7473
7474         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7475         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7476         type for bits was changed. It resulted in bit variables becoming
7477         global, which is not permitted in PIC 14 assembly output.
7478
7479 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7480
7481         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7482
7483 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7484
7485         Z80 and MCS51 linkers complaint if a public symbol is defined
7486         in more than one library module:
7487
7488         * as/mcs51/lklib.c
7489         * link/z80/lklib.c
7490         * as/mcs51/Makefile.in
7491
7492 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7493
7494         A few small changes that speed up the peephole optimizer.
7495
7496         * src/SDCCpeeph.c
7497
7498 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7499
7500         Try to make the peephole optimizer smarter by maintaining
7501         an association between the assembly source code and the
7502         iCodes that originated them. Put this information to use
7503         with a new peephole rule condition "notVolatile" so that
7504         the rules can be aggressive yet still safe.
7505
7506         * src/SDCCpeeph.c
7507         * src/SDCCpeeph.h
7508         * src/mcs51/gen.c
7509         * src/mcs51/peeph.def
7510
7511 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7512
7513         Fixed bug #741761
7514
7515         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7516         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7517         if the left or right operand symbols have the accuse flag set.
7518
7519 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7520
7521         Changed the type of the result of the ! (NOT) operator to char;
7522         previously it returned the same type as the source. This allows
7523         us to eliminate all the genFloatNot functions (all of its target
7524         implementations were very buggy) since !float can use the same
7525         code as !long now.
7526
7527         * src/SDCCicode.c (ast2iCode): ! returns char
7528         * src/mcs51/gen.c (genNot, genNotFloat),
7529         * src/ds390/gen.c (genNot, genNotFloat),
7530         * src/z80/gen.c (genNot, genNotFloat),
7531         * src/pic/gen.c (genNot, genNotFloat),
7532         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7533
7534 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7535
7536         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7537         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7538            during interrupts. Ensure WSAVE is located at a shared bank address.
7539         2. Fixed page selection in some places
7540         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7541            the registers name strings.
7542         4. Fixed "signed / unsigned compare" compiler warnings.
7543         5. The PIC port manages its own allocation of the general purpose
7544            registers, but makes no attempt to reuse them. As a result when
7545            compiling it soon runs out of general purpose registers. Some
7546            additional code was added to the files pcode.c and device.c to walk
7547            through the function call tree and rename the registers so that they
7548            get reused.
7549
7550         * src/pic/device.c
7551         * src/pic/gen.c
7552         * src/pic/glue.c
7553         * src/pic/pcode.c
7554         * src/pic/pcode.h
7555         * src/pic/ralloc.c
7556         * src/pic/ralloc.h
7557         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7558         genPlus() & genMinus() when the result is the same as left or right
7559
7560 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7561
7562         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7563
7564 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7565
7566         Made bitfield a distinct type from bit so that bitfields
7567         convert as per ANSI C and bits retain their traditional
7568         boolean style behaviour. Implemented bitfield support in
7569         the z80 port.
7570
7571         * src/SDCCsymt.h,
7572         * src/SDCCsymt.c,
7573         * src/SDCCast.c,
7574         * src/cdbFile.c,
7575         * src/mcs51/gen.c,
7576         * src/ds390/gen.c: bit v bitfield split
7577         * src/z80/gen.c: New support for bitfields
7578         * support/regression/tests/bitfields.c: reenabled z80,
7579         added more tests
7580
7581 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7582
7583         Rules 246.x, 247.x relate to bitfields, the others speed up
7584         access to xdata mapped I/O devices.
7585
7586         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7587
7588 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7589
7590         Cleaned up genPackBits and genUnpackBits and added two helper
7591         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7592         for literal assignments in genPackBits (thanks to Frieder for
7593         reminding me).
7594
7595         * src/mcs51/gen.c
7596         * src/ds390/gen.c
7597
7598 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7599
7600         Fixed bug #748310 (pointer to function type mishandled when the
7601         function name is omitted). Also fixed a SIGSEGV when a function
7602         attribute (reentrant, etc) is used on a non-function or on a
7603         function but misplaced before the parameter list.
7604
7605         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7606         bug #748310
7607         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7608         * support/Util/SDCCerr.h,
7609         * support/Util/SDCCerr.c: Added func attr misuse error msg
7610
7611 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7612
7613         Fixed bug #787649 by anonymous
7614         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7615         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7616
7617 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7618
7619         Fixed numerous bitfield problems.
7620
7621         * src/SDCC.y: More bitfield related error checking
7622         * src/SDCCsymt.h,
7623         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7624         * support/Util/SDCCerr.h,
7625         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7626         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7627         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7628         * support/regression/tests/bitfields.c: tests added
7629
7630 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7631
7632         Made the constant following the "interrupt" keyword optional. If
7633         omitted, the function will not automatically be given an entry
7634         in the interrupt vector table (similar to #pragma NOIV, but
7635         less syntacticly kludgy). The interrupt number is also now
7636         range checked. Also fixed a bug in the high order bit example
7637         in the manual.
7638
7639         * src/SDCC.y
7640         * src/SDCCmem.c
7641         * src/SDCCglue.c
7642         * src/SDCCsymt.h
7643         * support/Util/SDCCerr.c
7644         * support/Util/SDCCerr.h
7645         * doc/sdccman.lyx
7646
7647 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7648
7649         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7650         * src/SDCCicode.c (operandOperation): rewritten some ops
7651         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7652         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7653         other type
7654         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7655         be re-activated by defining REDUCE_LITERALS)
7656         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7657         unsigned, but are signed by default
7658         * src/SDCCval.c (constVal): rearranged
7659         * src/SDCCval.c (valMod): preliminary fix
7660         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7661         * support/regression/literalop.c: added, work in progress
7662
7663 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7664
7665         Generate warnings for useless declarations like "char data;"
7666         that don't do what new users expect.
7667
7668         * src/SDCC.y
7669         * support/Util/SDCCerr.h
7670         * support/Util/SDCCerr.c
7671
7672 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7673
7674         * src/SDCCval.c (valMult): fix overflow detection of negative int
7675
7676 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7677
7678         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7679
7680         Changes to support big endian targets:
7681
7682         * src/ports.h
7683         * src/SDCCglue.c
7684         * src/avr/main.c
7685         * src/ds390/main.c
7686         * src/izt/i186.c
7687         * src/mcs51/main.c
7688         * src/pic/main.c
7689         * src/pic16/main.c
7690         * src/xa51/main.c
7691         * src/z80/main.c
7692
7693 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7694
7695         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7696         * device/lib/time.c: fixed warning "integer overflow in expression"
7697
7698 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7699
7700         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7701         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7702         constants are unsigned; added recognition of "u" flag for unsigned
7703         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7704         * src/SDCCval.c (valDiv, valMod): fixed signdness
7705         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7706         signedness of modulo, left and right shift
7707         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7708         * support/Util/SDCCerr.h: added warning W_INT_OVL
7709         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7710         * src/SDCCast.c (ast_print): improved output of constants
7711
7712 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7713
7714         Fixed some warnings when building with MSVC:
7715
7716         * as\mcs51\asdata.c
7717         * as\z80\asdata.c
7718         * as\mcs51\asm.h
7719         * as\z80\asm.h
7720         * link\z80\aslink.h
7721         * link\z80\lkdata.c
7722         * link\z80\lkeval.c
7723         * link\z80\lkgb.c
7724         * link\z80\lkihx.c
7725         * link\z80\lks19.c
7726         * link\z80\lksym.c
7727         * support\cpp2\cpplib.c
7728         * src\ds390\gen.c
7729         * src\mcs51\gen.c
7730
7731 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7732
7733         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7734
7735 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7736
7737         * support\librarian\clean.mk: Do not remove Makefile.
7738         * support\librarian\Makefile: added.
7739
7740 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7741
7742         Added librarian to MSVC build:
7743         * all.dsp
7744         * sdcc.dsw
7745         * support\librarian\librarian.dsp
7746
7747         'configure' not needed for librarian, removed:
7748         * support\librarian\configure
7749         * support\librarian\configure.in
7750         * support\librarian\config_in.h
7751         * support\librarian\Makefile.in
7752
7753         Hopefully these ones built the librarian and the rest of sdcc properly:
7754         * Makefile
7755         * Makefile.common.in
7756
7757         Messed up 'configure', so revert to previous version:
7758         * configure
7759         * configure.in
7760
7761 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7762
7763         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7764         there, while the mantissa of a double is "only" 53 bits wide.
7765
7766 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7767
7768         Adding sdcclib to the build.  MSVC project coming soon.
7769         Files added/changed:
7770
7771         * support\librarian\clean.mk
7772         * support\librarian\configure
7773         * support\librarian\configure.in
7774         * support\librarian\config_in.h
7775         * support\librarian\Makefile.bcc
7776         * support\librarian\Makefile.in
7777         * support\librarian\sdcclib.c
7778         * Makefile.bcc
7779         * Makefile
7780         * Makefile.common.in
7781         * configure
7782         * configure.in
7783
7784 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7785
7786         Linker now complaints if linked modules have conflicting options, for
7787         example, one compiled using --model-large and another one compiled with
7788         --model-small.  The following files were modified:
7789
7790         * as\mcs51\asdata.c
7791         * as\mcs51\aslink.h
7792         * as\mcs51\asm.h
7793         * as\mcs51\asmain.c
7794         * as\mcs51\asout.c
7795         * as\mcs51\i51pst.c
7796         * as\mcs51\lkdata.c
7797         * as\mcs51\lklibr.c
7798         * as\mcs51\lkmain.c
7799         * as\z80\asdata.c
7800         * as\z80\asm.h
7801         * as\z80\asmain.c
7802         * as\z80\asout.c
7803         * as\z80\z80pst.c
7804         * link\z80\aslink.h
7805         * link\z80\lkdata.c
7806         * link\z80\lklibr.c
7807         * link\z80\lkmain.c
7808         * src\SDCCglue.c
7809
7810 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7811
7812         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7813         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7814
7815 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7816
7817         * src/z80/mappings.i: fix _mul[us][int,long] entries
7818
7819 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7820
7821         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7822
7823 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7824
7825         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7826         * support/regression/tests/bitopcse.c: added
7827         fixed warning:
7828         * src/avr/gen.c:
7829         * src/pic/gen.c:
7830         * src/pic16/gen.c:
7831         * src/z80/gen.c:
7832         * src/xa51/gen.c:
7833
7834 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7835
7836         added support for new library format to z80, gbz80 linkers:
7837         *link/z80/aslink.h
7838         *link/z80/lklex.c
7839         *link/z80/lklib.c
7840         *link/z80/lklist.c
7841
7842 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7843
7844         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7845         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7846
7847 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7848
7849         added DUMMY_READ_VOLATILE:
7850         * src/SDCC.y:
7851         * src/avr/gen.c:
7852         * src/xa51/gen.c:
7853         * src/z80/gen.c:
7854         * src/pic/gen.c:
7855         * src/pic16/gen.c:
7856         * src/mcs51/gen.c:
7857         * src/ds390/gen.c:
7858         * src/SDCCcse.c (algebraicOpts): many improvements
7859         * src/SDCCcse.h: removed algebraicOpts()
7860         * src/SDCCicode.c (picDummyRead): added
7861
7862 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7863
7864         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7865         "Insufficient space in data memory".
7866
7867 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7868
7869         * src/mcs51/gen.c: fixed bug #771358
7870         * src/z80/gen.c: fixed bug #759087
7871
7872 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7873
7874         * src/pic16/glue.c: minor cleanup by Vangelis
7875
7876 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7877
7878         * device/include/regc515c.h: fixed #758477
7879         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7880         * device/lib/_gptrput.c: saved a few bytes
7881         * my tab spacing is 8, yours too?)
7882         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7883         * device/lib/serial.c: process RX bytes earlier than TX bytes
7884         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7885
7886 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7887
7888         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7889
7890 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7891
7892     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7893
7894 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7895
7896         * device/lib/Makefile.in: bad fix, reverted to 1.43
7897
7898 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7899
7900         * device/lib/Makefile.in: added missing z80 object files
7901
7902 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7903
7904         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7905         pic16 progress by Vangelis:
7906         * src/SDCCglobl.h:
7907         * src/SDCCmain.c:
7908         * src/pic/Makefile:
7909         * src/pic:
7910         * pic/Makefile:
7911         * pic16/device.c:
7912         * pic16/device.h:
7913         * pic16/gen.c:
7914         * pic16/gen.h:
7915         * pic16/genarith.c:
7916         * pic16/glue.c:
7917         * pic16/main.c:
7918         * pic16/pcode.c:
7919         * pic16/pcode.h:
7920         * pic16/pcodepeep.c:
7921         * pic16/peeph.def:
7922
7923 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7924
7925     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7926
7927 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7928
7929     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7930     added gbz80 build to MSVC project.
7931     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7932     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7933     from 8051 stuff and setup so it links using a .lnk file.
7934
7935 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7936
7937     * support/librarian/sdcclib.c: sdcc librarian.
7938     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7939     with sdcclib.
7940
7941 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7942
7943     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7944
7945 2003-07-02  Borut Razem <borut.razem AT siol.net>
7946
7947         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7948         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7949         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7950         src/xa51/main.c, src/z80/main.c:
7951         virtualization of glue() function: each port has it's own glue function,
7952         which is accessed by do_glue function pointer in PORT.general structure
7953
7954 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7955
7956         * DS800C400 fun, improved ROM interface and tinibios.
7957
7958 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7959
7960         * More support for DS80C400. Now includes beginning of interface to ROM.
7961
7962 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7963
7964         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7965
7966 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7967
7968         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7969
7970 2003-06-19  Borut Razem <borut.razem AT siol.net>
7971
7972         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7973
7974 2003-06-19  Borut Razem <borut.razem AT siol.net>
7975
7976         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7977         fixed Z80 port - crt0.o: cannot open.
7978
7979 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7980
7981         * support/Util/MySystem.c (merge_command): revert bad fix
7982
7983 2003-06-18  Borut Razem <borut.razem AT siol.net>
7984
7985         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7986
7987 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7988
7989         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7990         option --use-stdout sends errors to stdout instead of stderr.
7991
7992 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7993
7994         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7995
7996 2003-06-15  Borut Razem <borut.razem AT siol.net>
7997
7998         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7999         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8000         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8001         fixed width array of pointers replaced with sets;
8002         multiple include and lib paths ared transferred to preprocessor and linker
8003         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8004         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8005         fixed width array of pointers
8006         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8007         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8008         fixupPath(), getPathDifference()
8009         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8010         fixed width array of pointers
8011
8012 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8013
8014         * src/pic16/ralloc.c: fix warnings
8015         * src/pic16/pcode.c: fix warning
8016
8017 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8018
8019          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8020         know all the details, but essentially this set of changes enable
8021         the pic16 port to generate movff instructions and generate assembler
8022         directives,
8023         * src/SDCCmain.c:
8024         * src/pic16/gen.c:
8025         * src/pic16/glue.c:
8026         * src/pic16/pcode.c:
8027         * src/pic16/device.c:
8028         * src/pic16/main.c:
8029         * src/pic16/pcode.h:
8030         * src/pic16/pcoderegs.c:
8031         * src/pic16/ralloc.c:
8032         * src/pic16/ralloc.h:
8033
8034 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8035
8036         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8037         added option --vc, so sdcc errors and warnings are compatible with
8038         Microsoft Visual Studio.
8039
8040 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8041
8042         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8043           device/lib/libfloat.lib: added atof function.
8044
8045 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8046
8047         * doc/sdccman.lyx: updated to Lyx 1.3
8048         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8049         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8050         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8051
8052 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8053
8054         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8055
8056 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8057
8058         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8059           additions to the "related tools/documentation" section
8060
8061 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8062
8063         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8064
8065 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8066
8067         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8068         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8069
8070 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8071
8072         * doc/sdccman.lyx: fix double dash and other minor things
8073         * doc/Makefile: fix double dash
8074
8075 2003-05-28  Karl Bongers(patches from Martin Helmling)
8076         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8077           condition and ignore commands.
8078
8079 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8080
8081         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8082           is in parts still quite out of date, I did changes as far as I felt makes sense
8083           for a non-native english speaker.
8084           Please feel free to add to the manual or to correct my changes.
8085         * doc/Makefile: undid touching the date of intermediate tex files.
8086
8087 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8088
8089         * doc/sdccman.lyx: Manual has an index now
8090
8091 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8092
8093         Finalize muluint/mulsint and mululong/mulslong merging:
8094         * device/lib/_mulint.c
8095         * device/lib/_mullong.c
8096         * device/lib/gbz80/mul.s
8097         * device/lib/gbz80/stubs.s
8098         * device/lib/z80/mul.s
8099         * device/lib/z80/stubs.s
8100         * src/SDCCsymt.c (initCSupport)
8101
8102 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8103
8104         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8105         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8106           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8107           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8108           instead of /Zm500.
8109
8110 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8111
8112         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8113           the regression tests I'm not brave enough to enable 245.b, 245.c
8114         * doc/sdccman.lyx: added latex preamble for hyperref package.
8115           Using pdflatex this will give you a hyperlinked pdf file with
8116           bookmarks. (prepend '%' before /usepackage if this breaks something)
8117
8118 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8119
8120          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8121
8122 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8123
8124         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8125
8126 2003-05-21    <johan AT balder>
8127
8128         * src/SDCCglue.c (printIval): fixed bug #739934
8129
8130 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8131
8132         Applied patch from bug 737905 (renamed yylineo to mylineno):
8133         * src/altlex.c
8134         * src/SDCCast.c
8135         * src/SDCglobl.h
8136         * src/SDCC.lex
8137         * src/SDCCsymt.c
8138         * src/SDCCval.c
8139         * src/pic16/pcode.c: Cleaned warnings
8140         * src/pic16/pcodeflow.c: Cleaned warnings
8141         * src/pic16/pcoderegs.c: Cleaned warnings
8142
8143 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8144
8145         * src/pic16/pcode.c: Cleaned warnings
8146         * src/pic16/pcodepeep.c: Cleaned warnings
8147         * src/pic16/ralloc.c: Cleaned warnings
8148
8149 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8150
8151         * doc/sdccman.lyx: fixed bug 739745
8152         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8153
8154 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8155
8156         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8157         it can be defined with CFLAGS when running configure
8158         * src/SDCCmain.c: fixed compiling + linking with object files
8159
8160 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8161
8162         * configure.in: configure for pic16 port,
8163             added --disable-pic16-port
8164         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8165         * src/SDCCmain.c: linkOptions is changed to set *,
8166             added if/endif conditional macros to remove options help
8167             messages from optionsTable when a port is not configured, added
8168             support for the PIc16 port in the ports table, when executing
8169             the compiler with no port specified on command line, a default
8170             port is selected with the new macro DEFAULT_PORT which is
8171             defined in port.h, in setDefaultOptions() linkOptions is removed
8172             from initialization assignment, since now it is a set,
8173             parseCmdLine uses setParseWithComma for linkOptions, in
8174             linkEdit() linkOptions are accessed with new function indexSet()
8175             which returns the i'th item of a set variable. See SDCCset.c, in
8176             linkEdit() when calling buildCmdLine(), added linkOptions as
8177             last argument. Now users can pass arguments to gplink via the
8178             -Wl option, main() uses pic16glue() to glue up pic16 programs
8179         * src/SDCCpeeph.c: various changes to support pic16
8180         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8181             return the i'th item of the set
8182         * src/SDCCset.h: added function prototype for indexSet()
8183         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8184         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8185         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8186             added macro DEFAULT_PORT
8187         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8188         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8189             generated
8190         * src/pic16/glue.c: commented out some error producing lines
8191         * src/pic16/main.c: __config directives are commented out to stop
8192             gpasm complaining and test the linkage with gplink, _linkCmd and
8193             _asmCmd changed to be more gplink and gpasm friendly
8194         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8195             produced an error when parsed, peep rule 12 is added to utilize
8196             movff, but it is commented out since the pCode does not support
8197             yet a command with 2 address arguments
8198
8199 2003-05-18    <johan AT balder>
8200
8201         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8202         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8203 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8204
8205         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8206   Added feature to script commands from file.
8207
8208 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8209
8210         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8211         * src/SDCCutil.c: include ctype.h for win32
8212
8213 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8214
8215         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8216
8217 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8218
8219         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8220   Fixed so you can set breakpoints prior to run, run does not stop
8221   on entry now.  Add tbreak.  Other enhancements and fixes for use
8222   with ddd.
8223
8224 2003-05-12  Borut Razem <borut.razem AT siol.net>
8225
8226         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8227
8228 2003-05-11  Borut Razem <borut.razem AT siol.net>
8229
8230         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8231         the path of bin directory, so that PATH is the only env. variable, which has to be set
8232         in case of standard installation.
8233         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8234         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8235         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8236
8237 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8238
8239         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8240         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8241         temp files are in the port dir; clean the gen/test directory when
8242         generating new test.c
8243         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8244         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8245         * support/regression/tests/zeropad.c: added
8246
8247 2003-05-09    <johan AT balder>
8248
8249         * src/SDCCglue.c: fixed bug #597940
8250
8251 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8252
8253         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8254   cache sfr, optimize next,step, fix off by one sourceline,
8255   support ddd list function.
8256         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8257
8258 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8259
8260         * support/regression/HTMLgen.py: added compare_s2f()
8261         * support/regression/Makefile: redo 1.27
8262         * support/regression/generate-cases.py: redo 1.5
8263
8264 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8265
8266         * support/regression/tests/float.c: workaround 33 bit hex constant
8267         * support/regression/tests/simplefloat.c: fix division for host
8268
8269 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8270
8271         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8272         that tame's the PIC's over-aggressive optimizer.
8273
8274 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8275
8276          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8277          support for MSVC.
8278
8279 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8280
8281         Initial support for DS80C400. "Hello world" runs on TINIm400
8282         (with polled I/O).
8283
8284 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8285
8286          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8287          * Some notes on ddd usage added in debugger/README
8288          Martin Helmling adding more features and fixes for ddd GUI debugger.
8289          Code added for nexti, stepi, up, down, and other adjustments.
8290
8291 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8292
8293         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8294         * src/pic/peeph.def Added two rules to optimize carry manipulation
8295         * src/pic/* removed debug printfs
8296
8297 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8298
8299         * debugger/mcs51/cmd.c: added header newalloc.h
8300
8301 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8302
8303         * as/Makefile: new EXEEXT
8304         * as/z80/Makefile: remove trailing slash of BUILDIR
8305         * as/z80/clean.mk: new EXEEXT
8306         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8307         * support/cpp2/Makefile.in: new EXEEXT
8308         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8309
8310 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8311
8312         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8313         EXEEXT was introduced to fix all related problems with targets
8314         "clean", "install" and "uninstall"; a couple of further flaws
8315         especially with "clean" have been fixed too
8316         * as/mcs51/Makefile.in
8317         * as/mcs51/clean.mk
8318         * as/z80/Makefile
8319         * Makefile
8320         * clean.mk
8321         * debugger/mcs51/Makefile.in
8322         * debugger/mcs51/clean.mk
8323         * link/z80/Makefile
8324         * link/z80/Makefile.in
8325         * link/z80/clean.mk
8326         * link/Makefile
8327         * packihx/Makefile.in
8328         * packihx/clean.mk
8329         * sim/ucsim/Makefile
8330         * sim/ucsim/clean.mk
8331         * sim/ucsim/avr.src/Makefile.in
8332         * sim/ucsim/avr.src/clean.mk
8333         * sim/ucsim/s51.src/Makefile.in
8334         * sim/ucsim/s51.src/clean.mk
8335         * sim/ucsim/xa.src/Makefile.in
8336         * sim/ucsim/xa.src/clean.mk
8337         * sim/ucsim/z80.src/Makefile.in
8338         * sim/ucsim/z80.src/clean.mk
8339         * sim/ucsim/main_in.mk
8340         * sim/ucsim/packages_in.mk
8341         * sim/ucsim/gui.src/Makefile.in
8342         * sim/ucsim/gui.src/serio.src/Makefile.in
8343         * sim/ucsim/gui.src/serio.src/clean.mk
8344         * src/Makefile.in
8345         * src/clean.mk
8346         * support/cpp2/Makefile.in
8347         * support/cpp2/clean.mk
8348         * support/makebin/Makefile
8349         * support/makebin/clean.mk
8350         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8351         * doc/sdccman.lyx: --program-suffix no longer needed
8352
8353 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8354
8355          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8356          Martin Helmling added support for ddd GUI debugger.
8357          Code added to display assembly, set variables, and other commands
8358          to interface to ddd.
8359
8360 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8361
8362         * as/Makefile: fix target clean
8363         * as/clean.mk: fix target clean
8364         * as/z80/clean.mk: fix target clean
8365
8366 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8367
8368         * Makefile.common.in: added  AT EXEEXT AT
8369         * configure.in: removed all mingw32 stuff
8370         * configure: rebuilt from configure.in
8371         * doc/sdccman.lyx: updated section "installation"
8372         * support/scripts/sdcc_mingw32: adapted to configure
8373         * support/scripts/sdcc_cygwin_mingw32: added
8374
8375 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8376
8377         * src/pic Added object file support for the PIC port
8378         * src/pic Applied patch from Craig Franklin (this started the object file support)
8379         * src/regression Updated the PIC regression tests for object files
8380
8381 2003-04-20  Borut Razem <borut.razem AT siol.net>
8382
8383         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8384           lklex.c: In function `getfid':
8385           lklex.c:203: warning: array subscript has type `char'
8386         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8387           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8388         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8389           stack handling macros
8390
8391 2003-04-19  Borut Razem <borut.razem AT siol.net>
8392
8393         * "handling space characters in file path" task:
8394         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8395         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8396         * support/Util/MySystem.h: make it self-sufficient
8397         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8398           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8399           handling space characters in file path
8400         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8401           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8402         * support/Util/MySystem.c: handling space characters in executable's path
8403
8404 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8405
8406         * as/z80/Makefile: fix permanent rebuild of z80
8407         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8408         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8409
8410 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8411
8412         * src/SDCCopt.c: add special case optimization to replace modulo by
8413           a power of two with a bitwise AND.
8414
8415 2003-04-18    <johan AT balder>
8416
8417         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8418
8419 2003-04-17    <johan AT balder>
8420
8421         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8422         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8423
8424 2003-04-13  Borut Razem <borut.razem AT siol.net>
8425
8426         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8427         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8428           fixed mingw problem in adl_NORMALIZE_PATH
8429
8430 2003-04-12  Borut Razem <borut.razem AT siol.net>
8431
8432         * fixed "#pragma SAVE/RESTORE can not be nested":
8433         * src/SDCC.lex: reworked pragma handling functions
8434         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8435         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8436
8437 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8438
8439         * src/SDCCutil.c (pathEquivalent): defined but not used
8440         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8441         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8442         * configure: rebuilt from configure.in
8443         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8444         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8445         * device/include/Makefile.in: replace sdcc_datadir
8446         * device/lib/Makefile.in: replace sdcc_datadir
8447         * Makefile.common.in: add LDFLAGS from configure
8448         * packihx/Makefile.in: use LDFLAGS
8449         * src/Makefile.in: use LDFLAGS
8450         * support/cpp2/Makefile.in: add LDFLAGS from configure
8451         * support/makebin/Makefile: use LDFLAGS
8452         * .version: bumped version number to 2.3.5
8453
8454 2003-04-12  Borut Razem <borut.razem AT siol.net>
8455
8456         * completed "different paths" task:
8457         * src/SDCCmacro.c: fixed bug in handling quotes
8458         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8459         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8460
8461 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8462
8463         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8464
8465 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8466
8467         * ds390/gen.c ds390/peeph.def: fix bug 706781
8468
8469 2003-04-11  Borut Razem <borut.razem AT siol.net>
8470
8471         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8472
8473 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8474
8475         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8476         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8477          set - this bit used to not be set...).
8478         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8479           bad code in PIC Port
8480         * src/regression/and2.c added to test bug 609268
8481         * src/regression/Makefile added and2.c to regression test
8482
8483
8484 2003-04-08    <johan AT CP255758-A>
8485
8486         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8487         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8488         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8489
8490 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8491
8492         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8493         fix bug #487815
8494         * support/cpp2/Makefile.in: fix bug #487815
8495         * configure: rebuilt from configure.in
8496         * Makefile.common.in: docdir changed, new path suffixes
8497         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8498         * sdcc_vc_in.h: reflect changes from sdccconf.h
8499         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8500         * src/SDCCutil.h: remove BINDIR hack
8501         * doc/sdccman.lyx: update new path hierarchy
8502
8503 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8504
8505         * src/SDCCpeeph.c: added okToRemoveSLOC test
8506
8507 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8508
8509         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8510
8511 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8512
8513         * src/SDCCpeeph.c: added labelIsReturnOnly test
8514         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8515
8516 2003-04-05    <johan AT balder>
8517
8518         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8519         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8520         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8521         * src/SDCCast.c: fixed a warning
8522         * src/SDCCast.h: fixed a warning
8523         * src/SDCCicode.c (operandFromAst): fixed a warning
8524
8525 2003-04-04    <johan AT balder>
8526
8527         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8528         * src/SDCCast.c (decorateType): fixed bug #715076
8529         * src/SDCC.y: fixed bug #702907
8530
8531 2003-04-03    <johan AT balder>
8532
8533         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8534         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8535         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8536         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8537         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8538
8539 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8540
8541         * _decdptr.c: fix return values
8542         * _gptrget.c: fix return values
8543         * _gptrgetc.c: fix return values
8544         * _gptrput.c: fix return values
8545         * _mulint.c: fix return values
8546         * as/z80/Makefile: fix 'make -j' problem
8547
8548 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8549
8550         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8551         * configure.in: big cleanup, updated to autoconf 2.5x
8552         * configure: rebuilt from configure.in
8553         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8554         * sdcc_vc_in.h: reflect changes from sdccconf.h
8555         * doc/Makefile: fixed a flaw in "make install"
8556
8557 2003-04-02    <johan AT balder>
8558
8559         * src/ds390/gen.c (genCmp): no comments
8560         * src/mcs51/gen.c (genCmp): no comments
8561         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8562         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8563
8564 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8565
8566         * support/regression/generate-cases.py: place generated file in given sub directory
8567         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8568         * support/regression/Makefile: improvements for 'make -j';
8569         side effect: it's simpler and faster now
8570
8571 2003-03-31  Borut Razem <borut.razem AT siol.net>
8572
8573         * src/z80/main.c: link-{port} and as-{port} defined without path
8574         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8575
8576 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8577
8578         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8579
8580 2003-03-30  Borut Razem <borut.razem AT siol.net>
8581
8582         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8583           changed type of list parameter to set
8584         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8585         * src/port.h: changed type of do_assemble() parameter to set
8586         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8587           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8588           definition of "cppoutfilename" macro with NULL value in preProcess()
8589         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8590         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8591         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8592           replaced with set *binPathSet
8593         * shash_add() deallocates the item, if allready exsists, before adding the new one
8594         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8595
8596 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8597
8598         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8599           a nested for loop bug in the PIC port
8600         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8601           for loops
8602
8603 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8604
8605         * support/Util/dbuf.h: remove C++ stuff to make it portable
8606
8607 2003-03-28  Borut Razem <borut.razem AT siol.net>
8608
8609         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8610           literal strings in stringLiteral()
8611         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8612         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8613           to the project
8614
8615 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8616
8617         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8618
8619 2003-03-26    <johan AT balder>
8620
8621         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8622         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8623         * src/SDCCast.c (decorateType): fixed " -v < 3"
8624
8625 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8626
8627         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8628         Added Lenny Story's debug infrastructure changes:
8629         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8630         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8631         * src/cdbFile.c: added
8632         * src/SDCCdebug.c: added
8633         * src/SDCCdebug.h: added
8634         * src/SDCCast.c (createFunction)
8635         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8636         * src/SDCCmain.c (parseCmdLine, main)
8637         * src/SDCCmem.c (redoStackOffsets)
8638         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8639         * src/SDCCsymt.h
8640         * src/common.h
8641         * src/avr/gen.c (genAVRCode)
8642         * src/ds390/gen.c (gen390Code)
8643         * src/mcs51/gen.c (gen51Code)
8644         * src/pic/gen.c (genpic14Code)
8645         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8646         * src/xa51/gen.c (genXA51Code)
8647         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8648
8649 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8650
8651         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8652         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8653
8654 2003-03-22    <johan AT balder>
8655
8656         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8657
8658 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8659
8660         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8661         * doc/cdbfileformat.lyx: added, written by Lenny Story
8662         * doc/Makefile: added cdbfileformat.lyx
8663         * doc/clean.mk: added cdbfileformat.lyx
8664
8665 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8666
8667         * src/mcs51/peeph.def: fix bug #705773
8668
8669 2003-03-20    <johan AT balder>
8670
8671         An sfr/sbit can have an "at #" AND an initializer
8672         * src/SDCCsymt.c (checkSClass):
8673         * src/SDCCmem.c (allocGlobal):
8674         * src/SDCCmem.c (allocLocal):
8675         * src/SDCCast.c (createBlock):
8676
8677 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8678
8679         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8680
8681 2003-03-16    <johan AT balder>
8682
8683         Undid the hackup of const and volatile, the problem is much bigger
8684         * src/SDCC.y:1.65
8685         * src/SDCCast.c:1.171
8686         * src/SDCCglue.c:1.138
8687         * src/SDCCicode.c:1.146
8688         * src/SDCCsymt.c:1.150
8689         * src/SDCCval.c:1.65
8690
8691 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8692
8693         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8694         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8695
8696 2003-03-13    <johan AT balder>
8697
8698         Hackup const and volatile modifiers in type chains a bit:
8699         * src/SDCC.y:1.63
8700         * src/SDCCast.c:1.169
8701         * src/SDCCglue.c:1.136
8702         * src/SDCCicode.c:1.143
8703         * src/SDCCsymt.c1.146
8704         * src/SDCCsymt.h1.59
8705         * src/SDCCval.c:1.63
8706
8707 2003-03-12    <johan AT balder>
8708
8709         * src/SDCCBBlock.h: more LRH debugging junk
8710         * src/SDCCcflow.h: more LRH debugging junk
8711         * src/SDCCloop.c: more LRH debugging junk
8712         * src/SDCC.y (struct_declaration): fixed bug #697590
8713         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8714         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8715         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8716
8717 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8718         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8719         test function names must now match exactly).
8720         * src/SDCCcse.c: added special case in findCheaperOp to allow
8721         extending a short integer. Makes less awful code for bug 700121 test case.
8722
8723 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8724
8725         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8726         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8727
8728 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8729
8730         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8731         actually called (operandsNotEqual() was called for all
8732         operandsNotEqualX tests).
8733
8734 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8735
8736         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8737         with shorter literals. Fixes bug 700121.
8738
8739 2003-03-11    <johan AT balder>
8740
8741         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8742
8743 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8744
8745         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8746         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8747
8748 2003-03-10  Borut Razem <borut.razem AT siol.net>
8749
8750         * src/SDCCmain.c: pipe preprocessor's output
8751         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8752         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8753         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8754         which closes all pipes in pipeSet set
8755         * src/SDCCset.c: free deleted item in function deleteSetItem()
8756         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8757         moved from z80 to src subproject
8758         * .version: increased version number to 2.3.4
8759
8760 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8761
8762         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8763         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8764         * support/regression/ports/xa51/spec.mk: fix typo
8765
8766 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8767
8768         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8769
8770 2003-03-09  Borut Razem <borut.razem AT siol.net>
8771
8772         * src/SDCCmain.c: pipe preprocessor's output
8773         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8774         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8775         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8776         which closes all pipes in pipeSet set
8777         * src/SDCCset.c: free deleted item in function deleteSetItem()
8778         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8779         moved from z80 to src subproject
8780
8781 2003-03-09  Borut Razem <borut.razem AT siol.net>
8782
8783         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8784         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8785         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8786         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8787         * src/SDCCglobl.h: unification of WIN32 native definitions
8788
8789 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8790
8791         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8792
8793 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8794
8795         * src/configure.in:   check for endianess (even while cross-compiling)
8796         * src/configure:      check for endianess (even while cross-compiling)
8797         * src/configure_in.h: check for endianess (even while cross-compiling)
8798         * src/avr/gen.c:        remove old endianess stuff
8799         * src/mcs51/gen.c:      remove old endianess stuff
8800         * src/ds390/gen.c:      remove old endianess stuff
8801         * src/pic/gen.c:        remove old endianess stuff
8802         * src/pic/genarith.c:   remove old endianess stuff
8803         * src/pic/glue.c:       fix endianess check
8804         * src/pic16/gen.c:      remove old endianess stuff
8805         * src/pic16/genarith.c: remove old endianess stuff
8806         * src/pic16/glue.c:     fix endianess check
8807         * src/xa51/gen.c:       remove old endianess stuff
8808         * src/z80/gen.c:        fix endianess check
8809         * src/SDCCglue.c:       fix endianess check
8810         * src/ds390/peeph.def: fix bug 700036
8811
8812 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8813
8814         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8815         * src/configure: find appropriate data-types on host for SDCC's int and long
8816         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8817         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8818         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8819
8820 2003-03-07    <johan AT balder>
8821
8822         Just a big NOOP:
8823                 some minor cleanups before the big shot
8824                 OP_DEFS and OP_USES now use Kevin's protection
8825                 new option --nolabelopt
8826
8827         * src/SDCCBBlock.c:
8828         * src/SDCCast.c,:
8829         * src/SDCCcflow.c:
8830         * src/SDCCcse.c:
8831         * src/SDCCicode.c:
8832         * src/SDCCicode.h:
8833         * src/SDCClabel.c:
8834         * src/SDCCloop.c:
8835         * src/SDCCmain.c:
8836         * src/ds390/ralloc.c:
8837         * src/mcs51/ralloc.c:
8838         * src/pic/ralloc.c:
8839         * src/xa51/ralloc.c:
8840         * src/z80/ralloc.c:
8841
8842 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8843
8844         * src/pic/pcode.c (get_op): fix 64 bit warnings
8845         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8846         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8847         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8848         * support/regression/tests/malloc.c: fix 64 bit warnings
8849
8850 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8851
8852         * src/mcs51/gen.c (genMinus): fixed bug 696436
8853
8854 2003-03-02  Borut Razem <borut.razem AT siol.net>
8855
8856         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8857
8858 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8859
8860         * configure.in: test for mkstemp
8861         * sdccconf_in.h: add HAVE_MKSTEMP
8862
8863 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8864
8865         * device/include/ctype.h: removed warning while using --stack-auto
8866         * device/include/malloc.h: removed warning while using --stack-auto
8867         * device/include/string.h: removed warning while using --stack-auto
8868
8869 2003-02-23  Borut Razem <borut.razem AT siol.net>
8870
8871         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8872         because NDEBUG is defined (see man assert)
8873         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8874
8875 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8876
8877         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8878         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8879
8880 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8881
8882         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8883         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8884
8885 2003-02-18    <johan AT balder>
8886
8887         * as/mcs51/asmain.c (asmbl): module can start with a digit
8888         * as/z80/asmain.c (asmbl): module can start with a digit
8889
8890 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8891
8892         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8893         * src/asm.c: fix pipe() for Mingw32
8894
8895 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8896
8897         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8898         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8899         make -V work again; --c1mode reads now from stdin
8900         * doc/sdccman.lyx: added --c1mode
8901         * support/Util/SDCCerr.c: new messages for c1 mode
8902         * support/Util/SDCCerr.h: new messages for c1 mode
8903         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8904
8905 2003-02-15    <johan AT balder>
8906
8907         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8908
8909 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8910
8911         * doc/sdccman.lyx: Environment variables, -o and other minor things
8912
8913 2003-02-14    <johan AT balder>
8914
8915         * src/xa51/main.c: before anyone really tries to use it :)
8916
8917         * Install doc's in share/sdcc/doc
8918         * removed some obsolete files
8919         * Do a proper make distclean and uninstall
8920         M Makefile.common.in
8921         R sdccbuild.sh
8922         M as/Makefile
8923         M device/include/Makefile.in
8924         M device/lib/Makefile.in
8925         M doc/sdccman.lyx
8926         M link/Makefile
8927         M sim/ucsim/doc/Makefile.in
8928         M src/clean.mk
8929         R src/avr/peeph.rul
8930         R src/xa51/peeph.rul
8931         M support/cpp2/Makefile.in
8932         M support/makebin/Makefile
8933
8934
8935 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8936
8937         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8938
8939 2003-02-10  Borut Razem <borut.razem AT siol.net>
8940
8941         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8942         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8943         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8944         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8945         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8946         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8947         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8948         src/z80/Makefile.bcc: Borland Makefile cleanup
8949         * as/z80/Makefile.bcc: Added Borland Makefile
8950         * support/cpp2/borland.h: Removed
8951
8952 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8953
8954         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8955         * src/SDCC.lex: new pragma NOIV
8956         * src/SDCCglobl.h: new pragma NOIV
8957         * src/SDCCmem.c: new pragma NOIV
8958
8959 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8960
8961         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8962
8963 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8964
8965         * src/SDCCmain.c: signal handling is switched off by --debug
8966         * doc/Makefile: small fix for install; use clean.mk again
8967         * doc/clean.mk: clean *.pdf and *.html too
8968
8969 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8970
8971         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8972         * device/lib/printfl.c: fix a ds390 bug by making it portable
8973         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8974         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8975         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8976         * debugger/mcs51/cmd.c: converted multi-line string literals
8977         * sim/ucsim/globals.cc: converted multi-line string literals
8978         * src/SDCCmain.c: introduced signal handler to remove temp files
8979         * doc/Makefile: small tweaks, implement clean
8980         * doc: removed generated files
8981
8982 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8983
8984         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8985         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8986         Address Record is not correctly generated for DS390."
8987
8988 2003-02-02  Borut Razem <borut.razem AT siol.net>
8989
8990         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8991         * as/mcs51/asm.h: fixed compilation with Borland C
8992         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8993         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8994         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8995         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8996         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8997         src/z80/Makefile.bcc: delete $(LIB) only if exist
8998         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8999
9000 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9001
9002         * device/include/malloc.h: introduced NULL
9003         * device/include/string.h: introduced NULL
9004         * device/include/stdlib.h: introduced NULL
9005         * device/lib/_memcpy.c: removed NULL
9006         * device/lib/_strcat.c: removed NULL
9007         * device/lib/_strchr.c: removed NULL
9008         * device/lib/_strcmp.c: removed NULL
9009         * device/lib/_strcpy.c: removed NULL
9010         * device/lib/_strcspn.c: removed NULL
9011         * device/lib/_strlen.c: removed NULL
9012         * device/lib/_strncat.c: removed NULL
9013         * device/lib/_strncmp.c: removed NULL
9014         * device/lib/_strncpy.c: removed NULL
9015         * device/lib/_strpbrk.c: removed NULL
9016         * device/lib/_strrchr.c: removed NULL
9017         * device/lib/_strspn.c: removed NULL
9018         * device/lib/_strstr.c: removed NULL
9019         * device/lib/_strtok.c: removed NULL
9020         * device/lib/malloc.c: removed NULL, include own header
9021
9022 2003-02-02    <johan AT balder>
9023
9024         * 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
9025         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9026         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9027         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9028         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9029         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9030
9031 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9032
9033         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9034         area 'DATA'"
9035
9036 2003-02-01    <johan AT balder>
9037
9038         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9039
9040 2003-01-31    <johan AT CP255758-A>
9041
9042         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9043
9044 2003-01-30    <johan AT balder>
9045
9046         * src/SDCCBBlock.c: automatic bug detection
9047         * src/SDCCicode.c: automatic bug detection
9048
9049 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9050
9051         * src/SDCCglobl.h:   now --xram-size 0 works
9052         * src/SDCCmain.c:    now --xram-size 0 works
9053
9054 2003-01-29    <johan AT balder>
9055
9056         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9057
9058 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9059
9060         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9061         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9062         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9063         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9064         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9065         * src/SDCCmain.c:    Added options --xram-size and --code-size
9066
9067 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9068
9069         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9070         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9071
9072 2003-01-27    <johan AT balder>
9073
9074         * src/SDCC.y: fixed bug #613764
9075
9076 2003-01-26    <johan AT balder>
9077
9078         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9079         * src/SDCCsymt.h: fixed bug #673374
9080         * src/SDCCglue.c: fixed bug #661910
9081         * src/SDCCast.c: fixed bug #458099 and 673374
9082
9083 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9084
9085         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9086         * as/mcs51/strcmpi.h: added
9087         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9088         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9089         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9090         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9091         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9092         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9093         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9094         * as/mcs51/Makefile.aslink: new module strcmpi
9095         * as/mcs51/Makefile.asx8051: new module strcmpi
9096         * as/mcs51/Makefil.bcc: new module strcmpi
9097         * as/mcs51/Makefile.in: new module strcmpi
9098         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9099
9100 2003-01-26    <johan AT balder>
9101
9102         * src/SDCCglue.c: reverted back to 1.124
9103         * src/SDCCast.c: reverted back to 1.156
9104         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9105
9106 2003-01-25    <johan AT balder>
9107
9108         * src/SDCCglue.c: A better fix for bug #661910
9109         * src/SDCCast.c: A better fix for bug #661910
9110         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9111
9112 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9113
9114         * src/Makefile.in: remove spawn.o
9115         * src/SDCCmain.c: remove spawn.h
9116         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9117         * src/spawn.c: removed
9118         * src/spawn.h: removed
9119         * support/regression/ports/ds390/spec.mk: link with -r
9120
9121 2003-01-24    <johan AT CP255758-A>
9122
9123         * src/ds390/gen.c (aopOp): fixed bug #667458
9124         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9125         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9126         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9127
9128 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9129
9130         * src/mcs51/peeph.def: better assembler identation by Frieder
9131         * src/mcs51/gen.c: better assembler identation by Frieder
9132
9133 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9134
9135         * as/z80/string.h: removed for gcc 3.2
9136         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9137         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9138
9139 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9140
9141         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9142         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9143         * support/regression/Makefile: separate temp files for ports
9144         * support/regression/generate-cases.py: separate temp files for ports
9145         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9146         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9147
9148 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9149
9150         * moved tinitalk to device/examples/ds390
9151
9152 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9153
9154         * as/mcs51/lkmem.c: rflag is for DS390
9155         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9156         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9157                          (linkEdit): move mem- and map-files the same way as ihx-files
9158         * src/z80/main.c (_setDefaultOptions): removed --generic
9159         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9160         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9161         * src/pic/glue.c (picglue): --c1mode works again
9162         * src/pic16/glue.c (pic16glue): --c1mode works again
9163         * src/asm.c (printCLine): fix #660034
9164
9165 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9166
9167         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9168         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9169         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9170         * as/mcs51/lkmem (summary): better fix for sp problem
9171         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9172         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9173         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9174                                               remove --stack-after-data
9175
9176 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9177
9178         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9179         * src/SDCCutil.c (join): ugly bug: missing '\0'
9180         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9181
9182 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9183
9184         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9185         * src/port.h: typo
9186         * src/pic/main.c (_asmCmd): gpasm supports -o
9187         * src/z80/main.c: more general macros
9188         * device/lib/Makefile.in: remove intermediate files
9189
9190 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9191
9192         * .version: Bumped version number to 2.3.3
9193         * src/SDCCBBlock.c: new option -o
9194         * src/SDCCglobl.h: new option -o
9195         * src/SDCCglue.c: new option -o
9196         * src/SDCCmain.c: new option -o
9197         * src/asm.c: new option -o
9198         * src/ds390/main.c: new option -o
9199         * src/pic/glue.c: new option -o
9200         * src/pic/pcode.c: new option -o
9201         * src/pic/ralloc.c: new option -o
9202         * src/pic16/glue.c: new option -o
9203         * src/pic16/pcode.c: new option -o
9204         * src/pic16/ralloc.c: new option -o
9205         * src/z80/main.c: new option -o
9206         * device/lib/Makefile.in: use -o
9207         * support/regression/ports/ds390/spec.mk: use -o
9208         * support/regression/ports/gbz80/spec.mk: use -o
9209         * support/regression/ports/mcs51/spec.mk: use -o
9210         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9211         * support/regression/ports/z80/spec.mk: use -o
9212         * support/regression/ports/ucz80/spec.mk: use -o
9213         * support/regression/ports/xa51/spec.mk: use -o
9214         * support/regression/fwk/lib/timeout.c: fix usage string
9215
9216 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9217         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9218
9219 2003-01-07    <johan AT balder>
9220
9221         * src/SDCCast.c (decorateType): fixed bug #600035
9222
9223 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9224         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9225         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9226         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9227         * src/pic/pcode.c: outcommented unused variable to remove warnings
9228         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9229
9230 2003-01-06    <karl AT turbobit.com>
9231         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9232    regression tests.
9233
9234 2003-01-06    <johan AT balder>
9235
9236         * src/SDCCicode.c: fixed array add
9237
9238 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9239         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9240         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9241
9242 2003-01-04    <johan AT balder>
9243
9244         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9245
9246 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9247         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9248
9249 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9250         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9251         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9252
9253 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9254         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9255
9256 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9257         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9258
9259 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9260         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9261
9262 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9263
9264     * in \sdcc\as\mcs51\ changed these files in order to create an
9265     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9266     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9267     following files to include the previous two files: aslink.dsp,
9268     Makefile.aslink, Makefile.bcc, and Makefile.in.
9269
9270     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9271     .adb instead of .cdb
9272
9273 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9274
9275         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9276         value from option --iram-size.
9277
9278 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9279
9280         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9281         dram[] array.
9282
9283 2002-09-18    <wiml AT hhhh.org>
9284
9285         * SDCClrange.h: exposed setFromRange() and setToRange()
9286         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9287           packRegsForAccUse() (bug 542397)
9288         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9289           multiple times and emitting the fetch operations more than once
9290           added aopGetUsesAcc() function to allow binary operators to
9291           fetch their operands in the correct order; made genMinus() emit
9292           compact code for X = LITERAL - Y
9293
9294 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9295         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9296         sprintf() in line 1267.
9297
9298 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9299         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9300         like ports.
9301
9302 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9303         Changes to aslink (All the changes are marked with 'JCF'):
9304
9305         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9306         summary().
9307
9308         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9309         area BSEG.  Also moves, if possible, the DATA area down into the internal
9310         ram so more space is available.
9311
9312         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9313         sflag.
9314
9315         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9316         not bytes.  Function summary() which creates a memory usage summary
9317         file with extension .mem.  Reports of overlaping stack and small stack
9318         size.  If the space for the stack is less than 16 bytes aslink trows a
9319         warning.
9320
9321         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9322         the 8051.  Option 'y' for memory summary output file.
9323
9324         Changes to sdcc (All the changes are marked with 'JCF'):
9325
9326         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9327
9328         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9329         overlaying area for it (uses RegBankUsed[4]).
9330
9331         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9332         bank zero as used by default.  By default aslink locates the stack
9333         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9334         the creation of the .mem file.  Delegates the allocation of data area
9335         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9336         the begining of the stack area to aslink.
9337
9338         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9339         glue() in SDCCglue.c creates an area for it.
9340
9341 2002-09-03  Borut Razem <borut.razem AT siol.net>
9342         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9343         sdcc/src/pic/glue.c:
9344         introduced atexit() handler for teporay files removal in case of
9345         errors, assertions, ...
9346
9347 2002-08-29  Borut Razem <borut.razem AT siol.net>
9348         * sdcc/support/cpp2/auto-host_vc_in.h:
9349         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9350         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9351         Maybe there is a similar problem with BORLANDC? It should be checked!
9352
9353         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9354         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9355         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9356         was not executed, and the compiler (cl) launched a warning:
9357         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9358
9359 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9360         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9361
9362 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9363         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9364
9365         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9366           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9367           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9368           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9369           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9370           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9371           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9372         - added Release configuration in VS projects
9373         - review of compiler an linker options
9374         - VC .exe files are generated in bin_vc directory, not to interfere
9375           with binaries generated from other projects (cygwin, mingw, bcc ...)
9376
9377         * sdcc/src/yacc.dsp: added
9378
9379         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9380         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9381         and insert the version number definitions from .version
9382
9383         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9384
9385         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9386         added - genarate auto-host.h using auto-host_vc_in.h as template
9387
9388         * sdcc/sdcc_vc.h,
9389         removed from CVS, generated automatically
9390
9391 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9392         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9393
9394 2002-08-11  Borut Razem <borut.razem AT siol.net>
9395         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9396
9397 2002-08-10  Borut Razem <borut.razem AT siol.net>
9398         * src/SDCCmain.c (main):
9399         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9400         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9401         The consequence was that some temporary files were not removed.
9402
9403         * src/SDCCglue.c:
9404         unification of code in functions tempfilename() and tempfile():
9405         function tempnam() is defined in Visual Studio 6.0 and .NET
9406
9407         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9408
9409         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9410           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9411         - removed compiler command line option /WX: Treats all warnings as errors
9412         - update a list of source files, included into the project
9413
9414         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9415           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9416         changed project type to Generic Project so that can be correcly converted to VS.NET project
9417
9418         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9419
9420         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9421
9422         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9423
9424         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9425         added return 0 statements after assert() to make compiler happy
9426
9427         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9428         added newline in the def file to keep MSC compiler satisfied
9429
9430         * sdcc/src/z80/gen.c:
9431         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9432           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9433         - solved MSC error in function aopDump()
9434
9435         * sdcc_vc.h: define PREFIX as "\\sdcc"
9436
9437 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9438         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9439
9440 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9441         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9442         - Rewrote the register banking algorithm.
9443         - Added pCode live-range analysis to registers (for now, only non-used and
9444         singly-used registers optimized away)
9445
9446         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9447
9448         * 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.
9449
9450 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9451         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9452
9453 2002-04-22  Michael Hope  <michaelh AT vroom>
9454
9455         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9456
9457         * configure.in (DD_COPT): Added include support required for gbdk.
9458
9459         * .version: Bumped version number just to increase it.
9460
9461         * src/SDCCmain.c: Added -nostdinc to the default options.
9462
9463 2002-04-15  Michael Hope  <michaelh AT vroom>
9464
9465         * device/lib/z80/printf.c (sprintf): Added.
9466
9467         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9468
9469         * src/z80/peeph.def: Added transpose redundent load rule.
9470
9471         * src/z80/main.c: Added force callee saves for jaune.
9472
9473         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9474
9475         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9476
9477 2002-03-28  Johan Knol  <johan AT balder>
9478
9479         * src/SDCCval.c: fixed bug #532436
9480
9481 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9482         * /src/port.h:
9483         Added "char *Processor" field to the port structure.
9484
9485         * /src/SDCCmain.c:
9486         Added -p option. Allows port dependent processor to be specified.
9487
9488         * all ports:
9489         Initialized the new field char *Processor field to NULL in all ports
9490
9491         * /src/pic/*:
9492         Compiler generated registers for interrupt context saving
9493         were not getting allocated.
9494
9495 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9496
9497         * /src/SDCCast.c:
9498         Fixed left shift. Will promote the left side of a left shift
9499         if a) left shifting more than size of operand or b) when assigned
9500         to something size > size of left side
9501
9502 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9503         * src/pic/*
9504         tons of changes. Register allocation has been
9505         rewritten. Added customization for the various PICs. Flow
9506         analysis is restructured. ...
9507
9508         * src/pic/device.h:
9509         Added
9510
9511         * src/pic/device.c:
9512         Added. device.c is a PIC port hack to accomodate variations
9513         in PIC devices.
9514
9515 2002-03-13  Michael Hope  <michaelh AT vroom>
9516
9517         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9518
9519 2002-03-04  johanknol  <johanknol AT manik>
9520
9521         * /src/SDCCval.c: fixed
9522
9523         const unsigned char arr[][2] = { { 0, 1 } };
9524         t18.c:1: error: Initializer element is not constant
9525
9526 2002-03-04  bela  <bela AT manik>
9527
9528         * /device/include/mcs51reg.h:
9529         ds89c420 register definition update
9530
9531 2002-03-03    <johan AT FRIJA>
9532
9533         * support/Util/SDCCerr.c: did something, but don't no why anymore
9534
9535         * support/regression/tests/bug-524691.c: made it a little less shy
9536
9537         * src/SDCCast.c (decorateType): fixed bug #524697
9538
9539         * src/SDCCast.c: made some lineno improvements
9540
9541         * src/SDCCval.c (getNelements): changed warning to error
9542
9543         * src/SDCCglue.c (printIvalArray): changed warning to error
9544
9545         * src/SDCCicode.c: fixed a warning for mingw
9546
9547         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9548
9549         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9550
9551 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9552
9553         * src/ds390/peeph.def:
9554         Added some more peephole rules
9555
9556         * src/ds390/gen.c: Various fixes & enhancements
9557
9558         * src/SDCClrange.c, src/SDCClrange.h:
9559         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9560
9561         * src/ds390/ralloc.c:
9562         various fixes & enhancements (ds390) specific
9563
9564         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9565         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9566         from rallocs.
9567
9568         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9569
9570 2002-03-02    <johan AT FRIJA>
9571
9572         * src/SDCCast.c (decorateType): fixed bug #524708
9573
9574         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9575
9576         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9577
9578 2002-03-01  Michael Hope  <michaelh AT vroom>
9579
9580         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9581
9582         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9583
9584 2002-03-01    <johan AT FRIJA>
9585
9586         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9587
9588         * src/SDCCast.c (decorateType): fixed bug #524209
9589
9590         * src/SDCCval.c (valNot): fixed bug #524195
9591
9592 2002-02-26    <johan AT balder>
9593
9594         * src/xa51/gen.c: fixed a warning
9595
9596         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9597
9598         * src/SDCCast.c (decorateType): fixed bug #522534
9599
9600 2002-02-23    <johan AT balder>
9601
9602         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9603
9604 2002-02-22    <johan AT balder>
9605
9606         * src/SDCCast.c: fixed bug #514865
9607
9608         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9609
9610 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9611
9612         * sdcc/src/SDCCloop.c:
9613         Previous fix was not good. basic blocks that have "break" or "return" are
9614         not really partof a loop , but live ranges used in these blocks should
9615         be live thru the entire loop, so set partOfLoop but don't add them to
9616         loop region
9617
9618 2002-02-21    <johan AT FRIJA>
9619
9620         * src/SDCCcse.c: fixed bug #514308
9621
9622 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9623
9624         * src/SDCCloop.c:
9625         Fixed BUG #519583. If a conditional block ended in a return/break
9626         statement inside a loop, it was not being considered part of the loop.
9627
9628         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9629
9630 2002-02-10  Karl Bongers <karl AT turbobit.com>
9631
9632         * debugger/*:
9633         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9634         with lots of comments and notes.
9635
9636         * device/examples/test2.c:
9637         Fix bug, "red" variable not being initialized(compiler complained).
9638
9639         * device/examples/Makefile, examples/test3.c:
9640         Add Makefile in device/examples folder, compiles test3.c
9641         for use as a multiple module SDCDB test case.
9642
9643         * sim/ucsim/cmd.src/cmdset.cc:
9644         Took out debug printfs in ucsim "next" command.
9645
9646         * sim/ucsim/xa.src:
9647         Karl and Johan start ucsim XA support.  Most dissassembly working,
9648         about 75% emulation done(plenty of work remaining).
9649
9650         * sim/ucsim/z80.src:
9651         Add Z80 support to ucsim, add test-ucz80 regression test,
9652         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9653         Notice z80 compiler fails on examples/test3.c/crc code.
9654
9655 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9656
9657         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9658         Added support for --parms-in-bank1
9659
9660         * src/ds390/peeph.def:
9661         added a few more peephole optimzations
9662
9663         * src/ds390/main.c:
9664         1) added __builtin_inp & __builtin_outp used to read in data of given length
9665            from a memory mapped port
9666         2) added __builtin_memcmp
9667         3) added __builtin_swapw swap bytes of a short
9668
9669         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9670         1) handle multiple send & receives from register bank1
9671         2) ralloc can now allocate DPTR1 to some liveRanges
9672
9673         * src/SDCCsymt.c, src/SDCCsymt.h:
9674         changes to handle multiple sends & receives
9675
9676         * src/SDCCptropt.h:
9677         added some pointer arithmetic optimization
9678
9679         * src/SDCCptropt.c:
9680         added some pointer arithmetic optimizations but not stable yet so not
9681         called from anywhere (will get this working shortly)
9682
9683         * src/SDCCopt.c: fixed for multiple sends & receives
9684
9685         * src/SDCCmain.c:
9686         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9687         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9688            set preprocessor defines (depending on options)
9689
9690         * src/SDCCicode.c, src/SDCCicode.h:
9691         changes made to handle multiple sends & receives
9692
9693         * src/SDCCglobl.h:
9694         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9695
9696         * src/SDCCcse.c, src/SDCCcse.h:
9697         added function findbackward def (to be used in upcoming optimization)
9698
9699         * src/SDCCcflow.c, src/SDCCcflow.h:
9700         added function returnAtEnd - to determine if a basic block terminates with
9701         a RETURN iCode
9702
9703         * src/SDCCast.c, src/SDCCast.h:
9704         added option parms-in-bank1
9705
9706         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9707         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9708         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9709         adjusted for --parms-in-bank1 option
9710
9711         * device/include/string.h:
9712         donot redefine "reentrant" keyword
9713
9714         * device/include/ds80c390.h: Added some more SFRs
9715
9716 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9717
9718         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9719
9720 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9721
9722         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9723
9724 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9725
9726         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9727
9728 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9729
9730         * Added --xram-movc option
9731
9732 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9733
9734         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9735
9736 2002-01-11  Johan Knol
9737
9738         * Added math lib of Jesus Calvino-Fraga
9739
9740 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9741
9742         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9743         * support/regression/Makefile: new target test-mcs51-stack-auto
9744         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9745
9746 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9747
9748         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9749
9750 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9751
9752         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9753
9754 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9755
9756         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9757
9758         * src/SDCCglue.h: add definition for printIvalChar()
9759
9760 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9761
9762         * src/SDCCast.c: fix #498138 by Johan
9763
9764         * src/SDCCglue.c: fix #498138 by Johan
9765
9766 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9767
9768         * support/regression/Makefile: fix clean
9769
9770         * support/regression/ports/ds390/support.c: fix transmission of last character
9771
9772 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9773
9774         * /sdcc/src/ds390/gen.c:
9775         a) improved computing address of stack variable
9776         b) took out some #if 0 code
9777         c) improved parmBytes adjustment
9778         d) improved genPlusIncr & genMinusIncr
9779         e) genCmp could generate bad code (when left assigned to DPTR)
9780         f) Fixed bug in hasInc
9781
9782         * /sdcc/src/ds390/ralloc.c:
9783         a) packRegsForSupport could mess up live information (Fixed)
9784         b) packRegsDPTRuse could be incorrect for left & right shift
9785
9786         * /sdcc/src/mcs51/ralloc.c:
9787         packRegsForSupport could mess up the live information (Fixed)
9788
9789         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9790
9791         * /sdcc/src/SDCCast.c:
9792         can reverse a loop even if function call is present as long
9793         as the loop control variable is local & is not passed as parameter
9794
9795 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9796
9797         * /sdcc/ChangeLog: *** empty log message ***
9798
9799         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9800         More builtin function additions for TININative
9801
9802         * /sdcc/src/ds390/ralloc.c:
9803         Had broken the regression testsuite
9804
9805         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9806
9807         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9808         Added funcattr hasStackParms will be set for reentrant functions when there
9809         are paramteres on the stack, this helps in minimizing frame pointer generation
9810         typeFromStr can handle function pointers now
9811
9812         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9813         *** empty log message ***
9814
9815 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9816
9817         * /src/ds390/gen.c, /src/ds390/main.c:
9818         More builtin function additions for TININative
9819
9820         * /src/ds390/ralloc.c:
9821         Had broken the regression testsuite
9822
9823         * /src/SDCCast.c: Fixed a bug in dumptree
9824
9825         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9826         Added funcattr hasStackParms will be set for reentrant functions when there
9827         are paramteres on the stack, this helps in minimizing frame pointer generation
9828         typeFromStr can handle function pointers now
9829
9830         * /doc/builtins.txt, /doc/TININative.txt:
9831         *** empty log message ***
9832
9833
9834 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9835
9836         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9837         ALPHA version for -mTININative
9838
9839         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9840         updated to reflect changes in the port structure
9841
9842         * /src/port.h:
9843         added function do_assemble (similar to do_link) if non-null this function
9844         will be called to do assembly (-mTININative) requires a multi command
9845         assembly
9846         added function genAssemblerEnd will be called to generate assembler Epilogue
9847
9848         * /src/SDCCsymt.c:
9849         added _JavaNative to debug info printing
9850
9851         * /src/SDCCmain.c: added option --tini-libid
9852         added port->do_assemble function (-mTININative) has a multi command assemble
9853
9854         * /src/SDCCglue.c: Disabled "constExpr" check
9855         added port->genAssemblerEnd function
9856
9857         * /src/SDCCglobl.h: Added option --tini-libid value
9858
9859         * /src/SDCCast.h:
9860         tookout optimizeCompare from the header (has no external references)
9861
9862         * /src/SDCCast.c: made one more function "static"
9863
9864 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9865
9866         * src/z80/mappings.i: Added z80asm support.
9867
9868         * src/z80/main.c: Added z80asm support on --asm=z80asm
9869
9870         * src/z80/gen.c: Fixed asm portability issues.
9871
9872         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9873
9874         * src/SDCCglue.c (printExterns): Added global/extern split.
9875
9876 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9877
9878         * support/regression/Makefile: added test for mcs51 model large
9879
9880         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9881
9882         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9883
9884 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9885
9886         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9887
9888 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9889
9890         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9891
9892         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9893
9894 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9895
9896         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9897
9898         * support/regression/tests/simplefloat.c: Port to mcs51.
9899
9900 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9901         * support/regression/tests/bug-485362.c: Added.
9902
9903         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9904
9905         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9906
9907         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9908
9909         * src/z80/gen.c (aopDump): Added a dump function.
9910
9911 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9912         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9913
9914         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9915
9916         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9917
9918         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9919
9920         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9921
9922         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9923
9924         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9925
9926         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9927
9928         * support/regression/ports/ds390/support.c: Use tinibios.
9929
9930         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9931
9932 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9933
9934         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9935         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9936
9937         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9938
9939         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9940
9941 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9942
9943         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9944
9945         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9946         (packRegsForIYUse): Created and optimised.
9947
9948 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9949
9950         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9951 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9952
9953         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9954
9955         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9956
9957         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9958
9959 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9960
9961         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9962
9963         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9964
9965 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9966
9967         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9968
9969         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9970
9971         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9972
9973 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9974
9975         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9976         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9977         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9978
9979         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9980
9981         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9982         (genNotFloat): Added.
9983         (genUminusFloat): Added.
9984
9985         * device/lib/z80/Makefile: Added floating pt stubs.
9986
9987         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9988
9989         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9990
9991         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9992
9993 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9994
9995         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9996
9997         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9998
9999         * sdcc/support/regression/Makefile: Add port ds390.
10000
10001         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10002
10003         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10004
10005         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10006
10007         * sdcc/support/regression/ports/ds390/support.c: Added.
10008
10009         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10010
10011         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10012
10013         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10014
10015 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10016
10017         * device/include/malloc.h: Added z80 and gbz80 support.
10018
10019         * device/lib/gbz80/heap.s: Added.
10020
10021         * device/lib/z80/heap.s: Added.
10022
10023         * device/lib/malloc.c: Added z80 and gbz80 support.
10024
10025         * support/regression/tests/malloc.c (testMalloc): Added.
10026
10027         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10028
10029         * support/regression/tests/bug-478094.c: Added.
10030
10031         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10032
10033 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10034
10035         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10036
10037         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10038
10039         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10040
10041         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10042
10043         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10044
10045 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10046
10047         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10048
10049 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10050
10051         * support/regression/tests/bug-477927.c: Added.
10052
10053         * src/z80/peeph.def: Added minor rules.
10054
10055         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10056
10057         * src/z80/peeph.def: Added jump optimisation modification.
10058
10059 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10060
10061         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10062
10063 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10064
10065         * support/regression/tests/funptrs.c: Added.
10066
10067 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10068
10069         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10070
10071 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10072
10073         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10074
10075         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10076
10077         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10078         (movLeft2ResultLong): Created.
10079
10080         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10081         (joinPushes): Added.  Joins two char pushes into a word push.
10082
10083 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10084
10085         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10086
10087         * support/makebin/Makefile (install): Added creation of dest dir.
10088
10089 2001-10-24 Karl Bongers <karl AT turbobit.com>
10090
10091         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10092
10093 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10094
10095         * src/z80/ralloc.c: Turned off faulty pack for one use.
10096
10097         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10098
10099         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10100
10101 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10102
10103         * support/regression/Makefile: Improved clean
10104
10105         * support/regression/ports/gbz80/spec.mk: Added clean
10106
10107         * support/regression/ports/host/spec.mk: Added clean
10108
10109         * support/regression/ports/z80/spec.mk: Added clean
10110
10111         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10112
10113         * support/regression/ports/mcs51/timeout.c: little improvements
10114
10115 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10116
10117         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10118
10119         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10120
10121         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10122
10123 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10124
10125         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10126
10127         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10128
10129 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10130         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10131
10132         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10133
10134         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10135
10136         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10137
10138         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10139
10140         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10141
10142         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10143
10144         * support/regression/tests/longor.c: Added.
10145
10146 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10147
10148         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10149
10150         * as/mcs51/aslink.h: define PATH_MAX
10151
10152         * as/mcs51/asm.h: define PATH_MAX
10153
10154         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10155
10156         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10157
10158         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10159
10160         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10161
10162         * src/SDCCglobl.h: define PATH_MAX
10163
10164         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10165
10166         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10167
10168 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10169
10170         * src/z80/gen.c (gencjneshort): Fixed
10171
10172         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10173
10174 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10175
10176         * support/regression/tests/bug-469671.c: Added.
10177
10178         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10179
10180 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10181
10182         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10183
10184         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10185
10186 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10187
10188         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10189
10190         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10191
10192         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10193
10194         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10195
10196         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10197
10198         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10199
10200         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10201
10202 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10203
10204         * 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.
10205
10206         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10207
10208         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10209
10210 2001-10-07    <johan AT FRIJA>
10211
10212         * device/lib/gets.c (gets): fixed the return value.
10213
10214 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10215         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10216
10217         * 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.
10218
10219         * 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.
10220
10221         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10222
10223         * src/pic/gen.c: Removed Safe_strdup.
10224
10225         * configure.in: Added option to enable libgc support.
10226
10227         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10228         (bitVectUnion): Optimised.
10229         (bitVectIntersect): Optimised.
10230         (bitVectBitsInCommon): Optimised.
10231         (bitVectCplAnd): Optimised.
10232
10233         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10234
10235 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10236
10237         * src/SDCCmain.c: distinguish between assembler debug and plain options
10238
10239         * src/avr/main.c:   remove standard assembler options
10240
10241         * src/ds390/main.c: remove standard assembler options
10242
10243         * src/mcs51/main.c: remove standard assembler options
10244
10245         * src/port.h: removed "PENDING" comment
10246
10247 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10248
10249         * src/device/lib/_mulint.c  : new, with assember functions
10250
10251         * src/device/lib/_mullong.c : new, with assember functions
10252
10253         * src/device/lib/_divuint.c : with assember functions
10254
10255         * src/device/lib/_divsint.c : with assember functions
10256
10257         * src/device/lib/_divulong.c: with assember functions
10258
10259         * src/device/lib/_divslong.c: with assember functions
10260
10261         * src/device/lib/_moduint.c : with assember functions
10262
10263         * src/device/lib/_modsint.c : with assember functions
10264
10265         * src/device/lib/_modulong.c: with assember functions
10266
10267         * src/device/lib/_modslong.c: with assember functions
10268
10269         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10270
10271         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10272
10273         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10274                                       replaced _mululong.c and _mulslong.c by _mullong.c
10275
10276 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10277
10278         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10279
10280 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10281
10282         * src/SDCCglue.c: test, if win32api is available for MINGW
10283
10284 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10285
10286         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10287         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10288         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10289         * support/regression/ports/host/spec.mk: removed GENERIC
10290         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10291         * support/regression/ports/z80/spec.mk: removed GENERIC
10292
10293 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10294
10295         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10296
10297         * support/regression/tests/bug-467035.c: Created.
10298
10299 2001-10-01    <johan AT FRIJA>
10300
10301         * src/SDCC.y: fixed bug #466586 part 1
10302
10303 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10304
10305         * SDCCicode.c: z80 has no generic pointers
10306         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10307
10308 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10309
10310         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10311
10312 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10313
10314         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10315
10316         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10317
10318 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10319
10320         * configure.in: Fixed up so that ucsim is only configured once.
10321
10322         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10323
10324         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10325         (getPathDifference): As above.
10326
10327         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10328
10329         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10330
10331 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10332         * .version: Updated to 2.3.1
10333
10334         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10335         Added copyright header.
10336
10337         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10338         (assemble): Added support for macro based assembler commands.
10339         (linkEdit): Added support for macro based linker commands.
10340         (preProcess): Changed the pre-processor to use macros.
10341         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10342         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10343
10344         * device/lib/z80/crt0.s: Added module name for debugging.
10345
10346 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10347
10348         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10349
10350         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10351
10352         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10353
10354         * src/Makefile.in: Added SDCCmacro and SDCCutil
10355
10356 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10357
10358         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10359
10360 2001-09-16    <johan AT FRIJA>
10361
10362         * 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.
10363
10364 2001-09-15    <johan AT FRIJA>
10365
10366         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10367         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10368
10369 2001-09-11    <johan AT FRIJA>
10370
10371         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10372
10373 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10374
10375         * support/regression/tests/bug-460444.c: Added test case.
10376
10377         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10378         (genCast): Added justification for all of the asserts.
10379
10380 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10381
10382         * support/regression/support.c: _xdata replaced by xdata
10383
10384         * support/regression/spec.mk: removed _generic
10385
10386 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10387
10388         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10389
10390         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10391         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10392
10393         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10394
10395         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10396
10397         * support/regression/tests/bug-460010.c: Added test case.
10398
10399         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10400
10401 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10402
10403         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10404
10405         * support/regression/testfwk.c: removed workaround for bug #436344
10406
10407         * support/regression/tests/bp.c: use less memory with mcs51
10408
10409         * support/regression/tests/bug-441448.c: use less memory
10410
10411         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10412
10413         * support/regression/collate-results.py: typo
10414
10415 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10416
10417         * support/regression/tests/fetchoverlap.c: Added new test case.
10418
10419         * support/regression/tests/bp.c: Added new test case.
10420
10421         * support/regression/tests/bug-448984.c: Added new test case.
10422
10423         * support/regression/tests/pow2shifts.c: Added new test case.
10424
10425         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10426         (genlshTwo): Fixed right shift for count > 8.
10427
10428         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10429
10430 2001-09-08    <johan AT FRIJA>
10431
10432         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10433
10434 2001-09-07    <johan AT FRIJA>
10435
10436         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10437
10438         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10439
10440 2001-09-06    <johan AT FRIJA>
10441
10442         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10443         * bernhard noted me at this: "() equals to (void)" (1.38)
10444
10445 2001-09-05    <johan AT FRIJA>
10446
10447         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10448
10449 2001-09-04    <johan AT FRIJA>
10450
10451         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10452
10453
10454 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10455
10456         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10457
10458 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10459
10460         * link/z80/aslink.h: Fixed path for PATH_MAX
10461
10462 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10463
10464         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10465
10466         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10467
10468         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10469
10470         * 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.
10471
10472 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10473
10474         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10475         (genCmp): Fixed up genCmp for the GB with longs.
10476
10477         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10478
10479         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10480
10481         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10482
10483         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10484
10485 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10486
10487         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10488
10489 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10490
10491         * 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.
10492
10493         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10494
10495 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10496
10497         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10498
10499         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10500
10501 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10502
10503   * sim/ucsim/configure:    little improvement of Cygwin-detection
10504   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10505   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10506   * support/regression/tests/bug-221100.c: small changes for mcs51
10507   * support/regression/tests/bug-221168.c: small changes for mcs51
10508   * support/regression/tests/bug-227710.c: small changes for mcs51
10509   * support/regression/tests/staticinit.c: small changes for mcs51
10510   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10511   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10512   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10513
10514 $Revision$