* support/regression/fwk/lib/testfwk.c,
[fw/sdcc] / ChangeLog
1 2006-03-02 Borut Razem <borut.razem AT siol.net>
2
3         * support/regression/fwk/lib/testfwk.c,
4           support/regression/fwk/include/testfwk.h: introduced function
5           _prints(), nonrecursive _printn(), call _initEmu() from main()
6         * support/regression/ports/gbz80/support.asm,
7           support/regression/ports/ucz80/support.asm,
8           support/regression/ports/z80/support.asm,
9           support/regression/ports/ds390/support.c,
10           support/regression/ports/hc08/support.c,
11           support/regression/ports/host/support.c,
12           support/regression/ports/mcs51/support.c,
13           support/regression/ports/xa51/support.c: added empty _initEmu()
14           function
15         * support/regression/ports/pic16/gpsim.cmd,
16           support/regression/ports/pic16/spec.mk,
17           support/regression/ports/pic16/support.c,
18           support/regression/Makefile.in: added pic16 regression test
19
20 2006-03-01 Raphael Neider <rneider AT web.de>
21
22         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
23           genConstPointerGet): use safe way of generating MOVFF to cover
24             literals as well as registers, fixes bug #1440527
25         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
26             dereference
27           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
28             more correctly, fixes bug #1232186
29           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
30         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
31             gplink guess the correct processor in more cases, applied patch
32             from Till Riedel attached to and fixing bug #1436552
33
34 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
35
36         * support/regression/tests/array.c: added, contains check for #1434401
37         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
38
39 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
40
41         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
42         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
43         * device/include/mcs51/c8051f326.h,
44         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
45         * device/include/mcs51/c8051f000.h,
46         * device/include/mcs51/c8051f018.h,
47         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
48           PCON_IDLE,PCON_STOP and added sfr16 definitions
49
50 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
51
52         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
53           genGetWord): fixed bug 1409955
54
55 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
56
57         * device/include/hc08/mc68hc908gp32.h,
58         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
59
60 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
61
62         * src/SDCCast.c (constExprValue): return NULL if not a value
63         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
64         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
65         * support/regression/tests/bitfields.c: enabled signed bitfield for all
66
67 2006-02-13 Borut Razem <borut.razem AT siol.net>
68
69         * src/regression/ptrarg.c: added, fails due to bug #1430967
70         * src/regression/Makefile: ptrarg.c added, ...
71
72 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
73
74         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
75         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
76
77 2006-02-11 Borut Razem <borut.razem AT siol.net>
78
79         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
80           print "Processor: xxx" message to stdout only if --verbose
81
82 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
83
84         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
85         * support/regression/tests/bug1426356.c: added
86         * support/regression/tests/bitfields.c: removed 2 tests
87
88 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
89
90         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
91         * device/include/mcs51/c8051f330.h,
92         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
93           PCON_IDLE,PCON_STOP and added sfr16 definitions
94         * device/lib/_divsint.c,
95         * device/lib/_divuint.c,
96         * device/lib/_divulong.c,
97         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
98           register bank bug for small stackauto
99
100 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
101
102         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
103
104 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
105
106         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
107         * all.dsp: corrected several bin paths
108         * device/include/mcs51/c8051f120.h,
109         * device/include/mcs51/c8051f300.h,
110         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
111           to PCON_IDLE,PCON_STOP
112         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
113         * device/lib/printf_large.c (output_float): fixed bug 1388703
114         * support/regression/tests/bug1057979.c: added test for bug 1388703
115
116 2006-02-08 Raphael Neider <rneider AT web.de>
117
118         * src/pic/pcode.c (pciTRIS): fixed typo,
119           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
120           (LinkFlow): fixed handling of flows that end in a call,
121           (ReuseReg): perform safety check earlier
122         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
123             to work with flows at the beginning of a pBlock,
124             fixes #1426557 (Symbol not previously defined),
125           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
126             usage information
127           (RemoveUnusedRegisters): update register usage info
128         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
129             created, reuse existing ones instead
130         * src/pic/gen.c (genPcall): fixed #1424719
131
132 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
133
134         * link/z80/lkmain.c,
135         * link/z80/lklex.c,
136         * link/z80/lkdata.c,
137         * link/z80/aslink.h: fixed build on current cygwin:
138         replaced getline() by lk_getline()
139
140 2006-02-01 Borut Razem <borut.razem AT siol.net>
141
142         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
143           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
144           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
145           src/regression/bool1.c, src/regression/bool2.c,
146           src/regression/bool3.c, src/regression/call1.c,
147           src/regression/compare.c, src/regression/compare10.c,
148           src/regression/compare2.c, src/regression/compare3.c,
149           src/regression/compare4.c, src/regression/compare5.c,
150           src/regression/compare6.c, src/regression/compare7.c,
151           src/regression/compare8.c, src/regression/compare9.c,
152           src/regression/configword.c, src/regression/for.c,
153           src/regression/inline.c, src/regression/mult1.c,
154           src/regression/nestfor.c, src/regression/or1.c,
155           src/regression/pointer1.c, src/regression/ptrfunc.c,
156           src/regression/rotate1.c, src/regression/rotate2.c,
157           src/regression/rotate3.c, src/regression/rotate4.c,
158           src/regression/rotate5.c, src/regression/rotate6.c,
159           src/regression/rotate7.c, src/regression/string1.c,
160           src/regression/struct1.c, src/regression/sub.c,
161           src/regression/sub2.c, src/regression/switch1.c,
162           src/regression/while.c, src/regression/xor.c,
163           src/regression/create_stc, src/regression/simulate,
164           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
165           regression tests
166         * src/regression/gpsim_assert.h: added
167
168 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
169
170         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
171         ((void (code *) (void)) 0) ();
172         * as/hc08/aslex.c,
173         * as/hc08/aslink.h,
174         * as/hc08/asm.h,
175         * as/hc08/asmain.c,
176         * as/hc08/lkdata.c,
177         * as/hc08/lklex.c,
178         * as/hc08/lkmain.c,
179         * as/mcs51/aslex.c,
180         * as/mcs51/aslink.h,
181         * as/mcs51/asm.h,
182         * as/mcs51/asmain.c,
183         * as/mcs51/lkdata.c,
184         * as/mcs51/lklex.c,
185         * as/mcs51/lkmain.c,
186         * as/z80/aslex.c,
187         * as/z80/asm.h,
188         * as/z80/asmain.c: fixed build on current cygwin:
189         replaced getline() by as_getline()
190
191 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
192
193         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
194         declarator in the symbol chain
195         * src/SDCCsymt.h,
196         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
197         parameter list for function pointers
198         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
199         * support/regression/tests/bug-716242.c: added
200
201 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
202
203         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
204         offset if possible
205         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
206
207 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
208
209         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
210         inifinitely recurseable, added static
211         * support/regression/tests/bug-1408066.c: added
212
213 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
214
215         * src/SDCCicode.h,
216         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
217         renamed, added possibility to create "postLoopLbl"-labels
218         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
219         newiTempLoopHeaderLabel
220         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
221         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
222         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
223         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
224         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
225         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
226         (basicInduction): fixed bug #136564, made static,
227         (loopInduction): changed parameter of basicInduction, made static,
228         (addPostLoopBlock): added
229         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
230         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
231         findLoopEndSeq
232         * support/regression/tests/bug-136564.c: added
233         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
234         --std-sdcc99 to LIBSDCCFLAGS
235
236 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
237
238         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
239         while loop
240         * support/regression/tests/bug-1406131.c: added
241
242 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
243
244         * src/SDCCast.c (decorateType): fix promotion of unary minus
245         * src/SDCCsymt.c (computeType): beautified
246         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
247         (valUnaryPM, valComplement): fix sign and promotion,
248         (valNot): ANSI: result type is int (SDCC: unsigned char)
249         * support/regression/tests/uminus.c: speedup by removing superflous
250         test case 'int'
251         * support/regression/tests/onebyte.c: added promotion and signedness
252         tests for unary minus
253         * support/regressions/tests/bug-477927.c: disable warning about
254         uninitialized variables
255         * support/regression/tests/not.c: added
256
257 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
258
259         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
260         * src/mcs51/gen.c (gen51Code): show final register usage after
261         fillGaps in asm with --i-code-in-asm
262         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
263         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
264         incUsed, rliveClear, adjustIChain): made static,
265         (setFromRange): excluded because it's unused,
266         (findPrevUseSym, markWholeLoop): added,
267         (findPrevUse): rewritten; fixes bug 895992; now a complete search
268         through all branches of predecessors enables sdcc to emit the warning
269         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
270         (rlivePoint): made static, added parameter emitWarnings which is only
271         true during the first run out of two,
272         (findRecursiveSucc, findRecursivePred): removed,
273         (computeLiveRanges): made static, added parameter emitWarnings,
274         (dumpIcRlive): added for debugging only
275         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
276         removed prototype of setFromRange()
277         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
278         in call of computeLiveRanges()
279         * support/regression/tests/bug-895992.c: added
280         * support/regression/tests/bug-971834.c: added
281         * support/valdiag/tests/bug-895992.c: added
282         * support/valdiag/tests/bug-971834.c: added
283
284 2005-12-18 Raphael Neider <rneider AT web.de>
285
286         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
287           (genUnpackBits): improved code for direct operands,
288           (genPackBits): improved code for literal assignment to bitfields
289             and for direct destination operands (no FSR indirection),
290             prevented redundant AND, fixes #1362800,
291           (AccLsh): added parameter to disable masking of the result
292         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
293           skip instructions with side-effects (like incfsz),
294           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
295         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
296         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
297           fixes #1375263
298
299 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
300
301         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
302         volatile variables as spill location
303
304 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
305
306         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
307         replacing literals
308         * support/regression/tests/bug-1376320.c: added
309
310 2005-12-08 Raphael Neider <rneider AT web.de>
311
312         * src/pic/device.c: renamed is_shared to pic14_is_shared
313         * src/pic/gen.c (genIfx): re-enabled handling of sbits
314         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
315           (is_valid_identifier): added for above workaround
316
317 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
318
319         * device/lib/Makefile.in: fixed to enable port-specific-objects
320         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
321           char, thanks Hubert Sack
322         * doc/sdccman.lyx: documented --xstack-loc,
323           elaborated a bit more on interrupts and pitfalls,
324           removed "setjmp/longjmp unsupported",
325           documented some unsupported C99 features
326         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
327         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
328           if, thanks Hubert Sack
329         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
330         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
331           make make_library
332         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
333           regression tests can report resource usage (rfe 700441)
334         * support/regression/collate-results.py: report resource usage
335         * support/regression/ports/ds390/spec.mk,
336         * support/regression/ports/hc08/spec.mk,
337         * support/regression/ports/mcs51/spec.mk,
338         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
339         * support/regression/ports/ds390/uCsim.cmd,
340         * support/regression/ports/hc08/uCsim.cmd,
341         * support/regression/ports/mcs51/uCsim.cmd,
342         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
343         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
344           library, use the default one
345         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
346           building the library
347
348 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
349
350         * config.dsp: added dependency on .version and configure_vc.awk
351         * device/include/setjmp.h: updated for --stack-auto and --xstack
352         * device/include/mcs51/at89c51snd1c.h: corrected line endings
353         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
354         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
355         * device/lib/libsdcc.lib: added _setjmp
356         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
357           (decorateType): fixed bug 1372851,
358           (optimizeGetHbit): fixed warning
359         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
360           array initialisation
361         * support/regression/tests/bug1057979.c: added test for bug 1358192
362         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
363
364 2005-12-03 Borut Razem <borut.razem AT siol.net>
365
366         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
367           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
368
369 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
370
371         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
372         createIval): implement symbol independant "flexible array member",
373         (createIvalCharPtr): implemented flexible array initialisation with a
374         string
375         * src/SDCCsymt.c (copyStruct): removed,
376         (getSize): fixed misleading comment,
377         (getAllocSize): removed, the additional allocation size is now in
378         sym->flexArrayLength,
379         (checkStructFlexArray): new, syntax checks for flexible array members,
380         (compStructSize): added syntax checks for "flexible array members"
381         (copyStruct): removed,
382         (copyLinkChain): removed inefficient fix for bug 770487
383         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
384         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
385         symbol->flexArrayLength
386         * src/SDCCerr.c,
387         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
388         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
389         * support/regression/tests/structflexarray.c: added
390         * support/valdiag/tests/structflexiblearray.c: added
391
392 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
393
394         * src/SDCCast.c (decorateType): fixed bug 1368489
395         * support/Util/SDCCerr.c,
396         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
397
398 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
399
400         * device/include/mcs51/at89c51snd1c.h: added file submitted by
401           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
402
403 2005-11-27 Borut Razem <borut.razem AT siol.net>
404
405         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
406           support/cpp2/mkdeps.h: added command line option
407           -obj-ext=<extension> to SDCPP to define object file externion, used
408           for generation of make dependencies (-M)
409         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
410
411 2005-11-26 Borut Razem <borut.razem AT siol.net>
412
413         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
414           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
415           added pic and pic16 libraries
416
417 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
418
419         * device/include/float.h: Corrected typo in prototype of __fsgt
420
421 2005-11-25 Borut Razem <borut.razem AT siol.net>
422
423         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
424           added creation of model-mcs51-stack-auto libraries
425
426 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
427
428         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
429         and fields-list too
430         * src/SDCCast.c (createIvalArray): removed obsolete comment
431
432 2005-11-24 Borut Razem <borut.razem AT siol.net>
433
434         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
435           added missing device/lib/mcs51/crt*.asm sources
436
437 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
438
439         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
440
441 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
442
443         * device/lib/_fs2schar.c,
444         * device/lib/_fs2sint.c,
445         * device/lib/_fs2slong.c: optimized inline asm
446
447 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
448
449         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
450           Better handling of floats between -1.0 and 0.0.
451
452 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
453
454         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
455           (the missing "if"s prohibited removal of redundant labels)
456
457 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
458
459         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
460           Properly convert floats between -1.0 and 0.0 to long, int, and char
461           types (max integer value of negative floats tends to zero).
462         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
463           Removed changes made so to work properly with floats between
464           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
465           and _fs2char.c
466
467 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
468
469         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
470         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
471         (genCast) cosmetic change
472         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
473         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
474         from mcs51
475         * support/regression/tests/bitfields (testSignedBitfields): added
476
477 2005-11-18 Borut Razem <borut.razem AT siol.net>
478
479         * sdcc/device/lib/Makefile.in: remove all unnecessary files
480         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
481           introduced SILENT option to make building of pic16 libraries less
482
483 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
484
485         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
486           Now they work properly with floats between -1.0 and 0.0
487         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
488
489 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
490
491         * src/SDCCicode.c (printOperand): added missing else
492
493 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
494
495         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
496         reformatted for better readability
497         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
498         signed bitfields
499
500 2005-11-17 Borut Razem <borut.razem AT siol.net>
501
502         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
503           introduced SILENT option to make building of pic16 libraries less
504           verbose - used for nightly snapshot build
505         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
506           available on Win32 platforms.
507         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
508           medium, large, pic and pic16
509
510 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
511
512         * device/lib/printf_large.c: Temporary patch for bug 1358192:
513           printf("%f"...) sets fraction to zero.
514
515 2005-11-16 Raphael Neider <rneider AT web.de>
516
517         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
518           fixes #1357221
519         * src/pic/gen.c (genIfx): implemented for CARRY bit
520         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
521           to generic pointers, fixes #1357332,
522           (pic16_movLit2f): NEW,
523           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
524
525 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
526
527         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
528
529 2005-11-11 Raphael Neider <rneider AT web.de>
530
531         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
532         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
533           compute pointer's type from operand,
534           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
535           improved single bit reads, fixes bug #1353379
536
537 2005-11-09 Borut Razem <borut.razem AT siol.net>
538
539         * support/scripts/sdcc.nsi: added lib/pic to the package
540
541 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
542
543         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
544
545 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
546
547         * support/regression/tests/bug1348008.c: added
548         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
549         * support/regression/tests/bug1337835.c: updated comment
550
551 2005-11-06 Borut Razem <borut.razem AT siol.net>
552
553         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
554           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
555           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
556           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
557           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
558           dynamic construction of cl_error_class and derivates - 2.nd try
559
560 2005-11-05 Borut Razem <borut.razem AT siol.net>
561
562         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
563           bug, which caused Bus Errors on sparc solaris
564
565 2005-11-04 Borut Razem <borut.razem AT siol.net>
566
567         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
568           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
569           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
570           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
571           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
572           and derivates to resolve the initialization problem on OSX
573
574 2005-11-02 Borut Razem <borut.razem AT siol.net>
575
576         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
577           corrected typo - #include <winsock2.h>
578
579 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
580
581         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
582           (_asxxxx_mapping): added org directive for future enhancements
583
584 2005-11-01 Borut Razem <borut.razem AT siol.net>
585
586         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
587           enabled sockets on WIN32
588         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
589
590 2005-10-31 Borut Razem <borut.razem AT siol.net>
591
592         * support/regression/generate-cases.py: escape backslashes in {testcase}:
593           WIN32 backslash path delimiters should be escaped when used in C strings
594         * support/regression/tests/bitfields.c: exclude failing assertions for
595           __CYGWIN32__ and __MINGW32__ hosts
596
597 2005-10-30 Borut Razem <borut.razem AT siol.net>
598
599         * src/SDCCutil.c: corrected double comparison typo
600
601 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
602
603         * device/lib/medium/Makefile: added for new memory model medium
604         * device/include/asm/mcs51/features.h: updated for medium/pdata
605         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
606           added Multiply & Accumulate sbit's and MAC0_PAGE define
607         * device/include/mcs51/c8051f300.h: added sfr16 definitions
608         * device/include/mcs51/c8051f310.h: added sfr16 definitions
609         * device/lib/_mullong.c: update for medium model
610         * device/lib/incl.mk: added medium model
611         * doc/sdccman.lyx: documented medium model
612         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
613         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
614         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
615         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
616           (allocParms): set SCLS and OCLS to pdata for medium model
617         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
618           for pdata,
619           (powof2): return <0 if not power of 2
620         * src/avr/gen.c (genBitWise): use updated powof2
621         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
622           (shiftR2Left2Result): small optimization in setup, save acc when storing,
623           (shiftLLeftOrResult): use B if necessary
624         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
625         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
626         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
627         * support/regression/Makefile.in: added test-mcs51-medium
628         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
629
630 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
631
632         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
633         specifier unsigned
634         * device/lib/time.c (mktime): fixed bug 1334315
635
636 2005-10-28 Raphael Neider <rneider AT web.de>
637
638         * device/include/pic/p16f_common.inc: added common declarations
639         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
640
641 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
642
643         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
644           (aopPutUsesAcc): added to predict accumulator use,
645           (assignResultValue): save acc if necessary,
646           (genMinusDec): store result if indirectly addressed,
647           (genDivOneByte):  save acc if necessary,
648           (movLeft2Result): bugfix if left already in acc,
649           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
650             attention to accumulator use (esp. pdata),
651           (genReceive): receive pdata correctly
652         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
653         * src/SDCCicode.h: added isOperandInPagedSpace prototype
654
655 2005-10-27 Raphael Neider <rneider AT web.de>
656
657         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
658
659 2005-10-27 Raphael Neider <rneider AT web.de>
660
661         * .version: changed version to 2.5.4
662         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
663         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
664           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
665             arithmetics support routines
666         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
667         * device/lib/Makefile.in: also create installdir for pic
668
669         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
670           pic14 port as well
671         * src/pic/device.c (dump_sfr): rewritten to delegate register
672           placement to the linker (use `extern sym' rather than sym EQU addr),
673           (validAddress): fixed to check last specified address
674         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
675           (popGetLit): truncate literal value to 8 bit,
676           (popGet): moved assert to more appropriate place
677           (popGetExternal): create pCode operand from and mark the according
678             symbol as being `extern'
679           (popGetAddr): added sanity check on immediate's offset, provide
680             GPOINTER tag on demand
681           (aopPut): fixed for immediates,
682           (mov2w_op): move operand's address or contents to WREG (depending on
683             operand type), safer variant of mov2w,
684           (movwf,call_libraryfunc): NEW, handy abbreviations,
685           (get_argument_pcop,get_return_val_pcop,pass_argument,
686           get_returnvalue): interface for accessing function parameters and
687             return values,
688           (assignResultValuei,genRet): use new parameter/return value interface
689           (pic14_getDataSize): back to old version handling generic pointers,
690           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
691             provided implementation and/or fixed old one,
692           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
693             calls, removed legacy 8051 reference code
694           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
695           (loadSignToC): NEW, move the operands sign bit to CARRY,
696           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
697             genRightShiftSigned, accepts negative shift counts,
698           (setup_fsr): load FSR and adjust IRP (indirect memory access),
699           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
700             generic pointers, __data pointers and __code pointers,
701           (genUnpackBits,genPackBits): rewritten to work with generic pointers
702             and signed bitfields, limit bitfields to 8 bit,
703           (genDataPointerGet): fixed number of bytes read,
704           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
705           (genPointerGet,genPointerSet): fixed handling of __code pointers,
706             pointers to constant data are no longer assumed to point to __code
707             space, removed invalid pointer types,
708           (bitpatternFromVal): retrieve the PICs representation of an integer
709             or float literal,
710           (genDataPointerSet): fixed assigning to po_immediate operands,
711           (genGenPointerSet): implemented as library call,
712           (genIfx): fixed incorrect condition,
713           (genAddrOf): limit generic pointers' addresses to 2 bytes,
714             provide GPOINTER tag according to destination's storage class,
715           (genCast): added code to handle casting to generic pointers, added
716             sign-/zero extension of the result
717           (aop_isLitLike,op_isLitLike): fixed handling of immediates
718         * src/pic/gen.h: added macros to access IRP bit in STATUS register
719         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
720           extend the result
721         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
722           address/register resides in the shared banks
723           (emitSymbolToFile): improved to handle global and `pinned' symbols,
724             put all variables into separate sections (have the linker arrange
725             them)
726           (picglue): put init code and interrupt handlers in separate sections
727         * src/pic/main.c: added port specific options table, modified to PORT
728           structure to make GPOINTERs 3 byte, added pic14_options
729           (_pic14_do_link): private linking routine (update paths to libraries,
730             add libsdcc.lib by default)
731         * src/pic/main.h: declare pic14_options
732         * src/pic/pcode.c: fixed instructions i/o relations,
733           (RegCond): reverted to correct version,
734           (newpCodeOpLit): truncate literals to 8 bit,
735           (genericPrint): added debug output,
736           (getRegFromInstruction): fixed for various operand types, simplified
737           (BuildFlow): fixed broken handling of isntructions with labels
738           (LinkFlow): start at last instruction in flow (skip trailing comments),
739             pass the flow on to the next instruction after CALL
740           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
741           (insertPCodeInstruction): fixed inserting after a skip instruction,
742           (DoBankSelect): fixed for labeled instructions
743           (OptimizepBlock): honor --nopeep switch
744           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
745         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
746         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
747           (pCodeOptime2pCodes): allow disabling this optimization via
748             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
749             but is still buggy), started implementation of a dataflow based
750             pCode optimization (CSE + dead code elimination)
751           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
752         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
753           names are independant of the stack location and therefore portable across
754           devices
755
756 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
757
758         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
759           (selectSpil): fixed bug 1337835 by not spilling bit variables
760         * support/regression/tests/bug1337835.c: added test for this bug
761         * src/mcs51/peeph.def: restart after rule 3.c,
762           addded rules 263.x to optimize loading constants
763
764 2005-10-26 Raphael Neider <rneider AT web.de>
765
766         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
767         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
768           (genAssign): emit warning when casting literals to generic pointer
769             type, also applies when taking the address of a fixed variable,
770           (genCast): improved casting to generic pointers
771         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
772           extern variables, added verbose error message
773         * device/include/pic16/{string.h,errno.h}: added #pragma library c
774
775 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
776
777         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
778         carry must be complemented too
779         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
780         could be emitted by genMinus
781         * src/SDCCval.c (constVal): fixed bug 1305065
782
783 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
784
785         * src/SDCCast.c (addCast): added promotion for bit variables
786         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
787         promotion casts + optimisation
788         (optimizeGetWord): fix warning 'i' might be used uninitialized
789         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
790         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
791
792 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
793
794         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
795         all chars are promoted to int; promotion should be handled in SDCCast.c
796
797 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
798
799         * device/lib/_strcmp.c: Fixed bug 1326457
800
801 2005-10-11 Raphael Neider <rneider AT web.de>
802
803         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
804         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
805
806 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
807
808         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
809         * support/regression/tests/sfr16.c: added test for the sfr32 bug
810
811 2005-10-04 Raphael Neider <rneider AT web.de>
812
813         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
814           device/lib/pic16/pics.all: added pic18f1320
815         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
816
817 2005-09-30 Raphael Neider <rneider AT web.de>
818
819         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
820         * src/pic16/devices.inc: NEW, provides device descriptions
821         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
822
823 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
824
825         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
826           GETHBIT
827
828 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
829
830         * doc/sdccman.lyx: updated Highest Order Bit documentation,
831           documented Any Order Bit, Higher Order Byte and Higher Order Word
832         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
833         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
834           (optimizeGetAbit): new, to get any bit, not only the high bit,
835           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
836           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
837           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
838           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
839             RIGHT_OP: also try GETBYTE, GETWORD optimization,
840             GETABIT, GETBYTE, GETWORD: decorate them,
841           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
842           (ast_print): added GETABIT, GETBYTE, GETWORD
843         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
844         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
845           (geniCodeBinary): new generic binary icode,
846           (ast2iCode): added GETABIT, GETBYTE, GETWORD
847         * src/port.h: updated comment for PORT.hasExtBitOp
848         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
849           (genGetByte): new, to get a single byte,
850           (genGetWord): new, to get a word from a long,
851           (gen51Code): added GETABIT, GETBYTE, GETWORD
852         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
853
854 2005-09-23 Raphael Neider <rneider AT web.de>
855
856         * configure.in, configure: have device/lib/pic configured
857         * device/lib/Makefile.in: added model-pic14
858         * device/lib/clean.mk: added pic/ to clean rule
859         * device/lib/pic: added rudimentary pic14 library providing support
860           functions for multiplication/division/generic pointer access
861         * src/SDCCopt.c (convilong): mark support functions as extern
862           for pic14 port as well
863         * src/pic/gen.c (genMult): added assertions,
864           (genpic14Code): emit warning on unhandled iCodes
865         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
866         * src/pic/pcode.c (pCodeOpCopy),
867         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
868           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
869           SFR_REGISTER}), made safe for future extensions
870         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
871           instructions even if preceeded by SKIP instructions (also remove
872           them); removed unused code
873         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
874           prevents leaving parts of the structure uninitialized after copying
875
876 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
877
878         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
879           ago by me
880         * support/regression/tests/addsub.c: added test for the bug
881
882 2005-09-21 Raphael Neider <rneider AT web.de>
883
884         * device/include/pic16/pic18f1220.h,
885           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
886         * device/lib/pic16/Makefile.rules: added missing opening paren
887         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
888           are provided in genutils.c,
889           (genUminusFloat,genUminus,genCmpEq): added asserts on different
890           operand/result sizes,
891           (genCmp): assert on NULL pointers first, then check deref'ed values
892         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
893           result size
894
895 2005-09-18 Raphael Neider <rneider AT web.de>
896
897         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
898           as these are now unused,
899           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
900         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
901           local, avoids uninitialized pointer dereference on r->name
902         * src/pic16/ralloc.c (newReg): fixed indentation
903
904 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
905
906         * src/SDCCval.c (constVal): fixed bug 730366
907         * support/Util/SDCCerr.c,
908         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
909
910 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
911
912         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
913
914 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
915
916         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
917
918 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
919
920         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
921           (hex2dec): made hex_digit unsigned char, removed ascii dependance
922         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
923           (hex2dec): made hex_digit unsigned char, removed ascii dependance
924         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
925         * packihx/packihx.c (hexDigit): made c unsigned char
926         * as/mcs51/lklibr.c (fndsym),
927         * link/z80/lkgb.c (gb),
928         * link/z80/lklibr.c (fndsym),
929         * link/z80/lkrloc.c (relr),
930         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
931         * src/SDCC.lex (checkCurrFile, process_pragma),
932         * src/SDCCglue.c (spacesToUnderscores),
933         * src/SDCCmain.c (setParseWithComma, processFile),
934         * src/asm.c (tvsprintf, printCLine),
935         * src/avr/gen.c (emitcode, aopPut),
936         * src/ds390/gen.c (emitcode),
937         * src/hc08/gen.c (emitcode, emitinline),
938         * src/mcs51/gen.c (emitcode, genInline),
939         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
940           tokenizeLineNode),
941         * src/pic/ralloc.c (debugLog),
942         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
943           tokenizeLineNode),
944         * src/pic16/ralloc.c (debugLog),
945         * src/z80/main.c (_process_pragma):
946            made all ctype.h function calls safe
947         * src/SDCCopt.c: include math.h for fabs
948         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
949           and used them throughout the code to make ctype.h function calls safe
950         * src/ds390/main.c (asmLineNodeFromLineNode),
951         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
952         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
953            unsigned char*
954         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
955           (newpCodeAsmDir): made ctype.h function calls safe
956         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
957           pic16_emitcode):  made lbp unsigned char*
958         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
959           (pic16_newpCodeAsmDir): made ctype.h function calls safe
960         * src/xa51/gen.c (emitcode),
961         * src/z80/gen.c (_emit2): made lbp unsigned char*
962         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
963            char*
964
965 2005-09-05 Raphael Neider <rneider AT web.de>
966
967         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
968           access bank splitpoint
969
970 2005-09-05 Raphael Neider <rneider AT web.de>
971
972         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
973
974 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
975
976         * .version: changed to version 2.5.3
977         * doc/sdccman.lyx: changed version to 2.5.3,
978           documented --codeseg and --constseg and pragma codeseg and constseg,
979           documented bit parameters (reentrant) and bit returning
980         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
981            currFunc->recvSize, but is this ok for all ports?
982           (ast2iCode): result of ~ on unsigned char must be cast to int for
983            bool to work
984         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
985           function pointers in bit space
986         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
987           (processFuncArgs): call port.reg_parm() with reentrancy info
988         * src/port.h,
989         * src/avr/main.c,
990         * src/ds390/main.c,
991         * src/hc08/main.c,
992         * src/pic/main.c,
993         * src/pic16/main.c,
994         * src/xa51/main.c,
995         * src/z80/main.c: port.reg_parm prototype extended with
996           "bool reentrant" parameter
997         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
998           options.stackAuto for allocating bit register parameters
999         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1000           (genSend): set BitBankUsed if it is,
1001           (selectRegBank): factored out of genCall for use in genPcall,
1002           (genCall): removed redundant dtype assignmen, use selectRegBank,
1003           (genPcall): handle returning in Carry properly, save in F0 if needed,
1004           (genReceive): handle bit register parameters
1005         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1006           (mcs51_assignRegisters): enable bit registers for all reentrant
1007            functions and don't set BitBankUsed unconditionally
1008         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1009         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1010         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1011
1012 2005-08-27 Borut Razem <borut.razem AT siol.net>
1013
1014         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1015         ppc-osx (Darwin) does not support -u option. It seems that it is
1016         supported only on Linux - GNU cp
1017
1018 2005-08-25 Borut Razem <borut.razem AT siol.net>
1019
1020         * sim/ucsim/gui.src/serio.src/Makefile.in,
1021           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1022           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1023           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1024           install and strip, since the strip at /usr/ccs/bin should be used
1025           on solaris
1026
1027 2005-08-24 Borut Razem <borut.razem AT siol.net>
1028
1029         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1030
1031 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1032
1033         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1034         ffffffffu
1035
1036 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1037
1038         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1039         * as/mcs51/lkmain.c (link_main): fixed warning
1040         * device/include/stdbool.h: ds390 has no advanced bit support yet
1041         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1042         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1043         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1044           and updated their macros
1045         * src/SDCCval.c (constVal): updated comment for renamed b_long
1046
1047 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1048
1049         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1050         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1051           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1052           (oprio): set priority for '['
1053         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1054            and adb_24_bit
1055         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1056         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1057         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1058         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1059           added overlayable BIT_BANK area
1060         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1061           (summary2): explain 'T' in legenda
1062         * as/mcs51/lkrloc.c: replaced old K&R style,
1063           (relr): added R_BIT processing,
1064           (errmsg): added "Bit-addressable relocation error",
1065           (adb_bit): added for converting from byte- to bit-addressable space,
1066           (adb_24_bit): added for converting from byte- to bit-addressable space
1067         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1068            used in reentrant functions now even as return value
1069         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1070         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1071           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1072         * src/SDCCglobl.h: added indicator BitBankUsed
1073         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1074            the bit registers b0-b7
1075         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1076           (geniCodeCast): fixed bug 1263853,
1077           (geniCodeLogicAndOr): put result in bool or char,
1078           (geniCodeReceive): added parameter func for accessing the return type,
1079           (geniCodeFunctionBody): pass func to geniCodeReceive
1080         * src/SDCCmain.c: added indicator BitBankUsed
1081         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1082         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1083           (checkSClass): don't put automatic bool/bit on stack,
1084           (checkFunction): removed check on function cannot return bit
1085         * src/SDCCsymt.h: added newBoolLink prototype
1086         * src/mcs51/gen.c (rb1regs): added bit registers,
1087           (movc): created for assigning to carry,
1088           (pushReg, popReg): created for pushing registers,
1089           (sameRegs): check both AOP_REG and AOP_CRY types,
1090           (aopOp): handle bit registers,
1091           (aopPut): optimization no self-assign,
1092           (saveRegisters): push reg->base (bits) only once for bit registers,
1093            and use pushReg,
1094           (unsaveRegisters): pop reg->base only once and use popReg,
1095           (assignResultValue): added parameter func and return in carry for bits,
1096           (genIpush): optimization no reload in A if not changed,
1097           (genSend): bit parameters in reentrant functions are passed in bit
1098            registers by first assigning to bits in B, then save registers and
1099            copy B to bits,
1100           (genCall): handle returning in Carry properly, save it in F0 if needed,
1101           (genPcall): updated assignResultValue call, this is not safe yet for bit
1102            returning function !!!
1103           (genFunction): don't generate equ's for bit registers and use pushReg,
1104           (genEndFunction): take care of bit returning functions and use popReg,
1105           (genRet): return bit in Carry,
1106           (genIfx): optimize bit registers and other directly addressable bits,
1107           (genReceive): updated assignResultValue call
1108         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1109           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1110            registers when using stack-auto
1111         * src/mcs51/ralloc.c (_G): added allBitregs,
1112           (regs8051): added the bit registers,
1113           (createStackSpil): use macro IS_BIT,
1114           (getRegBit): added to allocate a bit register, else spill,
1115           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1116           (updateRegUsage): factored out to ease stepping while debugging,
1117           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1118            also allocate bit registers,
1119           (fillGaps): handle bit registers,
1120           (findAllBitregs): added to create bit vector with all bit registers,
1121           (mcs51_allBitregs): returns this bit vector,
1122           (mcs51_assignRegisters): when using stack-auto use bit registers for
1123            passing parameters and creating local variables
1124         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1125
1126 2005-08-22 Borut Razem <borut.razem AT siol.net>
1127
1128         * device/lib/Makefile.in: replaced find option -or with -o
1129           to make it run on solaris
1130
1131 2005-08-22 Raphael Neider <rneider AT web.de>
1132
1133         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1134           fixes #1265442 (crash on Solaris)
1135
1136 2005-08-20 Borut Razem <borut.razem AT siol.net>
1137
1138         * configure, configure.in: added tests for libsocket and libnsl libraries,
1139           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1140           from support/regression/Makefile.in
1141         * support/regression/Makefile.in: added
1142         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1143         * sim/ucsim/libtool: regenerated on sparc-solaris
1144         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1145           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1146           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1147           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1148           sparc-solaris, which doesn't use GNU ld linker
1149         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1150         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1151
1152 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1153
1154         * src/mcs51/peeph.def: updated comments
1155
1156 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1157
1158         * device/lib/_gptrget.c,
1159         * device/lib/_gptrput.c: slightly shorter
1160         * doc/sdccman.lyx: incremented version
1161         * src/mcs51/peeph.def: moved peephole comments to the line of first
1162           change to better keep line correlation, reanimated 186.e
1163         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1164
1165 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1166
1167         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1168           David Saxton with quotes around file name.
1169
1170 2005-08-15 Borut Razem <borut.razem AT siol.net>
1171
1172         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1173           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1174           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1175           make tests run on x86_64 platform
1176
1177 2005-08-13 Raphael Neider <rneider AT web.de>
1178
1179         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1180           as it might be executed DURING a build (parallel make is wonderful)
1181
1182 2005-08-13 Raphael Neider <rneider AT web.de>
1183
1184         * device/lib/Makefile.in (port-specific-objects-pic16):
1185           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1186         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1187           dependency
1188         * device/lib/pic16/Makefile.rules: build subdirs before creating
1189           the library, removed builddir rule, create $(builddir) early in
1190           recurse rule, use empty recurse rule for leaf directories
1191         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1192           mkdir errors (race condition), removed duplicate suffix "hex"
1193           from clean rules
1194         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1195         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1196           prevents mkdir -p from aborting on Alpha
1197
1198 2005-08-12 Raphael Neider <rneider AT web.de>
1199
1200         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1201           db-statements in order to allow for arrays of pointers in code
1202           sections to be placed without interspersed 0-padding, fixes
1203           bug #1256215
1204         * (emitStatistics): fixed division by zero for pic18f1220
1205         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1206           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1207         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1208         * (pic16_pCodeConstString): keep track of already emitted string
1209           literals to prevent "duplicate definitions of symbol _str_NR"
1210         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1211           debug message
1212         * device/lib/Makefile.in: ignore failing PIC16 library builds
1213         * device/lib/pic16/Makefile: do not build if gputils are missing
1214         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1215
1216 2005-08-10 Raphael Neider <rneider AT web.de>
1217
1218         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1219           my last commit)
1220
1221 2005-08-10 Raphael Neider <rneider AT web.de>
1222
1223         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1224           Rokas' patch to add the new fixed point type "__fixed16x16"
1225         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1226           functions for __fixed16x16 arithmetics
1227         * device/lib/pic16: reimplemented the build system to support
1228           a separate build directory, better handling of libio (create
1229           the library in a separate subdir for each architecture) and
1230           easier configuration (centralized in Makefile.common)
1231
1232 2005-08-07 Raphael Neider <rneider AT web.de>
1233
1234         * src/pic16/gen.c (genrshTwo): fixed sign extension
1235         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1236         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1237           added T0CONbits
1238         * device/include/pic16/pic18f4220.h: NEW, header for
1239           pic18f4220 and pic18f4320
1240         * device/include/pic16/pic18fregs.h: added new devices,
1241           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1242         * device/include/pic16/signal.h: resolved name clashes
1243           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1244           to also allow testing for interrupt enable bits, added
1245           comments on how to use the macros
1246         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1247         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1248           register definitions for the devices
1249         * device/lib/pic16/pics.all: added new devices
1250         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1251           allocated memory
1252         * device/lib/pic16/libc/stdlib/memfree: do not count
1253           the block header as free memory
1254         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1255           simplified and added missing end-of-blocklist-marker
1256           (reported by Peter Onion, fixes #1252814)
1257         * (_mergeHeapBlock): fixed loop condition
1258         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1259           len==0, restructured code
1260         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1261           up a bit, reduced bitfield accesses, prevent endless loops
1262           in case of heap corruption
1263         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1264           "unreferenced arguments/must return a value" warnings
1265         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1266           replaced BAUDREG with SPBRG
1267         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1268           device/lib/pic16/debug/gstack/gstack.c: replaced
1269           _naked, _asm, _endasm with __naked, __asm, __endasm
1270
1271 2005-08-05 Raphael Neider <rneider AT web.de>
1272
1273         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1274           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1275
1276 2005-08-05 Borut Razem <borut.razem AT siol.net>
1277
1278         * device/lib/Makefile.in: added missing ';'
1279         * configure: removed ^M characters
1280
1281 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1282
1283         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1284           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1285           License
1286
1287 2005-08-04 Borut Razem <borut.razem AT siol.net>
1288
1289         * configure.in: pic16 libraries build 2nd try - enable running
1290           configure in device/lib/pic16
1291         * configure: regenerated from configure.in
1292         * device/lib/Makefile.in: create $(PORT)/bin directory
1293
1294 2005-08-03 Raphael Neider <rneider AT web.de>
1295
1296         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1297           to get/set values via pointers
1298         * (genUnpackBits,genPackBits): changed detection of
1299           ptr->bitfield vs. sym.bitfield, fixed access via generic
1300           pointers, removed dead (wrong) code for multibyte bitfields
1301         * (genNearPointerGet, genGenPointerGet): removed useless code,
1302           fixed bitfield detection, fixes #1250594
1303         * (genNearPointerSet): removed useless code
1304         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1305           and introduced macro pic16_emitpcode that conditionally emits
1306           the origin of the following pCode (useful for debugging SDCC)
1307         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1308         * (createDefmap): fixed handling of LFSR for --optimize-df
1309
1310 2005-08-02 Borut Razem <borut.razem AT siol.net>
1311
1312         * device/lib/Makefile.in: pic16 libraries build enabled since
1313           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1314
1315 2005-08-02 Raphael Neider <rneider AT web.de>
1316
1317         * src/pic16/gen.c (genPackBits): removed deprecated warning
1318         * (genGenPointerSet): fixed bitfield detection
1319
1320 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1321
1322         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1323
1324 2005-07-31 Raphael Neider <rneider AT web.de>
1325
1326         * device/lib/pic16/libdev/pic18f458.c,
1327           device/include/pic16/pic18f458.h: added missing T0CONbits
1328
1329 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1330
1331         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1332
1333 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1334
1335         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1336
1337 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1338
1339         * device/include/mcs51/at89c51ed2.h: added.
1340
1341 2005-07-23 Raphael Neider <rneider AT web.de>
1342
1343         * src/pic/gen.h: added emitpcode macro for debugging
1344         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1345           and replace by macro adding debug information on demand
1346         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1347         * (gencjne): tried to fix; replaced with correct (slower) code
1348         * (gen{Unp,P}ackBits): fixed single bit access
1349         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1350         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1351           previous instruction
1352         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1353           register has to be handled with care (forbidding movement
1354           of assignments/uses, removing assignments completely, ...)
1355         * (pCodeOptime2pCodes): make use of regIsSpecial
1356         * added lots of debugging output (commented out)
1357         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1358           from being reused as result UNLESS it is known to work
1359
1360 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1361
1362         * support/Util/dbuf.h: include <stddef.h> for size_t
1363         * .version: changed to version 2.5.2
1364
1365 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1366
1367         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1368
1369 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1370
1371         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1372           (genModOneByte): removed needless psha/pula
1373
1374 2005-07-22 Raphael Neider <rneider AT web.de>
1375
1376         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1377           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1378         * src/pic/gen.c (resolveIfx): do not "invent" labels
1379         * (genSkipc): changed to positive logic
1380         * (genSkipCond): removed as no longer needed
1381         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1382           backport from PIC16
1383         * (genLeftShift): check operands are in different registers
1384         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1385           INCF does not update CARRY...
1386         * src/pic/main.c: fixed _linkCmd
1387         * src/pic/pcode.c (unlinkpCode): added inactive code
1388         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1389           alive (do not assign result and operand overlapping registers)
1390
1391 2005-07-22 Raphael Neider <rneider AT web.de>
1392
1393         * src/pic/device.c (dump_sfr): replaced register declaration with
1394           call to emitSymbolToFile() to avoid duplicate symbols
1395         * (assignRelocatableRegisters): do not declare external symbols
1396         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1397           right (take size of type, not etype)
1398         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1399         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1400         * (packRegsForAccUse): disabled assignment of WREG as
1401           the result reg to prevent occurence of just fixed #1235003,
1402           fixes #1242954
1403         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1404           symbols (avoids duplicate symbols in .asm file)
1405         * (pic14emitRegularMap): use emitSymbolToFile()
1406         * src/pic/gen.c (aopOp): fixed spillLocation handling
1407         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1408         * (genDataPointerSet): removed unneccessary variables/output
1409
1410 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1411
1412         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1413         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1414
1415 2005-07-21 Raphael Neider <rneider AT web.de>
1416
1417         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1418           architecture cannot handle them efficiently, fixes bug #1235003
1419         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1420           check for empty sets before using them (fixes bug #1232190)
1421
1422 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1423
1424         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1425           (lnksect2): generate warnings for memory overlap
1426         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1427           constseg to set the name of these segments so you can instruct the linker
1428           to place them in banks
1429         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1430         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1431           added code_seg and const_seg to options
1432         * src/SDCCglue.c (emitMaps): use options.const_seg,
1433           (createInterruptVect): put interrupt vectors in segment HOME,
1434           (glue): put HOME before static segment and put the main glue in HOME,
1435           (glue): use options.code_seg
1436         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1437         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1438           these segments so you can instruct the linker to place them in banks
1439           (linkEdit): use code_loc for HOME segment which should be the first
1440           segment in code memory now
1441         * src/SDCCmem.c: fixed more stuff like bug 1238386
1442         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1443           (changePointer): don't change function pointers to code pointers for
1444           banked functions,
1445           (compareType): added exceptional check for banked function pointers
1446         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1447         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1448           after static in code memory
1449         * src/mcs51/gen.c: added aopLiteralLong prototype,
1450           (aopForSym): use getSize for functions,
1451           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1452           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1453           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1454           the segment,
1455           (genPcall): use call for literal function pointers and generate banked
1456           calls over the one trampoline so there's only one place for the user to
1457           modify according to his/hers hardware,
1458           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1459           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1460         * src/mcs51/main.c: added keyword banked,
1461           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1462         * support/Util/SDCCerr.c,
1463         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1464           needed for passing the bank and address to the trampoline
1465         * device/lib/mcs51/crtbank.asm: added for bankswitching
1466         * device/lib/mcs51/Makefile: added crtbank
1467
1468 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1469
1470         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1471           for fields at offset 0 of a struct or union as reported
1472           on 2005-07-07 in the developer mailing list.
1473
1474 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1475
1476         * src/SDCCmem.c: fixed bug 1238386
1477
1478 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1479
1480         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1481           (patch #1144962), added peephole 300, enabled 259.x
1482         * doc/sdccman.lyx: removed screenshot and provided link instead
1483
1484 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1485
1486         * doc/sdccman.lyx: added section about debugging with ddd
1487         * doc/figures/ddd_example.eps: screenshot of debugging session
1488
1489 2005-07-04 Raphael Neider <rneider AT web.de>
1490
1491         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1492           like CODE pointers, fixes #1115683
1493         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1494           call, fixes bugs #1232211, #1228110,
1495           fixed wrong casts to pCodeFlow from pCodeInstructions
1496
1497 2005-07-04 Raphael Neider <rneider AT web.de>
1498
1499         * src/pic/gen.c (popGet): changed assert to allow for
1500           bit operands
1501         * (popGetAddr): changed signature to provide
1502           an additional index, patched all call sites
1503         * (genCmpEq): handle literal-like operands correctly
1504         * (genAddrOf): added sanity checks on __code/__data pointers
1505         * (genAssign): added handling of symbols from __code section
1506         * (gencjne): do not generate code for comparisons whose result
1507           is neither stored nor used, fixes bug #1171114
1508         * (AccLsh, AccRsh): operate on operand instead of WREG
1509         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1510           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1511           by known count
1512         * rewrote complete shift-by-literal logic, commented unused
1513           functions out
1514         * (genConstPointerGet): get multiple bytes (if result size > 1),
1515           fixed handling of non-immediate addresses
1516         * (genPointerGet): handle CODE pointers like CONST pointers
1517         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1518         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1519           operand is to be treated as a literal or not
1520         * (mov2w,genPcall,genCmpEq),
1521           src/pic/genarith.c: use aop_isLitLike() to decide between
1522           literal/register contents
1523         * (addSign): added missing offset
1524         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1525           only emit comment in debug-mode,
1526           use {aop,op}_isLitLike throughout the file
1527         * src/pic/glue.c: fix initializers for pointers (work in progress)
1528         * src/pic/pcode.c (get_op): honor index on _const symbols
1529         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1530         * (dumppBlock): added pCode size estimation
1531         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1532           check for IS_SYMOP before OP_SYMBOL'ing
1533         * fixed indentation, compacted switch-statements
1534         * (allocReg): find free register and allocate it instead of
1535           allocating new registers all the time
1536         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1537           registers as its operands (necessary only for multibyte GETs)
1538
1539 2005-07-01 Raphael Neider <rneider AT web.de>
1540
1541         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1542           debugging .asm-output macros FENTRY + FEXIT
1543         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1544           way... I wonder...
1545         * (emitpComment): NEW, printf to pCode
1546         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1547           offset handling
1548         * (popGetAddr): NEW, variant of popGet to access an immediates
1549           high(er) bytes instead of the n'th byte of memory they reference,
1550           replaced popGet with popGetAddr where neccessary
1551         * (genDataPointerGet): reactivated and fixed implementation
1552         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1553           accesses
1554         * (genDataPointerSet): fixed multibyte assignments
1555         * (genpic14Code): fixed --i-code-in-asm handling
1556         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1557         * (genPlus): fixed index-out-of-bounds error
1558         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1559         * src/pic/ralloc.c: added debugging output macro FENTRY2
1560         * (spillThis): fixed indentation, enbraced for-body for clarity
1561         * (rematStr): commented out as now unused
1562         * (regTypeNum): commented out special spill case (overwrites
1563           arbitrary values)
1564         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1565
1566 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1567
1568         * doc/sdccman.lyx: documented sfr16/sfr32,
1569           added example for using storage class with function pointers
1570         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1571
1572 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1573
1574         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1575         * device/lib/_itoa.c,
1576         * device/lib/_ltoa.c: optimized codesize
1577         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1578           but don't know how to suppress the double warning.
1579         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1580         * support/Util/SDCCerr.c,
1581         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1582
1583 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1584
1585         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1586           fixed old K&R prototypes
1587         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1588         * device/lib/_gptrget.c,
1589         * device/lib/_gptrgetc.c,
1590         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1591           also new versions for small generic pointers and banked generic pointers
1592         * src/port.h: added const_name
1593         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1594         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1595         * src/SDCCcse.c (findPrevIc): check all associative operators
1596         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1597         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1598         * src/SDCCmem.c: updated comments,
1599           set far-space to 0 for pdata, results in optimized code
1600         * src/SDCCmem.h: added macro CONST_NAME
1601         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1602           moving the info into the highest bits, see also gptrget/gptrput
1603         * src/src.dsp: added sdcc.ico to project files
1604         * src/avr/gen.c (genCast): fixed bug 0x%d
1605         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1606         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1607           relation between ptr_type and DCL_TYPE,
1608           (genCast): fixed bug 0x%d
1609         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1610           (CODE)" for const_name
1611         * src/hc08/gen.c (genCast): fixed bug 0x%d
1612         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1613           (hc08_port): added "CONST (CODE)" for const_name
1614         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1615           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1616           between ptr_type and DCL_TYPE,
1617           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1618           operand* and took AOP() inside function so sfr-ness can be checked,
1619           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1620           new prototype,
1621           (genFunction, genEndFunction): optimized stack setup,
1622           (genMinus): optimized for literals with ending zeroes (in bytes),
1623           (genCast): fixed bug 0x%d
1624         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1625           (mcs51_port): added "CONST (CODE)" for const_name
1626         * src/mcs51/peeph.def: made rule 226 more generic
1627         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1628         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1629         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1630         * src/z80/main.c (z80_port): added NULL for const_name,
1631           (gbz80_port): added NULL for const_name
1632         * support/regression/tests/bug663539.c,
1633         * support/regression/tests/sfr16.c: new tests
1634
1635 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1636
1637         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1638
1639 2005-06-24 Raphael Neider <rneider AT web.de>
1640
1641         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1642           corrected typos...
1643         * device/include/pic16/signal.h: added USBIF
1644           and SIG_USB
1645
1646 2005-06-24 Raphael Neider <rneider AT web.de>
1647
1648         * device/lib/pic16/libdev/pic18f2455.c,
1649           device/include/pic16/pic18f2455.h: NEW
1650         * device/include/pic16/pic18fregs.h,
1651           device/lib/pic16/pics.all,
1652           src/pic16/device.c: added 18f2455
1653         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1654           device/include/pic16/{pic18f[68][567].h,usart.h}:
1655           replaced MULTIPLE_USARTS define with more relaible
1656           compatibility sfrs (for USART access)
1657
1658 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1659
1660         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1661           and the output asm file line is printed on two lines.
1662
1663 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1664
1665         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1666           BGT, BLE, BHI, and BLS instructions
1667         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1668           genCmpEq): removed
1669         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1670           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1671           fixes bug #1216342
1672         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1673
1674 2005-06-15 Raphael Neider <rneider AT web.de>
1675
1676         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1677         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1678         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1679           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1680           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1681
1682 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1683
1684         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1685           Marcel Telka in bug #1215704
1686
1687 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1688
1689         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1690           located in shared memory bank.
1691
1692 2005-05-31 Raphael Neider <rneider AT web.de>
1693
1694         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1695           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1696           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1697
1698 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1699
1700         * device/lib/_strncpy.c: fixed the fix
1701
1702 2005-05-26 Raphael Neider <rneider AT web.de>
1703
1704         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1705           initializers with \0, bug #1208187
1706         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1707           intializers with \0, bug #1208187
1708
1709 2005-05-26 Raphael Neider <rneider AT web.de>
1710
1711         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1712           initializers with \0, bug #1208187
1713         * src/pic16/main.c (_process_pragma): added sanity checks
1714           for stack position and size, emit warnings when appropriate
1715
1716 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1717
1718         * device/lib/_strncpy.c: fixed not filling with \0
1719
1720 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1721
1722         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1723           createFunction),
1724         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1725           compound_statement),
1726         * src/SDCCsymt.h,
1727         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1728
1729 2005-05-24 Raphael Neider <rneider AT web.de>
1730
1731         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1732
1733 2005-05-24 Raphael Neider <rneider AT web.de>
1734
1735         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1736           TRISE definitions, closes bug #1162453
1737
1738 2005-05-22 Raphael Neider <rneider AT web.de>
1739
1740         * src/pic16/main.c (_process_pragma): check for missing
1741           arguments to pragmas code and udata
1742         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1743           consistency fixes to match other headers (thanks to Jim Paris)
1744         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1745
1746 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1747
1748         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1749
1750 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1751
1752         * support/regression/tests/bug1198642.c: new test
1753         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1754         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1755         * support/scripts/resource.h,
1756         * support/scripts/resource.rc,
1757         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1758         * support/scripts/sdcc.ico: added 32x32 icon
1759
1760 2005-05-18 Raphael Neider <rneider AT web.de>
1761
1762         * device/lib/pic16/libdev/pic18f*.c,
1763         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1764           keywords to "__sfr" and "__at (X)"
1765         * device/include/pic16/pic18fregs.h: added pic18f4520
1766         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1767           #1203088 (MPLAB compatibility)
1768
1769 2005-05-17 Raphael Neider <rneider AT web.de>
1770
1771         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1772         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1773         * device/lib/pic16/pics.all: added new devices
1774         * src/pic16/device.c: added support for pic18f4520
1775
1776 2005-05-16 Raphael Neider <rneider AT web.de>
1777         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1778         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1779         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1780           convenience function for bit access
1781
1782 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1783
1784         * device/lib/printf_large.c: fixed bug 1193299
1785         * support/regression/tests/bug1057979.c: added test %3.3s
1786
1787 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1788
1789         * device/include/mcs51/8051.h,
1790         * device/include/mcs51/8052.h: made parseable with lint
1791         * device/include/mcs51/lint.h: added include file for (sp)lint
1792         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1793         * doc/cdbfileformat.lyx,
1794         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1795
1796 2005-05-14 Raphael Neider <rneider AT web.de>
1797
1798         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1799         * device/lib/pic16/libc/stdlib/itoa.c (new)
1800         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1801         * device/lib/pic16/libio/Makefile: exclude subdir according to
1802           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1803         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1804         * src/pic16/gen.c (genFunction): prevent annoying warning
1805         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1806           nameclashes on BeOS
1807         * support/cpp2/cppmain.c (cpp_output_string): new
1808         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1809           fixes bug 1116802
1810
1811 2005-05-13 Borut Razem <borut.razem AT siol.net>
1812
1813         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1814
1815 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1816
1817         * .version: changed to version 2.5.1; back to bleeding edge development
1818
1819 2005-05-11 Borut Razem <borut.razem AT siol.net>
1820
1821         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1822           generate PDF version 1.3 documents
1823
1824 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1825
1826         * .version: changed to version 2.5.0
1827
1828 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1829
1830         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1831
1832 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1833
1834         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1835         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1836         well as many smaller updates.
1837         * .version: changed to version 2.5.0-pre1
1838
1839 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1840
1841         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1842
1843 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1844
1845         * support/regression/tests/bug1185672.c: added
1846         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1847           bug 1185672
1848         * src/mcs51/gen.c (genCall): added comments, made it look safer
1849         * src/mcs51/gen.c (genEndFunction): simplified
1850
1851 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1852
1853         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1854
1855 2005-04-14 Borut Razem <borut.razem AT siol.net>
1856
1857         * fixed bug 1045046 - SIGSEGV with really simple code?:
1858           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1859           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1860
1861 2005-04-14 Borut Razem <borut.razem AT siol.net>
1862
1863         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1864           src/pic16/device.h: temporarily disabled experimental #inline pragma
1865           for 2.5.0 release
1866
1867 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1868
1869         * device/include/z80/stdio.h,
1870         * device/include/z80/string.h: removed these highly incomplete files so
1871           SDCC can use the default ones in device/include/
1872
1873 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1874
1875         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1876         gcc warning.
1877         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1878         fix sdcpp warnings.
1879
1880 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1881
1882         * device/include/malloc.h: removed redundant __reentrant prototypes
1883         * device/lib/_mullong.c: added working xstack variant in asm (C version
1884           doesn't pass regression tests)
1885         * device/lib/bpx.c: used __data and made bpx char for mcs51
1886         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1887           (createFunction): fixed bug with xstackPtr
1888         * src/SDCCcse.c: corrected comments
1889         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1890           (killDeadCode, eBBlockFromiCode): removed unused code
1891         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1892           corrected comments
1893         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1894           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1895           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1896           (genModOneByte): fixed warning in MSVC
1897         * src/mcs51/main.c (): added comments
1898         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1899
1900 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1901
1902         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1903
1904 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1905
1906         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1907
1908 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1909
1910         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1911         characters arrays of larger size than the declared one.
1912
1913 2005-04-10 Borut Razem <borut.razem AT siol.net>
1914
1915         * src/pic/gen.c (genInline),
1916           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1917           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1918           (findNextInstruction), (findPrevInstruction),
1919           (findInstructionUsingLabel),
1920           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1921         * src/pic/pcode.c (findLabel): added missing '\n'
1922         * src/src.dsp: added SDCCdwarf2.c to the project
1923
1924 2005-04-09 Borut Razem <borut.razem AT siol.net>
1925
1926         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1927
1928 2005-04-08 Raphael Neider <rneider AT web.de>
1929
1930         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1931           into the chain after a given one) and mergeDefmapSymbols (combine
1932           defmap entries for each symbol per pcode)
1933         * (createDefmap): have defmap entries merged in the end
1934         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1935           a symbol before replacing one access type's symbol, merge symbols in
1936           the end (replacement symbol might already have an entry)
1937         * (assignValnums): keep reference to written WREG intact
1938
1939 2005-04-08 Raphael Neider <rneider AT web.de>
1940
1941         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1942           Alpha)
1943
1944 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1945
1946         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1947         bytes
1948
1949 2005-04-07 Raphael Neider <rneider AT web.de>
1950
1951         * device/include/pic16/usart.h: added compatibility defines for
1952           devices with more than one USART
1953         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1954
1955 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1956
1957         * device/lib/Makefile.in: updated for port specific include
1958
1959 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1960
1961         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1962
1963 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1964
1965         * device/include/8051.h,
1966         * device/include/8052.h,
1967         * device/include/at89S8252.h,
1968         * device/include/at89c55.h,
1969         * device/include/at89x051.h,
1970         * device/include/at89x51.h,
1971         * device/include/at89x52.h,
1972         * device/include/mcs51reg.h,
1973         * device/include/reg51.h,
1974         * device/include/reg764.h,
1975         * device/include/regc515c.h,
1976         * device/include/sab80515.h: (re)moved these 12 files
1977         * device/include/mcs51/8051.h,
1978         * device/include/mcs51/8052.h,
1979         * device/include/mcs51/at89S8252.h,
1980         * device/include/mcs51/at89c55.h,
1981         * device/include/mcs51/at89x051.h,
1982         * device/include/mcs51/at89x51.h,
1983         * device/include/mcs51/at89x52.h,
1984         * device/include/mcs51/mcs51reg.h,
1985         * device/include/mcs51/reg51.h,
1986         * device/include/mcs51/reg764.h,
1987         * device/include/mcs51/regc515c.h,
1988         * device/include/mcs51/sab80515.h: and added them here
1989
1990 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1991
1992         * device/include/stdarg.h: changed SDCC specific keywords to double
1993           underlined form.
1994         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1995           mcs51 and ds390.
1996         * device/include/hc08/mc68hc908gp32.h,
1997         * device/include/hc08/mc68hc908jb8.h,
1998         * device/include/hc08/mc68hc908jkjl.h,
1999         * device/include/hc08/mc68hc908qy.h: fixed comments
2000         * device/include/mcs51/README: updated
2001         * device/include/mcs51/c8051f120.h: added PINRSF
2002         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2003         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2004           amidst code. Also inline is not supported.
2005
2006 2005-04-06 Raphael Neider <rneider AT web.de>
2007
2008         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2009         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2010           callers stack/frame pointers
2011
2012 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2013
2014         * device/include/pic16/usart.h: added, missing in previous commit,
2015         * device/include/pic16/adc.h: fixed typo,
2016         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2017         commit,
2018         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2019         <p18fxxx.inc>
2020         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2021         uninitialized because a bug appears with gplink
2022         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2023         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2024         complains for unrecognised option
2025
2026 2005-04-05 Raphael Neider <rneider AT web.de>
2027
2028         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2029           structs as well (using memcpy)
2030         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2031           on ISRs (GOTO has no label)
2032         * src/pic16/device.h: added OF_OPTIMIZE_DF
2033         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2034           new data flow analysis/optimization
2035         * src/pic16/pcode.c: added (prototypes for and implementation of)
2036           dataflow analysis functions, fixed pCodeInstructions' inCond and
2037           outCond values, made RCALL a branch instruction
2038         * (pic16_unlinkpCode): keep C line if possible
2039         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2040           C line moved if possible
2041         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2042         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2043           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2044         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2045           new flow)
2046         * (pic16_getJumptabpCode): NEW, needed in...
2047         * (LinkFlow): fixed handling of jumptables, calls and conditional
2048           branches
2049         * (pic16_InsertCommentAfter): NEW
2050         * (pic16_pCodeReplace): made verbose and flow preserving
2051         * (AnalyzeFlow): added call to data flow analysis
2052         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2053         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2054         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2055
2056 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2057
2058         * src/SDCCast.c (decorateType): fixed bug #1105626
2059
2060 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2061
2062         * device/include/asm/pic16/features.h,
2063         * pic18f*.h headers,
2064         * device/include/pic16/adc.h,
2065         * device/include/pic16/delay.h,
2066         * device/include/pic16/i2c.h,
2067         * device/include/pic16/malloc.h,
2068         * device/include/pic16/stdio.h,
2069         * device/include/pic16/stdlib.h,
2070         * device/include/pic16/string.h,
2071         * device/lib/pic16/libc/stdio/printf_tiny.c,
2072         * device/lib/pic16/libc/stdio/printf_small.c,
2073         * device/lib/pic16/libc/stdio/strmgpsim.c,
2074         * device/lib/pic16/libc/stdio/strmmssp.c,
2075         * device/lib/pic16/libc/stdio/strmusart.c,
2076         * device/lib/pic16/libc/stdio/vfprintf.c,
2077         * device/lib/pic16/libc/stdlib/ltoa.c,
2078         * device/lib/pic16/libc/stdlib/putchar.c,
2079         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2080         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2081         * device/lib/pic16/libc/stdlib/memchrram.c,
2082         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2083         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2084         * device/lib/pic16/libio/adc/adcbusy.c,
2085         * device/lib/pic16/libio/adc/adcread.c,
2086         * device/lib/pic16/libio/adc/adcsetch.c,
2087         * device/lib/pic16/libio/usart/ubaud.c,
2088         * device/lib/pic16/libio/usart/ubusy.c,
2089         * device/lib/pic16/libio/usart/udrdy.c,
2090         * device/lib/pic16/libio/usart/uopen.c,
2091         * device/lib/pic16/libio/usart/uputc.c,
2092         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2093         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2094         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2095         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2096         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2097         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2098         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2099         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2100         specific keywords to double underlined form,
2101         * device/lib/pic16/libc/Makefile.rules,
2102         * device/lib/pic16/libsdcc/Makefile.rules,
2103         * device/lib/pic16/libm/Makefile,
2104         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2105         to compile with C standard set in Makefile.common
2106         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2107         rand.c and crc.c in compilation process,
2108         * device/lib/pic16/libsdcc/int/divuint.c,
2109         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2110         `c' from signed to unsigned,
2111         * device/lib/pic16/startup/crt0.c,
2112         * device/lib/pic16/startup/crt0i.c,
2113         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2114         keywords to double underlined form, bug fixes in _do_cinit function
2115         which prevented the correct initialization of the .idata segment,
2116         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2117         core to enter a infinite loop
2118         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2119
2120 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2121
2122         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2123
2124 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2125
2126         * device/include/Makefile.in: add support for hc08 subdirectory
2127         * device/include/hc08/: new subdirectory
2128         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2129         Lucas Loizaga, thanks!
2130         * device/include/hc08/mc68hc908qy.h,
2131         * device/include/hc08/mc68hc908gp32.h,
2132         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2133         their own directory. Changed internal macro names to use the compiler
2134         reserved namespace. Changed SDCC specific keywords to double
2135         underlined form.
2136         * device/include/math.h,
2137         * device/include/malloc.h,
2138         * device/include/stdarg.h,
2139         * device/include/stdbool.h
2140         * device/include/string.h,
2141         * device/include/tinibios.h,
2142         * device/include/ds400rom.h,
2143         * device/include/8051.h,
2144         * device/include/8052.h,
2145         * device/include/80c51xa.h,
2146         * device/include/at89c55.h,
2147         * device/include/at89S8252.h,
2148         * device/include/at89x51.h,
2149         * device/include/at89x52.h,
2150         * device/include/ds80c390.h,
2151         * device/include/reg764.h,
2152         * device/include/regc515c.h,
2153         * device/include/sab80515.h,
2154         * device/include/mcs51/c8051f000.h,
2155         * device/include/mcs51/c8051f018.h,
2156         * device/include/mcs51/c8051f020.h,
2157         * device/include/mcs51/c8051f040.h,
2158         * device/include/mcs51/c8051f060.h,
2159         * device/include/mcs51/c8051f120.h,
2160         * device/include/mcs51/c8051f300.h,
2161         * device/include/mcs51/c8051f310.h,
2162         * device/include/mcs51/c8051f320.h,
2163         * device/include/mcs51/c8051f330.h,
2164         * device/include/mcs51/c8051f350.h,
2165         * device/include/z180.h: Changed SDCC specific keywords to double
2166         underlined form.
2167
2168 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2169
2170         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2171         18F4455,
2172         * (pic16_assignConfigWordValue): disable testing of configuration
2173         register value with config mask,
2174         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2175         function with port->fun_prefix,
2176         * (genFunction): when generating a naked interrupt function never
2177         create an absolute segment placed in interrupt vector address, place
2178         the actual interrupt function at IVA instead, when an interrupt
2179         function is generated with unspecified interrupt then do not create
2180         the absolute section,
2181         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2182         code for generating a call to generic pointer get/put function with
2183         a call to function pic16_callGenericPointer(),
2184         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2185         the call to the generic pointer get/put functions with prefixing the
2186         function name with port->fun_prefix,
2187         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2188         * src/pic16/main.c (_process_pragma): prefix function with
2189         port->fun_prefix,
2190         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2191         calling assembler, old 18Fxxxx macro is deprecated,
2192         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2193         PC_ASMDIR in while condition,
2194         * (findInstruction): add PC_ASMDIR in while condition,
2195         * (buildCallTree): prefix main with port->fun_prefix,
2196         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2197         identifier for variable with banked access in instructions BTFSS,
2198         BTFSC, BCF, BSF, BTG
2199         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2200         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2201         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2202         perform optimization when enviroment variable NO_REG_OPT is set,
2203         * (insideLRBlock): NEW, return 1 if register is inside an
2204         INF_LOCALREGS block,
2205         * (RemoveRegFromLRBlock): remove a register that is completely
2206         eliminated by register optimization, but it is still left in local
2207         register store/restore in/from stack block,
2208         * (Remove2pcodes): after removing register, check to see if it
2209         should be removed from local register store/restore in/from stack
2210         block,
2211         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2212         DUMMY_READ_VOLATILE,
2213
2214         * device/include/pic16/adc.h: minor prototype modifications and
2215         update,
2216         * device/include/pic16/malloc.h: added GPL notice various
2217         modifications,
2218         * device/include/pic16/stdint.h: NEW, standard header for ints
2219         * device/include/pic16/delay.h: NEW, header for delay functions,
2220         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2221         delay1mtcy,
2222         * device/include/pic16/signal.h: NEW, header providing helper macros
2223         for implementing signal handlers,
2224         * device/include/pic16/stdio.h: added prototypes for functions,
2225         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2226         prototypes for stdin and stdout, added macro PUTCHAR to
2227         automatically implement putchar function prototype,
2228         * device/include/pic16/usart.h: modified and updated USART library,
2229         * device/lib/pic16/libio/adc/,
2230         * device/lib/pic16/libio/i2c: some modifications to improve library
2231         performance,
2232         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2233         family of functions,
2234         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2235         family of functions and other sources,
2236         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2237         of the PIC18Fxx[28] devices,
2238         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2239         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2240         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2241         _do_cinit function, because the previous failed when local variables
2242         where not placed in the same memory bank,
2243         * device/lib/pic16/libsdcc/char/: various modifications to improve
2244         library performance,
2245         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2246         information on the new functions of the c library and more...
2247
2248 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2249
2250         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2251
2252 2005-03-26 Raphael Neider <rneider AT web.de>
2253
2254         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2255           if condition == CARRY)
2256         * (genCmp): adapted to new genSkipc semantics
2257         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2258           on rIfx (genCmp was broken)
2259
2260 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2261
2262         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2263         * src/z80/main.c (_keywords[]),
2264         * src/SDCCglobal.h (struct options),
2265         * src/SDCC.y,
2266         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2267         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2268         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2269         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2270         always available in leading double underscore form. The C99 support is
2271         mostly missing, but it's a start.
2272         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2273         reserved identifier "__data".
2274
2275 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2276
2277         * src/mcs51/peeph.def: fixed bug 1170013
2278
2279 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2280
2281         * device/include/mcs51reg.h: fixed bug 842007
2282
2283 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2284
2285         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2286         last time.
2287
2288 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2289
2290         * src/port.h (struct PORT),
2291         * src/avr/ralloc.c (avr_assignRegisters),
2292         * src/avr/main.c,
2293         * src/ds390/ralloc.c (ds390_assignRegisters),
2294         * src/ds390/main.c,
2295         * src/hc08/ralloc.c (hc08_assignRegisters),
2296         * src/hc08/main.c,
2297         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2298         * src/mcs51/main.c,
2299         * src/pic/ralloc.c (pic14_assignRegisters),
2300         * src/pic/main.c,
2301         * src/pic16/ralloc.c (pic16_assignRegisters),
2302         * src/pic16/main.c,
2303         * src/xa51/ralloc.c (xa51_assignRegisters),
2304         * src/xa51/main.c,
2305         * src/z80/ralloc.c (z80_assignRegisters),
2306         * src/z80/ralloc.h,
2307         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2308         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2309         * src/SDCCcse.h,
2310         * src/SDCCdflow.c (computeDataFlow),
2311         * src/SDCCdflow.h,
2312         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2313         * src/SDCCloop.h,
2314         * src/SDCCcflow.c (*),
2315         * src/SDCCcflow.h,
2316         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2317         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2318         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2319         immedDom() returning wrong block; probably fixes bug #1160833)
2320
2321 2005-03-20 Borut Razem <borut.razem AT siol.net>
2322
2323         * support/scripts/inc2h.pl: WIN32 port
2324
2325 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2326
2327         * device/lib/makefile.in: added abs.c and labs.c
2328
2329 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2330
2331         * device/include/stdint.h: added
2332         * device/lib/abs.c: added
2333         * device/lib/labs.c: added
2334         * device/include/stdlib.h: added abs() and labs() prototypes
2335         * device/lib/libsdcc.lib: added abs and labs
2336         * device/include/float.h,
2337         * device/lib/_fsmul.c,
2338         * device/lib/printf_fast.c,
2339         * device/lib/printf_tiny.c: updated comments
2340
2341 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2342
2343         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2344         bug #1164313
2345
2346 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2347
2348         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2349         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2350
2351 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2352
2353         * device/lib/printf_large.c: removed inline assembly for portability and
2354           readability. Use printf_fast if speed or size are more important.
2355         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2356         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2357
2358 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2359
2360         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2361         prevent compiler warning
2362
2363 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2364
2365         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2366         moved to level 0 and declared as static. Also they are explicit
2367         placed in access bank. This was necessery because some times they
2368         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2369         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2370         optimizations. Currently only compare to unsigned char is implemented,
2371         * src/pic16/gen.c: added fReturnIdx array,
2372         * (struct resolvedIfx) is moved to gen.h and made public,
2373         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2374         * (aopForSym): added an optimization to directly store in stack of
2375         the operand of a SEND iCode,
2376         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2377         but as registers instead (AOP_REG) using the fReturnIdx array,
2378         * (pic16_freeAsmop): remove the freed register from the
2379         _G.sregsAlloc field,
2380         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2381         a compare of 'WREG',
2382         * (pic16_popGetTempRegCond): changed function prototype, now
2383         function takes also a bitVector argument v which holds the current
2384         set of registers that are allocated for stack access by aopForSym,
2385         registers allocated in aopForSym for accessing stack symbols are not
2386         any more part of the functions usedRegs field,
2387         * (genCall): some times aopOp is called for a stack variable to be
2388         send, aopForSym might perform the push, if this is true make sure
2389         that genCall doesn't push the variable twice by testing _G.resDirect,
2390         * (genFunction): changed testing for unspecified interrupt number
2391         from 256 to INTNO_UNSPEC,
2392         * modified selection scheme of frame pointer generation. Previously
2393         if function did use local registers a frame pointer was generated,
2394         now a frame pointer is generated only if function has arguments
2395         (that need PLUSW2 register access), or has stack arguments, or the
2396         compiler is not instructed to omit the frame pointer,
2397         * (genEndFunction): before restoring local registers that were saved
2398         in the function preamble, also restore the registers that *might*
2399         have been allocated for stack access,
2400         * (genRet): removed some old comments,
2401         * (genCmp, the active (RN's) version): added a call to the
2402         pic16_genCmp_special function to perform the compare with a more
2403         robust and optimized way,
2404         * (genInline): a feature has been added in inline code generation,
2405         which allows a wildcard variable substitution when writing inline
2406         assembly. Code is incomplete and experimental therefore undocumented,
2407         * (genCast): changed order of aopOp for result and right to allow
2408         aopForSym to directly load the result if possible,
2409         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2410         perform an optimized compare on some selected special occasions,
2411         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2412         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2413         generate an IVT any more,
2414         * src/pic16/main.c (pic16_optionsTable): added command line option
2415         --optimize-cmp,
2416         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2417         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2418         macros,
2419         * src/pic16/NOTES: Raphael Neider added in list of active developers
2420         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2421         jumptable_end to prevent bug #,
2422         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2423         inCond and outCond fields,
2424         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2425         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2426         turn off register spilling,
2427         * (packRegsForOneUse): synced with other ports' versions although it
2428         is not used currently,
2429         * (pic16_packRegisters): added an optimization while reading
2430         structure bitfields, some registers may be saved (malloc code is
2431         decreased by 80 bytes)
2432
2433 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2434
2435         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2436         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2437         this can be optimized more?
2438
2439 2005-03-10 Raphael Neider <rneider AT web.de>
2440
2441         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2442           genNearPointerGet): (hopefully) fixed access to bitfields via
2443           pointers (p->bitN = x; and x = p->bitN; failed)
2444
2445 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2446
2447         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2448
2449 2005-03-09 Raphael Neider <rneider AT web.de>
2450
2451         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2452
2453 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2454
2455         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2456         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2457           (regTypeNum): set REG_BIT type if necessary
2458         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2459         * support/regression/tests/critical.c: check bug 1144613
2460
2461 2005-03-02 Raphael Neider <rneider AT web.de>
2462
2463         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2464
2465 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2466
2467         * src/avr/ralloc.c (serialRegAssign),
2468         * src/ds390/ralloc.c (serialRegAssign),
2469         * src/hc08/ralloc.c (serialRegAssign),
2470         * src/mcs51/ralloc.c (serialRegAssign),
2471         * src/pic/ralloc.c (serialRegAssign),
2472         * src/pic16/ralloc.c (serialRegAssign),
2473         * src/xa51/ralloc.c (serialRegAssign),
2474         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2475
2476 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2477
2478         * src/SDCCast.c (decorateType): fixed bug 1124787
2479
2480 2005-02-20 Hubert Sack <sack AT digiplan.de>
2481         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2482
2483         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2484         patch #1121755
2485
2486 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2487
2488         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2489         to keep the correct label reference count when adding/removing references
2490         to labels. A peephole file using this is appended to patch #1144962.
2491
2492 2005-02-14 Raphael Neider <rneider AT web.de>
2493
2494         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2495         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2496         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2497           retrievals of result operand's value on assignment
2498
2499 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2500
2501         * device/include/pic16/string.h: modified prototype for memccpy()
2502         to memccpy(void *, void *, char, size_t)
2503         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2504         check whether to omit frame pointer or not,
2505         * (genInline): convert all occurences of "\n" to LF in inline
2506         assembler blocks, this helps formatting the inline text,
2507         * (pic16_loadFSR0): modified prototype,
2508         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2509         removed some 8051 legacy code,
2510         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2511         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2512         before allocating temporary registers in functions,
2513
2514 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2515
2516         * support/regression/tests/bitvars.c: corrected the "fix"
2517
2518 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2519
2520         * support/regression/tests/bitvars.c,
2521         * support/regression/tests/bitwise.c,
2522         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2523
2524 2005-02-10 Raphael Neider <rneider AT web.de>
2525
2526         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2527           different size for Alpha
2528         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2529
2530 2005-02-09 Raphael Neider <rneider AT web.de>
2531
2532         * src/SDCC.lex(doPragma) : save and restore warning options as well
2533           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2534         * have #pragma less_pedantic set the errorlevel to WARNING
2535           (fixes #1117001)
2536         * (cloneOptimize) : fixed wrong malloc's size
2537         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2538           facilitate correct handling of #pragma (save|restore)
2539
2540 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2541
2542         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2543
2544 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2545
2546         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2547
2548 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2549
2550         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2551
2552 2005-02-02 Raphael Neider <rneider AT web.de>
2553
2554         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2555         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2556         * (pic16_storeForReturn): fixed to allow returning function pointers
2557         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2558         * device/include/pic16/{stddef.h,stdbool.h}: added
2559
2560 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2561
2562         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2563
2564 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2565
2566         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2567         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2568          appeared to be required
2569
2570 2005-01-31 Borut Razem <borut.razem AT siol.net>
2571
2572         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2573           include/mcs51 and include/z80 directories to the package
2574
2575 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2576
2577         * src/hc08/gen.c (genFunction): fixed bug #1112752
2578
2579 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2580
2581         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2582
2583 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2584
2585         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2586
2587 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2588
2589         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2590
2591 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2592
2593         * device/include/c8051fxxx.h: removed these 6 files
2594         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2595
2596 2005-01-26 Raphael Neider <rneider AT web.de>
2597
2598         * src/pic16/gen.c (genAssign): fixed assignment from longs
2599           in codespace (were cut to three bytes)
2600         * (genDummyRead): implemented (except for CODESPACE...),
2601           fixed bug #1108575
2602         * src/pic16/glue.c (emitStatistics): beautified
2603         * device/lib/pic16/libm/Makefile: added include path
2604
2605 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2606
2607         * src/z80/gen.c (aopPut): fixed bug #1103902
2608
2609 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2610
2611         * device/lib/expf.c: fixed bug #1095792
2612
2613 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2614
2615         * device/lib/pic16/libm: added Math library sources
2616
2617 2005-01-24 Raphael Neider <rneider AT web.de>
2618
2619         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2620           to enable upcast to pCodeOpReg2 (there is no type tag to
2621           differenciate the two and pic16_popGet2p cast into PCOR2)
2622         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2623           (sizeof(sectNames) changed to sizeof(sectName))
2624           Both patches fix segfaults under MinGW.
2625
2626 2005-01-23 Raphael Neider <rneider AT web.de>
2627
2628         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2629           Safe_[mc]?alloc()'ed variables
2630         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2631           of (byte sized) temporaries (assign them to WREG for now)
2632         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2633           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2634           this might fix SIGSEGVs on MinGW...
2635         * src/SDCCopt.c (killDeadCode): restored original behaviour
2636           (volatile operands might get thrown away though)
2637
2638 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2639
2640         * src/pic16/gen.c: fixed bug #1106975,
2641         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2642         pointer update, INTCON is saved, global interrupts are disabled and
2643         restored after updateing TOS.
2644         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2645         * added function attribute 'shadowregs' to take advantage of shadow
2646         registers,
2647         * added function attribute 'wparam' as an alternative to the wparam
2648         pragma,
2649         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2650         user declares a non-ISR function as 'shadowregs',
2651         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2652
2653 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2654
2655         * .version: bumped version number to 2.4.8
2656         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2657         pic16 port,
2658         * device/lib/pic16/libio/i2c/: I2C module support library,
2659         * device/include/pic16/i2c.h: I2C support library header,
2660         * device/lib/pic16/libc/stdio/: standard IO support sources,
2661         * (printf_small.c): printf_small() source, supports float print,
2662         * (printf_tiny.c): printf_tiny() source, does not support floats,
2663         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2664         enable global optimizations for entire library source, other
2665         Makefiles in the source tree are also modified to reflect this,
2666         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2667         function,
2668         * doc/sdccman.lyx: updated to reflect new changes,
2669         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2670         sym->onStack if-case,
2671         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2672         sbit, idata, _idata, xdata, _xdata,
2673         * added pragma library, to link an external library, (see doc),
2674         * removed command line options, --pomit-config-words, --pomit-ivt,
2675         --pleave-reset-vector,
2676         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2677         when calling assembler to reflect memory model used, also define
2678         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2679         reflect stack model used,
2680         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2681         on stack return NULL,
2682
2683 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2684
2685         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2686           of the operands is volatile. Fixes #1020220
2687
2688 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2689
2690         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2691         * (OptimizeRegUsage): make sure that there is really no other flow where
2692           the first pCode is used
2693
2694 2005-01-22 Raphael Neider <rneider AT web.de>
2695
2696         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2697           to fix #1106967 (pCode->seq are not set up correctly)
2698
2699 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2700
2701         * src/SDCCglue.c (glue): make sure code area is declared before the
2702         static initialization area.
2703
2704 2005-01-21 Raphael Neider <rneider AT web.de>
2705
2706         * device/lib/Makefile.in: fixed test for pic16 install dir
2707         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2708           optimizations
2709         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2710           added --optimize-goto compiler switch and pragma wparam documentation
2711         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2712         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2713           and PRODH closing bug #1071770 (peephole optimizer)
2714
2715 2005-01-19 Raphael Neider <rneider AT web.de>
2716
2717         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2718           cmdLine buffers (used when calling sdcpp...) are large enough
2719           (MAX_PATH=256 truncates arguments leading to system halts when
2720           used in MinGW...)
2721         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2722         * (genUminus): rewritten to for efficiency
2723         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2724           used uninitialized in some cases)
2725         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2726           copy the third byte from the int -- now assumes 0x80 (data memory)
2727         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2728           operands (genAddLit expects the iCode's operands to swapped as
2729           well), fixed leftover bytes (crashed for short left operands)
2730         * (pic16_genMinusDec): performance improvements, removed false
2731           PIC14 emitSKPNCs
2732         * (pic16_genMinus): fixed to cope with differently sized operands
2733         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2734           for --obanksel > 1
2735         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2736         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2737           new banksel optimization
2738         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2739           analysis for temporary registers (segfaults...)
2740         * src/pic16/peeph.def: added rule
2741
2742 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2743
2744         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2745         which converts a float number to its ASCII representation
2746         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2747         functions to convert the fractional and integer part of a float to ASCII,
2748         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2749         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2750         ram
2751         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2752         _STATMEM macros,
2753         * device/include/pic16/adc.h: added GPL info,
2754         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2755         a pCodeOp as tested operand,
2756         * (genNearPointerGet): optimized bit testing, does not use
2757         intermediate register for bit value, test directly instead with
2758         BTFSS, BTFSC, works only for single bits,
2759         * (genpic16Code): dump the name of the iCode in the asm,
2760         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2761         renamed to pic16_decodeOp,
2762         * (serialRegAssign): do not allocate a temporary register for iCode
2763         sequences that test a single bit for 1/0
2764
2765 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2766
2767         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2768         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2769         access stack and frame pointers. They are initially assigned to
2770         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2771         accessing SFRs. Updated all occurences of modification of stack or
2772         frame pointer in gen.c and pcode.c,
2773         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2774         assigning of a literal value to pointers,
2775         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2776         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2777         selected
2778
2779 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2780
2781         * doc/sdccman.lyx: update documentation about stack pragma, added
2782         some info for stack memory models
2783
2784 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2785
2786         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2787
2788 2005-01-08 Raphael Neider <rneider AT web.de>
2789
2790         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2791           udata sections to fix bug #1097823
2792
2793 2005-01-05 Raphael Neider <rneider AT web.de>
2794
2795         * src/pic16/gen.c (genGenericShift): added handling of differently
2796           sized left operand and result
2797
2798 2005-01-04 Raphael Neider <rneider AT web.de>
2799
2800         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2801         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2802           to hold the condition bit)
2803         * added new version of genCmp (old code available via #define)
2804         * added new version of genShiftLeft/genShiftRight in a generic
2805           way, now supports shifting by negative values
2806         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2807           shiftCount (expected by genGenericShift)
2808         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2809         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2810           dump
2811         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2812           is an invalid literal too...)
2813
2814 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2815
2816         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2817         from Raphael Neider,
2818         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2819         for 8-bit literals. This fixes some literal operands which are sign
2820         extended to 16-bits ints when instruction needs only 8-bits.
2821
2822 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2823
2824         * device/lib/logf.c: added mcs51 assembly version
2825         * device/lib/expf.c: added mcs51 assembly version
2826         * device/lib/_logexpf.c: new shared asm code for expf and logf
2827         * device/include/math.h: add defines for assembly math library
2828         * device/lib/Makefile.in: build new _logexpf.c
2829         * device/lib/libfloat.lib: use new _logexpf.c
2830
2831 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2832
2833         * src/pic/device.c
2834         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2835           device types which have less than 0x7f registers.
2836
2837 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2838
2839         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2840
2841 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2842
2843         * device/lib/printf_fast.c: only build on supported arch.
2844         * device/lib/printf_tiny.c: only build on supported arch.
2845         * device/lib/printf_fast_f.c: only build if asm float lib
2846         * device/lib/_fsget1arg.c: only build if asm float lib
2847         * device/lib/_fsget2args.c: only build if asm float lib
2848         * device/lib/_fsnormalize.c: only build if asm float lib
2849         * device/lib/_fsreturnval.c: only build if asm float lib
2850         * device/lib/_fsrshift.c: only build if asm float lib
2851         * device/lib/_fsswapargs.c: only build if asm float lib
2852         * device/include/stdio.h: don't provide print_fast,
2853           print_fast_f, print_tiny prototypes if --xstack used
2854
2855 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2856
2857         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2858         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2859           to the SOURCES
2860
2861 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2862
2863         * device/lib/printf_fast_f.c: same as printf_fast, but
2864           with floating point enabled
2865         * device/lib/printf_fast.c: minor tweaks
2866         * device/include/stdio.h: add printf_fast_f
2867
2868 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2869
2870         * src/SDCCmain.c: make --float-reent default for mcs51
2871         * device/lib/_fsadd.c: added mcs51 assembly version
2872         * device/lib/_fssub.c: added mcs51 assembly version
2873         * device/lib/_fsmul.c: added mcs51 assembly version
2874         * device/lib/_fsdiv.c: added mcs51 assembly version
2875         * device/lib/_fseq.c: added mcs51 assembly version
2876         * device/lib/_fsneq.c: added mcs51 assembly version
2877         * device/lib/_fsgt.c: added mcs51 assembly version
2878         * device/lib/_fslt.c: added mcs51 assembly version
2879         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2880         * device/lib/Makefile.in: add _fscmp to build
2881         * device/lib/libfloat.lib: add _fscmp to build
2882
2883 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2884
2885         * device/lib/_fs2slong.c: added mcs51 assembly version
2886         * device/lib/_fs2sint.c: added mcs51 assembly version
2887         * device/lib/_fs2schar.c: added mcs51 assembly version
2888         * device/lib/_fs2ulong.c: added mcs51 assembly version
2889         * device/lib/_fs2uint.c: added mcs51 assembly version
2890         * device/lib/_fs2uchar.c: added mcs51 assembly version
2891         * device/lib/_slong2fs.c: added mcs51 assembly version
2892         * device/lib/_sint2fs.c: added mcs51 assembly version
2893         * device/lib/_schar2fs.c: added mcs51 assembly version
2894         * device/lib/_ulong2fs.c: added mcs51 assembly version
2895         * device/lib/_uint2fs.c: added mcs51 assembly version
2896         * device/lib/_uchar2fs.c: added mcs51 assembly version
2897         * device/include/float.h: added #define to select asm vs c
2898
2899 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2900
2901         * device/lib/printf_fast.c: improvements to float output
2902         * device/include/float.h: add defines for assembly float library
2903         * device/lib/_fsget1arg.c: receive 1 float arg
2904         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2905         * device/lib/_fsnormalize.c: normalize a float
2906         * device/lib/_fsreturnval.c: return float, various helper routines
2907         * device/lib/_fsrshift.c: right shift a float's mantissa
2908         * device/lib/_fsswapargs.c: swap 2 floats
2909         * device/lib/Makefile.in: build these 6 new files for mcs51
2910         * device/lib/libfloat.lib: add these 6 files to the library
2911
2912 2004-12-26 Borut Razem <borut.razem AT siol.net>
2913
2914         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2915           built by gcc 3.4.2
2916
2917 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2918
2919         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2920           and fully reentrant and register bank neutral.
2921         * device/lib/printf_fast.c: added float (not enabled by default),
2922           added compact/slower integer (also not enabled by default),
2923           improved size/speed of fast integer code, other minor changes
2924         * device/include/stdio.h, device/lib/Makefile.in,
2925           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2926
2927 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2928
2929         * src/pic16/pcode.c: declaring variables other than at the start of a
2930           block is not supported in C by VC6.
2931
2932 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2933
2934         * applied a previous patch from Raphael Neider that wasn't included
2935         in the previous commits, which fixes infinite loops within jumptable
2936         improvements,
2937         * made some fixes that previous patches introduced
2938
2939 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2940
2941         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2942         that fixes an issue with AOP_PCODE asmop's offset,
2943         * (pic16_popCopyReg): update instance field too,
2944         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2945         function of pic port,
2946         * (genCmp, genAnd, genAssign),
2947         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2948
2949 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2950
2951         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2952         variables initial values to idata section,
2953         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2954         variables in some functions. This utilizes parmBytes field of iCode
2955         structure to hold the offset of the variable in stack. (might be
2956         able to use the stack field too?)
2957         * applied patch from Raphael Neider # ### , # ###
2958         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2959         variable initial values in idata section,
2960         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2961         for static variables with initial value
2962         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2963         applied fix in while loop from Raphael Neider.
2964
2965 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2966
2967         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2968         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2969         * src/ds390/ralloc.c (serialRegAssign): spill bits
2970         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2971         * support/Util/SDCCerr.c,
2972         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2973         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2974         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2975
2976 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2977
2978         * device/include/sdcc-lib.h: inserted LGPL, added includes
2979           asm/ds390/features.h and asm/mcs51/features.h
2980         * device/include/asm/default/features.h,
2981         * device/include/asm/gbz80/features.h,
2982         * device/include/asm/z80/features.h: added empty _AUTOMEM
2983           and _STATMEM
2984         * device/include/asm/ds390/features.h,
2985         * device/include/asm/mcs51/features.h: added files with defines for
2986           _AUTOMEM and _STATMEM indicating automatic and static storage class
2987         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2988         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2989         * src/SDCCicode.c (geniCodeCast),
2990         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2991         * src/SDCCloop.c (loopInduction): removed unused variable lr
2992         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2993           to convertToFcall to include char modulo (RFE 1065037), added check
2994           if left operand is unsigned and use abs of literal value
2995         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2996           as it doesn't work after conversion from peephole.def to peephole.rul
2997         * src/mcs51/gen.c (toBoolean): added check for size,
2998           (genModOneByte): optimized code for signed char modulo a literal
2999           power of 2 (thanks to Hubert Sack),
3000           (genRRC): removed unnecessary "clr c",
3001           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3002         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3003           jump optimization,
3004           swapped rules 256.c and 256.d,
3005           extended 256.d by using new multiple checks (thanks Erik),
3006           added rules 256.e and 256.f,
3007           updated rule 261.a and 261.b to new generated code
3008         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3009
3010 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3011
3012         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3013           induction related bugs, including first part of bug #1074377
3014
3015 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3016
3017         * applied patch from bug-report #1076292,
3018         * applied patches for genAnd and Goto-optimizations for Raphael
3019         Neider,
3020         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3021         dump a less iCode information,
3022         * src/pic16/device.h (pic16_options_t): added field debgen,
3023         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3024         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3025         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3026         puclic,
3027         * (various functions): added macros FENTRY and FENTRY2 to functions,
3028         to emit function prologue,
3029         * (various functions): fixed indentation,
3030         * (genNearPointerGet): fixed loading of FSR0,
3031         * (genPackBits): applied patch from Raphael Neider to fix updating
3032         of FSR0 and touching only the modified bits,
3033         * src/pic16/genarith.c (various functions): added macros FENTRY to
3034         emit function prologue in comments,
3035         * src/pic16/pcode.h: added functions debugf2, debugf3,
3036         * src/pic16/ralloc.c: partial fix for packForPush caused
3037         segmentation fault,
3038
3039 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3040
3041         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3042           <stsp AT users.sourceforge.net> with reversed byte order
3043         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3044
3045 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3046
3047         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3048           bug #1074377
3049         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3050         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3051
3052 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3053
3054         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3055
3056 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3057
3058         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3059           conditions,
3060           (setFromConditionArgs): friendly operand parser for peephole rules,
3061           (operandBaseName, operandsNotRelated): new peephole condition
3062           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3063           architecture specific register naming into account, handles n-way
3064           comparisons, and supports quoted literals
3065         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3066
3067 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3068
3069         * src/mcs51/peeph.def: fixed bug #1076940
3070
3071 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3072
3073         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3074
3075 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3076
3077         Adding support for replacing ljmps with sjmps in jumptables
3078         generated for switch statements. For now you need to set the
3079         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3080         Now 4 algorithms for mcs51 jumptable generation are used:
3081         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3082         addresses loaded pc-relative for up to 112 cases and stack-pushing
3083         target addresses loaded with offset from dptr for up to 256 cases.
3084
3085         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3086         * src/mcs51/main.c: adapted constants for switch table generation
3087         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3088
3089 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3090
3091         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3092         * support/regression/tests/bug1057979.c: added test for bug 1073386
3093
3094 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3095
3096         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3097         compilers
3098
3099 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3100
3101         * src/pic16/device.h,
3102         * src/pic16/genarith.c,
3103         * src/pic16/glue.c,
3104         * src/pic16/main.c,
3105         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3106
3107 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3108
3109         Large cummulative patch for pic16 port.
3110         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3111         to call when a stack overflow occurs,
3112         * (malloc.h): added CVS Id tag,
3113         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3114         variable,
3115         * added libc directory. The current version of LibC contains string
3116         functions, ctype functions and macros and some functions of the
3117         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3118         be extensively tested in the future. Standard disclaimer here.
3119         Library is not automatically build yet. But one can build it by
3120         invoking 'make' inside the libc directory.
3121         * added ADC library under libio. Preliminary version yet.
3122
3123         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3124         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3125         aopForRemat() now and not by pic16_aopOp(),
3126         * (pic16_popGetTempReg): removed warning messgae when allocating
3127         temporary registers, its a buggy feature and will be removed,
3128         * (pic16_popGet): set register instance field in AOP_CRY,
3129         * (pic16_outBitC): fixed for results in size greater than 1,
3130         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3131         * (pic16_storeForReturn): optimized return of 0,
3132         * (genCmp): experimental code for new genCmp which uses PIC18's
3133         special compare&skip instructions. Initial tests fail some times
3134         with variables grater than 1 byte in size, so new code is disabled,
3135         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3136         a single bit,
3137         * (genCast): began a fix to optimize the casting of a bit to another
3138         bit, now assigning a bitfield to another bitfield will fail, sorry,
3139         * src/pic16/main.c: disabled the use of lr-support feature,
3140         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3141         * added some function prototypes, added function _debugf prototype,
3142         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3143         bits with offset (case PO_GPR_BIT),
3144         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3145         command line,
3146         * (isBankInstruction): modified to return 0 for no banking instruction,
3147         and 1 for banking instruction,
3148         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3149         caused stop processing pCodes after a inline assembly block,
3150         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3151         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3152         registers when it shouldn't,
3153         * src/pic16/ralloc.c (allocReg): add preliminary support for
3154         supporting a limited set of temporary registers,
3155
3156 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3157
3158         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3159           genDataPointerSet): ensure assignments always copy in MSB to LSB
3160           order,
3161           (loadRegFromAop): recognize CLRH optimization,
3162           (genFunction): optimize RECEIVE iCodes in reentrant functions
3163
3164 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3165
3166         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3167           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3168           selected.
3169         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3170         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3171           contiguous with data
3172
3173 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3174
3175         * device/lib/_gptrget.c (_gptrget),
3176         * device/lib/_gptrgetc.c (_gptrgetc),
3177         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3178           instead of sjmp to ret
3179         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3180           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3181
3182 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3183
3184         * .version: bumped version to 2.4.7
3185         * device/lib/_gptrget.c (_gptrget): is now _naked
3186         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3187         * device/lib/_gptrput.c (_gptrput): is now _naked
3188         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3189           (createFunction): fixed xstack
3190         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3191         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3192           or bit either,
3193           (geniCodeCritical): store original interrupt state in an iTemp bit
3194           var unless stack-auto
3195         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3196         * src/SDCCmain.c (setIncludePath): added include/target to search path
3197         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3198         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3199           prototype,
3200           (processFuncArgs): put bit vars in bit area
3201         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3202           unsaveRBank): fixed xstack,
3203           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3204           (genFunction, genEndFunction): fixed xstack,
3205           (genAssign): optimization don't walk backwards through mem
3206         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3207         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3208         * support/regression/Makefile: also make library (for stack-auto) when
3209           making "all" and added "test-mcs51-xstack-auto"
3210         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3211         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3212         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3213         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3214         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3215           make-library by MAKE_LIBRARY
3216         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3217           regression tests for xstack
3218         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3219         * support/regression/tests/critical.c: test for critical on mcs51
3220
3221 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3222
3223         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3224           built version of sdcc instead of installed version
3225
3226 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3227
3228         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3229         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3230           vprintf.c now
3231         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3232         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3233           WARNING: remove device/lib/build/z80/printf.o by hand when
3234           updating from previous build!
3235         * device/lib/z80/printf.c: updated comment
3236         * support/regression/tests/bug1057979.c: test all ports now
3237         * support/regression/tests/bug1065458.c: file added
3238
3239 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3240
3241         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3242           *_start and *_end symbols for static functions
3243
3244 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3245
3246         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3247           and search crt0.o in all library paths,
3248           (setIncludePath): proper handling of --nostdinc,
3249           (setLibPath): proper handling of --nostdlib
3250         * support/regression/Makefile,
3251         * support/regression/ports/ds390/spec.mk,
3252         * support/regression/ports/gbz80/spec.mk,
3253         * support/regression/ports/hc08/spec.mk,
3254         * support/regression/ports/mcs51/spec.mk,
3255         * support/regression/ports/mcs51-large/spec.mk,
3256         * support/regression/ports/mcs51-stack-auto/spec.mk,
3257         * support/regression/ports/z80/spec.mk: use include and lib files from
3258           built version of sdcc instead of installed version
3259         * doc/sdccman.lyx: fixed typo in --nostdinc
3260
3261 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3262
3263         * src/pic/pcode.c,
3264         * src/pic/device.c,
3265         * src/pic/ralloc.c,
3266         * src/pic/gen.c : added support to generate code for struct bit fields.
3267
3268 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3269
3270         * as/xa51/xa_version.h,
3271         * device/include/errno.h,
3272         * device/include/regc515c.h,
3273         * device/lib/_itoa.c,
3274         * device/lib/_ltoa.c,
3275         * device/lib/ser_ir_cts_rts.c,
3276         * sim/ucsim/xa.src/glob.cc,
3277         * sim/ucsim/xa.src/inst_gen.cc,
3278         * sim/ucsim/xa.src/xa_bit.cc,
3279         * sim/ucsim/xa.src/xa_sfr.cc,
3280         * sim/ucsim/z80.src/inst_dd.cc,
3281         * sim/ucsim/z80.src/inst_fdcb.cc,
3282         * support/scripts/keil2sdcc.pl,
3283         * src/pic16/pic16.dsp,
3284         * src/pic16/pic16a.dsp: corrected cvs line endings
3285         * device/lib/printf_large.c: fixed bug 1057979
3286         * src/pic16/gen.c: fixed non-C standard code
3287         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3288         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3289         * support/regression/ports/mcs51/support.c: reload T1 asap
3290         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3291           pdata use and clear idata startup behaviour
3292         * support/regression/tests/bug1057979.c: added
3293
3294 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3295
3296         * device/examples/ds390/ow390/ad26.h,
3297         * device/examples/ds390/ow390/cnt1d.h,
3298         * device/examples/ds390/ow390/crcutil.c,
3299         * device/examples/ds390/ow390/ownet.h,
3300         * device/examples/ds390/ow390/owsesu.c,
3301         * device/examples/ds390/ow390/swt12.h,
3302         * device/examples/ds390/ow390/swtoper.c,
3303         * device/examples/ds390/ow390/temp10.h,
3304         * device/examples/ds390/ow390/thermodl.c,
3305         * device/examples/ds390/tinitalk/tinitalk.dsp,
3306         * device/examples/ds390/tinitalk/tinitalk.dsw,
3307         * device/examples/mcs51/clock/hw.h,
3308         * device/examples/mcs51/simple2/go.bat,
3309         * device/examples/serialcomm/windows/serial.h,
3310         * device/examples/xa51/dummy.c,
3311         * device/examples/xa51/hello.c,
3312         * device/include/80c51xa.h,
3313         * device/include/at89x051.h: corrected cvs line endings
3314
3315 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3316
3317         * src/pic16/main.c (options): added command line --gstack, to trace
3318         stack over/under flows,
3319         * added pragma 'wparam' to allow passing first byte of function
3320         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3321         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3322         call to __gstack_test function and sets up the symbol as extern,
3323         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3324         * popaop): added call to pic16_testStackOverflow,
3325         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3326         wparamList list,
3327         * (genCall, genPcall): now all parameters are passed via stack
3328         except in functions that are pass to wparam pragma in which WREG is
3329         used too,
3330         * (genPcall): REENTRANT flag is checked to see if variable prototype
3331         contains reentrant keyword, don't call a non-reentrant function, via
3332         a reentrant function pointer or vice versa, functions are never
3333         passed via WREG,
3334         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3335         D.Winkler,
3336         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3337         SIGSEGV when accessing a NULL register stucture,
3338         * (pic16_printGPointerType): modified to handle UPPER modifier for
3339         function initializers, changed prototype of function to simpler one,
3340         * (pic16_printIvalFuncPtr): check to see if function is already
3341         added in externs list,
3342         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3343         optimized a move from W to SFR with a move to the same register
3344         later after a CALL,
3345         * device/lib/pic16/debug: NEW directory, contains debug features
3346         which are enabled when linking with libdebug.lib, currently command
3347         line option --gstack enables stack pointer tracing for over/under
3348         flow, corresponding sources are in debug/gstack
3349
3350 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3351
3352         * doc/sdccman.lyx: updated SDCC version,
3353         * (PIC16 port): update list of command line options,
3354         * src/pic16/device.h (structure pic16_options_t): added field gstack
3355         to enable stack overflow tracing on push/pops,
3356         * src/pic16/device.c (statistics structure): added statistics
3357         structure,
3358         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3359         pic16_dump_int_registers): increase statistics counters for each
3360         * variable which is encountered
3361         * (pic16_dump_usection): emit each .udata variable to its own udata
3362         section,
3363         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3364         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3365         parameters via stack, otherwise use old scheme,
3366         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3367         assembler output file,
3368         * src/pic16/main.c: added command line options --gstack to enable
3369         push/pop tracing for stack overflow,
3370         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3371         instructions): added size of each instruction,
3372         * (pic16_countInstruction): estimate size of instructions in
3373         the_pFile list, inline assembly blocks are not counted,
3374         * (pic16_FixRegisterBanking): trace previous register usage, when
3375         banksel optimizations is greater than 0, don't emit a redudant
3376         banksel directive,
3377
3378 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3379
3380         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3381         * src/pic16/ralloc.c : applied same fix for pic16.
3382         * src/pic/gen.c : tidied it up a little.
3383
3384 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3385
3386         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3387         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3388
3389 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3390
3391         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3392
3393 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3394
3395         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3396         non-reentrant function __modsint in the interrupt function (thus
3397         corrupting math operations during serial I/O)
3398         * device/lib/ser_ir.c: as above, changed buffersize
3399         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3400         256.c,d for zeroing
3401         * doc/Makefile: added option -t for rsync
3402
3403 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3404
3405         * src/SDCCast.h (struct ast),
3406         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3407
3408 2004-10-20 Borut Razem <borut.razem AT siol.net>
3409
3410         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3411         package
3412
3413 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3414
3415         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3416         makefile targets,
3417         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3418         support functions to replace long sequences of MOVFF's from access
3419         bank registers to stack and vice versa,
3420         * src/pic16/device.h: added new field opt_flags, where optimization
3421         flags can be set to enable certain features,
3422         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3423         * pBlock, (genFunction, genEndFunction): surroung loop for
3424         saving/loading used registers in stack with PC_INFO pCodes,
3425         INF_LREGS. Code in between can then be optimized by pCode optimizer
3426         to support function calls,
3427         * (genDataPointerSet): fixed bug which loaded float fields in
3428         structures with corrupt data,
3429         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3430         in a standard way debug info on stderr. Feature used for developing
3431         and debugging only,
3432         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3433         obsolete chunks of code,
3434         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3435         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3436         * pic16/src/pcode.c (pic16_newpCodeInfo,
3437         * (pic16_newpCodeOpLocalRegs),
3438         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3439         feature,
3440         * (pic16_pCodeConstString): printing of the initial value of a
3441         symbol as a comment is inhibited since parsing was already done by
3442         copyStr and output is corrupt,
3443         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3444
3445 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3446
3447         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3448
3449 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3450
3451         * as/mcs51/lkarea.c: removed old K&R style,
3452           (lnksect): changed check on boundary error,
3453           (lnksect2): changed check on boundary error,
3454           (lnksect2): extend XSTK to end of page if size = 1
3455         * as/mcs51/lkmain.c: removed old K&R style,
3456           (Areas51): create l_IRAM symbol
3457         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3458         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3459           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3460         * device/lib/_mullong.c: added version to be compiled with xstack
3461         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3462         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3463         * device/lib/mcs51/crtxstack.asm: fixed comment
3464         * src/SDCCglue.c: maxInterrupts defaults to 0,
3465           (emitMaps): added pdata,
3466           (createInterruptVect): (re)moved default,
3467           (glue): added pdata,
3468           (glue): moved __start__xstack to XSTK with default size 1
3469         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3470           and options.float_rent when options.stackAuto is set,
3471           (linkEdit): only write XDATA_NAME if provided on command line
3472         * src/SDCCmem.h,
3473         * src/SDCCmem.c: added pdata
3474         * src/port.h: added pdata_name to PORT
3475         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3476           (saveRegisters, unsaveRegisters): removed usage of B,
3477           (genMinus): fixed accumulator clash,
3478           (genJumpTab): added comment, this needs another look
3479         * src/mcs51/gen.c: added check for "B in use" paranoia,
3480           added pushB() and popB()
3481         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3482           chance
3483         * src/avr/main.c,
3484         * src/ds390/main.c,
3485         * src/hc08/main.c,
3486         * src/mcs51/main.c,
3487         * src/pic/main.c,
3488         * src/pic16/main.c,
3489         * src/xa51/main.c,
3490         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3491           added PSEG (PAG,XDATA) or NULL to port specifier
3492         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3493         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3494           (_mcs51_genInitStartup): removed __start__xstack equ,
3495           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3496         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3497         * src/z80/gen.c (_rleAppend): fixed warnings
3498         * support/regression/tests/zeropad.c: added pdata test
3499         * .version: bumped to 2.4.6
3500
3501 2004-10-17 Borut Razem <borut.razem AT siol.net>
3502
3503         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3504         as a part of nightly build
3505
3506 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3507
3508         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3509         WREG holds the first byte function parameters,
3510         * (aopForSym): take special case for symbols which are in FARSPACE
3511         but in CODESPACE too,
3512         * (assignResultValue): modified to take into account _G.useWreg,
3513         * (genCall): don't use wreg for parameter passing when function is
3514         declared as reentrant, too, added optimization INCF to stack
3515         pointer when stack parameter count is 1,
3516         * (genFunction, genEndFunction): refurnished and fixed to not using
3517         wreg for passing parameters when function has varargs or is
3518         reentrant, fixed bug with symbol name compare for generating
3519         functions in absolute address,
3520         * (pic16_storeForReturn): refurnished,
3521         * (genCmp): began writing a new version of the function, not ready
3522         yet, therefore it is disabled,
3523         * (genAssign): do not read code memory when assigning a function to
3524         a pointer function,
3525         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3526         array of characters, not pointer,
3527         * (pic16initialComments): in debug mode emit an .ident directive for
3528         the assembler,
3529         * (_process_pragma): emit a new warning type (internal to pic16)
3530         when setting stack to default length, emit a similar warning when
3531         placing a function at absolute address and address is not word aligned
3532         * (_pic16_parseOptions): added 'return TRUE' statement,
3533         * (_pic16_linkEdit): if compiling a source, then add the source's
3534         file object, first in the list of objects to link,
3535
3536 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3537
3538         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3539         * src/pic/main.c : removed VC warning.
3540         * src/pic/gen.c : changed comment.
3541
3542 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3543
3544         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3545         reference to a deprecated symbol _GPTRREG was causing failure to
3546         link. Thanks G. M. Gallant for the info.
3547
3548 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3549
3550         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3551         comments for Bugs item #954788.
3552
3553 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3554
3555         * src/pic16/device.c (pic16_dump_gsection,
3556         * pic16_groupRegistersInSection): handle symbols declared to be in
3557         access bank differently,
3558         * src/pic16/gen.c (struct _G): added field resDirect,
3559         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3560         send values read from stack directly to result and don't allocate
3561         temporary values,
3562         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3563         same registers,
3564         * (pic16_sameRegsOfs): NEW,
3565         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3566         free because they were not allocated from temporary pool,
3567         * pic16_popRegFromString): workaround to fix a problem with
3568         allocating variables twice or never,
3569         * (genGenPointerGet): using PRODL instead of FSR0H,
3570         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3571         instead of FSR0H,
3572         * (genAssign): take advantage of the _G.resDirect flag,
3573         * (genCast): around line 11844, use mov2f instead of directly
3574         MOVFF'ing between operands to account for literal values,
3575         * src/pic16/genutils.c: some new debug functions for gpsim have been
3576         added,
3577         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3578         float with integer part only,
3579         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3580         place variables in access bank
3581         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3582         updated sources to reflect recent changes in gen.c
3583
3584 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3585
3586         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3587         sources that searched for headers in installation path, now the
3588         device/include/pic16 is used,
3589         * src/pic16/glue.c (pic16glue),
3590         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3591         .line directives if not in debug mode, this suppresses assembler's
3592         warnings for ignored directives
3593
3594 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3595
3596         * src/port.h: made reset_regparms prototype void parameter explicit.
3597         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3598         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3599         * doc/sdccman.lyx: documented warning disabling and how to use
3600           printf_large to make it print floats.
3601         * device/include/stdbool.h: NEW
3602         * device/lib/_atof.c,
3603         * device/lib/_divuint.c,
3604         * device/lib/_divulong.c,
3605         * device/lib/expf.c,
3606         * device/lib/printf_large.c,
3607         * device/lib/sincosf.c,
3608         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3609         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3610           a completely reentrant lib.
3611
3612 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3613
3614         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3615         * device/include/pic16/stdio.h: fixed bug with colon
3616
3617 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3618
3619         * device/include/pic16/stdio.h,
3620         * device/include/pic16/stdlib.h,
3621         * device/include/pic16/math.h: NEW
3622         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3623         declared as _naked to reduce overhead
3624         * device/lib/Makefile.in (target port-specific-objects-pic16):
3625         changed * to *.* so to ignore the CVS directory,
3626         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3627         stacked variables back in stack,
3628         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3629         corruption
3630
3631 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3632
3633         * .version: bumped version number to 2.4.5
3634         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3635         * support/Util/SDCCerr.c (messages structure): added entry for
3636         W_POSSBUG2
3637
3638         Large cumulative patch for pic16 port and libraries.
3639         * device/include/pic16/sdcc-lib.h,
3640         * device/include/pic16/stdarg.h,
3641         * device/include/asm/pic16/features.h,
3642         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3643         * device/include/pic16/float.h: changes reentrant keyword with
3644         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3645         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3646         updated target build-libraries to include objects from gptr,
3647         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3648         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3649         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3650         all function headings,
3651         * src/SDCCmain.c: added global parameter userIncDirsSet,
3652         * (parseCmdLine): when option -I is encountered add directory to
3653         userIncDirsSet too,
3654         * src/version.awk: added space between control and long,
3655         * src/pic16/NOTES: added some notes for the port,
3656         * src/pic16/gen.c: added prototype for mov2fp function,
3657         * (fReturnpic16[]): properly named return value registers,
3658         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3659         * (aopForSym): added code to handle symbols with onStack flag set,
3660         symbols onStack are allocated PTRSIZE bytes,
3661         * (aopFreeAsmop): handles special case where asmops are stack objects,
3662         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3663         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3664         added argument lock to trace flaws in allocating temporary registers
3665         when developing port,
3666         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3667         * (pic16_popRegFromString): reenabled allocating a direct register
3668         from string,
3669         * (assignResultValue): various beautifications,
3670         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3671         referenced function argument,
3672         * (genIpush): reenabled to allow stacked arguments, handles only
3673         ic->parmPush iCodes,
3674         * (genCall, genPcall): major changes to allow for variable argument
3675         functions, fixed a bug with falsely restoring stack pointer after
3676         returning from call,
3677         * (genFunction): pending code for critical function,
3678         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3679         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3680         * (genNearPointerGet): fixed bug with indirect reading, was always
3681         reading from INDF0
3682         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3683         pointers,
3684         * (genAddrOf): rewrote code to take address of a stacked function parameter
3685         * (genCast): fixed casting to generic pointer type,
3686         * src/pic16/gen.h: added AOP_STA,
3687         * (struct asmop): added field stk,
3688         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3689         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3690         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3691         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3692         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3693         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3694         generic pointers,
3695         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3696         and library paths,
3697         * (pic16_port structure): generic pointer size is set to 3,
3698         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3699         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3700         compiler warning,
3701         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3702         operand is an iTemp,
3703
3704 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3705
3706         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3707         * debugger/mcs51/simi.c: addapt new syntax of s51
3708
3709 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3710
3711         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3712         * src/pic16/pcode.c: commented out some calls to free() in order to
3713         fix bug #989576,
3714
3715 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3716
3717         * src/SDCCicode.h,
3718         * src/SDCCicode.c (isiCodeInFunctionCall),
3719         * src/avr/ralloc.c (selectSpil),
3720         * src/pic/ralloc.c (selectSpil),
3721         * src/pic16/ralloc.c (selectSpil),
3722         * src/ds390/ralloc.c (selectSpil),
3723         * src/hc08/ralloc.c (selectSpil),
3724         * src/xa51/ralloc.c (selectSpil),
3725         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3726         stack in the middle of a function call sequence (fixes bug #1020268)
3727         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3728         costs associated with the minimum switch case.
3729
3730 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3731
3732         * src/SDCC.lex: fixed bug #1030549
3733
3734 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3735
3736         * src/SDCCcse.h (struct cseDef),
3737         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3738         over a function call if the CSE is derived from a symbol whose
3739         address has been taken (fixes bug #1029883)
3740         * support/regression/tests/bug-1029883: a new regression test for
3741         this bug
3742
3743 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3744
3745         * src/hc08/gen.c (emitinline): fixed bug #1029778
3746         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3747         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3748         and starts toward RFE #905167)
3749
3750 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3751
3752         * src/pic16/gen.c (mov2f): New function to move an operand to
3753         another without considering if it is a literal or a register,
3754         * (pic16_sameRegs): don't check if they are both AOP_REG,
3755         * (AccRsh): removed andmask=0 lines,
3756         * (genLeftShift): duplicated to be improved in future versions,
3757         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3758         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3759         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3760         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3761         * (insertBankSwitch): fixed inserting banksel directives algorithm
3762         for instructions that follow a skip instruction, this fixes a report
3763         for broken subtraction code generation,
3764         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3765         iCode is a left op, just in case result and right share the same
3766         registers
3767
3768 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3769
3770         * src/hc08/main.c,
3771         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3772         preservation of HX
3773         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3774         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3775         on 2004-09-12; it was buggy
3776
3777 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3778
3779         * src/SDCCsymt.h: removed RESULT_CHECK
3780         * src/SDCCast.c,
3781         * src/SDCCglue.c,
3782         * src/SDCCval.c,
3783         * src/pic/glue.c,
3784         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3785
3786 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3787
3788         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3789         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3790         configuration values no more rejected by compiler, they are assigned
3791         to configuration registers with a warning message instead,
3792         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3793         the for-loop so last conf register is emitted too,
3794         * (_pic16_initPaths): link library libsdcc.lib by default,
3795         * (_hasNativeMulFor): modified test for multiplication according to
3796         Raphael Neider's remarks. Integer multiplication is also done with
3797         support functions,
3798         * device/include/pic16/pic18fregs.h: corrected type error in while
3799         testing and including 18f6720 header file
3800
3801 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3802
3803         * src/pic16/device.h (pic16_options): removed field use_crt,
3804         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3805         until an optimization to handle single bits is added,
3806         * (pic16_loadFSR0): moved before genUnpackBits,
3807         * (genAnd): some white lines removed,
3808         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3809         leave_reset flags in pic16_options when using crt modules,
3810
3811 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3812
3813         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3814           for bugs 898889 & 979599. Also used some safer print instructions.
3815
3816 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3817
3818         * src/pic16/device.h (pic16_options_t): added field use_crt,
3819         crt_name, no_crt,
3820         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3821         catch a probable future bug,
3822         * src/pic16/gen.c: aopIdx function commented out,
3823         * (genAssign): commented out old code which used aopIdx,
3824         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3825         code, added if conditionals to take into account the --use-crt
3826         command line options,
3827         * src/pic16/main.c (pic16_optionsTable): added new command line
3828         options, --use-crt= and --no-crt,
3829         * (_pic16_linkEdit): now the proper crt object is added in the
3830         linker command line except than when --no-crt is specified,
3831         * src/pic16/pcode.c,
3832         * src/pic16/pcode.h: added some structures and functions for a new
3833         optimization scheme to compansate for instruction overhead between
3834         same iCodes, this scheme is currently under development and is not
3835         working in any way,
3836         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3837         to && operator,
3838         * device/lib/pic16/startup/crt0i.c,
3839         * device/lib/pic16/startup/crt0iz.c: added global char variable
3840         __uflags to force the generation of an idata section
3841
3842 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3843
3844         * doc/Makefile,
3845         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3846         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3847
3848 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3849
3850         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3851         Frieder) and clarified the default code optimization mode
3852
3853 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3854
3855         * src/SDCC.lex (doPragma, process_pragma),
3856         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3857         "opt_code_size", and "opt_code_balanced"
3858         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3859         regrouped options by category, added support for category headers
3860         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3861         and "--opt-code-size"
3862         * doc/sdccman.lyx: documented these new options and pragmas
3863         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3864         preference into account
3865
3866 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3867
3868         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3869           geniCodePreDec): Fixed bug 904237 by generating a warning
3870         * src/SDCCerr.h,
3871         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3872
3873 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3874
3875         * src/pic/device.c : When no max ram set validate full memory range.
3876         * src/pic/pcode.c,
3877         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3878
3879 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3880
3881         * device/lib/_gptrget.c,
3882         * device/lib/_gptrput.c: updated comment
3883         * device/lib/calloc.c,
3884         * device/lib/free.c,
3885         * device/lib/malloc.c,
3886         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3887         * src/SDCCcse.c (cseBBlock),
3888         * src/SDCCicode.c (printOperand, geniCodeArray),
3889         * src/SDCCicode.h (struct operand): fixed bug 868103
3890         * support/regression/tests/bug-868103.c: added
3891         * src/SDCCast.c (searchLitOp),
3892         * src/SDCCcse.h (struct cseDef),
3893         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3894         * src/SDCCicode.h (struct operand),
3895         * src/SDCCsymt.h (struct sym_link),
3896         * src/avr/gen.c (hasInc),
3897         * src/ds390/gen.c (hasInc),
3898         * src/hc08/gen.c (genPlusIncr, hasInc),
3899         * src/mcs51/gen.c (hasInc),
3900         * src/pic16/glue.c (pic16_printIvalChar),
3901         * src/pic16/ralloc.c (regWithIdx),
3902         * src/xa51/gen.c (hasInc) : removed warnings
3903         * src/SDCCast.c (createBlock): added comment ???
3904         * src/hc08/ralloc.c: updated comments
3905
3906 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3907
3908         * doc/sdccman.lyx: updated section on switch statements, added
3909         section about semaphore locking
3910         * doc/Makefile: added option -info for latex2html
3911         * device/lib/_gptrget.c,
3912         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3913
3914 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3915
3916         * src/pic/device.h,
3917         * src/pic/device.c,
3918         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3919          maxram is less than 0x100.
3920
3921 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3922
3923         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3924
3925 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3926
3927         * src/port.h,
3928         * src/mcs51/main.c,
3929         * src/ds390/main.c,
3930         * src/z80/main.c,
3931         * src/hc08/main.c,
3932         * src/pic/main.c,
3933         * src/pic16/main.c,
3934         * src/avr/main.c,
3935         * src/xa51/main.c
3936         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3937         a jump table is the best form for a switch statement, including
3938         automatic insertion of missing cases to make the case range
3939         continuous. Developed in collaboration with Frieder Ferlemann.
3940
3941 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3942
3943         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3944         accumulator result if it needs sign extension
3945
3946 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3947
3948         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3949
3950 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3951
3952         * device/lib/gbz80/printf.c,
3953         * device/lib/z80/printf.c: removed define for NULL
3954
3955 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3956
3957         * as/xa51/xa_link.c,
3958         * device/examples/ds390/ow390/ad26.c,
3959         * device/examples/ds390/ow390/cnt1d.c,
3960         * device/examples/ds390/ow390/counter.c,
3961         * device/examples/ds390/ow390/ds2480.h,
3962         * device/examples/ds390/ow390/ds2480ut.c,
3963         * device/examples/ds390/ow390/findtype.c,
3964         * device/examples/ds390/ow390/gethumd.c,
3965         * device/examples/ds390/ow390/owllu.c,
3966         * device/examples/ds390/ow390/ownetu.c,
3967         * device/examples/ds390/ow390/swt12.c,
3968         * device/examples/ds390/ow390/swtloop.c,
3969         * device/examples/ds390/ow390/temp.c,
3970         * device/examples/ds390/ow390/temp10.c,
3971         * device/examples/ds390/ow390/thermo21.c,
3972         * device/examples/ds390/ow390/tinilnk.c,
3973         * device/examples/ds390/ow390/tstfind.c,
3974         * device/examples/serialcomm/windows/serial.cpp,
3975         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3976         * device/include/reg51.h: fixed line endings for cvs
3977
3978 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3979
3980         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3981         packRegsForAccUse, packRegisters): new accumulator register
3982         packing algorithm
3983         * support/regression/ports/hc08/support.c (_putchar): suppress
3984         warning of unused variable
3985         * src/SDCCicode.c: added SWAP entry to codeTable
3986
3987 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3988
3989         * device/lib/sprintf.c: forgot to add this file before previous commit
3990
3991 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3992
3993         * src/pic16/gen.c (genPackBits): added operand right in function
3994         parameters, load result directly if p_type is POINTER (that is
3995         called by genNearPointerSet)
3996         * (genUnPackBits): added operand left in function parameters,
3997         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3998         FSR0 if accessing bitfields,
3999
4000 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4001
4002         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4003           _print_format; updated printf, sprintf, vsprintf
4004         * device/include/asm/default/features.h: corrected comment/define
4005         * device/lib/Makefile.in: added sprintf.c
4006         * device/lib/libsdcc.lib: added sprintf module
4007         * device/lib/printf_large.c,
4008         * device/lib/vprintf.c,
4009         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4010           into these 3 files
4011         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4012         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4013         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4014           hc08 test
4015         * support/regression/tests/zeropad.c: define idata as data for hc08
4016
4017 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4018
4019         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4020         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4021         labels are referenced at least once (even if a reference is not found)
4022         * src/hc08/gen.c (emitcode): set isComment flag for comments
4023         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4024         loads), rules 6a..6b (optimize jumps to return)
4025
4026 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4027
4028         * device/lib/acosf.c (acosf),
4029         * device/lib/asinf.c (asinf),
4030         * device/lib/atanf.c (atanf),
4031         * device/lib/ceilf.c (ceilf),
4032         * device/lib/cosf.c (cosf),
4033         * device/lib/coshf.c (coshf),
4034         * device/lib/cotf.c (cotf),
4035         * device/lib/fabsf.c (fabsf),
4036         * device/lib/floorf.c (floorf),
4037         * device/lib/log10f.c (log10f),
4038         * device/lib/logf.c (logf),
4039         * device/lib/sinf.c (sinf),
4040         * device/lib/sinhf.c (sinhf),
4041         * device/lib/sqrtf.c (sqrtf),
4042         * device/lib/tanf.c (tanf),
4043         * device/lib/tanhf.c (tanhf),
4044         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4045         replaced all instances of "reentrant" in the library functions
4046         defined in math.h with this macro.
4047         * support/regression/tests/float_trans.c: reenabled test for hc08
4048
4049 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4050
4051         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4052         erroneously deleted
4053
4054 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4055
4056         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4057         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4058         multi-byte volatile operands are used
4059         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4060         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4061         initialization to area GSINIT0 so that it would always precede
4062         any static initializers in GSINIT
4063         * support/regression/tests/zeropad.c: fixed idata define for hc08
4064         * support/regression/tests/bug-927659.c,
4065         * support/regression/tests/float_trans.c: disabled tests for hc08
4066         pending missing library routines
4067         * .version: increased version number to 2.4.4 - hc08 port now passes
4068         regression tests
4069
4070
4071 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4072
4073         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4074         * Makefile.common.in,
4075         * as/Makefile,
4076         * as/hc08/Makefile.in,
4077         * as/mcs51/Makefile.in,
4078         * as/z80/Makefile.in,
4079         * debugger/mcs51/Makefile.in,
4080         * device/include/Makefile.in,
4081         * device/lib/Makefile.in,
4082         * doc/Makefile,
4083         * link/Makefile,
4084         * link/z80/Makefile.in,
4085         * packihx/Makefile.in,
4086         * sim/ucsim/main_in.mk,
4087         * sim/ucsim/avr.src/Makefile.in,
4088         * sim/ucsim/doc/Makefile.in,
4089         * sim/ucsim/gui.src/serio.src/Makefile.in,
4090         * sim/ucsim/hc08.src/Makefile.in,
4091         * sim/ucsim/s51.src/Makefile.in,
4092         * sim/ucsim/xa.src/Makefile.in,
4093         * sim/ucsim/z80.src/Makefile.in,
4094         * src/Makefile.in,
4095         * support/cpp2/Makefile.in,
4096         * support/librarian/Makefile,
4097         * support/makebin/Makefile: added DESTDIR to the install path proposed
4098         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4099         * doc/sdccman.lyx: added DESTDIR documentation
4100
4101 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4102
4103         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4104         instruction for interrupt handlers, use fast returns when returning
4105         from high priority interrupts
4106
4107 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4108
4109         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4110         code generation
4111         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4112         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4113         bugs, ported much of Bernhard's code from mcs51
4114         * src/mcs51/gen.c (genSend),
4115         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4116         than one when calling a reentrant function
4117         * device/lib/_mullong.c: defined an alternate struct layout for big
4118         endian ports (hc08)
4119
4120 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4121
4122         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4123         test
4124
4125 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4126
4127         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4128         are sane and complete before asking the port its prefered parameter
4129         passing method (fixes bug #1017633)
4130         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4131         and _ret3
4132
4133 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4134
4135         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4136         problem in bitfields >= 8 bits.
4137
4138 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4139
4140         * src/SDCCsymt.c: undid changes that were not meant to be committed
4141
4142 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4143
4144         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4145
4146 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4147
4148         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4149           copied and wrong bit got inverted
4150
4151 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4152
4153         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4154         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4155         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4156         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4157         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4158         assignments to bitfields at known addresses
4159         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4160         reads from bitfields at known addresses
4161         * src/hc08/ralloc.c (packRegisters),
4162         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4163         genhc08Code): optimize pointer get values used as conditionals
4164         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4165         and branch
4166
4167 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4168
4169         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4170         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4171         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4172         as conditionals
4173
4174 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4175
4176         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4177
4178 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4179
4180         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4181         related problems
4182
4183 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4184
4185         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4186
4187 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4188
4189         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4190         mcs51 port
4191
4192 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4193
4194         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4195
4196 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4197
4198         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4199         cases use more compact code.
4200
4201 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4202
4203         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4204
4205 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4206
4207         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4208
4209 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4210
4211         * src/SDCCsymt.h,
4212         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4213         parameter of changePointer() from symbol* to sym_link*
4214         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4215         * src/SDCCsymt.c (compareType): void* type is castable to other
4216         pointers, but not necesarily an exact match.
4217         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4218         is no longer blindly treated as an exact match.
4219         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4220
4221 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4222
4223         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4224
4225 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4226
4227         * src/pic/gen.c,
4228         * src/pic/pcode.c,
4229         * src/pic/ralloc.h,
4230         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4231
4232 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4233
4234         * src/pic/device.c,
4235         * src/pic/device.h,
4236         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4237
4238 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4239
4240         * src/mcs51/gen.c (emitcode): fixed bug #992819
4241
4242 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4243
4244         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4245           there's no need to make it worse
4246
4247 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4248
4249         * src/mcs51/ralloc.c (deassignLR),
4250         * src/ds390/ralloc.c (deassignLR),
4251         * src/hc08/ralloc.c (deassignLR),
4252         * src/z80/ralloc.c (deassignLR),
4253         * src/pic/ralloc.c (deassignLR),
4254         * src/pic16/ralloc.c (deassignLR),
4255         * src/avr/ralloc.c (deassignLR),
4256         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4257         rlivePoint): fixed another part of bug #971834
4258
4259 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4260
4261         * src/z80/main.c: enabled "critical" keyword
4262         * src/z80/mappings.i,
4263         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4264         functions (fixes bug #979646)
4265         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4266
4267 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4268
4269         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4270           such as c:\mydir.
4271
4272 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4273
4274         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4275           doesn't disable too much optimizations
4276
4277 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4278
4279         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4280
4281 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4282
4283         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4284
4285 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4286
4287         * src/pic/gen.c tidied up tabs
4288         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4289         * src/pic/main.c tidied up tabs
4290         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4291         * src/pic/pcoderegs.c tidied up tabs
4292         * src/pic/ralloc.c tidied up tabs
4293
4294 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4295
4296         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4297         to S_FIXED for pic16 port and when symbol is not in level 0,
4298         allocate for S_REGISTER storage class and pic16 port, too,
4299         * src/pic16/device.h: prototype for checkSym,
4300         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4301         * (pic16_assignConfigWordValue): test the value and the mask to
4302         validate that the value is suitable for the configuration word,
4303         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4304         collect extern declared symbols, don't emit symbol twice, check
4305         first if symbol is in publics set first,
4306         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4307         * added command line '--fstack' which enables an experimental
4308         feature for stack access, too buggy to be used yet...
4309         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4310         * (pic16_allocDirReg): when register has storage class S_REGISTER
4311         allocate in pic16_dynAccessRegs,
4312         * device/include/pic16/pic18f????.h: modified configuration word
4313         naming convention, words started as CONFIG0H but should be CONFIG1H
4314
4315 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4316
4317         * device/include/mcs51reg.h: fixed bug 970993
4318
4319 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4320
4321         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4322         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4323         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4324         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4325         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4326         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4327           error/warning numbers,
4328           added function setWarningDisabled()
4329         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4330         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4331           _memcmp.c _memmove.c calloc.c realloc.c free.c
4332         * support/regression/tests/malloc.c: added tests for new functionality
4333         * support/regression/tests/zeropad.c: added tests for truncated initializers
4334           and initialized char arrays starting with '\x0'
4335         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4336
4337 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4338
4339         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4340
4341 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4342
4343         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4344         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4345         peephole 177.e. Thanks to anonymous
4346
4347 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4348
4349         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4350         function isn't used in the source but referenced as a
4351         variable initializer then declare it as extern in .asm file
4352
4353 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4354
4355         * .version: increased version number to 2.4.3
4356
4357         Adding version extension according to ChangeLog CVS revision
4358         * src/Makefile.in (target all): added dependency 'version.h'
4359         * (rule version.h): added rule to create version.h from ChangeLog,
4360         * (rule dep): added dependency version.h,
4361         * src/version.awk: AWK script to create version.h
4362         * src/SDCCdwarf2.c (dwWriteModule),
4363         * src/SDCCglue.c (initialComments),
4364         * src/SDCCmain.c (printVersionInfo): modified to write after
4365         version string the version extension number,
4366         * src/SDCCutil.c: included "version.h"
4367         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4368         number,
4369         * src/SDCCutil.h: added prototype for getBuildNumber
4370
4371         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4372         includeDirsSet, too,
4373         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4374         const char [] is found in function prototype...
4375
4376         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4377         moving to WREG with source is already in WREG,
4378         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4379         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4380         * (aopForSym): stack'ed symbols are partially supported, added
4381         if-clause to support symbols in FARSPACE,
4382         * (sameRegs): added test for AOP_ACC to see if registers are same,
4383         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4384         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4385         * (pic16_popRegFromString): will not allocate a new register if it
4386         doesn't find one by name, bug may have introduced...
4387         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4388         * (genIpush): revived to use pic16 port's stack,
4389         * (genAddrOf): added incomplete case for stack'ed operand,
4390         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4391         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4392         can handle multibyte operands,
4393         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4394         * (pic16initialComments): added message for MPLAB compatibility
4395         mode enabled,
4396         * src/pic16/main.h: prototype for pic16_mplab_comp,
4397         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4398         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4399         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4400         because of increased complexity of procedure,
4401         * (_process_pragma): stack pragma changed to format 'stack pos len',
4402         emit symbol '_stack_end' to conform with gplink,
4403         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4404         to search for register,
4405         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4406         PO_GPR_REGISTER,
4407         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4408         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4409         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4410         case for PO_GPR_REGISTER,
4411         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4412         dies, the new era is ahead !...
4413         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4414         pic16_dynInternalRegs,
4415         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4416         * (pic16_allocDirReg): minor optimizations and bug fixes,
4417         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4418
4419         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4420         load stack and frame pointer with address of 'stack_end' symbol
4421
4422 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4423
4424         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4425         without source code but only variable initializers
4426
4427 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4428
4429         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4430         external are not declared as extern to reduce overhead while linking
4431
4432 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4433
4434         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4435
4436 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4437
4438         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4439           Yee Keat for the patch
4440         * src/SDCCast.c (decorateType): fixed bug #979599
4441         * src/ds390/gen.h: removed local fReturnSizeDS390
4442         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4443         * src/ds390/gen.c (genAnd, genOr, genXor),
4444         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4445
4446 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4447
4448         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4449         add relFilesSet to $3, manipulate $2 to handle linking of object
4450         files without source files in command line,
4451         * device/include/pic16 (all headers): added ID location macros,
4452         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4453         entries for ID location bytes,
4454         * (pic16_assignIdByteValue): NEW,
4455         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4456         added field dumpcalltree to pic16_options_t,
4457         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4458         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4459         emitting rFalseIfx label after check_carry label,
4460         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4461         pic16_emitDIRegs), NEW
4462         * (pic16glue): dump .calltree file when option --calltree found,
4463         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4464         * (_pic16_genAssemblerPreamble): emit ID locations after
4465         configuration registers,
4466         * (pic16_linkCmd): modifications of the link command,
4467         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4468         * (pic16_pCodeInitRegisters): don't init stack registers,
4469         * (pic16_findPrevInstruction): fixed bug,
4470         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4471         bug with immediate registers,
4472         * (buildCallTree): traces stack push and pop,
4473         * (pct2): dump also stack usage for each function,
4474         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4475         * (pic16_allocDirReg): various modifications,
4476         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4477         fixed to 1,
4478
4479 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4480
4481         * src/pic16/pcode.c: removed buggy double colon
4482
4483 2004-07-01 Borut Razem <borut.razem AT siol.net>
4484
4485         * support/scripts/sdcc.nsi: added include/pic16 to setup
4486
4487 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4488
4489         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4490         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4491         target 'clean',
4492         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4493         specific command line arguments. Also added sample lkr script
4494         for placing a variable at a specific memory bank.
4495         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4496         at a specific memory bank,
4497         * (pic16_dump_isection): fixed bug which caused string literals to
4498         be omitted when dumping idata section,
4499         * (pic16_groupRegistersInSection): added code to handle registers
4500         in specific memory banks,
4501         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4502         public, all references are renamed too,
4503         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4504         AOP_DPTR2,
4505         * (pic16_storeForReturn): added case to handle when dest is WREG,
4506         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4507         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4508         pic16_rel_udata, check to see if that register is marked as being
4509         a member of a specific memory bank,
4510         * (pic16_printIvalCharPtr): added code to add string literals either
4511         to code or the idata sections,
4512         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4513         also accept the 'udata' pragma,
4514         * src/pic16/main.h: new structure types sectName and sectSym
4515         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4516         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4517         * (pic16_findPrevInstruction): fixed, it returned nothing,
4518         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4519         instruction combinations,
4520         * (pic16_FixRegisterBanking): heavily reorganised,
4521         * (pic16_AnalyzeBanking): if generating banksel directives is
4522         disabled, then don't call FixRegisterBanking at all,
4523         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4524         completely removed,
4525         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4526
4527 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4528
4529         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4530         Phuah Yee Keat <yk.phuah AT nestac.com>
4531
4532 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4533
4534         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4535         correctly the IVT even if it is relocated to some other location
4536
4537 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4538
4539         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4540         * device/include/pic16/pic18f2220.h: NEW,
4541         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4542         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4543         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4544         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4545         nodefaultlibs, ivt_loc is the location of the interrupt vector
4546         table, and nodefaultlibs signs that default libraries should not be
4547         linked in link stage,
4548         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4549         according to --ivt-loc argument,
4550         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4551         when pragma stack is found,
4552
4553 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4554
4555         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4556         256 (range check), 257 (do while), 258.a-f (bit banging
4557         f.e. on 3-wire SPI bus)
4558
4559 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4560
4561         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4562         variables used exclusively within a loop
4563
4564 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4565
4566         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4567
4568 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4569
4570         * src/SDCClrange.c (computeClash): fixed bug #971834
4571
4572 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4573
4574         * src/mcs51/gen.c (genCmp): fixed bug #975903
4575         * src/hc08/gen.c (operandsEqu),
4576         * src/ds390/gen.c (operandsEqu),
4577         * src/z80/gen.c (operandsEqu),
4578         * src/pic/gen.c (operandsEqu),
4579         * src/pic16/gen.c (operandsEqu),
4580         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4581         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4582
4583 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4584
4585         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4586
4587 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4588
4589         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4590         default case in switch statement,
4591         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4592         to eliminate problem with initialisation of pointers, but problem
4593         still exists,
4594         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4595         * (emitStaticSegment): removed various lines emitting debug info,
4596         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4597         added processor registers for utilizing EEPROM,
4598         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4599         configurable and set 8
4600
4601 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4602
4603         * .version: increased version number to 2.4.2,
4604
4605         Cumulative patch for pic16 port
4606         * src/pic16/device.c: changed scheme to dump initial values for
4607         variables in idata segment, all print_idata* functions were removed,
4608         now the pic16_printIval* will be called,
4609         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4610         * _pic16_printPointerType, pic16_printPointerType,
4611         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4612         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4613         NEW, similar to the respective functions in SDCCglue.c,
4614         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4615         way, emitting hex bytes,
4616         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4617
4618 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4619
4620         * src/avr/ralloc.c (serialRegAssign),
4621         * src/xa51/ralloc.c (serialRegAssign),
4622         * src/pic/ralloc.c (serialRegAssign),
4623         * src/pic16/ralloc.c (serialRegAssign),
4624         * src/hc08/ralloc.c (serialRegAssign),
4625         * src/z80/ralloc.c (serialRegAssign),
4626         * src/ds390/ralloc.c (serialRegAssign),
4627         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4628
4629 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4630
4631         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4632         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4633
4634 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4635
4636         Cumulative patch for pic16 port:
4637         * src/pic16/device.h (typedef PIC16_device) modified fields for
4638         defining microcontrollers,
4639         * src/pic16/device.c: added new info for all devices in Pics16 array,
4640         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4641         to be optimised out by the pCode optimiser,
4642         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4643         specially, bug reported by G.M. Gallant,
4644         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4645         as force'd so that cannot be optimised out by pCode optimiser,
4646         * src/pic16/pcode.c,
4647         * src/pic16/pcodepeeph.c,
4648         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4649         they are disabled by default, but can be enabled explicit with
4650         command argument --denable-peeps, for testing,
4651         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4652         --pomit-ivt in COMPILE_FLAGS
4653
4654 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4655
4656         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4657           compilation on MSVC
4658
4659 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4660
4661         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4662
4663 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4664
4665         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4666         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4667
4668 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4669
4670         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4671         would only assign 0x300001 register.
4672
4673 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4674
4675         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4676         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4677
4678 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4679
4680         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4681         for ds80c400
4682         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4683         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4684         added peephole 254 (left shift), 255 (jump table)
4685
4686 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4687
4688         * device/lib/Makefile.in: removed comment line with model-pic16,
4689         * (target port-specific-objects-pic16): the libraries and objects
4690         are copied to the build directory form the device/lib/pic16/bin
4691         directory
4692
4693         Cumulative patch concerning pic16 port:
4694         * library directory has been re-organized,
4695         * added support for PIC18F1220,
4696         * added headers and library sources for chips 18f1220,18f6520,
4697         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4698
4699         * configuration registers setting has changed, now each supported
4700         device has a complete description of the registers it uses,
4701         * all initialisations are moved to idata sections, these section
4702         can be absolute or relocatable,
4703         * fixed initialisation of codespace variables,
4704         * fixed warning about PCLATU and gpsim,
4705         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4706         * (genAssign): use table reads when assigning from variables in codespace,
4707         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4708         char/int variables placed in codespace,
4709         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4710         registers set in .asm file, no need for --pomit-config-words anymore,
4711         * (pic16glue): some 8051 legacy segments are commented out
4712         (to be removed completely),
4713         * added support for alternative assembler and linker with --asm=
4714         and --link= command line arguments,
4715         * peepholes are disabled automatically in the port, no need to
4716         specify on command line,
4717         * port supports natively char/int/long multiplication, but converts
4718         all divisions to support functions,
4719         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4720         to the file set in variable $2,
4721         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4722         strings in ASCII format and not in hex,
4723         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4724         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4725         allocate proper register if iCodes aren't temporary,
4726
4727 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4728
4729         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4730
4731 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4732
4733         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4734         is commented out
4735
4736 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4737
4738         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4739         computed address is reused
4740         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4741         multi-byte bitfields
4742
4743 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4744
4745         * src/z80/gen.c: (genArrayInit): must check for pointers too
4746
4747 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4748
4749         * support/regression/tests/zeropad.c: never meant to commit the
4750           nestedstruct test: removed, added check for GCC version
4751
4752 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4753
4754         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4755         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4756         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4757           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4758           bugs 928906 and 954082 half-empty initializers
4759         * src/SDCCsymt.h,
4760         * src/SDCCsymt.c (getAllocSize): added for above fix
4761         * src/z80/gen.c (genArrayInit): fixed bug 741044
4762         * support/regression/tests/zeropad.c: added tests
4763
4764 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4765
4766         * src/pic16/device.c (pic16_dump_section): corrected bug which
4767         caused some symbols of the libraries to be misplaced
4768
4769 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4770
4771         * src/pic16/glue.c,
4772         * src/pic16/ralloc.h,
4773         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4774         to fix conflict with pic port
4775
4776 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4777
4778         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4779         externs configuration variables,
4780         * src/pic16/ralloc.h,
4781         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4782         prototype in header, commented out some debug messages
4783
4784 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4785
4786         * src/pic16/glue.c,
4787         * src/pic16/main.c,
4788         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4789         for gpasm COFF object generation. Thanks to D. Hawkins for
4790         his patch info
4791
4792 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4793
4794         * src/ds390/main.c,
4795         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4796         Brock for spotting this)
4797         * src/ds390/gen.c (genEndFunction),
4798         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4799         interrupt handler and critical. Disable push/pop optimizations when
4800         peephole optimizations disabled.
4801
4802 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4803
4804         Updated pic16 library sources and headers.
4805         * device/lib/pic16/pic18f*/ ,
4806         * device/include/pic16/*.h: modified to handle structured SFR
4807         definitions
4808
4809 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4810
4811         * src/port.h (PORT structure): added hook initPaths, now each
4812         port can declare its own default search paths,
4813         which can been seen with the --print-search-dirs option,
4814         see pic16 port for example,
4815         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4816         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4817         * (doPrintSearchDirs): NEW, replaces in a central manner the
4818         printing of search dirs which was split in set*Paths functions,
4819         * (main): added call to port->initPaths and doPrintSearchDirs,
4820         * src/avr/main.c,
4821         * src/ds390/main.c,
4822         * src/hc08/main.c,
4823         * src/izt/i186.c,
4824         * src/izt/tlcs900h.c,
4825         * src/mcs51/main.c,
4826         * src/pic/main.c,
4827         * src/pic16/main.c: modified port structures to reflect addition of
4828         initPaths hook,
4829
4830         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4831         * (pic16_dump_section): for registers in same address reserve memory once,
4832         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4833         to no_banksel,
4834         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4835         result is greater in size than right or left,
4836         * (pic16_genUMult8X8_8): there are some cases where the result can
4837         be 16 bits size, so handle these,
4838         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4839         * (pic16_outBitC): modified to emit pcodes,
4840         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4841         or not,
4842         * (genDivOneByte): implemented algorithm to divide 8-bits,
4843         * (genCmp): uncommented goto, but issues still exist,
4844         * (genAnd): fixed a bug with variables >8bits,
4845         * (genPackBits): optimization added that uses BCF/BSF to change a
4846         single bit,
4847         * (genAssign): fixed bug when assigning floating point literals,
4848         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4849         __sdcc_gsinit_startup label,
4850         * src/pic16/main.c (_pic16_init): removed search directory
4851         initialisations,
4852         * (_pic16_initPaths): NEW, used to initialise search directories,
4853         * (_hasNativeMulFor): support functions for all except char/int
4854         multiplication, and char division,
4855         * (PIC16_port struct): modified entry for native mul support,
4856         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4857         no_banksel option,
4858         * (buildCallTree): call to register_usage is ifdef'ed out,
4859
4860 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4861
4862         * device/include/string.h: applied Stas Sergeev's patch to make this
4863         header file compatible with the preprocessor -Wundef option
4864         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4865         failure (fixes bug #941458)
4866
4867 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4868
4869         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4870         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4871         that the variable, not the function, should be static
4872         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4873         to be consistent with non-literal case
4874
4875 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4876
4877         * src/SDCCast.c (isConformingBody): fixed bug #949967
4878         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4879         convilong): fixed bug #952086
4880
4881 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4882
4883         * src/SDCCmem.c (allocVariables): fixed bug #955321
4884
4885 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4886
4887         * src/hc08/main.c (_hc08_genAssemblerEnd),
4888         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4889         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4890         completely eliminated the use of a temporary file
4891         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4892         when more than one file linked
4893         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4894
4895 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4896
4897         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4898         which fixes bug #543481
4899         * support/regression/tests/bug-751703.c: fixed comments left from a
4900         cut and paste error
4901         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4902         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4903         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4904         scopes
4905         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4906         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4907         are now changed to underscores in moduleName
4908
4909 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4910
4911         * as/mcs51/lkmem.c: better fix for bug #954173
4912
4913 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4914         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4915
4916         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4917         * device/include/c8051f000.h,
4918         * device/include/c8051f120.h,
4919         * device/include/c8051f300.h,
4920         * device/include/c8051f310.h,
4921         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4922         PWM16) and detab'ed
4923
4924 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4925
4926         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4927         and mailing lists, doc'ed --no-peep-comments, removed reference
4928         to knoppix (newest version has no LyX/LaTeX), other minor changes
4929         * src/SDCCglue.c (glue): save 2 bytes stack space with
4930         option --main-return. The ljmp could probably be avoided too
4931
4932 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4933
4934         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4935
4936 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4937
4938         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4939         * src/SDCCopt.c (isLocalWithoutDef),
4940         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4941         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4942         (credit to Maarten Brock for patch #949363, on which this is based)
4943         * support/regression/tests/bug-751703.c: some test cases of extern used
4944         within inner scopes.
4945
4946 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4947
4948         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4949         SPEC_STRUCT
4950         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4951         struct definitions
4952         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4953         dwWriteLabel): fix to create valid debugger symbols even when
4954         the module name has non-alphanumeric symbols in it
4955         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4956         when a variable's allocation has been optimized away
4957
4958
4959 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4960
4961         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4962         * src/hc08/main.c,
4963         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4964         * src/mcs51/main.c,
4965         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4966         * src/ds390/main.c,
4967         * src/z80/gen.c (z80_emitDebuggerSymbol),
4968         * src/z80/main.c,
4969         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4970         * src/pic/main.c,
4971         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4972         * src/pic16/main.c,
4973         * src/avr/gen.c (avr_emitDebuggerSymbol),
4974         * src/avr/main.c,
4975         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4976         * src/xa51/main.c,
4977         * src/SDCCdebug.c (emitDebuggerSymbol),
4978         * src/SDCCdebug.h,
4979         * src/port.h: added a debugger struct to the port struct. Added a
4980         callback for defining debugger symbols
4981
4982         * src/SDCCast.c (createLabel),
4983         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4984         with isitmp = 1
4985         * src/SDCCicode.h,
4986         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4987         iCode back to the ast for the function
4988
4989         * src/hc08/ralloc.c (hc08_assignRegisters),
4990         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4991         unneeded fields from the regs struct.
4992         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4993         pushReg() & pullReg() functions instead of emitcode()
4994
4995         * src/hc08/gen.c (genLabel, genhc08Code),
4996         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4997
4998         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4999         debugger hooks
5000
5001         * src/hc08/gen.c (genEndFunction, genhc08Code),
5002         * src/hc08/gen.h,
5003         * src/mcs51/gen.c (genEndFunction, gen51Code),
5004         * src/mcs51/gen.h,
5005         * src/ds390/gen.c (genEndFunction, gen390Code),
5006         * src/ds390/gen.h,
5007         * src/z80/gen.c (genEndFunction, genZ80Code),
5008         * src/z80/gen.h,
5009         * src/z80/z80.h,
5010         * src/pic/gen.c (genEndFunction, genpic14Code),
5011         * src/pic/gen.h,
5012         * src/pic16/gen.c (genEndFunction, genpic16Code),
5013         * src/pic16/gen.h,
5014         * src/avr/gen.c (genEndFunction, genAVRCode),
5015         * src/avr/gen.h,
5016         * src/xa51/gen.c (genEndFunction, genXA51Code),
5017         * src/xa51/gen.h,
5018         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5019         specific code to cdbFile.c and out of the backend code generators
5020
5021         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5022         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5023         starting address is now 0
5024
5025         * as/hc08/asm.h,
5026         * as/hc08/m08pst.c,
5027         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5028         assembler directive for DWARF support
5029         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5030
5031         * src/src.dsp,
5032         * src/Makefile.in,
5033         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5034
5035 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5036
5037         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5038         and inappropriate peephole optimization in jump tables
5039
5040 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5041
5042         * as/hc08/m08pst.c,
5043         * src/SDCCglue.c: sdccopt works for the hc08 port now
5044
5045 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5046
5047         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5048
5049 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5050
5051         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5052
5053 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5054
5055         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5056         rules
5057         * src/SDCCmain.c,
5058         * src/SDCCglobl.h,
5059         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5060         comments from the peephole optimizer replacement rules
5061         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5062         symbols
5063         * src/SDCCcse.c (updateSpillLocation),
5064         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5065         equivalents
5066         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5067         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5068         objects far pointers
5069
5070 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5071
5072         * src/SDCCsymt.h: a missing part of my last change
5073         * src/pic/ralloc.c (regTypeNum),
5074         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5075
5076 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5077
5078         * src/SDCCicode.h,
5079         * src/SDCCicode.c (aggrToPtrDclType),
5080         * src/SDCCptropt.h,
5081         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5082         ptrPseudoSymConvert),
5083         * src/pic/ralloc.c (regTypeNum),
5084         * src/pic16/ralloc.c (regTypeNum),
5085         * src/hc08/ralloc.c (regTypeNum),
5086         * src/ds390/ralloc.c (regTypeNum),
5087         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5088         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5089
5090 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5091
5092         * link/z80/lkmain.c (afile),
5093         * as/hc08/lkmain.c (afile),
5094         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5095         prevent a pointer problem when a filename has no directory and
5096         no extension specified.
5097
5098 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5099
5100         * link/z80/lkmain.c (afile): allow periods in directory names
5101         * link/z80/lkmain.c (afile),
5102         * as/mcs51/lkmain.c (afile),
5103         * as/hc08/lkmain.c (afile): allow linker script file to have an
5104         extension other than ".lnk"
5105         * link/z80/lklex.c (getfid),
5106         * link/z80/lkmain.c (parse),
5107         * as/mcs51/lklex.c (getfid),
5108         * as/mcs51/lkmain.c (parse),
5109         * as/hc08/lklex.c (getfid),
5110         * as/hc08/lkmain.c (parse): Support comments in the linker script
5111         file on lines by themselves and after filenames
5112
5113 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5114
5115         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5116
5117 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5118
5119         * src/z80/peeph-z80.def: removed some peephole rules that don't
5120         work with multibyte arithmetic (fixed bug #937126)
5121         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5122         to registers and not global variables
5123         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5124         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5125         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5126         checking for assignments not internally generated (fixed bug #931895)
5127         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5128         structure member (fixed bug #930072)
5129
5130 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5131
5132         * src/SDCCmain.c (linkEdit),
5133         * src/hc08/main.c (_hc08_parseOptions),
5134         * as/hc08/Makefile.in,
5135         * as/hc08/aslink.h,
5136         * as/hc08/asm.h,
5137         * as/hc08/m08pst.c,
5138         * as/hc08/lkrloc.c (relr, rele),
5139         * as/hc08/lkarea.c (lnkarea)
5140         * as/hc08/lkmain.c (afile, parse),
5141         * as/hc08/lkelf.c: support for ELF output
5142         * as/hc08/lks19.c (s19),
5143         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5144
5145 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5146
5147         * as/mcs51/lkihx.c: Fixed bug #899105.
5148
5149 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5150
5151         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5152         .dsp files from Unix to DOS.
5153
5154 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5155
5156         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5157         function pointers; we have been compliant for several months now.
5158         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5159         change that was accidently commented out
5160         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5161         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5162         bug #922319
5163
5164 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5165
5166         * src/hc08/gen.c: output of all of the internal debugging information
5167         is now controlled by the D() macro; it is disabled by default
5168
5169 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5170
5171         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5172         harder to keep the same registers during a CAST iCode
5173         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5174         long via int can be done in a single cast, if the signedness is
5175         correct.
5176         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5177         putchar() in tinibios.c in ds390's library
5178
5179 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5180
5181         * src/SDCCast.c (decorateType): fixed bug #898889,
5182         cast result of a literal complement too
5183         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5184         fixed check for bitfields
5185
5186 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5187
5188         * src/SDCCicode.c (geniCodeLogic): made it static,
5189         (geniCodeLogicAndOr): added in order to fix bug #905492,
5190         (ast2iCode): fixed bug #905492
5191         * support/regression/tests/bug-905492.c: added
5192         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5193         (processParms): fixed bug #927659: don't copy parms, this will clear
5194         decorated flag
5195         * support/regression/tests/bug-927659.c: added
5196
5197 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5198
5199         * src/SDCCast.c (addCast): don't cast float to char
5200         * device/lib/libsdcc.lib: added _memmove
5201
5202 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5203
5204         * device/lib/large/Makefile: fixed parallel execution by
5205         replacing `make` by `$(MAKE)`
5206
5207 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5208
5209         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5210         offsets (fixes bug #923936)
5211
5212 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5213
5214         * device/lib/small/Makefile: fixed parallel execution by
5215         replacing `make` by `$(MAKE)`
5216
5217 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5218
5219         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5220
5221 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5222
5223         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5224         * src/regression/Makefile: Regression test was not running.
5225
5226 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5227
5228         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5229         complement if possible
5230         * src/SDCCval.c (valComplement),
5231         * src/SDCCicode.c (operandOperation): fixed complement of literal
5232         * support/regression/tests/onebyte.c (testComplement): added
5233
5234 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5235
5236         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5237         return an optimized tree; actually replace actParm with the new tree
5238         * src/SDCCast.h: added some parantheses to remove side effects
5239         * support/regression/tests/bug-920866.c
5240
5241 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5242         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5243         Bit operands were not being handled properly in the pic14 port.
5244         (now src/regression/add.c passes again).
5245
5246 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5247
5248         * src/SDCC.y (labeled_statement): case and default no longer require
5249         a following statement (RFE #893037)
5250
5251 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5252
5253         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5254         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5255         disabled (fixes bug #916294)
5256         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5257         "mov a,acc"; patch provided by Lenny Story
5258         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5259
5260 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5261
5262         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5263         functions
5264         * src/ds390/gen.c (genFunction, genEndFunction),
5265         * src/ds390/ralloc.c (ds390_assignRegisters),
5266         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5267         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5268         pushed if there are parameters passed on the stack. Also, a cleaner
5269         way to decide if r0/r1 should be pushed/popped. (Together they fix
5270         bug #918693)
5271
5272 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5273
5274         * doc/sdccman.lyx,
5275         * device/lib/mcs51/crtpagesfr.asm,
5276         * device/lib/mcs51/crtxinit.asm,
5277         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5278         to avoid confusion with Si Lab's SFRPAGE register.
5279
5280 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5281
5282         * src/SDCCglue.c (emitMaps): allow public sfr variables
5283         * src/SDCCglue.c (initialComments): include compiler build date
5284         with compiler version and put the timestamp of the generated
5285         assembly file on a serperate line to be less confusing.
5286         * src/port.h: added genInitStartup hook
5287         * src/avr/main.c,
5288         * src/ds390/main.c,
5289         * src/hc08/main.c,
5290         * src/pic/main.c,
5291         * src/pic16/main.c,
5292         * src/xa51/main.c,
5293         * src/z80/main.c: genInitStartup initialize as NULL (default to
5294         historical behaviour)
5295         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5296         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5297         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5298         library instead of hard coding it into the compiler.
5299         * support/regression/ports/mcs51-stack-auto/spec.mk,
5300         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5301         * device/lib/mcs51/Makefile,
5302         * device/lib/small/Makefile,
5303         * device/lib/large/Makefile,
5304         * device/lib/mcs51/crtpagesfr.asm,
5305         * device/lib/mcs51/crtstart.asm,
5306         * device/lib/mcs51/crtxclear.asm,
5307         * device/lib/mcs51/crtxinit.asm,
5308         * device/lib/mcs51/crtclear.asm,
5309         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5310         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5311         and into user configurable files.
5312         * device/lib/clean.mk: clean mcs51 directory too
5313         * support/regression/tests/longlit.c: added static to T1 declaration
5314         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5315         accesses in the initialization code
5316
5317 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5318
5319         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5320         OSCTRIMVAL as noted in bug #916008
5321
5322 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5323
5324         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5325         in loops with multiple exits (reported as incorrect registers
5326         used by Martin Helmling in Sdcc-user list)
5327
5328 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5329
5330         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5331         made ds390 register extensions look less like error messages
5332
5333 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5334
5335         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5336         reported by Adam Wozniak in Sdcc-user list
5337
5338 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5339
5340         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5341         arithmetic optimizations, added debug output
5342
5343 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5344
5345         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5346         * sdcc.spec: updated and split sdcc into 3 rpms
5347         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5348         needed for literals of LEFT_OP and '+'
5349         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5350         introduced RESULT_TYPE_NOPROM
5351         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5352         left shift
5353         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5354         limited promotion to int only for '*'
5355         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5356
5357 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5358
5359         * src/pic16/gen.c (genSkip),
5360         (genc16bit2lit), (gencjneshort): commented out
5361         (is_LitOp): new helper function, checks operand type
5362         (genCmpEq): rewritten
5363
5364 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5365
5366         * support/regression/tests/bug-908454.c: added
5367
5368 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5369
5370         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5371         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5372         (geniCodeCast): cosmetic, don't preserve bit storage class
5373         (geniCodeLeftShift): added promotion
5374         (geniCodeLogic): fixed regression
5375         * src/SDCCsymt.c (computeTypeOr): accept bits too
5376         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5377
5378 2004-03-07  Borut Razem <borut.razem AT siol.net>
5379
5380         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5381
5382 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5383
5384         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5385         version of pic16_genPackRegisters which does not check if ic is a
5386         CAST operator,
5387         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5388         function cause string1.c regression test fails
5389
5390 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5391
5392         * sim/ucsim/configure.in,
5393         * sim/ucsim/configure,
5394         * sim/ucsim/doc/Makefile.in: use docdir
5395         * src/SDCC.y: fixed sbit atrributes
5396         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5397         * src/SDCCast.c (decorateType): |^& need special promotion handling
5398         * src/SDCCast.h,
5399         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5400         * src/SDCCsymt.h (computeType),
5401         * src/SDCCicode.c: computeType() needs op
5402         * src/SDCCsymt.c (checkTypeSanity),
5403         * doc/sddman.lyx: "plain" bitfields are unsigned
5404         * src/SDCCsymt.c (computeTypeOr): added
5405         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5406         |^& ops
5407         * src/SDCCval.c (val*): computeType() needs op
5408         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5409         * support/regression/tests/onebyte.c: added tests for |^&
5410
5411 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5412
5413         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5414         for writing icode into asm output.
5415
5416 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5417
5418         * src/pic16/device.c: added some debug lines enabled
5419         with macro DEBUG_CHECK,
5420         * src/pic16/genarith.c: more debug in genPlus,
5421         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5422         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5423         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5424         * (aopForSym): onStack symbols are re-placed in data memspace,
5425         and onStack flag is cleared,
5426         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5427         copy temporary pcodeop,
5428         * (genPcall): added warning for not updating PCLATU,
5429         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5430         always true for pic16 port,
5431         * (genMultOneWord): NEW, supports integer multiplication,
5432         * (genMult): modified to call genMultOneWord,
5433         * (ifxForOp): added warning when return NULL,
5434         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5435         flag is set before call to operandFromSymbol for implicit
5436         added structures,
5437         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5438         options.intlong_rent are set by default,
5439         * (_hasNativeMulFor): modified to allow port generation of integer
5440         multiplication,
5441         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5442         set regtype to REG_SFR for all registers, restricting seting the
5443         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5444
5445 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5446
5447         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5448         more than 500 times in the regression tests
5449
5450 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5451
5452         * support/Util/SDCCerr.h,
5453         * support/Util/SDCCerr.c,
5454         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5455         enumerator_list),
5456         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5457         for symbol conflicts.
5458         * support/valdiags/tests/enum.c,
5459         * support/valdiags/tests/tentdecl.c,
5460         * support/valdiags/tests/struct.c: expect possible error messages
5461         referring to original symbol definitions.
5462         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5463         * src/SDCCsymt.h,
5464         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5465
5466 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5467
5468         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5469
5470 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5471
5472         * src/pic16/ralloc.c (newReg): fixed bug #908929
5473
5474 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5475
5476         * src/ds390/gen.c: added missing #include "main.h"
5477
5478 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5479
5480         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5481         checking if symbol is already in set,
5482         * src/pic16/device.h: prototype for checkAddSym,
5483         * src/pic16/gen.c: (_G): added entry interruptvector,
5484         * (assignResultValue): removed some commented out lines,
5485         * (genFunction): check for ISR via sym->type, absolute section for
5486         interrupt code is created via a new pBlock, the goto instruction is
5487         placed now correctly at the interrupt vector position, changed all
5488         references from ivec to _G.interruptvector,
5489         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5490         is the interrupt is a high priority one, same for return from ISR,
5491         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5492         externs to calls of checkAddSym,
5493         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5494         pic16_pcode_verbose flag is set,
5495         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5496         * src/pic16/pcoderegs.c: message about how many registers are saved
5497         will only be emitted if pic16_pcode_verbose flag is set,
5498
5499 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5500
5501         * src/ds390/ralloc.h,
5502         * src/ds390/ralloc.c (ds390_regWithIdx),
5503         * src/ds390/gen.c (emitcode),
5504         * src/ds390/main.h,
5505         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5506         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5507         ds390operandCompare, getRegsRead, getRegsWritten,
5508         initializeAsmLineNode): customized instruction size calculation for
5509         ds390, started basis for some register optimizations
5510         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5511         corresponding assembly output
5512         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5513         missing push/pop of r0/r1. Optimized push/pops
5514
5515 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5516
5517         * src/mcs51/main.c (instructionSize): fixed ACALL size
5518         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5519
5520 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5521
5522         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5523         the sorting of rlist with NULL elements
5524         * (print_idataType, print_idata): NEW to create idata sections
5525         * src/pic16/device.h: idataSymSet new variable
5526         * src/pic16/gen.c (genFunction): fixed some bugs in string
5527         comparing, improved the absolute section creation for ISRs,
5528         added FSR0L/FSR0H in registers that are saved in an ISR,
5529         * (genInline): fixed the processing of inline snippets,
5530         now they undergo no process by the peephole optimizer
5531         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5532         are placed in idataSymSet,
5533         * (pic16emitStaticSeg): extern symbols are added in externs,
5534         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5535         switching when aboslute variables are placed in access bank memory
5536         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5537         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5538         commented out with #if,
5539         * (pic16_packRegisters): reintroduce the check for CAST because some
5540         symbols are not correctly handled,
5541         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5542         pCodeInstruction instead of pCode,
5543         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5544         pCodeAsmDir definition,
5545         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5546         directive, then the argument directive is emitted without the leading
5547         tab, hack for inline labels which must be in the first column,
5548         * (compareLabel,pic16_findNextInstruction),
5549         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5550         * (insertBankSwitch): modified for the new pCodeAsmDir,
5551
5552 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5553         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5554
5555         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5556         instance,
5557         * (pushSide): commented out with #if,
5558         * (assignResultValue): fixed some typos in saving
5559         registers,
5560         * (genPcall): FIXED and sync'ed with genCall,
5561         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5562         * (genNearPointerGet): fixed to handle some more cases,
5563         implementation scheme via table reads,
5564         * (genConstPointerGet): modified to access code memory correct,
5565         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5566         and improved to handle some cases
5567         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5568         instead of "RETLW" for init data
5569         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5570         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5571         variables are placed in access bank memory (<0x80 and >=0xf80),
5572         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5573         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5574         TBLWT_POSTDEC,TBLWT_PREINC
5575         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5576         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5577         directives
5578         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5579         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5580         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5581         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5582
5583 2004-02-29  Borut Razem <borut.razem AT siol.net>
5584
5585         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5586         support/Util/findme.h, support/Util/system.h: enhance binary relative
5587         search for lib and include by using findProgramPath()
5588
5589 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5590
5591         * src/SDCCpeeph.h,
5592         * src/SDCCpeeph.c (pcDistance),
5593         * src/port.h,
5594         * src/mcs51/ralloc.h,
5595         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5596         * src/mcs51/main.h,
5597         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5598         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5599         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5600         size calculation port specific, started basis for some register
5601         optimizations
5602         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5603         missing push/pop of r0/r1. Optimized push/pops
5604         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5605         * device/lib/_modsint.c (_modsint),
5606         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5607         and stack version so regression tests pass
5608
5609 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5610
5611         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5612         * src/SDCCast.c (decorateType): catch another small optimization
5613         with '?' operator
5614         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5615         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5616         modified to finally use computeType() all over SDCC,
5617         see Feature Request #877103
5618         * src/SDCCval.h: cosmetic
5619         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5620         valCompare(); regression tested in muldiv.c
5621         * support/regression/tests/muldiv.c (testMod): mod sign follows
5622         dividend only
5623
5624 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5625
5626         * src/SDCCast.c (decorateType): fixed bug #902362
5627         * doc/INSTALL.txt: fixed install instructions for win32
5628
5629 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5630
5631         * device/include/Makefile.in (install): fixed by replacing spaces
5632         by tabs
5633         * doc/README.txt,
5634         * doc/INSTALL.txt: updated for release
5635         * doc/sdccman.lyx: added warning for --xstack being buggy
5636
5637 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5638
5639         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5640         to eliminate build warnings.
5641         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5642
5643 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5644            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5645
5646         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5647         removed -penable-stack, added comment for stack pragma, added
5648         warning for not initializing the stack/frame registers, removed
5649         comment at interrupts section
5650
5651         Stack is made permanent, there is no ability to disable stack usage.
5652         * src/pic16/device.h,
5653         * src/pic16/device.c: removed all references to USE_STACK macro,
5654         * src/pic16/device.c (pic16_dump_section): when no elements in
5655         rlist, free rlist before return,
5656         * (pic16_dump_int_registers): NEW, internal registers are a new set
5657         of general purpose registers reused by each function,
5658         * (checkAddReg): returns 1 if registers is added to set,
5659         * (pic16_groupRegistersInSection): when a registers is of type
5660         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5661         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5662         SRCASECMP macro is moved here from device.c
5663         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5664         PO_PCLATU, PO_PRODL, PO_PRODH,
5665         * (pic16_pCodeOpType, genMinus,
5666         changed compares to "a" register, with AOP_ACC,
5667         * (pic16_genPlus): fixed some bugs and indented properly,
5668         * (pic16_addSign): changed size to size+offset in the MOVWF
5669         instruction,
5670         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5671         multiply 8-bit operand by literal, result is 8-bit,
5672         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5673         multiply 2 8-bit operand, result is 8-bit,
5674         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5675         genUMult8X*_16,
5676         * src/pic16/gen.c: changed accUse to contain WREG only,
5677         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5678         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5679         true, do not use immediate addressing any more unless sym is a
5680         pointer in codespace,
5681         * (aopForRemat): do not use immediate addressing when symbol not in
5682         codespace and when symbol's address is requested,
5683         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5684         accUse size (= 1),
5685         * (aopGet): added case for AOP_ACC and don't return "accumulator
5686         bug" but WREG instead,
5687         * (popGetTempReg): pushes contents of temporary register in stack,
5688         * (popReleaseTempReg): pops contents of temporary register from
5689         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5690         * (pic16_popGet): separated case AOP_ACC to return register WREG
5691         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5692         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5693         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5694         the use of immediate pointers to certain cases only.
5695
5696         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5697         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5698         * (assignResultValue, genCall, genRet): modified to use the new
5699         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5700         genPcall is still broken,
5701         * (genFunction): added code to create 'A' type pBlocks when
5702         interrupt functions are generated, code not extensively tested yet,
5703         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5704         * (genEndFunction): modified so ISRs pop stored registers from stack,
5705         * (genMultOneByte): cleanup,
5706         * (AccRsh): added flag andmask, to and result with appropriate mask,
5707         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5708         * (genDataPointerGet): fixed and reenabled its use,
5709         * (genNearDataPointerGet): bugs fixed,
5710         * (genDataPointerSet): bugs fixed,
5711         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5712         pic16_DumpSymbol, pic16_DumpOp,
5713         * src/pic16/genutils.h: function prototypes for the above functions,
5714         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5715         pointers,
5716         * (pic16emitRegularMap): many many many improvements, but needs a
5717         major cleanup,
5718         * src/pic16/main.c: enable_stack in pic16_options is removed,
5719         * (_pic16_parseOptions): removed command line options -penable-stack,
5720         * (_process_pragma): emit stack symbol only when stack pragma is
5721         processed,
5722         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5723         redirected to FSR0L/FSR0H pair,
5724         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5725         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5726         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5727         for immediates,
5728         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5729         * (dumpPicOptype): NEW,
5730         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5731         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5732         with movff instruction,
5733         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5734         added pic16_int_regs, some packRegsFor* functions are commented out,
5735         because produce errors,
5736         * src/pic16/NOTES: minor modifications
5737
5738 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5739
5740         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5741         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5742         --pack-iram.
5743         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5744         * as/mcs51/lkaomf51.c: fixed bug #895763
5745
5746 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5747
5748         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5749
5750 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5751
5752         * doc/sdccman.lyx: added details about the HC08 storage classes and
5753         interrupts, fixed the register usage info for z80 & gbz80
5754
5755 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5756
5757         * doc/sdccman.lyx: added more pic16 port documentation
5758         * device/include/pic16/: added header pic18fregs.h
5759
5760 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5761
5762         * doc/sdccman.lyx: added Vangelis' contribution
5763
5764 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5765
5766         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5767         extend to the next CALL or PCALL, not just to the next CALL.
5768
5769 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5770
5771         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5772
5773 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5774
5775         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5776         bug #895752 and a better fix for bug #716790
5777
5778 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5779
5780         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5781
5782 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5783
5784         * doc/sdccman.lyx: minor changes, minor changed
5785
5786 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5787
5788         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5789         which can't handle SDCC_NEWONEBYTEOPS,
5790         (geniCodeMultiply): removed conversion from mult to shift for pic14
5791         and pic16
5792
5793 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5794
5795         * src/hc08/gen.h,
5796         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5797         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5798         thus fixing bug #895406
5799
5800 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5801
5802         * device/lib/_modsint.c,
5803         * device/lib/_modslong.c: sign follows divisor only
5804         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5805         signs or signedness can be ignored
5806         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5807         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5808         added optimization for IFX,
5809         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5810         arguments;
5811         reenabled optimization for IFX, which was removed on 2004-01-11
5812         * src/SDCCast.h: added return type IFX
5813         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5814         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5815         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5816         SDCC_OLDONEBYTEOPS selects the old behaviour
5817         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5818         changed again and commented promotion rule
5819         * src/SDCCval.c (valDiv): promotion no longer necessary
5820         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5821         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5822         rewritten
5823         * support/regression/tests/onebyte.c: added
5824
5825 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5826
5827         * gen.c (genInline): reverted to old code for assemnling inline
5828         code because of bug reported James Chadd
5829
5830 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5831
5832         * ralloc.h: missing declarations from previous patch,
5833         seems that patch for ralloc.h was never applied, fixed
5834
5835 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5836            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5837
5838         * pcode.c,
5839         * pcode.h,
5840         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5841         indirect addressing. Marked FSR0 as deprecated
5842         * gen.c (pointerCode): commented out, not needed now
5843         (pic16_popGet2p): new MOVFF helper function
5844         (genGenPointerGet),
5845         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5846         (shiftRLong): removed duplicate debugging info
5847
5848 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5849
5850         * src/ds390/gen.c (genNearPointerGet),
5851         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5852         optimization with bits, but not bitfields.
5853         * src/ds390/ralloc.c (packRegisters),
5854         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5855
5856 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5857
5858         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5859
5860 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5861
5862         * src/SDCCsymt.h,
5863         * src/SDCCicode.c (operandFromSymbol),
5864         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5865         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5866         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5867         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5868         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5869         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5870         bug #892038
5871         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5872         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5873         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5874         * src/SDCCsymt.c (newSymbol),
5875         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5876         enumerator_list),
5877         * src/SDCCval.h,
5878         * src/SDCCval.c (newiList): fixed bug #885705
5879
5880 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5881
5882         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5883         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5884
5885 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5886
5887         * device/include/c8051f120.h,
5888         * device/include/c8051f300.h,
5889         * device/include/c8051f310.h: added/updated header files for Silicon
5890         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5891         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5892         in new section Submitting patches
5893
5894 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5895
5896         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5897         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5898         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5899         genGenPointerSet),
5900         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5901         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5902         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5903         genGenPointerSet),
5904         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5905         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5906         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5907         genGenPointerSet),
5908         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5909         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5910         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5911         genGenPointerSet): fixed bug #892400
5912         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5913         to eliminate build warnings.
5914         * src/SDCCast.c (processParms),
5915         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5916         fixed bug 751859
5917         * support/valdiag/valdiag.py: added GCC to the list of defines active
5918         when compiling with gcc
5919
5920 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5921
5922         * support/Util/SDCCerr.h,
5923         * support/Util/SDCCerr.c,
5924         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5925         with an incomplete type (fixed bug #883734)
5926         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5927
5928 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5929
5930         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5931
5932 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5933
5934         * src/SDCCast.c (decorateType),
5935         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5936         function pointer implementation
5937         * support/regression/tests/funptrs.c: added tests to verify both forms
5938         of function pointers work correctly. Added tests to verify parameters
5939         are passed in the correct order.
5940
5941 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5942
5943         * device.c (regCompare): registers are sorted by ascending
5944         address and increasing size,
5945         * main.c (_pic16_finaliseOptions): removed the declaration
5946         of compiler macro MCU. Now a macro of the format pic18fxxxx
5947         will be defined from the command line
5948
5949 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5950             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5951
5952         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5953         PCOP_RLCF was overwritten!
5954         * gen.c (genSkip): commented out calls to pic16_emitcode,
5955         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5956         * (genlshTwo),
5957         * (genRRC): added debugging info,
5958         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5959         overwritten while shifting,
5960         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5961         overwritten while shifting,
5962         * (AccLsh),
5963         * (AccRsh),
5964         * (shiftLLeftOrResult),
5965         * (shiftRLeftOrResult),
5966         * (shiftRLong),
5967         * (shiftLLong): Implemented with pic16_emitpcode
5968         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5969         * (genLeftShift): Fixed bug, operand for shift by variable always
5970         was "and"ed with 0x0f,
5971         * (genLeftShiftLiteral),
5972         * (genrshTwo),
5973         * (genRightShiftLiteral): added debugging info,
5974         * (genrshFour): added comment,
5975         * (genRightShift): determined signedness from operand "left"
5976         instead of "result"
5977
5978 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5979
5980         * src/SDCCicode.c (geniCodeParms),
5981         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5982         function pointers, fixed function pointer bugs #861242 and #861896
5983
5984 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5985
5986         * device/include/c8051f000.h,
5987         * device/include/c8051f120.h,
5988         * device/include/c8051f300.h: added header files for Silicon
5989         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5990
5991 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5992
5993         * src/SDCCast.c (processParams): added new type flow and restructured
5994         (gatherAutoInit): added new type flow
5995         (addCast): cosmetic changes
5996         (getLeftResultType): added new type flow for array indices, patch
5997         provided by Stas, see FR #877103
5998         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5999         array index patch by Stas
6000         * src/SDCCast.h: added prototype getResultTypeFromType()
6001         * src/SDCCval.h,
6002         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6003         * src/pic/glue.c (pic14emitStaticSeg),
6004         * src/pic16/glue.c (pic16emitStaticSeg),
6005         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6006         for initialization of symbols
6007         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6008         * support/Util/SDCCerr.h:
6009         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6010         * .version: bumped version number to 2.3.8
6011         * device/include/Makefile.in (install),
6012         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6013         avoid warnings
6014
6015 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6016
6017         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6018         Slade Rich fixed an optimization bug
6019         * src/pic/pcodepeep.c,
6020         * src/pic/pcoderegs.c
6021         * doc/Makefile (install): added test for directory
6022
6023 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6024
6025         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6026         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6027         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6028         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6029         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6030         * as/mcs51/asexpr.c (term),
6031         * as/hc08/asexpr.c (term): fixed bug #887146
6032
6033 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6034
6035         * src/z80/gen.c (genMult): handle single byte result product
6036         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6037         DUMMY_READ_VOLATILE (fixed bug #886367)
6038
6039 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6040
6041         * support/regression/tests/libmullong.c: fixed logic, on little endian
6042         hosts we ended without a mullong_wrapper()
6043
6044 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6045
6046         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6047         virus/worm forged address usage.
6048
6049 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6050
6051         Fixed promotion, it should be done on AST level:
6052         * src/SDCCast.c (addCast): added promotion to int
6053         (decorateType): updated call to upCast()
6054         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6055         usualUnaryConversions()
6056
6057 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6058
6059         * support/regression/tests/literalop.c (mulWrapper): Added a
6060         wrapper to remove integer overflow warnings.
6061
6062         * support/regression/tests/float_trans.c: Made work on host.
6063
6064         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6065         location of sz80.
6066
6067         * support/regression/generate-cases.py (main): Changed from inline
6068         to a main method.
6069
6070         * doc/Makefile (install): Changed to depth first to get rid of
6071         missing directory install warning.
6072
6073         * as/Makefile (install-doc): Made work on Mac.
6074
6075 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6076
6077         * src/SDCCast.c: added an additional type flow in decorateType() of
6078         opposite direction, see feature request #860006; it's enabled at runtime
6079         by setting the environment variable SDCC_NEWTYPEFLOW
6080         * src/SDCCast.h: changed prototype of decorateType()
6081         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6082         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6083         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6084         see feature request #877103
6085         * src/SDCCval.c: updated call of decorateType()
6086         (valBitwise): fixed bug #882876
6087         (valMinus): added promotion
6088         (valLogicAndOr): result is unsigned
6089         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6090         * src/SDCCsymt.c (computeType),
6091         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6092         must not cause an unsigned operation
6093         * src/pic/glue (pic14emitRegularMap),
6094         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6095
6096 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6097
6098         * src/pic/pcode.c (PCodeID): commented out left over debug code
6099
6100 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6101
6102         * support/valdiag/tests/overflow.c: added shift tests
6103         * src/pic/device.c,
6104         * src/pic/gen.c,
6105         * src/pic/gen.h,
6106         * src/pic/glue.c,
6107         * src/pic/main.c,
6108         * src/pic/pcode.c,
6109         * src/pic/pcode.h,
6110         * src/pic/pcodepeep.c,
6111         * src/pic/pcoderegs.c,
6112         * src/pic/ralloc.c,
6113         * src/pic/ralloc.h: applied patch from Slade Rich;
6114         added support for multiple code pages and multiple RAM banks on the
6115         PIC 14 port. The ASM files now no longer simply assume all the
6116         code / RAM are in the same page / bank. This means the linker can
6117         safely allocate code/RAM of separate ASM files to different pages/banks.
6118         * doc/sdccman.lyx: added Slade's tips
6119         * src/mcs51/peeph.def: fixed bug #880768
6120
6121 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6122
6123         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6124         * src/SDCCast.c (decorateType): fixed bug #880197
6125
6126 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6127
6128         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6129         getopt.h.
6130
6131         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6132         strtof is not part of C89 and isn't included with Mac OS X.
6133
6134 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6135
6136         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6137         shiftL2Left2Result): fixed bug #879326
6138         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6139         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6140         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6141         address fetch for clr instruction
6142         * device/lib/hc08/_mulint.c: created optimized assembly version
6143         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6144
6145 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6146
6147         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6148         proposed in FR #877103
6149
6150 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6151
6152         * src/SDCCval.c (cheapestVal): added missing checks
6153         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6154         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6155
6156 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6157
6158         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6159         equal operands
6160
6161 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6162
6163         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6164         loaded with the linker search paths (-L arguments) and the libraries
6165         to be linked with the current source (-l arguments). Changes
6166         currently will affect only the pic16 port.
6167         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6168         include path the port specific paths and port specific libraries,
6169         * gplink command now contains the $3 argument,
6170         * src/pic16/device.h,
6171         * src/pic16/device.c,: structure PIC_device is made public and
6172         renamed to PIC16_device, the same for variable Pics which is renamed
6173         to Pics16. Updated all references to them.
6174         * src/pic16/glue.c (pic16glue): corrected bug with code
6175         initialization which bypassed the variable initializations block.
6176
6177         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6178         COMPILE_FLAGS and added the --nostdinc option
6179
6180 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6181
6182         * device/include/mc68hc908jb8.h: Register defs for another member
6183         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6184
6185 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6186
6187         Documenting changes from previous commits.
6188         * configure.in (version 1.56),
6189         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6190         when generating output files to configure the pic16 library,
6191         but now I've commented it out, since gputils aren't installed in the
6192         SF compile farm, so library won't compile
6193
6194         * device/lib/Makefile.in (version 1.56): initially I've added in
6195         target 'all' the prerequestive 'model-pic16' so it compiled the
6196         pic16 library, but now I've commented it out for the same reasons
6197         above,
6198         * added targets 'model-pic16' and 'objects-pic16' to compile the
6199         library
6200         * added target 'port-specific-objects-pic16' to handle the
6201         generated libraries and copy them into the build/ directory
6202         * added target 'clean-intermediate-pic16' to clean intermediate
6203         files into pic16 directory
6204         * in target 'installdirs' added line to create directory pic16 in
6205         the installation path
6206
6207         * device/include/Makefile.in (version 1.11): in target 'install'
6208         added lines to copy all header files to installation path,
6209         * in target 'installdirs' added line create directory for pic16
6210         headers in the installation path
6211
6212 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6213
6214         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6215          a function call
6216
6217 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6218
6219         * configure,
6220         * device/lib/configure.in,
6221         * device/lib/configure: fixed for autoconf 2.57
6222
6223 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6224
6225         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6226         option so that it actually works. Made it specific to the z80, since
6227         the gbz80 doesn't have these kinds of I/O ports.
6228
6229 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6230
6231         * device/include/z180.h,
6232         * device/lib/_memcpy.c,
6233         * device/lib/_memmove.c,
6234         * device/lib/_mulint.c,
6235         * device/lib/ser_ir.c,
6236         * device/lib/ser_ir_cts_rts.c,
6237         * device/lib/_strcmp.c,
6238         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6239         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6240         portmode; added deprecation warning for bank= and protmode= forms.
6241         Also, guard against buffer overflow.
6242         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6243
6244 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6245
6246         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6247         changed interrupt vector table generation to only emit declared vectors.
6248         * device/include/Makefile.in: added missing backslash
6249         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6250
6251 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6252
6253         Mainly changes to support compilation of the device libraries
6254         * src/pic16/device.c: stack is allocated via symbol and not
6255         via literal number. The symbol is placed in the corresponding
6256         position of the data ram
6257         * (pic16_dump_section): relocatable and absolute uninitialized
6258         data are now emitted in sorted order to reduce section naming,
6259         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6260         weren't marked as being in the access bank,
6261
6262 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6263
6264         Added portion of GNU PIC Library under the directory
6265         device/include/pic16 and device/lib/pic16. These files
6266         contain the declarations of SFRs for the PIC18Fxx2 devices.
6267         The directory is initialized via configure from toplevel.
6268
6269 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6270
6271         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6272         the spilllocations to be compared correctly
6273
6274 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6275
6276         * src/SDCCast.c (decorateType): fixed bug introduced today
6277
6278 2004-01-12  Borut Razem <borut.razem AT siol.net>
6279
6280         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6281         doc/sdccman.lyx: upper case pragmas are deprecated
6282
6283 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6284
6285         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6286         in simpler and even better code
6287
6288 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6289
6290         * src/SDCCicode.c (operandOperation): fixed bug #874819
6291         * src/SDCCast.c (decorateType): fixed
6292         char foo (unsigned long ul) { return ul > 0; }
6293
6294 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6295
6296         * doc/sdccman.lyx: Moved and added some sections, small changes
6297         all over. Telling LaTeX to be less strict with word spacing
6298         to better keep the right margin. Changed some notes about
6299         maintainance of the ports in section 3.2.1 - is it OK like this?
6300
6301 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6302
6303         SDCC source changes:
6304         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6305         convilong): modified to inform the pic16 port that builtin functions
6306         are external
6307
6308         PIC16 PORT specific changes:
6309         * src/pic16/device.c pic16_dump_equates() added,
6310         processor registers declared internally by the port are emitted in
6311         the translation as equates,
6312         * src/pic16/gen.c: inline code is passed unprocessed to the
6313         translation,
6314         * (pic16_popGetLit2): fnuction modified to take second operand as
6315         pCodeOp pointer and not as literal,
6316         * (popRegFromIdx): prefixed with pic16_,
6317         * (pic16_popCombine2): modified to receive already allocated pCode
6318         operands,
6319         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6320         * (genFunction): initializes local stack frame and pushes on stack
6321         all the registers used by this function,
6322         * (genEndFunction): restores all registers from stack and restores
6323         stack frame,
6324         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6325         improvements,
6326         * (pic16glue): changed the program startup sequence,
6327         * added new dbName code 'A' for functions placed in absolute section
6328         * src/pic16/main.c: added function attribute _naked,
6329         * added pragma 'code' to place a fnuction at an absolute address,
6330         * added command line arguments --debug-ralloc and --pcode-verbose,
6331         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6332         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6333         * (pic16_newpCodeOpLit2): modified to take the second operand as
6334         pCodeOp pointer,
6335         * (pic16_printpBlock): modified to emit each function in a separate
6336         section,
6337         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6338         UPPER for immediate operands,
6339         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6340         instruction,
6341         * src/pic16/peeph.def: all peepholes with movff are commented out,
6342         because there is a problem in the pcode peep optimizer,
6343         * src/pic16/ralloc.c: the register allocator can now reuse local
6344         function symbols for another function. This saves register usage.
6345         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6346
6347         Added file src/pic16/NOTES with information about program writing on
6348         the current port version.
6349
6350 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6351
6352         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6353         and peephole 252 (array access)
6354
6355 2004-01-09  Borut Razem <borut.razem AT siol.net>
6356
6357         * src/SDCCmain.c : fixed #872250: -l command line defined library
6358           files are scanned before standard library files
6359
6360 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6361
6362         * src/SDCCast.c (decorateType): fixed bug #874046
6363
6364 2004-01-09  Borut Razem <borut.razem AT siol.net>
6365
6366         * support/scripts/sdcc.nsi: remove previous installation
6367
6368 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6369
6370         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6371         bytes for last interrupt vector (mcs51)
6372         * sdcc.spec: fixed typo
6373
6374 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6375
6376         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6377         gen51Code): more efficient parameter receive for --model-large
6378         ("bug" #845294)
6379
6380 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6381
6382         * src/ds390/main.c,
6383         * src/z80/main.c: added missed needLinkerScript flags (more than
6384         one port structure defined in these file)
6385         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6386         bug #795325
6387
6388 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6389
6390         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6391         * src/port.h: added flag needLinkerScript in port->linker
6392         structure to inform whether to create a .lnk file or not,
6393         * src/avr/main.c,
6394         * src/ds390/main.c,
6395         * src/hc08/main.c,
6396         * src/mcs51/main.c,
6397         * src/pic/main.c,
6398         * src/pic16/main.c,
6399         * src/xa51/main.c,
6400         * src/z80/main.c: changed appropriately to configure
6401         needLinkerScript flag
6402         * src/pic/gen.c,
6403         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6404         * src/pic/glue.c: added variable udata_section_name to
6405         override default uninitialized data segment definition for
6406         devices only with SHAREBANK memory (reported from Erik Epetrich)
6407         * (pic14emitOverlay): modified to emit a commented overlay segment
6408         directive when no overlay data exist
6409         * (picglue): modified to emit uninitialized data segment
6410         according to udata_section_name
6411         * src/pic/main.c (_pic14_parseOptions): added command line
6412         options --udata-section-name=[name] to override default
6413         udata definition name
6414         * modified _linkCmd and _asmCmd to include compiler passed
6415         arguments via -W option
6416         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6417         object file from '.rel' to '.o' in port->linker structure,
6418         changed size of fptr from 2 to 3 in port structure
6419
6420 2004-01-07  Borut Razem <borut.razem AT siol.net>
6421
6422         * support/scripts/sdcc.nsi: update PATH
6423         * support/scripts/sdcc.ico: craeted
6424
6425 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6426
6427         * device/include/Makefile.in: fix install
6428         * doc/Makefile: fix install
6429
6430 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6431
6432         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6433         in bug #860505
6434         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6435         how the function variable allocation summary is displayed; also
6436         include information about variables allocated to the overlay
6437         segment
6438
6439 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6440
6441         * as/mcs51/lkmain.c: Help about -Y option
6442         * as/mcs51/lkarea.c: Fixed gcc warnings
6443
6444 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6445
6446         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6447         fixed warning
6448         * support/valdiag/tests/overflow.c: added
6449         * src/SDCCast.c (decorateType),
6450         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6451         LEFT_OP (left shift)
6452
6453 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6454
6455         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6456         (default behaviour).
6457
6458 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6459
6460         A python script to validate compiler diagnostic messages. It can be
6461         used to verify that sdcc complains about bad c source code and
6462         gives a good location of the error.
6463         * support/valdiag/Makefile,
6464         * support/valdiag/valdiag.py,
6465         * support/valdiag/tests/*
6466
6467 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6468
6469         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6470         * src/SDCCsymt.c (newEnumType),
6471         * src/SDCCsymt.h
6472         * support/Util/SDCCerr.c,
6473         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6474         enum related bugs.
6475         * support/regression/tests/enum.c: added test for enum values that
6476         require at least 2 bytes of storage.
6477
6478 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6479
6480         * src/common.h: added ifndef/define/endif macros
6481         around the header file.
6482         Bug reported from Jesus Calvino-Fraga
6483
6484 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6485
6486         * sdcc.spec: updated
6487         * device/include/Makefile.in: don't install CVS directories
6488         * device/lib/Makefile.in: added removal of CVS directories after install
6489         * doc/Makefile: fixed install, added local_icons
6490         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6491         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6492         * src/ds390/gen.c (genRightShift): fixed bug #870788
6493         * src/SDCCast.c (decorateType): fixed bug #870781
6494
6495 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6496
6497         PIC16 port related changes:
6498         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6499         added variable stackPos,
6500
6501         * gen.c: genCall, assignResultValue: added support for
6502         pushing/retrieving function parameters to/from stack,
6503         genFunction,genEndFunction: setup stack frame for the
6504         generated function,
6505         genAddrOf: will be changed according to bug 863624
6506
6507         * added files genutils.c and genutils.h which contain gen*
6508         debugged and optimised functions extracted from gen.c
6509
6510         * glue.c: added variable 'externs' which holds extern symbols,
6511         pic16emitRegularMap: is modified to properly handle relocatable
6512          symbols under the new scheme,
6513         pic16createInterruptVect: is modified
6514         pic16printPublics: is modified to emit 'global' assembler directives,
6515         added pic16_printExterns to print extern symbols,
6516         pic16glue: initializes stack/frame pointer in the beginning of
6517         the assembly output. Temporary hack, will be corrected later,
6518         because gplink yet does not support stack and SDCC does not
6519         yet support a type of crt0.o object to create the final binary.
6520
6521         * Removed many lines that contain 8051 legacy code.
6522         * The code is finally placed under a 'code' directive.
6523         * Added port specific options.
6524
6525         * _process_pragma: simplified since now we do not need *special*
6526         include file to define SFR registers. But a separate header
6527         will be needed. This will be developed later.
6528         * _pic16_parseOptions: added, parses port specific options:
6529         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6530         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6531         --preplace-udata-with=
6532
6533         * _pic16_setDefaultOptions: modified to initialize section names,
6534         but hack is temporarly out of order since it needs improvement.
6535         * _pic16_genAssemblerPreamble: configuration words are emitted by
6536         their address instead of their name. This part is incomplete and
6537         supports only the 18Fxx2 devices. Other devices will emit an error
6538         during assembly since they do not contain the same set of config
6539         registers
6540         * _pic16_genIVT: is modified,
6541
6542         * pcode.c: added definitions for some hardware registers that are needed
6543         for stack support
6544         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6545         All PCI entries are updated. Now LFSR is supported.
6546         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6547         * added pic16_newpCodeOpLit2 to support instructions with
6548         two literal arguments
6549         * pic16_pCode2str: corrected code that emits assembler instructions
6550         with two literal operands and those that have an access bit modifier
6551         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6552         this fixes a bug which caused some labels to be lost, when an
6553         assembler directive was added, i.e. banksel,
6554         * pic16_FixRegisterBanking: improved logic that causes the insertion
6555         of bank switching,
6556         * InlineFunction: functions that are called once, are not any more
6557         inlined. This can be a port option in the future,
6558
6559         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6560
6561         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6562         hold the corresponding uninitialized symbols,
6563         * pic16_allocProcessorRegister: registers have explicit marked the
6564         accessBank field,
6565         * pic16_allocInternalRegister: registers are explicit marked as
6566         not used,
6567         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6568         processing list, so bit registers were lost,
6569         *
6570
6571         * ralloc.h: added field 'accessBank' and original symbol operand
6572         in register definition,
6573         * removed the field isMapped from register definition,
6574
6575         ** Several functions have been removed from various sources:
6576         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6577         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6578         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6579         pic16_assignRelocatableRegisters
6580
6581         ** others have been introduced:
6582         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6583         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6584
6585 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6586
6587         * support/scripts/inc2h.pl: changed definition of BIT_AT
6588         to emit 'sbit at' instead of 'bit at'. This was a request.
6589
6590         PIC16 port related preliminary changes:
6591         * gen.c: prefixed function popRegFromString with
6592         pic16_ and all references to it corrected
6593         * pcode.c: all pic16_pc_* hardware registers prefixed
6594         with underscore (_),
6595         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6596         * ralloc.c: newReg(): when register is REG_SFR then
6597         set address to rIdx,
6598         pic16_allocProcessorRegister(): marks register wasUsed=0
6599         pic16_writeUsedRegs(): added a call to assign processor
6600         registers via pic16_assignFixedRegisters
6601
6602 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6603
6604         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6605         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6606         variables in unused register banks.  Also the SSEG is placed
6607         wherever there is enough space for it, and IDATA can be anywhere
6608         in internal RAM.  For now compile using -Wl-Y[stack_size].
6609         The mem file is different for this option as well, since it
6610         makes no sense of talking about DSEG lenght.
6611
6612 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6613
6614         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6615         in certain cases, e.g. when ROM assignment, patch provided
6616         from Albert den Haan.
6617
6618 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6619
6620         Many signedness and type propagation fixes:
6621         * src/SDCCicode.c: made geniCodeCast() static
6622         replaced SPEC_ by IS_ (cosmetic)
6623         (operandOperation): fixed div and mod operation
6624         (usualBinaryConversions): added support for promotion of char
6625         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6626         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6627         (geniCodeAdd): an array index will stay unsigned, even if promoted
6628         from char to int
6629         (geniCodeArray): ditto
6630         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6631         * src/SDCCsymt.c (computeType): added more support for char;
6632         promotion of char is selectable by promoteCharToInt, fixed signedness
6633         for all cases
6634         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6635         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6636         * src/SDCCval (val*): replaced signedness calculation by
6637         computeType()
6638         rearranged if-branches (cosmetic)
6639         (valShift): added warning W_SHIFT_CHANGED
6640         (valCompare): fixed problem with different types
6641         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6642         * support/regression/tests/literalop.c: added many cases
6643         * support/regression/tests/ast_constant_folding.c: changed finally to
6644         'unsigned int'
6645         * .version: new year, new version: 2.3.7
6646         * src/SDCCmain.c (main): applied patch #866468
6647         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6648         provided by Scott Bronson
6649         * doc/sdccman.lyx: updated documentation for sdcdb
6650         updated and added chapter tips
6651
6652 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6653
6654         * src/SDCCsymt.h: missing from yesterday's commits
6655
6656 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6657
6658         * src/SDCC.y (struct_or_union_specifier),
6659         * support/Util/SDCCerr.c,
6660         * support/Util/SDCCerr.h: verify that struct & union tags are used
6661         as declared.
6662
6663 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6664
6665         * src/SDCCglobl.h: missing from yesterday's commits
6666
6667 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6668
6669         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6670         sft_attributes, struct_declaration, parameter_declaration,
6671         type_name, start_block, declaration_list),
6672         * src/SDCC.lex (check_type): support redefinition of typedef names
6673
6674 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6675
6676         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6677         aligned xdata arrays. Erik helped me with the if clause.
6678
6679 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6680
6681         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6682         warning
6683
6684 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6685
6686         * src/SDCCast.h,
6687         * src/SDCCast.c (newAst_),
6688         * src/SDCCicode.h,
6689         * src/SDCCicode.c (ast2iCode, newiCode),
6690         * src/SDCCglobl.h,
6691         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6692         expr, statement, expression_statement, selection_statement,
6693         iteration_statement, expr_opt, jump_statement): foundation for tracking
6694         sequence points
6695         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6696         point code too)
6697
6698 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6699
6700         * support/Util/SDCCerr.c,
6701         * src/SDCCast.h,
6702         * src/SDCCast.c (createCase, createDefault, decorateType),
6703         * src/SDCClabel.c (labelUnreach),
6704         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6705         to error messages.
6706         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6707         (with thanks to Stas Sergeev)
6708         * device/include/time.h,
6709         * device/lib/time.c (CheckTime): suppress unreachable code warning
6710
6711 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6712
6713         * src/SDCCast.c (createIvalCharPtr),
6714         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6715         bug #753752)
6716         * support/regression/tests/nullstring.c: tests for these two bugs
6717
6718 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6719
6720         * support/Util/SDCCerr.h,
6721         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6722         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6723         about storage class and 'at' used inside struct or union
6724         * src/SDCCBBlock.c (iCodeFromeBBlock),
6725         * src/SDCCcse.c (ifxOptimize),
6726         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6727         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6728         printIval, emitStaticSeg, emitOverlay),
6729         * src/SDCClabel.c (deleteIfx),
6730         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6731         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6732         gatherAutoInit, processParms),
6733         * support/Util/SDCCerr.h,
6734         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6735         reporting for post-parse errors.
6736
6737 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6738
6739         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6740         implicit casts via union; they don't work on big endian systems
6741         (possible fix for bug #861138)
6742
6743 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6744
6745         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6746         * src/mcs51/main.c: fixed the fix for bug #737001
6747
6748 2003-12-15  Borut Razem <borut.razem AT siol.net>
6749
6750         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6751
6752 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6753
6754         * support/makebin/makebin.c: put output in binary mode
6755
6756 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6757
6758         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6759         xdata and data memory on startup. Set the environment variable
6760         SDCC_NOGENRAMCLEAR to disable this.
6761         * src/mcs51/peephole.def,
6762         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6763         (allows non-interrupt and interrupt code to safely compete for a resource
6764         without the non-interrupt code having to disable interrupts)
6765
6766 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6767
6768         * src/SDCCicode.c (geniCodeAdd),
6769         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6770         with valFromType if type might be a pointer and host is big endian).
6771         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6772         types, not just integer types.
6773         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6774         multiply defined with mismatching "at" address.
6775
6776 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6777
6778         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6779         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6780         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6781         with embedded nulls (fixed bug #753752)
6782
6783 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6784
6785         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6786         Apparently this did not see much testing (endless loop)
6787
6788 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6789
6790         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6791
6792 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6793
6794         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6795         gracefully handle NULL memmap pointers
6796
6797 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6798
6799         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6800         instead of deleting the iCode when an operand is volatile
6801         * src/z80/gen.c (genDummyRead),
6802         * src/mcs51/gen.c (genDummyRead),
6803         * src/ds390/gen.c (genDummyRead),
6804         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6805         not just IC_RIGHT
6806         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6807         * src/SDCC.y: fixed bug #850420
6808
6809 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6810
6811         Applied z80 i/o port patch from Peter Townson and fixed some operators
6812         to better handle operands in A register.
6813         * device/include/z180.h
6814         * src/SDCC.y
6815         * src/SDCCglue.c
6816         * src/z80/gen.c
6817         * src/z80/gen.h
6818         * src/z80/main.c
6819         * src/z80/peeph-z80.def
6820         * src/z80/peeph.def
6821         * src/z80/z80.h
6822
6823 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6824
6825         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6826
6827 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6828
6829         * device/lib/hc08/_mullong.c: Removed extra #endif
6830
6831 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6832
6833         * sim/ucsim/hc08.src/inst.cc,
6834         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6835         carries from x to h
6836         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6837         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6838         * device/include/stdarg.h: fixed varargs for hc08
6839         * device/lib/Makefile.in,
6840         * device/lib/hc08/Makefile,
6841         * device/lib/hc08/_mulint.c,
6842         * device/lib/hc08/_mullong.c: fixed some endian problems
6843
6844 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6845
6846         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6847         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6848         * device/lib/_gptrget.c,
6849         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6850
6851 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6852
6853         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6854         * src/SDCCast.c (astErrors): fixed bug #846007
6855         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6856
6857 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6858
6859         * src/SDCCast.c (decorateType): disabled a transformation I added in
6860         revision 1.188 (access to fields of a structure at an absolute address);
6861         it breaks with bitfields, extern declarations, and gcse analysis.
6862         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6863         could be assigned through a pointer, so don't complain.
6864         * src/SDCCast.c (astErrors),
6865         * src/SDCCast.h,
6866         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6867
6868 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6869
6870         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6871         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6872         output of __config directives, since gpasm now supports them
6873         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6874         pre-processor macro, i.e. -DMCU=p18f452
6875         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6876         and modified to handle 'cast' icode similarly to '=' icode
6877         * src/pic16/device.h (typedef struct PIC_device): added field
6878         'extMIface' to indicate that chip has external memory interface
6879         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6880         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6881         18F8720
6882
6883 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6884
6885         * src/SDCC.y (pointer): fixed bug #846006
6886         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6887         * src/SDCCast.c (decorateType): fixed bug #846009
6888         * src/ds390/peeph.def,
6889         * src/ds390/gen.c (genAnd, genOr),
6890         * src/mcs51/peeph.def,
6891         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6892
6893 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6894
6895         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6896         * src/SDCCdflow.c
6897         * src/SDCCcse.c
6898         * src/SDCCcse.h
6899         * src/SDCCBBlock.h
6900         * src/SDCCBBlock.c
6901
6902 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6903
6904         fixed bug #845089
6905         * src/SDCCbitv.h,
6906         * src/SDCCbitv.c: added function to free a bitvector
6907         * src/SDCClrange.h,
6908         * src/SDCClrange.c: added function to recompute the liveranges
6909         * src/avr/ralloc.c,
6910         * src/ds390/ralloc.c,
6911         * src/hc08/ralloc.c,
6912         * src/mcs51/ralloc.c,
6913         * src/pic/ralloc.c,
6914         * src/pic16/ralloc.c,
6915         * src/xa51/ralloc.c,
6916         * src/z80/ralloc.c: recompute the liveranges after register packing
6917
6918 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6919
6920         * src/SDCCloop.c (newInduction): fixed bug #845630
6921
6922 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6923
6924         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6925         inadvertantly left behind from my 2003-11-12 change
6926
6927 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6928
6929         Updated headers I neglected to commit yesterday.
6930         * src/SDCClrange.h,
6931         * src/SDCCicode.h
6932
6933 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6934
6935         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6936         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6937         * src/SDCCopt.c (eBBlockFromiCode),
6938         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6939         the creation of the key hash table from the sequencing so it can be used
6940         earlier (for some GCSE bug fixes still pending)
6941
6942 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6943
6944         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6945         * support/regression/tests/addsub.c: testing genPlus shortcut
6946
6947 2003-11-15  Borut Razem <borut.razem AT siol.net>
6948
6949         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6950
6951 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6952
6953         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6954         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6955         ordering is immaterial.
6956         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6957
6958 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6959
6960         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6961         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6962         (SIGSEV) of bug #840381
6963         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6964         unlink new file before rename if new and old filenames are the same)
6965
6966 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6967
6968         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6969         uninitialized variables) for the mcs51. Set environment variable
6970         SDCC_GENRAMCLEAR to test.
6971         xdata initialization slightly shorter
6972
6973 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6974
6975         * src/SDCCsymt.h,
6976         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6977         #838241 & 780691 (basicly the same bug)
6978         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6979         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6980
6981 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6982
6983         * src/SDCCmain.c (linkEdit): "fix" #834252
6984
6985 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6986
6987         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6988         * src/SDCCast.h,
6989         * src/SDCC.y: fixed bug #819403
6990
6991 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6992
6993         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6994         the reentrant attribute.
6995         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6996         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6997         simulation
6998         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6999         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7000         erroneously reduced to a literal.
7001         * src/hc08/ralloc.c (packRegisters, rematStr),
7002         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7003         some cases
7004
7005 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7006
7007         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7008         * doc/sdccman.lyx: changed from 'article' to 'book'
7009         * doc/Makefile: readded test_suite_spec and cdbfileformat
7010
7011 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7012
7013         * device/include/stdlib.h: include malloc.h to comply with ANSI
7014         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7015
7016 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7017
7018         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7019         * doc/clean.mk: also remove *.out files
7020         * doc/sdccman.lyx: some additions, larger top/bottom margins
7021
7022 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7023
7024         * src/SDCC.y: fixed bug #837365
7025         * support/regression/tests/bitopcse.c
7026         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7027         a symbol (might be valop instead)
7028         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7029         * device/lib/clean.mk: added hc08 to the cleaning list
7030
7031 2003-11-04  Borut Razem <borut.razem AT siol.net>
7032
7033         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7034           made 2003-11-04
7035         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7036           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7037           malloc is declared in standard stdlib.h
7038
7039 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7040
7041         * device/lib/hc08/Makefile: need to clean .rel not .o files
7042         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7043
7044 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7045
7046         * src/port.h,
7047         * src/hc08/main.c,
7048         * src/mcs51/main.c,
7049         * src/ds390/main.c,
7050         * src/z80/main.c,
7051         * src/avr/main.c,
7052         * src/pic/main.c,
7053         * src/pic16/main.c,
7054         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7055         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7056         tests (which uses the port's oclsExpense function)
7057         * src/SDCC.y,
7058         * src/SDCCast.c,
7059         * src/SDCCicode.c,
7060         * src/hc08/gen.c,
7061         * src/ds390/gen.c,
7062         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7063
7064 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7065
7066         * src/SDCCcse.c (ifxOptimize),
7067         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7068         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7069         deleting the IFX iCode.
7070         * src/hc08/ralloc.c: reduced unneeded slocs
7071         * src/hc08/gen.c: fixed bug in asmopToBoolean
7072
7073 2003-11-04  Borut Razem <borut.razem AT siol.net>
7074
7075         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7076           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7077           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7078           transferred to configure
7079
7080 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7081
7082         Use headers defined in the C[++] standards:
7083         * sim/ucsim/gui.src/serio.src/fileio.cc
7084         * sim/ucsim/gui.src/serio.src/frontend.cc
7085         * sim/ucsim/gui.src/serio.src/main.cc
7086         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7087         * support/Util/NewAlloc.c
7088         * as/hc08/lklibr.c
7089         * as/mcs51/lklibr.c
7090         * as/z80/aslist.c
7091         * as/z80/assym.c
7092
7093 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7094
7095         * Added MSVC projects for hc08 assembler and linker:
7096         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7097         /as/hc08/link_hc08.dsp
7098
7099 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7100
7101         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7102
7103 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7104
7105         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7106
7107 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7108
7109         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7110
7111 2003-10-31  Borut Razem <borut.razem AT siol.net>
7112
7113         * support/cpp2/cpplib.h,
7114           support/cpp2/cpplib.c,
7115           support/cpp2/cpplex.c,
7116           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7117           to switch _asm block preprocessing on / off. Default is
7118           #pragma preproc_asm +
7119
7120 2003-10-31  Borut Razem <borut.razem AT siol.net>
7121
7122         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7123           when outputting comment blocks (when executed with -C option) and
7124           _asm (SDCPP specific) blocks
7125
7126 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7127
7128         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7129
7130 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7131
7132         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7133
7134 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7135
7136         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7137         * src/SDCCast.c (decorateType): fixed bug #832664
7138
7139 2003-10-31  Borut Razem <borut.razem AT siol.net>
7140
7141         * support\cpp2\cpplex.c: fixed for SDCPP:
7142           comments(when executed with -C option) and _asm blocks
7143           were included even if they where in skipped #if block.
7144           Applied solution from GCC cpp 3.3.2
7145
7146 2003-10-31  Borut Razem <borut.razem AT siol.net>
7147
7148         * src/SDCC.lex: sdcc now understands both formats:
7149           '# <line_number> <file_name>' and
7150           '#line <line_number> <file_name>'
7151         * support/cpp2/cppmain.c: sdcpp now generates the standard
7152           '# <line_number> <file_name>' instead of former
7153           '#line <line_number> <file_name>'
7154
7155 2003-10-30  Borut Razem <borut.razem AT siol.net>
7156
7157         * support/cpp2/cpphash.h,
7158         * support/cpp2/cpplib.h
7159         * support/cpp2/cpplex.c,
7160         * support/cpp2/cppmain.c,
7161         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7162
7163 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7164
7165         Fixed a number of problems revealed by bug #827883.
7166         * src/SDCCloop.c (loopInvariants): Spill location of the
7167         result operand should be recomputed if extracted from
7168         a loop. Also, don't extract assignments of an iTemp
7169         from a literal.
7170         * src/SDCCast.c (isConformingBody): loop reversal should
7171         not occur if the control variable is involved with a
7172         relational operator.
7173
7174 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7175
7176         * .version: bumped to 2.3.6 to reflect the big improvements
7177         made by Erik and Klaus. Thanks!
7178
7179 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7180
7181         Replaced the livrange code.
7182         * src/SDCClrange.c: added new LR code
7183         * src/SDCCloop.c,
7184         * src/SDCCBBlock.h: removed remainig parts from old LR code
7185         * src/ds390/ralloc.c,
7186         * src/ds390/gen.c: minor fixes to make it work with new code
7187
7188 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7189
7190         * as/hc08/asm.h,
7191         * as/hc08/lkrloc.c,
7192         * src/hc08/gen.c,
7193         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7194         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7195         (tweaked fix for bug #818696)
7196
7197 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7198
7199         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7200
7201 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7202
7203         * src/SDCCmain.c,
7204         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7205         * src/mcs51/gen.c (gencjneshort),
7206         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7207         more efficient (per Scott Bronson's suggestion)
7208
7209 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7210
7211         Extended the semantics of the critical keyword to include
7212         individual statements. See RFE #827755 and #799831
7213         * src/SDCC.y
7214         * src/SDCCicode.c
7215         * src/SDCCopt.c
7216         * src/SDCCast.c
7217         * support/Util/SDCCerr.c
7218         * support/Util/SDCCerr.h
7219         * src/mcs51/gen.c
7220         * src/ds390/gen.c
7221         * src/hc08/gen.c
7222
7223 2003-10-19  Borut Razem <borut.razem AT siol.net>
7224
7225         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7226
7227 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7228
7229         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7230         Fixed bug #818696
7231         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7232         and predecrement operand is displayed
7233
7234 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7235
7236         * src/SDCCval.c (valMinus): fixed bug #826041
7237
7238 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7239
7240         Some hc08 related updates that I missed earlier
7241         * sim/ucsim/stypes.h
7242         * support/regression/ports/hc08/spec.mk
7243
7244 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7245
7246         New target "hc08" for the Motorola 68hc08 family of micros
7247
7248         * configure
7249         * configure.in
7250         * Makefile
7251         * src/hc08/*
7252         * src/SDCCmain.c
7253         * src/port.h
7254         * sim/ucsim/hc08.src/*
7255         * sim/ucsim/configure.in
7256         * src/ucsim/configure
7257         * sim/ucsim/packages_in.mk
7258         * as/hc08/*
7259         * as/Makefile
7260         * device/include/mc68hc908qy.h
7261         * device/lib/hc08/*
7262         * device/lib/Makefile.in
7263         * support/regression/ports/hc08/*
7264         * support/regression/Makefile
7265
7266 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7267
7268         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7269         regression test
7270         * src/ds390/gen.c (genCast): fixed bug #821957
7271
7272 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7273
7274         * device/lib/logf.c: "fixed" overlay bug
7275         * support/regression/ports/host/spec.mk: added m library
7276         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7277         * support/regression/tests/float_trans: added (for Eric)
7278
7279 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7280
7281         * src/mcs51/gen.c (genCpl): fixed bug
7282         http://sf.net/mailarchive/message.php?msg_id=6263915
7283
7284 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7285
7286         * src/SDCCast.c (decorateType): added extended constant folding
7287         * src/SDCCsymt.c (computeType): cleanup
7288         * src/SDCCval.c (valShift): minor optimization
7289         * support/regression/tests/ast_constant_folding.c: added
7290
7291 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7292
7293         * src/SDCCmain.c: removed some unintended changes
7294
7295 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7296
7297         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7298         * src/z80/gen.c: fixed part of bug #817589
7299         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7300
7301 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7302
7303         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7304         * src/SDCCcflow.c
7305         * src/SDCCcse.c
7306         * src/SDCCdflow.c
7307         * src/SDCClabel.c
7308         * src/SDCClrange.c
7309         * src/SDCCmem.c
7310         * src/SDCCopt.c
7311         * src/SDCCpeeph.c
7312         * src/SDCCset.c
7313         * src/avr/ralloc.c
7314         * src/ds390/ralloc.c
7315         * src/izt/ralloc.c
7316         * src/mcs51/ralloc.c
7317         * src/pic/ralloc.c
7318         * src/pic16/ralloc.c
7319         * src/xa51/ralloc.c
7320         * src/z80/ralloc.c
7321         * src/z80/gen.c: removed unused label "release:"
7322
7323 2003-10-06  Borut Razem <borut.razem AT siol.net>
7324
7325         * src/SDCC.lex: removed definition of unused variables
7326           save_optimize and save_options
7327
7328 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7329
7330         * clean.mk: removed '=' in "-maxdepth=1"
7331         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7332         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7333
7334 2003-10-06  Borut Razem <borut.razem AT siol.net>
7335
7336         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7337           my_unput() replaced by unput()
7338
7339 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7340
7341         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7342         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7343         type-punned pointer will break strict-aliasing rules"
7344         Old LR behaviour is again default; Klaus' LR can be choosen by
7345         defining the environment variable LRKLAUS
7346         * src/SDCCBBlock.h
7347         * src/SDCCloop.c
7348         * src/SDCClrange.c
7349         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7350         * clean.mk: fixed removal of files in bin/CVS/
7351         * device/lib/clean.mk: fixed removal of directories small and large
7352         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7353         * src/SDCCicode.c,
7354         * src/SDCCval.c: removed superflous test for pedantic
7355
7356 2003-10-05  Borut Razem <borut.razem AT siol.net>
7357
7358         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7359           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7360           message "unmatched #pragma SAVE and #pragma RESTORE"
7361
7362 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7363
7364         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7365           assembly, critical functions, atomic, nojtbound)
7366
7367 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7368
7369         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7370         * src/SDCCBBlock.h
7371         * src/SDCCloop.c
7372         * src/SDCCloop.h
7373         * src/SDCClrange.c
7374
7375 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7376
7377         * src/z80/gen.h,
7378         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7379         * src/mcs51/gen.h
7380         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7381         * src/ds390/gen.h
7382         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7383         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7384         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7385
7386 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7387
7388         * src/z80/gen.c (genRet): fixed bug #524753
7389         * src/z80/gen.c (genCast): fixed internal error on cast from
7390         pointer to long
7391         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7392         fix for bug #477835 to the z80
7393         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7394         for tracking iCodes in the peephole optimizer for z80
7395
7396 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7397
7398         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7399         the other part of bug #814548
7400         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7401
7402 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7403
7404         * src/SDCCcse.c: fixed part of bug #814548
7405
7406 2003-09-28  Borut Razem <borut.razem AT siol.net>
7407
7408         * src/asm.c: rewrite of printILine() to use temporary file instead
7409           a pipe
7410         * src/xa51/main.c: commented out declaration of int rewinds
7411
7412 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7413
7414         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7415
7416 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7417
7418         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7419         * src/asm.c (printILine): Fixed bug #811015
7420
7421 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7422
7423         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7424         freeing.
7425
7426 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7427
7428         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7429         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7430         to correctly handle general case of AOP_PAIRPTR
7431         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7432
7433 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7434
7435         * src/mcs51/ralloc.c (fillGaps),
7436         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7437         register positioning bug)
7438
7439 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7440
7441         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7442
7443 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7444
7445         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7446         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7447         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7448         (ralloc doesn't intentionally do this now, but perhaps later)
7449         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7450         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7451         register positioning bugs (Fixed bug #762602 and #795325)
7452         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7453         (Fixed bug #808779)
7454         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7455         lines that --i-code-in-asm generates
7456
7457 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7458
7459         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7460         trying to fclose a FILE* that was already closed.
7461
7462 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7463
7464         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7465         of const struct should be treated as if const themselves)
7466
7467 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7468
7469         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7470
7471 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7472
7473         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7474         Unix (/n) and DOS (/r/n) line terminations.
7475
7476 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7477
7478         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7479         bug #613775
7480
7481 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7482
7483         * src/mcs51/gen.c (genFunction, genEndFunction),
7484         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7485         and restore of EA so that stack offsets to parameters are
7486         correct when using both critical and reentrant/stack-auto.
7487         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7488         size (can be triggered in error if sloc is shared between
7489         different sized objects)
7490         * device/include/float.h: fixed macros to explicitly use
7491         unsigned long where needed
7492
7493 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7494
7495         Feature req. 799831: added code to allow nesting of critical functions
7496         * src/mcs51/gen.c (genFunction, genEndFunction)
7497         * src/ds390/gen.c (genFunction, genEndFunction)
7498
7499 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7500
7501         * src/SDCCsymt.c (sclsFromPtr),
7502         * src/SDCCsymt.h,
7503         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7504         support for standard C idiom of memory mapped variables; for
7505         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7506         to xdata int at 0x1234 tempvar = 1.
7507         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7508         provided by Akiya ISHIDA
7509
7510 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7511
7512         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7513         * src/SDCCval.c (constVal): added reduction from int to char
7514         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7515         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7516         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7517         to ignore the sign
7518         * support/regression/tests/shifts.c: fixed
7519
7520 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7521
7522         * src/z80/gen.c (genXor): Fixed bug #805445
7523
7524 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7525
7526         Fixed bug #621531 (const & volatile confusion in the type chain).
7527         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7528         refer to the const or volatile state of the pointer itself.
7529
7530         * src/SDCCast.c
7531         * src/SDCCglue.c
7532         * src/SDCCicode.c
7533         * src/SDCCsymt.c
7534         * src/SDCCval.c
7535         * src/SDCC.y
7536         * src/SDCCsymt.h
7537         * src/pic/gen.c
7538         * src/pic/ralloc.c
7539         * src/pic16/gen.c
7540         * src/pic16/ralloc.c
7541         * support/regression/tests/const.c
7542
7543 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7544
7545         When checking for duplicated modules, use absolute paths
7546         instead of relative paths.  Files changed:
7547
7548         * as/mcs51/lklib.c
7549         * link/z80/lklib.c
7550
7551 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7552
7553         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7554
7555 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7556
7557         * device/include/string.h: added size_t typedef, changed
7558         prototypes to use size_t, eliminated separate reentrant and
7559         non-reentrant declarations, added _memmove declaration
7560         * device/lib/_memcpy.c: changed to use size_t instead of int,
7561         changed /4 to >>2 to avoid division library call
7562         * device/lib/_memcmp.c,
7563         * device/lib/_memset.c,
7564         * device/lib/_strncat.c,
7565         * device/lib/_strncpy.c,
7566         * device/lib/_strncmp.c: changed to use size_t instead of int
7567         * device/lib/_memmove.c: new file (fixed bug #772294)
7568         * device/lib/Makefile.in: added _memmove.c
7569         * device/lib/z80/asm_strings.s: fixed bug #772290
7570         * support/regression/tests/bitfields.c: attempt to fix host assertion
7571         failure on amd64-unknown-linux2.2
7572
7573 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7574
7575         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7576         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7577         * as/z80/asmain.c (main): fixed bug #801766
7578
7579 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7580
7581         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7582         compilers
7583
7584 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7585
7586         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7587         reported in bug #800609
7588
7589 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7590
7591         * Top header beautifications in src/pic16 directory:
7592           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7593           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7594           pcoderegs.h, ralloc.c, ralloc.h
7595         * main.c: added top header and GPL license notice
7596         * pcode.c: fixed the if-conditional warning
7597
7598 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7599
7600         * device/lib/_mullong.c: replaced int by short for gcc
7601
7602 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7603
7604         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7605         and JUMPTABLE iCodes properly now (worked by accident before)
7606         * src/mcs51/gen.c (leftRightUseAcc),
7607         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7608         iCode properly now. Use getSize instead of nRegs since a & b
7609         aren't part of the nRegs tally.
7610
7611 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7612
7613         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7614         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7615           before instructions that use the _STATUS register
7616
7617 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7618
7619         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7620         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7621         fetching of the pointer
7622         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7623         copied from genNearPointerSet()
7624         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7625         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7626         If they pop r0/r1 they must be called in the opposite order than aopOp().
7627         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7628         (resp. --stack-auto), prepared for --xstack
7629
7630 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7631
7632         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7633
7634 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7635
7636         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7637         these ports have their own __sdcc_external_start()
7638
7639 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7640
7641         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7642         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7643         type for bits was changed. It resulted in bit variables becoming
7644         global, which is not permitted in PIC 14 assembly output.
7645
7646 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7647
7648         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7649
7650 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7651
7652         Z80 and MCS51 linkers complaint if a public symbol is defined
7653         in more than one library module:
7654
7655         * as/mcs51/lklib.c
7656         * link/z80/lklib.c
7657         * as/mcs51/Makefile.in
7658
7659 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7660
7661         A few small changes that speed up the peephole optimizer.
7662
7663         * src/SDCCpeeph.c
7664
7665 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7666
7667         Try to make the peephole optimizer smarter by maintaining
7668         an association between the assembly source code and the
7669         iCodes that originated them. Put this information to use
7670         with a new peephole rule condition "notVolatile" so that
7671         the rules can be aggressive yet still safe.
7672
7673         * src/SDCCpeeph.c
7674         * src/SDCCpeeph.h
7675         * src/mcs51/gen.c
7676         * src/mcs51/peeph.def
7677
7678 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7679
7680         Fixed bug #741761
7681
7682         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7683         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7684         if the left or right operand symbols have the accuse flag set.
7685
7686 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7687
7688         Changed the type of the result of the ! (NOT) operator to char;
7689         previously it returned the same type as the source. This allows
7690         us to eliminate all the genFloatNot functions (all of its target
7691         implementations were very buggy) since !float can use the same
7692         code as !long now.
7693
7694         * src/SDCCicode.c (ast2iCode): ! returns char
7695         * src/mcs51/gen.c (genNot, genNotFloat),
7696         * src/ds390/gen.c (genNot, genNotFloat),
7697         * src/z80/gen.c (genNot, genNotFloat),
7698         * src/pic/gen.c (genNot, genNotFloat),
7699         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7700
7701 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7702
7703         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7704         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7705            during interrupts. Ensure WSAVE is located at a shared bank address.
7706         2. Fixed page selection in some places
7707         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7708            the registers name strings.
7709         4. Fixed "signed / unsigned compare" compiler warnings.
7710         5. The PIC port manages its own allocation of the general purpose
7711            registers, but makes no attempt to reuse them. As a result when
7712            compiling it soon runs out of general purpose registers. Some
7713            additional code was added to the files pcode.c and device.c to walk
7714            through the function call tree and rename the registers so that they
7715            get reused.
7716
7717         * src/pic/device.c
7718         * src/pic/gen.c
7719         * src/pic/glue.c
7720         * src/pic/pcode.c
7721         * src/pic/pcode.h
7722         * src/pic/ralloc.c
7723         * src/pic/ralloc.h
7724         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7725         genPlus() & genMinus() when the result is the same as left or right
7726
7727 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7728
7729         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7730
7731 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7732
7733         Made bitfield a distinct type from bit so that bitfields
7734         convert as per ANSI C and bits retain their traditional
7735         boolean style behaviour. Implemented bitfield support in
7736         the z80 port.
7737
7738         * src/SDCCsymt.h,
7739         * src/SDCCsymt.c,
7740         * src/SDCCast.c,
7741         * src/cdbFile.c,
7742         * src/mcs51/gen.c,
7743         * src/ds390/gen.c: bit v bitfield split
7744         * src/z80/gen.c: New support for bitfields
7745         * support/regression/tests/bitfields.c: reenabled z80,
7746         added more tests
7747
7748 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7749
7750         Rules 246.x, 247.x relate to bitfields, the others speed up
7751         access to xdata mapped I/O devices.
7752
7753         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7754
7755 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7756
7757         Cleaned up genPackBits and genUnpackBits and added two helper
7758         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7759         for literal assignments in genPackBits (thanks to Frieder for
7760         reminding me).
7761
7762         * src/mcs51/gen.c
7763         * src/ds390/gen.c
7764
7765 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7766
7767         Fixed bug #748310 (pointer to function type mishandled when the
7768         function name is omitted). Also fixed a SIGSEGV when a function
7769         attribute (reentrant, etc) is used on a non-function or on a
7770         function but misplaced before the parameter list.
7771
7772         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7773         bug #748310
7774         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7775         * support/Util/SDCCerr.h,
7776         * support/Util/SDCCerr.c: Added func attr misuse error msg
7777
7778 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7779
7780         Fixed bug #787649 by anonymous
7781         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7782         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7783
7784 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7785
7786         Fixed numerous bitfield problems.
7787
7788         * src/SDCC.y: More bitfield related error checking
7789         * src/SDCCsymt.h,
7790         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7791         * support/Util/SDCCerr.h,
7792         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7793         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7794         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7795         * support/regression/tests/bitfields.c: tests added
7796
7797 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7798
7799         Made the constant following the "interrupt" keyword optional. If
7800         omitted, the function will not automatically be given an entry
7801         in the interrupt vector table (similar to #pragma NOIV, but
7802         less syntacticly kludgy). The interrupt number is also now
7803         range checked. Also fixed a bug in the high order bit example
7804         in the manual.
7805
7806         * src/SDCC.y
7807         * src/SDCCmem.c
7808         * src/SDCCglue.c
7809         * src/SDCCsymt.h
7810         * support/Util/SDCCerr.c
7811         * support/Util/SDCCerr.h
7812         * doc/sdccman.lyx
7813
7814 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7815
7816         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7817         * src/SDCCicode.c (operandOperation): rewritten some ops
7818         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7819         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7820         other type
7821         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7822         be re-activated by defining REDUCE_LITERALS)
7823         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7824         unsigned, but are signed by default
7825         * src/SDCCval.c (constVal): rearranged
7826         * src/SDCCval.c (valMod): preliminary fix
7827         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7828         * support/regression/literalop.c: added, work in progress
7829
7830 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7831
7832         Generate warnings for useless declarations like "char data;"
7833         that don't do what new users expect.
7834
7835         * src/SDCC.y
7836         * support/Util/SDCCerr.h
7837         * support/Util/SDCCerr.c
7838
7839 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7840
7841         * src/SDCCval.c (valMult): fix overflow detection of negative int
7842
7843 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7844
7845         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7846
7847         Changes to support big endian targets:
7848
7849         * src/ports.h
7850         * src/SDCCglue.c
7851         * src/avr/main.c
7852         * src/ds390/main.c
7853         * src/izt/i186.c
7854         * src/mcs51/main.c
7855         * src/pic/main.c
7856         * src/pic16/main.c
7857         * src/xa51/main.c
7858         * src/z80/main.c
7859
7860 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7861
7862         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7863         * device/lib/time.c: fixed warning "integer overflow in expression"
7864
7865 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7866
7867         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7868         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7869         constants are unsigned; added recognition of "u" flag for unsigned
7870         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7871         * src/SDCCval.c (valDiv, valMod): fixed signdness
7872         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7873         signedness of modulo, left and right shift
7874         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7875         * support/Util/SDCCerr.h: added warning W_INT_OVL
7876         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7877         * src/SDCCast.c (ast_print): improved output of constants
7878
7879 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7880
7881         Fixed some warnings when building with MSVC:
7882
7883         * as\mcs51\asdata.c
7884         * as\z80\asdata.c
7885         * as\mcs51\asm.h
7886         * as\z80\asm.h
7887         * link\z80\aslink.h
7888         * link\z80\lkdata.c
7889         * link\z80\lkeval.c
7890         * link\z80\lkgb.c
7891         * link\z80\lkihx.c
7892         * link\z80\lks19.c
7893         * link\z80\lksym.c
7894         * support\cpp2\cpplib.c
7895         * src\ds390\gen.c
7896         * src\mcs51\gen.c
7897
7898 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7899
7900         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7901
7902 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7903
7904         * support\librarian\clean.mk: Do not remove Makefile.
7905         * support\librarian\Makefile: added.
7906
7907 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7908
7909         Added librarian to MSVC build:
7910         * all.dsp
7911         * sdcc.dsw
7912         * support\librarian\librarian.dsp
7913
7914         'configure' not needed for librarian, removed:
7915         * support\librarian\configure
7916         * support\librarian\configure.in
7917         * support\librarian\config_in.h
7918         * support\librarian\Makefile.in
7919
7920         Hopefully these ones built the librarian and the rest of sdcc properly:
7921         * Makefile
7922         * Makefile.common.in
7923
7924         Messed up 'configure', so revert to previous version:
7925         * configure
7926         * configure.in
7927
7928 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7929
7930         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7931         there, while the mantissa of a double is "only" 53 bits wide.
7932
7933 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7934
7935         Adding sdcclib to the build.  MSVC project coming soon.
7936         Files added/changed:
7937
7938         * support\librarian\clean.mk
7939         * support\librarian\configure
7940         * support\librarian\configure.in
7941         * support\librarian\config_in.h
7942         * support\librarian\Makefile.bcc
7943         * support\librarian\Makefile.in
7944         * support\librarian\sdcclib.c
7945         * Makefile.bcc
7946         * Makefile
7947         * Makefile.common.in
7948         * configure
7949         * configure.in
7950
7951 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7952
7953         Linker now complaints if linked modules have conflicting options, for
7954         example, one compiled using --model-large and another one compiled with
7955         --model-small.  The following files were modified:
7956
7957         * as\mcs51\asdata.c
7958         * as\mcs51\aslink.h
7959         * as\mcs51\asm.h
7960         * as\mcs51\asmain.c
7961         * as\mcs51\asout.c
7962         * as\mcs51\i51pst.c
7963         * as\mcs51\lkdata.c
7964         * as\mcs51\lklibr.c
7965         * as\mcs51\lkmain.c
7966         * as\z80\asdata.c
7967         * as\z80\asm.h
7968         * as\z80\asmain.c
7969         * as\z80\asout.c
7970         * as\z80\z80pst.c
7971         * link\z80\aslink.h
7972         * link\z80\lkdata.c
7973         * link\z80\lklibr.c
7974         * link\z80\lkmain.c
7975         * src\SDCCglue.c
7976
7977 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7978
7979         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7980         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7981
7982 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7983
7984         * src/z80/mappings.i: fix _mul[us][int,long] entries
7985
7986 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7987
7988         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7989
7990 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7991
7992         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7993         * support/regression/tests/bitopcse.c: added
7994         fixed warning:
7995         * src/avr/gen.c:
7996         * src/pic/gen.c:
7997         * src/pic16/gen.c:
7998         * src/z80/gen.c:
7999         * src/xa51/gen.c:
8000
8001 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8002
8003         added support for new library format to z80, gbz80 linkers:
8004         *link/z80/aslink.h
8005         *link/z80/lklex.c
8006         *link/z80/lklib.c
8007         *link/z80/lklist.c
8008
8009 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8010
8011         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8012         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8013
8014 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8015
8016         added DUMMY_READ_VOLATILE:
8017         * src/SDCC.y:
8018         * src/avr/gen.c:
8019         * src/xa51/gen.c:
8020         * src/z80/gen.c:
8021         * src/pic/gen.c:
8022         * src/pic16/gen.c:
8023         * src/mcs51/gen.c:
8024         * src/ds390/gen.c:
8025         * src/SDCCcse.c (algebraicOpts): many improvements
8026         * src/SDCCcse.h: removed algebraicOpts()
8027         * src/SDCCicode.c (picDummyRead): added
8028
8029 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8030
8031         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8032         "Insufficient space in data memory".
8033
8034 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8035
8036         * src/mcs51/gen.c: fixed bug #771358
8037         * src/z80/gen.c: fixed bug #759087
8038
8039 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8040
8041         * src/pic16/glue.c: minor cleanup by Vangelis
8042
8043 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8044
8045         * device/include/regc515c.h: fixed #758477
8046         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8047         * device/lib/_gptrput.c: saved a few bytes
8048         * my tab spacing is 8, yours too?)
8049         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8050         * device/lib/serial.c: process RX bytes earlier than TX bytes
8051         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8052
8053 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8054
8055         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8056
8057 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8058
8059     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8060
8061 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8062
8063         * device/lib/Makefile.in: bad fix, reverted to 1.43
8064
8065 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8066
8067         * device/lib/Makefile.in: added missing z80 object files
8068
8069 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8070
8071         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8072         pic16 progress by Vangelis:
8073         * src/SDCCglobl.h:
8074         * src/SDCCmain.c:
8075         * src/pic/Makefile:
8076         * src/pic:
8077         * pic/Makefile:
8078         * pic16/device.c:
8079         * pic16/device.h:
8080         * pic16/gen.c:
8081         * pic16/gen.h:
8082         * pic16/genarith.c:
8083         * pic16/glue.c:
8084         * pic16/main.c:
8085         * pic16/pcode.c:
8086         * pic16/pcode.h:
8087         * pic16/pcodepeep.c:
8088         * pic16/peeph.def:
8089
8090 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8091
8092     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8093
8094 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8095
8096     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8097     added gbz80 build to MSVC project.
8098     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8099     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8100     from 8051 stuff and setup so it links using a .lnk file.
8101
8102 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8103
8104     * support/librarian/sdcclib.c: sdcc librarian.
8105     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8106     with sdcclib.
8107
8108 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8109
8110     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8111
8112 2003-07-02  Borut Razem <borut.razem AT siol.net>
8113
8114         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8115         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8116         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8117         src/xa51/main.c, src/z80/main.c:
8118         virtualization of glue() function: each port has it's own glue function,
8119         which is accessed by do_glue function pointer in PORT.general structure
8120
8121 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8122
8123         * DS800C400 fun, improved ROM interface and tinibios.
8124
8125 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8126
8127         * More support for DS80C400. Now includes beginning of interface to ROM.
8128
8129 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8130
8131         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8132
8133 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8134
8135         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8136
8137 2003-06-19  Borut Razem <borut.razem AT siol.net>
8138
8139         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8140
8141 2003-06-19  Borut Razem <borut.razem AT siol.net>
8142
8143         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8144         fixed Z80 port - crt0.o: cannot open.
8145
8146 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8147
8148         * support/Util/MySystem.c (merge_command): revert bad fix
8149
8150 2003-06-18  Borut Razem <borut.razem AT siol.net>
8151
8152         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8153
8154 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8155
8156         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8157         option --use-stdout sends errors to stdout instead of stderr.
8158
8159 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8160
8161         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8162
8163 2003-06-15  Borut Razem <borut.razem AT siol.net>
8164
8165         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8166         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8167         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8168         fixed width array of pointers replaced with sets;
8169         multiple include and lib paths ared transferred to preprocessor and linker
8170         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8171         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8172         fixed width array of pointers
8173         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8174         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8175         fixupPath(), getPathDifference()
8176         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8177         fixed width array of pointers
8178
8179 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8180
8181         * src/pic16/ralloc.c: fix warnings
8182         * src/pic16/pcode.c: fix warning
8183
8184 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8185
8186          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8187         know all the details, but essentially this set of changes enable
8188         the pic16 port to generate movff instructions and generate assembler
8189         directives,
8190         * src/SDCCmain.c:
8191         * src/pic16/gen.c:
8192         * src/pic16/glue.c:
8193         * src/pic16/pcode.c:
8194         * src/pic16/device.c:
8195         * src/pic16/main.c:
8196         * src/pic16/pcode.h:
8197         * src/pic16/pcoderegs.c:
8198         * src/pic16/ralloc.c:
8199         * src/pic16/ralloc.h:
8200
8201 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8202
8203         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8204         added option --vc, so sdcc errors and warnings are compatible with
8205         Microsoft Visual Studio.
8206
8207 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8208
8209         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8210           device/lib/libfloat.lib: added atof function.
8211
8212 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8213
8214         * doc/sdccman.lyx: updated to Lyx 1.3
8215         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8216         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8217         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8218
8219 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8220
8221         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8222
8223 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8224
8225         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8226           additions to the "related tools/documentation" section
8227
8228 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8229
8230         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8231
8232 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8233
8234         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8235         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8236
8237 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8238
8239         * doc/sdccman.lyx: fix double dash and other minor things
8240         * doc/Makefile: fix double dash
8241
8242 2003-05-28  Karl Bongers(patches from Martin Helmling)
8243         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8244           condition and ignore commands.
8245
8246 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8247
8248         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8249           is in parts still quite out of date, I did changes as far as I felt makes sense
8250           for a non-native english speaker.
8251           Please feel free to add to the manual or to correct my changes.
8252         * doc/Makefile: undid touching the date of intermediate tex files.
8253
8254 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8255
8256         * doc/sdccman.lyx: Manual has an index now
8257
8258 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8259
8260         Finalize muluint/mulsint and mululong/mulslong merging:
8261         * device/lib/_mulint.c
8262         * device/lib/_mullong.c
8263         * device/lib/gbz80/mul.s
8264         * device/lib/gbz80/stubs.s
8265         * device/lib/z80/mul.s
8266         * device/lib/z80/stubs.s
8267         * src/SDCCsymt.c (initCSupport)
8268
8269 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8270
8271         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8272         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8273           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8274           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8275           instead of /Zm500.
8276
8277 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8278
8279         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8280           the regression tests I'm not brave enough to enable 245.b, 245.c
8281         * doc/sdccman.lyx: added latex preamble for hyperref package.
8282           Using pdflatex this will give you a hyperlinked pdf file with
8283           bookmarks. (prepend '%' before /usepackage if this breaks something)
8284
8285 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8286
8287          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8288
8289 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8290
8291         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8292
8293 2003-05-21    <johan AT balder>
8294
8295         * src/SDCCglue.c (printIval): fixed bug #739934
8296
8297 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8298
8299         Applied patch from bug 737905 (renamed yylineo to mylineno):
8300         * src/altlex.c
8301         * src/SDCCast.c
8302         * src/SDCglobl.h
8303         * src/SDCC.lex
8304         * src/SDCCsymt.c
8305         * src/SDCCval.c
8306         * src/pic16/pcode.c: Cleaned warnings
8307         * src/pic16/pcodeflow.c: Cleaned warnings
8308         * src/pic16/pcoderegs.c: Cleaned warnings
8309
8310 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8311
8312         * src/pic16/pcode.c: Cleaned warnings
8313         * src/pic16/pcodepeep.c: Cleaned warnings
8314         * src/pic16/ralloc.c: Cleaned warnings
8315
8316 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8317
8318         * doc/sdccman.lyx: fixed bug 739745
8319         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8320
8321 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8322
8323         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8324         it can be defined with CFLAGS when running configure
8325         * src/SDCCmain.c: fixed compiling + linking with object files
8326
8327 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8328
8329         * configure.in: configure for pic16 port,
8330             added --disable-pic16-port
8331         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8332         * src/SDCCmain.c: linkOptions is changed to set *,
8333             added if/endif conditional macros to remove options help
8334             messages from optionsTable when a port is not configured, added
8335             support for the PIc16 port in the ports table, when executing
8336             the compiler with no port specified on command line, a default
8337             port is selected with the new macro DEFAULT_PORT which is
8338             defined in port.h, in setDefaultOptions() linkOptions is removed
8339             from initialization assignment, since now it is a set,
8340             parseCmdLine uses setParseWithComma for linkOptions, in
8341             linkEdit() linkOptions are accessed with new function indexSet()
8342             which returns the i'th item of a set variable. See SDCCset.c, in
8343             linkEdit() when calling buildCmdLine(), added linkOptions as
8344             last argument. Now users can pass arguments to gplink via the
8345             -Wl option, main() uses pic16glue() to glue up pic16 programs
8346         * src/SDCCpeeph.c: various changes to support pic16
8347         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8348             return the i'th item of the set
8349         * src/SDCCset.h: added function prototype for indexSet()
8350         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8351         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8352         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8353             added macro DEFAULT_PORT
8354         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8355         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8356             generated
8357         * src/pic16/glue.c: commented out some error producing lines
8358         * src/pic16/main.c: __config directives are commented out to stop
8359             gpasm complaining and test the linkage with gplink, _linkCmd and
8360             _asmCmd changed to be more gplink and gpasm friendly
8361         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8362             produced an error when parsed, peep rule 12 is added to utilize
8363             movff, but it is commented out since the pCode does not support
8364             yet a command with 2 address arguments
8365
8366 2003-05-18    <johan AT balder>
8367
8368         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8369         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8370 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8371
8372         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8373   Added feature to script commands from file.
8374
8375 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8376
8377         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8378         * src/SDCCutil.c: include ctype.h for win32
8379
8380 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8381
8382         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8383
8384 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8385
8386         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8387   Fixed so you can set breakpoints prior to run, run does not stop
8388   on entry now.  Add tbreak.  Other enhancements and fixes for use
8389   with ddd.
8390
8391 2003-05-12  Borut Razem <borut.razem AT siol.net>
8392
8393         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8394
8395 2003-05-11  Borut Razem <borut.razem AT siol.net>
8396
8397         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8398         the path of bin directory, so that PATH is the only env. variable, which has to be set
8399         in case of standard installation.
8400         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8401         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8402         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8403
8404 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8405
8406         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8407         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8408         temp files are in the port dir; clean the gen/test directory when
8409         generating new test.c
8410         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8411         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8412         * support/regression/tests/zeropad.c: added
8413
8414 2003-05-09    <johan AT balder>
8415
8416         * src/SDCCglue.c: fixed bug #597940
8417
8418 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8419
8420         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8421   cache sfr, optimize next,step, fix off by one sourceline,
8422   support ddd list function.
8423         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8424
8425 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8426
8427         * support/regression/HTMLgen.py: added compare_s2f()
8428         * support/regression/Makefile: redo 1.27
8429         * support/regression/generate-cases.py: redo 1.5
8430
8431 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8432
8433         * support/regression/tests/float.c: workaround 33 bit hex constant
8434         * support/regression/tests/simplefloat.c: fix division for host
8435
8436 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8437
8438         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8439         that tame's the PIC's over-aggressive optimizer.
8440
8441 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8442
8443          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8444          support for MSVC.
8445
8446 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8447
8448         Initial support for DS80C400. "Hello world" runs on TINIm400
8449         (with polled I/O).
8450
8451 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8452
8453          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8454          * Some notes on ddd usage added in debugger/README
8455          Martin Helmling adding more features and fixes for ddd GUI debugger.
8456          Code added for nexti, stepi, up, down, and other adjustments.
8457
8458 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8459
8460         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8461         * src/pic/peeph.def Added two rules to optimize carry manipulation
8462         * src/pic/* removed debug printfs
8463
8464 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8465
8466         * debugger/mcs51/cmd.c: added header newalloc.h
8467
8468 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8469
8470         * as/Makefile: new EXEEXT
8471         * as/z80/Makefile: remove trailing slash of BUILDIR
8472         * as/z80/clean.mk: new EXEEXT
8473         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8474         * support/cpp2/Makefile.in: new EXEEXT
8475         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8476
8477 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8478
8479         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8480         EXEEXT was introduced to fix all related problems with targets
8481         "clean", "install" and "uninstall"; a couple of further flaws
8482         especially with "clean" have been fixed too
8483         * as/mcs51/Makefile.in
8484         * as/mcs51/clean.mk
8485         * as/z80/Makefile
8486         * Makefile
8487         * clean.mk
8488         * debugger/mcs51/Makefile.in
8489         * debugger/mcs51/clean.mk
8490         * link/z80/Makefile
8491         * link/z80/Makefile.in
8492         * link/z80/clean.mk
8493         * link/Makefile
8494         * packihx/Makefile.in
8495         * packihx/clean.mk
8496         * sim/ucsim/Makefile
8497         * sim/ucsim/clean.mk
8498         * sim/ucsim/avr.src/Makefile.in
8499         * sim/ucsim/avr.src/clean.mk
8500         * sim/ucsim/s51.src/Makefile.in
8501         * sim/ucsim/s51.src/clean.mk
8502         * sim/ucsim/xa.src/Makefile.in
8503         * sim/ucsim/xa.src/clean.mk
8504         * sim/ucsim/z80.src/Makefile.in
8505         * sim/ucsim/z80.src/clean.mk
8506         * sim/ucsim/main_in.mk
8507         * sim/ucsim/packages_in.mk
8508         * sim/ucsim/gui.src/Makefile.in
8509         * sim/ucsim/gui.src/serio.src/Makefile.in
8510         * sim/ucsim/gui.src/serio.src/clean.mk
8511         * src/Makefile.in
8512         * src/clean.mk
8513         * support/cpp2/Makefile.in
8514         * support/cpp2/clean.mk
8515         * support/makebin/Makefile
8516         * support/makebin/clean.mk
8517         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8518         * doc/sdccman.lyx: --program-suffix no longer needed
8519
8520 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8521
8522          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8523          Martin Helmling added support for ddd GUI debugger.
8524          Code added to display assembly, set variables, and other commands
8525          to interface to ddd.
8526
8527 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8528
8529         * as/Makefile: fix target clean
8530         * as/clean.mk: fix target clean
8531         * as/z80/clean.mk: fix target clean
8532
8533 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8534
8535         * Makefile.common.in: added  AT EXEEXT AT
8536         * configure.in: removed all mingw32 stuff
8537         * configure: rebuilt from configure.in
8538         * doc/sdccman.lyx: updated section "installation"
8539         * support/scripts/sdcc_mingw32: adapted to configure
8540         * support/scripts/sdcc_cygwin_mingw32: added
8541
8542 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8543
8544         * src/pic Added object file support for the PIC port
8545         * src/pic Applied patch from Craig Franklin (this started the object file support)
8546         * src/regression Updated the PIC regression tests for object files
8547
8548 2003-04-20  Borut Razem <borut.razem AT siol.net>
8549
8550         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8551           lklex.c: In function `getfid':
8552           lklex.c:203: warning: array subscript has type `char'
8553         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8554           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8555         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8556           stack handling macros
8557
8558 2003-04-19  Borut Razem <borut.razem AT siol.net>
8559
8560         * "handling space characters in file path" task:
8561         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8562         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8563         * support/Util/MySystem.h: make it self-sufficient
8564         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8565           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8566           handling space characters in file path
8567         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8568           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8569         * support/Util/MySystem.c: handling space characters in executable's path
8570
8571 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8572
8573         * as/z80/Makefile: fix permanent rebuild of z80
8574         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8575         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8576
8577 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8578
8579         * src/SDCCopt.c: add special case optimization to replace modulo by
8580           a power of two with a bitwise AND.
8581
8582 2003-04-18    <johan AT balder>
8583
8584         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8585
8586 2003-04-17    <johan AT balder>
8587
8588         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8589         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8590
8591 2003-04-13  Borut Razem <borut.razem AT siol.net>
8592
8593         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8594         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8595           fixed mingw problem in adl_NORMALIZE_PATH
8596
8597 2003-04-12  Borut Razem <borut.razem AT siol.net>
8598
8599         * fixed "#pragma SAVE/RESTORE can not be nested":
8600         * src/SDCC.lex: reworked pragma handling functions
8601         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8602         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8603
8604 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8605
8606         * src/SDCCutil.c (pathEquivalent): defined but not used
8607         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8608         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8609         * configure: rebuilt from configure.in
8610         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8611         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8612         * device/include/Makefile.in: replace sdcc_datadir
8613         * device/lib/Makefile.in: replace sdcc_datadir
8614         * Makefile.common.in: add LDFLAGS from configure
8615         * packihx/Makefile.in: use LDFLAGS
8616         * src/Makefile.in: use LDFLAGS
8617         * support/cpp2/Makefile.in: add LDFLAGS from configure
8618         * support/makebin/Makefile: use LDFLAGS
8619         * .version: bumped version number to 2.3.5
8620
8621 2003-04-12  Borut Razem <borut.razem AT siol.net>
8622
8623         * completed "different paths" task:
8624         * src/SDCCmacro.c: fixed bug in handling quotes
8625         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8626         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8627
8628 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8629
8630         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8631
8632 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8633
8634         * ds390/gen.c ds390/peeph.def: fix bug 706781
8635
8636 2003-04-11  Borut Razem <borut.razem AT siol.net>
8637
8638         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8639
8640 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8641
8642         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8643         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8644          set - this bit used to not be set...).
8645         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8646           bad code in PIC Port
8647         * src/regression/and2.c added to test bug 609268
8648         * src/regression/Makefile added and2.c to regression test
8649
8650
8651 2003-04-08    <johan AT CP255758-A>
8652
8653         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8654         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8655         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8656
8657 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8658
8659         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8660         fix bug #487815
8661         * support/cpp2/Makefile.in: fix bug #487815
8662         * configure: rebuilt from configure.in
8663         * Makefile.common.in: docdir changed, new path suffixes
8664         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8665         * sdcc_vc_in.h: reflect changes from sdccconf.h
8666         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8667         * src/SDCCutil.h: remove BINDIR hack
8668         * doc/sdccman.lyx: update new path hierarchy
8669
8670 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8671
8672         * src/SDCCpeeph.c: added okToRemoveSLOC test
8673
8674 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8675
8676         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8677
8678 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8679
8680         * src/SDCCpeeph.c: added labelIsReturnOnly test
8681         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8682
8683 2003-04-05    <johan AT balder>
8684
8685         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8686         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8687         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8688         * src/SDCCast.c: fixed a warning
8689         * src/SDCCast.h: fixed a warning
8690         * src/SDCCicode.c (operandFromAst): fixed a warning
8691
8692 2003-04-04    <johan AT balder>
8693
8694         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8695         * src/SDCCast.c (decorateType): fixed bug #715076
8696         * src/SDCC.y: fixed bug #702907
8697
8698 2003-04-03    <johan AT balder>
8699
8700         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8701         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8702         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8703         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8704         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8705
8706 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8707
8708         * _decdptr.c: fix return values
8709         * _gptrget.c: fix return values
8710         * _gptrgetc.c: fix return values
8711         * _gptrput.c: fix return values
8712         * _mulint.c: fix return values
8713         * as/z80/Makefile: fix 'make -j' problem
8714
8715 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8716
8717         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8718         * configure.in: big cleanup, updated to autoconf 2.5x
8719         * configure: rebuilt from configure.in
8720         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8721         * sdcc_vc_in.h: reflect changes from sdccconf.h
8722         * doc/Makefile: fixed a flaw in "make install"
8723
8724 2003-04-02    <johan AT balder>
8725
8726         * src/ds390/gen.c (genCmp): no comments
8727         * src/mcs51/gen.c (genCmp): no comments
8728         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8729         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8730
8731 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8732
8733         * support/regression/generate-cases.py: place generated file in given sub directory
8734         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8735         * support/regression/Makefile: improvements for 'make -j';
8736         side effect: it's simpler and faster now
8737
8738 2003-03-31  Borut Razem <borut.razem AT siol.net>
8739
8740         * src/z80/main.c: link-{port} and as-{port} defined without path
8741         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8742
8743 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8744
8745         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8746
8747 2003-03-30  Borut Razem <borut.razem AT siol.net>
8748
8749         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8750           changed type of list parameter to set
8751         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8752         * src/port.h: changed type of do_assemble() parameter to set
8753         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8754           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8755           definition of "cppoutfilename" macro with NULL value in preProcess()
8756         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8757         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8758         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8759           replaced with set *binPathSet
8760         * shash_add() deallocates the item, if allready exsists, before adding the new one
8761         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8762
8763 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8764
8765         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8766           a nested for loop bug in the PIC port
8767         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8768           for loops
8769
8770 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8771
8772         * support/Util/dbuf.h: remove C++ stuff to make it portable
8773
8774 2003-03-28  Borut Razem <borut.razem AT siol.net>
8775
8776         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8777           literal strings in stringLiteral()
8778         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8779         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8780           to the project
8781
8782 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8783
8784         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8785
8786 2003-03-26    <johan AT balder>
8787
8788         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8789         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8790         * src/SDCCast.c (decorateType): fixed " -v < 3"
8791
8792 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8793
8794         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8795         Added Lenny Story's debug infrastructure changes:
8796         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8797         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8798         * src/cdbFile.c: added
8799         * src/SDCCdebug.c: added
8800         * src/SDCCdebug.h: added
8801         * src/SDCCast.c (createFunction)
8802         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8803         * src/SDCCmain.c (parseCmdLine, main)
8804         * src/SDCCmem.c (redoStackOffsets)
8805         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8806         * src/SDCCsymt.h
8807         * src/common.h
8808         * src/avr/gen.c (genAVRCode)
8809         * src/ds390/gen.c (gen390Code)
8810         * src/mcs51/gen.c (gen51Code)
8811         * src/pic/gen.c (genpic14Code)
8812         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8813         * src/xa51/gen.c (genXA51Code)
8814         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8815
8816 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8817
8818         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8819         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8820
8821 2003-03-22    <johan AT balder>
8822
8823         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8824
8825 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8826
8827         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8828         * doc/cdbfileformat.lyx: added, written by Lenny Story
8829         * doc/Makefile: added cdbfileformat.lyx
8830         * doc/clean.mk: added cdbfileformat.lyx
8831
8832 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8833
8834         * src/mcs51/peeph.def: fix bug #705773
8835
8836 2003-03-20    <johan AT balder>
8837
8838         An sfr/sbit can have an "at #" AND an initializer
8839         * src/SDCCsymt.c (checkSClass):
8840         * src/SDCCmem.c (allocGlobal):
8841         * src/SDCCmem.c (allocLocal):
8842         * src/SDCCast.c (createBlock):
8843
8844 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8845
8846         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8847
8848 2003-03-16    <johan AT balder>
8849
8850         Undid the hackup of const and volatile, the problem is much bigger
8851         * src/SDCC.y:1.65
8852         * src/SDCCast.c:1.171
8853         * src/SDCCglue.c:1.138
8854         * src/SDCCicode.c:1.146
8855         * src/SDCCsymt.c:1.150
8856         * src/SDCCval.c:1.65
8857
8858 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8859
8860         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8861         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8862
8863 2003-03-13    <johan AT balder>
8864
8865         Hackup const and volatile modifiers in type chains a bit:
8866         * src/SDCC.y:1.63
8867         * src/SDCCast.c:1.169
8868         * src/SDCCglue.c:1.136
8869         * src/SDCCicode.c:1.143
8870         * src/SDCCsymt.c1.146
8871         * src/SDCCsymt.h1.59
8872         * src/SDCCval.c:1.63
8873
8874 2003-03-12    <johan AT balder>
8875
8876         * src/SDCCBBlock.h: more LRH debugging junk
8877         * src/SDCCcflow.h: more LRH debugging junk
8878         * src/SDCCloop.c: more LRH debugging junk
8879         * src/SDCC.y (struct_declaration): fixed bug #697590
8880         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8881         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8882         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8883
8884 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8885         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8886         test function names must now match exactly).
8887         * src/SDCCcse.c: added special case in findCheaperOp to allow
8888         extending a short integer. Makes less awful code for bug 700121 test case.
8889
8890 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8891
8892         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8893         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8894
8895 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8896
8897         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8898         actually called (operandsNotEqual() was called for all
8899         operandsNotEqualX tests).
8900
8901 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8902
8903         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8904         with shorter literals. Fixes bug 700121.
8905
8906 2003-03-11    <johan AT balder>
8907
8908         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8909
8910 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8911
8912         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8913         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8914
8915 2003-03-10  Borut Razem <borut.razem AT siol.net>
8916
8917         * src/SDCCmain.c: pipe preprocessor's output
8918         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8919         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8920         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8921         which closes all pipes in pipeSet set
8922         * src/SDCCset.c: free deleted item in function deleteSetItem()
8923         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8924         moved from z80 to src subproject
8925         * .version: increased version number to 2.3.4
8926
8927 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8928
8929         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8930         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8931         * support/regression/ports/xa51/spec.mk: fix typo
8932
8933 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8934
8935         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8936
8937 2003-03-09  Borut Razem <borut.razem AT siol.net>
8938
8939         * src/SDCCmain.c: pipe preprocessor's output
8940         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8941         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8942         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8943         which closes all pipes in pipeSet set
8944         * src/SDCCset.c: free deleted item in function deleteSetItem()
8945         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8946         moved from z80 to src subproject
8947
8948 2003-03-09  Borut Razem <borut.razem AT siol.net>
8949
8950         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8951         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8952         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8953         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8954         * src/SDCCglobl.h: unification of WIN32 native definitions
8955
8956 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8957
8958         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8959
8960 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8961
8962         * src/configure.in:   check for endianess (even while cross-compiling)
8963         * src/configure:      check for endianess (even while cross-compiling)
8964         * src/configure_in.h: check for endianess (even while cross-compiling)
8965         * src/avr/gen.c:        remove old endianess stuff
8966         * src/mcs51/gen.c:      remove old endianess stuff
8967         * src/ds390/gen.c:      remove old endianess stuff
8968         * src/pic/gen.c:        remove old endianess stuff
8969         * src/pic/genarith.c:   remove old endianess stuff
8970         * src/pic/glue.c:       fix endianess check
8971         * src/pic16/gen.c:      remove old endianess stuff
8972         * src/pic16/genarith.c: remove old endianess stuff
8973         * src/pic16/glue.c:     fix endianess check
8974         * src/xa51/gen.c:       remove old endianess stuff
8975         * src/z80/gen.c:        fix endianess check
8976         * src/SDCCglue.c:       fix endianess check
8977         * src/ds390/peeph.def: fix bug 700036
8978
8979 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8980
8981         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8982         * src/configure: find appropriate data-types on host for SDCC's int and long
8983         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8984         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8985         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8986
8987 2003-03-07    <johan AT balder>
8988
8989         Just a big NOOP:
8990                 some minor cleanups before the big shot
8991                 OP_DEFS and OP_USES now use Kevin's protection
8992                 new option --nolabelopt
8993
8994         * src/SDCCBBlock.c:
8995         * src/SDCCast.c,:
8996         * src/SDCCcflow.c:
8997         * src/SDCCcse.c:
8998         * src/SDCCicode.c:
8999         * src/SDCCicode.h:
9000         * src/SDCClabel.c:
9001         * src/SDCCloop.c:
9002         * src/SDCCmain.c:
9003         * src/ds390/ralloc.c:
9004         * src/mcs51/ralloc.c:
9005         * src/pic/ralloc.c:
9006         * src/xa51/ralloc.c:
9007         * src/z80/ralloc.c:
9008
9009 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9010
9011         * src/pic/pcode.c (get_op): fix 64 bit warnings
9012         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9013         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9014         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9015         * support/regression/tests/malloc.c: fix 64 bit warnings
9016
9017 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9018
9019         * src/mcs51/gen.c (genMinus): fixed bug 696436
9020
9021 2003-03-02  Borut Razem <borut.razem AT siol.net>
9022
9023         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9024
9025 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9026
9027         * configure.in: test for mkstemp
9028         * sdccconf_in.h: add HAVE_MKSTEMP
9029
9030 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9031
9032         * device/include/ctype.h: removed warning while using --stack-auto
9033         * device/include/malloc.h: removed warning while using --stack-auto
9034         * device/include/string.h: removed warning while using --stack-auto
9035
9036 2003-02-23  Borut Razem <borut.razem AT siol.net>
9037
9038         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9039         because NDEBUG is defined (see man assert)
9040         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9041
9042 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9043
9044         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9045         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9046
9047 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9048
9049         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9050         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9051
9052 2003-02-18    <johan AT balder>
9053
9054         * as/mcs51/asmain.c (asmbl): module can start with a digit
9055         * as/z80/asmain.c (asmbl): module can start with a digit
9056
9057 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9058
9059         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9060         * src/asm.c: fix pipe() for Mingw32
9061
9062 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9063
9064         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9065         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9066         make -V work again; --c1mode reads now from stdin
9067         * doc/sdccman.lyx: added --c1mode
9068         * support/Util/SDCCerr.c: new messages for c1 mode
9069         * support/Util/SDCCerr.h: new messages for c1 mode
9070         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9071
9072 2003-02-15    <johan AT balder>
9073
9074         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9075
9076 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9077
9078         * doc/sdccman.lyx: Environment variables, -o and other minor things
9079
9080 2003-02-14    <johan AT balder>
9081
9082         * src/xa51/main.c: before anyone really tries to use it :)
9083
9084         * Install doc's in share/sdcc/doc
9085         * removed some obsolete files
9086         * Do a proper make distclean and uninstall
9087         M Makefile.common.in
9088         R sdccbuild.sh
9089         M as/Makefile
9090         M device/include/Makefile.in
9091         M device/lib/Makefile.in
9092         M doc/sdccman.lyx
9093         M link/Makefile
9094         M sim/ucsim/doc/Makefile.in
9095         M src/clean.mk
9096         R src/avr/peeph.rul
9097         R src/xa51/peeph.rul
9098         M support/cpp2/Makefile.in
9099         M support/makebin/Makefile
9100
9101
9102 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9103
9104         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9105
9106 2003-02-10  Borut Razem <borut.razem AT siol.net>
9107
9108         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9109         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9110         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9111         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9112         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9113         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9114         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9115         src/z80/Makefile.bcc: Borland Makefile cleanup
9116         * as/z80/Makefile.bcc: Added Borland Makefile
9117         * support/cpp2/borland.h: Removed
9118
9119 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9120
9121         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9122         * src/SDCC.lex: new pragma NOIV
9123         * src/SDCCglobl.h: new pragma NOIV
9124         * src/SDCCmem.c: new pragma NOIV
9125
9126 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9127
9128         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9129
9130 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9131
9132         * src/SDCCmain.c: signal handling is switched off by --debug
9133         * doc/Makefile: small fix for install; use clean.mk again
9134         * doc/clean.mk: clean *.pdf and *.html too
9135
9136 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9137
9138         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9139         * device/lib/printfl.c: fix a ds390 bug by making it portable
9140         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9141         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9142         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9143         * debugger/mcs51/cmd.c: converted multi-line string literals
9144         * sim/ucsim/globals.cc: converted multi-line string literals
9145         * src/SDCCmain.c: introduced signal handler to remove temp files
9146         * doc/Makefile: small tweaks, implement clean
9147         * doc: removed generated files
9148
9149 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9150
9151         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9152         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9153         Address Record is not correctly generated for DS390."
9154
9155 2003-02-02  Borut Razem <borut.razem AT siol.net>
9156
9157         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9158         * as/mcs51/asm.h: fixed compilation with Borland C
9159         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9160         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9161         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9162         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9163         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9164         src/z80/Makefile.bcc: delete $(LIB) only if exist
9165         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9166
9167 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9168
9169         * device/include/malloc.h: introduced NULL
9170         * device/include/string.h: introduced NULL
9171         * device/include/stdlib.h: introduced NULL
9172         * device/lib/_memcpy.c: removed NULL
9173         * device/lib/_strcat.c: removed NULL
9174         * device/lib/_strchr.c: removed NULL
9175         * device/lib/_strcmp.c: removed NULL
9176         * device/lib/_strcpy.c: removed NULL
9177         * device/lib/_strcspn.c: removed NULL
9178         * device/lib/_strlen.c: removed NULL
9179         * device/lib/_strncat.c: removed NULL
9180         * device/lib/_strncmp.c: removed NULL
9181         * device/lib/_strncpy.c: removed NULL
9182         * device/lib/_strpbrk.c: removed NULL
9183         * device/lib/_strrchr.c: removed NULL
9184         * device/lib/_strspn.c: removed NULL
9185         * device/lib/_strstr.c: removed NULL
9186         * device/lib/_strtok.c: removed NULL
9187         * device/lib/malloc.c: removed NULL, include own header
9188
9189 2003-02-02    <johan AT balder>
9190
9191         * 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
9192         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9193         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9194         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9195         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9196         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9197
9198 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9199
9200         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9201         area 'DATA'"
9202
9203 2003-02-01    <johan AT balder>
9204
9205         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9206
9207 2003-01-31    <johan AT CP255758-A>
9208
9209         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9210
9211 2003-01-30    <johan AT balder>
9212
9213         * src/SDCCBBlock.c: automatic bug detection
9214         * src/SDCCicode.c: automatic bug detection
9215
9216 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9217
9218         * src/SDCCglobl.h:   now --xram-size 0 works
9219         * src/SDCCmain.c:    now --xram-size 0 works
9220
9221 2003-01-29    <johan AT balder>
9222
9223         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9224
9225 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9226
9227         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9228         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9229         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9230         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9231         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9232         * src/SDCCmain.c:    Added options --xram-size and --code-size
9233
9234 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9235
9236         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9237         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9238
9239 2003-01-27    <johan AT balder>
9240
9241         * src/SDCC.y: fixed bug #613764
9242
9243 2003-01-26    <johan AT balder>
9244
9245         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9246         * src/SDCCsymt.h: fixed bug #673374
9247         * src/SDCCglue.c: fixed bug #661910
9248         * src/SDCCast.c: fixed bug #458099 and 673374
9249
9250 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9251
9252         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9253         * as/mcs51/strcmpi.h: added
9254         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9255         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9256         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9257         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9258         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9259         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9260         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9261         * as/mcs51/Makefile.aslink: new module strcmpi
9262         * as/mcs51/Makefile.asx8051: new module strcmpi
9263         * as/mcs51/Makefil.bcc: new module strcmpi
9264         * as/mcs51/Makefile.in: new module strcmpi
9265         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9266
9267 2003-01-26    <johan AT balder>
9268
9269         * src/SDCCglue.c: reverted back to 1.124
9270         * src/SDCCast.c: reverted back to 1.156
9271         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9272
9273 2003-01-25    <johan AT balder>
9274
9275         * src/SDCCglue.c: A better fix for bug #661910
9276         * src/SDCCast.c: A better fix for bug #661910
9277         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9278
9279 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9280
9281         * src/Makefile.in: remove spawn.o
9282         * src/SDCCmain.c: remove spawn.h
9283         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9284         * src/spawn.c: removed
9285         * src/spawn.h: removed
9286         * support/regression/ports/ds390/spec.mk: link with -r
9287
9288 2003-01-24    <johan AT CP255758-A>
9289
9290         * src/ds390/gen.c (aopOp): fixed bug #667458
9291         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9292         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9293         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9294
9295 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9296
9297         * src/mcs51/peeph.def: better assembler identation by Frieder
9298         * src/mcs51/gen.c: better assembler identation by Frieder
9299
9300 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9301
9302         * as/z80/string.h: removed for gcc 3.2
9303         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9304         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9305
9306 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9307
9308         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9309         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9310         * support/regression/Makefile: separate temp files for ports
9311         * support/regression/generate-cases.py: separate temp files for ports
9312         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9313         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9314
9315 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9316
9317         * moved tinitalk to device/examples/ds390
9318
9319 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9320
9321         * as/mcs51/lkmem.c: rflag is for DS390
9322         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9323         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9324                          (linkEdit): move mem- and map-files the same way as ihx-files
9325         * src/z80/main.c (_setDefaultOptions): removed --generic
9326         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9327         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9328         * src/pic/glue.c (picglue): --c1mode works again
9329         * src/pic16/glue.c (pic16glue): --c1mode works again
9330         * src/asm.c (printCLine): fix #660034
9331
9332 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9333
9334         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9335         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9336         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9337         * as/mcs51/lkmem (summary): better fix for sp problem
9338         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9339         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9340         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9341                                               remove --stack-after-data
9342
9343 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9344
9345         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9346         * src/SDCCutil.c (join): ugly bug: missing '\0'
9347         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9348
9349 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9350
9351         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9352         * src/port.h: typo
9353         * src/pic/main.c (_asmCmd): gpasm supports -o
9354         * src/z80/main.c: more general macros
9355         * device/lib/Makefile.in: remove intermediate files
9356
9357 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9358
9359         * .version: Bumped version number to 2.3.3
9360         * src/SDCCBBlock.c: new option -o
9361         * src/SDCCglobl.h: new option -o
9362         * src/SDCCglue.c: new option -o
9363         * src/SDCCmain.c: new option -o
9364         * src/asm.c: new option -o
9365         * src/ds390/main.c: new option -o
9366         * src/pic/glue.c: new option -o
9367         * src/pic/pcode.c: new option -o
9368         * src/pic/ralloc.c: new option -o
9369         * src/pic16/glue.c: new option -o
9370         * src/pic16/pcode.c: new option -o
9371         * src/pic16/ralloc.c: new option -o
9372         * src/z80/main.c: new option -o
9373         * device/lib/Makefile.in: use -o
9374         * support/regression/ports/ds390/spec.mk: use -o
9375         * support/regression/ports/gbz80/spec.mk: use -o
9376         * support/regression/ports/mcs51/spec.mk: use -o
9377         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9378         * support/regression/ports/z80/spec.mk: use -o
9379         * support/regression/ports/ucz80/spec.mk: use -o
9380         * support/regression/ports/xa51/spec.mk: use -o
9381         * support/regression/fwk/lib/timeout.c: fix usage string
9382
9383 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9384         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9385
9386 2003-01-07    <johan AT balder>
9387
9388         * src/SDCCast.c (decorateType): fixed bug #600035
9389
9390 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9391         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9392         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9393         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9394         * src/pic/pcode.c: outcommented unused variable to remove warnings
9395         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9396
9397 2003-01-06    <karl AT turbobit.com>
9398         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9399    regression tests.
9400
9401 2003-01-06    <johan AT balder>
9402
9403         * src/SDCCicode.c: fixed array add
9404
9405 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9406         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9407         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9408
9409 2003-01-04    <johan AT balder>
9410
9411         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9412
9413 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9414         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9415
9416 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9417         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9418         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9419
9420 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9421         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9422
9423 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9424         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9425
9426 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9427         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9428
9429 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9430
9431     * in \sdcc\as\mcs51\ changed these files in order to create an
9432     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9433     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9434     following files to include the previous two files: aslink.dsp,
9435     Makefile.aslink, Makefile.bcc, and Makefile.in.
9436
9437     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9438     .adb instead of .cdb
9439
9440 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9441
9442         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9443         value from option --iram-size.
9444
9445 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9446
9447         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9448         dram[] array.
9449
9450 2002-09-18    <wiml AT hhhh.org>
9451
9452         * SDCClrange.h: exposed setFromRange() and setToRange()
9453         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9454           packRegsForAccUse() (bug 542397)
9455         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9456           multiple times and emitting the fetch operations more than once
9457           added aopGetUsesAcc() function to allow binary operators to
9458           fetch their operands in the correct order; made genMinus() emit
9459           compact code for X = LITERAL - Y
9460
9461 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9462         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9463         sprintf() in line 1267.
9464
9465 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9466         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9467         like ports.
9468
9469 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9470         Changes to aslink (All the changes are marked with 'JCF'):
9471
9472         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9473         summary().
9474
9475         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9476         area BSEG.  Also moves, if possible, the DATA area down into the internal
9477         ram so more space is available.
9478
9479         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9480         sflag.
9481
9482         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9483         not bytes.  Function summary() which creates a memory usage summary
9484         file with extension .mem.  Reports of overlaping stack and small stack
9485         size.  If the space for the stack is less than 16 bytes aslink trows a
9486         warning.
9487
9488         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9489         the 8051.  Option 'y' for memory summary output file.
9490
9491         Changes to sdcc (All the changes are marked with 'JCF'):
9492
9493         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9494
9495         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9496         overlaying area for it (uses RegBankUsed[4]).
9497
9498         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9499         bank zero as used by default.  By default aslink locates the stack
9500         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9501         the creation of the .mem file.  Delegates the allocation of data area
9502         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9503         the begining of the stack area to aslink.
9504
9505         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9506         glue() in SDCCglue.c creates an area for it.
9507
9508 2002-09-03  Borut Razem <borut.razem AT siol.net>
9509         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9510         sdcc/src/pic/glue.c:
9511         introduced atexit() handler for teporay files removal in case of
9512         errors, assertions, ...
9513
9514 2002-08-29  Borut Razem <borut.razem AT siol.net>
9515         * sdcc/support/cpp2/auto-host_vc_in.h:
9516         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9517         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9518         Maybe there is a similar problem with BORLANDC? It should be checked!
9519
9520         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9521         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9522         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9523         was not executed, and the compiler (cl) launched a warning:
9524         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9525
9526 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9527         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9528
9529 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9530         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9531
9532         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9533           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9534           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9535           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9536           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9537           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9538           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9539         - added Release configuration in VS projects
9540         - review of compiler an linker options
9541         - VC .exe files are generated in bin_vc directory, not to interfere
9542           with binaries generated from other projects (cygwin, mingw, bcc ...)
9543
9544         * sdcc/src/yacc.dsp: added
9545
9546         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9547         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9548         and insert the version number definitions from .version
9549
9550         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9551
9552         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9553         added - genarate auto-host.h using auto-host_vc_in.h as template
9554
9555         * sdcc/sdcc_vc.h,
9556         removed from CVS, generated automatically
9557
9558 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9559         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9560
9561 2002-08-11  Borut Razem <borut.razem AT siol.net>
9562         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9563
9564 2002-08-10  Borut Razem <borut.razem AT siol.net>
9565         * src/SDCCmain.c (main):
9566         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9567         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9568         The consequence was that some temporary files were not removed.
9569
9570         * src/SDCCglue.c:
9571         unification of code in functions tempfilename() and tempfile():
9572         function tempnam() is defined in Visual Studio 6.0 and .NET
9573
9574         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9575
9576         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9577           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9578         - removed compiler command line option /WX: Treats all warnings as errors
9579         - update a list of source files, included into the project
9580
9581         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9582           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9583         changed project type to Generic Project so that can be correcly converted to VS.NET project
9584
9585         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9586
9587         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9588
9589         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9590
9591         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9592         added return 0 statements after assert() to make compiler happy
9593
9594         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9595         added newline in the def file to keep MSC compiler satisfied
9596
9597         * sdcc/src/z80/gen.c:
9598         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9599           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9600         - solved MSC error in function aopDump()
9601
9602         * sdcc_vc.h: define PREFIX as "\\sdcc"
9603
9604 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9605         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9606
9607 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9608         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9609         - Rewrote the register banking algorithm.
9610         - Added pCode live-range analysis to registers (for now, only non-used and
9611         singly-used registers optimized away)
9612
9613         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9614
9615         * 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.
9616
9617 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9618         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9619
9620 2002-04-22  Michael Hope  <michaelh AT vroom>
9621
9622         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9623
9624         * configure.in (DD_COPT): Added include support required for gbdk.
9625
9626         * .version: Bumped version number just to increase it.
9627
9628         * src/SDCCmain.c: Added -nostdinc to the default options.
9629
9630 2002-04-15  Michael Hope  <michaelh AT vroom>
9631
9632         * device/lib/z80/printf.c (sprintf): Added.
9633
9634         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9635
9636         * src/z80/peeph.def: Added transpose redundent load rule.
9637
9638         * src/z80/main.c: Added force callee saves for jaune.
9639
9640         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9641
9642         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9643
9644 2002-03-28  Johan Knol  <johan AT balder>
9645
9646         * src/SDCCval.c: fixed bug #532436
9647
9648 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9649         * /src/port.h:
9650         Added "char *Processor" field to the port structure.
9651
9652         * /src/SDCCmain.c:
9653         Added -p option. Allows port dependent processor to be specified.
9654
9655         * all ports:
9656         Initialized the new field char *Processor field to NULL in all ports
9657
9658         * /src/pic/*:
9659         Compiler generated registers for interrupt context saving
9660         were not getting allocated.
9661
9662 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9663
9664         * /src/SDCCast.c:
9665         Fixed left shift. Will promote the left side of a left shift
9666         if a) left shifting more than size of operand or b) when assigned
9667         to something size > size of left side
9668
9669 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9670         * src/pic/*
9671         tons of changes. Register allocation has been
9672         rewritten. Added customization for the various PICs. Flow
9673         analysis is restructured. ...
9674
9675         * src/pic/device.h:
9676         Added
9677
9678         * src/pic/device.c:
9679         Added. device.c is a PIC port hack to accomodate variations
9680         in PIC devices.
9681
9682 2002-03-13  Michael Hope  <michaelh AT vroom>
9683
9684         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9685
9686 2002-03-04  johanknol  <johanknol AT manik>
9687
9688         * /src/SDCCval.c: fixed
9689
9690         const unsigned char arr[][2] = { { 0, 1 } };
9691         t18.c:1: error: Initializer element is not constant
9692
9693 2002-03-04  bela  <bela AT manik>
9694
9695         * /device/include/mcs51reg.h:
9696         ds89c420 register definition update
9697
9698 2002-03-03    <johan AT FRIJA>
9699
9700         * support/Util/SDCCerr.c: did something, but don't no why anymore
9701
9702         * support/regression/tests/bug-524691.c: made it a little less shy
9703
9704         * src/SDCCast.c (decorateType): fixed bug #524697
9705
9706         * src/SDCCast.c: made some lineno improvements
9707
9708         * src/SDCCval.c (getNelements): changed warning to error
9709
9710         * src/SDCCglue.c (printIvalArray): changed warning to error
9711
9712         * src/SDCCicode.c: fixed a warning for mingw
9713
9714         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9715
9716         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9717
9718 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9719
9720         * src/ds390/peeph.def:
9721         Added some more peephole rules
9722
9723         * src/ds390/gen.c: Various fixes & enhancements
9724
9725         * src/SDCClrange.c, src/SDCClrange.h:
9726         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9727
9728         * src/ds390/ralloc.c:
9729         various fixes & enhancements (ds390) specific
9730
9731         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9732         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9733         from rallocs.
9734
9735         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9736
9737 2002-03-02    <johan AT FRIJA>
9738
9739         * src/SDCCast.c (decorateType): fixed bug #524708
9740
9741         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9742
9743         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9744
9745 2002-03-01  Michael Hope  <michaelh AT vroom>
9746
9747         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9748
9749         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9750
9751 2002-03-01    <johan AT FRIJA>
9752
9753         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9754
9755         * src/SDCCast.c (decorateType): fixed bug #524209
9756
9757         * src/SDCCval.c (valNot): fixed bug #524195
9758
9759 2002-02-26    <johan AT balder>
9760
9761         * src/xa51/gen.c: fixed a warning
9762
9763         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9764
9765         * src/SDCCast.c (decorateType): fixed bug #522534
9766
9767 2002-02-23    <johan AT balder>
9768
9769         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9770
9771 2002-02-22    <johan AT balder>
9772
9773         * src/SDCCast.c: fixed bug #514865
9774
9775         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9776
9777 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9778
9779         * sdcc/src/SDCCloop.c:
9780         Previous fix was not good. basic blocks that have "break" or "return" are
9781         not really partof a loop , but live ranges used in these blocks should
9782         be live thru the entire loop, so set partOfLoop but don't add them to
9783         loop region
9784
9785 2002-02-21    <johan AT FRIJA>
9786
9787         * src/SDCCcse.c: fixed bug #514308
9788
9789 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9790
9791         * src/SDCCloop.c:
9792         Fixed BUG #519583. If a conditional block ended in a return/break
9793         statement inside a loop, it was not being considered part of the loop.
9794
9795         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9796
9797 2002-02-10  Karl Bongers <karl AT turbobit.com>
9798
9799         * debugger/*:
9800         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9801         with lots of comments and notes.
9802
9803         * device/examples/test2.c:
9804         Fix bug, "red" variable not being initialized(compiler complained).
9805
9806         * device/examples/Makefile, examples/test3.c:
9807         Add Makefile in device/examples folder, compiles test3.c
9808         for use as a multiple module SDCDB test case.
9809
9810         * sim/ucsim/cmd.src/cmdset.cc:
9811         Took out debug printfs in ucsim "next" command.
9812
9813         * sim/ucsim/xa.src:
9814         Karl and Johan start ucsim XA support.  Most dissassembly working,
9815         about 75% emulation done(plenty of work remaining).
9816
9817         * sim/ucsim/z80.src:
9818         Add Z80 support to ucsim, add test-ucz80 regression test,
9819         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9820         Notice z80 compiler fails on examples/test3.c/crc code.
9821
9822 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9823
9824         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9825         Added support for --parms-in-bank1
9826
9827         * src/ds390/peeph.def:
9828         added a few more peephole optimzations
9829
9830         * src/ds390/main.c:
9831         1) added __builtin_inp & __builtin_outp used to read in data of given length
9832            from a memory mapped port
9833         2) added __builtin_memcmp
9834         3) added __builtin_swapw swap bytes of a short
9835
9836         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9837         1) handle multiple send & receives from register bank1
9838         2) ralloc can now allocate DPTR1 to some liveRanges
9839
9840         * src/SDCCsymt.c, src/SDCCsymt.h:
9841         changes to handle multiple sends & receives
9842
9843         * src/SDCCptropt.h:
9844         added some pointer arithmetic optimization
9845
9846         * src/SDCCptropt.c:
9847         added some pointer arithmetic optimizations but not stable yet so not
9848         called from anywhere (will get this working shortly)
9849
9850         * src/SDCCopt.c: fixed for multiple sends & receives
9851
9852         * src/SDCCmain.c:
9853         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9854         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9855            set preprocessor defines (depending on options)
9856
9857         * src/SDCCicode.c, src/SDCCicode.h:
9858         changes made to handle multiple sends & receives
9859
9860         * src/SDCCglobl.h:
9861         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9862
9863         * src/SDCCcse.c, src/SDCCcse.h:
9864         added function findbackward def (to be used in upcoming optimization)
9865
9866         * src/SDCCcflow.c, src/SDCCcflow.h:
9867         added function returnAtEnd - to determine if a basic block terminates with
9868         a RETURN iCode
9869
9870         * src/SDCCast.c, src/SDCCast.h:
9871         added option parms-in-bank1
9872
9873         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9874         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9875         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9876         adjusted for --parms-in-bank1 option
9877
9878         * device/include/string.h:
9879         donot redefine "reentrant" keyword
9880
9881         * device/include/ds80c390.h: Added some more SFRs
9882
9883 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9884
9885         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9886
9887 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9888
9889         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9890
9891 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9892
9893         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9894
9895 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9896
9897         * Added --xram-movc option
9898
9899 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9900
9901         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9902
9903 2002-01-11  Johan Knol
9904
9905         * Added math lib of Jesus Calvino-Fraga
9906
9907 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9908
9909         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9910         * support/regression/Makefile: new target test-mcs51-stack-auto
9911         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9912
9913 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9914
9915         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9916
9917 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9918
9919         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9920
9921 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9922
9923         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9924
9925         * src/SDCCglue.h: add definition for printIvalChar()
9926
9927 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9928
9929         * src/SDCCast.c: fix #498138 by Johan
9930
9931         * src/SDCCglue.c: fix #498138 by Johan
9932
9933 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9934
9935         * support/regression/Makefile: fix clean
9936
9937         * support/regression/ports/ds390/support.c: fix transmission of last character
9938
9939 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9940
9941         * /sdcc/src/ds390/gen.c:
9942         a) improved computing address of stack variable
9943         b) took out some #if 0 code
9944         c) improved parmBytes adjustment
9945         d) improved genPlusIncr & genMinusIncr
9946         e) genCmp could generate bad code (when left assigned to DPTR)
9947         f) Fixed bug in hasInc
9948
9949         * /sdcc/src/ds390/ralloc.c:
9950         a) packRegsForSupport could mess up live information (Fixed)
9951         b) packRegsDPTRuse could be incorrect for left & right shift
9952
9953         * /sdcc/src/mcs51/ralloc.c:
9954         packRegsForSupport could mess up the live information (Fixed)
9955
9956         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9957
9958         * /sdcc/src/SDCCast.c:
9959         can reverse a loop even if function call is present as long
9960         as the loop control variable is local & is not passed as parameter
9961
9962 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9963
9964         * /sdcc/ChangeLog: *** empty log message ***
9965
9966         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9967         More builtin function additions for TININative
9968
9969         * /sdcc/src/ds390/ralloc.c:
9970         Had broken the regression testsuite
9971
9972         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9973
9974         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9975         Added funcattr hasStackParms will be set for reentrant functions when there
9976         are paramteres on the stack, this helps in minimizing frame pointer generation
9977         typeFromStr can handle function pointers now
9978
9979         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9980         *** empty log message ***
9981
9982 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9983
9984         * /src/ds390/gen.c, /src/ds390/main.c:
9985         More builtin function additions for TININative
9986
9987         * /src/ds390/ralloc.c:
9988         Had broken the regression testsuite
9989
9990         * /src/SDCCast.c: Fixed a bug in dumptree
9991
9992         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9993         Added funcattr hasStackParms will be set for reentrant functions when there
9994         are paramteres on the stack, this helps in minimizing frame pointer generation
9995         typeFromStr can handle function pointers now
9996
9997         * /doc/builtins.txt, /doc/TININative.txt:
9998         *** empty log message ***
9999
10000
10001 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10002
10003         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10004         ALPHA version for -mTININative
10005
10006         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10007         updated to reflect changes in the port structure
10008
10009         * /src/port.h:
10010         added function do_assemble (similar to do_link) if non-null this function
10011         will be called to do assembly (-mTININative) requires a multi command
10012         assembly
10013         added function genAssemblerEnd will be called to generate assembler Epilogue
10014
10015         * /src/SDCCsymt.c:
10016         added _JavaNative to debug info printing
10017
10018         * /src/SDCCmain.c: added option --tini-libid
10019         added port->do_assemble function (-mTININative) has a multi command assemble
10020
10021         * /src/SDCCglue.c: Disabled "constExpr" check
10022         added port->genAssemblerEnd function
10023
10024         * /src/SDCCglobl.h: Added option --tini-libid value
10025
10026         * /src/SDCCast.h:
10027         tookout optimizeCompare from the header (has no external references)
10028
10029         * /src/SDCCast.c: made one more function "static"
10030
10031 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10032
10033         * src/z80/mappings.i: Added z80asm support.
10034
10035         * src/z80/main.c: Added z80asm support on --asm=z80asm
10036
10037         * src/z80/gen.c: Fixed asm portability issues.
10038
10039         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10040
10041         * src/SDCCglue.c (printExterns): Added global/extern split.
10042
10043 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10044
10045         * support/regression/Makefile: added test for mcs51 model large
10046
10047         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10048
10049         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10050
10051 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10052
10053         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10054
10055 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10056
10057         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10058
10059         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10060
10061 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10062
10063         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10064
10065         * support/regression/tests/simplefloat.c: Port to mcs51.
10066
10067 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10068         * support/regression/tests/bug-485362.c: Added.
10069
10070         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10071
10072         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10073
10074         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10075
10076         * src/z80/gen.c (aopDump): Added a dump function.
10077
10078 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10079         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10080
10081         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10082
10083         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10084
10085         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10086
10087         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10088
10089         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10090
10091         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10092
10093         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10094
10095         * support/regression/ports/ds390/support.c: Use tinibios.
10096
10097         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10098
10099 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10100
10101         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10102         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10103
10104         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10105
10106         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10107
10108 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10109
10110         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10111
10112         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10113         (packRegsForIYUse): Created and optimised.
10114
10115 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10116
10117         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10118 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10119
10120         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10121
10122         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10123
10124         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10125
10126 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10127
10128         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10129
10130         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10131
10132 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10133
10134         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10135
10136         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10137
10138         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10139
10140 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10141
10142         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10143         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10144         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10145
10146         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10147
10148         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10149         (genNotFloat): Added.
10150         (genUminusFloat): Added.
10151
10152         * device/lib/z80/Makefile: Added floating pt stubs.
10153
10154         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10155
10156         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10157
10158         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10159
10160 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10161
10162         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10163
10164         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10165
10166         * sdcc/support/regression/Makefile: Add port ds390.
10167
10168         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10169
10170         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10171
10172         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10173
10174         * sdcc/support/regression/ports/ds390/support.c: Added.
10175
10176         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10177
10178         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10179
10180         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10181
10182 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10183
10184         * device/include/malloc.h: Added z80 and gbz80 support.
10185
10186         * device/lib/gbz80/heap.s: Added.
10187
10188         * device/lib/z80/heap.s: Added.
10189
10190         * device/lib/malloc.c: Added z80 and gbz80 support.
10191
10192         * support/regression/tests/malloc.c (testMalloc): Added.
10193
10194         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10195
10196         * support/regression/tests/bug-478094.c: Added.
10197
10198         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10199
10200 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10201
10202         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10203
10204         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10205
10206         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10207
10208         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10209
10210         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10211
10212 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10213
10214         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10215
10216 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10217
10218         * support/regression/tests/bug-477927.c: Added.
10219
10220         * src/z80/peeph.def: Added minor rules.
10221
10222         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10223
10224         * src/z80/peeph.def: Added jump optimisation modification.
10225
10226 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10227
10228         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10229
10230 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10231
10232         * support/regression/tests/funptrs.c: Added.
10233
10234 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10235
10236         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10237
10238 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10239
10240         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10241
10242         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10243
10244         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10245         (movLeft2ResultLong): Created.
10246
10247         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10248         (joinPushes): Added.  Joins two char pushes into a word push.
10249
10250 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10251
10252         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10253
10254         * support/makebin/Makefile (install): Added creation of dest dir.
10255
10256 2001-10-24 Karl Bongers <karl AT turbobit.com>
10257
10258         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10259
10260 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10261
10262         * src/z80/ralloc.c: Turned off faulty pack for one use.
10263
10264         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10265
10266         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10267
10268 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10269
10270         * support/regression/Makefile: Improved clean
10271
10272         * support/regression/ports/gbz80/spec.mk: Added clean
10273
10274         * support/regression/ports/host/spec.mk: Added clean
10275
10276         * support/regression/ports/z80/spec.mk: Added clean
10277
10278         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10279
10280         * support/regression/ports/mcs51/timeout.c: little improvements
10281
10282 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10283
10284         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10285
10286         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10287
10288         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10289
10290 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10291
10292         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10293
10294         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10295
10296 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10297         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10298
10299         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10300
10301         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10302
10303         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10304
10305         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10306
10307         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10308
10309         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10310
10311         * support/regression/tests/longor.c: Added.
10312
10313 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10314
10315         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10316
10317         * as/mcs51/aslink.h: define PATH_MAX
10318
10319         * as/mcs51/asm.h: define PATH_MAX
10320
10321         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10322
10323         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10324
10325         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10326
10327         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10328
10329         * src/SDCCglobl.h: define PATH_MAX
10330
10331         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10332
10333         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10334
10335 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10336
10337         * src/z80/gen.c (gencjneshort): Fixed
10338
10339         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10340
10341 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10342
10343         * support/regression/tests/bug-469671.c: Added.
10344
10345         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10346
10347 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10348
10349         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10350
10351         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10352
10353 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10354
10355         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10356
10357         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10358
10359         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10360
10361         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10362
10363         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10364
10365         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10366
10367         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10368
10369 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10370
10371         * 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.
10372
10373         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10374
10375         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10376
10377 2001-10-07    <johan AT FRIJA>
10378
10379         * device/lib/gets.c (gets): fixed the return value.
10380
10381 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10382         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10383
10384         * 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.
10385
10386         * 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.
10387
10388         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10389
10390         * src/pic/gen.c: Removed Safe_strdup.
10391
10392         * configure.in: Added option to enable libgc support.
10393
10394         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10395         (bitVectUnion): Optimised.
10396         (bitVectIntersect): Optimised.
10397         (bitVectBitsInCommon): Optimised.
10398         (bitVectCplAnd): Optimised.
10399
10400         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10401
10402 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10403
10404         * src/SDCCmain.c: distinguish between assembler debug and plain options
10405
10406         * src/avr/main.c:   remove standard assembler options
10407
10408         * src/ds390/main.c: remove standard assembler options
10409
10410         * src/mcs51/main.c: remove standard assembler options
10411
10412         * src/port.h: removed "PENDING" comment
10413
10414 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10415
10416         * src/device/lib/_mulint.c  : new, with assember functions
10417
10418         * src/device/lib/_mullong.c : new, with assember functions
10419
10420         * src/device/lib/_divuint.c : with assember functions
10421
10422         * src/device/lib/_divsint.c : with assember functions
10423
10424         * src/device/lib/_divulong.c: with assember functions
10425
10426         * src/device/lib/_divslong.c: with assember functions
10427
10428         * src/device/lib/_moduint.c : with assember functions
10429
10430         * src/device/lib/_modsint.c : with assember functions
10431
10432         * src/device/lib/_modulong.c: with assember functions
10433
10434         * src/device/lib/_modslong.c: with assember functions
10435
10436         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10437
10438         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10439
10440         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10441                                       replaced _mululong.c and _mulslong.c by _mullong.c
10442
10443 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10444
10445         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10446
10447 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10448
10449         * src/SDCCglue.c: test, if win32api is available for MINGW
10450
10451 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10452
10453         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10454         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10455         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10456         * support/regression/ports/host/spec.mk: removed GENERIC
10457         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10458         * support/regression/ports/z80/spec.mk: removed GENERIC
10459
10460 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10461
10462         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10463
10464         * support/regression/tests/bug-467035.c: Created.
10465
10466 2001-10-01    <johan AT FRIJA>
10467
10468         * src/SDCC.y: fixed bug #466586 part 1
10469
10470 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10471
10472         * SDCCicode.c: z80 has no generic pointers
10473         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10474
10475 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10476
10477         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10478
10479 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10480
10481         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10482
10483         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10484
10485 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10486
10487         * configure.in: Fixed up so that ucsim is only configured once.
10488
10489         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10490
10491         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10492         (getPathDifference): As above.
10493
10494         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10495
10496         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10497
10498 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10499         * .version: Updated to 2.3.1
10500
10501         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10502         Added copyright header.
10503
10504         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10505         (assemble): Added support for macro based assembler commands.
10506         (linkEdit): Added support for macro based linker commands.
10507         (preProcess): Changed the pre-processor to use macros.
10508         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10509         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10510
10511         * device/lib/z80/crt0.s: Added module name for debugging.
10512
10513 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10514
10515         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10516
10517         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10518
10519         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10520
10521         * src/Makefile.in: Added SDCCmacro and SDCCutil
10522
10523 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10524
10525         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10526
10527 2001-09-16    <johan AT FRIJA>
10528
10529         * 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.
10530
10531 2001-09-15    <johan AT FRIJA>
10532
10533         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10534         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10535
10536 2001-09-11    <johan AT FRIJA>
10537
10538         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10539
10540 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10541
10542         * support/regression/tests/bug-460444.c: Added test case.
10543
10544         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10545         (genCast): Added justification for all of the asserts.
10546
10547 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10548
10549         * support/regression/support.c: _xdata replaced by xdata
10550
10551         * support/regression/spec.mk: removed _generic
10552
10553 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10554
10555         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10556
10557         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10558         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10559
10560         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10561
10562         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10563
10564         * support/regression/tests/bug-460010.c: Added test case.
10565
10566         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10567
10568 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10569
10570         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10571
10572         * support/regression/testfwk.c: removed workaround for bug #436344
10573
10574         * support/regression/tests/bp.c: use less memory with mcs51
10575
10576         * support/regression/tests/bug-441448.c: use less memory
10577
10578         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10579
10580         * support/regression/collate-results.py: typo
10581
10582 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10583
10584         * support/regression/tests/fetchoverlap.c: Added new test case.
10585
10586         * support/regression/tests/bp.c: Added new test case.
10587
10588         * support/regression/tests/bug-448984.c: Added new test case.
10589
10590         * support/regression/tests/pow2shifts.c: Added new test case.
10591
10592         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10593         (genlshTwo): Fixed right shift for count > 8.
10594
10595         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10596
10597 2001-09-08    <johan AT FRIJA>
10598
10599         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10600
10601 2001-09-07    <johan AT FRIJA>
10602
10603         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10604
10605         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10606
10607 2001-09-06    <johan AT FRIJA>
10608
10609         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10610         * bernhard noted me at this: "() equals to (void)" (1.38)
10611
10612 2001-09-05    <johan AT FRIJA>
10613
10614         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10615
10616 2001-09-04    <johan AT FRIJA>
10617
10618         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10619
10620
10621 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10622
10623         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10624
10625 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10626
10627         * link/z80/aslink.h: Fixed path for PATH_MAX
10628
10629 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10630
10631         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10632
10633         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10634
10635         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10636
10637         * 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.
10638
10639 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10640
10641         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10642         (genCmp): Fixed up genCmp for the GB with longs.
10643
10644         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10645
10646         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10647
10648         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10649
10650         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10651
10652 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10653
10654         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10655
10656 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10657
10658         * 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.
10659
10660         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10661
10662 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10663
10664         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10665
10666         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10667
10668 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10669
10670   * sim/ucsim/configure:    little improvement of Cygwin-detection
10671   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10672   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10673   * support/regression/tests/bug-221100.c: small changes for mcs51
10674   * support/regression/tests/bug-221168.c: small changes for mcs51
10675   * support/regression/tests/bug-227710.c: small changes for mcs51
10676   * support/regression/tests/staticinit.c: small changes for mcs51
10677   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10678   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10679   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10680
10681 $Revision$