* src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
[fw/sdcc] / ChangeLog
1 2006-03-08 Raphael Neider <rneider AT web.de>
2
3         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
4
5 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
6
7         * device/include/mcs51/c8051f410.h: new SiLabs mcu
8         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
9         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
10
11 2006-03-06 Borut Razem <borut.razem AT siol.net>
12
13         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
14           made the linker quiet
15
16 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
17
18         * src/pic16/gen.c (genPcall): fixed bug #1443644
19         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
20         which dumps before the function entry point a data byte which represents
21         the number of the local variables used by the specified function, added
22         'xinst' for initial support for Extended Instruction Support,
23         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
24         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
25         port->fun_prefix anymore (may change later),
26         (genFunction, genEndFunction): do not store/restore local registers for
27         _main (this should take care the --main-return command line option in
28         the future),
29         (genOr): removed some legacy pic-port instructions,
30         * src/pic16/genarith.c (genAddLit): re-enabled old code because
31         performing operations with SFR's causes data to be written more than
32         once to each SFR. Perhaps SFRs should be handled in special cases...
33         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
34         pcode.h
35         * src/pic16/main.c (_process_pragma): stack bound checking did not take
36         into account for stack starting position,
37         (struct OPTIONS pic16_optionsTable): added command line argument
38         --extended or -y for Extended Instruction Support,
39         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
40         (deassignLRs): *** perhaps the most important change, old 'for' code
41         (commented out for reference), didn't account for some registers which
42         were left marked 'not free' after a pointer operation. The change
43         reduces register usage a lot in some cases
44
45 2006-03-04 Borut Razem <borut.razem AT siol.net>
46
47         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
48           _clean
49         * support/regression/tests/bug-524697.c: decreased array size for
50           mcs51 to fit into the internal RAM
51         * support/regression/Makefile.in: a little bit more verbose
52
53 2006-03-03 Borut Razem <borut.razem AT siol.net>
54
55         * support/regression/fwk/lib/testfwk.c,
56           support/regression/fwk/include/testfwk.h: introduced function
57           _prints(), nonrecursive _printn(), call _initEmu() from main()
58         * support/regression/ports/gbz80/support.asm,
59           support/regression/ports/ucz80/support.asm,
60           support/regression/ports/z80/support.asm,
61           support/regression/ports/ds390/support.c,
62           support/regression/ports/hc08/support.c,
63           support/regression/ports/host/support.c,
64           support/regression/ports/mcs51/support.c,
65           support/regression/ports/xa51/support.c: added empty _initEmu()
66           function
67         * support/regression/ports/pic16/gpsim.cmd,
68           support/regression/ports/pic16/spec.mk,
69           support/regression/ports/pic16/support.c,
70           support/regression/Makefile.in: added pic16 regression test
71
72 2006-03-01 Raphael Neider <rneider AT web.de>
73
74         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
75           genConstPointerGet): use safe way of generating MOVFF to cover
76             literals as well as registers, fixes bug #1440527
77         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
78             dereference
79           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
80             more correctly, fixes bug #1232186
81           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
82         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
83             gplink guess the correct processor in more cases, applied patch
84             from Till Riedel attached to and fixing bug #1436552
85
86 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
87
88         * support/regression/tests/array.c: added, contains check for #1434401
89         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
90
91 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
92
93         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
94         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
95         * device/include/mcs51/c8051f326.h,
96         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
97         * device/include/mcs51/c8051f000.h,
98         * device/include/mcs51/c8051f018.h,
99         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
100           PCON_IDLE,PCON_STOP and added sfr16 definitions
101
102 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
103
104         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
105           genGetWord): fixed bug 1409955
106
107 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
108
109         * device/include/hc08/mc68hc908gp32.h,
110         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
111
112 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
113
114         * src/SDCCast.c (constExprValue): return NULL if not a value
115         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
116         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
117         * support/regression/tests/bitfields.c: enabled signed bitfield for all
118
119 2006-02-13 Borut Razem <borut.razem AT siol.net>
120
121         * src/regression/ptrarg.c: added, fails due to bug #1430967
122         * src/regression/Makefile: ptrarg.c added, ...
123
124 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
125
126         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
127         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
128
129 2006-02-11 Borut Razem <borut.razem AT siol.net>
130
131         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
132           print "Processor: xxx" message to stdout only if --verbose
133
134 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
135
136         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
137         * support/regression/tests/bug1426356.c: added
138         * support/regression/tests/bitfields.c: removed 2 tests
139
140 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
141
142         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
143         * device/include/mcs51/c8051f330.h,
144         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
145           PCON_IDLE,PCON_STOP and added sfr16 definitions
146         * device/lib/_divsint.c,
147         * device/lib/_divuint.c,
148         * device/lib/_divulong.c,
149         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
150           register bank bug for small stackauto
151
152 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
153
154         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
155
156 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
157
158         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
159         * all.dsp: corrected several bin paths
160         * device/include/mcs51/c8051f120.h,
161         * device/include/mcs51/c8051f300.h,
162         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
163           to PCON_IDLE,PCON_STOP
164         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
165         * device/lib/printf_large.c (output_float): fixed bug 1388703
166         * support/regression/tests/bug1057979.c: added test for bug 1388703
167
168 2006-02-08 Raphael Neider <rneider AT web.de>
169
170         * src/pic/pcode.c (pciTRIS): fixed typo,
171           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
172           (LinkFlow): fixed handling of flows that end in a call,
173           (ReuseReg): perform safety check earlier
174         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
175             to work with flows at the beginning of a pBlock,
176             fixes #1426557 (Symbol not previously defined),
177           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
178             usage information
179           (RemoveUnusedRegisters): update register usage info
180         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
181             created, reuse existing ones instead
182         * src/pic/gen.c (genPcall): fixed #1424719
183
184 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
185
186         * link/z80/lkmain.c,
187         * link/z80/lklex.c,
188         * link/z80/lkdata.c,
189         * link/z80/aslink.h: fixed build on current cygwin:
190         replaced getline() by lk_getline()
191
192 2006-02-01 Borut Razem <borut.razem AT siol.net>
193
194         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
195           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
196           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
197           src/regression/bool1.c, src/regression/bool2.c,
198           src/regression/bool3.c, src/regression/call1.c,
199           src/regression/compare.c, src/regression/compare10.c,
200           src/regression/compare2.c, src/regression/compare3.c,
201           src/regression/compare4.c, src/regression/compare5.c,
202           src/regression/compare6.c, src/regression/compare7.c,
203           src/regression/compare8.c, src/regression/compare9.c,
204           src/regression/configword.c, src/regression/for.c,
205           src/regression/inline.c, src/regression/mult1.c,
206           src/regression/nestfor.c, src/regression/or1.c,
207           src/regression/pointer1.c, src/regression/ptrfunc.c,
208           src/regression/rotate1.c, src/regression/rotate2.c,
209           src/regression/rotate3.c, src/regression/rotate4.c,
210           src/regression/rotate5.c, src/regression/rotate6.c,
211           src/regression/rotate7.c, src/regression/string1.c,
212           src/regression/struct1.c, src/regression/sub.c,
213           src/regression/sub2.c, src/regression/switch1.c,
214           src/regression/while.c, src/regression/xor.c,
215           src/regression/create_stc, src/regression/simulate,
216           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
217           regression tests
218         * src/regression/gpsim_assert.h: added
219
220 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
221
222         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
223         ((void (code *) (void)) 0) ();
224         * as/hc08/aslex.c,
225         * as/hc08/aslink.h,
226         * as/hc08/asm.h,
227         * as/hc08/asmain.c,
228         * as/hc08/lkdata.c,
229         * as/hc08/lklex.c,
230         * as/hc08/lkmain.c,
231         * as/mcs51/aslex.c,
232         * as/mcs51/aslink.h,
233         * as/mcs51/asm.h,
234         * as/mcs51/asmain.c,
235         * as/mcs51/lkdata.c,
236         * as/mcs51/lklex.c,
237         * as/mcs51/lkmain.c,
238         * as/z80/aslex.c,
239         * as/z80/asm.h,
240         * as/z80/asmain.c: fixed build on current cygwin:
241         replaced getline() by as_getline()
242
243 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
244
245         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
246         declarator in the symbol chain
247         * src/SDCCsymt.h,
248         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
249         parameter list for function pointers
250         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
251         * support/regression/tests/bug-716242.c: added
252
253 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
254
255         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
256         offset if possible
257         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
258
259 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
260
261         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
262         inifinitely recurseable, added static
263         * support/regression/tests/bug-1408066.c: added
264
265 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
266
267         * src/SDCCicode.h,
268         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
269         renamed, added possibility to create "postLoopLbl"-labels
270         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
271         newiTempLoopHeaderLabel
272         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
273         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
274         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
275         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
276         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
277         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
278         (basicInduction): fixed bug #136564, made static,
279         (loopInduction): changed parameter of basicInduction, made static,
280         (addPostLoopBlock): added
281         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
282         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
283         findLoopEndSeq
284         * support/regression/tests/bug-136564.c: added
285         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
286         --std-sdcc99 to LIBSDCCFLAGS
287
288 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
289
290         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
291         while loop
292         * support/regression/tests/bug-1406131.c: added
293
294 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
295
296         * src/SDCCast.c (decorateType): fix promotion of unary minus
297         * src/SDCCsymt.c (computeType): beautified
298         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
299         (valUnaryPM, valComplement): fix sign and promotion,
300         (valNot): ANSI: result type is int (SDCC: unsigned char)
301         * support/regression/tests/uminus.c: speedup by removing superflous
302         test case 'int'
303         * support/regression/tests/onebyte.c: added promotion and signedness
304         tests for unary minus
305         * support/regressions/tests/bug-477927.c: disable warning about
306         uninitialized variables
307         * support/regression/tests/not.c: added
308
309 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
310
311         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
312         * src/mcs51/gen.c (gen51Code): show final register usage after
313         fillGaps in asm with --i-code-in-asm
314         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
315         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
316         incUsed, rliveClear, adjustIChain): made static,
317         (setFromRange): excluded because it's unused,
318         (findPrevUseSym, markWholeLoop): added,
319         (findPrevUse): rewritten; fixes bug 895992; now a complete search
320         through all branches of predecessors enables sdcc to emit the warning
321         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
322         (rlivePoint): made static, added parameter emitWarnings which is only
323         true during the first run out of two,
324         (findRecursiveSucc, findRecursivePred): removed,
325         (computeLiveRanges): made static, added parameter emitWarnings,
326         (dumpIcRlive): added for debugging only
327         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
328         removed prototype of setFromRange()
329         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
330         in call of computeLiveRanges()
331         * support/regression/tests/bug-895992.c: added
332         * support/regression/tests/bug-971834.c: added
333         * support/valdiag/tests/bug-895992.c: added
334         * support/valdiag/tests/bug-971834.c: added
335
336 2005-12-18 Raphael Neider <rneider AT web.de>
337
338         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
339           (genUnpackBits): improved code for direct operands,
340           (genPackBits): improved code for literal assignment to bitfields
341             and for direct destination operands (no FSR indirection),
342             prevented redundant AND, fixes #1362800,
343           (AccLsh): added parameter to disable masking of the result
344         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
345           skip instructions with side-effects (like incfsz),
346           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
347         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
348         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
349           fixes #1375263
350
351 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
352
353         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
354         volatile variables as spill location
355
356 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
357
358         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
359         replacing literals
360         * support/regression/tests/bug-1376320.c: added
361
362 2005-12-08 Raphael Neider <rneider AT web.de>
363
364         * src/pic/device.c: renamed is_shared to pic14_is_shared
365         * src/pic/gen.c (genIfx): re-enabled handling of sbits
366         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
367           (is_valid_identifier): added for above workaround
368
369 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
370
371         * device/lib/Makefile.in: fixed to enable port-specific-objects
372         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
373           char, thanks Hubert Sack
374         * doc/sdccman.lyx: documented --xstack-loc,
375           elaborated a bit more on interrupts and pitfalls,
376           removed "setjmp/longjmp unsupported",
377           documented some unsupported C99 features
378         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
379         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
380           if, thanks Hubert Sack
381         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
382         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
383           make make_library
384         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
385           regression tests can report resource usage (rfe 700441)
386         * support/regression/collate-results.py: report resource usage
387         * support/regression/ports/ds390/spec.mk,
388         * support/regression/ports/hc08/spec.mk,
389         * support/regression/ports/mcs51/spec.mk,
390         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
391         * support/regression/ports/ds390/uCsim.cmd,
392         * support/regression/ports/hc08/uCsim.cmd,
393         * support/regression/ports/mcs51/uCsim.cmd,
394         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
395         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
396           library, use the default one
397         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
398           building the library
399
400 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
401
402         * config.dsp: added dependency on .version and configure_vc.awk
403         * device/include/setjmp.h: updated for --stack-auto and --xstack
404         * device/include/mcs51/at89c51snd1c.h: corrected line endings
405         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
406         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
407         * device/lib/libsdcc.lib: added _setjmp
408         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
409           (decorateType): fixed bug 1372851,
410           (optimizeGetHbit): fixed warning
411         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
412           array initialisation
413         * support/regression/tests/bug1057979.c: added test for bug 1358192
414         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
415
416 2005-12-03 Borut Razem <borut.razem AT siol.net>
417
418         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
419           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
420
421 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
422
423         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
424         createIval): implement symbol independant "flexible array member",
425         (createIvalCharPtr): implemented flexible array initialisation with a
426         string
427         * src/SDCCsymt.c (copyStruct): removed,
428         (getSize): fixed misleading comment,
429         (getAllocSize): removed, the additional allocation size is now in
430         sym->flexArrayLength,
431         (checkStructFlexArray): new, syntax checks for flexible array members,
432         (compStructSize): added syntax checks for "flexible array members"
433         (copyStruct): removed,
434         (copyLinkChain): removed inefficient fix for bug 770487
435         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
436         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
437         symbol->flexArrayLength
438         * src/SDCCerr.c,
439         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
440         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
441         * support/regression/tests/structflexarray.c: added
442         * support/valdiag/tests/structflexiblearray.c: added
443
444 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
445
446         * src/SDCCast.c (decorateType): fixed bug 1368489
447         * support/Util/SDCCerr.c,
448         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
449
450 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
451
452         * device/include/mcs51/at89c51snd1c.h: added file submitted by
453           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
454
455 2005-11-27 Borut Razem <borut.razem AT siol.net>
456
457         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
458           support/cpp2/mkdeps.h: added command line option
459           -obj-ext=<extension> to SDCPP to define object file externion, used
460           for generation of make dependencies (-M)
461         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
462
463 2005-11-26 Borut Razem <borut.razem AT siol.net>
464
465         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
466           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
467           added pic and pic16 libraries
468
469 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
470
471         * device/include/float.h: Corrected typo in prototype of __fsgt
472
473 2005-11-25 Borut Razem <borut.razem AT siol.net>
474
475         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
476           added creation of model-mcs51-stack-auto libraries
477
478 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
479
480         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
481         and fields-list too
482         * src/SDCCast.c (createIvalArray): removed obsolete comment
483
484 2005-11-24 Borut Razem <borut.razem AT siol.net>
485
486         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
487           added missing device/lib/mcs51/crt*.asm sources
488
489 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
490
491         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
492
493 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
494
495         * device/lib/_fs2schar.c,
496         * device/lib/_fs2sint.c,
497         * device/lib/_fs2slong.c: optimized inline asm
498
499 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
500
501         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
502           Better handling of floats between -1.0 and 0.0.
503
504 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
505
506         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
507           (the missing "if"s prohibited removal of redundant labels)
508
509 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
510
511         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
512           Properly convert floats between -1.0 and 0.0 to long, int, and char
513           types (max integer value of negative floats tends to zero).
514         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
515           Removed changes made so to work properly with floats between
516           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
517           and _fs2char.c
518
519 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
520
521         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
522         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
523         (genCast) cosmetic change
524         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
525         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
526         from mcs51
527         * support/regression/tests/bitfields (testSignedBitfields): added
528
529 2005-11-18 Borut Razem <borut.razem AT siol.net>
530
531         * sdcc/device/lib/Makefile.in: remove all unnecessary files
532         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
533           introduced SILENT option to make building of pic16 libraries less
534
535 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
536
537         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
538           Now they work properly with floats between -1.0 and 0.0
539         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
540
541 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
542
543         * src/SDCCicode.c (printOperand): added missing else
544
545 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
546
547         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
548         reformatted for better readability
549         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
550         signed bitfields
551
552 2005-11-17 Borut Razem <borut.razem AT siol.net>
553
554         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
555           introduced SILENT option to make building of pic16 libraries less
556           verbose - used for nightly snapshot build
557         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
558           available on Win32 platforms.
559         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
560           medium, large, pic and pic16
561
562 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
563
564         * device/lib/printf_large.c: Temporary patch for bug 1358192:
565           printf("%f"...) sets fraction to zero.
566
567 2005-11-16 Raphael Neider <rneider AT web.de>
568
569         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
570           fixes #1357221
571         * src/pic/gen.c (genIfx): implemented for CARRY bit
572         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
573           to generic pointers, fixes #1357332,
574           (pic16_movLit2f): NEW,
575           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
576
577 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
578
579         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
580
581 2005-11-11 Raphael Neider <rneider AT web.de>
582
583         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
584         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
585           compute pointer's type from operand,
586           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
587           improved single bit reads, fixes bug #1353379
588
589 2005-11-09 Borut Razem <borut.razem AT siol.net>
590
591         * support/scripts/sdcc.nsi: added lib/pic to the package
592
593 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
594
595         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
596
597 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
598
599         * support/regression/tests/bug1348008.c: added
600         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
601         * support/regression/tests/bug1337835.c: updated comment
602
603 2005-11-06 Borut Razem <borut.razem AT siol.net>
604
605         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
606           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
607           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
608           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
609           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
610           dynamic construction of cl_error_class and derivates - 2.nd try
611
612 2005-11-05 Borut Razem <borut.razem AT siol.net>
613
614         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
615           bug, which caused Bus Errors on sparc solaris
616
617 2005-11-04 Borut Razem <borut.razem AT siol.net>
618
619         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
620           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
621           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
622           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
623           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
624           and derivates to resolve the initialization problem on OSX
625
626 2005-11-02 Borut Razem <borut.razem AT siol.net>
627
628         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
629           corrected typo - #include <winsock2.h>
630
631 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
632
633         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
634           (_asxxxx_mapping): added org directive for future enhancements
635
636 2005-11-01 Borut Razem <borut.razem AT siol.net>
637
638         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
639           enabled sockets on WIN32
640         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
641
642 2005-10-31 Borut Razem <borut.razem AT siol.net>
643
644         * support/regression/generate-cases.py: escape backslashes in {testcase}:
645           WIN32 backslash path delimiters should be escaped when used in C strings
646         * support/regression/tests/bitfields.c: exclude failing assertions for
647           __CYGWIN32__ and __MINGW32__ hosts
648
649 2005-10-30 Borut Razem <borut.razem AT siol.net>
650
651         * src/SDCCutil.c: corrected double comparison typo
652
653 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
654
655         * device/lib/medium/Makefile: added for new memory model medium
656         * device/include/asm/mcs51/features.h: updated for medium/pdata
657         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
658           added Multiply & Accumulate sbit's and MAC0_PAGE define
659         * device/include/mcs51/c8051f300.h: added sfr16 definitions
660         * device/include/mcs51/c8051f310.h: added sfr16 definitions
661         * device/lib/_mullong.c: update for medium model
662         * device/lib/incl.mk: added medium model
663         * doc/sdccman.lyx: documented medium model
664         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
665         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
666         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
667         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
668           (allocParms): set SCLS and OCLS to pdata for medium model
669         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
670           for pdata,
671           (powof2): return <0 if not power of 2
672         * src/avr/gen.c (genBitWise): use updated powof2
673         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
674           (shiftR2Left2Result): small optimization in setup, save acc when storing,
675           (shiftLLeftOrResult): use B if necessary
676         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
677         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
678         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
679         * support/regression/Makefile.in: added test-mcs51-medium
680         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
681
682 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
683
684         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
685         specifier unsigned
686         * device/lib/time.c (mktime): fixed bug 1334315
687
688 2005-10-28 Raphael Neider <rneider AT web.de>
689
690         * device/include/pic/p16f_common.inc: added common declarations
691         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
692
693 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
694
695         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
696           (aopPutUsesAcc): added to predict accumulator use,
697           (assignResultValue): save acc if necessary,
698           (genMinusDec): store result if indirectly addressed,
699           (genDivOneByte):  save acc if necessary,
700           (movLeft2Result): bugfix if left already in acc,
701           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
702             attention to accumulator use (esp. pdata),
703           (genReceive): receive pdata correctly
704         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
705         * src/SDCCicode.h: added isOperandInPagedSpace prototype
706
707 2005-10-27 Raphael Neider <rneider AT web.de>
708
709         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
710
711 2005-10-27 Raphael Neider <rneider AT web.de>
712
713         * .version: changed version to 2.5.4
714         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
715         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
716           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
717             arithmetics support routines
718         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
719         * device/lib/Makefile.in: also create installdir for pic
720
721         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
722           pic14 port as well
723         * src/pic/device.c (dump_sfr): rewritten to delegate register
724           placement to the linker (use `extern sym' rather than sym EQU addr),
725           (validAddress): fixed to check last specified address
726         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
727           (popGetLit): truncate literal value to 8 bit,
728           (popGet): moved assert to more appropriate place
729           (popGetExternal): create pCode operand from and mark the according
730             symbol as being `extern'
731           (popGetAddr): added sanity check on immediate's offset, provide
732             GPOINTER tag on demand
733           (aopPut): fixed for immediates,
734           (mov2w_op): move operand's address or contents to WREG (depending on
735             operand type), safer variant of mov2w,
736           (movwf,call_libraryfunc): NEW, handy abbreviations,
737           (get_argument_pcop,get_return_val_pcop,pass_argument,
738           get_returnvalue): interface for accessing function parameters and
739             return values,
740           (assignResultValuei,genRet): use new parameter/return value interface
741           (pic14_getDataSize): back to old version handling generic pointers,
742           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
743             provided implementation and/or fixed old one,
744           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
745             calls, removed legacy 8051 reference code
746           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
747           (loadSignToC): NEW, move the operands sign bit to CARRY,
748           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
749             genRightShiftSigned, accepts negative shift counts,
750           (setup_fsr): load FSR and adjust IRP (indirect memory access),
751           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
752             generic pointers, __data pointers and __code pointers,
753           (genUnpackBits,genPackBits): rewritten to work with generic pointers
754             and signed bitfields, limit bitfields to 8 bit,
755           (genDataPointerGet): fixed number of bytes read,
756           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
757           (genPointerGet,genPointerSet): fixed handling of __code pointers,
758             pointers to constant data are no longer assumed to point to __code
759             space, removed invalid pointer types,
760           (bitpatternFromVal): retrieve the PICs representation of an integer
761             or float literal,
762           (genDataPointerSet): fixed assigning to po_immediate operands,
763           (genGenPointerSet): implemented as library call,
764           (genIfx): fixed incorrect condition,
765           (genAddrOf): limit generic pointers' addresses to 2 bytes,
766             provide GPOINTER tag according to destination's storage class,
767           (genCast): added code to handle casting to generic pointers, added
768             sign-/zero extension of the result
769           (aop_isLitLike,op_isLitLike): fixed handling of immediates
770         * src/pic/gen.h: added macros to access IRP bit in STATUS register
771         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
772           extend the result
773         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
774           address/register resides in the shared banks
775           (emitSymbolToFile): improved to handle global and `pinned' symbols,
776             put all variables into separate sections (have the linker arrange
777             them)
778           (picglue): put init code and interrupt handlers in separate sections
779         * src/pic/main.c: added port specific options table, modified to PORT
780           structure to make GPOINTERs 3 byte, added pic14_options
781           (_pic14_do_link): private linking routine (update paths to libraries,
782             add libsdcc.lib by default)
783         * src/pic/main.h: declare pic14_options
784         * src/pic/pcode.c: fixed instructions i/o relations,
785           (RegCond): reverted to correct version,
786           (newpCodeOpLit): truncate literals to 8 bit,
787           (genericPrint): added debug output,
788           (getRegFromInstruction): fixed for various operand types, simplified
789           (BuildFlow): fixed broken handling of isntructions with labels
790           (LinkFlow): start at last instruction in flow (skip trailing comments),
791             pass the flow on to the next instruction after CALL
792           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
793           (insertPCodeInstruction): fixed inserting after a skip instruction,
794           (DoBankSelect): fixed for labeled instructions
795           (OptimizepBlock): honor --nopeep switch
796           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
797         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
798         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
799           (pCodeOptime2pCodes): allow disabling this optimization via
800             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
801             but is still buggy), started implementation of a dataflow based
802             pCode optimization (CSE + dead code elimination)
803           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
804         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
805           names are independant of the stack location and therefore portable across
806           devices
807
808 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
809
810         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
811           (selectSpil): fixed bug 1337835 by not spilling bit variables
812         * support/regression/tests/bug1337835.c: added test for this bug
813         * src/mcs51/peeph.def: restart after rule 3.c,
814           addded rules 263.x to optimize loading constants
815
816 2005-10-26 Raphael Neider <rneider AT web.de>
817
818         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
819         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
820           (genAssign): emit warning when casting literals to generic pointer
821             type, also applies when taking the address of a fixed variable,
822           (genCast): improved casting to generic pointers
823         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
824           extern variables, added verbose error message
825         * device/include/pic16/{string.h,errno.h}: added #pragma library c
826
827 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
828
829         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
830         carry must be complemented too
831         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
832         could be emitted by genMinus
833         * src/SDCCval.c (constVal): fixed bug 1305065
834
835 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
836
837         * src/SDCCast.c (addCast): added promotion for bit variables
838         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
839         promotion casts + optimisation
840         (optimizeGetWord): fix warning 'i' might be used uninitialized
841         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
842         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
843
844 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
845
846         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
847         all chars are promoted to int; promotion should be handled in SDCCast.c
848
849 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
850
851         * device/lib/_strcmp.c: Fixed bug 1326457
852
853 2005-10-11 Raphael Neider <rneider AT web.de>
854
855         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
856         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
857
858 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
859
860         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
861         * support/regression/tests/sfr16.c: added test for the sfr32 bug
862
863 2005-10-04 Raphael Neider <rneider AT web.de>
864
865         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
866           device/lib/pic16/pics.all: added pic18f1320
867         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
868
869 2005-09-30 Raphael Neider <rneider AT web.de>
870
871         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
872         * src/pic16/devices.inc: NEW, provides device descriptions
873         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
874
875 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
876
877         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
878           GETHBIT
879
880 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
881
882         * doc/sdccman.lyx: updated Highest Order Bit documentation,
883           documented Any Order Bit, Higher Order Byte and Higher Order Word
884         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
885         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
886           (optimizeGetAbit): new, to get any bit, not only the high bit,
887           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
888           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
889           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
890           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
891             RIGHT_OP: also try GETBYTE, GETWORD optimization,
892             GETABIT, GETBYTE, GETWORD: decorate them,
893           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
894           (ast_print): added GETABIT, GETBYTE, GETWORD
895         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
896         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
897           (geniCodeBinary): new generic binary icode,
898           (ast2iCode): added GETABIT, GETBYTE, GETWORD
899         * src/port.h: updated comment for PORT.hasExtBitOp
900         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
901           (genGetByte): new, to get a single byte,
902           (genGetWord): new, to get a word from a long,
903           (gen51Code): added GETABIT, GETBYTE, GETWORD
904         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
905
906 2005-09-23 Raphael Neider <rneider AT web.de>
907
908         * configure.in, configure: have device/lib/pic configured
909         * device/lib/Makefile.in: added model-pic14
910         * device/lib/clean.mk: added pic/ to clean rule
911         * device/lib/pic: added rudimentary pic14 library providing support
912           functions for multiplication/division/generic pointer access
913         * src/SDCCopt.c (convilong): mark support functions as extern
914           for pic14 port as well
915         * src/pic/gen.c (genMult): added assertions,
916           (genpic14Code): emit warning on unhandled iCodes
917         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
918         * src/pic/pcode.c (pCodeOpCopy),
919         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
920           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
921           SFR_REGISTER}), made safe for future extensions
922         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
923           instructions even if preceeded by SKIP instructions (also remove
924           them); removed unused code
925         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
926           prevents leaving parts of the structure uninitialized after copying
927
928 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
929
930         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
931           ago by me
932         * support/regression/tests/addsub.c: added test for the bug
933
934 2005-09-21 Raphael Neider <rneider AT web.de>
935
936         * device/include/pic16/pic18f1220.h,
937           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
938         * device/lib/pic16/Makefile.rules: added missing opening paren
939         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
940           are provided in genutils.c,
941           (genUminusFloat,genUminus,genCmpEq): added asserts on different
942           operand/result sizes,
943           (genCmp): assert on NULL pointers first, then check deref'ed values
944         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
945           result size
946
947 2005-09-18 Raphael Neider <rneider AT web.de>
948
949         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
950           as these are now unused,
951           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
952         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
953           local, avoids uninitialized pointer dereference on r->name
954         * src/pic16/ralloc.c (newReg): fixed indentation
955
956 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
957
958         * src/SDCCval.c (constVal): fixed bug 730366
959         * support/Util/SDCCerr.c,
960         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
961
962 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
963
964         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
965
966 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
967
968         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
969
970 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
971
972         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
973           (hex2dec): made hex_digit unsigned char, removed ascii dependance
974         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
975           (hex2dec): made hex_digit unsigned char, removed ascii dependance
976         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
977         * packihx/packihx.c (hexDigit): made c unsigned char
978         * as/mcs51/lklibr.c (fndsym),
979         * link/z80/lkgb.c (gb),
980         * link/z80/lklibr.c (fndsym),
981         * link/z80/lkrloc.c (relr),
982         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
983         * src/SDCC.lex (checkCurrFile, process_pragma),
984         * src/SDCCglue.c (spacesToUnderscores),
985         * src/SDCCmain.c (setParseWithComma, processFile),
986         * src/asm.c (tvsprintf, printCLine),
987         * src/avr/gen.c (emitcode, aopPut),
988         * src/ds390/gen.c (emitcode),
989         * src/hc08/gen.c (emitcode, emitinline),
990         * src/mcs51/gen.c (emitcode, genInline),
991         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
992           tokenizeLineNode),
993         * src/pic/ralloc.c (debugLog),
994         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
995           tokenizeLineNode),
996         * src/pic16/ralloc.c (debugLog),
997         * src/z80/main.c (_process_pragma):
998            made all ctype.h function calls safe
999         * src/SDCCopt.c: include math.h for fabs
1000         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1001           and used them throughout the code to make ctype.h function calls safe
1002         * src/ds390/main.c (asmLineNodeFromLineNode),
1003         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1004         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1005            unsigned char*
1006         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1007           (newpCodeAsmDir): made ctype.h function calls safe
1008         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1009           pic16_emitcode):  made lbp unsigned char*
1010         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1011           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1012         * src/xa51/gen.c (emitcode),
1013         * src/z80/gen.c (_emit2): made lbp unsigned char*
1014         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1015            char*
1016
1017 2005-09-05 Raphael Neider <rneider AT web.de>
1018
1019         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1020           access bank splitpoint
1021
1022 2005-09-05 Raphael Neider <rneider AT web.de>
1023
1024         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1025
1026 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1027
1028         * .version: changed to version 2.5.3
1029         * doc/sdccman.lyx: changed version to 2.5.3,
1030           documented --codeseg and --constseg and pragma codeseg and constseg,
1031           documented bit parameters (reentrant) and bit returning
1032         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1033            currFunc->recvSize, but is this ok for all ports?
1034           (ast2iCode): result of ~ on unsigned char must be cast to int for
1035            bool to work
1036         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1037           function pointers in bit space
1038         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1039           (processFuncArgs): call port.reg_parm() with reentrancy info
1040         * src/port.h,
1041         * src/avr/main.c,
1042         * src/ds390/main.c,
1043         * src/hc08/main.c,
1044         * src/pic/main.c,
1045         * src/pic16/main.c,
1046         * src/xa51/main.c,
1047         * src/z80/main.c: port.reg_parm prototype extended with
1048           "bool reentrant" parameter
1049         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1050           options.stackAuto for allocating bit register parameters
1051         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1052           (genSend): set BitBankUsed if it is,
1053           (selectRegBank): factored out of genCall for use in genPcall,
1054           (genCall): removed redundant dtype assignmen, use selectRegBank,
1055           (genPcall): handle returning in Carry properly, save in F0 if needed,
1056           (genReceive): handle bit register parameters
1057         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1058           (mcs51_assignRegisters): enable bit registers for all reentrant
1059            functions and don't set BitBankUsed unconditionally
1060         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1061         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1062         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1063
1064 2005-08-27 Borut Razem <borut.razem AT siol.net>
1065
1066         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1067         ppc-osx (Darwin) does not support -u option. It seems that it is
1068         supported only on Linux - GNU cp
1069
1070 2005-08-25 Borut Razem <borut.razem AT siol.net>
1071
1072         * sim/ucsim/gui.src/serio.src/Makefile.in,
1073           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1074           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1075           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1076           install and strip, since the strip at /usr/ccs/bin should be used
1077           on solaris
1078
1079 2005-08-24 Borut Razem <borut.razem AT siol.net>
1080
1081         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1082
1083 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1084
1085         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1086         ffffffffu
1087
1088 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1089
1090         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1091         * as/mcs51/lkmain.c (link_main): fixed warning
1092         * device/include/stdbool.h: ds390 has no advanced bit support yet
1093         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1094         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1095         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1096           and updated their macros
1097         * src/SDCCval.c (constVal): updated comment for renamed b_long
1098
1099 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1100
1101         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1102         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1103           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1104           (oprio): set priority for '['
1105         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1106            and adb_24_bit
1107         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1108         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1109         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1110         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1111           added overlayable BIT_BANK area
1112         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1113           (summary2): explain 'T' in legenda
1114         * as/mcs51/lkrloc.c: replaced old K&R style,
1115           (relr): added R_BIT processing,
1116           (errmsg): added "Bit-addressable relocation error",
1117           (adb_bit): added for converting from byte- to bit-addressable space,
1118           (adb_24_bit): added for converting from byte- to bit-addressable space
1119         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1120            used in reentrant functions now even as return value
1121         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1122         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1123           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1124         * src/SDCCglobl.h: added indicator BitBankUsed
1125         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1126            the bit registers b0-b7
1127         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1128           (geniCodeCast): fixed bug 1263853,
1129           (geniCodeLogicAndOr): put result in bool or char,
1130           (geniCodeReceive): added parameter func for accessing the return type,
1131           (geniCodeFunctionBody): pass func to geniCodeReceive
1132         * src/SDCCmain.c: added indicator BitBankUsed
1133         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1134         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1135           (checkSClass): don't put automatic bool/bit on stack,
1136           (checkFunction): removed check on function cannot return bit
1137         * src/SDCCsymt.h: added newBoolLink prototype
1138         * src/mcs51/gen.c (rb1regs): added bit registers,
1139           (movc): created for assigning to carry,
1140           (pushReg, popReg): created for pushing registers,
1141           (sameRegs): check both AOP_REG and AOP_CRY types,
1142           (aopOp): handle bit registers,
1143           (aopPut): optimization no self-assign,
1144           (saveRegisters): push reg->base (bits) only once for bit registers,
1145            and use pushReg,
1146           (unsaveRegisters): pop reg->base only once and use popReg,
1147           (assignResultValue): added parameter func and return in carry for bits,
1148           (genIpush): optimization no reload in A if not changed,
1149           (genSend): bit parameters in reentrant functions are passed in bit
1150            registers by first assigning to bits in B, then save registers and
1151            copy B to bits,
1152           (genCall): handle returning in Carry properly, save it in F0 if needed,
1153           (genPcall): updated assignResultValue call, this is not safe yet for bit
1154            returning function !!!
1155           (genFunction): don't generate equ's for bit registers and use pushReg,
1156           (genEndFunction): take care of bit returning functions and use popReg,
1157           (genRet): return bit in Carry,
1158           (genIfx): optimize bit registers and other directly addressable bits,
1159           (genReceive): updated assignResultValue call
1160         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1161           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1162            registers when using stack-auto
1163         * src/mcs51/ralloc.c (_G): added allBitregs,
1164           (regs8051): added the bit registers,
1165           (createStackSpil): use macro IS_BIT,
1166           (getRegBit): added to allocate a bit register, else spill,
1167           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1168           (updateRegUsage): factored out to ease stepping while debugging,
1169           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1170            also allocate bit registers,
1171           (fillGaps): handle bit registers,
1172           (findAllBitregs): added to create bit vector with all bit registers,
1173           (mcs51_allBitregs): returns this bit vector,
1174           (mcs51_assignRegisters): when using stack-auto use bit registers for
1175            passing parameters and creating local variables
1176         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1177
1178 2005-08-22 Borut Razem <borut.razem AT siol.net>
1179
1180         * device/lib/Makefile.in: replaced find option -or with -o
1181           to make it run on solaris
1182
1183 2005-08-22 Raphael Neider <rneider AT web.de>
1184
1185         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1186           fixes #1265442 (crash on Solaris)
1187
1188 2005-08-20 Borut Razem <borut.razem AT siol.net>
1189
1190         * configure, configure.in: added tests for libsocket and libnsl libraries,
1191           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1192           from support/regression/Makefile.in
1193         * support/regression/Makefile.in: added
1194         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1195         * sim/ucsim/libtool: regenerated on sparc-solaris
1196         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1197           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1198           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1199           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1200           sparc-solaris, which doesn't use GNU ld linker
1201         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1202         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1203
1204 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1205
1206         * src/mcs51/peeph.def: updated comments
1207
1208 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1209
1210         * device/lib/_gptrget.c,
1211         * device/lib/_gptrput.c: slightly shorter
1212         * doc/sdccman.lyx: incremented version
1213         * src/mcs51/peeph.def: moved peephole comments to the line of first
1214           change to better keep line correlation, reanimated 186.e
1215         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1216
1217 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1218
1219         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1220           David Saxton with quotes around file name.
1221
1222 2005-08-15 Borut Razem <borut.razem AT siol.net>
1223
1224         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1225           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1226           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1227           make tests run on x86_64 platform
1228
1229 2005-08-13 Raphael Neider <rneider AT web.de>
1230
1231         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1232           as it might be executed DURING a build (parallel make is wonderful)
1233
1234 2005-08-13 Raphael Neider <rneider AT web.de>
1235
1236         * device/lib/Makefile.in (port-specific-objects-pic16):
1237           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1238         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1239           dependency
1240         * device/lib/pic16/Makefile.rules: build subdirs before creating
1241           the library, removed builddir rule, create $(builddir) early in
1242           recurse rule, use empty recurse rule for leaf directories
1243         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1244           mkdir errors (race condition), removed duplicate suffix "hex"
1245           from clean rules
1246         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1247         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1248           prevents mkdir -p from aborting on Alpha
1249
1250 2005-08-12 Raphael Neider <rneider AT web.de>
1251
1252         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1253           db-statements in order to allow for arrays of pointers in code
1254           sections to be placed without interspersed 0-padding, fixes
1255           bug #1256215
1256         * (emitStatistics): fixed division by zero for pic18f1220
1257         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1258           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1259         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1260         * (pic16_pCodeConstString): keep track of already emitted string
1261           literals to prevent "duplicate definitions of symbol _str_NR"
1262         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1263           debug message
1264         * device/lib/Makefile.in: ignore failing PIC16 library builds
1265         * device/lib/pic16/Makefile: do not build if gputils are missing
1266         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1267
1268 2005-08-10 Raphael Neider <rneider AT web.de>
1269
1270         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1271           my last commit)
1272
1273 2005-08-10 Raphael Neider <rneider AT web.de>
1274
1275         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1276           Rokas' patch to add the new fixed point type "__fixed16x16"
1277         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1278           functions for __fixed16x16 arithmetics
1279         * device/lib/pic16: reimplemented the build system to support
1280           a separate build directory, better handling of libio (create
1281           the library in a separate subdir for each architecture) and
1282           easier configuration (centralized in Makefile.common)
1283
1284 2005-08-07 Raphael Neider <rneider AT web.de>
1285
1286         * src/pic16/gen.c (genrshTwo): fixed sign extension
1287         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1288         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1289           added T0CONbits
1290         * device/include/pic16/pic18f4220.h: NEW, header for
1291           pic18f4220 and pic18f4320
1292         * device/include/pic16/pic18fregs.h: added new devices,
1293           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1294         * device/include/pic16/signal.h: resolved name clashes
1295           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1296           to also allow testing for interrupt enable bits, added
1297           comments on how to use the macros
1298         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1299         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1300           register definitions for the devices
1301         * device/lib/pic16/pics.all: added new devices
1302         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1303           allocated memory
1304         * device/lib/pic16/libc/stdlib/memfree: do not count
1305           the block header as free memory
1306         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1307           simplified and added missing end-of-blocklist-marker
1308           (reported by Peter Onion, fixes #1252814)
1309         * (_mergeHeapBlock): fixed loop condition
1310         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1311           len==0, restructured code
1312         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1313           up a bit, reduced bitfield accesses, prevent endless loops
1314           in case of heap corruption
1315         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1316           "unreferenced arguments/must return a value" warnings
1317         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1318           replaced BAUDREG with SPBRG
1319         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1320           device/lib/pic16/debug/gstack/gstack.c: replaced
1321           _naked, _asm, _endasm with __naked, __asm, __endasm
1322
1323 2005-08-05 Raphael Neider <rneider AT web.de>
1324
1325         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1326           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1327
1328 2005-08-05 Borut Razem <borut.razem AT siol.net>
1329
1330         * device/lib/Makefile.in: added missing ';'
1331         * configure: removed ^M characters
1332
1333 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1334
1335         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1336           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1337           License
1338
1339 2005-08-04 Borut Razem <borut.razem AT siol.net>
1340
1341         * configure.in: pic16 libraries build 2nd try - enable running
1342           configure in device/lib/pic16
1343         * configure: regenerated from configure.in
1344         * device/lib/Makefile.in: create $(PORT)/bin directory
1345
1346 2005-08-03 Raphael Neider <rneider AT web.de>
1347
1348         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1349           to get/set values via pointers
1350         * (genUnpackBits,genPackBits): changed detection of
1351           ptr->bitfield vs. sym.bitfield, fixed access via generic
1352           pointers, removed dead (wrong) code for multibyte bitfields
1353         * (genNearPointerGet, genGenPointerGet): removed useless code,
1354           fixed bitfield detection, fixes #1250594
1355         * (genNearPointerSet): removed useless code
1356         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1357           and introduced macro pic16_emitpcode that conditionally emits
1358           the origin of the following pCode (useful for debugging SDCC)
1359         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1360         * (createDefmap): fixed handling of LFSR for --optimize-df
1361
1362 2005-08-02 Borut Razem <borut.razem AT siol.net>
1363
1364         * device/lib/Makefile.in: pic16 libraries build enabled since
1365           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1366
1367 2005-08-02 Raphael Neider <rneider AT web.de>
1368
1369         * src/pic16/gen.c (genPackBits): removed deprecated warning
1370         * (genGenPointerSet): fixed bitfield detection
1371
1372 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1373
1374         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1375
1376 2005-07-31 Raphael Neider <rneider AT web.de>
1377
1378         * device/lib/pic16/libdev/pic18f458.c,
1379           device/include/pic16/pic18f458.h: added missing T0CONbits
1380
1381 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1382
1383         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1384
1385 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1386
1387         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1388
1389 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1390
1391         * device/include/mcs51/at89c51ed2.h: added.
1392
1393 2005-07-23 Raphael Neider <rneider AT web.de>
1394
1395         * src/pic/gen.h: added emitpcode macro for debugging
1396         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1397           and replace by macro adding debug information on demand
1398         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1399         * (gencjne): tried to fix; replaced with correct (slower) code
1400         * (gen{Unp,P}ackBits): fixed single bit access
1401         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1402         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1403           previous instruction
1404         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1405           register has to be handled with care (forbidding movement
1406           of assignments/uses, removing assignments completely, ...)
1407         * (pCodeOptime2pCodes): make use of regIsSpecial
1408         * added lots of debugging output (commented out)
1409         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1410           from being reused as result UNLESS it is known to work
1411
1412 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1413
1414         * support/Util/dbuf.h: include <stddef.h> for size_t
1415         * .version: changed to version 2.5.2
1416
1417 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1418
1419         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1420
1421 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1422
1423         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1424           (genModOneByte): removed needless psha/pula
1425
1426 2005-07-22 Raphael Neider <rneider AT web.de>
1427
1428         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1429           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1430         * src/pic/gen.c (resolveIfx): do not "invent" labels
1431         * (genSkipc): changed to positive logic
1432         * (genSkipCond): removed as no longer needed
1433         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1434           backport from PIC16
1435         * (genLeftShift): check operands are in different registers
1436         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1437           INCF does not update CARRY...
1438         * src/pic/main.c: fixed _linkCmd
1439         * src/pic/pcode.c (unlinkpCode): added inactive code
1440         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1441           alive (do not assign result and operand overlapping registers)
1442
1443 2005-07-22 Raphael Neider <rneider AT web.de>
1444
1445         * src/pic/device.c (dump_sfr): replaced register declaration with
1446           call to emitSymbolToFile() to avoid duplicate symbols
1447         * (assignRelocatableRegisters): do not declare external symbols
1448         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1449           right (take size of type, not etype)
1450         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1451         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1452         * (packRegsForAccUse): disabled assignment of WREG as
1453           the result reg to prevent occurence of just fixed #1235003,
1454           fixes #1242954
1455         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1456           symbols (avoids duplicate symbols in .asm file)
1457         * (pic14emitRegularMap): use emitSymbolToFile()
1458         * src/pic/gen.c (aopOp): fixed spillLocation handling
1459         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1460         * (genDataPointerSet): removed unneccessary variables/output
1461
1462 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1463
1464         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1465         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1466
1467 2005-07-21 Raphael Neider <rneider AT web.de>
1468
1469         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1470           architecture cannot handle them efficiently, fixes bug #1235003
1471         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1472           check for empty sets before using them (fixes bug #1232190)
1473
1474 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1475
1476         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1477           (lnksect2): generate warnings for memory overlap
1478         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1479           constseg to set the name of these segments so you can instruct the linker
1480           to place them in banks
1481         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1482         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1483           added code_seg and const_seg to options
1484         * src/SDCCglue.c (emitMaps): use options.const_seg,
1485           (createInterruptVect): put interrupt vectors in segment HOME,
1486           (glue): put HOME before static segment and put the main glue in HOME,
1487           (glue): use options.code_seg
1488         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1489         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1490           these segments so you can instruct the linker to place them in banks
1491           (linkEdit): use code_loc for HOME segment which should be the first
1492           segment in code memory now
1493         * src/SDCCmem.c: fixed more stuff like bug 1238386
1494         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1495           (changePointer): don't change function pointers to code pointers for
1496           banked functions,
1497           (compareType): added exceptional check for banked function pointers
1498         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1499         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1500           after static in code memory
1501         * src/mcs51/gen.c: added aopLiteralLong prototype,
1502           (aopForSym): use getSize for functions,
1503           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1504           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1505           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1506           the segment,
1507           (genPcall): use call for literal function pointers and generate banked
1508           calls over the one trampoline so there's only one place for the user to
1509           modify according to his/hers hardware,
1510           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1511           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1512         * src/mcs51/main.c: added keyword banked,
1513           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1514         * support/Util/SDCCerr.c,
1515         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1516           needed for passing the bank and address to the trampoline
1517         * device/lib/mcs51/crtbank.asm: added for bankswitching
1518         * device/lib/mcs51/Makefile: added crtbank
1519
1520 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1521
1522         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1523           for fields at offset 0 of a struct or union as reported
1524           on 2005-07-07 in the developer mailing list.
1525
1526 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1527
1528         * src/SDCCmem.c: fixed bug 1238386
1529
1530 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1531
1532         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1533           (patch #1144962), added peephole 300, enabled 259.x
1534         * doc/sdccman.lyx: removed screenshot and provided link instead
1535
1536 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1537
1538         * doc/sdccman.lyx: added section about debugging with ddd
1539         * doc/figures/ddd_example.eps: screenshot of debugging session
1540
1541 2005-07-04 Raphael Neider <rneider AT web.de>
1542
1543         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1544           like CODE pointers, fixes #1115683
1545         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1546           call, fixes bugs #1232211, #1228110,
1547           fixed wrong casts to pCodeFlow from pCodeInstructions
1548
1549 2005-07-04 Raphael Neider <rneider AT web.de>
1550
1551         * src/pic/gen.c (popGet): changed assert to allow for
1552           bit operands
1553         * (popGetAddr): changed signature to provide
1554           an additional index, patched all call sites
1555         * (genCmpEq): handle literal-like operands correctly
1556         * (genAddrOf): added sanity checks on __code/__data pointers
1557         * (genAssign): added handling of symbols from __code section
1558         * (gencjne): do not generate code for comparisons whose result
1559           is neither stored nor used, fixes bug #1171114
1560         * (AccLsh, AccRsh): operate on operand instead of WREG
1561         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1562           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1563           by known count
1564         * rewrote complete shift-by-literal logic, commented unused
1565           functions out
1566         * (genConstPointerGet): get multiple bytes (if result size > 1),
1567           fixed handling of non-immediate addresses
1568         * (genPointerGet): handle CODE pointers like CONST pointers
1569         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1570         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1571           operand is to be treated as a literal or not
1572         * (mov2w,genPcall,genCmpEq),
1573           src/pic/genarith.c: use aop_isLitLike() to decide between
1574           literal/register contents
1575         * (addSign): added missing offset
1576         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1577           only emit comment in debug-mode,
1578           use {aop,op}_isLitLike throughout the file
1579         * src/pic/glue.c: fix initializers for pointers (work in progress)
1580         * src/pic/pcode.c (get_op): honor index on _const symbols
1581         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1582         * (dumppBlock): added pCode size estimation
1583         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1584           check for IS_SYMOP before OP_SYMBOL'ing
1585         * fixed indentation, compacted switch-statements
1586         * (allocReg): find free register and allocate it instead of
1587           allocating new registers all the time
1588         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1589           registers as its operands (necessary only for multibyte GETs)
1590
1591 2005-07-01 Raphael Neider <rneider AT web.de>
1592
1593         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1594           debugging .asm-output macros FENTRY + FEXIT
1595         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1596           way... I wonder...
1597         * (emitpComment): NEW, printf to pCode
1598         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1599           offset handling
1600         * (popGetAddr): NEW, variant of popGet to access an immediates
1601           high(er) bytes instead of the n'th byte of memory they reference,
1602           replaced popGet with popGetAddr where neccessary
1603         * (genDataPointerGet): reactivated and fixed implementation
1604         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1605           accesses
1606         * (genDataPointerSet): fixed multibyte assignments
1607         * (genpic14Code): fixed --i-code-in-asm handling
1608         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1609         * (genPlus): fixed index-out-of-bounds error
1610         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1611         * src/pic/ralloc.c: added debugging output macro FENTRY2
1612         * (spillThis): fixed indentation, enbraced for-body for clarity
1613         * (rematStr): commented out as now unused
1614         * (regTypeNum): commented out special spill case (overwrites
1615           arbitrary values)
1616         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1617
1618 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1619
1620         * doc/sdccman.lyx: documented sfr16/sfr32,
1621           added example for using storage class with function pointers
1622         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1623
1624 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1625
1626         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1627         * device/lib/_itoa.c,
1628         * device/lib/_ltoa.c: optimized codesize
1629         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1630           but don't know how to suppress the double warning.
1631         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1632         * support/Util/SDCCerr.c,
1633         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1634
1635 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1636
1637         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1638           fixed old K&R prototypes
1639         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1640         * device/lib/_gptrget.c,
1641         * device/lib/_gptrgetc.c,
1642         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1643           also new versions for small generic pointers and banked generic pointers
1644         * src/port.h: added const_name
1645         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1646         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1647         * src/SDCCcse.c (findPrevIc): check all associative operators
1648         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1649         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1650         * src/SDCCmem.c: updated comments,
1651           set far-space to 0 for pdata, results in optimized code
1652         * src/SDCCmem.h: added macro CONST_NAME
1653         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1654           moving the info into the highest bits, see also gptrget/gptrput
1655         * src/src.dsp: added sdcc.ico to project files
1656         * src/avr/gen.c (genCast): fixed bug 0x%d
1657         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1658         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1659           relation between ptr_type and DCL_TYPE,
1660           (genCast): fixed bug 0x%d
1661         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1662           (CODE)" for const_name
1663         * src/hc08/gen.c (genCast): fixed bug 0x%d
1664         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1665           (hc08_port): added "CONST (CODE)" for const_name
1666         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1667           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1668           between ptr_type and DCL_TYPE,
1669           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1670           operand* and took AOP() inside function so sfr-ness can be checked,
1671           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1672           new prototype,
1673           (genFunction, genEndFunction): optimized stack setup,
1674           (genMinus): optimized for literals with ending zeroes (in bytes),
1675           (genCast): fixed bug 0x%d
1676         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1677           (mcs51_port): added "CONST (CODE)" for const_name
1678         * src/mcs51/peeph.def: made rule 226 more generic
1679         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1680         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1681         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1682         * src/z80/main.c (z80_port): added NULL for const_name,
1683           (gbz80_port): added NULL for const_name
1684         * support/regression/tests/bug663539.c,
1685         * support/regression/tests/sfr16.c: new tests
1686
1687 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1688
1689         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1690
1691 2005-06-24 Raphael Neider <rneider AT web.de>
1692
1693         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1694           corrected typos...
1695         * device/include/pic16/signal.h: added USBIF
1696           and SIG_USB
1697
1698 2005-06-24 Raphael Neider <rneider AT web.de>
1699
1700         * device/lib/pic16/libdev/pic18f2455.c,
1701           device/include/pic16/pic18f2455.h: NEW
1702         * device/include/pic16/pic18fregs.h,
1703           device/lib/pic16/pics.all,
1704           src/pic16/device.c: added 18f2455
1705         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1706           device/include/pic16/{pic18f[68][567].h,usart.h}:
1707           replaced MULTIPLE_USARTS define with more relaible
1708           compatibility sfrs (for USART access)
1709
1710 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1711
1712         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1713           and the output asm file line is printed on two lines.
1714
1715 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1716
1717         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1718           BGT, BLE, BHI, and BLS instructions
1719         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1720           genCmpEq): removed
1721         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1722           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1723           fixes bug #1216342
1724         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1725
1726 2005-06-15 Raphael Neider <rneider AT web.de>
1727
1728         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1729         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1730         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1731           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1732           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1733
1734 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1735
1736         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1737           Marcel Telka in bug #1215704
1738
1739 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1740
1741         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1742           located in shared memory bank.
1743
1744 2005-05-31 Raphael Neider <rneider AT web.de>
1745
1746         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1747           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1748           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1749
1750 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1751
1752         * device/lib/_strncpy.c: fixed the fix
1753
1754 2005-05-26 Raphael Neider <rneider AT web.de>
1755
1756         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1757           initializers with \0, bug #1208187
1758         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1759           intializers with \0, bug #1208187
1760
1761 2005-05-26 Raphael Neider <rneider AT web.de>
1762
1763         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1764           initializers with \0, bug #1208187
1765         * src/pic16/main.c (_process_pragma): added sanity checks
1766           for stack position and size, emit warnings when appropriate
1767
1768 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1769
1770         * device/lib/_strncpy.c: fixed not filling with \0
1771
1772 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1773
1774         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1775           createFunction),
1776         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1777           compound_statement),
1778         * src/SDCCsymt.h,
1779         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1780
1781 2005-05-24 Raphael Neider <rneider AT web.de>
1782
1783         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1784
1785 2005-05-24 Raphael Neider <rneider AT web.de>
1786
1787         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1788           TRISE definitions, closes bug #1162453
1789
1790 2005-05-22 Raphael Neider <rneider AT web.de>
1791
1792         * src/pic16/main.c (_process_pragma): check for missing
1793           arguments to pragmas code and udata
1794         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1795           consistency fixes to match other headers (thanks to Jim Paris)
1796         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1797
1798 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1799
1800         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1801
1802 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1803
1804         * support/regression/tests/bug1198642.c: new test
1805         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1806         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1807         * support/scripts/resource.h,
1808         * support/scripts/resource.rc,
1809         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1810         * support/scripts/sdcc.ico: added 32x32 icon
1811
1812 2005-05-18 Raphael Neider <rneider AT web.de>
1813
1814         * device/lib/pic16/libdev/pic18f*.c,
1815         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1816           keywords to "__sfr" and "__at (X)"
1817         * device/include/pic16/pic18fregs.h: added pic18f4520
1818         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1819           #1203088 (MPLAB compatibility)
1820
1821 2005-05-17 Raphael Neider <rneider AT web.de>
1822
1823         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1824         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1825         * device/lib/pic16/pics.all: added new devices
1826         * src/pic16/device.c: added support for pic18f4520
1827
1828 2005-05-16 Raphael Neider <rneider AT web.de>
1829         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1830         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1831         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1832           convenience function for bit access
1833
1834 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1835
1836         * device/lib/printf_large.c: fixed bug 1193299
1837         * support/regression/tests/bug1057979.c: added test %3.3s
1838
1839 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1840
1841         * device/include/mcs51/8051.h,
1842         * device/include/mcs51/8052.h: made parseable with lint
1843         * device/include/mcs51/lint.h: added include file for (sp)lint
1844         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1845         * doc/cdbfileformat.lyx,
1846         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1847
1848 2005-05-14 Raphael Neider <rneider AT web.de>
1849
1850         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1851         * device/lib/pic16/libc/stdlib/itoa.c (new)
1852         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1853         * device/lib/pic16/libio/Makefile: exclude subdir according to
1854           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1855         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1856         * src/pic16/gen.c (genFunction): prevent annoying warning
1857         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1858           nameclashes on BeOS
1859         * support/cpp2/cppmain.c (cpp_output_string): new
1860         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1861           fixes bug 1116802
1862
1863 2005-05-13 Borut Razem <borut.razem AT siol.net>
1864
1865         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1866
1867 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1868
1869         * .version: changed to version 2.5.1; back to bleeding edge development
1870
1871 2005-05-11 Borut Razem <borut.razem AT siol.net>
1872
1873         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1874           generate PDF version 1.3 documents
1875
1876 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1877
1878         * .version: changed to version 2.5.0
1879
1880 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1881
1882         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1883
1884 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1885
1886         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1887         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1888         well as many smaller updates.
1889         * .version: changed to version 2.5.0-pre1
1890
1891 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1892
1893         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1894
1895 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1896
1897         * support/regression/tests/bug1185672.c: added
1898         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1899           bug 1185672
1900         * src/mcs51/gen.c (genCall): added comments, made it look safer
1901         * src/mcs51/gen.c (genEndFunction): simplified
1902
1903 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1904
1905         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1906
1907 2005-04-14 Borut Razem <borut.razem AT siol.net>
1908
1909         * fixed bug 1045046 - SIGSEGV with really simple code?:
1910           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1911           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1912
1913 2005-04-14 Borut Razem <borut.razem AT siol.net>
1914
1915         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1916           src/pic16/device.h: temporarily disabled experimental #inline pragma
1917           for 2.5.0 release
1918
1919 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1920
1921         * device/include/z80/stdio.h,
1922         * device/include/z80/string.h: removed these highly incomplete files so
1923           SDCC can use the default ones in device/include/
1924
1925 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1926
1927         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1928         gcc warning.
1929         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1930         fix sdcpp warnings.
1931
1932 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1933
1934         * device/include/malloc.h: removed redundant __reentrant prototypes
1935         * device/lib/_mullong.c: added working xstack variant in asm (C version
1936           doesn't pass regression tests)
1937         * device/lib/bpx.c: used __data and made bpx char for mcs51
1938         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1939           (createFunction): fixed bug with xstackPtr
1940         * src/SDCCcse.c: corrected comments
1941         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1942           (killDeadCode, eBBlockFromiCode): removed unused code
1943         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1944           corrected comments
1945         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1946           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1947           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1948           (genModOneByte): fixed warning in MSVC
1949         * src/mcs51/main.c (): added comments
1950         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1951
1952 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1953
1954         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1955
1956 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1957
1958         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1959
1960 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1961
1962         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1963         characters arrays of larger size than the declared one.
1964
1965 2005-04-10 Borut Razem <borut.razem AT siol.net>
1966
1967         * src/pic/gen.c (genInline),
1968           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1969           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1970           (findNextInstruction), (findPrevInstruction),
1971           (findInstructionUsingLabel),
1972           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1973         * src/pic/pcode.c (findLabel): added missing '\n'
1974         * src/src.dsp: added SDCCdwarf2.c to the project
1975
1976 2005-04-09 Borut Razem <borut.razem AT siol.net>
1977
1978         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1979
1980 2005-04-08 Raphael Neider <rneider AT web.de>
1981
1982         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1983           into the chain after a given one) and mergeDefmapSymbols (combine
1984           defmap entries for each symbol per pcode)
1985         * (createDefmap): have defmap entries merged in the end
1986         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1987           a symbol before replacing one access type's symbol, merge symbols in
1988           the end (replacement symbol might already have an entry)
1989         * (assignValnums): keep reference to written WREG intact
1990
1991 2005-04-08 Raphael Neider <rneider AT web.de>
1992
1993         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1994           Alpha)
1995
1996 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1997
1998         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1999         bytes
2000
2001 2005-04-07 Raphael Neider <rneider AT web.de>
2002
2003         * device/include/pic16/usart.h: added compatibility defines for
2004           devices with more than one USART
2005         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2006
2007 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2008
2009         * device/lib/Makefile.in: updated for port specific include
2010
2011 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2012
2013         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2014
2015 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2016
2017         * device/include/8051.h,
2018         * device/include/8052.h,
2019         * device/include/at89S8252.h,
2020         * device/include/at89c55.h,
2021         * device/include/at89x051.h,
2022         * device/include/at89x51.h,
2023         * device/include/at89x52.h,
2024         * device/include/mcs51reg.h,
2025         * device/include/reg51.h,
2026         * device/include/reg764.h,
2027         * device/include/regc515c.h,
2028         * device/include/sab80515.h: (re)moved these 12 files
2029         * device/include/mcs51/8051.h,
2030         * device/include/mcs51/8052.h,
2031         * device/include/mcs51/at89S8252.h,
2032         * device/include/mcs51/at89c55.h,
2033         * device/include/mcs51/at89x051.h,
2034         * device/include/mcs51/at89x51.h,
2035         * device/include/mcs51/at89x52.h,
2036         * device/include/mcs51/mcs51reg.h,
2037         * device/include/mcs51/reg51.h,
2038         * device/include/mcs51/reg764.h,
2039         * device/include/mcs51/regc515c.h,
2040         * device/include/mcs51/sab80515.h: and added them here
2041
2042 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2043
2044         * device/include/stdarg.h: changed SDCC specific keywords to double
2045           underlined form.
2046         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2047           mcs51 and ds390.
2048         * device/include/hc08/mc68hc908gp32.h,
2049         * device/include/hc08/mc68hc908jb8.h,
2050         * device/include/hc08/mc68hc908jkjl.h,
2051         * device/include/hc08/mc68hc908qy.h: fixed comments
2052         * device/include/mcs51/README: updated
2053         * device/include/mcs51/c8051f120.h: added PINRSF
2054         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2055         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2056           amidst code. Also inline is not supported.
2057
2058 2005-04-06 Raphael Neider <rneider AT web.de>
2059
2060         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2061         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2062           callers stack/frame pointers
2063
2064 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2065
2066         * device/include/pic16/usart.h: added, missing in previous commit,
2067         * device/include/pic16/adc.h: fixed typo,
2068         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2069         commit,
2070         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2071         <p18fxxx.inc>
2072         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2073         uninitialized because a bug appears with gplink
2074         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2075         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2076         complains for unrecognised option
2077
2078 2005-04-05 Raphael Neider <rneider AT web.de>
2079
2080         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2081           structs as well (using memcpy)
2082         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2083           on ISRs (GOTO has no label)
2084         * src/pic16/device.h: added OF_OPTIMIZE_DF
2085         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2086           new data flow analysis/optimization
2087         * src/pic16/pcode.c: added (prototypes for and implementation of)
2088           dataflow analysis functions, fixed pCodeInstructions' inCond and
2089           outCond values, made RCALL a branch instruction
2090         * (pic16_unlinkpCode): keep C line if possible
2091         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2092           C line moved if possible
2093         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2094         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2095           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2096         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2097           new flow)
2098         * (pic16_getJumptabpCode): NEW, needed in...
2099         * (LinkFlow): fixed handling of jumptables, calls and conditional
2100           branches
2101         * (pic16_InsertCommentAfter): NEW
2102         * (pic16_pCodeReplace): made verbose and flow preserving
2103         * (AnalyzeFlow): added call to data flow analysis
2104         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2105         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2106         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2107
2108 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2109
2110         * src/SDCCast.c (decorateType): fixed bug #1105626
2111
2112 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2113
2114         * device/include/asm/pic16/features.h,
2115         * pic18f*.h headers,
2116         * device/include/pic16/adc.h,
2117         * device/include/pic16/delay.h,
2118         * device/include/pic16/i2c.h,
2119         * device/include/pic16/malloc.h,
2120         * device/include/pic16/stdio.h,
2121         * device/include/pic16/stdlib.h,
2122         * device/include/pic16/string.h,
2123         * device/lib/pic16/libc/stdio/printf_tiny.c,
2124         * device/lib/pic16/libc/stdio/printf_small.c,
2125         * device/lib/pic16/libc/stdio/strmgpsim.c,
2126         * device/lib/pic16/libc/stdio/strmmssp.c,
2127         * device/lib/pic16/libc/stdio/strmusart.c,
2128         * device/lib/pic16/libc/stdio/vfprintf.c,
2129         * device/lib/pic16/libc/stdlib/ltoa.c,
2130         * device/lib/pic16/libc/stdlib/putchar.c,
2131         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2132         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2133         * device/lib/pic16/libc/stdlib/memchrram.c,
2134         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2135         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2136         * device/lib/pic16/libio/adc/adcbusy.c,
2137         * device/lib/pic16/libio/adc/adcread.c,
2138         * device/lib/pic16/libio/adc/adcsetch.c,
2139         * device/lib/pic16/libio/usart/ubaud.c,
2140         * device/lib/pic16/libio/usart/ubusy.c,
2141         * device/lib/pic16/libio/usart/udrdy.c,
2142         * device/lib/pic16/libio/usart/uopen.c,
2143         * device/lib/pic16/libio/usart/uputc.c,
2144         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2145         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2146         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2147         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2148         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2149         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2150         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2151         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2152         specific keywords to double underlined form,
2153         * device/lib/pic16/libc/Makefile.rules,
2154         * device/lib/pic16/libsdcc/Makefile.rules,
2155         * device/lib/pic16/libm/Makefile,
2156         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2157         to compile with C standard set in Makefile.common
2158         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2159         rand.c and crc.c in compilation process,
2160         * device/lib/pic16/libsdcc/int/divuint.c,
2161         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2162         `c' from signed to unsigned,
2163         * device/lib/pic16/startup/crt0.c,
2164         * device/lib/pic16/startup/crt0i.c,
2165         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2166         keywords to double underlined form, bug fixes in _do_cinit function
2167         which prevented the correct initialization of the .idata segment,
2168         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2169         core to enter a infinite loop
2170         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2171
2172 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2173
2174         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2175
2176 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2177
2178         * device/include/Makefile.in: add support for hc08 subdirectory
2179         * device/include/hc08/: new subdirectory
2180         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2181         Lucas Loizaga, thanks!
2182         * device/include/hc08/mc68hc908qy.h,
2183         * device/include/hc08/mc68hc908gp32.h,
2184         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2185         their own directory. Changed internal macro names to use the compiler
2186         reserved namespace. Changed SDCC specific keywords to double
2187         underlined form.
2188         * device/include/math.h,
2189         * device/include/malloc.h,
2190         * device/include/stdarg.h,
2191         * device/include/stdbool.h
2192         * device/include/string.h,
2193         * device/include/tinibios.h,
2194         * device/include/ds400rom.h,
2195         * device/include/8051.h,
2196         * device/include/8052.h,
2197         * device/include/80c51xa.h,
2198         * device/include/at89c55.h,
2199         * device/include/at89S8252.h,
2200         * device/include/at89x51.h,
2201         * device/include/at89x52.h,
2202         * device/include/ds80c390.h,
2203         * device/include/reg764.h,
2204         * device/include/regc515c.h,
2205         * device/include/sab80515.h,
2206         * device/include/mcs51/c8051f000.h,
2207         * device/include/mcs51/c8051f018.h,
2208         * device/include/mcs51/c8051f020.h,
2209         * device/include/mcs51/c8051f040.h,
2210         * device/include/mcs51/c8051f060.h,
2211         * device/include/mcs51/c8051f120.h,
2212         * device/include/mcs51/c8051f300.h,
2213         * device/include/mcs51/c8051f310.h,
2214         * device/include/mcs51/c8051f320.h,
2215         * device/include/mcs51/c8051f330.h,
2216         * device/include/mcs51/c8051f350.h,
2217         * device/include/z180.h: Changed SDCC specific keywords to double
2218         underlined form.
2219
2220 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2221
2222         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2223         18F4455,
2224         * (pic16_assignConfigWordValue): disable testing of configuration
2225         register value with config mask,
2226         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2227         function with port->fun_prefix,
2228         * (genFunction): when generating a naked interrupt function never
2229         create an absolute segment placed in interrupt vector address, place
2230         the actual interrupt function at IVA instead, when an interrupt
2231         function is generated with unspecified interrupt then do not create
2232         the absolute section,
2233         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2234         code for generating a call to generic pointer get/put function with
2235         a call to function pic16_callGenericPointer(),
2236         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2237         the call to the generic pointer get/put functions with prefixing the
2238         function name with port->fun_prefix,
2239         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2240         * src/pic16/main.c (_process_pragma): prefix function with
2241         port->fun_prefix,
2242         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2243         calling assembler, old 18Fxxxx macro is deprecated,
2244         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2245         PC_ASMDIR in while condition,
2246         * (findInstruction): add PC_ASMDIR in while condition,
2247         * (buildCallTree): prefix main with port->fun_prefix,
2248         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2249         identifier for variable with banked access in instructions BTFSS,
2250         BTFSC, BCF, BSF, BTG
2251         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2252         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2253         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2254         perform optimization when enviroment variable NO_REG_OPT is set,
2255         * (insideLRBlock): NEW, return 1 if register is inside an
2256         INF_LOCALREGS block,
2257         * (RemoveRegFromLRBlock): remove a register that is completely
2258         eliminated by register optimization, but it is still left in local
2259         register store/restore in/from stack block,
2260         * (Remove2pcodes): after removing register, check to see if it
2261         should be removed from local register store/restore in/from stack
2262         block,
2263         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2264         DUMMY_READ_VOLATILE,
2265
2266         * device/include/pic16/adc.h: minor prototype modifications and
2267         update,
2268         * device/include/pic16/malloc.h: added GPL notice various
2269         modifications,
2270         * device/include/pic16/stdint.h: NEW, standard header for ints
2271         * device/include/pic16/delay.h: NEW, header for delay functions,
2272         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2273         delay1mtcy,
2274         * device/include/pic16/signal.h: NEW, header providing helper macros
2275         for implementing signal handlers,
2276         * device/include/pic16/stdio.h: added prototypes for functions,
2277         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2278         prototypes for stdin and stdout, added macro PUTCHAR to
2279         automatically implement putchar function prototype,
2280         * device/include/pic16/usart.h: modified and updated USART library,
2281         * device/lib/pic16/libio/adc/,
2282         * device/lib/pic16/libio/i2c: some modifications to improve library
2283         performance,
2284         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2285         family of functions,
2286         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2287         family of functions and other sources,
2288         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2289         of the PIC18Fxx[28] devices,
2290         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2291         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2292         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2293         _do_cinit function, because the previous failed when local variables
2294         where not placed in the same memory bank,
2295         * device/lib/pic16/libsdcc/char/: various modifications to improve
2296         library performance,
2297         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2298         information on the new functions of the c library and more...
2299
2300 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2301
2302         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2303
2304 2005-03-26 Raphael Neider <rneider AT web.de>
2305
2306         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2307           if condition == CARRY)
2308         * (genCmp): adapted to new genSkipc semantics
2309         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2310           on rIfx (genCmp was broken)
2311
2312 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2313
2314         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2315         * src/z80/main.c (_keywords[]),
2316         * src/SDCCglobal.h (struct options),
2317         * src/SDCC.y,
2318         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2319         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2320         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2321         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2322         always available in leading double underscore form. The C99 support is
2323         mostly missing, but it's a start.
2324         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2325         reserved identifier "__data".
2326
2327 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2328
2329         * src/mcs51/peeph.def: fixed bug 1170013
2330
2331 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2332
2333         * device/include/mcs51reg.h: fixed bug 842007
2334
2335 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2336
2337         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2338         last time.
2339
2340 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2341
2342         * src/port.h (struct PORT),
2343         * src/avr/ralloc.c (avr_assignRegisters),
2344         * src/avr/main.c,
2345         * src/ds390/ralloc.c (ds390_assignRegisters),
2346         * src/ds390/main.c,
2347         * src/hc08/ralloc.c (hc08_assignRegisters),
2348         * src/hc08/main.c,
2349         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2350         * src/mcs51/main.c,
2351         * src/pic/ralloc.c (pic14_assignRegisters),
2352         * src/pic/main.c,
2353         * src/pic16/ralloc.c (pic16_assignRegisters),
2354         * src/pic16/main.c,
2355         * src/xa51/ralloc.c (xa51_assignRegisters),
2356         * src/xa51/main.c,
2357         * src/z80/ralloc.c (z80_assignRegisters),
2358         * src/z80/ralloc.h,
2359         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2360         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2361         * src/SDCCcse.h,
2362         * src/SDCCdflow.c (computeDataFlow),
2363         * src/SDCCdflow.h,
2364         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2365         * src/SDCCloop.h,
2366         * src/SDCCcflow.c (*),
2367         * src/SDCCcflow.h,
2368         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2369         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2370         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2371         immedDom() returning wrong block; probably fixes bug #1160833)
2372
2373 2005-03-20 Borut Razem <borut.razem AT siol.net>
2374
2375         * support/scripts/inc2h.pl: WIN32 port
2376
2377 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2378
2379         * device/lib/makefile.in: added abs.c and labs.c
2380
2381 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2382
2383         * device/include/stdint.h: added
2384         * device/lib/abs.c: added
2385         * device/lib/labs.c: added
2386         * device/include/stdlib.h: added abs() and labs() prototypes
2387         * device/lib/libsdcc.lib: added abs and labs
2388         * device/include/float.h,
2389         * device/lib/_fsmul.c,
2390         * device/lib/printf_fast.c,
2391         * device/lib/printf_tiny.c: updated comments
2392
2393 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2394
2395         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2396         bug #1164313
2397
2398 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2399
2400         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2401         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2402
2403 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2404
2405         * device/lib/printf_large.c: removed inline assembly for portability and
2406           readability. Use printf_fast if speed or size are more important.
2407         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2408         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2409
2410 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2411
2412         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2413         prevent compiler warning
2414
2415 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2416
2417         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2418         moved to level 0 and declared as static. Also they are explicit
2419         placed in access bank. This was necessery because some times they
2420         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2421         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2422         optimizations. Currently only compare to unsigned char is implemented,
2423         * src/pic16/gen.c: added fReturnIdx array,
2424         * (struct resolvedIfx) is moved to gen.h and made public,
2425         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2426         * (aopForSym): added an optimization to directly store in stack of
2427         the operand of a SEND iCode,
2428         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2429         but as registers instead (AOP_REG) using the fReturnIdx array,
2430         * (pic16_freeAsmop): remove the freed register from the
2431         _G.sregsAlloc field,
2432         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2433         a compare of 'WREG',
2434         * (pic16_popGetTempRegCond): changed function prototype, now
2435         function takes also a bitVector argument v which holds the current
2436         set of registers that are allocated for stack access by aopForSym,
2437         registers allocated in aopForSym for accessing stack symbols are not
2438         any more part of the functions usedRegs field,
2439         * (genCall): some times aopOp is called for a stack variable to be
2440         send, aopForSym might perform the push, if this is true make sure
2441         that genCall doesn't push the variable twice by testing _G.resDirect,
2442         * (genFunction): changed testing for unspecified interrupt number
2443         from 256 to INTNO_UNSPEC,
2444         * modified selection scheme of frame pointer generation. Previously
2445         if function did use local registers a frame pointer was generated,
2446         now a frame pointer is generated only if function has arguments
2447         (that need PLUSW2 register access), or has stack arguments, or the
2448         compiler is not instructed to omit the frame pointer,
2449         * (genEndFunction): before restoring local registers that were saved
2450         in the function preamble, also restore the registers that *might*
2451         have been allocated for stack access,
2452         * (genRet): removed some old comments,
2453         * (genCmp, the active (RN's) version): added a call to the
2454         pic16_genCmp_special function to perform the compare with a more
2455         robust and optimized way,
2456         * (genInline): a feature has been added in inline code generation,
2457         which allows a wildcard variable substitution when writing inline
2458         assembly. Code is incomplete and experimental therefore undocumented,
2459         * (genCast): changed order of aopOp for result and right to allow
2460         aopForSym to directly load the result if possible,
2461         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2462         perform an optimized compare on some selected special occasions,
2463         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2464         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2465         generate an IVT any more,
2466         * src/pic16/main.c (pic16_optionsTable): added command line option
2467         --optimize-cmp,
2468         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2469         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2470         macros,
2471         * src/pic16/NOTES: Raphael Neider added in list of active developers
2472         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2473         jumptable_end to prevent bug #,
2474         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2475         inCond and outCond fields,
2476         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2477         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2478         turn off register spilling,
2479         * (packRegsForOneUse): synced with other ports' versions although it
2480         is not used currently,
2481         * (pic16_packRegisters): added an optimization while reading
2482         structure bitfields, some registers may be saved (malloc code is
2483         decreased by 80 bytes)
2484
2485 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2486
2487         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2488         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2489         this can be optimized more?
2490
2491 2005-03-10 Raphael Neider <rneider AT web.de>
2492
2493         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2494           genNearPointerGet): (hopefully) fixed access to bitfields via
2495           pointers (p->bitN = x; and x = p->bitN; failed)
2496
2497 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2498
2499         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2500
2501 2005-03-09 Raphael Neider <rneider AT web.de>
2502
2503         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2504
2505 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2506
2507         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2508         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2509           (regTypeNum): set REG_BIT type if necessary
2510         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2511         * support/regression/tests/critical.c: check bug 1144613
2512
2513 2005-03-02 Raphael Neider <rneider AT web.de>
2514
2515         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2516
2517 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2518
2519         * src/avr/ralloc.c (serialRegAssign),
2520         * src/ds390/ralloc.c (serialRegAssign),
2521         * src/hc08/ralloc.c (serialRegAssign),
2522         * src/mcs51/ralloc.c (serialRegAssign),
2523         * src/pic/ralloc.c (serialRegAssign),
2524         * src/pic16/ralloc.c (serialRegAssign),
2525         * src/xa51/ralloc.c (serialRegAssign),
2526         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2527
2528 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2529
2530         * src/SDCCast.c (decorateType): fixed bug 1124787
2531
2532 2005-02-20 Hubert Sack <sack AT digiplan.de>
2533         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2534
2535         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2536         patch #1121755
2537
2538 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2539
2540         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2541         to keep the correct label reference count when adding/removing references
2542         to labels. A peephole file using this is appended to patch #1144962.
2543
2544 2005-02-14 Raphael Neider <rneider AT web.de>
2545
2546         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2547         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2548         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2549           retrievals of result operand's value on assignment
2550
2551 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2552
2553         * device/include/pic16/string.h: modified prototype for memccpy()
2554         to memccpy(void *, void *, char, size_t)
2555         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2556         check whether to omit frame pointer or not,
2557         * (genInline): convert all occurences of "\n" to LF in inline
2558         assembler blocks, this helps formatting the inline text,
2559         * (pic16_loadFSR0): modified prototype,
2560         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2561         removed some 8051 legacy code,
2562         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2563         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2564         before allocating temporary registers in functions,
2565
2566 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2567
2568         * support/regression/tests/bitvars.c: corrected the "fix"
2569
2570 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2571
2572         * support/regression/tests/bitvars.c,
2573         * support/regression/tests/bitwise.c,
2574         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2575
2576 2005-02-10 Raphael Neider <rneider AT web.de>
2577
2578         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2579           different size for Alpha
2580         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2581
2582 2005-02-09 Raphael Neider <rneider AT web.de>
2583
2584         * src/SDCC.lex(doPragma) : save and restore warning options as well
2585           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2586         * have #pragma less_pedantic set the errorlevel to WARNING
2587           (fixes #1117001)
2588         * (cloneOptimize) : fixed wrong malloc's size
2589         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2590           facilitate correct handling of #pragma (save|restore)
2591
2592 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2593
2594         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2595
2596 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2597
2598         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2599
2600 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2601
2602         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2603
2604 2005-02-02 Raphael Neider <rneider AT web.de>
2605
2606         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2607         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2608         * (pic16_storeForReturn): fixed to allow returning function pointers
2609         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2610         * device/include/pic16/{stddef.h,stdbool.h}: added
2611
2612 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2613
2614         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2615
2616 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2617
2618         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2619         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2620          appeared to be required
2621
2622 2005-01-31 Borut Razem <borut.razem AT siol.net>
2623
2624         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2625           include/mcs51 and include/z80 directories to the package
2626
2627 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2628
2629         * src/hc08/gen.c (genFunction): fixed bug #1112752
2630
2631 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2632
2633         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2634
2635 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2636
2637         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2638
2639 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2640
2641         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2642
2643 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2644
2645         * device/include/c8051fxxx.h: removed these 6 files
2646         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2647
2648 2005-01-26 Raphael Neider <rneider AT web.de>
2649
2650         * src/pic16/gen.c (genAssign): fixed assignment from longs
2651           in codespace (were cut to three bytes)
2652         * (genDummyRead): implemented (except for CODESPACE...),
2653           fixed bug #1108575
2654         * src/pic16/glue.c (emitStatistics): beautified
2655         * device/lib/pic16/libm/Makefile: added include path
2656
2657 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2658
2659         * src/z80/gen.c (aopPut): fixed bug #1103902
2660
2661 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2662
2663         * device/lib/expf.c: fixed bug #1095792
2664
2665 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2666
2667         * device/lib/pic16/libm: added Math library sources
2668
2669 2005-01-24 Raphael Neider <rneider AT web.de>
2670
2671         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2672           to enable upcast to pCodeOpReg2 (there is no type tag to
2673           differenciate the two and pic16_popGet2p cast into PCOR2)
2674         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2675           (sizeof(sectNames) changed to sizeof(sectName))
2676           Both patches fix segfaults under MinGW.
2677
2678 2005-01-23 Raphael Neider <rneider AT web.de>
2679
2680         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2681           Safe_[mc]?alloc()'ed variables
2682         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2683           of (byte sized) temporaries (assign them to WREG for now)
2684         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2685           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2686           this might fix SIGSEGVs on MinGW...
2687         * src/SDCCopt.c (killDeadCode): restored original behaviour
2688           (volatile operands might get thrown away though)
2689
2690 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2691
2692         * src/pic16/gen.c: fixed bug #1106975,
2693         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2694         pointer update, INTCON is saved, global interrupts are disabled and
2695         restored after updateing TOS.
2696         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2697         * added function attribute 'shadowregs' to take advantage of shadow
2698         registers,
2699         * added function attribute 'wparam' as an alternative to the wparam
2700         pragma,
2701         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2702         user declares a non-ISR function as 'shadowregs',
2703         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2704
2705 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2706
2707         * .version: bumped version number to 2.4.8
2708         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2709         pic16 port,
2710         * device/lib/pic16/libio/i2c/: I2C module support library,
2711         * device/include/pic16/i2c.h: I2C support library header,
2712         * device/lib/pic16/libc/stdio/: standard IO support sources,
2713         * (printf_small.c): printf_small() source, supports float print,
2714         * (printf_tiny.c): printf_tiny() source, does not support floats,
2715         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2716         enable global optimizations for entire library source, other
2717         Makefiles in the source tree are also modified to reflect this,
2718         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2719         function,
2720         * doc/sdccman.lyx: updated to reflect new changes,
2721         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2722         sym->onStack if-case,
2723         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2724         sbit, idata, _idata, xdata, _xdata,
2725         * added pragma library, to link an external library, (see doc),
2726         * removed command line options, --pomit-config-words, --pomit-ivt,
2727         --pleave-reset-vector,
2728         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2729         when calling assembler to reflect memory model used, also define
2730         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2731         reflect stack model used,
2732         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2733         on stack return NULL,
2734
2735 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2736
2737         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2738           of the operands is volatile. Fixes #1020220
2739
2740 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2741
2742         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2743         * (OptimizeRegUsage): make sure that there is really no other flow where
2744           the first pCode is used
2745
2746 2005-01-22 Raphael Neider <rneider AT web.de>
2747
2748         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2749           to fix #1106967 (pCode->seq are not set up correctly)
2750
2751 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2752
2753         * src/SDCCglue.c (glue): make sure code area is declared before the
2754         static initialization area.
2755
2756 2005-01-21 Raphael Neider <rneider AT web.de>
2757
2758         * device/lib/Makefile.in: fixed test for pic16 install dir
2759         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2760           optimizations
2761         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2762           added --optimize-goto compiler switch and pragma wparam documentation
2763         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2764         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2765           and PRODH closing bug #1071770 (peephole optimizer)
2766
2767 2005-01-19 Raphael Neider <rneider AT web.de>
2768
2769         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2770           cmdLine buffers (used when calling sdcpp...) are large enough
2771           (MAX_PATH=256 truncates arguments leading to system halts when
2772           used in MinGW...)
2773         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2774         * (genUminus): rewritten to for efficiency
2775         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2776           used uninitialized in some cases)
2777         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2778           copy the third byte from the int -- now assumes 0x80 (data memory)
2779         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2780           operands (genAddLit expects the iCode's operands to swapped as
2781           well), fixed leftover bytes (crashed for short left operands)
2782         * (pic16_genMinusDec): performance improvements, removed false
2783           PIC14 emitSKPNCs
2784         * (pic16_genMinus): fixed to cope with differently sized operands
2785         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2786           for --obanksel > 1
2787         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2788         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2789           new banksel optimization
2790         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2791           analysis for temporary registers (segfaults...)
2792         * src/pic16/peeph.def: added rule
2793
2794 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2795
2796         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2797         which converts a float number to its ASCII representation
2798         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2799         functions to convert the fractional and integer part of a float to ASCII,
2800         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2801         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2802         ram
2803         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2804         _STATMEM macros,
2805         * device/include/pic16/adc.h: added GPL info,
2806         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2807         a pCodeOp as tested operand,
2808         * (genNearPointerGet): optimized bit testing, does not use
2809         intermediate register for bit value, test directly instead with
2810         BTFSS, BTFSC, works only for single bits,
2811         * (genpic16Code): dump the name of the iCode in the asm,
2812         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2813         renamed to pic16_decodeOp,
2814         * (serialRegAssign): do not allocate a temporary register for iCode
2815         sequences that test a single bit for 1/0
2816
2817 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2818
2819         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2820         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2821         access stack and frame pointers. They are initially assigned to
2822         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2823         accessing SFRs. Updated all occurences of modification of stack or
2824         frame pointer in gen.c and pcode.c,
2825         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2826         assigning of a literal value to pointers,
2827         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2828         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2829         selected
2830
2831 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2832
2833         * doc/sdccman.lyx: update documentation about stack pragma, added
2834         some info for stack memory models
2835
2836 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2837
2838         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2839
2840 2005-01-08 Raphael Neider <rneider AT web.de>
2841
2842         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2843           udata sections to fix bug #1097823
2844
2845 2005-01-05 Raphael Neider <rneider AT web.de>
2846
2847         * src/pic16/gen.c (genGenericShift): added handling of differently
2848           sized left operand and result
2849
2850 2005-01-04 Raphael Neider <rneider AT web.de>
2851
2852         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2853         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2854           to hold the condition bit)
2855         * added new version of genCmp (old code available via #define)
2856         * added new version of genShiftLeft/genShiftRight in a generic
2857           way, now supports shifting by negative values
2858         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2859           shiftCount (expected by genGenericShift)
2860         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2861         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2862           dump
2863         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2864           is an invalid literal too...)
2865
2866 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2867
2868         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2869         from Raphael Neider,
2870         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2871         for 8-bit literals. This fixes some literal operands which are sign
2872         extended to 16-bits ints when instruction needs only 8-bits.
2873
2874 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2875
2876         * device/lib/logf.c: added mcs51 assembly version
2877         * device/lib/expf.c: added mcs51 assembly version
2878         * device/lib/_logexpf.c: new shared asm code for expf and logf
2879         * device/include/math.h: add defines for assembly math library
2880         * device/lib/Makefile.in: build new _logexpf.c
2881         * device/lib/libfloat.lib: use new _logexpf.c
2882
2883 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2884
2885         * src/pic/device.c
2886         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2887           device types which have less than 0x7f registers.
2888
2889 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2890
2891         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2892
2893 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2894
2895         * device/lib/printf_fast.c: only build on supported arch.
2896         * device/lib/printf_tiny.c: only build on supported arch.
2897         * device/lib/printf_fast_f.c: only build if asm float lib
2898         * device/lib/_fsget1arg.c: only build if asm float lib
2899         * device/lib/_fsget2args.c: only build if asm float lib
2900         * device/lib/_fsnormalize.c: only build if asm float lib
2901         * device/lib/_fsreturnval.c: only build if asm float lib
2902         * device/lib/_fsrshift.c: only build if asm float lib
2903         * device/lib/_fsswapargs.c: only build if asm float lib
2904         * device/include/stdio.h: don't provide print_fast,
2905           print_fast_f, print_tiny prototypes if --xstack used
2906
2907 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2908
2909         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2910         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2911           to the SOURCES
2912
2913 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2914
2915         * device/lib/printf_fast_f.c: same as printf_fast, but
2916           with floating point enabled
2917         * device/lib/printf_fast.c: minor tweaks
2918         * device/include/stdio.h: add printf_fast_f
2919
2920 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2921
2922         * src/SDCCmain.c: make --float-reent default for mcs51
2923         * device/lib/_fsadd.c: added mcs51 assembly version
2924         * device/lib/_fssub.c: added mcs51 assembly version
2925         * device/lib/_fsmul.c: added mcs51 assembly version
2926         * device/lib/_fsdiv.c: added mcs51 assembly version
2927         * device/lib/_fseq.c: added mcs51 assembly version
2928         * device/lib/_fsneq.c: added mcs51 assembly version
2929         * device/lib/_fsgt.c: added mcs51 assembly version
2930         * device/lib/_fslt.c: added mcs51 assembly version
2931         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2932         * device/lib/Makefile.in: add _fscmp to build
2933         * device/lib/libfloat.lib: add _fscmp to build
2934
2935 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2936
2937         * device/lib/_fs2slong.c: added mcs51 assembly version
2938         * device/lib/_fs2sint.c: added mcs51 assembly version
2939         * device/lib/_fs2schar.c: added mcs51 assembly version
2940         * device/lib/_fs2ulong.c: added mcs51 assembly version
2941         * device/lib/_fs2uint.c: added mcs51 assembly version
2942         * device/lib/_fs2uchar.c: added mcs51 assembly version
2943         * device/lib/_slong2fs.c: added mcs51 assembly version
2944         * device/lib/_sint2fs.c: added mcs51 assembly version
2945         * device/lib/_schar2fs.c: added mcs51 assembly version
2946         * device/lib/_ulong2fs.c: added mcs51 assembly version
2947         * device/lib/_uint2fs.c: added mcs51 assembly version
2948         * device/lib/_uchar2fs.c: added mcs51 assembly version
2949         * device/include/float.h: added #define to select asm vs c
2950
2951 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2952
2953         * device/lib/printf_fast.c: improvements to float output
2954         * device/include/float.h: add defines for assembly float library
2955         * device/lib/_fsget1arg.c: receive 1 float arg
2956         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2957         * device/lib/_fsnormalize.c: normalize a float
2958         * device/lib/_fsreturnval.c: return float, various helper routines
2959         * device/lib/_fsrshift.c: right shift a float's mantissa
2960         * device/lib/_fsswapargs.c: swap 2 floats
2961         * device/lib/Makefile.in: build these 6 new files for mcs51
2962         * device/lib/libfloat.lib: add these 6 files to the library
2963
2964 2004-12-26 Borut Razem <borut.razem AT siol.net>
2965
2966         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2967           built by gcc 3.4.2
2968
2969 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2970
2971         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2972           and fully reentrant and register bank neutral.
2973         * device/lib/printf_fast.c: added float (not enabled by default),
2974           added compact/slower integer (also not enabled by default),
2975           improved size/speed of fast integer code, other minor changes
2976         * device/include/stdio.h, device/lib/Makefile.in,
2977           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2978
2979 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2980
2981         * src/pic16/pcode.c: declaring variables other than at the start of a
2982           block is not supported in C by VC6.
2983
2984 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2985
2986         * applied a previous patch from Raphael Neider that wasn't included
2987         in the previous commits, which fixes infinite loops within jumptable
2988         improvements,
2989         * made some fixes that previous patches introduced
2990
2991 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2992
2993         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2994         that fixes an issue with AOP_PCODE asmop's offset,
2995         * (pic16_popCopyReg): update instance field too,
2996         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2997         function of pic port,
2998         * (genCmp, genAnd, genAssign),
2999         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3000
3001 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3002
3003         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3004         variables initial values to idata section,
3005         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3006         variables in some functions. This utilizes parmBytes field of iCode
3007         structure to hold the offset of the variable in stack. (might be
3008         able to use the stack field too?)
3009         * applied patch from Raphael Neider # ### , # ###
3010         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3011         variable initial values in idata section,
3012         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3013         for static variables with initial value
3014         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3015         applied fix in while loop from Raphael Neider.
3016
3017 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3018
3019         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3020         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3021         * src/ds390/ralloc.c (serialRegAssign): spill bits
3022         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3023         * support/Util/SDCCerr.c,
3024         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3025         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3026         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3027
3028 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3029
3030         * device/include/sdcc-lib.h: inserted LGPL, added includes
3031           asm/ds390/features.h and asm/mcs51/features.h
3032         * device/include/asm/default/features.h,
3033         * device/include/asm/gbz80/features.h,
3034         * device/include/asm/z80/features.h: added empty _AUTOMEM
3035           and _STATMEM
3036         * device/include/asm/ds390/features.h,
3037         * device/include/asm/mcs51/features.h: added files with defines for
3038           _AUTOMEM and _STATMEM indicating automatic and static storage class
3039         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3040         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3041         * src/SDCCicode.c (geniCodeCast),
3042         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3043         * src/SDCCloop.c (loopInduction): removed unused variable lr
3044         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3045           to convertToFcall to include char modulo (RFE 1065037), added check
3046           if left operand is unsigned and use abs of literal value
3047         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3048           as it doesn't work after conversion from peephole.def to peephole.rul
3049         * src/mcs51/gen.c (toBoolean): added check for size,
3050           (genModOneByte): optimized code for signed char modulo a literal
3051           power of 2 (thanks to Hubert Sack),
3052           (genRRC): removed unnecessary "clr c",
3053           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3054         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3055           jump optimization,
3056           swapped rules 256.c and 256.d,
3057           extended 256.d by using new multiple checks (thanks Erik),
3058           added rules 256.e and 256.f,
3059           updated rule 261.a and 261.b to new generated code
3060         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3061
3062 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3063
3064         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3065           induction related bugs, including first part of bug #1074377
3066
3067 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3068
3069         * applied patch from bug-report #1076292,
3070         * applied patches for genAnd and Goto-optimizations for Raphael
3071         Neider,
3072         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3073         dump a less iCode information,
3074         * src/pic16/device.h (pic16_options_t): added field debgen,
3075         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3076         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3077         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3078         puclic,
3079         * (various functions): added macros FENTRY and FENTRY2 to functions,
3080         to emit function prologue,
3081         * (various functions): fixed indentation,
3082         * (genNearPointerGet): fixed loading of FSR0,
3083         * (genPackBits): applied patch from Raphael Neider to fix updating
3084         of FSR0 and touching only the modified bits,
3085         * src/pic16/genarith.c (various functions): added macros FENTRY to
3086         emit function prologue in comments,
3087         * src/pic16/pcode.h: added functions debugf2, debugf3,
3088         * src/pic16/ralloc.c: partial fix for packForPush caused
3089         segmentation fault,
3090
3091 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3092
3093         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3094           <stsp AT users.sourceforge.net> with reversed byte order
3095         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3096
3097 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3098
3099         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3100           bug #1074377
3101         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3102         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3103
3104 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3105
3106         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3107
3108 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3109
3110         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3111           conditions,
3112           (setFromConditionArgs): friendly operand parser for peephole rules,
3113           (operandBaseName, operandsNotRelated): new peephole condition
3114           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3115           architecture specific register naming into account, handles n-way
3116           comparisons, and supports quoted literals
3117         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3118
3119 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3120
3121         * src/mcs51/peeph.def: fixed bug #1076940
3122
3123 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3124
3125         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3126
3127 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3128
3129         Adding support for replacing ljmps with sjmps in jumptables
3130         generated for switch statements. For now you need to set the
3131         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3132         Now 4 algorithms for mcs51 jumptable generation are used:
3133         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3134         addresses loaded pc-relative for up to 112 cases and stack-pushing
3135         target addresses loaded with offset from dptr for up to 256 cases.
3136
3137         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3138         * src/mcs51/main.c: adapted constants for switch table generation
3139         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3140
3141 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3142
3143         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3144         * support/regression/tests/bug1057979.c: added test for bug 1073386
3145
3146 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3147
3148         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3149         compilers
3150
3151 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3152
3153         * src/pic16/device.h,
3154         * src/pic16/genarith.c,
3155         * src/pic16/glue.c,
3156         * src/pic16/main.c,
3157         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3158
3159 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3160
3161         Large cummulative patch for pic16 port.
3162         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3163         to call when a stack overflow occurs,
3164         * (malloc.h): added CVS Id tag,
3165         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3166         variable,
3167         * added libc directory. The current version of LibC contains string
3168         functions, ctype functions and macros and some functions of the
3169         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3170         be extensively tested in the future. Standard disclaimer here.
3171         Library is not automatically build yet. But one can build it by
3172         invoking 'make' inside the libc directory.
3173         * added ADC library under libio. Preliminary version yet.
3174
3175         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3176         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3177         aopForRemat() now and not by pic16_aopOp(),
3178         * (pic16_popGetTempReg): removed warning messgae when allocating
3179         temporary registers, its a buggy feature and will be removed,
3180         * (pic16_popGet): set register instance field in AOP_CRY,
3181         * (pic16_outBitC): fixed for results in size greater than 1,
3182         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3183         * (pic16_storeForReturn): optimized return of 0,
3184         * (genCmp): experimental code for new genCmp which uses PIC18's
3185         special compare&skip instructions. Initial tests fail some times
3186         with variables grater than 1 byte in size, so new code is disabled,
3187         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3188         a single bit,
3189         * (genCast): began a fix to optimize the casting of a bit to another
3190         bit, now assigning a bitfield to another bitfield will fail, sorry,
3191         * src/pic16/main.c: disabled the use of lr-support feature,
3192         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3193         * added some function prototypes, added function _debugf prototype,
3194         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3195         bits with offset (case PO_GPR_BIT),
3196         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3197         command line,
3198         * (isBankInstruction): modified to return 0 for no banking instruction,
3199         and 1 for banking instruction,
3200         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3201         caused stop processing pCodes after a inline assembly block,
3202         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3203         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3204         registers when it shouldn't,
3205         * src/pic16/ralloc.c (allocReg): add preliminary support for
3206         supporting a limited set of temporary registers,
3207
3208 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3209
3210         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3211           genDataPointerSet): ensure assignments always copy in MSB to LSB
3212           order,
3213           (loadRegFromAop): recognize CLRH optimization,
3214           (genFunction): optimize RECEIVE iCodes in reentrant functions
3215
3216 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3217
3218         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3219           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3220           selected.
3221         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3222         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3223           contiguous with data
3224
3225 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3226
3227         * device/lib/_gptrget.c (_gptrget),
3228         * device/lib/_gptrgetc.c (_gptrgetc),
3229         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3230           instead of sjmp to ret
3231         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3232           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3233
3234 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3235
3236         * .version: bumped version to 2.4.7
3237         * device/lib/_gptrget.c (_gptrget): is now _naked
3238         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3239         * device/lib/_gptrput.c (_gptrput): is now _naked
3240         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3241           (createFunction): fixed xstack
3242         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3243         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3244           or bit either,
3245           (geniCodeCritical): store original interrupt state in an iTemp bit
3246           var unless stack-auto
3247         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3248         * src/SDCCmain.c (setIncludePath): added include/target to search path
3249         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3250         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3251           prototype,
3252           (processFuncArgs): put bit vars in bit area
3253         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3254           unsaveRBank): fixed xstack,
3255           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3256           (genFunction, genEndFunction): fixed xstack,
3257           (genAssign): optimization don't walk backwards through mem
3258         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3259         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3260         * support/regression/Makefile: also make library (for stack-auto) when
3261           making "all" and added "test-mcs51-xstack-auto"
3262         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3263         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3264         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3265         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3266         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3267           make-library by MAKE_LIBRARY
3268         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3269           regression tests for xstack
3270         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3271         * support/regression/tests/critical.c: test for critical on mcs51
3272
3273 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3274
3275         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3276           built version of sdcc instead of installed version
3277
3278 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3279
3280         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3281         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3282           vprintf.c now
3283         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3284         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3285           WARNING: remove device/lib/build/z80/printf.o by hand when
3286           updating from previous build!
3287         * device/lib/z80/printf.c: updated comment
3288         * support/regression/tests/bug1057979.c: test all ports now
3289         * support/regression/tests/bug1065458.c: file added
3290
3291 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3292
3293         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3294           *_start and *_end symbols for static functions
3295
3296 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3297
3298         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3299           and search crt0.o in all library paths,
3300           (setIncludePath): proper handling of --nostdinc,
3301           (setLibPath): proper handling of --nostdlib
3302         * support/regression/Makefile,
3303         * support/regression/ports/ds390/spec.mk,
3304         * support/regression/ports/gbz80/spec.mk,
3305         * support/regression/ports/hc08/spec.mk,
3306         * support/regression/ports/mcs51/spec.mk,
3307         * support/regression/ports/mcs51-large/spec.mk,
3308         * support/regression/ports/mcs51-stack-auto/spec.mk,
3309         * support/regression/ports/z80/spec.mk: use include and lib files from
3310           built version of sdcc instead of installed version
3311         * doc/sdccman.lyx: fixed typo in --nostdinc
3312
3313 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3314
3315         * src/pic/pcode.c,
3316         * src/pic/device.c,
3317         * src/pic/ralloc.c,
3318         * src/pic/gen.c : added support to generate code for struct bit fields.
3319
3320 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3321
3322         * as/xa51/xa_version.h,
3323         * device/include/errno.h,
3324         * device/include/regc515c.h,
3325         * device/lib/_itoa.c,
3326         * device/lib/_ltoa.c,
3327         * device/lib/ser_ir_cts_rts.c,
3328         * sim/ucsim/xa.src/glob.cc,
3329         * sim/ucsim/xa.src/inst_gen.cc,
3330         * sim/ucsim/xa.src/xa_bit.cc,
3331         * sim/ucsim/xa.src/xa_sfr.cc,
3332         * sim/ucsim/z80.src/inst_dd.cc,
3333         * sim/ucsim/z80.src/inst_fdcb.cc,
3334         * support/scripts/keil2sdcc.pl,
3335         * src/pic16/pic16.dsp,
3336         * src/pic16/pic16a.dsp: corrected cvs line endings
3337         * device/lib/printf_large.c: fixed bug 1057979
3338         * src/pic16/gen.c: fixed non-C standard code
3339         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3340         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3341         * support/regression/ports/mcs51/support.c: reload T1 asap
3342         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3343           pdata use and clear idata startup behaviour
3344         * support/regression/tests/bug1057979.c: added
3345
3346 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3347
3348         * device/examples/ds390/ow390/ad26.h,
3349         * device/examples/ds390/ow390/cnt1d.h,
3350         * device/examples/ds390/ow390/crcutil.c,
3351         * device/examples/ds390/ow390/ownet.h,
3352         * device/examples/ds390/ow390/owsesu.c,
3353         * device/examples/ds390/ow390/swt12.h,
3354         * device/examples/ds390/ow390/swtoper.c,
3355         * device/examples/ds390/ow390/temp10.h,
3356         * device/examples/ds390/ow390/thermodl.c,
3357         * device/examples/ds390/tinitalk/tinitalk.dsp,
3358         * device/examples/ds390/tinitalk/tinitalk.dsw,
3359         * device/examples/mcs51/clock/hw.h,
3360         * device/examples/mcs51/simple2/go.bat,
3361         * device/examples/serialcomm/windows/serial.h,
3362         * device/examples/xa51/dummy.c,
3363         * device/examples/xa51/hello.c,
3364         * device/include/80c51xa.h,
3365         * device/include/at89x051.h: corrected cvs line endings
3366
3367 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3368
3369         * src/pic16/main.c (options): added command line --gstack, to trace
3370         stack over/under flows,
3371         * added pragma 'wparam' to allow passing first byte of function
3372         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3373         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3374         call to __gstack_test function and sets up the symbol as extern,
3375         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3376         * popaop): added call to pic16_testStackOverflow,
3377         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3378         wparamList list,
3379         * (genCall, genPcall): now all parameters are passed via stack
3380         except in functions that are pass to wparam pragma in which WREG is
3381         used too,
3382         * (genPcall): REENTRANT flag is checked to see if variable prototype
3383         contains reentrant keyword, don't call a non-reentrant function, via
3384         a reentrant function pointer or vice versa, functions are never
3385         passed via WREG,
3386         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3387         D.Winkler,
3388         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3389         SIGSEGV when accessing a NULL register stucture,
3390         * (pic16_printGPointerType): modified to handle UPPER modifier for
3391         function initializers, changed prototype of function to simpler one,
3392         * (pic16_printIvalFuncPtr): check to see if function is already
3393         added in externs list,
3394         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3395         optimized a move from W to SFR with a move to the same register
3396         later after a CALL,
3397         * device/lib/pic16/debug: NEW directory, contains debug features
3398         which are enabled when linking with libdebug.lib, currently command
3399         line option --gstack enables stack pointer tracing for over/under
3400         flow, corresponding sources are in debug/gstack
3401
3402 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3403
3404         * doc/sdccman.lyx: updated SDCC version,
3405         * (PIC16 port): update list of command line options,
3406         * src/pic16/device.h (structure pic16_options_t): added field gstack
3407         to enable stack overflow tracing on push/pops,
3408         * src/pic16/device.c (statistics structure): added statistics
3409         structure,
3410         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3411         pic16_dump_int_registers): increase statistics counters for each
3412         * variable which is encountered
3413         * (pic16_dump_usection): emit each .udata variable to its own udata
3414         section,
3415         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3416         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3417         parameters via stack, otherwise use old scheme,
3418         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3419         assembler output file,
3420         * src/pic16/main.c: added command line options --gstack to enable
3421         push/pop tracing for stack overflow,
3422         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3423         instructions): added size of each instruction,
3424         * (pic16_countInstruction): estimate size of instructions in
3425         the_pFile list, inline assembly blocks are not counted,
3426         * (pic16_FixRegisterBanking): trace previous register usage, when
3427         banksel optimizations is greater than 0, don't emit a redudant
3428         banksel directive,
3429
3430 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3431
3432         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3433         * src/pic16/ralloc.c : applied same fix for pic16.
3434         * src/pic/gen.c : tidied it up a little.
3435
3436 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3437
3438         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3439         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3440
3441 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3442
3443         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3444
3445 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3446
3447         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3448         non-reentrant function __modsint in the interrupt function (thus
3449         corrupting math operations during serial I/O)
3450         * device/lib/ser_ir.c: as above, changed buffersize
3451         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3452         256.c,d for zeroing
3453         * doc/Makefile: added option -t for rsync
3454
3455 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3456
3457         * src/SDCCast.h (struct ast),
3458         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3459
3460 2004-10-20 Borut Razem <borut.razem AT siol.net>
3461
3462         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3463         package
3464
3465 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3466
3467         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3468         makefile targets,
3469         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3470         support functions to replace long sequences of MOVFF's from access
3471         bank registers to stack and vice versa,
3472         * src/pic16/device.h: added new field opt_flags, where optimization
3473         flags can be set to enable certain features,
3474         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3475         * pBlock, (genFunction, genEndFunction): surroung loop for
3476         saving/loading used registers in stack with PC_INFO pCodes,
3477         INF_LREGS. Code in between can then be optimized by pCode optimizer
3478         to support function calls,
3479         * (genDataPointerSet): fixed bug which loaded float fields in
3480         structures with corrupt data,
3481         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3482         in a standard way debug info on stderr. Feature used for developing
3483         and debugging only,
3484         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3485         obsolete chunks of code,
3486         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3487         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3488         * pic16/src/pcode.c (pic16_newpCodeInfo,
3489         * (pic16_newpCodeOpLocalRegs),
3490         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3491         feature,
3492         * (pic16_pCodeConstString): printing of the initial value of a
3493         symbol as a comment is inhibited since parsing was already done by
3494         copyStr and output is corrupt,
3495         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3496
3497 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3498
3499         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3500
3501 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3502
3503         * as/mcs51/lkarea.c: removed old K&R style,
3504           (lnksect): changed check on boundary error,
3505           (lnksect2): changed check on boundary error,
3506           (lnksect2): extend XSTK to end of page if size = 1
3507         * as/mcs51/lkmain.c: removed old K&R style,
3508           (Areas51): create l_IRAM symbol
3509         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3510         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3511           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3512         * device/lib/_mullong.c: added version to be compiled with xstack
3513         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3514         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3515         * device/lib/mcs51/crtxstack.asm: fixed comment
3516         * src/SDCCglue.c: maxInterrupts defaults to 0,
3517           (emitMaps): added pdata,
3518           (createInterruptVect): (re)moved default,
3519           (glue): added pdata,
3520           (glue): moved __start__xstack to XSTK with default size 1
3521         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3522           and options.float_rent when options.stackAuto is set,
3523           (linkEdit): only write XDATA_NAME if provided on command line
3524         * src/SDCCmem.h,
3525         * src/SDCCmem.c: added pdata
3526         * src/port.h: added pdata_name to PORT
3527         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3528           (saveRegisters, unsaveRegisters): removed usage of B,
3529           (genMinus): fixed accumulator clash,
3530           (genJumpTab): added comment, this needs another look
3531         * src/mcs51/gen.c: added check for "B in use" paranoia,
3532           added pushB() and popB()
3533         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3534           chance
3535         * src/avr/main.c,
3536         * src/ds390/main.c,
3537         * src/hc08/main.c,
3538         * src/mcs51/main.c,
3539         * src/pic/main.c,
3540         * src/pic16/main.c,
3541         * src/xa51/main.c,
3542         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3543           added PSEG (PAG,XDATA) or NULL to port specifier
3544         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3545         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3546           (_mcs51_genInitStartup): removed __start__xstack equ,
3547           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3548         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3549         * src/z80/gen.c (_rleAppend): fixed warnings
3550         * support/regression/tests/zeropad.c: added pdata test
3551         * .version: bumped to 2.4.6
3552
3553 2004-10-17 Borut Razem <borut.razem AT siol.net>
3554
3555         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3556         as a part of nightly build
3557
3558 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3559
3560         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3561         WREG holds the first byte function parameters,
3562         * (aopForSym): take special case for symbols which are in FARSPACE
3563         but in CODESPACE too,
3564         * (assignResultValue): modified to take into account _G.useWreg,
3565         * (genCall): don't use wreg for parameter passing when function is
3566         declared as reentrant, too, added optimization INCF to stack
3567         pointer when stack parameter count is 1,
3568         * (genFunction, genEndFunction): refurnished and fixed to not using
3569         wreg for passing parameters when function has varargs or is
3570         reentrant, fixed bug with symbol name compare for generating
3571         functions in absolute address,
3572         * (pic16_storeForReturn): refurnished,
3573         * (genCmp): began writing a new version of the function, not ready
3574         yet, therefore it is disabled,
3575         * (genAssign): do not read code memory when assigning a function to
3576         a pointer function,
3577         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3578         array of characters, not pointer,
3579         * (pic16initialComments): in debug mode emit an .ident directive for
3580         the assembler,
3581         * (_process_pragma): emit a new warning type (internal to pic16)
3582         when setting stack to default length, emit a similar warning when
3583         placing a function at absolute address and address is not word aligned
3584         * (_pic16_parseOptions): added 'return TRUE' statement,
3585         * (_pic16_linkEdit): if compiling a source, then add the source's
3586         file object, first in the list of objects to link,
3587
3588 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3589
3590         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3591         * src/pic/main.c : removed VC warning.
3592         * src/pic/gen.c : changed comment.
3593
3594 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3595
3596         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3597         reference to a deprecated symbol _GPTRREG was causing failure to
3598         link. Thanks G. M. Gallant for the info.
3599
3600 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3601
3602         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3603         comments for Bugs item #954788.
3604
3605 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3606
3607         * src/pic16/device.c (pic16_dump_gsection,
3608         * pic16_groupRegistersInSection): handle symbols declared to be in
3609         access bank differently,
3610         * src/pic16/gen.c (struct _G): added field resDirect,
3611         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3612         send values read from stack directly to result and don't allocate
3613         temporary values,
3614         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3615         same registers,
3616         * (pic16_sameRegsOfs): NEW,
3617         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3618         free because they were not allocated from temporary pool,
3619         * pic16_popRegFromString): workaround to fix a problem with
3620         allocating variables twice or never,
3621         * (genGenPointerGet): using PRODL instead of FSR0H,
3622         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3623         instead of FSR0H,
3624         * (genAssign): take advantage of the _G.resDirect flag,
3625         * (genCast): around line 11844, use mov2f instead of directly
3626         MOVFF'ing between operands to account for literal values,
3627         * src/pic16/genutils.c: some new debug functions for gpsim have been
3628         added,
3629         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3630         float with integer part only,
3631         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3632         place variables in access bank
3633         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3634         updated sources to reflect recent changes in gen.c
3635
3636 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3637
3638         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3639         sources that searched for headers in installation path, now the
3640         device/include/pic16 is used,
3641         * src/pic16/glue.c (pic16glue),
3642         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3643         .line directives if not in debug mode, this suppresses assembler's
3644         warnings for ignored directives
3645
3646 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3647
3648         * src/port.h: made reset_regparms prototype void parameter explicit.
3649         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3650         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3651         * doc/sdccman.lyx: documented warning disabling and how to use
3652           printf_large to make it print floats.
3653         * device/include/stdbool.h: NEW
3654         * device/lib/_atof.c,
3655         * device/lib/_divuint.c,
3656         * device/lib/_divulong.c,
3657         * device/lib/expf.c,
3658         * device/lib/printf_large.c,
3659         * device/lib/sincosf.c,
3660         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3661         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3662           a completely reentrant lib.
3663
3664 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3665
3666         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3667         * device/include/pic16/stdio.h: fixed bug with colon
3668
3669 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3670
3671         * device/include/pic16/stdio.h,
3672         * device/include/pic16/stdlib.h,
3673         * device/include/pic16/math.h: NEW
3674         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3675         declared as _naked to reduce overhead
3676         * device/lib/Makefile.in (target port-specific-objects-pic16):
3677         changed * to *.* so to ignore the CVS directory,
3678         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3679         stacked variables back in stack,
3680         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3681         corruption
3682
3683 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3684
3685         * .version: bumped version number to 2.4.5
3686         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3687         * support/Util/SDCCerr.c (messages structure): added entry for
3688         W_POSSBUG2
3689
3690         Large cumulative patch for pic16 port and libraries.
3691         * device/include/pic16/sdcc-lib.h,
3692         * device/include/pic16/stdarg.h,
3693         * device/include/asm/pic16/features.h,
3694         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3695         * device/include/pic16/float.h: changes reentrant keyword with
3696         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3697         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3698         updated target build-libraries to include objects from gptr,
3699         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3700         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3701         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3702         all function headings,
3703         * src/SDCCmain.c: added global parameter userIncDirsSet,
3704         * (parseCmdLine): when option -I is encountered add directory to
3705         userIncDirsSet too,
3706         * src/version.awk: added space between control and long,
3707         * src/pic16/NOTES: added some notes for the port,
3708         * src/pic16/gen.c: added prototype for mov2fp function,
3709         * (fReturnpic16[]): properly named return value registers,
3710         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3711         * (aopForSym): added code to handle symbols with onStack flag set,
3712         symbols onStack are allocated PTRSIZE bytes,
3713         * (aopFreeAsmop): handles special case where asmops are stack objects,
3714         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3715         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3716         added argument lock to trace flaws in allocating temporary registers
3717         when developing port,
3718         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3719         * (pic16_popRegFromString): reenabled allocating a direct register
3720         from string,
3721         * (assignResultValue): various beautifications,
3722         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3723         referenced function argument,
3724         * (genIpush): reenabled to allow stacked arguments, handles only
3725         ic->parmPush iCodes,
3726         * (genCall, genPcall): major changes to allow for variable argument
3727         functions, fixed a bug with falsely restoring stack pointer after
3728         returning from call,
3729         * (genFunction): pending code for critical function,
3730         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3731         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3732         * (genNearPointerGet): fixed bug with indirect reading, was always
3733         reading from INDF0
3734         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3735         pointers,
3736         * (genAddrOf): rewrote code to take address of a stacked function parameter
3737         * (genCast): fixed casting to generic pointer type,
3738         * src/pic16/gen.h: added AOP_STA,
3739         * (struct asmop): added field stk,
3740         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3741         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3742         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3743         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3744         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3745         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3746         generic pointers,
3747         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3748         and library paths,
3749         * (pic16_port structure): generic pointer size is set to 3,
3750         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3751         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3752         compiler warning,
3753         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3754         operand is an iTemp,
3755
3756 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3757
3758         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3759         * debugger/mcs51/simi.c: addapt new syntax of s51
3760
3761 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3762
3763         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3764         * src/pic16/pcode.c: commented out some calls to free() in order to
3765         fix bug #989576,
3766
3767 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3768
3769         * src/SDCCicode.h,
3770         * src/SDCCicode.c (isiCodeInFunctionCall),
3771         * src/avr/ralloc.c (selectSpil),
3772         * src/pic/ralloc.c (selectSpil),
3773         * src/pic16/ralloc.c (selectSpil),
3774         * src/ds390/ralloc.c (selectSpil),
3775         * src/hc08/ralloc.c (selectSpil),
3776         * src/xa51/ralloc.c (selectSpil),
3777         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3778         stack in the middle of a function call sequence (fixes bug #1020268)
3779         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3780         costs associated with the minimum switch case.
3781
3782 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3783
3784         * src/SDCC.lex: fixed bug #1030549
3785
3786 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3787
3788         * src/SDCCcse.h (struct cseDef),
3789         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3790         over a function call if the CSE is derived from a symbol whose
3791         address has been taken (fixes bug #1029883)
3792         * support/regression/tests/bug-1029883: a new regression test for
3793         this bug
3794
3795 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3796
3797         * src/hc08/gen.c (emitinline): fixed bug #1029778
3798         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3799         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3800         and starts toward RFE #905167)
3801
3802 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3803
3804         * src/pic16/gen.c (mov2f): New function to move an operand to
3805         another without considering if it is a literal or a register,
3806         * (pic16_sameRegs): don't check if they are both AOP_REG,
3807         * (AccRsh): removed andmask=0 lines,
3808         * (genLeftShift): duplicated to be improved in future versions,
3809         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3810         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3811         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3812         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3813         * (insertBankSwitch): fixed inserting banksel directives algorithm
3814         for instructions that follow a skip instruction, this fixes a report
3815         for broken subtraction code generation,
3816         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3817         iCode is a left op, just in case result and right share the same
3818         registers
3819
3820 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3821
3822         * src/hc08/main.c,
3823         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3824         preservation of HX
3825         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3826         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3827         on 2004-09-12; it was buggy
3828
3829 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3830
3831         * src/SDCCsymt.h: removed RESULT_CHECK
3832         * src/SDCCast.c,
3833         * src/SDCCglue.c,
3834         * src/SDCCval.c,
3835         * src/pic/glue.c,
3836         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3837
3838 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3839
3840         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3841         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3842         configuration values no more rejected by compiler, they are assigned
3843         to configuration registers with a warning message instead,
3844         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3845         the for-loop so last conf register is emitted too,
3846         * (_pic16_initPaths): link library libsdcc.lib by default,
3847         * (_hasNativeMulFor): modified test for multiplication according to
3848         Raphael Neider's remarks. Integer multiplication is also done with
3849         support functions,
3850         * device/include/pic16/pic18fregs.h: corrected type error in while
3851         testing and including 18f6720 header file
3852
3853 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3854
3855         * src/pic16/device.h (pic16_options): removed field use_crt,
3856         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3857         until an optimization to handle single bits is added,
3858         * (pic16_loadFSR0): moved before genUnpackBits,
3859         * (genAnd): some white lines removed,
3860         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3861         leave_reset flags in pic16_options when using crt modules,
3862
3863 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3864
3865         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3866           for bugs 898889 & 979599. Also used some safer print instructions.
3867
3868 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3869
3870         * src/pic16/device.h (pic16_options_t): added field use_crt,
3871         crt_name, no_crt,
3872         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3873         catch a probable future bug,
3874         * src/pic16/gen.c: aopIdx function commented out,
3875         * (genAssign): commented out old code which used aopIdx,
3876         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3877         code, added if conditionals to take into account the --use-crt
3878         command line options,
3879         * src/pic16/main.c (pic16_optionsTable): added new command line
3880         options, --use-crt= and --no-crt,
3881         * (_pic16_linkEdit): now the proper crt object is added in the
3882         linker command line except than when --no-crt is specified,
3883         * src/pic16/pcode.c,
3884         * src/pic16/pcode.h: added some structures and functions for a new
3885         optimization scheme to compansate for instruction overhead between
3886         same iCodes, this scheme is currently under development and is not
3887         working in any way,
3888         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3889         to && operator,
3890         * device/lib/pic16/startup/crt0i.c,
3891         * device/lib/pic16/startup/crt0iz.c: added global char variable
3892         __uflags to force the generation of an idata section
3893
3894 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3895
3896         * doc/Makefile,
3897         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3898         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3899
3900 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3901
3902         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3903         Frieder) and clarified the default code optimization mode
3904
3905 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3906
3907         * src/SDCC.lex (doPragma, process_pragma),
3908         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3909         "opt_code_size", and "opt_code_balanced"
3910         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3911         regrouped options by category, added support for category headers
3912         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3913         and "--opt-code-size"
3914         * doc/sdccman.lyx: documented these new options and pragmas
3915         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3916         preference into account
3917
3918 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3919
3920         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3921           geniCodePreDec): Fixed bug 904237 by generating a warning
3922         * src/SDCCerr.h,
3923         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3924
3925 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3926
3927         * src/pic/device.c : When no max ram set validate full memory range.
3928         * src/pic/pcode.c,
3929         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3930
3931 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3932
3933         * device/lib/_gptrget.c,
3934         * device/lib/_gptrput.c: updated comment
3935         * device/lib/calloc.c,
3936         * device/lib/free.c,
3937         * device/lib/malloc.c,
3938         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3939         * src/SDCCcse.c (cseBBlock),
3940         * src/SDCCicode.c (printOperand, geniCodeArray),
3941         * src/SDCCicode.h (struct operand): fixed bug 868103
3942         * support/regression/tests/bug-868103.c: added
3943         * src/SDCCast.c (searchLitOp),
3944         * src/SDCCcse.h (struct cseDef),
3945         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3946         * src/SDCCicode.h (struct operand),
3947         * src/SDCCsymt.h (struct sym_link),
3948         * src/avr/gen.c (hasInc),
3949         * src/ds390/gen.c (hasInc),
3950         * src/hc08/gen.c (genPlusIncr, hasInc),
3951         * src/mcs51/gen.c (hasInc),
3952         * src/pic16/glue.c (pic16_printIvalChar),
3953         * src/pic16/ralloc.c (regWithIdx),
3954         * src/xa51/gen.c (hasInc) : removed warnings
3955         * src/SDCCast.c (createBlock): added comment ???
3956         * src/hc08/ralloc.c: updated comments
3957
3958 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3959
3960         * doc/sdccman.lyx: updated section on switch statements, added
3961         section about semaphore locking
3962         * doc/Makefile: added option -info for latex2html
3963         * device/lib/_gptrget.c,
3964         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3965
3966 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3967
3968         * src/pic/device.h,
3969         * src/pic/device.c,
3970         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3971          maxram is less than 0x100.
3972
3973 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3974
3975         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3976
3977 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3978
3979         * src/port.h,
3980         * src/mcs51/main.c,
3981         * src/ds390/main.c,
3982         * src/z80/main.c,
3983         * src/hc08/main.c,
3984         * src/pic/main.c,
3985         * src/pic16/main.c,
3986         * src/avr/main.c,
3987         * src/xa51/main.c
3988         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3989         a jump table is the best form for a switch statement, including
3990         automatic insertion of missing cases to make the case range
3991         continuous. Developed in collaboration with Frieder Ferlemann.
3992
3993 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3994
3995         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3996         accumulator result if it needs sign extension
3997
3998 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3999
4000         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4001
4002 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4003
4004         * device/lib/gbz80/printf.c,
4005         * device/lib/z80/printf.c: removed define for NULL
4006
4007 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4008
4009         * as/xa51/xa_link.c,
4010         * device/examples/ds390/ow390/ad26.c,
4011         * device/examples/ds390/ow390/cnt1d.c,
4012         * device/examples/ds390/ow390/counter.c,
4013         * device/examples/ds390/ow390/ds2480.h,
4014         * device/examples/ds390/ow390/ds2480ut.c,
4015         * device/examples/ds390/ow390/findtype.c,
4016         * device/examples/ds390/ow390/gethumd.c,
4017         * device/examples/ds390/ow390/owllu.c,
4018         * device/examples/ds390/ow390/ownetu.c,
4019         * device/examples/ds390/ow390/swt12.c,
4020         * device/examples/ds390/ow390/swtloop.c,
4021         * device/examples/ds390/ow390/temp.c,
4022         * device/examples/ds390/ow390/temp10.c,
4023         * device/examples/ds390/ow390/thermo21.c,
4024         * device/examples/ds390/ow390/tinilnk.c,
4025         * device/examples/ds390/ow390/tstfind.c,
4026         * device/examples/serialcomm/windows/serial.cpp,
4027         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4028         * device/include/reg51.h: fixed line endings for cvs
4029
4030 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4031
4032         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4033         packRegsForAccUse, packRegisters): new accumulator register
4034         packing algorithm
4035         * support/regression/ports/hc08/support.c (_putchar): suppress
4036         warning of unused variable
4037         * src/SDCCicode.c: added SWAP entry to codeTable
4038
4039 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4040
4041         * device/lib/sprintf.c: forgot to add this file before previous commit
4042
4043 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4044
4045         * src/pic16/gen.c (genPackBits): added operand right in function
4046         parameters, load result directly if p_type is POINTER (that is
4047         called by genNearPointerSet)
4048         * (genUnPackBits): added operand left in function parameters,
4049         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4050         FSR0 if accessing bitfields,
4051
4052 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4053
4054         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4055           _print_format; updated printf, sprintf, vsprintf
4056         * device/include/asm/default/features.h: corrected comment/define
4057         * device/lib/Makefile.in: added sprintf.c
4058         * device/lib/libsdcc.lib: added sprintf module
4059         * device/lib/printf_large.c,
4060         * device/lib/vprintf.c,
4061         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4062           into these 3 files
4063         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4064         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4065         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4066           hc08 test
4067         * support/regression/tests/zeropad.c: define idata as data for hc08
4068
4069 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4070
4071         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4072         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4073         labels are referenced at least once (even if a reference is not found)
4074         * src/hc08/gen.c (emitcode): set isComment flag for comments
4075         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4076         loads), rules 6a..6b (optimize jumps to return)
4077
4078 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4079
4080         * device/lib/acosf.c (acosf),
4081         * device/lib/asinf.c (asinf),
4082         * device/lib/atanf.c (atanf),
4083         * device/lib/ceilf.c (ceilf),
4084         * device/lib/cosf.c (cosf),
4085         * device/lib/coshf.c (coshf),
4086         * device/lib/cotf.c (cotf),
4087         * device/lib/fabsf.c (fabsf),
4088         * device/lib/floorf.c (floorf),
4089         * device/lib/log10f.c (log10f),
4090         * device/lib/logf.c (logf),
4091         * device/lib/sinf.c (sinf),
4092         * device/lib/sinhf.c (sinhf),
4093         * device/lib/sqrtf.c (sqrtf),
4094         * device/lib/tanf.c (tanf),
4095         * device/lib/tanhf.c (tanhf),
4096         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4097         replaced all instances of "reentrant" in the library functions
4098         defined in math.h with this macro.
4099         * support/regression/tests/float_trans.c: reenabled test for hc08
4100
4101 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4102
4103         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4104         erroneously deleted
4105
4106 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4107
4108         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4109         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4110         multi-byte volatile operands are used
4111         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4112         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4113         initialization to area GSINIT0 so that it would always precede
4114         any static initializers in GSINIT
4115         * support/regression/tests/zeropad.c: fixed idata define for hc08
4116         * support/regression/tests/bug-927659.c,
4117         * support/regression/tests/float_trans.c: disabled tests for hc08
4118         pending missing library routines
4119         * .version: increased version number to 2.4.4 - hc08 port now passes
4120         regression tests
4121
4122
4123 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4124
4125         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4126         * Makefile.common.in,
4127         * as/Makefile,
4128         * as/hc08/Makefile.in,
4129         * as/mcs51/Makefile.in,
4130         * as/z80/Makefile.in,
4131         * debugger/mcs51/Makefile.in,
4132         * device/include/Makefile.in,
4133         * device/lib/Makefile.in,
4134         * doc/Makefile,
4135         * link/Makefile,
4136         * link/z80/Makefile.in,
4137         * packihx/Makefile.in,
4138         * sim/ucsim/main_in.mk,
4139         * sim/ucsim/avr.src/Makefile.in,
4140         * sim/ucsim/doc/Makefile.in,
4141         * sim/ucsim/gui.src/serio.src/Makefile.in,
4142         * sim/ucsim/hc08.src/Makefile.in,
4143         * sim/ucsim/s51.src/Makefile.in,
4144         * sim/ucsim/xa.src/Makefile.in,
4145         * sim/ucsim/z80.src/Makefile.in,
4146         * src/Makefile.in,
4147         * support/cpp2/Makefile.in,
4148         * support/librarian/Makefile,
4149         * support/makebin/Makefile: added DESTDIR to the install path proposed
4150         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4151         * doc/sdccman.lyx: added DESTDIR documentation
4152
4153 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4154
4155         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4156         instruction for interrupt handlers, use fast returns when returning
4157         from high priority interrupts
4158
4159 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4160
4161         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4162         code generation
4163         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4164         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4165         bugs, ported much of Bernhard's code from mcs51
4166         * src/mcs51/gen.c (genSend),
4167         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4168         than one when calling a reentrant function
4169         * device/lib/_mullong.c: defined an alternate struct layout for big
4170         endian ports (hc08)
4171
4172 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4173
4174         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4175         test
4176
4177 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4178
4179         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4180         are sane and complete before asking the port its prefered parameter
4181         passing method (fixes bug #1017633)
4182         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4183         and _ret3
4184
4185 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4186
4187         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4188         problem in bitfields >= 8 bits.
4189
4190 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4191
4192         * src/SDCCsymt.c: undid changes that were not meant to be committed
4193
4194 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4195
4196         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4197
4198 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4199
4200         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4201           copied and wrong bit got inverted
4202
4203 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4204
4205         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4206         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4207         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4208         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4209         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4210         assignments to bitfields at known addresses
4211         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4212         reads from bitfields at known addresses
4213         * src/hc08/ralloc.c (packRegisters),
4214         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4215         genhc08Code): optimize pointer get values used as conditionals
4216         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4217         and branch
4218
4219 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4220
4221         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4222         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4223         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4224         as conditionals
4225
4226 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4227
4228         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4229
4230 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4231
4232         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4233         related problems
4234
4235 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4236
4237         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4238
4239 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4240
4241         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4242         mcs51 port
4243
4244 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4245
4246         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4247
4248 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4249
4250         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4251         cases use more compact code.
4252
4253 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4254
4255         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4256
4257 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4258
4259         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4260
4261 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4262
4263         * src/SDCCsymt.h,
4264         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4265         parameter of changePointer() from symbol* to sym_link*
4266         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4267         * src/SDCCsymt.c (compareType): void* type is castable to other
4268         pointers, but not necesarily an exact match.
4269         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4270         is no longer blindly treated as an exact match.
4271         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4272
4273 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4274
4275         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4276
4277 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4278
4279         * src/pic/gen.c,
4280         * src/pic/pcode.c,
4281         * src/pic/ralloc.h,
4282         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4283
4284 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4285
4286         * src/pic/device.c,
4287         * src/pic/device.h,
4288         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4289
4290 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4291
4292         * src/mcs51/gen.c (emitcode): fixed bug #992819
4293
4294 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4295
4296         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4297           there's no need to make it worse
4298
4299 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4300
4301         * src/mcs51/ralloc.c (deassignLR),
4302         * src/ds390/ralloc.c (deassignLR),
4303         * src/hc08/ralloc.c (deassignLR),
4304         * src/z80/ralloc.c (deassignLR),
4305         * src/pic/ralloc.c (deassignLR),
4306         * src/pic16/ralloc.c (deassignLR),
4307         * src/avr/ralloc.c (deassignLR),
4308         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4309         rlivePoint): fixed another part of bug #971834
4310
4311 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4312
4313         * src/z80/main.c: enabled "critical" keyword
4314         * src/z80/mappings.i,
4315         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4316         functions (fixes bug #979646)
4317         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4318
4319 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4320
4321         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4322           such as c:\mydir.
4323
4324 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4325
4326         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4327           doesn't disable too much optimizations
4328
4329 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4330
4331         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4332
4333 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4334
4335         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4336
4337 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4338
4339         * src/pic/gen.c tidied up tabs
4340         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4341         * src/pic/main.c tidied up tabs
4342         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4343         * src/pic/pcoderegs.c tidied up tabs
4344         * src/pic/ralloc.c tidied up tabs
4345
4346 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4347
4348         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4349         to S_FIXED for pic16 port and when symbol is not in level 0,
4350         allocate for S_REGISTER storage class and pic16 port, too,
4351         * src/pic16/device.h: prototype for checkSym,
4352         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4353         * (pic16_assignConfigWordValue): test the value and the mask to
4354         validate that the value is suitable for the configuration word,
4355         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4356         collect extern declared symbols, don't emit symbol twice, check
4357         first if symbol is in publics set first,
4358         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4359         * added command line '--fstack' which enables an experimental
4360         feature for stack access, too buggy to be used yet...
4361         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4362         * (pic16_allocDirReg): when register has storage class S_REGISTER
4363         allocate in pic16_dynAccessRegs,
4364         * device/include/pic16/pic18f????.h: modified configuration word
4365         naming convention, words started as CONFIG0H but should be CONFIG1H
4366
4367 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4368
4369         * device/include/mcs51reg.h: fixed bug 970993
4370
4371 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4372
4373         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4374         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4375         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4376         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4377         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4378         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4379           error/warning numbers,
4380           added function setWarningDisabled()
4381         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4382         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4383           _memcmp.c _memmove.c calloc.c realloc.c free.c
4384         * support/regression/tests/malloc.c: added tests for new functionality
4385         * support/regression/tests/zeropad.c: added tests for truncated initializers
4386           and initialized char arrays starting with '\x0'
4387         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4388
4389 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4390
4391         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4392
4393 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4394
4395         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4396         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4397         peephole 177.e. Thanks to anonymous
4398
4399 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4400
4401         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4402         function isn't used in the source but referenced as a
4403         variable initializer then declare it as extern in .asm file
4404
4405 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4406
4407         * .version: increased version number to 2.4.3
4408
4409         Adding version extension according to ChangeLog CVS revision
4410         * src/Makefile.in (target all): added dependency 'version.h'
4411         * (rule version.h): added rule to create version.h from ChangeLog,
4412         * (rule dep): added dependency version.h,
4413         * src/version.awk: AWK script to create version.h
4414         * src/SDCCdwarf2.c (dwWriteModule),
4415         * src/SDCCglue.c (initialComments),
4416         * src/SDCCmain.c (printVersionInfo): modified to write after
4417         version string the version extension number,
4418         * src/SDCCutil.c: included "version.h"
4419         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4420         number,
4421         * src/SDCCutil.h: added prototype for getBuildNumber
4422
4423         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4424         includeDirsSet, too,
4425         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4426         const char [] is found in function prototype...
4427
4428         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4429         moving to WREG with source is already in WREG,
4430         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4431         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4432         * (aopForSym): stack'ed symbols are partially supported, added
4433         if-clause to support symbols in FARSPACE,
4434         * (sameRegs): added test for AOP_ACC to see if registers are same,
4435         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4436         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4437         * (pic16_popRegFromString): will not allocate a new register if it
4438         doesn't find one by name, bug may have introduced...
4439         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4440         * (genIpush): revived to use pic16 port's stack,
4441         * (genAddrOf): added incomplete case for stack'ed operand,
4442         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4443         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4444         can handle multibyte operands,
4445         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4446         * (pic16initialComments): added message for MPLAB compatibility
4447         mode enabled,
4448         * src/pic16/main.h: prototype for pic16_mplab_comp,
4449         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4450         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4451         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4452         because of increased complexity of procedure,
4453         * (_process_pragma): stack pragma changed to format 'stack pos len',
4454         emit symbol '_stack_end' to conform with gplink,
4455         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4456         to search for register,
4457         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4458         PO_GPR_REGISTER,
4459         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4460         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4461         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4462         case for PO_GPR_REGISTER,
4463         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4464         dies, the new era is ahead !...
4465         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4466         pic16_dynInternalRegs,
4467         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4468         * (pic16_allocDirReg): minor optimizations and bug fixes,
4469         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4470
4471         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4472         load stack and frame pointer with address of 'stack_end' symbol
4473
4474 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4475
4476         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4477         without source code but only variable initializers
4478
4479 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4480
4481         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4482         external are not declared as extern to reduce overhead while linking
4483
4484 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4485
4486         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4487
4488 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4489
4490         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4491           Yee Keat for the patch
4492         * src/SDCCast.c (decorateType): fixed bug #979599
4493         * src/ds390/gen.h: removed local fReturnSizeDS390
4494         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4495         * src/ds390/gen.c (genAnd, genOr, genXor),
4496         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4497
4498 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4499
4500         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4501         add relFilesSet to $3, manipulate $2 to handle linking of object
4502         files without source files in command line,
4503         * device/include/pic16 (all headers): added ID location macros,
4504         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4505         entries for ID location bytes,
4506         * (pic16_assignIdByteValue): NEW,
4507         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4508         added field dumpcalltree to pic16_options_t,
4509         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4510         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4511         emitting rFalseIfx label after check_carry label,
4512         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4513         pic16_emitDIRegs), NEW
4514         * (pic16glue): dump .calltree file when option --calltree found,
4515         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4516         * (_pic16_genAssemblerPreamble): emit ID locations after
4517         configuration registers,
4518         * (pic16_linkCmd): modifications of the link command,
4519         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4520         * (pic16_pCodeInitRegisters): don't init stack registers,
4521         * (pic16_findPrevInstruction): fixed bug,
4522         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4523         bug with immediate registers,
4524         * (buildCallTree): traces stack push and pop,
4525         * (pct2): dump also stack usage for each function,
4526         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4527         * (pic16_allocDirReg): various modifications,
4528         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4529         fixed to 1,
4530
4531 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4532
4533         * src/pic16/pcode.c: removed buggy double colon
4534
4535 2004-07-01 Borut Razem <borut.razem AT siol.net>
4536
4537         * support/scripts/sdcc.nsi: added include/pic16 to setup
4538
4539 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4540
4541         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4542         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4543         target 'clean',
4544         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4545         specific command line arguments. Also added sample lkr script
4546         for placing a variable at a specific memory bank.
4547         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4548         at a specific memory bank,
4549         * (pic16_dump_isection): fixed bug which caused string literals to
4550         be omitted when dumping idata section,
4551         * (pic16_groupRegistersInSection): added code to handle registers
4552         in specific memory banks,
4553         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4554         public, all references are renamed too,
4555         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4556         AOP_DPTR2,
4557         * (pic16_storeForReturn): added case to handle when dest is WREG,
4558         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4559         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4560         pic16_rel_udata, check to see if that register is marked as being
4561         a member of a specific memory bank,
4562         * (pic16_printIvalCharPtr): added code to add string literals either
4563         to code or the idata sections,
4564         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4565         also accept the 'udata' pragma,
4566         * src/pic16/main.h: new structure types sectName and sectSym
4567         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4568         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4569         * (pic16_findPrevInstruction): fixed, it returned nothing,
4570         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4571         instruction combinations,
4572         * (pic16_FixRegisterBanking): heavily reorganised,
4573         * (pic16_AnalyzeBanking): if generating banksel directives is
4574         disabled, then don't call FixRegisterBanking at all,
4575         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4576         completely removed,
4577         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4578
4579 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4580
4581         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4582         Phuah Yee Keat <yk.phuah AT nestac.com>
4583
4584 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4585
4586         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4587         correctly the IVT even if it is relocated to some other location
4588
4589 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4590
4591         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4592         * device/include/pic16/pic18f2220.h: NEW,
4593         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4594         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4595         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4596         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4597         nodefaultlibs, ivt_loc is the location of the interrupt vector
4598         table, and nodefaultlibs signs that default libraries should not be
4599         linked in link stage,
4600         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4601         according to --ivt-loc argument,
4602         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4603         when pragma stack is found,
4604
4605 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4606
4607         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4608         256 (range check), 257 (do while), 258.a-f (bit banging
4609         f.e. on 3-wire SPI bus)
4610
4611 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4612
4613         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4614         variables used exclusively within a loop
4615
4616 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4617
4618         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4619
4620 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4621
4622         * src/SDCClrange.c (computeClash): fixed bug #971834
4623
4624 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4625
4626         * src/mcs51/gen.c (genCmp): fixed bug #975903
4627         * src/hc08/gen.c (operandsEqu),
4628         * src/ds390/gen.c (operandsEqu),
4629         * src/z80/gen.c (operandsEqu),
4630         * src/pic/gen.c (operandsEqu),
4631         * src/pic16/gen.c (operandsEqu),
4632         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4633         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4634
4635 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4636
4637         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4638
4639 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4640
4641         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4642         default case in switch statement,
4643         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4644         to eliminate problem with initialisation of pointers, but problem
4645         still exists,
4646         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4647         * (emitStaticSegment): removed various lines emitting debug info,
4648         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4649         added processor registers for utilizing EEPROM,
4650         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4651         configurable and set 8
4652
4653 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4654
4655         * .version: increased version number to 2.4.2,
4656
4657         Cumulative patch for pic16 port
4658         * src/pic16/device.c: changed scheme to dump initial values for
4659         variables in idata segment, all print_idata* functions were removed,
4660         now the pic16_printIval* will be called,
4661         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4662         * _pic16_printPointerType, pic16_printPointerType,
4663         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4664         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4665         NEW, similar to the respective functions in SDCCglue.c,
4666         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4667         way, emitting hex bytes,
4668         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4669
4670 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4671
4672         * src/avr/ralloc.c (serialRegAssign),
4673         * src/xa51/ralloc.c (serialRegAssign),
4674         * src/pic/ralloc.c (serialRegAssign),
4675         * src/pic16/ralloc.c (serialRegAssign),
4676         * src/hc08/ralloc.c (serialRegAssign),
4677         * src/z80/ralloc.c (serialRegAssign),
4678         * src/ds390/ralloc.c (serialRegAssign),
4679         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4680
4681 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4682
4683         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4684         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4685
4686 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4687
4688         Cumulative patch for pic16 port:
4689         * src/pic16/device.h (typedef PIC16_device) modified fields for
4690         defining microcontrollers,
4691         * src/pic16/device.c: added new info for all devices in Pics16 array,
4692         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4693         to be optimised out by the pCode optimiser,
4694         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4695         specially, bug reported by G.M. Gallant,
4696         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4697         as force'd so that cannot be optimised out by pCode optimiser,
4698         * src/pic16/pcode.c,
4699         * src/pic16/pcodepeeph.c,
4700         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4701         they are disabled by default, but can be enabled explicit with
4702         command argument --denable-peeps, for testing,
4703         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4704         --pomit-ivt in COMPILE_FLAGS
4705
4706 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4707
4708         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4709           compilation on MSVC
4710
4711 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4712
4713         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4714
4715 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4716
4717         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4718         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4719
4720 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4721
4722         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4723         would only assign 0x300001 register.
4724
4725 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4726
4727         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4728         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4729
4730 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4731
4732         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4733         for ds80c400
4734         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4735         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4736         added peephole 254 (left shift), 255 (jump table)
4737
4738 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4739
4740         * device/lib/Makefile.in: removed comment line with model-pic16,
4741         * (target port-specific-objects-pic16): the libraries and objects
4742         are copied to the build directory form the device/lib/pic16/bin
4743         directory
4744
4745         Cumulative patch concerning pic16 port:
4746         * library directory has been re-organized,
4747         * added support for PIC18F1220,
4748         * added headers and library sources for chips 18f1220,18f6520,
4749         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4750
4751         * configuration registers setting has changed, now each supported
4752         device has a complete description of the registers it uses,
4753         * all initialisations are moved to idata sections, these section
4754         can be absolute or relocatable,
4755         * fixed initialisation of codespace variables,
4756         * fixed warning about PCLATU and gpsim,
4757         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4758         * (genAssign): use table reads when assigning from variables in codespace,
4759         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4760         char/int variables placed in codespace,
4761         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4762         registers set in .asm file, no need for --pomit-config-words anymore,
4763         * (pic16glue): some 8051 legacy segments are commented out
4764         (to be removed completely),
4765         * added support for alternative assembler and linker with --asm=
4766         and --link= command line arguments,
4767         * peepholes are disabled automatically in the port, no need to
4768         specify on command line,
4769         * port supports natively char/int/long multiplication, but converts
4770         all divisions to support functions,
4771         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4772         to the file set in variable $2,
4773         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4774         strings in ASCII format and not in hex,
4775         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4776         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4777         allocate proper register if iCodes aren't temporary,
4778
4779 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4780
4781         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4782
4783 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4784
4785         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4786         is commented out
4787
4788 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4789
4790         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4791         computed address is reused
4792         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4793         multi-byte bitfields
4794
4795 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4796
4797         * src/z80/gen.c: (genArrayInit): must check for pointers too
4798
4799 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4800
4801         * support/regression/tests/zeropad.c: never meant to commit the
4802           nestedstruct test: removed, added check for GCC version
4803
4804 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4805
4806         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4807         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4808         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4809           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4810           bugs 928906 and 954082 half-empty initializers
4811         * src/SDCCsymt.h,
4812         * src/SDCCsymt.c (getAllocSize): added for above fix
4813         * src/z80/gen.c (genArrayInit): fixed bug 741044
4814         * support/regression/tests/zeropad.c: added tests
4815
4816 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4817
4818         * src/pic16/device.c (pic16_dump_section): corrected bug which
4819         caused some symbols of the libraries to be misplaced
4820
4821 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4822
4823         * src/pic16/glue.c,
4824         * src/pic16/ralloc.h,
4825         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4826         to fix conflict with pic port
4827
4828 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4829
4830         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4831         externs configuration variables,
4832         * src/pic16/ralloc.h,
4833         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4834         prototype in header, commented out some debug messages
4835
4836 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4837
4838         * src/pic16/glue.c,
4839         * src/pic16/main.c,
4840         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4841         for gpasm COFF object generation. Thanks to D. Hawkins for
4842         his patch info
4843
4844 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4845
4846         * src/ds390/main.c,
4847         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4848         Brock for spotting this)
4849         * src/ds390/gen.c (genEndFunction),
4850         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4851         interrupt handler and critical. Disable push/pop optimizations when
4852         peephole optimizations disabled.
4853
4854 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4855
4856         Updated pic16 library sources and headers.
4857         * device/lib/pic16/pic18f*/ ,
4858         * device/include/pic16/*.h: modified to handle structured SFR
4859         definitions
4860
4861 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4862
4863         * src/port.h (PORT structure): added hook initPaths, now each
4864         port can declare its own default search paths,
4865         which can been seen with the --print-search-dirs option,
4866         see pic16 port for example,
4867         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4868         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4869         * (doPrintSearchDirs): NEW, replaces in a central manner the
4870         printing of search dirs which was split in set*Paths functions,
4871         * (main): added call to port->initPaths and doPrintSearchDirs,
4872         * src/avr/main.c,
4873         * src/ds390/main.c,
4874         * src/hc08/main.c,
4875         * src/izt/i186.c,
4876         * src/izt/tlcs900h.c,
4877         * src/mcs51/main.c,
4878         * src/pic/main.c,
4879         * src/pic16/main.c: modified port structures to reflect addition of
4880         initPaths hook,
4881
4882         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4883         * (pic16_dump_section): for registers in same address reserve memory once,
4884         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4885         to no_banksel,
4886         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4887         result is greater in size than right or left,
4888         * (pic16_genUMult8X8_8): there are some cases where the result can
4889         be 16 bits size, so handle these,
4890         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4891         * (pic16_outBitC): modified to emit pcodes,
4892         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4893         or not,
4894         * (genDivOneByte): implemented algorithm to divide 8-bits,
4895         * (genCmp): uncommented goto, but issues still exist,
4896         * (genAnd): fixed a bug with variables >8bits,
4897         * (genPackBits): optimization added that uses BCF/BSF to change a
4898         single bit,
4899         * (genAssign): fixed bug when assigning floating point literals,
4900         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4901         __sdcc_gsinit_startup label,
4902         * src/pic16/main.c (_pic16_init): removed search directory
4903         initialisations,
4904         * (_pic16_initPaths): NEW, used to initialise search directories,
4905         * (_hasNativeMulFor): support functions for all except char/int
4906         multiplication, and char division,
4907         * (PIC16_port struct): modified entry for native mul support,
4908         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4909         no_banksel option,
4910         * (buildCallTree): call to register_usage is ifdef'ed out,
4911
4912 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4913
4914         * device/include/string.h: applied Stas Sergeev's patch to make this
4915         header file compatible with the preprocessor -Wundef option
4916         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4917         failure (fixes bug #941458)
4918
4919 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4920
4921         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4922         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4923         that the variable, not the function, should be static
4924         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4925         to be consistent with non-literal case
4926
4927 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4928
4929         * src/SDCCast.c (isConformingBody): fixed bug #949967
4930         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4931         convilong): fixed bug #952086
4932
4933 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4934
4935         * src/SDCCmem.c (allocVariables): fixed bug #955321
4936
4937 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4938
4939         * src/hc08/main.c (_hc08_genAssemblerEnd),
4940         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4941         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4942         completely eliminated the use of a temporary file
4943         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4944         when more than one file linked
4945         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4946
4947 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4948
4949         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4950         which fixes bug #543481
4951         * support/regression/tests/bug-751703.c: fixed comments left from a
4952         cut and paste error
4953         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4954         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4955         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4956         scopes
4957         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4958         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4959         are now changed to underscores in moduleName
4960
4961 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4962
4963         * as/mcs51/lkmem.c: better fix for bug #954173
4964
4965 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4966         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4967
4968         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4969         * device/include/c8051f000.h,
4970         * device/include/c8051f120.h,
4971         * device/include/c8051f300.h,
4972         * device/include/c8051f310.h,
4973         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4974         PWM16) and detab'ed
4975
4976 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4977
4978         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4979         and mailing lists, doc'ed --no-peep-comments, removed reference
4980         to knoppix (newest version has no LyX/LaTeX), other minor changes
4981         * src/SDCCglue.c (glue): save 2 bytes stack space with
4982         option --main-return. The ljmp could probably be avoided too
4983
4984 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4985
4986         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4987
4988 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4989
4990         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4991         * src/SDCCopt.c (isLocalWithoutDef),
4992         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4993         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4994         (credit to Maarten Brock for patch #949363, on which this is based)
4995         * support/regression/tests/bug-751703.c: some test cases of extern used
4996         within inner scopes.
4997
4998 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4999
5000         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5001         SPEC_STRUCT
5002         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5003         struct definitions
5004         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5005         dwWriteLabel): fix to create valid debugger symbols even when
5006         the module name has non-alphanumeric symbols in it
5007         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5008         when a variable's allocation has been optimized away
5009
5010
5011 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5012
5013         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5014         * src/hc08/main.c,
5015         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5016         * src/mcs51/main.c,
5017         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5018         * src/ds390/main.c,
5019         * src/z80/gen.c (z80_emitDebuggerSymbol),
5020         * src/z80/main.c,
5021         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5022         * src/pic/main.c,
5023         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5024         * src/pic16/main.c,
5025         * src/avr/gen.c (avr_emitDebuggerSymbol),
5026         * src/avr/main.c,
5027         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5028         * src/xa51/main.c,
5029         * src/SDCCdebug.c (emitDebuggerSymbol),
5030         * src/SDCCdebug.h,
5031         * src/port.h: added a debugger struct to the port struct. Added a
5032         callback for defining debugger symbols
5033
5034         * src/SDCCast.c (createLabel),
5035         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5036         with isitmp = 1
5037         * src/SDCCicode.h,
5038         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5039         iCode back to the ast for the function
5040
5041         * src/hc08/ralloc.c (hc08_assignRegisters),
5042         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5043         unneeded fields from the regs struct.
5044         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5045         pushReg() & pullReg() functions instead of emitcode()
5046
5047         * src/hc08/gen.c (genLabel, genhc08Code),
5048         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5049
5050         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5051         debugger hooks
5052
5053         * src/hc08/gen.c (genEndFunction, genhc08Code),
5054         * src/hc08/gen.h,
5055         * src/mcs51/gen.c (genEndFunction, gen51Code),
5056         * src/mcs51/gen.h,
5057         * src/ds390/gen.c (genEndFunction, gen390Code),
5058         * src/ds390/gen.h,
5059         * src/z80/gen.c (genEndFunction, genZ80Code),
5060         * src/z80/gen.h,
5061         * src/z80/z80.h,
5062         * src/pic/gen.c (genEndFunction, genpic14Code),
5063         * src/pic/gen.h,
5064         * src/pic16/gen.c (genEndFunction, genpic16Code),
5065         * src/pic16/gen.h,
5066         * src/avr/gen.c (genEndFunction, genAVRCode),
5067         * src/avr/gen.h,
5068         * src/xa51/gen.c (genEndFunction, genXA51Code),
5069         * src/xa51/gen.h,
5070         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5071         specific code to cdbFile.c and out of the backend code generators
5072
5073         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5074         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5075         starting address is now 0
5076
5077         * as/hc08/asm.h,
5078         * as/hc08/m08pst.c,
5079         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5080         assembler directive for DWARF support
5081         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5082
5083         * src/src.dsp,
5084         * src/Makefile.in,
5085         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5086
5087 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5088
5089         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5090         and inappropriate peephole optimization in jump tables
5091
5092 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5093
5094         * as/hc08/m08pst.c,
5095         * src/SDCCglue.c: sdccopt works for the hc08 port now
5096
5097 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5098
5099         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5100
5101 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5102
5103         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5104
5105 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5106
5107         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5108         rules
5109         * src/SDCCmain.c,
5110         * src/SDCCglobl.h,
5111         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5112         comments from the peephole optimizer replacement rules
5113         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5114         symbols
5115         * src/SDCCcse.c (updateSpillLocation),
5116         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5117         equivalents
5118         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5119         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5120         objects far pointers
5121
5122 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5123
5124         * src/SDCCsymt.h: a missing part of my last change
5125         * src/pic/ralloc.c (regTypeNum),
5126         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5127
5128 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5129
5130         * src/SDCCicode.h,
5131         * src/SDCCicode.c (aggrToPtrDclType),
5132         * src/SDCCptropt.h,
5133         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5134         ptrPseudoSymConvert),
5135         * src/pic/ralloc.c (regTypeNum),
5136         * src/pic16/ralloc.c (regTypeNum),
5137         * src/hc08/ralloc.c (regTypeNum),
5138         * src/ds390/ralloc.c (regTypeNum),
5139         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5140         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5141
5142 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5143
5144         * link/z80/lkmain.c (afile),
5145         * as/hc08/lkmain.c (afile),
5146         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5147         prevent a pointer problem when a filename has no directory and
5148         no extension specified.
5149
5150 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5151
5152         * link/z80/lkmain.c (afile): allow periods in directory names
5153         * link/z80/lkmain.c (afile),
5154         * as/mcs51/lkmain.c (afile),
5155         * as/hc08/lkmain.c (afile): allow linker script file to have an
5156         extension other than ".lnk"
5157         * link/z80/lklex.c (getfid),
5158         * link/z80/lkmain.c (parse),
5159         * as/mcs51/lklex.c (getfid),
5160         * as/mcs51/lkmain.c (parse),
5161         * as/hc08/lklex.c (getfid),
5162         * as/hc08/lkmain.c (parse): Support comments in the linker script
5163         file on lines by themselves and after filenames
5164
5165 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5166
5167         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5168
5169 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5170
5171         * src/z80/peeph-z80.def: removed some peephole rules that don't
5172         work with multibyte arithmetic (fixed bug #937126)
5173         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5174         to registers and not global variables
5175         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5176         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5177         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5178         checking for assignments not internally generated (fixed bug #931895)
5179         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5180         structure member (fixed bug #930072)
5181
5182 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5183
5184         * src/SDCCmain.c (linkEdit),
5185         * src/hc08/main.c (_hc08_parseOptions),
5186         * as/hc08/Makefile.in,
5187         * as/hc08/aslink.h,
5188         * as/hc08/asm.h,
5189         * as/hc08/m08pst.c,
5190         * as/hc08/lkrloc.c (relr, rele),
5191         * as/hc08/lkarea.c (lnkarea)
5192         * as/hc08/lkmain.c (afile, parse),
5193         * as/hc08/lkelf.c: support for ELF output
5194         * as/hc08/lks19.c (s19),
5195         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5196
5197 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5198
5199         * as/mcs51/lkihx.c: Fixed bug #899105.
5200
5201 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5202
5203         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5204         .dsp files from Unix to DOS.
5205
5206 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5207
5208         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5209         function pointers; we have been compliant for several months now.
5210         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5211         change that was accidently commented out
5212         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5213         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5214         bug #922319
5215
5216 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5217
5218         * src/hc08/gen.c: output of all of the internal debugging information
5219         is now controlled by the D() macro; it is disabled by default
5220
5221 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5222
5223         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5224         harder to keep the same registers during a CAST iCode
5225         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5226         long via int can be done in a single cast, if the signedness is
5227         correct.
5228         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5229         putchar() in tinibios.c in ds390's library
5230
5231 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5232
5233         * src/SDCCast.c (decorateType): fixed bug #898889,
5234         cast result of a literal complement too
5235         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5236         fixed check for bitfields
5237
5238 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5239
5240         * src/SDCCicode.c (geniCodeLogic): made it static,
5241         (geniCodeLogicAndOr): added in order to fix bug #905492,
5242         (ast2iCode): fixed bug #905492
5243         * support/regression/tests/bug-905492.c: added
5244         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5245         (processParms): fixed bug #927659: don't copy parms, this will clear
5246         decorated flag
5247         * support/regression/tests/bug-927659.c: added
5248
5249 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5250
5251         * src/SDCCast.c (addCast): don't cast float to char
5252         * device/lib/libsdcc.lib: added _memmove
5253
5254 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5255
5256         * device/lib/large/Makefile: fixed parallel execution by
5257         replacing `make` by `$(MAKE)`
5258
5259 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5260
5261         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5262         offsets (fixes bug #923936)
5263
5264 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5265
5266         * device/lib/small/Makefile: fixed parallel execution by
5267         replacing `make` by `$(MAKE)`
5268
5269 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5270
5271         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5272
5273 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5274
5275         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5276         * src/regression/Makefile: Regression test was not running.
5277
5278 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5279
5280         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5281         complement if possible
5282         * src/SDCCval.c (valComplement),
5283         * src/SDCCicode.c (operandOperation): fixed complement of literal
5284         * support/regression/tests/onebyte.c (testComplement): added
5285
5286 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5287
5288         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5289         return an optimized tree; actually replace actParm with the new tree
5290         * src/SDCCast.h: added some parantheses to remove side effects
5291         * support/regression/tests/bug-920866.c
5292
5293 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5294         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5295         Bit operands were not being handled properly in the pic14 port.
5296         (now src/regression/add.c passes again).
5297
5298 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5299
5300         * src/SDCC.y (labeled_statement): case and default no longer require
5301         a following statement (RFE #893037)
5302
5303 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5304
5305         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5306         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5307         disabled (fixes bug #916294)
5308         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5309         "mov a,acc"; patch provided by Lenny Story
5310         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5311
5312 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5313
5314         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5315         functions
5316         * src/ds390/gen.c (genFunction, genEndFunction),
5317         * src/ds390/ralloc.c (ds390_assignRegisters),
5318         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5319         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5320         pushed if there are parameters passed on the stack. Also, a cleaner
5321         way to decide if r0/r1 should be pushed/popped. (Together they fix
5322         bug #918693)
5323
5324 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5325
5326         * doc/sdccman.lyx,
5327         * device/lib/mcs51/crtpagesfr.asm,
5328         * device/lib/mcs51/crtxinit.asm,
5329         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5330         to avoid confusion with Si Lab's SFRPAGE register.
5331
5332 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5333
5334         * src/SDCCglue.c (emitMaps): allow public sfr variables
5335         * src/SDCCglue.c (initialComments): include compiler build date
5336         with compiler version and put the timestamp of the generated
5337         assembly file on a serperate line to be less confusing.
5338         * src/port.h: added genInitStartup hook
5339         * src/avr/main.c,
5340         * src/ds390/main.c,
5341         * src/hc08/main.c,
5342         * src/pic/main.c,
5343         * src/pic16/main.c,
5344         * src/xa51/main.c,
5345         * src/z80/main.c: genInitStartup initialize as NULL (default to
5346         historical behaviour)
5347         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5348         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5349         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5350         library instead of hard coding it into the compiler.
5351         * support/regression/ports/mcs51-stack-auto/spec.mk,
5352         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5353         * device/lib/mcs51/Makefile,
5354         * device/lib/small/Makefile,
5355         * device/lib/large/Makefile,
5356         * device/lib/mcs51/crtpagesfr.asm,
5357         * device/lib/mcs51/crtstart.asm,
5358         * device/lib/mcs51/crtxclear.asm,
5359         * device/lib/mcs51/crtxinit.asm,
5360         * device/lib/mcs51/crtclear.asm,
5361         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5362         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5363         and into user configurable files.
5364         * device/lib/clean.mk: clean mcs51 directory too
5365         * support/regression/tests/longlit.c: added static to T1 declaration
5366         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5367         accesses in the initialization code
5368
5369 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5370
5371         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5372         OSCTRIMVAL as noted in bug #916008
5373
5374 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5375
5376         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5377         in loops with multiple exits (reported as incorrect registers
5378         used by Martin Helmling in Sdcc-user list)
5379
5380 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5381
5382         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5383         made ds390 register extensions look less like error messages
5384
5385 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5386
5387         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5388         reported by Adam Wozniak in Sdcc-user list
5389
5390 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5391
5392         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5393         arithmetic optimizations, added debug output
5394
5395 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5396
5397         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5398         * sdcc.spec: updated and split sdcc into 3 rpms
5399         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5400         needed for literals of LEFT_OP and '+'
5401         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5402         introduced RESULT_TYPE_NOPROM
5403         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5404         left shift
5405         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5406         limited promotion to int only for '*'
5407         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5408
5409 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5410
5411         * src/pic16/gen.c (genSkip),
5412         (genc16bit2lit), (gencjneshort): commented out
5413         (is_LitOp): new helper function, checks operand type
5414         (genCmpEq): rewritten
5415
5416 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5417
5418         * support/regression/tests/bug-908454.c: added
5419
5420 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5421
5422         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5423         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5424         (geniCodeCast): cosmetic, don't preserve bit storage class
5425         (geniCodeLeftShift): added promotion
5426         (geniCodeLogic): fixed regression
5427         * src/SDCCsymt.c (computeTypeOr): accept bits too
5428         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5429
5430 2004-03-07  Borut Razem <borut.razem AT siol.net>
5431
5432         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5433
5434 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5435
5436         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5437         version of pic16_genPackRegisters which does not check if ic is a
5438         CAST operator,
5439         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5440         function cause string1.c regression test fails
5441
5442 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5443
5444         * sim/ucsim/configure.in,
5445         * sim/ucsim/configure,
5446         * sim/ucsim/doc/Makefile.in: use docdir
5447         * src/SDCC.y: fixed sbit atrributes
5448         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5449         * src/SDCCast.c (decorateType): |^& need special promotion handling
5450         * src/SDCCast.h,
5451         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5452         * src/SDCCsymt.h (computeType),
5453         * src/SDCCicode.c: computeType() needs op
5454         * src/SDCCsymt.c (checkTypeSanity),
5455         * doc/sddman.lyx: "plain" bitfields are unsigned
5456         * src/SDCCsymt.c (computeTypeOr): added
5457         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5458         |^& ops
5459         * src/SDCCval.c (val*): computeType() needs op
5460         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5461         * support/regression/tests/onebyte.c: added tests for |^&
5462
5463 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5464
5465         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5466         for writing icode into asm output.
5467
5468 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5469
5470         * src/pic16/device.c: added some debug lines enabled
5471         with macro DEBUG_CHECK,
5472         * src/pic16/genarith.c: more debug in genPlus,
5473         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5474         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5475         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5476         * (aopForSym): onStack symbols are re-placed in data memspace,
5477         and onStack flag is cleared,
5478         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5479         copy temporary pcodeop,
5480         * (genPcall): added warning for not updating PCLATU,
5481         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5482         always true for pic16 port,
5483         * (genMultOneWord): NEW, supports integer multiplication,
5484         * (genMult): modified to call genMultOneWord,
5485         * (ifxForOp): added warning when return NULL,
5486         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5487         flag is set before call to operandFromSymbol for implicit
5488         added structures,
5489         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5490         options.intlong_rent are set by default,
5491         * (_hasNativeMulFor): modified to allow port generation of integer
5492         multiplication,
5493         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5494         set regtype to REG_SFR for all registers, restricting seting the
5495         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5496
5497 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5498
5499         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5500         more than 500 times in the regression tests
5501
5502 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5503
5504         * support/Util/SDCCerr.h,
5505         * support/Util/SDCCerr.c,
5506         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5507         enumerator_list),
5508         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5509         for symbol conflicts.
5510         * support/valdiags/tests/enum.c,
5511         * support/valdiags/tests/tentdecl.c,
5512         * support/valdiags/tests/struct.c: expect possible error messages
5513         referring to original symbol definitions.
5514         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5515         * src/SDCCsymt.h,
5516         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5517
5518 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5519
5520         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5521
5522 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5523
5524         * src/pic16/ralloc.c (newReg): fixed bug #908929
5525
5526 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5527
5528         * src/ds390/gen.c: added missing #include "main.h"
5529
5530 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5531
5532         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5533         checking if symbol is already in set,
5534         * src/pic16/device.h: prototype for checkAddSym,
5535         * src/pic16/gen.c: (_G): added entry interruptvector,
5536         * (assignResultValue): removed some commented out lines,
5537         * (genFunction): check for ISR via sym->type, absolute section for
5538         interrupt code is created via a new pBlock, the goto instruction is
5539         placed now correctly at the interrupt vector position, changed all
5540         references from ivec to _G.interruptvector,
5541         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5542         is the interrupt is a high priority one, same for return from ISR,
5543         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5544         externs to calls of checkAddSym,
5545         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5546         pic16_pcode_verbose flag is set,
5547         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5548         * src/pic16/pcoderegs.c: message about how many registers are saved
5549         will only be emitted if pic16_pcode_verbose flag is set,
5550
5551 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5552
5553         * src/ds390/ralloc.h,
5554         * src/ds390/ralloc.c (ds390_regWithIdx),
5555         * src/ds390/gen.c (emitcode),
5556         * src/ds390/main.h,
5557         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5558         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5559         ds390operandCompare, getRegsRead, getRegsWritten,
5560         initializeAsmLineNode): customized instruction size calculation for
5561         ds390, started basis for some register optimizations
5562         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5563         corresponding assembly output
5564         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5565         missing push/pop of r0/r1. Optimized push/pops
5566
5567 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5568
5569         * src/mcs51/main.c (instructionSize): fixed ACALL size
5570         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5571
5572 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5573
5574         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5575         the sorting of rlist with NULL elements
5576         * (print_idataType, print_idata): NEW to create idata sections
5577         * src/pic16/device.h: idataSymSet new variable
5578         * src/pic16/gen.c (genFunction): fixed some bugs in string
5579         comparing, improved the absolute section creation for ISRs,
5580         added FSR0L/FSR0H in registers that are saved in an ISR,
5581         * (genInline): fixed the processing of inline snippets,
5582         now they undergo no process by the peephole optimizer
5583         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5584         are placed in idataSymSet,
5585         * (pic16emitStaticSeg): extern symbols are added in externs,
5586         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5587         switching when aboslute variables are placed in access bank memory
5588         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5589         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5590         commented out with #if,
5591         * (pic16_packRegisters): reintroduce the check for CAST because some
5592         symbols are not correctly handled,
5593         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5594         pCodeInstruction instead of pCode,
5595         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5596         pCodeAsmDir definition,
5597         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5598         directive, then the argument directive is emitted without the leading
5599         tab, hack for inline labels which must be in the first column,
5600         * (compareLabel,pic16_findNextInstruction),
5601         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5602         * (insertBankSwitch): modified for the new pCodeAsmDir,
5603
5604 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5605         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5606
5607         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5608         instance,
5609         * (pushSide): commented out with #if,
5610         * (assignResultValue): fixed some typos in saving
5611         registers,
5612         * (genPcall): FIXED and sync'ed with genCall,
5613         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5614         * (genNearPointerGet): fixed to handle some more cases,
5615         implementation scheme via table reads,
5616         * (genConstPointerGet): modified to access code memory correct,
5617         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5618         and improved to handle some cases
5619         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5620         instead of "RETLW" for init data
5621         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5622         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5623         variables are placed in access bank memory (<0x80 and >=0xf80),
5624         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5625         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5626         TBLWT_POSTDEC,TBLWT_PREINC
5627         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5628         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5629         directives
5630         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5631         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5632         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5633         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5634
5635 2004-02-29  Borut Razem <borut.razem AT siol.net>
5636
5637         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5638         support/Util/findme.h, support/Util/system.h: enhance binary relative
5639         search for lib and include by using findProgramPath()
5640
5641 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5642
5643         * src/SDCCpeeph.h,
5644         * src/SDCCpeeph.c (pcDistance),
5645         * src/port.h,
5646         * src/mcs51/ralloc.h,
5647         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5648         * src/mcs51/main.h,
5649         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5650         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5651         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5652         size calculation port specific, started basis for some register
5653         optimizations
5654         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5655         missing push/pop of r0/r1. Optimized push/pops
5656         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5657         * device/lib/_modsint.c (_modsint),
5658         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5659         and stack version so regression tests pass
5660
5661 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5662
5663         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5664         * src/SDCCast.c (decorateType): catch another small optimization
5665         with '?' operator
5666         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5667         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5668         modified to finally use computeType() all over SDCC,
5669         see Feature Request #877103
5670         * src/SDCCval.h: cosmetic
5671         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5672         valCompare(); regression tested in muldiv.c
5673         * support/regression/tests/muldiv.c (testMod): mod sign follows
5674         dividend only
5675
5676 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5677
5678         * src/SDCCast.c (decorateType): fixed bug #902362
5679         * doc/INSTALL.txt: fixed install instructions for win32
5680
5681 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5682
5683         * device/include/Makefile.in (install): fixed by replacing spaces
5684         by tabs
5685         * doc/README.txt,
5686         * doc/INSTALL.txt: updated for release
5687         * doc/sdccman.lyx: added warning for --xstack being buggy
5688
5689 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5690
5691         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5692         to eliminate build warnings.
5693         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5694
5695 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5696            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5697
5698         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5699         removed -penable-stack, added comment for stack pragma, added
5700         warning for not initializing the stack/frame registers, removed
5701         comment at interrupts section
5702
5703         Stack is made permanent, there is no ability to disable stack usage.
5704         * src/pic16/device.h,
5705         * src/pic16/device.c: removed all references to USE_STACK macro,
5706         * src/pic16/device.c (pic16_dump_section): when no elements in
5707         rlist, free rlist before return,
5708         * (pic16_dump_int_registers): NEW, internal registers are a new set
5709         of general purpose registers reused by each function,
5710         * (checkAddReg): returns 1 if registers is added to set,
5711         * (pic16_groupRegistersInSection): when a registers is of type
5712         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5713         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5714         SRCASECMP macro is moved here from device.c
5715         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5716         PO_PCLATU, PO_PRODL, PO_PRODH,
5717         * (pic16_pCodeOpType, genMinus,
5718         changed compares to "a" register, with AOP_ACC,
5719         * (pic16_genPlus): fixed some bugs and indented properly,
5720         * (pic16_addSign): changed size to size+offset in the MOVWF
5721         instruction,
5722         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5723         multiply 8-bit operand by literal, result is 8-bit,
5724         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5725         multiply 2 8-bit operand, result is 8-bit,
5726         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5727         genUMult8X*_16,
5728         * src/pic16/gen.c: changed accUse to contain WREG only,
5729         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5730         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5731         true, do not use immediate addressing any more unless sym is a
5732         pointer in codespace,
5733         * (aopForRemat): do not use immediate addressing when symbol not in
5734         codespace and when symbol's address is requested,
5735         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5736         accUse size (= 1),
5737         * (aopGet): added case for AOP_ACC and don't return "accumulator
5738         bug" but WREG instead,
5739         * (popGetTempReg): pushes contents of temporary register in stack,
5740         * (popReleaseTempReg): pops contents of temporary register from
5741         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5742         * (pic16_popGet): separated case AOP_ACC to return register WREG
5743         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5744         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5745         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5746         the use of immediate pointers to certain cases only.
5747
5748         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5749         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5750         * (assignResultValue, genCall, genRet): modified to use the new
5751         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5752         genPcall is still broken,
5753         * (genFunction): added code to create 'A' type pBlocks when
5754         interrupt functions are generated, code not extensively tested yet,
5755         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5756         * (genEndFunction): modified so ISRs pop stored registers from stack,
5757         * (genMultOneByte): cleanup,
5758         * (AccRsh): added flag andmask, to and result with appropriate mask,
5759         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5760         * (genDataPointerGet): fixed and reenabled its use,
5761         * (genNearDataPointerGet): bugs fixed,
5762         * (genDataPointerSet): bugs fixed,
5763         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5764         pic16_DumpSymbol, pic16_DumpOp,
5765         * src/pic16/genutils.h: function prototypes for the above functions,
5766         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5767         pointers,
5768         * (pic16emitRegularMap): many many many improvements, but needs a
5769         major cleanup,
5770         * src/pic16/main.c: enable_stack in pic16_options is removed,
5771         * (_pic16_parseOptions): removed command line options -penable-stack,
5772         * (_process_pragma): emit stack symbol only when stack pragma is
5773         processed,
5774         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5775         redirected to FSR0L/FSR0H pair,
5776         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5777         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5778         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5779         for immediates,
5780         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5781         * (dumpPicOptype): NEW,
5782         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5783         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5784         with movff instruction,
5785         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5786         added pic16_int_regs, some packRegsFor* functions are commented out,
5787         because produce errors,
5788         * src/pic16/NOTES: minor modifications
5789
5790 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5791
5792         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5793         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5794         --pack-iram.
5795         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5796         * as/mcs51/lkaomf51.c: fixed bug #895763
5797
5798 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5799
5800         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5801
5802 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5803
5804         * doc/sdccman.lyx: added details about the HC08 storage classes and
5805         interrupts, fixed the register usage info for z80 & gbz80
5806
5807 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5808
5809         * doc/sdccman.lyx: added more pic16 port documentation
5810         * device/include/pic16/: added header pic18fregs.h
5811
5812 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5813
5814         * doc/sdccman.lyx: added Vangelis' contribution
5815
5816 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5817
5818         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5819         extend to the next CALL or PCALL, not just to the next CALL.
5820
5821 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5822
5823         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5824
5825 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5826
5827         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5828         bug #895752 and a better fix for bug #716790
5829
5830 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5831
5832         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5833
5834 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5835
5836         * doc/sdccman.lyx: minor changes, minor changed
5837
5838 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5839
5840         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5841         which can't handle SDCC_NEWONEBYTEOPS,
5842         (geniCodeMultiply): removed conversion from mult to shift for pic14
5843         and pic16
5844
5845 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5846
5847         * src/hc08/gen.h,
5848         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5849         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5850         thus fixing bug #895406
5851
5852 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5853
5854         * device/lib/_modsint.c,
5855         * device/lib/_modslong.c: sign follows divisor only
5856         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5857         signs or signedness can be ignored
5858         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5859         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5860         added optimization for IFX,
5861         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5862         arguments;
5863         reenabled optimization for IFX, which was removed on 2004-01-11
5864         * src/SDCCast.h: added return type IFX
5865         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5866         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5867         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5868         SDCC_OLDONEBYTEOPS selects the old behaviour
5869         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5870         changed again and commented promotion rule
5871         * src/SDCCval.c (valDiv): promotion no longer necessary
5872         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5873         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5874         rewritten
5875         * support/regression/tests/onebyte.c: added
5876
5877 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5878
5879         * gen.c (genInline): reverted to old code for assemnling inline
5880         code because of bug reported James Chadd
5881
5882 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5883
5884         * ralloc.h: missing declarations from previous patch,
5885         seems that patch for ralloc.h was never applied, fixed
5886
5887 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5888            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5889
5890         * pcode.c,
5891         * pcode.h,
5892         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5893         indirect addressing. Marked FSR0 as deprecated
5894         * gen.c (pointerCode): commented out, not needed now
5895         (pic16_popGet2p): new MOVFF helper function
5896         (genGenPointerGet),
5897         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5898         (shiftRLong): removed duplicate debugging info
5899
5900 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5901
5902         * src/ds390/gen.c (genNearPointerGet),
5903         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5904         optimization with bits, but not bitfields.
5905         * src/ds390/ralloc.c (packRegisters),
5906         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5907
5908 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5909
5910         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5911
5912 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5913
5914         * src/SDCCsymt.h,
5915         * src/SDCCicode.c (operandFromSymbol),
5916         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5917         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5918         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5919         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5920         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5921         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5922         bug #892038
5923         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5924         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5925         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5926         * src/SDCCsymt.c (newSymbol),
5927         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5928         enumerator_list),
5929         * src/SDCCval.h,
5930         * src/SDCCval.c (newiList): fixed bug #885705
5931
5932 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5933
5934         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5935         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5936
5937 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5938
5939         * device/include/c8051f120.h,
5940         * device/include/c8051f300.h,
5941         * device/include/c8051f310.h: added/updated header files for Silicon
5942         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5943         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5944         in new section Submitting patches
5945
5946 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5947
5948         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5949         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5950         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5951         genGenPointerSet),
5952         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5953         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5954         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5955         genGenPointerSet),
5956         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5957         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5958         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5959         genGenPointerSet),
5960         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5961         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5962         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5963         genGenPointerSet): fixed bug #892400
5964         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5965         to eliminate build warnings.
5966         * src/SDCCast.c (processParms),
5967         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5968         fixed bug 751859
5969         * support/valdiag/valdiag.py: added GCC to the list of defines active
5970         when compiling with gcc
5971
5972 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5973
5974         * support/Util/SDCCerr.h,
5975         * support/Util/SDCCerr.c,
5976         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5977         with an incomplete type (fixed bug #883734)
5978         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5979
5980 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5981
5982         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5983
5984 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5985
5986         * src/SDCCast.c (decorateType),
5987         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5988         function pointer implementation
5989         * support/regression/tests/funptrs.c: added tests to verify both forms
5990         of function pointers work correctly. Added tests to verify parameters
5991         are passed in the correct order.
5992
5993 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5994
5995         * device.c (regCompare): registers are sorted by ascending
5996         address and increasing size,
5997         * main.c (_pic16_finaliseOptions): removed the declaration
5998         of compiler macro MCU. Now a macro of the format pic18fxxxx
5999         will be defined from the command line
6000
6001 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6002             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6003
6004         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6005         PCOP_RLCF was overwritten!
6006         * gen.c (genSkip): commented out calls to pic16_emitcode,
6007         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6008         * (genlshTwo),
6009         * (genRRC): added debugging info,
6010         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6011         overwritten while shifting,
6012         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6013         overwritten while shifting,
6014         * (AccLsh),
6015         * (AccRsh),
6016         * (shiftLLeftOrResult),
6017         * (shiftRLeftOrResult),
6018         * (shiftRLong),
6019         * (shiftLLong): Implemented with pic16_emitpcode
6020         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6021         * (genLeftShift): Fixed bug, operand for shift by variable always
6022         was "and"ed with 0x0f,
6023         * (genLeftShiftLiteral),
6024         * (genrshTwo),
6025         * (genRightShiftLiteral): added debugging info,
6026         * (genrshFour): added comment,
6027         * (genRightShift): determined signedness from operand "left"
6028         instead of "result"
6029
6030 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6031
6032         * src/SDCCicode.c (geniCodeParms),
6033         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6034         function pointers, fixed function pointer bugs #861242 and #861896
6035
6036 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6037
6038         * device/include/c8051f000.h,
6039         * device/include/c8051f120.h,
6040         * device/include/c8051f300.h: added header files for Silicon
6041         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6042
6043 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6044
6045         * src/SDCCast.c (processParams): added new type flow and restructured
6046         (gatherAutoInit): added new type flow
6047         (addCast): cosmetic changes
6048         (getLeftResultType): added new type flow for array indices, patch
6049         provided by Stas, see FR #877103
6050         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6051         array index patch by Stas
6052         * src/SDCCast.h: added prototype getResultTypeFromType()
6053         * src/SDCCval.h,
6054         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6055         * src/pic/glue.c (pic14emitStaticSeg),
6056         * src/pic16/glue.c (pic16emitStaticSeg),
6057         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6058         for initialization of symbols
6059         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6060         * support/Util/SDCCerr.h:
6061         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6062         * .version: bumped version number to 2.3.8
6063         * device/include/Makefile.in (install),
6064         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6065         avoid warnings
6066
6067 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6068
6069         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6070         Slade Rich fixed an optimization bug
6071         * src/pic/pcodepeep.c,
6072         * src/pic/pcoderegs.c
6073         * doc/Makefile (install): added test for directory
6074
6075 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6076
6077         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6078         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6079         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6080         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6081         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6082         * as/mcs51/asexpr.c (term),
6083         * as/hc08/asexpr.c (term): fixed bug #887146
6084
6085 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6086
6087         * src/z80/gen.c (genMult): handle single byte result product
6088         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6089         DUMMY_READ_VOLATILE (fixed bug #886367)
6090
6091 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6092
6093         * support/regression/tests/libmullong.c: fixed logic, on little endian
6094         hosts we ended without a mullong_wrapper()
6095
6096 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6097
6098         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6099         virus/worm forged address usage.
6100
6101 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6102
6103         Fixed promotion, it should be done on AST level:
6104         * src/SDCCast.c (addCast): added promotion to int
6105         (decorateType): updated call to upCast()
6106         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6107         usualUnaryConversions()
6108
6109 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6110
6111         * support/regression/tests/literalop.c (mulWrapper): Added a
6112         wrapper to remove integer overflow warnings.
6113
6114         * support/regression/tests/float_trans.c: Made work on host.
6115
6116         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6117         location of sz80.
6118
6119         * support/regression/generate-cases.py (main): Changed from inline
6120         to a main method.
6121
6122         * doc/Makefile (install): Changed to depth first to get rid of
6123         missing directory install warning.
6124
6125         * as/Makefile (install-doc): Made work on Mac.
6126
6127 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6128
6129         * src/SDCCast.c: added an additional type flow in decorateType() of
6130         opposite direction, see feature request #860006; it's enabled at runtime
6131         by setting the environment variable SDCC_NEWTYPEFLOW
6132         * src/SDCCast.h: changed prototype of decorateType()
6133         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6134         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6135         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6136         see feature request #877103
6137         * src/SDCCval.c: updated call of decorateType()
6138         (valBitwise): fixed bug #882876
6139         (valMinus): added promotion
6140         (valLogicAndOr): result is unsigned
6141         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6142         * src/SDCCsymt.c (computeType),
6143         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6144         must not cause an unsigned operation
6145         * src/pic/glue (pic14emitRegularMap),
6146         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6147
6148 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6149
6150         * src/pic/pcode.c (PCodeID): commented out left over debug code
6151
6152 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6153
6154         * support/valdiag/tests/overflow.c: added shift tests
6155         * src/pic/device.c,
6156         * src/pic/gen.c,
6157         * src/pic/gen.h,
6158         * src/pic/glue.c,
6159         * src/pic/main.c,
6160         * src/pic/pcode.c,
6161         * src/pic/pcode.h,
6162         * src/pic/pcodepeep.c,
6163         * src/pic/pcoderegs.c,
6164         * src/pic/ralloc.c,
6165         * src/pic/ralloc.h: applied patch from Slade Rich;
6166         added support for multiple code pages and multiple RAM banks on the
6167         PIC 14 port. The ASM files now no longer simply assume all the
6168         code / RAM are in the same page / bank. This means the linker can
6169         safely allocate code/RAM of separate ASM files to different pages/banks.
6170         * doc/sdccman.lyx: added Slade's tips
6171         * src/mcs51/peeph.def: fixed bug #880768
6172
6173 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6174
6175         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6176         * src/SDCCast.c (decorateType): fixed bug #880197
6177
6178 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6179
6180         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6181         getopt.h.
6182
6183         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6184         strtof is not part of C89 and isn't included with Mac OS X.
6185
6186 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6187
6188         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6189         shiftL2Left2Result): fixed bug #879326
6190         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6191         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6192         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6193         address fetch for clr instruction
6194         * device/lib/hc08/_mulint.c: created optimized assembly version
6195         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6196
6197 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6198
6199         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6200         proposed in FR #877103
6201
6202 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6203
6204         * src/SDCCval.c (cheapestVal): added missing checks
6205         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6206         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6207
6208 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6209
6210         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6211         equal operands
6212
6213 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6214
6215         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6216         loaded with the linker search paths (-L arguments) and the libraries
6217         to be linked with the current source (-l arguments). Changes
6218         currently will affect only the pic16 port.
6219         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6220         include path the port specific paths and port specific libraries,
6221         * gplink command now contains the $3 argument,
6222         * src/pic16/device.h,
6223         * src/pic16/device.c,: structure PIC_device is made public and
6224         renamed to PIC16_device, the same for variable Pics which is renamed
6225         to Pics16. Updated all references to them.
6226         * src/pic16/glue.c (pic16glue): corrected bug with code
6227         initialization which bypassed the variable initializations block.
6228
6229         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6230         COMPILE_FLAGS and added the --nostdinc option
6231
6232 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6233
6234         * device/include/mc68hc908jb8.h: Register defs for another member
6235         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6236
6237 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6238
6239         Documenting changes from previous commits.
6240         * configure.in (version 1.56),
6241         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6242         when generating output files to configure the pic16 library,
6243         but now I've commented it out, since gputils aren't installed in the
6244         SF compile farm, so library won't compile
6245
6246         * device/lib/Makefile.in (version 1.56): initially I've added in
6247         target 'all' the prerequestive 'model-pic16' so it compiled the
6248         pic16 library, but now I've commented it out for the same reasons
6249         above,
6250         * added targets 'model-pic16' and 'objects-pic16' to compile the
6251         library
6252         * added target 'port-specific-objects-pic16' to handle the
6253         generated libraries and copy them into the build/ directory
6254         * added target 'clean-intermediate-pic16' to clean intermediate
6255         files into pic16 directory
6256         * in target 'installdirs' added line to create directory pic16 in
6257         the installation path
6258
6259         * device/include/Makefile.in (version 1.11): in target 'install'
6260         added lines to copy all header files to installation path,
6261         * in target 'installdirs' added line create directory for pic16
6262         headers in the installation path
6263
6264 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6265
6266         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6267          a function call
6268
6269 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6270
6271         * configure,
6272         * device/lib/configure.in,
6273         * device/lib/configure: fixed for autoconf 2.57
6274
6275 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6276
6277         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6278         option so that it actually works. Made it specific to the z80, since
6279         the gbz80 doesn't have these kinds of I/O ports.
6280
6281 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6282
6283         * device/include/z180.h,
6284         * device/lib/_memcpy.c,
6285         * device/lib/_memmove.c,
6286         * device/lib/_mulint.c,
6287         * device/lib/ser_ir.c,
6288         * device/lib/ser_ir_cts_rts.c,
6289         * device/lib/_strcmp.c,
6290         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6291         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6292         portmode; added deprecation warning for bank= and protmode= forms.
6293         Also, guard against buffer overflow.
6294         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6295
6296 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6297
6298         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6299         changed interrupt vector table generation to only emit declared vectors.
6300         * device/include/Makefile.in: added missing backslash
6301         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6302
6303 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6304
6305         Mainly changes to support compilation of the device libraries
6306         * src/pic16/device.c: stack is allocated via symbol and not
6307         via literal number. The symbol is placed in the corresponding
6308         position of the data ram
6309         * (pic16_dump_section): relocatable and absolute uninitialized
6310         data are now emitted in sorted order to reduce section naming,
6311         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6312         weren't marked as being in the access bank,
6313
6314 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6315
6316         Added portion of GNU PIC Library under the directory
6317         device/include/pic16 and device/lib/pic16. These files
6318         contain the declarations of SFRs for the PIC18Fxx2 devices.
6319         The directory is initialized via configure from toplevel.
6320
6321 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6322
6323         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6324         the spilllocations to be compared correctly
6325
6326 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6327
6328         * src/SDCCast.c (decorateType): fixed bug introduced today
6329
6330 2004-01-12  Borut Razem <borut.razem AT siol.net>
6331
6332         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6333         doc/sdccman.lyx: upper case pragmas are deprecated
6334
6335 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6336
6337         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6338         in simpler and even better code
6339
6340 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6341
6342         * src/SDCCicode.c (operandOperation): fixed bug #874819
6343         * src/SDCCast.c (decorateType): fixed
6344         char foo (unsigned long ul) { return ul > 0; }
6345
6346 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6347
6348         * doc/sdccman.lyx: Moved and added some sections, small changes
6349         all over. Telling LaTeX to be less strict with word spacing
6350         to better keep the right margin. Changed some notes about
6351         maintainance of the ports in section 3.2.1 - is it OK like this?
6352
6353 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6354
6355         SDCC source changes:
6356         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6357         convilong): modified to inform the pic16 port that builtin functions
6358         are external
6359
6360         PIC16 PORT specific changes:
6361         * src/pic16/device.c pic16_dump_equates() added,
6362         processor registers declared internally by the port are emitted in
6363         the translation as equates,
6364         * src/pic16/gen.c: inline code is passed unprocessed to the
6365         translation,
6366         * (pic16_popGetLit2): fnuction modified to take second operand as
6367         pCodeOp pointer and not as literal,
6368         * (popRegFromIdx): prefixed with pic16_,
6369         * (pic16_popCombine2): modified to receive already allocated pCode
6370         operands,
6371         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6372         * (genFunction): initializes local stack frame and pushes on stack
6373         all the registers used by this function,
6374         * (genEndFunction): restores all registers from stack and restores
6375         stack frame,
6376         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6377         improvements,
6378         * (pic16glue): changed the program startup sequence,
6379         * added new dbName code 'A' for functions placed in absolute section
6380         * src/pic16/main.c: added function attribute _naked,
6381         * added pragma 'code' to place a fnuction at an absolute address,
6382         * added command line arguments --debug-ralloc and --pcode-verbose,
6383         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6384         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6385         * (pic16_newpCodeOpLit2): modified to take the second operand as
6386         pCodeOp pointer,
6387         * (pic16_printpBlock): modified to emit each function in a separate
6388         section,
6389         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6390         UPPER for immediate operands,
6391         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6392         instruction,
6393         * src/pic16/peeph.def: all peepholes with movff are commented out,
6394         because there is a problem in the pcode peep optimizer,
6395         * src/pic16/ralloc.c: the register allocator can now reuse local
6396         function symbols for another function. This saves register usage.
6397         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6398
6399         Added file src/pic16/NOTES with information about program writing on
6400         the current port version.
6401
6402 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6403
6404         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6405         and peephole 252 (array access)
6406
6407 2004-01-09  Borut Razem <borut.razem AT siol.net>
6408
6409         * src/SDCCmain.c : fixed #872250: -l command line defined library
6410           files are scanned before standard library files
6411
6412 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6413
6414         * src/SDCCast.c (decorateType): fixed bug #874046
6415
6416 2004-01-09  Borut Razem <borut.razem AT siol.net>
6417
6418         * support/scripts/sdcc.nsi: remove previous installation
6419
6420 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6421
6422         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6423         bytes for last interrupt vector (mcs51)
6424         * sdcc.spec: fixed typo
6425
6426 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6427
6428         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6429         gen51Code): more efficient parameter receive for --model-large
6430         ("bug" #845294)
6431
6432 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6433
6434         * src/ds390/main.c,
6435         * src/z80/main.c: added missed needLinkerScript flags (more than
6436         one port structure defined in these file)
6437         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6438         bug #795325
6439
6440 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6441
6442         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6443         * src/port.h: added flag needLinkerScript in port->linker
6444         structure to inform whether to create a .lnk file or not,
6445         * src/avr/main.c,
6446         * src/ds390/main.c,
6447         * src/hc08/main.c,
6448         * src/mcs51/main.c,
6449         * src/pic/main.c,
6450         * src/pic16/main.c,
6451         * src/xa51/main.c,
6452         * src/z80/main.c: changed appropriately to configure
6453         needLinkerScript flag
6454         * src/pic/gen.c,
6455         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6456         * src/pic/glue.c: added variable udata_section_name to
6457         override default uninitialized data segment definition for
6458         devices only with SHAREBANK memory (reported from Erik Epetrich)
6459         * (pic14emitOverlay): modified to emit a commented overlay segment
6460         directive when no overlay data exist
6461         * (picglue): modified to emit uninitialized data segment
6462         according to udata_section_name
6463         * src/pic/main.c (_pic14_parseOptions): added command line
6464         options --udata-section-name=[name] to override default
6465         udata definition name
6466         * modified _linkCmd and _asmCmd to include compiler passed
6467         arguments via -W option
6468         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6469         object file from '.rel' to '.o' in port->linker structure,
6470         changed size of fptr from 2 to 3 in port structure
6471
6472 2004-01-07  Borut Razem <borut.razem AT siol.net>
6473
6474         * support/scripts/sdcc.nsi: update PATH
6475         * support/scripts/sdcc.ico: craeted
6476
6477 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6478
6479         * device/include/Makefile.in: fix install
6480         * doc/Makefile: fix install
6481
6482 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6483
6484         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6485         in bug #860505
6486         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6487         how the function variable allocation summary is displayed; also
6488         include information about variables allocated to the overlay
6489         segment
6490
6491 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6492
6493         * as/mcs51/lkmain.c: Help about -Y option
6494         * as/mcs51/lkarea.c: Fixed gcc warnings
6495
6496 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6497
6498         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6499         fixed warning
6500         * support/valdiag/tests/overflow.c: added
6501         * src/SDCCast.c (decorateType),
6502         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6503         LEFT_OP (left shift)
6504
6505 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6506
6507         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6508         (default behaviour).
6509
6510 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6511
6512         A python script to validate compiler diagnostic messages. It can be
6513         used to verify that sdcc complains about bad c source code and
6514         gives a good location of the error.
6515         * support/valdiag/Makefile,
6516         * support/valdiag/valdiag.py,
6517         * support/valdiag/tests/*
6518
6519 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6520
6521         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6522         * src/SDCCsymt.c (newEnumType),
6523         * src/SDCCsymt.h
6524         * support/Util/SDCCerr.c,
6525         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6526         enum related bugs.
6527         * support/regression/tests/enum.c: added test for enum values that
6528         require at least 2 bytes of storage.
6529
6530 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6531
6532         * src/common.h: added ifndef/define/endif macros
6533         around the header file.
6534         Bug reported from Jesus Calvino-Fraga
6535
6536 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6537
6538         * sdcc.spec: updated
6539         * device/include/Makefile.in: don't install CVS directories
6540         * device/lib/Makefile.in: added removal of CVS directories after install
6541         * doc/Makefile: fixed install, added local_icons
6542         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6543         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6544         * src/ds390/gen.c (genRightShift): fixed bug #870788
6545         * src/SDCCast.c (decorateType): fixed bug #870781
6546
6547 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6548
6549         PIC16 port related changes:
6550         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6551         added variable stackPos,
6552
6553         * gen.c: genCall, assignResultValue: added support for
6554         pushing/retrieving function parameters to/from stack,
6555         genFunction,genEndFunction: setup stack frame for the
6556         generated function,
6557         genAddrOf: will be changed according to bug 863624
6558
6559         * added files genutils.c and genutils.h which contain gen*
6560         debugged and optimised functions extracted from gen.c
6561
6562         * glue.c: added variable 'externs' which holds extern symbols,
6563         pic16emitRegularMap: is modified to properly handle relocatable
6564          symbols under the new scheme,
6565         pic16createInterruptVect: is modified
6566         pic16printPublics: is modified to emit 'global' assembler directives,
6567         added pic16_printExterns to print extern symbols,
6568         pic16glue: initializes stack/frame pointer in the beginning of
6569         the assembly output. Temporary hack, will be corrected later,
6570         because gplink yet does not support stack and SDCC does not
6571         yet support a type of crt0.o object to create the final binary.
6572
6573         * Removed many lines that contain 8051 legacy code.
6574         * The code is finally placed under a 'code' directive.
6575         * Added port specific options.
6576
6577         * _process_pragma: simplified since now we do not need *special*
6578         include file to define SFR registers. But a separate header
6579         will be needed. This will be developed later.
6580         * _pic16_parseOptions: added, parses port specific options:
6581         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6582         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6583         --preplace-udata-with=
6584
6585         * _pic16_setDefaultOptions: modified to initialize section names,
6586         but hack is temporarly out of order since it needs improvement.
6587         * _pic16_genAssemblerPreamble: configuration words are emitted by
6588         their address instead of their name. This part is incomplete and
6589         supports only the 18Fxx2 devices. Other devices will emit an error
6590         during assembly since they do not contain the same set of config
6591         registers
6592         * _pic16_genIVT: is modified,
6593
6594         * pcode.c: added definitions for some hardware registers that are needed
6595         for stack support
6596         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6597         All PCI entries are updated. Now LFSR is supported.
6598         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6599         * added pic16_newpCodeOpLit2 to support instructions with
6600         two literal arguments
6601         * pic16_pCode2str: corrected code that emits assembler instructions
6602         with two literal operands and those that have an access bit modifier
6603         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6604         this fixes a bug which caused some labels to be lost, when an
6605         assembler directive was added, i.e. banksel,
6606         * pic16_FixRegisterBanking: improved logic that causes the insertion
6607         of bank switching,
6608         * InlineFunction: functions that are called once, are not any more
6609         inlined. This can be a port option in the future,
6610
6611         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6612
6613         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6614         hold the corresponding uninitialized symbols,
6615         * pic16_allocProcessorRegister: registers have explicit marked the
6616         accessBank field,
6617         * pic16_allocInternalRegister: registers are explicit marked as
6618         not used,
6619         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6620         processing list, so bit registers were lost,
6621         *
6622
6623         * ralloc.h: added field 'accessBank' and original symbol operand
6624         in register definition,
6625         * removed the field isMapped from register definition,
6626
6627         ** Several functions have been removed from various sources:
6628         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6629         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6630         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6631         pic16_assignRelocatableRegisters
6632
6633         ** others have been introduced:
6634         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6635         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6636
6637 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6638
6639         * support/scripts/inc2h.pl: changed definition of BIT_AT
6640         to emit 'sbit at' instead of 'bit at'. This was a request.
6641
6642         PIC16 port related preliminary changes:
6643         * gen.c: prefixed function popRegFromString with
6644         pic16_ and all references to it corrected
6645         * pcode.c: all pic16_pc_* hardware registers prefixed
6646         with underscore (_),
6647         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6648         * ralloc.c: newReg(): when register is REG_SFR then
6649         set address to rIdx,
6650         pic16_allocProcessorRegister(): marks register wasUsed=0
6651         pic16_writeUsedRegs(): added a call to assign processor
6652         registers via pic16_assignFixedRegisters
6653
6654 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6655
6656         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6657         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6658         variables in unused register banks.  Also the SSEG is placed
6659         wherever there is enough space for it, and IDATA can be anywhere
6660         in internal RAM.  For now compile using -Wl-Y[stack_size].
6661         The mem file is different for this option as well, since it
6662         makes no sense of talking about DSEG lenght.
6663
6664 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6665
6666         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6667         in certain cases, e.g. when ROM assignment, patch provided
6668         from Albert den Haan.
6669
6670 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6671
6672         Many signedness and type propagation fixes:
6673         * src/SDCCicode.c: made geniCodeCast() static
6674         replaced SPEC_ by IS_ (cosmetic)
6675         (operandOperation): fixed div and mod operation
6676         (usualBinaryConversions): added support for promotion of char
6677         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6678         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6679         (geniCodeAdd): an array index will stay unsigned, even if promoted
6680         from char to int
6681         (geniCodeArray): ditto
6682         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6683         * src/SDCCsymt.c (computeType): added more support for char;
6684         promotion of char is selectable by promoteCharToInt, fixed signedness
6685         for all cases
6686         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6687         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6688         * src/SDCCval (val*): replaced signedness calculation by
6689         computeType()
6690         rearranged if-branches (cosmetic)
6691         (valShift): added warning W_SHIFT_CHANGED
6692         (valCompare): fixed problem with different types
6693         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6694         * support/regression/tests/literalop.c: added many cases
6695         * support/regression/tests/ast_constant_folding.c: changed finally to
6696         'unsigned int'
6697         * .version: new year, new version: 2.3.7
6698         * src/SDCCmain.c (main): applied patch #866468
6699         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6700         provided by Scott Bronson
6701         * doc/sdccman.lyx: updated documentation for sdcdb
6702         updated and added chapter tips
6703
6704 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6705
6706         * src/SDCCsymt.h: missing from yesterday's commits
6707
6708 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6709
6710         * src/SDCC.y (struct_or_union_specifier),
6711         * support/Util/SDCCerr.c,
6712         * support/Util/SDCCerr.h: verify that struct & union tags are used
6713         as declared.
6714
6715 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6716
6717         * src/SDCCglobl.h: missing from yesterday's commits
6718
6719 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6720
6721         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6722         sft_attributes, struct_declaration, parameter_declaration,
6723         type_name, start_block, declaration_list),
6724         * src/SDCC.lex (check_type): support redefinition of typedef names
6725
6726 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6727
6728         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6729         aligned xdata arrays. Erik helped me with the if clause.
6730
6731 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6732
6733         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6734         warning
6735
6736 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6737
6738         * src/SDCCast.h,
6739         * src/SDCCast.c (newAst_),
6740         * src/SDCCicode.h,
6741         * src/SDCCicode.c (ast2iCode, newiCode),
6742         * src/SDCCglobl.h,
6743         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6744         expr, statement, expression_statement, selection_statement,
6745         iteration_statement, expr_opt, jump_statement): foundation for tracking
6746         sequence points
6747         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6748         point code too)
6749
6750 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6751
6752         * support/Util/SDCCerr.c,
6753         * src/SDCCast.h,
6754         * src/SDCCast.c (createCase, createDefault, decorateType),
6755         * src/SDCClabel.c (labelUnreach),
6756         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6757         to error messages.
6758         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6759         (with thanks to Stas Sergeev)
6760         * device/include/time.h,
6761         * device/lib/time.c (CheckTime): suppress unreachable code warning
6762
6763 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6764
6765         * src/SDCCast.c (createIvalCharPtr),
6766         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6767         bug #753752)
6768         * support/regression/tests/nullstring.c: tests for these two bugs
6769
6770 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6771
6772         * support/Util/SDCCerr.h,
6773         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6774         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6775         about storage class and 'at' used inside struct or union
6776         * src/SDCCBBlock.c (iCodeFromeBBlock),
6777         * src/SDCCcse.c (ifxOptimize),
6778         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6779         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6780         printIval, emitStaticSeg, emitOverlay),
6781         * src/SDCClabel.c (deleteIfx),
6782         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6783         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6784         gatherAutoInit, processParms),
6785         * support/Util/SDCCerr.h,
6786         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6787         reporting for post-parse errors.
6788
6789 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6790
6791         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6792         implicit casts via union; they don't work on big endian systems
6793         (possible fix for bug #861138)
6794
6795 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6796
6797         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6798         * src/mcs51/main.c: fixed the fix for bug #737001
6799
6800 2003-12-15  Borut Razem <borut.razem AT siol.net>
6801
6802         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6803
6804 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6805
6806         * support/makebin/makebin.c: put output in binary mode
6807
6808 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6809
6810         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6811         xdata and data memory on startup. Set the environment variable
6812         SDCC_NOGENRAMCLEAR to disable this.
6813         * src/mcs51/peephole.def,
6814         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6815         (allows non-interrupt and interrupt code to safely compete for a resource
6816         without the non-interrupt code having to disable interrupts)
6817
6818 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6819
6820         * src/SDCCicode.c (geniCodeAdd),
6821         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6822         with valFromType if type might be a pointer and host is big endian).
6823         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6824         types, not just integer types.
6825         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6826         multiply defined with mismatching "at" address.
6827
6828 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6829
6830         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6831         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6832         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6833         with embedded nulls (fixed bug #753752)
6834
6835 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6836
6837         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6838         Apparently this did not see much testing (endless loop)
6839
6840 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6841
6842         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6843
6844 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6845
6846         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6847         gracefully handle NULL memmap pointers
6848
6849 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6850
6851         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6852         instead of deleting the iCode when an operand is volatile
6853         * src/z80/gen.c (genDummyRead),
6854         * src/mcs51/gen.c (genDummyRead),
6855         * src/ds390/gen.c (genDummyRead),
6856         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6857         not just IC_RIGHT
6858         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6859         * src/SDCC.y: fixed bug #850420
6860
6861 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6862
6863         Applied z80 i/o port patch from Peter Townson and fixed some operators
6864         to better handle operands in A register.
6865         * device/include/z180.h
6866         * src/SDCC.y
6867         * src/SDCCglue.c
6868         * src/z80/gen.c
6869         * src/z80/gen.h
6870         * src/z80/main.c
6871         * src/z80/peeph-z80.def
6872         * src/z80/peeph.def
6873         * src/z80/z80.h
6874
6875 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6876
6877         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6878
6879 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6880
6881         * device/lib/hc08/_mullong.c: Removed extra #endif
6882
6883 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6884
6885         * sim/ucsim/hc08.src/inst.cc,
6886         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6887         carries from x to h
6888         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6889         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6890         * device/include/stdarg.h: fixed varargs for hc08
6891         * device/lib/Makefile.in,
6892         * device/lib/hc08/Makefile,
6893         * device/lib/hc08/_mulint.c,
6894         * device/lib/hc08/_mullong.c: fixed some endian problems
6895
6896 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6897
6898         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6899         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6900         * device/lib/_gptrget.c,
6901         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6902
6903 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6904
6905         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6906         * src/SDCCast.c (astErrors): fixed bug #846007
6907         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6908
6909 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6910
6911         * src/SDCCast.c (decorateType): disabled a transformation I added in
6912         revision 1.188 (access to fields of a structure at an absolute address);
6913         it breaks with bitfields, extern declarations, and gcse analysis.
6914         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6915         could be assigned through a pointer, so don't complain.
6916         * src/SDCCast.c (astErrors),
6917         * src/SDCCast.h,
6918         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6919
6920 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6921
6922         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6923         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6924         output of __config directives, since gpasm now supports them
6925         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6926         pre-processor macro, i.e. -DMCU=p18f452
6927         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6928         and modified to handle 'cast' icode similarly to '=' icode
6929         * src/pic16/device.h (typedef struct PIC_device): added field
6930         'extMIface' to indicate that chip has external memory interface
6931         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6932         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6933         18F8720
6934
6935 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6936
6937         * src/SDCC.y (pointer): fixed bug #846006
6938         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6939         * src/SDCCast.c (decorateType): fixed bug #846009
6940         * src/ds390/peeph.def,
6941         * src/ds390/gen.c (genAnd, genOr),
6942         * src/mcs51/peeph.def,
6943         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6944
6945 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6946
6947         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6948         * src/SDCCdflow.c
6949         * src/SDCCcse.c
6950         * src/SDCCcse.h
6951         * src/SDCCBBlock.h
6952         * src/SDCCBBlock.c
6953
6954 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6955
6956         fixed bug #845089
6957         * src/SDCCbitv.h,
6958         * src/SDCCbitv.c: added function to free a bitvector
6959         * src/SDCClrange.h,
6960         * src/SDCClrange.c: added function to recompute the liveranges
6961         * src/avr/ralloc.c,
6962         * src/ds390/ralloc.c,
6963         * src/hc08/ralloc.c,
6964         * src/mcs51/ralloc.c,
6965         * src/pic/ralloc.c,
6966         * src/pic16/ralloc.c,
6967         * src/xa51/ralloc.c,
6968         * src/z80/ralloc.c: recompute the liveranges after register packing
6969
6970 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6971
6972         * src/SDCCloop.c (newInduction): fixed bug #845630
6973
6974 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6975
6976         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6977         inadvertantly left behind from my 2003-11-12 change
6978
6979 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6980
6981         Updated headers I neglected to commit yesterday.
6982         * src/SDCClrange.h,
6983         * src/SDCCicode.h
6984
6985 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6986
6987         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6988         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6989         * src/SDCCopt.c (eBBlockFromiCode),
6990         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6991         the creation of the key hash table from the sequencing so it can be used
6992         earlier (for some GCSE bug fixes still pending)
6993
6994 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6995
6996         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6997         * support/regression/tests/addsub.c: testing genPlus shortcut
6998
6999 2003-11-15  Borut Razem <borut.razem AT siol.net>
7000
7001         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7002
7003 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7004
7005         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7006         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7007         ordering is immaterial.
7008         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7009
7010 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7011
7012         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7013         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7014         (SIGSEV) of bug #840381
7015         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7016         unlink new file before rename if new and old filenames are the same)
7017
7018 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7019
7020         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7021         uninitialized variables) for the mcs51. Set environment variable
7022         SDCC_GENRAMCLEAR to test.
7023         xdata initialization slightly shorter
7024
7025 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7026
7027         * src/SDCCsymt.h,
7028         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7029         #838241 & 780691 (basicly the same bug)
7030         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7031         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7032
7033 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7034
7035         * src/SDCCmain.c (linkEdit): "fix" #834252
7036
7037 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7038
7039         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7040         * src/SDCCast.h,
7041         * src/SDCC.y: fixed bug #819403
7042
7043 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7044
7045         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7046         the reentrant attribute.
7047         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7048         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7049         simulation
7050         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7051         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7052         erroneously reduced to a literal.
7053         * src/hc08/ralloc.c (packRegisters, rematStr),
7054         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7055         some cases
7056
7057 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7058
7059         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7060         * doc/sdccman.lyx: changed from 'article' to 'book'
7061         * doc/Makefile: readded test_suite_spec and cdbfileformat
7062
7063 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7064
7065         * device/include/stdlib.h: include malloc.h to comply with ANSI
7066         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7067
7068 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7069
7070         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7071         * doc/clean.mk: also remove *.out files
7072         * doc/sdccman.lyx: some additions, larger top/bottom margins
7073
7074 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7075
7076         * src/SDCC.y: fixed bug #837365
7077         * support/regression/tests/bitopcse.c
7078         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7079         a symbol (might be valop instead)
7080         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7081         * device/lib/clean.mk: added hc08 to the cleaning list
7082
7083 2003-11-04  Borut Razem <borut.razem AT siol.net>
7084
7085         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7086           made 2003-11-04
7087         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7088           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7089           malloc is declared in standard stdlib.h
7090
7091 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7092
7093         * device/lib/hc08/Makefile: need to clean .rel not .o files
7094         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7095
7096 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7097
7098         * src/port.h,
7099         * src/hc08/main.c,
7100         * src/mcs51/main.c,
7101         * src/ds390/main.c,
7102         * src/z80/main.c,
7103         * src/avr/main.c,
7104         * src/pic/main.c,
7105         * src/pic16/main.c,
7106         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7107         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7108         tests (which uses the port's oclsExpense function)
7109         * src/SDCC.y,
7110         * src/SDCCast.c,
7111         * src/SDCCicode.c,
7112         * src/hc08/gen.c,
7113         * src/ds390/gen.c,
7114         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7115
7116 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7117
7118         * src/SDCCcse.c (ifxOptimize),
7119         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7120         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7121         deleting the IFX iCode.
7122         * src/hc08/ralloc.c: reduced unneeded slocs
7123         * src/hc08/gen.c: fixed bug in asmopToBoolean
7124
7125 2003-11-04  Borut Razem <borut.razem AT siol.net>
7126
7127         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7128           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7129           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7130           transferred to configure
7131
7132 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7133
7134         Use headers defined in the C[++] standards:
7135         * sim/ucsim/gui.src/serio.src/fileio.cc
7136         * sim/ucsim/gui.src/serio.src/frontend.cc
7137         * sim/ucsim/gui.src/serio.src/main.cc
7138         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7139         * support/Util/NewAlloc.c
7140         * as/hc08/lklibr.c
7141         * as/mcs51/lklibr.c
7142         * as/z80/aslist.c
7143         * as/z80/assym.c
7144
7145 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7146
7147         * Added MSVC projects for hc08 assembler and linker:
7148         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7149         /as/hc08/link_hc08.dsp
7150
7151 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7152
7153         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7154
7155 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7156
7157         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7158
7159 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7160
7161         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7162
7163 2003-10-31  Borut Razem <borut.razem AT siol.net>
7164
7165         * support/cpp2/cpplib.h,
7166           support/cpp2/cpplib.c,
7167           support/cpp2/cpplex.c,
7168           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7169           to switch _asm block preprocessing on / off. Default is
7170           #pragma preproc_asm +
7171
7172 2003-10-31  Borut Razem <borut.razem AT siol.net>
7173
7174         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7175           when outputting comment blocks (when executed with -C option) and
7176           _asm (SDCPP specific) blocks
7177
7178 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7179
7180         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7181
7182 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7183
7184         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7185
7186 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7187
7188         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7189         * src/SDCCast.c (decorateType): fixed bug #832664
7190
7191 2003-10-31  Borut Razem <borut.razem AT siol.net>
7192
7193         * support\cpp2\cpplex.c: fixed for SDCPP:
7194           comments(when executed with -C option) and _asm blocks
7195           were included even if they where in skipped #if block.
7196           Applied solution from GCC cpp 3.3.2
7197
7198 2003-10-31  Borut Razem <borut.razem AT siol.net>
7199
7200         * src/SDCC.lex: sdcc now understands both formats:
7201           '# <line_number> <file_name>' and
7202           '#line <line_number> <file_name>'
7203         * support/cpp2/cppmain.c: sdcpp now generates the standard
7204           '# <line_number> <file_name>' instead of former
7205           '#line <line_number> <file_name>'
7206
7207 2003-10-30  Borut Razem <borut.razem AT siol.net>
7208
7209         * support/cpp2/cpphash.h,
7210         * support/cpp2/cpplib.h
7211         * support/cpp2/cpplex.c,
7212         * support/cpp2/cppmain.c,
7213         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7214
7215 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7216
7217         Fixed a number of problems revealed by bug #827883.
7218         * src/SDCCloop.c (loopInvariants): Spill location of the
7219         result operand should be recomputed if extracted from
7220         a loop. Also, don't extract assignments of an iTemp
7221         from a literal.
7222         * src/SDCCast.c (isConformingBody): loop reversal should
7223         not occur if the control variable is involved with a
7224         relational operator.
7225
7226 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7227
7228         * .version: bumped to 2.3.6 to reflect the big improvements
7229         made by Erik and Klaus. Thanks!
7230
7231 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7232
7233         Replaced the livrange code.
7234         * src/SDCClrange.c: added new LR code
7235         * src/SDCCloop.c,
7236         * src/SDCCBBlock.h: removed remainig parts from old LR code
7237         * src/ds390/ralloc.c,
7238         * src/ds390/gen.c: minor fixes to make it work with new code
7239
7240 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7241
7242         * as/hc08/asm.h,
7243         * as/hc08/lkrloc.c,
7244         * src/hc08/gen.c,
7245         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7246         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7247         (tweaked fix for bug #818696)
7248
7249 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7250
7251         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7252
7253 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7254
7255         * src/SDCCmain.c,
7256         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7257         * src/mcs51/gen.c (gencjneshort),
7258         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7259         more efficient (per Scott Bronson's suggestion)
7260
7261 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7262
7263         Extended the semantics of the critical keyword to include
7264         individual statements. See RFE #827755 and #799831
7265         * src/SDCC.y
7266         * src/SDCCicode.c
7267         * src/SDCCopt.c
7268         * src/SDCCast.c
7269         * support/Util/SDCCerr.c
7270         * support/Util/SDCCerr.h
7271         * src/mcs51/gen.c
7272         * src/ds390/gen.c
7273         * src/hc08/gen.c
7274
7275 2003-10-19  Borut Razem <borut.razem AT siol.net>
7276
7277         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7278
7279 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7280
7281         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7282         Fixed bug #818696
7283         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7284         and predecrement operand is displayed
7285
7286 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7287
7288         * src/SDCCval.c (valMinus): fixed bug #826041
7289
7290 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7291
7292         Some hc08 related updates that I missed earlier
7293         * sim/ucsim/stypes.h
7294         * support/regression/ports/hc08/spec.mk
7295
7296 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7297
7298         New target "hc08" for the Motorola 68hc08 family of micros
7299
7300         * configure
7301         * configure.in
7302         * Makefile
7303         * src/hc08/*
7304         * src/SDCCmain.c
7305         * src/port.h
7306         * sim/ucsim/hc08.src/*
7307         * sim/ucsim/configure.in
7308         * src/ucsim/configure
7309         * sim/ucsim/packages_in.mk
7310         * as/hc08/*
7311         * as/Makefile
7312         * device/include/mc68hc908qy.h
7313         * device/lib/hc08/*
7314         * device/lib/Makefile.in
7315         * support/regression/ports/hc08/*
7316         * support/regression/Makefile
7317
7318 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7319
7320         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7321         regression test
7322         * src/ds390/gen.c (genCast): fixed bug #821957
7323
7324 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7325
7326         * device/lib/logf.c: "fixed" overlay bug
7327         * support/regression/ports/host/spec.mk: added m library
7328         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7329         * support/regression/tests/float_trans: added (for Eric)
7330
7331 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7332
7333         * src/mcs51/gen.c (genCpl): fixed bug
7334         http://sf.net/mailarchive/message.php?msg_id=6263915
7335
7336 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7337
7338         * src/SDCCast.c (decorateType): added extended constant folding
7339         * src/SDCCsymt.c (computeType): cleanup
7340         * src/SDCCval.c (valShift): minor optimization
7341         * support/regression/tests/ast_constant_folding.c: added
7342
7343 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7344
7345         * src/SDCCmain.c: removed some unintended changes
7346
7347 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7348
7349         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7350         * src/z80/gen.c: fixed part of bug #817589
7351         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7352
7353 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7354
7355         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7356         * src/SDCCcflow.c
7357         * src/SDCCcse.c
7358         * src/SDCCdflow.c
7359         * src/SDCClabel.c
7360         * src/SDCClrange.c
7361         * src/SDCCmem.c
7362         * src/SDCCopt.c
7363         * src/SDCCpeeph.c
7364         * src/SDCCset.c
7365         * src/avr/ralloc.c
7366         * src/ds390/ralloc.c
7367         * src/izt/ralloc.c
7368         * src/mcs51/ralloc.c
7369         * src/pic/ralloc.c
7370         * src/pic16/ralloc.c
7371         * src/xa51/ralloc.c
7372         * src/z80/ralloc.c
7373         * src/z80/gen.c: removed unused label "release:"
7374
7375 2003-10-06  Borut Razem <borut.razem AT siol.net>
7376
7377         * src/SDCC.lex: removed definition of unused variables
7378           save_optimize and save_options
7379
7380 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7381
7382         * clean.mk: removed '=' in "-maxdepth=1"
7383         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7384         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7385
7386 2003-10-06  Borut Razem <borut.razem AT siol.net>
7387
7388         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7389           my_unput() replaced by unput()
7390
7391 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7392
7393         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7394         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7395         type-punned pointer will break strict-aliasing rules"
7396         Old LR behaviour is again default; Klaus' LR can be choosen by
7397         defining the environment variable LRKLAUS
7398         * src/SDCCBBlock.h
7399         * src/SDCCloop.c
7400         * src/SDCClrange.c
7401         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7402         * clean.mk: fixed removal of files in bin/CVS/
7403         * device/lib/clean.mk: fixed removal of directories small and large
7404         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7405         * src/SDCCicode.c,
7406         * src/SDCCval.c: removed superflous test for pedantic
7407
7408 2003-10-05  Borut Razem <borut.razem AT siol.net>
7409
7410         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7411           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7412           message "unmatched #pragma SAVE and #pragma RESTORE"
7413
7414 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7415
7416         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7417           assembly, critical functions, atomic, nojtbound)
7418
7419 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7420
7421         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7422         * src/SDCCBBlock.h
7423         * src/SDCCloop.c
7424         * src/SDCCloop.h
7425         * src/SDCClrange.c
7426
7427 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7428
7429         * src/z80/gen.h,
7430         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7431         * src/mcs51/gen.h
7432         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7433         * src/ds390/gen.h
7434         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7435         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7436         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7437
7438 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7439
7440         * src/z80/gen.c (genRet): fixed bug #524753
7441         * src/z80/gen.c (genCast): fixed internal error on cast from
7442         pointer to long
7443         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7444         fix for bug #477835 to the z80
7445         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7446         for tracking iCodes in the peephole optimizer for z80
7447
7448 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7449
7450         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7451         the other part of bug #814548
7452         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7453
7454 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7455
7456         * src/SDCCcse.c: fixed part of bug #814548
7457
7458 2003-09-28  Borut Razem <borut.razem AT siol.net>
7459
7460         * src/asm.c: rewrite of printILine() to use temporary file instead
7461           a pipe
7462         * src/xa51/main.c: commented out declaration of int rewinds
7463
7464 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7465
7466         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7467
7468 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7469
7470         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7471         * src/asm.c (printILine): Fixed bug #811015
7472
7473 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7474
7475         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7476         freeing.
7477
7478 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7479
7480         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7481         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7482         to correctly handle general case of AOP_PAIRPTR
7483         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7484
7485 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7486
7487         * src/mcs51/ralloc.c (fillGaps),
7488         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7489         register positioning bug)
7490
7491 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7492
7493         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7494
7495 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7496
7497         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7498         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7499         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7500         (ralloc doesn't intentionally do this now, but perhaps later)
7501         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7502         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7503         register positioning bugs (Fixed bug #762602 and #795325)
7504         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7505         (Fixed bug #808779)
7506         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7507         lines that --i-code-in-asm generates
7508
7509 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7510
7511         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7512         trying to fclose a FILE* that was already closed.
7513
7514 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7515
7516         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7517         of const struct should be treated as if const themselves)
7518
7519 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7520
7521         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7522
7523 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7524
7525         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7526         Unix (/n) and DOS (/r/n) line terminations.
7527
7528 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7529
7530         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7531         bug #613775
7532
7533 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7534
7535         * src/mcs51/gen.c (genFunction, genEndFunction),
7536         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7537         and restore of EA so that stack offsets to parameters are
7538         correct when using both critical and reentrant/stack-auto.
7539         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7540         size (can be triggered in error if sloc is shared between
7541         different sized objects)
7542         * device/include/float.h: fixed macros to explicitly use
7543         unsigned long where needed
7544
7545 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7546
7547         Feature req. 799831: added code to allow nesting of critical functions
7548         * src/mcs51/gen.c (genFunction, genEndFunction)
7549         * src/ds390/gen.c (genFunction, genEndFunction)
7550
7551 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7552
7553         * src/SDCCsymt.c (sclsFromPtr),
7554         * src/SDCCsymt.h,
7555         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7556         support for standard C idiom of memory mapped variables; for
7557         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7558         to xdata int at 0x1234 tempvar = 1.
7559         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7560         provided by Akiya ISHIDA
7561
7562 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7563
7564         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7565         * src/SDCCval.c (constVal): added reduction from int to char
7566         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7567         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7568         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7569         to ignore the sign
7570         * support/regression/tests/shifts.c: fixed
7571
7572 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7573
7574         * src/z80/gen.c (genXor): Fixed bug #805445
7575
7576 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7577
7578         Fixed bug #621531 (const & volatile confusion in the type chain).
7579         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7580         refer to the const or volatile state of the pointer itself.
7581
7582         * src/SDCCast.c
7583         * src/SDCCglue.c
7584         * src/SDCCicode.c
7585         * src/SDCCsymt.c
7586         * src/SDCCval.c
7587         * src/SDCC.y
7588         * src/SDCCsymt.h
7589         * src/pic/gen.c
7590         * src/pic/ralloc.c
7591         * src/pic16/gen.c
7592         * src/pic16/ralloc.c
7593         * support/regression/tests/const.c
7594
7595 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7596
7597         When checking for duplicated modules, use absolute paths
7598         instead of relative paths.  Files changed:
7599
7600         * as/mcs51/lklib.c
7601         * link/z80/lklib.c
7602
7603 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7604
7605         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7606
7607 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7608
7609         * device/include/string.h: added size_t typedef, changed
7610         prototypes to use size_t, eliminated separate reentrant and
7611         non-reentrant declarations, added _memmove declaration
7612         * device/lib/_memcpy.c: changed to use size_t instead of int,
7613         changed /4 to >>2 to avoid division library call
7614         * device/lib/_memcmp.c,
7615         * device/lib/_memset.c,
7616         * device/lib/_strncat.c,
7617         * device/lib/_strncpy.c,
7618         * device/lib/_strncmp.c: changed to use size_t instead of int
7619         * device/lib/_memmove.c: new file (fixed bug #772294)
7620         * device/lib/Makefile.in: added _memmove.c
7621         * device/lib/z80/asm_strings.s: fixed bug #772290
7622         * support/regression/tests/bitfields.c: attempt to fix host assertion
7623         failure on amd64-unknown-linux2.2
7624
7625 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7626
7627         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7628         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7629         * as/z80/asmain.c (main): fixed bug #801766
7630
7631 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7632
7633         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7634         compilers
7635
7636 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7637
7638         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7639         reported in bug #800609
7640
7641 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7642
7643         * Top header beautifications in src/pic16 directory:
7644           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7645           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7646           pcoderegs.h, ralloc.c, ralloc.h
7647         * main.c: added top header and GPL license notice
7648         * pcode.c: fixed the if-conditional warning
7649
7650 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7651
7652         * device/lib/_mullong.c: replaced int by short for gcc
7653
7654 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7655
7656         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7657         and JUMPTABLE iCodes properly now (worked by accident before)
7658         * src/mcs51/gen.c (leftRightUseAcc),
7659         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7660         iCode properly now. Use getSize instead of nRegs since a & b
7661         aren't part of the nRegs tally.
7662
7663 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7664
7665         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7666         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7667           before instructions that use the _STATUS register
7668
7669 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7670
7671         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7672         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7673         fetching of the pointer
7674         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7675         copied from genNearPointerSet()
7676         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7677         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7678         If they pop r0/r1 they must be called in the opposite order than aopOp().
7679         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7680         (resp. --stack-auto), prepared for --xstack
7681
7682 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7683
7684         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7685
7686 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7687
7688         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7689         these ports have their own __sdcc_external_start()
7690
7691 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7692
7693         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7694         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7695         type for bits was changed. It resulted in bit variables becoming
7696         global, which is not permitted in PIC 14 assembly output.
7697
7698 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7699
7700         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7701
7702 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7703
7704         Z80 and MCS51 linkers complaint if a public symbol is defined
7705         in more than one library module:
7706
7707         * as/mcs51/lklib.c
7708         * link/z80/lklib.c
7709         * as/mcs51/Makefile.in
7710
7711 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7712
7713         A few small changes that speed up the peephole optimizer.
7714
7715         * src/SDCCpeeph.c
7716
7717 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7718
7719         Try to make the peephole optimizer smarter by maintaining
7720         an association between the assembly source code and the
7721         iCodes that originated them. Put this information to use
7722         with a new peephole rule condition "notVolatile" so that
7723         the rules can be aggressive yet still safe.
7724
7725         * src/SDCCpeeph.c
7726         * src/SDCCpeeph.h
7727         * src/mcs51/gen.c
7728         * src/mcs51/peeph.def
7729
7730 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7731
7732         Fixed bug #741761
7733
7734         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7735         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7736         if the left or right operand symbols have the accuse flag set.
7737
7738 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7739
7740         Changed the type of the result of the ! (NOT) operator to char;
7741         previously it returned the same type as the source. This allows
7742         us to eliminate all the genFloatNot functions (all of its target
7743         implementations were very buggy) since !float can use the same
7744         code as !long now.
7745
7746         * src/SDCCicode.c (ast2iCode): ! returns char
7747         * src/mcs51/gen.c (genNot, genNotFloat),
7748         * src/ds390/gen.c (genNot, genNotFloat),
7749         * src/z80/gen.c (genNot, genNotFloat),
7750         * src/pic/gen.c (genNot, genNotFloat),
7751         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7752
7753 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7754
7755         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7756         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7757            during interrupts. Ensure WSAVE is located at a shared bank address.
7758         2. Fixed page selection in some places
7759         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7760            the registers name strings.
7761         4. Fixed "signed / unsigned compare" compiler warnings.
7762         5. The PIC port manages its own allocation of the general purpose
7763            registers, but makes no attempt to reuse them. As a result when
7764            compiling it soon runs out of general purpose registers. Some
7765            additional code was added to the files pcode.c and device.c to walk
7766            through the function call tree and rename the registers so that they
7767            get reused.
7768
7769         * src/pic/device.c
7770         * src/pic/gen.c
7771         * src/pic/glue.c
7772         * src/pic/pcode.c
7773         * src/pic/pcode.h
7774         * src/pic/ralloc.c
7775         * src/pic/ralloc.h
7776         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7777         genPlus() & genMinus() when the result is the same as left or right
7778
7779 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7780
7781         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7782
7783 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7784
7785         Made bitfield a distinct type from bit so that bitfields
7786         convert as per ANSI C and bits retain their traditional
7787         boolean style behaviour. Implemented bitfield support in
7788         the z80 port.
7789
7790         * src/SDCCsymt.h,
7791         * src/SDCCsymt.c,
7792         * src/SDCCast.c,
7793         * src/cdbFile.c,
7794         * src/mcs51/gen.c,
7795         * src/ds390/gen.c: bit v bitfield split
7796         * src/z80/gen.c: New support for bitfields
7797         * support/regression/tests/bitfields.c: reenabled z80,
7798         added more tests
7799
7800 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7801
7802         Rules 246.x, 247.x relate to bitfields, the others speed up
7803         access to xdata mapped I/O devices.
7804
7805         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7806
7807 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7808
7809         Cleaned up genPackBits and genUnpackBits and added two helper
7810         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7811         for literal assignments in genPackBits (thanks to Frieder for
7812         reminding me).
7813
7814         * src/mcs51/gen.c
7815         * src/ds390/gen.c
7816
7817 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7818
7819         Fixed bug #748310 (pointer to function type mishandled when the
7820         function name is omitted). Also fixed a SIGSEGV when a function
7821         attribute (reentrant, etc) is used on a non-function or on a
7822         function but misplaced before the parameter list.
7823
7824         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7825         bug #748310
7826         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7827         * support/Util/SDCCerr.h,
7828         * support/Util/SDCCerr.c: Added func attr misuse error msg
7829
7830 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7831
7832         Fixed bug #787649 by anonymous
7833         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7834         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7835
7836 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7837
7838         Fixed numerous bitfield problems.
7839
7840         * src/SDCC.y: More bitfield related error checking
7841         * src/SDCCsymt.h,
7842         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7843         * support/Util/SDCCerr.h,
7844         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7845         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7846         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7847         * support/regression/tests/bitfields.c: tests added
7848
7849 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7850
7851         Made the constant following the "interrupt" keyword optional. If
7852         omitted, the function will not automatically be given an entry
7853         in the interrupt vector table (similar to #pragma NOIV, but
7854         less syntacticly kludgy). The interrupt number is also now
7855         range checked. Also fixed a bug in the high order bit example
7856         in the manual.
7857
7858         * src/SDCC.y
7859         * src/SDCCmem.c
7860         * src/SDCCglue.c
7861         * src/SDCCsymt.h
7862         * support/Util/SDCCerr.c
7863         * support/Util/SDCCerr.h
7864         * doc/sdccman.lyx
7865
7866 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7867
7868         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7869         * src/SDCCicode.c (operandOperation): rewritten some ops
7870         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7871         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7872         other type
7873         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7874         be re-activated by defining REDUCE_LITERALS)
7875         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7876         unsigned, but are signed by default
7877         * src/SDCCval.c (constVal): rearranged
7878         * src/SDCCval.c (valMod): preliminary fix
7879         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7880         * support/regression/literalop.c: added, work in progress
7881
7882 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7883
7884         Generate warnings for useless declarations like "char data;"
7885         that don't do what new users expect.
7886
7887         * src/SDCC.y
7888         * support/Util/SDCCerr.h
7889         * support/Util/SDCCerr.c
7890
7891 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7892
7893         * src/SDCCval.c (valMult): fix overflow detection of negative int
7894
7895 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7896
7897         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7898
7899         Changes to support big endian targets:
7900
7901         * src/ports.h
7902         * src/SDCCglue.c
7903         * src/avr/main.c
7904         * src/ds390/main.c
7905         * src/izt/i186.c
7906         * src/mcs51/main.c
7907         * src/pic/main.c
7908         * src/pic16/main.c
7909         * src/xa51/main.c
7910         * src/z80/main.c
7911
7912 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7913
7914         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7915         * device/lib/time.c: fixed warning "integer overflow in expression"
7916
7917 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7918
7919         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7920         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7921         constants are unsigned; added recognition of "u" flag for unsigned
7922         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7923         * src/SDCCval.c (valDiv, valMod): fixed signdness
7924         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7925         signedness of modulo, left and right shift
7926         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7927         * support/Util/SDCCerr.h: added warning W_INT_OVL
7928         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7929         * src/SDCCast.c (ast_print): improved output of constants
7930
7931 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7932
7933         Fixed some warnings when building with MSVC:
7934
7935         * as\mcs51\asdata.c
7936         * as\z80\asdata.c
7937         * as\mcs51\asm.h
7938         * as\z80\asm.h
7939         * link\z80\aslink.h
7940         * link\z80\lkdata.c
7941         * link\z80\lkeval.c
7942         * link\z80\lkgb.c
7943         * link\z80\lkihx.c
7944         * link\z80\lks19.c
7945         * link\z80\lksym.c
7946         * support\cpp2\cpplib.c
7947         * src\ds390\gen.c
7948         * src\mcs51\gen.c
7949
7950 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7951
7952         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7953
7954 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7955
7956         * support\librarian\clean.mk: Do not remove Makefile.
7957         * support\librarian\Makefile: added.
7958
7959 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7960
7961         Added librarian to MSVC build:
7962         * all.dsp
7963         * sdcc.dsw
7964         * support\librarian\librarian.dsp
7965
7966         'configure' not needed for librarian, removed:
7967         * support\librarian\configure
7968         * support\librarian\configure.in
7969         * support\librarian\config_in.h
7970         * support\librarian\Makefile.in
7971
7972         Hopefully these ones built the librarian and the rest of sdcc properly:
7973         * Makefile
7974         * Makefile.common.in
7975
7976         Messed up 'configure', so revert to previous version:
7977         * configure
7978         * configure.in
7979
7980 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7981
7982         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7983         there, while the mantissa of a double is "only" 53 bits wide.
7984
7985 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7986
7987         Adding sdcclib to the build.  MSVC project coming soon.
7988         Files added/changed:
7989
7990         * support\librarian\clean.mk
7991         * support\librarian\configure
7992         * support\librarian\configure.in
7993         * support\librarian\config_in.h
7994         * support\librarian\Makefile.bcc
7995         * support\librarian\Makefile.in
7996         * support\librarian\sdcclib.c
7997         * Makefile.bcc
7998         * Makefile
7999         * Makefile.common.in
8000         * configure
8001         * configure.in
8002
8003 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8004
8005         Linker now complaints if linked modules have conflicting options, for
8006         example, one compiled using --model-large and another one compiled with
8007         --model-small.  The following files were modified:
8008
8009         * as\mcs51\asdata.c
8010         * as\mcs51\aslink.h
8011         * as\mcs51\asm.h
8012         * as\mcs51\asmain.c
8013         * as\mcs51\asout.c
8014         * as\mcs51\i51pst.c
8015         * as\mcs51\lkdata.c
8016         * as\mcs51\lklibr.c
8017         * as\mcs51\lkmain.c
8018         * as\z80\asdata.c
8019         * as\z80\asm.h
8020         * as\z80\asmain.c
8021         * as\z80\asout.c
8022         * as\z80\z80pst.c
8023         * link\z80\aslink.h
8024         * link\z80\lkdata.c
8025         * link\z80\lklibr.c
8026         * link\z80\lkmain.c
8027         * src\SDCCglue.c
8028
8029 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8030
8031         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8032         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8033
8034 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8035
8036         * src/z80/mappings.i: fix _mul[us][int,long] entries
8037
8038 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8039
8040         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8041
8042 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8043
8044         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8045         * support/regression/tests/bitopcse.c: added
8046         fixed warning:
8047         * src/avr/gen.c:
8048         * src/pic/gen.c:
8049         * src/pic16/gen.c:
8050         * src/z80/gen.c:
8051         * src/xa51/gen.c:
8052
8053 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8054
8055         added support for new library format to z80, gbz80 linkers:
8056         *link/z80/aslink.h
8057         *link/z80/lklex.c
8058         *link/z80/lklib.c
8059         *link/z80/lklist.c
8060
8061 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8062
8063         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8064         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8065
8066 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8067
8068         added DUMMY_READ_VOLATILE:
8069         * src/SDCC.y:
8070         * src/avr/gen.c:
8071         * src/xa51/gen.c:
8072         * src/z80/gen.c:
8073         * src/pic/gen.c:
8074         * src/pic16/gen.c:
8075         * src/mcs51/gen.c:
8076         * src/ds390/gen.c:
8077         * src/SDCCcse.c (algebraicOpts): many improvements
8078         * src/SDCCcse.h: removed algebraicOpts()
8079         * src/SDCCicode.c (picDummyRead): added
8080
8081 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8082
8083         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8084         "Insufficient space in data memory".
8085
8086 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8087
8088         * src/mcs51/gen.c: fixed bug #771358
8089         * src/z80/gen.c: fixed bug #759087
8090
8091 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8092
8093         * src/pic16/glue.c: minor cleanup by Vangelis
8094
8095 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8096
8097         * device/include/regc515c.h: fixed #758477
8098         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8099         * device/lib/_gptrput.c: saved a few bytes
8100         * my tab spacing is 8, yours too?)
8101         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8102         * device/lib/serial.c: process RX bytes earlier than TX bytes
8103         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8104
8105 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8106
8107         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8108
8109 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8110
8111     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8112
8113 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8114
8115         * device/lib/Makefile.in: bad fix, reverted to 1.43
8116
8117 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8118
8119         * device/lib/Makefile.in: added missing z80 object files
8120
8121 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8122
8123         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8124         pic16 progress by Vangelis:
8125         * src/SDCCglobl.h:
8126         * src/SDCCmain.c:
8127         * src/pic/Makefile:
8128         * src/pic:
8129         * pic/Makefile:
8130         * pic16/device.c:
8131         * pic16/device.h:
8132         * pic16/gen.c:
8133         * pic16/gen.h:
8134         * pic16/genarith.c:
8135         * pic16/glue.c:
8136         * pic16/main.c:
8137         * pic16/pcode.c:
8138         * pic16/pcode.h:
8139         * pic16/pcodepeep.c:
8140         * pic16/peeph.def:
8141
8142 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8143
8144     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8145
8146 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8147
8148     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8149     added gbz80 build to MSVC project.
8150     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8151     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8152     from 8051 stuff and setup so it links using a .lnk file.
8153
8154 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8155
8156     * support/librarian/sdcclib.c: sdcc librarian.
8157     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8158     with sdcclib.
8159
8160 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8161
8162     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8163
8164 2003-07-02  Borut Razem <borut.razem AT siol.net>
8165
8166         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8167         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8168         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8169         src/xa51/main.c, src/z80/main.c:
8170         virtualization of glue() function: each port has it's own glue function,
8171         which is accessed by do_glue function pointer in PORT.general structure
8172
8173 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8174
8175         * DS800C400 fun, improved ROM interface and tinibios.
8176
8177 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8178
8179         * More support for DS80C400. Now includes beginning of interface to ROM.
8180
8181 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8182
8183         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8184
8185 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8186
8187         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8188
8189 2003-06-19  Borut Razem <borut.razem AT siol.net>
8190
8191         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8192
8193 2003-06-19  Borut Razem <borut.razem AT siol.net>
8194
8195         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8196         fixed Z80 port - crt0.o: cannot open.
8197
8198 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8199
8200         * support/Util/MySystem.c (merge_command): revert bad fix
8201
8202 2003-06-18  Borut Razem <borut.razem AT siol.net>
8203
8204         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8205
8206 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8207
8208         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8209         option --use-stdout sends errors to stdout instead of stderr.
8210
8211 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8212
8213         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8214
8215 2003-06-15  Borut Razem <borut.razem AT siol.net>
8216
8217         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8218         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8219         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8220         fixed width array of pointers replaced with sets;
8221         multiple include and lib paths ared transferred to preprocessor and linker
8222         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8223         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8224         fixed width array of pointers
8225         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8226         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8227         fixupPath(), getPathDifference()
8228         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8229         fixed width array of pointers
8230
8231 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8232
8233         * src/pic16/ralloc.c: fix warnings
8234         * src/pic16/pcode.c: fix warning
8235
8236 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8237
8238          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8239         know all the details, but essentially this set of changes enable
8240         the pic16 port to generate movff instructions and generate assembler
8241         directives,
8242         * src/SDCCmain.c:
8243         * src/pic16/gen.c:
8244         * src/pic16/glue.c:
8245         * src/pic16/pcode.c:
8246         * src/pic16/device.c:
8247         * src/pic16/main.c:
8248         * src/pic16/pcode.h:
8249         * src/pic16/pcoderegs.c:
8250         * src/pic16/ralloc.c:
8251         * src/pic16/ralloc.h:
8252
8253 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8254
8255         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8256         added option --vc, so sdcc errors and warnings are compatible with
8257         Microsoft Visual Studio.
8258
8259 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8260
8261         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8262           device/lib/libfloat.lib: added atof function.
8263
8264 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8265
8266         * doc/sdccman.lyx: updated to Lyx 1.3
8267         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8268         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8269         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8270
8271 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8272
8273         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8274
8275 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8276
8277         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8278           additions to the "related tools/documentation" section
8279
8280 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8281
8282         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8283
8284 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8285
8286         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8287         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8288
8289 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8290
8291         * doc/sdccman.lyx: fix double dash and other minor things
8292         * doc/Makefile: fix double dash
8293
8294 2003-05-28  Karl Bongers(patches from Martin Helmling)
8295         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8296           condition and ignore commands.
8297
8298 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8299
8300         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8301           is in parts still quite out of date, I did changes as far as I felt makes sense
8302           for a non-native english speaker.
8303           Please feel free to add to the manual or to correct my changes.
8304         * doc/Makefile: undid touching the date of intermediate tex files.
8305
8306 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8307
8308         * doc/sdccman.lyx: Manual has an index now
8309
8310 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8311
8312         Finalize muluint/mulsint and mululong/mulslong merging:
8313         * device/lib/_mulint.c
8314         * device/lib/_mullong.c
8315         * device/lib/gbz80/mul.s
8316         * device/lib/gbz80/stubs.s
8317         * device/lib/z80/mul.s
8318         * device/lib/z80/stubs.s
8319         * src/SDCCsymt.c (initCSupport)
8320
8321 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8322
8323         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8324         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8325           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8326           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8327           instead of /Zm500.
8328
8329 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8330
8331         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8332           the regression tests I'm not brave enough to enable 245.b, 245.c
8333         * doc/sdccman.lyx: added latex preamble for hyperref package.
8334           Using pdflatex this will give you a hyperlinked pdf file with
8335           bookmarks. (prepend '%' before /usepackage if this breaks something)
8336
8337 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8338
8339          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8340
8341 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8342
8343         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8344
8345 2003-05-21    <johan AT balder>
8346
8347         * src/SDCCglue.c (printIval): fixed bug #739934
8348
8349 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8350
8351         Applied patch from bug 737905 (renamed yylineo to mylineno):
8352         * src/altlex.c
8353         * src/SDCCast.c
8354         * src/SDCglobl.h
8355         * src/SDCC.lex
8356         * src/SDCCsymt.c
8357         * src/SDCCval.c
8358         * src/pic16/pcode.c: Cleaned warnings
8359         * src/pic16/pcodeflow.c: Cleaned warnings
8360         * src/pic16/pcoderegs.c: Cleaned warnings
8361
8362 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8363
8364         * src/pic16/pcode.c: Cleaned warnings
8365         * src/pic16/pcodepeep.c: Cleaned warnings
8366         * src/pic16/ralloc.c: Cleaned warnings
8367
8368 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8369
8370         * doc/sdccman.lyx: fixed bug 739745
8371         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8372
8373 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8374
8375         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8376         it can be defined with CFLAGS when running configure
8377         * src/SDCCmain.c: fixed compiling + linking with object files
8378
8379 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8380
8381         * configure.in: configure for pic16 port,
8382             added --disable-pic16-port
8383         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8384         * src/SDCCmain.c: linkOptions is changed to set *,
8385             added if/endif conditional macros to remove options help
8386             messages from optionsTable when a port is not configured, added
8387             support for the PIc16 port in the ports table, when executing
8388             the compiler with no port specified on command line, a default
8389             port is selected with the new macro DEFAULT_PORT which is
8390             defined in port.h, in setDefaultOptions() linkOptions is removed
8391             from initialization assignment, since now it is a set,
8392             parseCmdLine uses setParseWithComma for linkOptions, in
8393             linkEdit() linkOptions are accessed with new function indexSet()
8394             which returns the i'th item of a set variable. See SDCCset.c, in
8395             linkEdit() when calling buildCmdLine(), added linkOptions as
8396             last argument. Now users can pass arguments to gplink via the
8397             -Wl option, main() uses pic16glue() to glue up pic16 programs
8398         * src/SDCCpeeph.c: various changes to support pic16
8399         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8400             return the i'th item of the set
8401         * src/SDCCset.h: added function prototype for indexSet()
8402         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8403         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8404         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8405             added macro DEFAULT_PORT
8406         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8407         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8408             generated
8409         * src/pic16/glue.c: commented out some error producing lines
8410         * src/pic16/main.c: __config directives are commented out to stop
8411             gpasm complaining and test the linkage with gplink, _linkCmd and
8412             _asmCmd changed to be more gplink and gpasm friendly
8413         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8414             produced an error when parsed, peep rule 12 is added to utilize
8415             movff, but it is commented out since the pCode does not support
8416             yet a command with 2 address arguments
8417
8418 2003-05-18    <johan AT balder>
8419
8420         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8421         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8422 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8423
8424         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8425   Added feature to script commands from file.
8426
8427 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8428
8429         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8430         * src/SDCCutil.c: include ctype.h for win32
8431
8432 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8433
8434         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8435
8436 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8437
8438         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8439   Fixed so you can set breakpoints prior to run, run does not stop
8440   on entry now.  Add tbreak.  Other enhancements and fixes for use
8441   with ddd.
8442
8443 2003-05-12  Borut Razem <borut.razem AT siol.net>
8444
8445         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8446
8447 2003-05-11  Borut Razem <borut.razem AT siol.net>
8448
8449         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8450         the path of bin directory, so that PATH is the only env. variable, which has to be set
8451         in case of standard installation.
8452         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8453         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8454         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8455
8456 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8457
8458         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8459         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8460         temp files are in the port dir; clean the gen/test directory when
8461         generating new test.c
8462         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8463         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8464         * support/regression/tests/zeropad.c: added
8465
8466 2003-05-09    <johan AT balder>
8467
8468         * src/SDCCglue.c: fixed bug #597940
8469
8470 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8471
8472         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8473   cache sfr, optimize next,step, fix off by one sourceline,
8474   support ddd list function.
8475         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8476
8477 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8478
8479         * support/regression/HTMLgen.py: added compare_s2f()
8480         * support/regression/Makefile: redo 1.27
8481         * support/regression/generate-cases.py: redo 1.5
8482
8483 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8484
8485         * support/regression/tests/float.c: workaround 33 bit hex constant
8486         * support/regression/tests/simplefloat.c: fix division for host
8487
8488 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8489
8490         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8491         that tame's the PIC's over-aggressive optimizer.
8492
8493 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8494
8495          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8496          support for MSVC.
8497
8498 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8499
8500         Initial support for DS80C400. "Hello world" runs on TINIm400
8501         (with polled I/O).
8502
8503 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8504
8505          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8506          * Some notes on ddd usage added in debugger/README
8507          Martin Helmling adding more features and fixes for ddd GUI debugger.
8508          Code added for nexti, stepi, up, down, and other adjustments.
8509
8510 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8511
8512         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8513         * src/pic/peeph.def Added two rules to optimize carry manipulation
8514         * src/pic/* removed debug printfs
8515
8516 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8517
8518         * debugger/mcs51/cmd.c: added header newalloc.h
8519
8520 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8521
8522         * as/Makefile: new EXEEXT
8523         * as/z80/Makefile: remove trailing slash of BUILDIR
8524         * as/z80/clean.mk: new EXEEXT
8525         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8526         * support/cpp2/Makefile.in: new EXEEXT
8527         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8528
8529 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8530
8531         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8532         EXEEXT was introduced to fix all related problems with targets
8533         "clean", "install" and "uninstall"; a couple of further flaws
8534         especially with "clean" have been fixed too
8535         * as/mcs51/Makefile.in
8536         * as/mcs51/clean.mk
8537         * as/z80/Makefile
8538         * Makefile
8539         * clean.mk
8540         * debugger/mcs51/Makefile.in
8541         * debugger/mcs51/clean.mk
8542         * link/z80/Makefile
8543         * link/z80/Makefile.in
8544         * link/z80/clean.mk
8545         * link/Makefile
8546         * packihx/Makefile.in
8547         * packihx/clean.mk
8548         * sim/ucsim/Makefile
8549         * sim/ucsim/clean.mk
8550         * sim/ucsim/avr.src/Makefile.in
8551         * sim/ucsim/avr.src/clean.mk
8552         * sim/ucsim/s51.src/Makefile.in
8553         * sim/ucsim/s51.src/clean.mk
8554         * sim/ucsim/xa.src/Makefile.in
8555         * sim/ucsim/xa.src/clean.mk
8556         * sim/ucsim/z80.src/Makefile.in
8557         * sim/ucsim/z80.src/clean.mk
8558         * sim/ucsim/main_in.mk
8559         * sim/ucsim/packages_in.mk
8560         * sim/ucsim/gui.src/Makefile.in
8561         * sim/ucsim/gui.src/serio.src/Makefile.in
8562         * sim/ucsim/gui.src/serio.src/clean.mk
8563         * src/Makefile.in
8564         * src/clean.mk
8565         * support/cpp2/Makefile.in
8566         * support/cpp2/clean.mk
8567         * support/makebin/Makefile
8568         * support/makebin/clean.mk
8569         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8570         * doc/sdccman.lyx: --program-suffix no longer needed
8571
8572 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8573
8574          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8575          Martin Helmling added support for ddd GUI debugger.
8576          Code added to display assembly, set variables, and other commands
8577          to interface to ddd.
8578
8579 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8580
8581         * as/Makefile: fix target clean
8582         * as/clean.mk: fix target clean
8583         * as/z80/clean.mk: fix target clean
8584
8585 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8586
8587         * Makefile.common.in: added  AT EXEEXT AT
8588         * configure.in: removed all mingw32 stuff
8589         * configure: rebuilt from configure.in
8590         * doc/sdccman.lyx: updated section "installation"
8591         * support/scripts/sdcc_mingw32: adapted to configure
8592         * support/scripts/sdcc_cygwin_mingw32: added
8593
8594 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8595
8596         * src/pic Added object file support for the PIC port
8597         * src/pic Applied patch from Craig Franklin (this started the object file support)
8598         * src/regression Updated the PIC regression tests for object files
8599
8600 2003-04-20  Borut Razem <borut.razem AT siol.net>
8601
8602         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8603           lklex.c: In function `getfid':
8604           lklex.c:203: warning: array subscript has type `char'
8605         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8606           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8607         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8608           stack handling macros
8609
8610 2003-04-19  Borut Razem <borut.razem AT siol.net>
8611
8612         * "handling space characters in file path" task:
8613         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8614         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8615         * support/Util/MySystem.h: make it self-sufficient
8616         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8617           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8618           handling space characters in file path
8619         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8620           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8621         * support/Util/MySystem.c: handling space characters in executable's path
8622
8623 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8624
8625         * as/z80/Makefile: fix permanent rebuild of z80
8626         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8627         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8628
8629 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8630
8631         * src/SDCCopt.c: add special case optimization to replace modulo by
8632           a power of two with a bitwise AND.
8633
8634 2003-04-18    <johan AT balder>
8635
8636         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8637
8638 2003-04-17    <johan AT balder>
8639
8640         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8641         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8642
8643 2003-04-13  Borut Razem <borut.razem AT siol.net>
8644
8645         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8646         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8647           fixed mingw problem in adl_NORMALIZE_PATH
8648
8649 2003-04-12  Borut Razem <borut.razem AT siol.net>
8650
8651         * fixed "#pragma SAVE/RESTORE can not be nested":
8652         * src/SDCC.lex: reworked pragma handling functions
8653         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8654         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8655
8656 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8657
8658         * src/SDCCutil.c (pathEquivalent): defined but not used
8659         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8660         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8661         * configure: rebuilt from configure.in
8662         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8663         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8664         * device/include/Makefile.in: replace sdcc_datadir
8665         * device/lib/Makefile.in: replace sdcc_datadir
8666         * Makefile.common.in: add LDFLAGS from configure
8667         * packihx/Makefile.in: use LDFLAGS
8668         * src/Makefile.in: use LDFLAGS
8669         * support/cpp2/Makefile.in: add LDFLAGS from configure
8670         * support/makebin/Makefile: use LDFLAGS
8671         * .version: bumped version number to 2.3.5
8672
8673 2003-04-12  Borut Razem <borut.razem AT siol.net>
8674
8675         * completed "different paths" task:
8676         * src/SDCCmacro.c: fixed bug in handling quotes
8677         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8678         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8679
8680 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8681
8682         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8683
8684 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8685
8686         * ds390/gen.c ds390/peeph.def: fix bug 706781
8687
8688 2003-04-11  Borut Razem <borut.razem AT siol.net>
8689
8690         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8691
8692 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8693
8694         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8695         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8696          set - this bit used to not be set...).
8697         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8698           bad code in PIC Port
8699         * src/regression/and2.c added to test bug 609268
8700         * src/regression/Makefile added and2.c to regression test
8701
8702
8703 2003-04-08    <johan AT CP255758-A>
8704
8705         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8706         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8707         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8708
8709 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8710
8711         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8712         fix bug #487815
8713         * support/cpp2/Makefile.in: fix bug #487815
8714         * configure: rebuilt from configure.in
8715         * Makefile.common.in: docdir changed, new path suffixes
8716         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8717         * sdcc_vc_in.h: reflect changes from sdccconf.h
8718         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8719         * src/SDCCutil.h: remove BINDIR hack
8720         * doc/sdccman.lyx: update new path hierarchy
8721
8722 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8723
8724         * src/SDCCpeeph.c: added okToRemoveSLOC test
8725
8726 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8727
8728         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8729
8730 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8731
8732         * src/SDCCpeeph.c: added labelIsReturnOnly test
8733         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8734
8735 2003-04-05    <johan AT balder>
8736
8737         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8738         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8739         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8740         * src/SDCCast.c: fixed a warning
8741         * src/SDCCast.h: fixed a warning
8742         * src/SDCCicode.c (operandFromAst): fixed a warning
8743
8744 2003-04-04    <johan AT balder>
8745
8746         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8747         * src/SDCCast.c (decorateType): fixed bug #715076
8748         * src/SDCC.y: fixed bug #702907
8749
8750 2003-04-03    <johan AT balder>
8751
8752         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8753         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8754         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8755         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8756         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8757
8758 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8759
8760         * _decdptr.c: fix return values
8761         * _gptrget.c: fix return values
8762         * _gptrgetc.c: fix return values
8763         * _gptrput.c: fix return values
8764         * _mulint.c: fix return values
8765         * as/z80/Makefile: fix 'make -j' problem
8766
8767 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8768
8769         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8770         * configure.in: big cleanup, updated to autoconf 2.5x
8771         * configure: rebuilt from configure.in
8772         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8773         * sdcc_vc_in.h: reflect changes from sdccconf.h
8774         * doc/Makefile: fixed a flaw in "make install"
8775
8776 2003-04-02    <johan AT balder>
8777
8778         * src/ds390/gen.c (genCmp): no comments
8779         * src/mcs51/gen.c (genCmp): no comments
8780         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8781         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8782
8783 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8784
8785         * support/regression/generate-cases.py: place generated file in given sub directory
8786         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8787         * support/regression/Makefile: improvements for 'make -j';
8788         side effect: it's simpler and faster now
8789
8790 2003-03-31  Borut Razem <borut.razem AT siol.net>
8791
8792         * src/z80/main.c: link-{port} and as-{port} defined without path
8793         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8794
8795 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8796
8797         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8798
8799 2003-03-30  Borut Razem <borut.razem AT siol.net>
8800
8801         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8802           changed type of list parameter to set
8803         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8804         * src/port.h: changed type of do_assemble() parameter to set
8805         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8806           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8807           definition of "cppoutfilename" macro with NULL value in preProcess()
8808         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8809         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8810         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8811           replaced with set *binPathSet
8812         * shash_add() deallocates the item, if allready exsists, before adding the new one
8813         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8814
8815 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8816
8817         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8818           a nested for loop bug in the PIC port
8819         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8820           for loops
8821
8822 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8823
8824         * support/Util/dbuf.h: remove C++ stuff to make it portable
8825
8826 2003-03-28  Borut Razem <borut.razem AT siol.net>
8827
8828         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8829           literal strings in stringLiteral()
8830         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8831         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8832           to the project
8833
8834 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8835
8836         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8837
8838 2003-03-26    <johan AT balder>
8839
8840         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8841         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8842         * src/SDCCast.c (decorateType): fixed " -v < 3"
8843
8844 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8845
8846         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8847         Added Lenny Story's debug infrastructure changes:
8848         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8849         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8850         * src/cdbFile.c: added
8851         * src/SDCCdebug.c: added
8852         * src/SDCCdebug.h: added
8853         * src/SDCCast.c (createFunction)
8854         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8855         * src/SDCCmain.c (parseCmdLine, main)
8856         * src/SDCCmem.c (redoStackOffsets)
8857         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8858         * src/SDCCsymt.h
8859         * src/common.h
8860         * src/avr/gen.c (genAVRCode)
8861         * src/ds390/gen.c (gen390Code)
8862         * src/mcs51/gen.c (gen51Code)
8863         * src/pic/gen.c (genpic14Code)
8864         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8865         * src/xa51/gen.c (genXA51Code)
8866         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8867
8868 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8869
8870         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8871         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8872
8873 2003-03-22    <johan AT balder>
8874
8875         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8876
8877 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8878
8879         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8880         * doc/cdbfileformat.lyx: added, written by Lenny Story
8881         * doc/Makefile: added cdbfileformat.lyx
8882         * doc/clean.mk: added cdbfileformat.lyx
8883
8884 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8885
8886         * src/mcs51/peeph.def: fix bug #705773
8887
8888 2003-03-20    <johan AT balder>
8889
8890         An sfr/sbit can have an "at #" AND an initializer
8891         * src/SDCCsymt.c (checkSClass):
8892         * src/SDCCmem.c (allocGlobal):
8893         * src/SDCCmem.c (allocLocal):
8894         * src/SDCCast.c (createBlock):
8895
8896 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8897
8898         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8899
8900 2003-03-16    <johan AT balder>
8901
8902         Undid the hackup of const and volatile, the problem is much bigger
8903         * src/SDCC.y:1.65
8904         * src/SDCCast.c:1.171
8905         * src/SDCCglue.c:1.138
8906         * src/SDCCicode.c:1.146
8907         * src/SDCCsymt.c:1.150
8908         * src/SDCCval.c:1.65
8909
8910 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8911
8912         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8913         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8914
8915 2003-03-13    <johan AT balder>
8916
8917         Hackup const and volatile modifiers in type chains a bit:
8918         * src/SDCC.y:1.63
8919         * src/SDCCast.c:1.169
8920         * src/SDCCglue.c:1.136
8921         * src/SDCCicode.c:1.143
8922         * src/SDCCsymt.c1.146
8923         * src/SDCCsymt.h1.59
8924         * src/SDCCval.c:1.63
8925
8926 2003-03-12    <johan AT balder>
8927
8928         * src/SDCCBBlock.h: more LRH debugging junk
8929         * src/SDCCcflow.h: more LRH debugging junk
8930         * src/SDCCloop.c: more LRH debugging junk
8931         * src/SDCC.y (struct_declaration): fixed bug #697590
8932         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8933         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8934         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8935
8936 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8937         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8938         test function names must now match exactly).
8939         * src/SDCCcse.c: added special case in findCheaperOp to allow
8940         extending a short integer. Makes less awful code for bug 700121 test case.
8941
8942 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8943
8944         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8945         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8946
8947 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8948
8949         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8950         actually called (operandsNotEqual() was called for all
8951         operandsNotEqualX tests).
8952
8953 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8954
8955         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8956         with shorter literals. Fixes bug 700121.
8957
8958 2003-03-11    <johan AT balder>
8959
8960         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8961
8962 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8963
8964         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8965         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8966
8967 2003-03-10  Borut Razem <borut.razem AT siol.net>
8968
8969         * src/SDCCmain.c: pipe preprocessor's output
8970         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8971         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8972         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8973         which closes all pipes in pipeSet set
8974         * src/SDCCset.c: free deleted item in function deleteSetItem()
8975         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8976         moved from z80 to src subproject
8977         * .version: increased version number to 2.3.4
8978
8979 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8980
8981         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8982         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8983         * support/regression/ports/xa51/spec.mk: fix typo
8984
8985 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8986
8987         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8988
8989 2003-03-09  Borut Razem <borut.razem AT siol.net>
8990
8991         * src/SDCCmain.c: pipe preprocessor's output
8992         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8993         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8994         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8995         which closes all pipes in pipeSet set
8996         * src/SDCCset.c: free deleted item in function deleteSetItem()
8997         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8998         moved from z80 to src subproject
8999
9000 2003-03-09  Borut Razem <borut.razem AT siol.net>
9001
9002         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9003         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9004         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9005         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9006         * src/SDCCglobl.h: unification of WIN32 native definitions
9007
9008 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9009
9010         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9011
9012 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9013
9014         * src/configure.in:   check for endianess (even while cross-compiling)
9015         * src/configure:      check for endianess (even while cross-compiling)
9016         * src/configure_in.h: check for endianess (even while cross-compiling)
9017         * src/avr/gen.c:        remove old endianess stuff
9018         * src/mcs51/gen.c:      remove old endianess stuff
9019         * src/ds390/gen.c:      remove old endianess stuff
9020         * src/pic/gen.c:        remove old endianess stuff
9021         * src/pic/genarith.c:   remove old endianess stuff
9022         * src/pic/glue.c:       fix endianess check
9023         * src/pic16/gen.c:      remove old endianess stuff
9024         * src/pic16/genarith.c: remove old endianess stuff
9025         * src/pic16/glue.c:     fix endianess check
9026         * src/xa51/gen.c:       remove old endianess stuff
9027         * src/z80/gen.c:        fix endianess check
9028         * src/SDCCglue.c:       fix endianess check
9029         * src/ds390/peeph.def: fix bug 700036
9030
9031 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9032
9033         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9034         * src/configure: find appropriate data-types on host for SDCC's int and long
9035         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9036         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9037         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9038
9039 2003-03-07    <johan AT balder>
9040
9041         Just a big NOOP:
9042                 some minor cleanups before the big shot
9043                 OP_DEFS and OP_USES now use Kevin's protection
9044                 new option --nolabelopt
9045
9046         * src/SDCCBBlock.c:
9047         * src/SDCCast.c,:
9048         * src/SDCCcflow.c:
9049         * src/SDCCcse.c:
9050         * src/SDCCicode.c:
9051         * src/SDCCicode.h:
9052         * src/SDCClabel.c:
9053         * src/SDCCloop.c:
9054         * src/SDCCmain.c:
9055         * src/ds390/ralloc.c:
9056         * src/mcs51/ralloc.c:
9057         * src/pic/ralloc.c:
9058         * src/xa51/ralloc.c:
9059         * src/z80/ralloc.c:
9060
9061 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9062
9063         * src/pic/pcode.c (get_op): fix 64 bit warnings
9064         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9065         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9066         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9067         * support/regression/tests/malloc.c: fix 64 bit warnings
9068
9069 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9070
9071         * src/mcs51/gen.c (genMinus): fixed bug 696436
9072
9073 2003-03-02  Borut Razem <borut.razem AT siol.net>
9074
9075         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9076
9077 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9078
9079         * configure.in: test for mkstemp
9080         * sdccconf_in.h: add HAVE_MKSTEMP
9081
9082 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9083
9084         * device/include/ctype.h: removed warning while using --stack-auto
9085         * device/include/malloc.h: removed warning while using --stack-auto
9086         * device/include/string.h: removed warning while using --stack-auto
9087
9088 2003-02-23  Borut Razem <borut.razem AT siol.net>
9089
9090         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9091         because NDEBUG is defined (see man assert)
9092         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9093
9094 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9095
9096         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9097         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9098
9099 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9100
9101         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9102         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9103
9104 2003-02-18    <johan AT balder>
9105
9106         * as/mcs51/asmain.c (asmbl): module can start with a digit
9107         * as/z80/asmain.c (asmbl): module can start with a digit
9108
9109 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9110
9111         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9112         * src/asm.c: fix pipe() for Mingw32
9113
9114 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9115
9116         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9117         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9118         make -V work again; --c1mode reads now from stdin
9119         * doc/sdccman.lyx: added --c1mode
9120         * support/Util/SDCCerr.c: new messages for c1 mode
9121         * support/Util/SDCCerr.h: new messages for c1 mode
9122         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9123
9124 2003-02-15    <johan AT balder>
9125
9126         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9127
9128 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9129
9130         * doc/sdccman.lyx: Environment variables, -o and other minor things
9131
9132 2003-02-14    <johan AT balder>
9133
9134         * src/xa51/main.c: before anyone really tries to use it :)
9135
9136         * Install doc's in share/sdcc/doc
9137         * removed some obsolete files
9138         * Do a proper make distclean and uninstall
9139         M Makefile.common.in
9140         R sdccbuild.sh
9141         M as/Makefile
9142         M device/include/Makefile.in
9143         M device/lib/Makefile.in
9144         M doc/sdccman.lyx
9145         M link/Makefile
9146         M sim/ucsim/doc/Makefile.in
9147         M src/clean.mk
9148         R src/avr/peeph.rul
9149         R src/xa51/peeph.rul
9150         M support/cpp2/Makefile.in
9151         M support/makebin/Makefile
9152
9153
9154 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9155
9156         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9157
9158 2003-02-10  Borut Razem <borut.razem AT siol.net>
9159
9160         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9161         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9162         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9163         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9164         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9165         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9166         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9167         src/z80/Makefile.bcc: Borland Makefile cleanup
9168         * as/z80/Makefile.bcc: Added Borland Makefile
9169         * support/cpp2/borland.h: Removed
9170
9171 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9172
9173         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9174         * src/SDCC.lex: new pragma NOIV
9175         * src/SDCCglobl.h: new pragma NOIV
9176         * src/SDCCmem.c: new pragma NOIV
9177
9178 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9179
9180         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9181
9182 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9183
9184         * src/SDCCmain.c: signal handling is switched off by --debug
9185         * doc/Makefile: small fix for install; use clean.mk again
9186         * doc/clean.mk: clean *.pdf and *.html too
9187
9188 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9189
9190         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9191         * device/lib/printfl.c: fix a ds390 bug by making it portable
9192         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9193         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9194         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9195         * debugger/mcs51/cmd.c: converted multi-line string literals
9196         * sim/ucsim/globals.cc: converted multi-line string literals
9197         * src/SDCCmain.c: introduced signal handler to remove temp files
9198         * doc/Makefile: small tweaks, implement clean
9199         * doc: removed generated files
9200
9201 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9202
9203         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9204         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9205         Address Record is not correctly generated for DS390."
9206
9207 2003-02-02  Borut Razem <borut.razem AT siol.net>
9208
9209         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9210         * as/mcs51/asm.h: fixed compilation with Borland C
9211         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9212         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9213         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9214         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9215         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9216         src/z80/Makefile.bcc: delete $(LIB) only if exist
9217         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9218
9219 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9220
9221         * device/include/malloc.h: introduced NULL
9222         * device/include/string.h: introduced NULL
9223         * device/include/stdlib.h: introduced NULL
9224         * device/lib/_memcpy.c: removed NULL
9225         * device/lib/_strcat.c: removed NULL
9226         * device/lib/_strchr.c: removed NULL
9227         * device/lib/_strcmp.c: removed NULL
9228         * device/lib/_strcpy.c: removed NULL
9229         * device/lib/_strcspn.c: removed NULL
9230         * device/lib/_strlen.c: removed NULL
9231         * device/lib/_strncat.c: removed NULL
9232         * device/lib/_strncmp.c: removed NULL
9233         * device/lib/_strncpy.c: removed NULL
9234         * device/lib/_strpbrk.c: removed NULL
9235         * device/lib/_strrchr.c: removed NULL
9236         * device/lib/_strspn.c: removed NULL
9237         * device/lib/_strstr.c: removed NULL
9238         * device/lib/_strtok.c: removed NULL
9239         * device/lib/malloc.c: removed NULL, include own header
9240
9241 2003-02-02    <johan AT balder>
9242
9243         * 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
9244         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9245         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9246         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9247         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9248         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9249
9250 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9251
9252         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9253         area 'DATA'"
9254
9255 2003-02-01    <johan AT balder>
9256
9257         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9258
9259 2003-01-31    <johan AT CP255758-A>
9260
9261         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9262
9263 2003-01-30    <johan AT balder>
9264
9265         * src/SDCCBBlock.c: automatic bug detection
9266         * src/SDCCicode.c: automatic bug detection
9267
9268 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9269
9270         * src/SDCCglobl.h:   now --xram-size 0 works
9271         * src/SDCCmain.c:    now --xram-size 0 works
9272
9273 2003-01-29    <johan AT balder>
9274
9275         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9276
9277 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9278
9279         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9280         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9281         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9282         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9283         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9284         * src/SDCCmain.c:    Added options --xram-size and --code-size
9285
9286 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9287
9288         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9289         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9290
9291 2003-01-27    <johan AT balder>
9292
9293         * src/SDCC.y: fixed bug #613764
9294
9295 2003-01-26    <johan AT balder>
9296
9297         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9298         * src/SDCCsymt.h: fixed bug #673374
9299         * src/SDCCglue.c: fixed bug #661910
9300         * src/SDCCast.c: fixed bug #458099 and 673374
9301
9302 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9303
9304         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9305         * as/mcs51/strcmpi.h: added
9306         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9307         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9308         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9309         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9310         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9311         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9312         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9313         * as/mcs51/Makefile.aslink: new module strcmpi
9314         * as/mcs51/Makefile.asx8051: new module strcmpi
9315         * as/mcs51/Makefil.bcc: new module strcmpi
9316         * as/mcs51/Makefile.in: new module strcmpi
9317         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9318
9319 2003-01-26    <johan AT balder>
9320
9321         * src/SDCCglue.c: reverted back to 1.124
9322         * src/SDCCast.c: reverted back to 1.156
9323         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9324
9325 2003-01-25    <johan AT balder>
9326
9327         * src/SDCCglue.c: A better fix for bug #661910
9328         * src/SDCCast.c: A better fix for bug #661910
9329         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9330
9331 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9332
9333         * src/Makefile.in: remove spawn.o
9334         * src/SDCCmain.c: remove spawn.h
9335         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9336         * src/spawn.c: removed
9337         * src/spawn.h: removed
9338         * support/regression/ports/ds390/spec.mk: link with -r
9339
9340 2003-01-24    <johan AT CP255758-A>
9341
9342         * src/ds390/gen.c (aopOp): fixed bug #667458
9343         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9344         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9345         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9346
9347 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9348
9349         * src/mcs51/peeph.def: better assembler identation by Frieder
9350         * src/mcs51/gen.c: better assembler identation by Frieder
9351
9352 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9353
9354         * as/z80/string.h: removed for gcc 3.2
9355         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9356         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9357
9358 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9359
9360         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9361         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9362         * support/regression/Makefile: separate temp files for ports
9363         * support/regression/generate-cases.py: separate temp files for ports
9364         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9365         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9366
9367 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9368
9369         * moved tinitalk to device/examples/ds390
9370
9371 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9372
9373         * as/mcs51/lkmem.c: rflag is for DS390
9374         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9375         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9376                          (linkEdit): move mem- and map-files the same way as ihx-files
9377         * src/z80/main.c (_setDefaultOptions): removed --generic
9378         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9379         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9380         * src/pic/glue.c (picglue): --c1mode works again
9381         * src/pic16/glue.c (pic16glue): --c1mode works again
9382         * src/asm.c (printCLine): fix #660034
9383
9384 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9385
9386         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9387         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9388         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9389         * as/mcs51/lkmem (summary): better fix for sp problem
9390         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9391         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9392         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9393                                               remove --stack-after-data
9394
9395 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9396
9397         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9398         * src/SDCCutil.c (join): ugly bug: missing '\0'
9399         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9400
9401 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9402
9403         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9404         * src/port.h: typo
9405         * src/pic/main.c (_asmCmd): gpasm supports -o
9406         * src/z80/main.c: more general macros
9407         * device/lib/Makefile.in: remove intermediate files
9408
9409 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9410
9411         * .version: Bumped version number to 2.3.3
9412         * src/SDCCBBlock.c: new option -o
9413         * src/SDCCglobl.h: new option -o
9414         * src/SDCCglue.c: new option -o
9415         * src/SDCCmain.c: new option -o
9416         * src/asm.c: new option -o
9417         * src/ds390/main.c: new option -o
9418         * src/pic/glue.c: new option -o
9419         * src/pic/pcode.c: new option -o
9420         * src/pic/ralloc.c: new option -o
9421         * src/pic16/glue.c: new option -o
9422         * src/pic16/pcode.c: new option -o
9423         * src/pic16/ralloc.c: new option -o
9424         * src/z80/main.c: new option -o
9425         * device/lib/Makefile.in: use -o
9426         * support/regression/ports/ds390/spec.mk: use -o
9427         * support/regression/ports/gbz80/spec.mk: use -o
9428         * support/regression/ports/mcs51/spec.mk: use -o
9429         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9430         * support/regression/ports/z80/spec.mk: use -o
9431         * support/regression/ports/ucz80/spec.mk: use -o
9432         * support/regression/ports/xa51/spec.mk: use -o
9433         * support/regression/fwk/lib/timeout.c: fix usage string
9434
9435 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9436         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9437
9438 2003-01-07    <johan AT balder>
9439
9440         * src/SDCCast.c (decorateType): fixed bug #600035
9441
9442 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9443         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9444         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9445         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9446         * src/pic/pcode.c: outcommented unused variable to remove warnings
9447         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9448
9449 2003-01-06    <karl AT turbobit.com>
9450         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9451    regression tests.
9452
9453 2003-01-06    <johan AT balder>
9454
9455         * src/SDCCicode.c: fixed array add
9456
9457 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9458         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9459         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9460
9461 2003-01-04    <johan AT balder>
9462
9463         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9464
9465 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9466         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9467
9468 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9469         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9470         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9471
9472 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9473         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9474
9475 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9476         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9477
9478 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9479         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9480
9481 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9482
9483     * in \sdcc\as\mcs51\ changed these files in order to create an
9484     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9485     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9486     following files to include the previous two files: aslink.dsp,
9487     Makefile.aslink, Makefile.bcc, and Makefile.in.
9488
9489     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9490     .adb instead of .cdb
9491
9492 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9493
9494         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9495         value from option --iram-size.
9496
9497 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9498
9499         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9500         dram[] array.
9501
9502 2002-09-18    <wiml AT hhhh.org>
9503
9504         * SDCClrange.h: exposed setFromRange() and setToRange()
9505         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9506           packRegsForAccUse() (bug 542397)
9507         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9508           multiple times and emitting the fetch operations more than once
9509           added aopGetUsesAcc() function to allow binary operators to
9510           fetch their operands in the correct order; made genMinus() emit
9511           compact code for X = LITERAL - Y
9512
9513 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9514         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9515         sprintf() in line 1267.
9516
9517 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9518         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9519         like ports.
9520
9521 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9522         Changes to aslink (All the changes are marked with 'JCF'):
9523
9524         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9525         summary().
9526
9527         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9528         area BSEG.  Also moves, if possible, the DATA area down into the internal
9529         ram so more space is available.
9530
9531         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9532         sflag.
9533
9534         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9535         not bytes.  Function summary() which creates a memory usage summary
9536         file with extension .mem.  Reports of overlaping stack and small stack
9537         size.  If the space for the stack is less than 16 bytes aslink trows a
9538         warning.
9539
9540         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9541         the 8051.  Option 'y' for memory summary output file.
9542
9543         Changes to sdcc (All the changes are marked with 'JCF'):
9544
9545         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9546
9547         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9548         overlaying area for it (uses RegBankUsed[4]).
9549
9550         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9551         bank zero as used by default.  By default aslink locates the stack
9552         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9553         the creation of the .mem file.  Delegates the allocation of data area
9554         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9555         the begining of the stack area to aslink.
9556
9557         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9558         glue() in SDCCglue.c creates an area for it.
9559
9560 2002-09-03  Borut Razem <borut.razem AT siol.net>
9561         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9562         sdcc/src/pic/glue.c:
9563         introduced atexit() handler for teporay files removal in case of
9564         errors, assertions, ...
9565
9566 2002-08-29  Borut Razem <borut.razem AT siol.net>
9567         * sdcc/support/cpp2/auto-host_vc_in.h:
9568         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9569         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9570         Maybe there is a similar problem with BORLANDC? It should be checked!
9571
9572         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9573         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9574         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9575         was not executed, and the compiler (cl) launched a warning:
9576         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9577
9578 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9579         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9580
9581 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9582         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9583
9584         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9585           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9586           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9587           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9588           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9589           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9590           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9591         - added Release configuration in VS projects
9592         - review of compiler an linker options
9593         - VC .exe files are generated in bin_vc directory, not to interfere
9594           with binaries generated from other projects (cygwin, mingw, bcc ...)
9595
9596         * sdcc/src/yacc.dsp: added
9597
9598         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9599         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9600         and insert the version number definitions from .version
9601
9602         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9603
9604         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9605         added - genarate auto-host.h using auto-host_vc_in.h as template
9606
9607         * sdcc/sdcc_vc.h,
9608         removed from CVS, generated automatically
9609
9610 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9611         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9612
9613 2002-08-11  Borut Razem <borut.razem AT siol.net>
9614         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9615
9616 2002-08-10  Borut Razem <borut.razem AT siol.net>
9617         * src/SDCCmain.c (main):
9618         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9619         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9620         The consequence was that some temporary files were not removed.
9621
9622         * src/SDCCglue.c:
9623         unification of code in functions tempfilename() and tempfile():
9624         function tempnam() is defined in Visual Studio 6.0 and .NET
9625
9626         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9627
9628         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9629           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9630         - removed compiler command line option /WX: Treats all warnings as errors
9631         - update a list of source files, included into the project
9632
9633         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9634           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9635         changed project type to Generic Project so that can be correcly converted to VS.NET project
9636
9637         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9638
9639         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9640
9641         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9642
9643         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9644         added return 0 statements after assert() to make compiler happy
9645
9646         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9647         added newline in the def file to keep MSC compiler satisfied
9648
9649         * sdcc/src/z80/gen.c:
9650         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9651           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9652         - solved MSC error in function aopDump()
9653
9654         * sdcc_vc.h: define PREFIX as "\\sdcc"
9655
9656 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9657         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9658
9659 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9660         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9661         - Rewrote the register banking algorithm.
9662         - Added pCode live-range analysis to registers (for now, only non-used and
9663         singly-used registers optimized away)
9664
9665         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9666
9667         * 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.
9668
9669 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9670         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9671
9672 2002-04-22  Michael Hope  <michaelh AT vroom>
9673
9674         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9675
9676         * configure.in (DD_COPT): Added include support required for gbdk.
9677
9678         * .version: Bumped version number just to increase it.
9679
9680         * src/SDCCmain.c: Added -nostdinc to the default options.
9681
9682 2002-04-15  Michael Hope  <michaelh AT vroom>
9683
9684         * device/lib/z80/printf.c (sprintf): Added.
9685
9686         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9687
9688         * src/z80/peeph.def: Added transpose redundent load rule.
9689
9690         * src/z80/main.c: Added force callee saves for jaune.
9691
9692         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9693
9694         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9695
9696 2002-03-28  Johan Knol  <johan AT balder>
9697
9698         * src/SDCCval.c: fixed bug #532436
9699
9700 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9701         * /src/port.h:
9702         Added "char *Processor" field to the port structure.
9703
9704         * /src/SDCCmain.c:
9705         Added -p option. Allows port dependent processor to be specified.
9706
9707         * all ports:
9708         Initialized the new field char *Processor field to NULL in all ports
9709
9710         * /src/pic/*:
9711         Compiler generated registers for interrupt context saving
9712         were not getting allocated.
9713
9714 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9715
9716         * /src/SDCCast.c:
9717         Fixed left shift. Will promote the left side of a left shift
9718         if a) left shifting more than size of operand or b) when assigned
9719         to something size > size of left side
9720
9721 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9722         * src/pic/*
9723         tons of changes. Register allocation has been
9724         rewritten. Added customization for the various PICs. Flow
9725         analysis is restructured. ...
9726
9727         * src/pic/device.h:
9728         Added
9729
9730         * src/pic/device.c:
9731         Added. device.c is a PIC port hack to accomodate variations
9732         in PIC devices.
9733
9734 2002-03-13  Michael Hope  <michaelh AT vroom>
9735
9736         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9737
9738 2002-03-04  johanknol  <johanknol AT manik>
9739
9740         * /src/SDCCval.c: fixed
9741
9742         const unsigned char arr[][2] = { { 0, 1 } };
9743         t18.c:1: error: Initializer element is not constant
9744
9745 2002-03-04  bela  <bela AT manik>
9746
9747         * /device/include/mcs51reg.h:
9748         ds89c420 register definition update
9749
9750 2002-03-03    <johan AT FRIJA>
9751
9752         * support/Util/SDCCerr.c: did something, but don't no why anymore
9753
9754         * support/regression/tests/bug-524691.c: made it a little less shy
9755
9756         * src/SDCCast.c (decorateType): fixed bug #524697
9757
9758         * src/SDCCast.c: made some lineno improvements
9759
9760         * src/SDCCval.c (getNelements): changed warning to error
9761
9762         * src/SDCCglue.c (printIvalArray): changed warning to error
9763
9764         * src/SDCCicode.c: fixed a warning for mingw
9765
9766         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9767
9768         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9769
9770 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9771
9772         * src/ds390/peeph.def:
9773         Added some more peephole rules
9774
9775         * src/ds390/gen.c: Various fixes & enhancements
9776
9777         * src/SDCClrange.c, src/SDCClrange.h:
9778         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9779
9780         * src/ds390/ralloc.c:
9781         various fixes & enhancements (ds390) specific
9782
9783         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9784         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9785         from rallocs.
9786
9787         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9788
9789 2002-03-02    <johan AT FRIJA>
9790
9791         * src/SDCCast.c (decorateType): fixed bug #524708
9792
9793         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9794
9795         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9796
9797 2002-03-01  Michael Hope  <michaelh AT vroom>
9798
9799         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9800
9801         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9802
9803 2002-03-01    <johan AT FRIJA>
9804
9805         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9806
9807         * src/SDCCast.c (decorateType): fixed bug #524209
9808
9809         * src/SDCCval.c (valNot): fixed bug #524195
9810
9811 2002-02-26    <johan AT balder>
9812
9813         * src/xa51/gen.c: fixed a warning
9814
9815         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9816
9817         * src/SDCCast.c (decorateType): fixed bug #522534
9818
9819 2002-02-23    <johan AT balder>
9820
9821         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9822
9823 2002-02-22    <johan AT balder>
9824
9825         * src/SDCCast.c: fixed bug #514865
9826
9827         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9828
9829 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9830
9831         * sdcc/src/SDCCloop.c:
9832         Previous fix was not good. basic blocks that have "break" or "return" are
9833         not really partof a loop , but live ranges used in these blocks should
9834         be live thru the entire loop, so set partOfLoop but don't add them to
9835         loop region
9836
9837 2002-02-21    <johan AT FRIJA>
9838
9839         * src/SDCCcse.c: fixed bug #514308
9840
9841 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9842
9843         * src/SDCCloop.c:
9844         Fixed BUG #519583. If a conditional block ended in a return/break
9845         statement inside a loop, it was not being considered part of the loop.
9846
9847         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9848
9849 2002-02-10  Karl Bongers <karl AT turbobit.com>
9850
9851         * debugger/*:
9852         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9853         with lots of comments and notes.
9854
9855         * device/examples/test2.c:
9856         Fix bug, "red" variable not being initialized(compiler complained).
9857
9858         * device/examples/Makefile, examples/test3.c:
9859         Add Makefile in device/examples folder, compiles test3.c
9860         for use as a multiple module SDCDB test case.
9861
9862         * sim/ucsim/cmd.src/cmdset.cc:
9863         Took out debug printfs in ucsim "next" command.
9864
9865         * sim/ucsim/xa.src:
9866         Karl and Johan start ucsim XA support.  Most dissassembly working,
9867         about 75% emulation done(plenty of work remaining).
9868
9869         * sim/ucsim/z80.src:
9870         Add Z80 support to ucsim, add test-ucz80 regression test,
9871         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9872         Notice z80 compiler fails on examples/test3.c/crc code.
9873
9874 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9875
9876         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9877         Added support for --parms-in-bank1
9878
9879         * src/ds390/peeph.def:
9880         added a few more peephole optimzations
9881
9882         * src/ds390/main.c:
9883         1) added __builtin_inp & __builtin_outp used to read in data of given length
9884            from a memory mapped port
9885         2) added __builtin_memcmp
9886         3) added __builtin_swapw swap bytes of a short
9887
9888         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9889         1) handle multiple send & receives from register bank1
9890         2) ralloc can now allocate DPTR1 to some liveRanges
9891
9892         * src/SDCCsymt.c, src/SDCCsymt.h:
9893         changes to handle multiple sends & receives
9894
9895         * src/SDCCptropt.h:
9896         added some pointer arithmetic optimization
9897
9898         * src/SDCCptropt.c:
9899         added some pointer arithmetic optimizations but not stable yet so not
9900         called from anywhere (will get this working shortly)
9901
9902         * src/SDCCopt.c: fixed for multiple sends & receives
9903
9904         * src/SDCCmain.c:
9905         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9906         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9907            set preprocessor defines (depending on options)
9908
9909         * src/SDCCicode.c, src/SDCCicode.h:
9910         changes made to handle multiple sends & receives
9911
9912         * src/SDCCglobl.h:
9913         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9914
9915         * src/SDCCcse.c, src/SDCCcse.h:
9916         added function findbackward def (to be used in upcoming optimization)
9917
9918         * src/SDCCcflow.c, src/SDCCcflow.h:
9919         added function returnAtEnd - to determine if a basic block terminates with
9920         a RETURN iCode
9921
9922         * src/SDCCast.c, src/SDCCast.h:
9923         added option parms-in-bank1
9924
9925         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9926         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9927         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9928         adjusted for --parms-in-bank1 option
9929
9930         * device/include/string.h:
9931         donot redefine "reentrant" keyword
9932
9933         * device/include/ds80c390.h: Added some more SFRs
9934
9935 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9936
9937         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9938
9939 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9940
9941         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9942
9943 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9944
9945         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9946
9947 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9948
9949         * Added --xram-movc option
9950
9951 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9952
9953         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9954
9955 2002-01-11  Johan Knol
9956
9957         * Added math lib of Jesus Calvino-Fraga
9958
9959 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9960
9961         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9962         * support/regression/Makefile: new target test-mcs51-stack-auto
9963         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9964
9965 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9966
9967         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9968
9969 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9970
9971         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9972
9973 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9974
9975         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9976
9977         * src/SDCCglue.h: add definition for printIvalChar()
9978
9979 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9980
9981         * src/SDCCast.c: fix #498138 by Johan
9982
9983         * src/SDCCglue.c: fix #498138 by Johan
9984
9985 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9986
9987         * support/regression/Makefile: fix clean
9988
9989         * support/regression/ports/ds390/support.c: fix transmission of last character
9990
9991 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9992
9993         * /sdcc/src/ds390/gen.c:
9994         a) improved computing address of stack variable
9995         b) took out some #if 0 code
9996         c) improved parmBytes adjustment
9997         d) improved genPlusIncr & genMinusIncr
9998         e) genCmp could generate bad code (when left assigned to DPTR)
9999         f) Fixed bug in hasInc
10000
10001         * /sdcc/src/ds390/ralloc.c:
10002         a) packRegsForSupport could mess up live information (Fixed)
10003         b) packRegsDPTRuse could be incorrect for left & right shift
10004
10005         * /sdcc/src/mcs51/ralloc.c:
10006         packRegsForSupport could mess up the live information (Fixed)
10007
10008         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10009
10010         * /sdcc/src/SDCCast.c:
10011         can reverse a loop even if function call is present as long
10012         as the loop control variable is local & is not passed as parameter
10013
10014 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10015
10016         * /sdcc/ChangeLog: *** empty log message ***
10017
10018         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10019         More builtin function additions for TININative
10020
10021         * /sdcc/src/ds390/ralloc.c:
10022         Had broken the regression testsuite
10023
10024         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10025
10026         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10027         Added funcattr hasStackParms will be set for reentrant functions when there
10028         are paramteres on the stack, this helps in minimizing frame pointer generation
10029         typeFromStr can handle function pointers now
10030
10031         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10032         *** empty log message ***
10033
10034 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10035
10036         * /src/ds390/gen.c, /src/ds390/main.c:
10037         More builtin function additions for TININative
10038
10039         * /src/ds390/ralloc.c:
10040         Had broken the regression testsuite
10041
10042         * /src/SDCCast.c: Fixed a bug in dumptree
10043
10044         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10045         Added funcattr hasStackParms will be set for reentrant functions when there
10046         are paramteres on the stack, this helps in minimizing frame pointer generation
10047         typeFromStr can handle function pointers now
10048
10049         * /doc/builtins.txt, /doc/TININative.txt:
10050         *** empty log message ***
10051
10052
10053 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10054
10055         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10056         ALPHA version for -mTININative
10057
10058         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10059         updated to reflect changes in the port structure
10060
10061         * /src/port.h:
10062         added function do_assemble (similar to do_link) if non-null this function
10063         will be called to do assembly (-mTININative) requires a multi command
10064         assembly
10065         added function genAssemblerEnd will be called to generate assembler Epilogue
10066
10067         * /src/SDCCsymt.c:
10068         added _JavaNative to debug info printing
10069
10070         * /src/SDCCmain.c: added option --tini-libid
10071         added port->do_assemble function (-mTININative) has a multi command assemble
10072
10073         * /src/SDCCglue.c: Disabled "constExpr" check
10074         added port->genAssemblerEnd function
10075
10076         * /src/SDCCglobl.h: Added option --tini-libid value
10077
10078         * /src/SDCCast.h:
10079         tookout optimizeCompare from the header (has no external references)
10080
10081         * /src/SDCCast.c: made one more function "static"
10082
10083 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10084
10085         * src/z80/mappings.i: Added z80asm support.
10086
10087         * src/z80/main.c: Added z80asm support on --asm=z80asm
10088
10089         * src/z80/gen.c: Fixed asm portability issues.
10090
10091         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10092
10093         * src/SDCCglue.c (printExterns): Added global/extern split.
10094
10095 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10096
10097         * support/regression/Makefile: added test for mcs51 model large
10098
10099         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10100
10101         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10102
10103 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10104
10105         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10106
10107 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10108
10109         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10110
10111         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10112
10113 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10114
10115         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10116
10117         * support/regression/tests/simplefloat.c: Port to mcs51.
10118
10119 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10120         * support/regression/tests/bug-485362.c: Added.
10121
10122         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10123
10124         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10125
10126         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10127
10128         * src/z80/gen.c (aopDump): Added a dump function.
10129
10130 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10131         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10132
10133         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10134
10135         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10136
10137         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10138
10139         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10140
10141         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10142
10143         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10144
10145         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10146
10147         * support/regression/ports/ds390/support.c: Use tinibios.
10148
10149         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10150
10151 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10152
10153         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10154         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10155
10156         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10157
10158         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10159
10160 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10161
10162         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10163
10164         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10165         (packRegsForIYUse): Created and optimised.
10166
10167 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10168
10169         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10170 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10171
10172         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10173
10174         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10175
10176         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10177
10178 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10179
10180         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10181
10182         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10183
10184 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10185
10186         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10187
10188         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10189
10190         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10191
10192 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10193
10194         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10195         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10196         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10197
10198         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10199
10200         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10201         (genNotFloat): Added.
10202         (genUminusFloat): Added.
10203
10204         * device/lib/z80/Makefile: Added floating pt stubs.
10205
10206         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10207
10208         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10209
10210         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10211
10212 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10213
10214         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10215
10216         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10217
10218         * sdcc/support/regression/Makefile: Add port ds390.
10219
10220         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10221
10222         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10223
10224         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10225
10226         * sdcc/support/regression/ports/ds390/support.c: Added.
10227
10228         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10229
10230         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10231
10232         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10233
10234 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10235
10236         * device/include/malloc.h: Added z80 and gbz80 support.
10237
10238         * device/lib/gbz80/heap.s: Added.
10239
10240         * device/lib/z80/heap.s: Added.
10241
10242         * device/lib/malloc.c: Added z80 and gbz80 support.
10243
10244         * support/regression/tests/malloc.c (testMalloc): Added.
10245
10246         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10247
10248         * support/regression/tests/bug-478094.c: Added.
10249
10250         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10251
10252 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10253
10254         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10255
10256         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10257
10258         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10259
10260         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10261
10262         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10263
10264 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10265
10266         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10267
10268 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10269
10270         * support/regression/tests/bug-477927.c: Added.
10271
10272         * src/z80/peeph.def: Added minor rules.
10273
10274         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10275
10276         * src/z80/peeph.def: Added jump optimisation modification.
10277
10278 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10279
10280         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10281
10282 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10283
10284         * support/regression/tests/funptrs.c: Added.
10285
10286 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10287
10288         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10289
10290 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10291
10292         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10293
10294         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10295
10296         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10297         (movLeft2ResultLong): Created.
10298
10299         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10300         (joinPushes): Added.  Joins two char pushes into a word push.
10301
10302 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10303
10304         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10305
10306         * support/makebin/Makefile (install): Added creation of dest dir.
10307
10308 2001-10-24 Karl Bongers <karl AT turbobit.com>
10309
10310         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10311
10312 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10313
10314         * src/z80/ralloc.c: Turned off faulty pack for one use.
10315
10316         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10317
10318         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10319
10320 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10321
10322         * support/regression/Makefile: Improved clean
10323
10324         * support/regression/ports/gbz80/spec.mk: Added clean
10325
10326         * support/regression/ports/host/spec.mk: Added clean
10327
10328         * support/regression/ports/z80/spec.mk: Added clean
10329
10330         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10331
10332         * support/regression/ports/mcs51/timeout.c: little improvements
10333
10334 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10335
10336         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10337
10338         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10339
10340         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10341
10342 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10343
10344         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10345
10346         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10347
10348 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10349         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10350
10351         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10352
10353         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10354
10355         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10356
10357         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10358
10359         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10360
10361         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10362
10363         * support/regression/tests/longor.c: Added.
10364
10365 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10366
10367         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10368
10369         * as/mcs51/aslink.h: define PATH_MAX
10370
10371         * as/mcs51/asm.h: define PATH_MAX
10372
10373         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10374
10375         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10376
10377         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10378
10379         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10380
10381         * src/SDCCglobl.h: define PATH_MAX
10382
10383         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10384
10385         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10386
10387 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10388
10389         * src/z80/gen.c (gencjneshort): Fixed
10390
10391         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10392
10393 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10394
10395         * support/regression/tests/bug-469671.c: Added.
10396
10397         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10398
10399 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10400
10401         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10402
10403         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10404
10405 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10406
10407         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10408
10409         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10410
10411         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10412
10413         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10414
10415         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10416
10417         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10418
10419         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10420
10421 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10422
10423         * 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.
10424
10425         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10426
10427         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10428
10429 2001-10-07    <johan AT FRIJA>
10430
10431         * device/lib/gets.c (gets): fixed the return value.
10432
10433 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10434         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10435
10436         * 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.
10437
10438         * 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.
10439
10440         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10441
10442         * src/pic/gen.c: Removed Safe_strdup.
10443
10444         * configure.in: Added option to enable libgc support.
10445
10446         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10447         (bitVectUnion): Optimised.
10448         (bitVectIntersect): Optimised.
10449         (bitVectBitsInCommon): Optimised.
10450         (bitVectCplAnd): Optimised.
10451
10452         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10453
10454 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10455
10456         * src/SDCCmain.c: distinguish between assembler debug and plain options
10457
10458         * src/avr/main.c:   remove standard assembler options
10459
10460         * src/ds390/main.c: remove standard assembler options
10461
10462         * src/mcs51/main.c: remove standard assembler options
10463
10464         * src/port.h: removed "PENDING" comment
10465
10466 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10467
10468         * src/device/lib/_mulint.c  : new, with assember functions
10469
10470         * src/device/lib/_mullong.c : new, with assember functions
10471
10472         * src/device/lib/_divuint.c : with assember functions
10473
10474         * src/device/lib/_divsint.c : with assember functions
10475
10476         * src/device/lib/_divulong.c: with assember functions
10477
10478         * src/device/lib/_divslong.c: with assember functions
10479
10480         * src/device/lib/_moduint.c : with assember functions
10481
10482         * src/device/lib/_modsint.c : with assember functions
10483
10484         * src/device/lib/_modulong.c: with assember functions
10485
10486         * src/device/lib/_modslong.c: with assember functions
10487
10488         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10489
10490         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10491
10492         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10493                                       replaced _mululong.c and _mulslong.c by _mullong.c
10494
10495 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10496
10497         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10498
10499 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10500
10501         * src/SDCCglue.c: test, if win32api is available for MINGW
10502
10503 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10504
10505         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10506         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10507         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10508         * support/regression/ports/host/spec.mk: removed GENERIC
10509         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10510         * support/regression/ports/z80/spec.mk: removed GENERIC
10511
10512 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10513
10514         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10515
10516         * support/regression/tests/bug-467035.c: Created.
10517
10518 2001-10-01    <johan AT FRIJA>
10519
10520         * src/SDCC.y: fixed bug #466586 part 1
10521
10522 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10523
10524         * SDCCicode.c: z80 has no generic pointers
10525         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10526
10527 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10528
10529         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10530
10531 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10532
10533         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10534
10535         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10536
10537 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10538
10539         * configure.in: Fixed up so that ucsim is only configured once.
10540
10541         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10542
10543         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10544         (getPathDifference): As above.
10545
10546         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10547
10548         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10549
10550 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10551         * .version: Updated to 2.3.1
10552
10553         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10554         Added copyright header.
10555
10556         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10557         (assemble): Added support for macro based assembler commands.
10558         (linkEdit): Added support for macro based linker commands.
10559         (preProcess): Changed the pre-processor to use macros.
10560         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10561         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10562
10563         * device/lib/z80/crt0.s: Added module name for debugging.
10564
10565 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10566
10567         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10568
10569         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10570
10571         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10572
10573         * src/Makefile.in: Added SDCCmacro and SDCCutil
10574
10575 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10576
10577         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10578
10579 2001-09-16    <johan AT FRIJA>
10580
10581         * 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.
10582
10583 2001-09-15    <johan AT FRIJA>
10584
10585         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10586         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10587
10588 2001-09-11    <johan AT FRIJA>
10589
10590         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10591
10592 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10593
10594         * support/regression/tests/bug-460444.c: Added test case.
10595
10596         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10597         (genCast): Added justification for all of the asserts.
10598
10599 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10600
10601         * support/regression/support.c: _xdata replaced by xdata
10602
10603         * support/regression/spec.mk: removed _generic
10604
10605 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10606
10607         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10608
10609         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10610         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10611
10612         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10613
10614         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10615
10616         * support/regression/tests/bug-460010.c: Added test case.
10617
10618         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10619
10620 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10621
10622         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10623
10624         * support/regression/testfwk.c: removed workaround for bug #436344
10625
10626         * support/regression/tests/bp.c: use less memory with mcs51
10627
10628         * support/regression/tests/bug-441448.c: use less memory
10629
10630         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10631
10632         * support/regression/collate-results.py: typo
10633
10634 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10635
10636         * support/regression/tests/fetchoverlap.c: Added new test case.
10637
10638         * support/regression/tests/bp.c: Added new test case.
10639
10640         * support/regression/tests/bug-448984.c: Added new test case.
10641
10642         * support/regression/tests/pow2shifts.c: Added new test case.
10643
10644         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10645         (genlshTwo): Fixed right shift for count > 8.
10646
10647         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10648
10649 2001-09-08    <johan AT FRIJA>
10650
10651         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10652
10653 2001-09-07    <johan AT FRIJA>
10654
10655         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10656
10657         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10658
10659 2001-09-06    <johan AT FRIJA>
10660
10661         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10662         * bernhard noted me at this: "() equals to (void)" (1.38)
10663
10664 2001-09-05    <johan AT FRIJA>
10665
10666         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10667
10668 2001-09-04    <johan AT FRIJA>
10669
10670         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10671
10672
10673 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10674
10675         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10676
10677 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10678
10679         * link/z80/aslink.h: Fixed path for PATH_MAX
10680
10681 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10682
10683         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10684
10685         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10686
10687         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10688
10689         * 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.
10690
10691 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10692
10693         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10694         (genCmp): Fixed up genCmp for the GB with longs.
10695
10696         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10697
10698         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10699
10700         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10701
10702         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10703
10704 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10705
10706         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10707
10708 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10709
10710         * 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.
10711
10712         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10713
10714 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10715
10716         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10717
10718         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10719
10720 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10721
10722   * sim/ucsim/configure:    little improvement of Cygwin-detection
10723   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10724   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10725   * support/regression/tests/bug-221100.c: small changes for mcs51
10726   * support/regression/tests/bug-221168.c: small changes for mcs51
10727   * support/regression/tests/bug-227710.c: small changes for mcs51
10728   * support/regression/tests/staticinit.c: small changes for mcs51
10729   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10730   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10731   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10732
10733 $Revision$