* support/regression/fwk/include/testfwk.h: added defines for xdata, idata for pic16
[fw/sdcc] / ChangeLog
1 2006-03-08 Borut Razem <borut.razem AT siol.net>
2
3         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
4           for pic16
5
6 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
7
8         * support/regression/tests/bug1409955.c: new, added
9         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
10         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
11           (aopForSym, aopOp): increment asmop.allocated if reused,
12           (freeAsmop): decrement asmop.allocated and check for zero instead of
13           using asmop.freed,
14           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
15           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
16            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
17            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
18            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
19            genSignedRightShift, genRightShift, genDataPointerGet,
20            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
21            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
22             in reverse order from allocation,
23           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
24             added swappedLR to keep track
25         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
26           pdata & code for GCC, z80, gbz80 & hc08
27         * support/regression/tests/zeropad.c: moved defines to testfwk.h
28
29 2006-03-08 Raphael Neider <rneider AT web.de>
30
31         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
32
33 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
34
35         * device/include/mcs51/c8051f410.h: new SiLabs mcu
36         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
37         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
38
39 2006-03-06 Borut Razem <borut.razem AT siol.net>
40
41         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
42           made the linker quiet
43
44 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
45
46         * src/pic16/gen.c (genPcall): fixed bug #1443644
47         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
48         which dumps before the function entry point a data byte which represents
49         the number of the local variables used by the specified function, added
50         'xinst' for initial support for Extended Instruction Support,
51         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
52         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
53         port->fun_prefix anymore (may change later),
54         (genFunction, genEndFunction): do not store/restore local registers for
55         _main (this should take care the --main-return command line option in
56         the future),
57         (genOr): removed some legacy pic-port instructions,
58         * src/pic16/genarith.c (genAddLit): re-enabled old code because
59         performing operations with SFR's causes data to be written more than
60         once to each SFR. Perhaps SFRs should be handled in special cases...
61         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
62         pcode.h
63         * src/pic16/main.c (_process_pragma): stack bound checking did not take
64         into account for stack starting position,
65         (struct OPTIONS pic16_optionsTable): added command line argument
66         --extended or -y for Extended Instruction Support,
67         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
68         (deassignLRs): *** perhaps the most important change, old 'for' code
69         (commented out for reference), didn't account for some registers which
70         were left marked 'not free' after a pointer operation. The change
71         reduces register usage a lot in some cases
72
73 2006-03-04 Borut Razem <borut.razem AT siol.net>
74
75         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
76           _clean
77         * support/regression/tests/bug-524697.c: decreased array size for
78           mcs51 to fit into the internal RAM
79         * support/regression/Makefile.in: a little bit more verbose
80
81 2006-03-03 Borut Razem <borut.razem AT siol.net>
82
83         * support/regression/fwk/lib/testfwk.c,
84           support/regression/fwk/include/testfwk.h: introduced function
85           _prints(), nonrecursive _printn(), call _initEmu() from main()
86         * support/regression/ports/gbz80/support.asm,
87           support/regression/ports/ucz80/support.asm,
88           support/regression/ports/z80/support.asm,
89           support/regression/ports/ds390/support.c,
90           support/regression/ports/hc08/support.c,
91           support/regression/ports/host/support.c,
92           support/regression/ports/mcs51/support.c,
93           support/regression/ports/xa51/support.c: added empty _initEmu()
94           function
95         * support/regression/ports/pic16/gpsim.cmd,
96           support/regression/ports/pic16/spec.mk,
97           support/regression/ports/pic16/support.c,
98           support/regression/Makefile.in: added pic16 regression test
99
100 2006-03-01 Raphael Neider <rneider AT web.de>
101
102         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
103           genConstPointerGet): use safe way of generating MOVFF to cover
104             literals as well as registers, fixes bug #1440527
105         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
106             dereference
107           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
108             more correctly, fixes bug #1232186
109           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
110         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
111             gplink guess the correct processor in more cases, applied patch
112             from Till Riedel attached to and fixing bug #1436552
113
114 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
115
116         * support/regression/tests/array.c: added, contains check for #1434401
117         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
118
119 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
120
121         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
122         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
123         * device/include/mcs51/c8051f326.h,
124         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
125         * device/include/mcs51/c8051f000.h,
126         * device/include/mcs51/c8051f018.h,
127         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
128           PCON_IDLE,PCON_STOP and added sfr16 definitions
129
130 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
131
132         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
133           genGetWord): fixed bug 1409955
134
135 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
136
137         * device/include/hc08/mc68hc908gp32.h,
138         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
139
140 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
141
142         * src/SDCCast.c (constExprValue): return NULL if not a value
143         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
144         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
145         * support/regression/tests/bitfields.c: enabled signed bitfield for all
146
147 2006-02-13 Borut Razem <borut.razem AT siol.net>
148
149         * src/regression/ptrarg.c: added, fails due to bug #1430967
150         * src/regression/Makefile: ptrarg.c added, ...
151
152 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
153
154         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
155         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
156
157 2006-02-11 Borut Razem <borut.razem AT siol.net>
158
159         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
160           print "Processor: xxx" message to stdout only if --verbose
161
162 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
163
164         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
165         * support/regression/tests/bug1426356.c: added
166         * support/regression/tests/bitfields.c: removed 2 tests
167
168 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
169
170         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
171         * device/include/mcs51/c8051f330.h,
172         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
173           PCON_IDLE,PCON_STOP and added sfr16 definitions
174         * device/lib/_divsint.c,
175         * device/lib/_divuint.c,
176         * device/lib/_divulong.c,
177         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
178           register bank bug for small stackauto
179
180 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
181
182         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
183
184 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
185
186         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
187         * all.dsp: corrected several bin paths
188         * device/include/mcs51/c8051f120.h,
189         * device/include/mcs51/c8051f300.h,
190         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
191           to PCON_IDLE,PCON_STOP
192         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
193         * device/lib/printf_large.c (output_float): fixed bug 1388703
194         * support/regression/tests/bug1057979.c: added test for bug 1388703
195
196 2006-02-08 Raphael Neider <rneider AT web.de>
197
198         * src/pic/pcode.c (pciTRIS): fixed typo,
199           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
200           (LinkFlow): fixed handling of flows that end in a call,
201           (ReuseReg): perform safety check earlier
202         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
203             to work with flows at the beginning of a pBlock,
204             fixes #1426557 (Symbol not previously defined),
205           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
206             usage information
207           (RemoveUnusedRegisters): update register usage info
208         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
209             created, reuse existing ones instead
210         * src/pic/gen.c (genPcall): fixed #1424719
211
212 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
213
214         * link/z80/lkmain.c,
215         * link/z80/lklex.c,
216         * link/z80/lkdata.c,
217         * link/z80/aslink.h: fixed build on current cygwin:
218         replaced getline() by lk_getline()
219
220 2006-02-01 Borut Razem <borut.razem AT siol.net>
221
222         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
223           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
224           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
225           src/regression/bool1.c, src/regression/bool2.c,
226           src/regression/bool3.c, src/regression/call1.c,
227           src/regression/compare.c, src/regression/compare10.c,
228           src/regression/compare2.c, src/regression/compare3.c,
229           src/regression/compare4.c, src/regression/compare5.c,
230           src/regression/compare6.c, src/regression/compare7.c,
231           src/regression/compare8.c, src/regression/compare9.c,
232           src/regression/configword.c, src/regression/for.c,
233           src/regression/inline.c, src/regression/mult1.c,
234           src/regression/nestfor.c, src/regression/or1.c,
235           src/regression/pointer1.c, src/regression/ptrfunc.c,
236           src/regression/rotate1.c, src/regression/rotate2.c,
237           src/regression/rotate3.c, src/regression/rotate4.c,
238           src/regression/rotate5.c, src/regression/rotate6.c,
239           src/regression/rotate7.c, src/regression/string1.c,
240           src/regression/struct1.c, src/regression/sub.c,
241           src/regression/sub2.c, src/regression/switch1.c,
242           src/regression/while.c, src/regression/xor.c,
243           src/regression/create_stc, src/regression/simulate,
244           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
245           regression tests
246         * src/regression/gpsim_assert.h: added
247
248 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
249
250         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
251         ((void (code *) (void)) 0) ();
252         * as/hc08/aslex.c,
253         * as/hc08/aslink.h,
254         * as/hc08/asm.h,
255         * as/hc08/asmain.c,
256         * as/hc08/lkdata.c,
257         * as/hc08/lklex.c,
258         * as/hc08/lkmain.c,
259         * as/mcs51/aslex.c,
260         * as/mcs51/aslink.h,
261         * as/mcs51/asm.h,
262         * as/mcs51/asmain.c,
263         * as/mcs51/lkdata.c,
264         * as/mcs51/lklex.c,
265         * as/mcs51/lkmain.c,
266         * as/z80/aslex.c,
267         * as/z80/asm.h,
268         * as/z80/asmain.c: fixed build on current cygwin:
269         replaced getline() by as_getline()
270
271 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
272
273         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
274         declarator in the symbol chain
275         * src/SDCCsymt.h,
276         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
277         parameter list for function pointers
278         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
279         * support/regression/tests/bug-716242.c: added
280
281 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
282
283         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
284         offset if possible
285         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
286
287 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
288
289         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
290         inifinitely recurseable, added static
291         * support/regression/tests/bug-1408066.c: added
292
293 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
294
295         * src/SDCCicode.h,
296         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
297         renamed, added possibility to create "postLoopLbl"-labels
298         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
299         newiTempLoopHeaderLabel
300         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
301         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
302         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
303         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
304         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
305         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
306         (basicInduction): fixed bug #136564, made static,
307         (loopInduction): changed parameter of basicInduction, made static,
308         (addPostLoopBlock): added
309         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
310         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
311         findLoopEndSeq
312         * support/regression/tests/bug-136564.c: added
313         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
314         --std-sdcc99 to LIBSDCCFLAGS
315
316 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
317
318         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
319         while loop
320         * support/regression/tests/bug-1406131.c: added
321
322 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
323
324         * src/SDCCast.c (decorateType): fix promotion of unary minus
325         * src/SDCCsymt.c (computeType): beautified
326         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
327         (valUnaryPM, valComplement): fix sign and promotion,
328         (valNot): ANSI: result type is int (SDCC: unsigned char)
329         * support/regression/tests/uminus.c: speedup by removing superflous
330         test case 'int'
331         * support/regression/tests/onebyte.c: added promotion and signedness
332         tests for unary minus
333         * support/regressions/tests/bug-477927.c: disable warning about
334         uninitialized variables
335         * support/regression/tests/not.c: added
336
337 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
338
339         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
340         * src/mcs51/gen.c (gen51Code): show final register usage after
341         fillGaps in asm with --i-code-in-asm
342         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
343         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
344         incUsed, rliveClear, adjustIChain): made static,
345         (setFromRange): excluded because it's unused,
346         (findPrevUseSym, markWholeLoop): added,
347         (findPrevUse): rewritten; fixes bug 895992; now a complete search
348         through all branches of predecessors enables sdcc to emit the warning
349         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
350         (rlivePoint): made static, added parameter emitWarnings which is only
351         true during the first run out of two,
352         (findRecursiveSucc, findRecursivePred): removed,
353         (computeLiveRanges): made static, added parameter emitWarnings,
354         (dumpIcRlive): added for debugging only
355         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
356         removed prototype of setFromRange()
357         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
358         in call of computeLiveRanges()
359         * support/regression/tests/bug-895992.c: added
360         * support/regression/tests/bug-971834.c: added
361         * support/valdiag/tests/bug-895992.c: added
362         * support/valdiag/tests/bug-971834.c: added
363
364 2005-12-18 Raphael Neider <rneider AT web.de>
365
366         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
367           (genUnpackBits): improved code for direct operands,
368           (genPackBits): improved code for literal assignment to bitfields
369             and for direct destination operands (no FSR indirection),
370             prevented redundant AND, fixes #1362800,
371           (AccLsh): added parameter to disable masking of the result
372         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
373           skip instructions with side-effects (like incfsz),
374           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
375         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
376         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
377           fixes #1375263
378
379 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
380
381         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
382         volatile variables as spill location
383
384 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
385
386         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
387         replacing literals
388         * support/regression/tests/bug-1376320.c: added
389
390 2005-12-08 Raphael Neider <rneider AT web.de>
391
392         * src/pic/device.c: renamed is_shared to pic14_is_shared
393         * src/pic/gen.c (genIfx): re-enabled handling of sbits
394         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
395           (is_valid_identifier): added for above workaround
396
397 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
398
399         * device/lib/Makefile.in: fixed to enable port-specific-objects
400         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
401           char, thanks Hubert Sack
402         * doc/sdccman.lyx: documented --xstack-loc,
403           elaborated a bit more on interrupts and pitfalls,
404           removed "setjmp/longjmp unsupported",
405           documented some unsupported C99 features
406         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
407         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
408           if, thanks Hubert Sack
409         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
410         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
411           make make_library
412         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
413           regression tests can report resource usage (rfe 700441)
414         * support/regression/collate-results.py: report resource usage
415         * support/regression/ports/ds390/spec.mk,
416         * support/regression/ports/hc08/spec.mk,
417         * support/regression/ports/mcs51/spec.mk,
418         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
419         * support/regression/ports/ds390/uCsim.cmd,
420         * support/regression/ports/hc08/uCsim.cmd,
421         * support/regression/ports/mcs51/uCsim.cmd,
422         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
423         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
424           library, use the default one
425         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
426           building the library
427
428 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
429
430         * config.dsp: added dependency on .version and configure_vc.awk
431         * device/include/setjmp.h: updated for --stack-auto and --xstack
432         * device/include/mcs51/at89c51snd1c.h: corrected line endings
433         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
434         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
435         * device/lib/libsdcc.lib: added _setjmp
436         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
437           (decorateType): fixed bug 1372851,
438           (optimizeGetHbit): fixed warning
439         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
440           array initialisation
441         * support/regression/tests/bug1057979.c: added test for bug 1358192
442         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
443
444 2005-12-03 Borut Razem <borut.razem AT siol.net>
445
446         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
447           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
448
449 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
450
451         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
452         createIval): implement symbol independant "flexible array member",
453         (createIvalCharPtr): implemented flexible array initialisation with a
454         string
455         * src/SDCCsymt.c (copyStruct): removed,
456         (getSize): fixed misleading comment,
457         (getAllocSize): removed, the additional allocation size is now in
458         sym->flexArrayLength,
459         (checkStructFlexArray): new, syntax checks for flexible array members,
460         (compStructSize): added syntax checks for "flexible array members"
461         (copyStruct): removed,
462         (copyLinkChain): removed inefficient fix for bug 770487
463         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
464         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
465         symbol->flexArrayLength
466         * src/SDCCerr.c,
467         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
468         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
469         * support/regression/tests/structflexarray.c: added
470         * support/valdiag/tests/structflexiblearray.c: added
471
472 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
473
474         * src/SDCCast.c (decorateType): fixed bug 1368489
475         * support/Util/SDCCerr.c,
476         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
477
478 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
479
480         * device/include/mcs51/at89c51snd1c.h: added file submitted by
481           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
482
483 2005-11-27 Borut Razem <borut.razem AT siol.net>
484
485         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
486           support/cpp2/mkdeps.h: added command line option
487           -obj-ext=<extension> to SDCPP to define object file externion, used
488           for generation of make dependencies (-M)
489         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
490
491 2005-11-26 Borut Razem <borut.razem AT siol.net>
492
493         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
494           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
495           added pic and pic16 libraries
496
497 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
498
499         * device/include/float.h: Corrected typo in prototype of __fsgt
500
501 2005-11-25 Borut Razem <borut.razem AT siol.net>
502
503         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
504           added creation of model-mcs51-stack-auto libraries
505
506 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
507
508         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
509         and fields-list too
510         * src/SDCCast.c (createIvalArray): removed obsolete comment
511
512 2005-11-24 Borut Razem <borut.razem AT siol.net>
513
514         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
515           added missing device/lib/mcs51/crt*.asm sources
516
517 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
518
519         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
520
521 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
522
523         * device/lib/_fs2schar.c,
524         * device/lib/_fs2sint.c,
525         * device/lib/_fs2slong.c: optimized inline asm
526
527 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
528
529         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
530           Better handling of floats between -1.0 and 0.0.
531
532 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
533
534         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
535           (the missing "if"s prohibited removal of redundant labels)
536
537 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
538
539         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
540           Properly convert floats between -1.0 and 0.0 to long, int, and char
541           types (max integer value of negative floats tends to zero).
542         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
543           Removed changes made so to work properly with floats between
544           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
545           and _fs2char.c
546
547 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
548
549         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
550         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
551         (genCast) cosmetic change
552         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
553         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
554         from mcs51
555         * support/regression/tests/bitfields (testSignedBitfields): added
556
557 2005-11-18 Borut Razem <borut.razem AT siol.net>
558
559         * sdcc/device/lib/Makefile.in: remove all unnecessary files
560         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
561           introduced SILENT option to make building of pic16 libraries less
562
563 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
564
565         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
566           Now they work properly with floats between -1.0 and 0.0
567         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
568
569 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
570
571         * src/SDCCicode.c (printOperand): added missing else
572
573 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
574
575         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
576         reformatted for better readability
577         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
578         signed bitfields
579
580 2005-11-17 Borut Razem <borut.razem AT siol.net>
581
582         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
583           introduced SILENT option to make building of pic16 libraries less
584           verbose - used for nightly snapshot build
585         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
586           available on Win32 platforms.
587         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
588           medium, large, pic and pic16
589
590 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
591
592         * device/lib/printf_large.c: Temporary patch for bug 1358192:
593           printf("%f"...) sets fraction to zero.
594
595 2005-11-16 Raphael Neider <rneider AT web.de>
596
597         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
598           fixes #1357221
599         * src/pic/gen.c (genIfx): implemented for CARRY bit
600         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
601           to generic pointers, fixes #1357332,
602           (pic16_movLit2f): NEW,
603           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
604
605 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
606
607         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
608
609 2005-11-11 Raphael Neider <rneider AT web.de>
610
611         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
612         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
613           compute pointer's type from operand,
614           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
615           improved single bit reads, fixes bug #1353379
616
617 2005-11-09 Borut Razem <borut.razem AT siol.net>
618
619         * support/scripts/sdcc.nsi: added lib/pic to the package
620
621 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
622
623         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
624
625 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
626
627         * support/regression/tests/bug1348008.c: added
628         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
629         * support/regression/tests/bug1337835.c: updated comment
630
631 2005-11-06 Borut Razem <borut.razem AT siol.net>
632
633         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
634           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
635           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
636           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
637           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
638           dynamic construction of cl_error_class and derivates - 2.nd try
639
640 2005-11-05 Borut Razem <borut.razem AT siol.net>
641
642         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
643           bug, which caused Bus Errors on sparc solaris
644
645 2005-11-04 Borut Razem <borut.razem AT siol.net>
646
647         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
648           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
649           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
650           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
651           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
652           and derivates to resolve the initialization problem on OSX
653
654 2005-11-02 Borut Razem <borut.razem AT siol.net>
655
656         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
657           corrected typo - #include <winsock2.h>
658
659 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
660
661         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
662           (_asxxxx_mapping): added org directive for future enhancements
663
664 2005-11-01 Borut Razem <borut.razem AT siol.net>
665
666         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
667           enabled sockets on WIN32
668         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
669
670 2005-10-31 Borut Razem <borut.razem AT siol.net>
671
672         * support/regression/generate-cases.py: escape backslashes in {testcase}:
673           WIN32 backslash path delimiters should be escaped when used in C strings
674         * support/regression/tests/bitfields.c: exclude failing assertions for
675           __CYGWIN32__ and __MINGW32__ hosts
676
677 2005-10-30 Borut Razem <borut.razem AT siol.net>
678
679         * src/SDCCutil.c: corrected double comparison typo
680
681 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
682
683         * device/lib/medium/Makefile: added for new memory model medium
684         * device/include/asm/mcs51/features.h: updated for medium/pdata
685         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
686           added Multiply & Accumulate sbit's and MAC0_PAGE define
687         * device/include/mcs51/c8051f300.h: added sfr16 definitions
688         * device/include/mcs51/c8051f310.h: added sfr16 definitions
689         * device/lib/_mullong.c: update for medium model
690         * device/lib/incl.mk: added medium model
691         * doc/sdccman.lyx: documented medium model
692         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
693         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
694         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
695         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
696           (allocParms): set SCLS and OCLS to pdata for medium model
697         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
698           for pdata,
699           (powof2): return <0 if not power of 2
700         * src/avr/gen.c (genBitWise): use updated powof2
701         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
702           (shiftR2Left2Result): small optimization in setup, save acc when storing,
703           (shiftLLeftOrResult): use B if necessary
704         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
705         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
706         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
707         * support/regression/Makefile.in: added test-mcs51-medium
708         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
709
710 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
711
712         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
713         specifier unsigned
714         * device/lib/time.c (mktime): fixed bug 1334315
715
716 2005-10-28 Raphael Neider <rneider AT web.de>
717
718         * device/include/pic/p16f_common.inc: added common declarations
719         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
720
721 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
722
723         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
724           (aopPutUsesAcc): added to predict accumulator use,
725           (assignResultValue): save acc if necessary,
726           (genMinusDec): store result if indirectly addressed,
727           (genDivOneByte):  save acc if necessary,
728           (movLeft2Result): bugfix if left already in acc,
729           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
730             attention to accumulator use (esp. pdata),
731           (genReceive): receive pdata correctly
732         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
733         * src/SDCCicode.h: added isOperandInPagedSpace prototype
734
735 2005-10-27 Raphael Neider <rneider AT web.de>
736
737         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
738
739 2005-10-27 Raphael Neider <rneider AT web.de>
740
741         * .version: changed version to 2.5.4
742         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
743         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
744           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
745             arithmetics support routines
746         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
747         * device/lib/Makefile.in: also create installdir for pic
748
749         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
750           pic14 port as well
751         * src/pic/device.c (dump_sfr): rewritten to delegate register
752           placement to the linker (use `extern sym' rather than sym EQU addr),
753           (validAddress): fixed to check last specified address
754         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
755           (popGetLit): truncate literal value to 8 bit,
756           (popGet): moved assert to more appropriate place
757           (popGetExternal): create pCode operand from and mark the according
758             symbol as being `extern'
759           (popGetAddr): added sanity check on immediate's offset, provide
760             GPOINTER tag on demand
761           (aopPut): fixed for immediates,
762           (mov2w_op): move operand's address or contents to WREG (depending on
763             operand type), safer variant of mov2w,
764           (movwf,call_libraryfunc): NEW, handy abbreviations,
765           (get_argument_pcop,get_return_val_pcop,pass_argument,
766           get_returnvalue): interface for accessing function parameters and
767             return values,
768           (assignResultValuei,genRet): use new parameter/return value interface
769           (pic14_getDataSize): back to old version handling generic pointers,
770           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
771             provided implementation and/or fixed old one,
772           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
773             calls, removed legacy 8051 reference code
774           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
775           (loadSignToC): NEW, move the operands sign bit to CARRY,
776           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
777             genRightShiftSigned, accepts negative shift counts,
778           (setup_fsr): load FSR and adjust IRP (indirect memory access),
779           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
780             generic pointers, __data pointers and __code pointers,
781           (genUnpackBits,genPackBits): rewritten to work with generic pointers
782             and signed bitfields, limit bitfields to 8 bit,
783           (genDataPointerGet): fixed number of bytes read,
784           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
785           (genPointerGet,genPointerSet): fixed handling of __code pointers,
786             pointers to constant data are no longer assumed to point to __code
787             space, removed invalid pointer types,
788           (bitpatternFromVal): retrieve the PICs representation of an integer
789             or float literal,
790           (genDataPointerSet): fixed assigning to po_immediate operands,
791           (genGenPointerSet): implemented as library call,
792           (genIfx): fixed incorrect condition,
793           (genAddrOf): limit generic pointers' addresses to 2 bytes,
794             provide GPOINTER tag according to destination's storage class,
795           (genCast): added code to handle casting to generic pointers, added
796             sign-/zero extension of the result
797           (aop_isLitLike,op_isLitLike): fixed handling of immediates
798         * src/pic/gen.h: added macros to access IRP bit in STATUS register
799         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
800           extend the result
801         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
802           address/register resides in the shared banks
803           (emitSymbolToFile): improved to handle global and `pinned' symbols,
804             put all variables into separate sections (have the linker arrange
805             them)
806           (picglue): put init code and interrupt handlers in separate sections
807         * src/pic/main.c: added port specific options table, modified to PORT
808           structure to make GPOINTERs 3 byte, added pic14_options
809           (_pic14_do_link): private linking routine (update paths to libraries,
810             add libsdcc.lib by default)
811         * src/pic/main.h: declare pic14_options
812         * src/pic/pcode.c: fixed instructions i/o relations,
813           (RegCond): reverted to correct version,
814           (newpCodeOpLit): truncate literals to 8 bit,
815           (genericPrint): added debug output,
816           (getRegFromInstruction): fixed for various operand types, simplified
817           (BuildFlow): fixed broken handling of isntructions with labels
818           (LinkFlow): start at last instruction in flow (skip trailing comments),
819             pass the flow on to the next instruction after CALL
820           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
821           (insertPCodeInstruction): fixed inserting after a skip instruction,
822           (DoBankSelect): fixed for labeled instructions
823           (OptimizepBlock): honor --nopeep switch
824           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
825         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
826         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
827           (pCodeOptime2pCodes): allow disabling this optimization via
828             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
829             but is still buggy), started implementation of a dataflow based
830             pCode optimization (CSE + dead code elimination)
831           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
832         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
833           names are independant of the stack location and therefore portable across
834           devices
835
836 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
837
838         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
839           (selectSpil): fixed bug 1337835 by not spilling bit variables
840         * support/regression/tests/bug1337835.c: added test for this bug
841         * src/mcs51/peeph.def: restart after rule 3.c,
842           addded rules 263.x to optimize loading constants
843
844 2005-10-26 Raphael Neider <rneider AT web.de>
845
846         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
847         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
848           (genAssign): emit warning when casting literals to generic pointer
849             type, also applies when taking the address of a fixed variable,
850           (genCast): improved casting to generic pointers
851         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
852           extern variables, added verbose error message
853         * device/include/pic16/{string.h,errno.h}: added #pragma library c
854
855 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
856
857         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
858         carry must be complemented too
859         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
860         could be emitted by genMinus
861         * src/SDCCval.c (constVal): fixed bug 1305065
862
863 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
864
865         * src/SDCCast.c (addCast): added promotion for bit variables
866         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
867         promotion casts + optimisation
868         (optimizeGetWord): fix warning 'i' might be used uninitialized
869         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
870         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
871
872 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
873
874         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
875         all chars are promoted to int; promotion should be handled in SDCCast.c
876
877 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
878
879         * device/lib/_strcmp.c: Fixed bug 1326457
880
881 2005-10-11 Raphael Neider <rneider AT web.de>
882
883         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
884         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
885
886 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
887
888         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
889         * support/regression/tests/sfr16.c: added test for the sfr32 bug
890
891 2005-10-04 Raphael Neider <rneider AT web.de>
892
893         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
894           device/lib/pic16/pics.all: added pic18f1320
895         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
896
897 2005-09-30 Raphael Neider <rneider AT web.de>
898
899         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
900         * src/pic16/devices.inc: NEW, provides device descriptions
901         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
902
903 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
904
905         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
906           GETHBIT
907
908 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
909
910         * doc/sdccman.lyx: updated Highest Order Bit documentation,
911           documented Any Order Bit, Higher Order Byte and Higher Order Word
912         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
913         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
914           (optimizeGetAbit): new, to get any bit, not only the high bit,
915           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
916           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
917           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
918           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
919             RIGHT_OP: also try GETBYTE, GETWORD optimization,
920             GETABIT, GETBYTE, GETWORD: decorate them,
921           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
922           (ast_print): added GETABIT, GETBYTE, GETWORD
923         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
924         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
925           (geniCodeBinary): new generic binary icode,
926           (ast2iCode): added GETABIT, GETBYTE, GETWORD
927         * src/port.h: updated comment for PORT.hasExtBitOp
928         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
929           (genGetByte): new, to get a single byte,
930           (genGetWord): new, to get a word from a long,
931           (gen51Code): added GETABIT, GETBYTE, GETWORD
932         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
933
934 2005-09-23 Raphael Neider <rneider AT web.de>
935
936         * configure.in, configure: have device/lib/pic configured
937         * device/lib/Makefile.in: added model-pic14
938         * device/lib/clean.mk: added pic/ to clean rule
939         * device/lib/pic: added rudimentary pic14 library providing support
940           functions for multiplication/division/generic pointer access
941         * src/SDCCopt.c (convilong): mark support functions as extern
942           for pic14 port as well
943         * src/pic/gen.c (genMult): added assertions,
944           (genpic14Code): emit warning on unhandled iCodes
945         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
946         * src/pic/pcode.c (pCodeOpCopy),
947         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
948           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
949           SFR_REGISTER}), made safe for future extensions
950         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
951           instructions even if preceeded by SKIP instructions (also remove
952           them); removed unused code
953         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
954           prevents leaving parts of the structure uninitialized after copying
955
956 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
957
958         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
959           ago by me
960         * support/regression/tests/addsub.c: added test for the bug
961
962 2005-09-21 Raphael Neider <rneider AT web.de>
963
964         * device/include/pic16/pic18f1220.h,
965           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
966         * device/lib/pic16/Makefile.rules: added missing opening paren
967         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
968           are provided in genutils.c,
969           (genUminusFloat,genUminus,genCmpEq): added asserts on different
970           operand/result sizes,
971           (genCmp): assert on NULL pointers first, then check deref'ed values
972         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
973           result size
974
975 2005-09-18 Raphael Neider <rneider AT web.de>
976
977         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
978           as these are now unused,
979           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
980         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
981           local, avoids uninitialized pointer dereference on r->name
982         * src/pic16/ralloc.c (newReg): fixed indentation
983
984 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
985
986         * src/SDCCval.c (constVal): fixed bug 730366
987         * support/Util/SDCCerr.c,
988         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
989
990 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
991
992         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
993
994 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
995
996         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
997
998 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
999
1000         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1001           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1002         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1003           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1004         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1005         * packihx/packihx.c (hexDigit): made c unsigned char
1006         * as/mcs51/lklibr.c (fndsym),
1007         * link/z80/lkgb.c (gb),
1008         * link/z80/lklibr.c (fndsym),
1009         * link/z80/lkrloc.c (relr),
1010         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1011         * src/SDCC.lex (checkCurrFile, process_pragma),
1012         * src/SDCCglue.c (spacesToUnderscores),
1013         * src/SDCCmain.c (setParseWithComma, processFile),
1014         * src/asm.c (tvsprintf, printCLine),
1015         * src/avr/gen.c (emitcode, aopPut),
1016         * src/ds390/gen.c (emitcode),
1017         * src/hc08/gen.c (emitcode, emitinline),
1018         * src/mcs51/gen.c (emitcode, genInline),
1019         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1020           tokenizeLineNode),
1021         * src/pic/ralloc.c (debugLog),
1022         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1023           tokenizeLineNode),
1024         * src/pic16/ralloc.c (debugLog),
1025         * src/z80/main.c (_process_pragma):
1026            made all ctype.h function calls safe
1027         * src/SDCCopt.c: include math.h for fabs
1028         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1029           and used them throughout the code to make ctype.h function calls safe
1030         * src/ds390/main.c (asmLineNodeFromLineNode),
1031         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1032         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1033            unsigned char*
1034         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1035           (newpCodeAsmDir): made ctype.h function calls safe
1036         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1037           pic16_emitcode):  made lbp unsigned char*
1038         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1039           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1040         * src/xa51/gen.c (emitcode),
1041         * src/z80/gen.c (_emit2): made lbp unsigned char*
1042         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1043            char*
1044
1045 2005-09-05 Raphael Neider <rneider AT web.de>
1046
1047         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1048           access bank splitpoint
1049
1050 2005-09-05 Raphael Neider <rneider AT web.de>
1051
1052         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1053
1054 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1055
1056         * .version: changed to version 2.5.3
1057         * doc/sdccman.lyx: changed version to 2.5.3,
1058           documented --codeseg and --constseg and pragma codeseg and constseg,
1059           documented bit parameters (reentrant) and bit returning
1060         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1061            currFunc->recvSize, but is this ok for all ports?
1062           (ast2iCode): result of ~ on unsigned char must be cast to int for
1063            bool to work
1064         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1065           function pointers in bit space
1066         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1067           (processFuncArgs): call port.reg_parm() with reentrancy info
1068         * src/port.h,
1069         * src/avr/main.c,
1070         * src/ds390/main.c,
1071         * src/hc08/main.c,
1072         * src/pic/main.c,
1073         * src/pic16/main.c,
1074         * src/xa51/main.c,
1075         * src/z80/main.c: port.reg_parm prototype extended with
1076           "bool reentrant" parameter
1077         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1078           options.stackAuto for allocating bit register parameters
1079         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1080           (genSend): set BitBankUsed if it is,
1081           (selectRegBank): factored out of genCall for use in genPcall,
1082           (genCall): removed redundant dtype assignmen, use selectRegBank,
1083           (genPcall): handle returning in Carry properly, save in F0 if needed,
1084           (genReceive): handle bit register parameters
1085         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1086           (mcs51_assignRegisters): enable bit registers for all reentrant
1087            functions and don't set BitBankUsed unconditionally
1088         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1089         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1090         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1091
1092 2005-08-27 Borut Razem <borut.razem AT siol.net>
1093
1094         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1095         ppc-osx (Darwin) does not support -u option. It seems that it is
1096         supported only on Linux - GNU cp
1097
1098 2005-08-25 Borut Razem <borut.razem AT siol.net>
1099
1100         * sim/ucsim/gui.src/serio.src/Makefile.in,
1101           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1102           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1103           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1104           install and strip, since the strip at /usr/ccs/bin should be used
1105           on solaris
1106
1107 2005-08-24 Borut Razem <borut.razem AT siol.net>
1108
1109         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1110
1111 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1112
1113         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1114         ffffffffu
1115
1116 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1117
1118         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1119         * as/mcs51/lkmain.c (link_main): fixed warning
1120         * device/include/stdbool.h: ds390 has no advanced bit support yet
1121         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1122         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1123         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1124           and updated their macros
1125         * src/SDCCval.c (constVal): updated comment for renamed b_long
1126
1127 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1128
1129         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1130         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1131           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1132           (oprio): set priority for '['
1133         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1134            and adb_24_bit
1135         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1136         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1137         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1138         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1139           added overlayable BIT_BANK area
1140         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1141           (summary2): explain 'T' in legenda
1142         * as/mcs51/lkrloc.c: replaced old K&R style,
1143           (relr): added R_BIT processing,
1144           (errmsg): added "Bit-addressable relocation error",
1145           (adb_bit): added for converting from byte- to bit-addressable space,
1146           (adb_24_bit): added for converting from byte- to bit-addressable space
1147         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1148            used in reentrant functions now even as return value
1149         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1150         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1151           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1152         * src/SDCCglobl.h: added indicator BitBankUsed
1153         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1154            the bit registers b0-b7
1155         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1156           (geniCodeCast): fixed bug 1263853,
1157           (geniCodeLogicAndOr): put result in bool or char,
1158           (geniCodeReceive): added parameter func for accessing the return type,
1159           (geniCodeFunctionBody): pass func to geniCodeReceive
1160         * src/SDCCmain.c: added indicator BitBankUsed
1161         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1162         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1163           (checkSClass): don't put automatic bool/bit on stack,
1164           (checkFunction): removed check on function cannot return bit
1165         * src/SDCCsymt.h: added newBoolLink prototype
1166         * src/mcs51/gen.c (rb1regs): added bit registers,
1167           (movc): created for assigning to carry,
1168           (pushReg, popReg): created for pushing registers,
1169           (sameRegs): check both AOP_REG and AOP_CRY types,
1170           (aopOp): handle bit registers,
1171           (aopPut): optimization no self-assign,
1172           (saveRegisters): push reg->base (bits) only once for bit registers,
1173            and use pushReg,
1174           (unsaveRegisters): pop reg->base only once and use popReg,
1175           (assignResultValue): added parameter func and return in carry for bits,
1176           (genIpush): optimization no reload in A if not changed,
1177           (genSend): bit parameters in reentrant functions are passed in bit
1178            registers by first assigning to bits in B, then save registers and
1179            copy B to bits,
1180           (genCall): handle returning in Carry properly, save it in F0 if needed,
1181           (genPcall): updated assignResultValue call, this is not safe yet for bit
1182            returning function !!!
1183           (genFunction): don't generate equ's for bit registers and use pushReg,
1184           (genEndFunction): take care of bit returning functions and use popReg,
1185           (genRet): return bit in Carry,
1186           (genIfx): optimize bit registers and other directly addressable bits,
1187           (genReceive): updated assignResultValue call
1188         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1189           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1190            registers when using stack-auto
1191         * src/mcs51/ralloc.c (_G): added allBitregs,
1192           (regs8051): added the bit registers,
1193           (createStackSpil): use macro IS_BIT,
1194           (getRegBit): added to allocate a bit register, else spill,
1195           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1196           (updateRegUsage): factored out to ease stepping while debugging,
1197           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1198            also allocate bit registers,
1199           (fillGaps): handle bit registers,
1200           (findAllBitregs): added to create bit vector with all bit registers,
1201           (mcs51_allBitregs): returns this bit vector,
1202           (mcs51_assignRegisters): when using stack-auto use bit registers for
1203            passing parameters and creating local variables
1204         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1205
1206 2005-08-22 Borut Razem <borut.razem AT siol.net>
1207
1208         * device/lib/Makefile.in: replaced find option -or with -o
1209           to make it run on solaris
1210
1211 2005-08-22 Raphael Neider <rneider AT web.de>
1212
1213         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1214           fixes #1265442 (crash on Solaris)
1215
1216 2005-08-20 Borut Razem <borut.razem AT siol.net>
1217
1218         * configure, configure.in: added tests for libsocket and libnsl libraries,
1219           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1220           from support/regression/Makefile.in
1221         * support/regression/Makefile.in: added
1222         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1223         * sim/ucsim/libtool: regenerated on sparc-solaris
1224         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1225           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1226           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1227           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1228           sparc-solaris, which doesn't use GNU ld linker
1229         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1230         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1231
1232 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1233
1234         * src/mcs51/peeph.def: updated comments
1235
1236 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1237
1238         * device/lib/_gptrget.c,
1239         * device/lib/_gptrput.c: slightly shorter
1240         * doc/sdccman.lyx: incremented version
1241         * src/mcs51/peeph.def: moved peephole comments to the line of first
1242           change to better keep line correlation, reanimated 186.e
1243         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1244
1245 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1246
1247         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1248           David Saxton with quotes around file name.
1249
1250 2005-08-15 Borut Razem <borut.razem AT siol.net>
1251
1252         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1253           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1254           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1255           make tests run on x86_64 platform
1256
1257 2005-08-13 Raphael Neider <rneider AT web.de>
1258
1259         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1260           as it might be executed DURING a build (parallel make is wonderful)
1261
1262 2005-08-13 Raphael Neider <rneider AT web.de>
1263
1264         * device/lib/Makefile.in (port-specific-objects-pic16):
1265           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1266         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1267           dependency
1268         * device/lib/pic16/Makefile.rules: build subdirs before creating
1269           the library, removed builddir rule, create $(builddir) early in
1270           recurse rule, use empty recurse rule for leaf directories
1271         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1272           mkdir errors (race condition), removed duplicate suffix "hex"
1273           from clean rules
1274         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1275         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1276           prevents mkdir -p from aborting on Alpha
1277
1278 2005-08-12 Raphael Neider <rneider AT web.de>
1279
1280         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1281           db-statements in order to allow for arrays of pointers in code
1282           sections to be placed without interspersed 0-padding, fixes
1283           bug #1256215
1284         * (emitStatistics): fixed division by zero for pic18f1220
1285         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1286           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1287         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1288         * (pic16_pCodeConstString): keep track of already emitted string
1289           literals to prevent "duplicate definitions of symbol _str_NR"
1290         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1291           debug message
1292         * device/lib/Makefile.in: ignore failing PIC16 library builds
1293         * device/lib/pic16/Makefile: do not build if gputils are missing
1294         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1295
1296 2005-08-10 Raphael Neider <rneider AT web.de>
1297
1298         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1299           my last commit)
1300
1301 2005-08-10 Raphael Neider <rneider AT web.de>
1302
1303         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1304           Rokas' patch to add the new fixed point type "__fixed16x16"
1305         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1306           functions for __fixed16x16 arithmetics
1307         * device/lib/pic16: reimplemented the build system to support
1308           a separate build directory, better handling of libio (create
1309           the library in a separate subdir for each architecture) and
1310           easier configuration (centralized in Makefile.common)
1311
1312 2005-08-07 Raphael Neider <rneider AT web.de>
1313
1314         * src/pic16/gen.c (genrshTwo): fixed sign extension
1315         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1316         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1317           added T0CONbits
1318         * device/include/pic16/pic18f4220.h: NEW, header for
1319           pic18f4220 and pic18f4320
1320         * device/include/pic16/pic18fregs.h: added new devices,
1321           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1322         * device/include/pic16/signal.h: resolved name clashes
1323           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1324           to also allow testing for interrupt enable bits, added
1325           comments on how to use the macros
1326         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1327         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1328           register definitions for the devices
1329         * device/lib/pic16/pics.all: added new devices
1330         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1331           allocated memory
1332         * device/lib/pic16/libc/stdlib/memfree: do not count
1333           the block header as free memory
1334         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1335           simplified and added missing end-of-blocklist-marker
1336           (reported by Peter Onion, fixes #1252814)
1337         * (_mergeHeapBlock): fixed loop condition
1338         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1339           len==0, restructured code
1340         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1341           up a bit, reduced bitfield accesses, prevent endless loops
1342           in case of heap corruption
1343         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1344           "unreferenced arguments/must return a value" warnings
1345         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1346           replaced BAUDREG with SPBRG
1347         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1348           device/lib/pic16/debug/gstack/gstack.c: replaced
1349           _naked, _asm, _endasm with __naked, __asm, __endasm
1350
1351 2005-08-05 Raphael Neider <rneider AT web.de>
1352
1353         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1354           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1355
1356 2005-08-05 Borut Razem <borut.razem AT siol.net>
1357
1358         * device/lib/Makefile.in: added missing ';'
1359         * configure: removed ^M characters
1360
1361 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1362
1363         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1364           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1365           License
1366
1367 2005-08-04 Borut Razem <borut.razem AT siol.net>
1368
1369         * configure.in: pic16 libraries build 2nd try - enable running
1370           configure in device/lib/pic16
1371         * configure: regenerated from configure.in
1372         * device/lib/Makefile.in: create $(PORT)/bin directory
1373
1374 2005-08-03 Raphael Neider <rneider AT web.de>
1375
1376         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1377           to get/set values via pointers
1378         * (genUnpackBits,genPackBits): changed detection of
1379           ptr->bitfield vs. sym.bitfield, fixed access via generic
1380           pointers, removed dead (wrong) code for multibyte bitfields
1381         * (genNearPointerGet, genGenPointerGet): removed useless code,
1382           fixed bitfield detection, fixes #1250594
1383         * (genNearPointerSet): removed useless code
1384         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1385           and introduced macro pic16_emitpcode that conditionally emits
1386           the origin of the following pCode (useful for debugging SDCC)
1387         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1388         * (createDefmap): fixed handling of LFSR for --optimize-df
1389
1390 2005-08-02 Borut Razem <borut.razem AT siol.net>
1391
1392         * device/lib/Makefile.in: pic16 libraries build enabled since
1393           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1394
1395 2005-08-02 Raphael Neider <rneider AT web.de>
1396
1397         * src/pic16/gen.c (genPackBits): removed deprecated warning
1398         * (genGenPointerSet): fixed bitfield detection
1399
1400 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1401
1402         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1403
1404 2005-07-31 Raphael Neider <rneider AT web.de>
1405
1406         * device/lib/pic16/libdev/pic18f458.c,
1407           device/include/pic16/pic18f458.h: added missing T0CONbits
1408
1409 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1410
1411         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1412
1413 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1414
1415         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1416
1417 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1418
1419         * device/include/mcs51/at89c51ed2.h: added.
1420
1421 2005-07-23 Raphael Neider <rneider AT web.de>
1422
1423         * src/pic/gen.h: added emitpcode macro for debugging
1424         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1425           and replace by macro adding debug information on demand
1426         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1427         * (gencjne): tried to fix; replaced with correct (slower) code
1428         * (gen{Unp,P}ackBits): fixed single bit access
1429         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1430         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1431           previous instruction
1432         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1433           register has to be handled with care (forbidding movement
1434           of assignments/uses, removing assignments completely, ...)
1435         * (pCodeOptime2pCodes): make use of regIsSpecial
1436         * added lots of debugging output (commented out)
1437         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1438           from being reused as result UNLESS it is known to work
1439
1440 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1441
1442         * support/Util/dbuf.h: include <stddef.h> for size_t
1443         * .version: changed to version 2.5.2
1444
1445 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1446
1447         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1448
1449 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1450
1451         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1452           (genModOneByte): removed needless psha/pula
1453
1454 2005-07-22 Raphael Neider <rneider AT web.de>
1455
1456         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1457           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1458         * src/pic/gen.c (resolveIfx): do not "invent" labels
1459         * (genSkipc): changed to positive logic
1460         * (genSkipCond): removed as no longer needed
1461         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1462           backport from PIC16
1463         * (genLeftShift): check operands are in different registers
1464         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1465           INCF does not update CARRY...
1466         * src/pic/main.c: fixed _linkCmd
1467         * src/pic/pcode.c (unlinkpCode): added inactive code
1468         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1469           alive (do not assign result and operand overlapping registers)
1470
1471 2005-07-22 Raphael Neider <rneider AT web.de>
1472
1473         * src/pic/device.c (dump_sfr): replaced register declaration with
1474           call to emitSymbolToFile() to avoid duplicate symbols
1475         * (assignRelocatableRegisters): do not declare external symbols
1476         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1477           right (take size of type, not etype)
1478         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1479         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1480         * (packRegsForAccUse): disabled assignment of WREG as
1481           the result reg to prevent occurence of just fixed #1235003,
1482           fixes #1242954
1483         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1484           symbols (avoids duplicate symbols in .asm file)
1485         * (pic14emitRegularMap): use emitSymbolToFile()
1486         * src/pic/gen.c (aopOp): fixed spillLocation handling
1487         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1488         * (genDataPointerSet): removed unneccessary variables/output
1489
1490 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1491
1492         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1493         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1494
1495 2005-07-21 Raphael Neider <rneider AT web.de>
1496
1497         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1498           architecture cannot handle them efficiently, fixes bug #1235003
1499         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1500           check for empty sets before using them (fixes bug #1232190)
1501
1502 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1503
1504         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1505           (lnksect2): generate warnings for memory overlap
1506         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1507           constseg to set the name of these segments so you can instruct the linker
1508           to place them in banks
1509         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1510         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1511           added code_seg and const_seg to options
1512         * src/SDCCglue.c (emitMaps): use options.const_seg,
1513           (createInterruptVect): put interrupt vectors in segment HOME,
1514           (glue): put HOME before static segment and put the main glue in HOME,
1515           (glue): use options.code_seg
1516         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1517         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1518           these segments so you can instruct the linker to place them in banks
1519           (linkEdit): use code_loc for HOME segment which should be the first
1520           segment in code memory now
1521         * src/SDCCmem.c: fixed more stuff like bug 1238386
1522         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1523           (changePointer): don't change function pointers to code pointers for
1524           banked functions,
1525           (compareType): added exceptional check for banked function pointers
1526         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1527         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1528           after static in code memory
1529         * src/mcs51/gen.c: added aopLiteralLong prototype,
1530           (aopForSym): use getSize for functions,
1531           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1532           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1533           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1534           the segment,
1535           (genPcall): use call for literal function pointers and generate banked
1536           calls over the one trampoline so there's only one place for the user to
1537           modify according to his/hers hardware,
1538           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1539           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1540         * src/mcs51/main.c: added keyword banked,
1541           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1542         * support/Util/SDCCerr.c,
1543         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1544           needed for passing the bank and address to the trampoline
1545         * device/lib/mcs51/crtbank.asm: added for bankswitching
1546         * device/lib/mcs51/Makefile: added crtbank
1547
1548 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1549
1550         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1551           for fields at offset 0 of a struct or union as reported
1552           on 2005-07-07 in the developer mailing list.
1553
1554 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1555
1556         * src/SDCCmem.c: fixed bug 1238386
1557
1558 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1559
1560         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1561           (patch #1144962), added peephole 300, enabled 259.x
1562         * doc/sdccman.lyx: removed screenshot and provided link instead
1563
1564 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1565
1566         * doc/sdccman.lyx: added section about debugging with ddd
1567         * doc/figures/ddd_example.eps: screenshot of debugging session
1568
1569 2005-07-04 Raphael Neider <rneider AT web.de>
1570
1571         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1572           like CODE pointers, fixes #1115683
1573         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1574           call, fixes bugs #1232211, #1228110,
1575           fixed wrong casts to pCodeFlow from pCodeInstructions
1576
1577 2005-07-04 Raphael Neider <rneider AT web.de>
1578
1579         * src/pic/gen.c (popGet): changed assert to allow for
1580           bit operands
1581         * (popGetAddr): changed signature to provide
1582           an additional index, patched all call sites
1583         * (genCmpEq): handle literal-like operands correctly
1584         * (genAddrOf): added sanity checks on __code/__data pointers
1585         * (genAssign): added handling of symbols from __code section
1586         * (gencjne): do not generate code for comparisons whose result
1587           is neither stored nor used, fixes bug #1171114
1588         * (AccLsh, AccRsh): operate on operand instead of WREG
1589         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1590           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1591           by known count
1592         * rewrote complete shift-by-literal logic, commented unused
1593           functions out
1594         * (genConstPointerGet): get multiple bytes (if result size > 1),
1595           fixed handling of non-immediate addresses
1596         * (genPointerGet): handle CODE pointers like CONST pointers
1597         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1598         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1599           operand is to be treated as a literal or not
1600         * (mov2w,genPcall,genCmpEq),
1601           src/pic/genarith.c: use aop_isLitLike() to decide between
1602           literal/register contents
1603         * (addSign): added missing offset
1604         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1605           only emit comment in debug-mode,
1606           use {aop,op}_isLitLike throughout the file
1607         * src/pic/glue.c: fix initializers for pointers (work in progress)
1608         * src/pic/pcode.c (get_op): honor index on _const symbols
1609         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1610         * (dumppBlock): added pCode size estimation
1611         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1612           check for IS_SYMOP before OP_SYMBOL'ing
1613         * fixed indentation, compacted switch-statements
1614         * (allocReg): find free register and allocate it instead of
1615           allocating new registers all the time
1616         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1617           registers as its operands (necessary only for multibyte GETs)
1618
1619 2005-07-01 Raphael Neider <rneider AT web.de>
1620
1621         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1622           debugging .asm-output macros FENTRY + FEXIT
1623         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1624           way... I wonder...
1625         * (emitpComment): NEW, printf to pCode
1626         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1627           offset handling
1628         * (popGetAddr): NEW, variant of popGet to access an immediates
1629           high(er) bytes instead of the n'th byte of memory they reference,
1630           replaced popGet with popGetAddr where neccessary
1631         * (genDataPointerGet): reactivated and fixed implementation
1632         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1633           accesses
1634         * (genDataPointerSet): fixed multibyte assignments
1635         * (genpic14Code): fixed --i-code-in-asm handling
1636         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1637         * (genPlus): fixed index-out-of-bounds error
1638         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1639         * src/pic/ralloc.c: added debugging output macro FENTRY2
1640         * (spillThis): fixed indentation, enbraced for-body for clarity
1641         * (rematStr): commented out as now unused
1642         * (regTypeNum): commented out special spill case (overwrites
1643           arbitrary values)
1644         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1645
1646 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1647
1648         * doc/sdccman.lyx: documented sfr16/sfr32,
1649           added example for using storage class with function pointers
1650         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1651
1652 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1653
1654         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1655         * device/lib/_itoa.c,
1656         * device/lib/_ltoa.c: optimized codesize
1657         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1658           but don't know how to suppress the double warning.
1659         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1660         * support/Util/SDCCerr.c,
1661         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1662
1663 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1664
1665         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1666           fixed old K&R prototypes
1667         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1668         * device/lib/_gptrget.c,
1669         * device/lib/_gptrgetc.c,
1670         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1671           also new versions for small generic pointers and banked generic pointers
1672         * src/port.h: added const_name
1673         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1674         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1675         * src/SDCCcse.c (findPrevIc): check all associative operators
1676         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1677         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1678         * src/SDCCmem.c: updated comments,
1679           set far-space to 0 for pdata, results in optimized code
1680         * src/SDCCmem.h: added macro CONST_NAME
1681         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1682           moving the info into the highest bits, see also gptrget/gptrput
1683         * src/src.dsp: added sdcc.ico to project files
1684         * src/avr/gen.c (genCast): fixed bug 0x%d
1685         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1686         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1687           relation between ptr_type and DCL_TYPE,
1688           (genCast): fixed bug 0x%d
1689         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1690           (CODE)" for const_name
1691         * src/hc08/gen.c (genCast): fixed bug 0x%d
1692         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1693           (hc08_port): added "CONST (CODE)" for const_name
1694         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1695           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1696           between ptr_type and DCL_TYPE,
1697           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1698           operand* and took AOP() inside function so sfr-ness can be checked,
1699           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1700           new prototype,
1701           (genFunction, genEndFunction): optimized stack setup,
1702           (genMinus): optimized for literals with ending zeroes (in bytes),
1703           (genCast): fixed bug 0x%d
1704         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1705           (mcs51_port): added "CONST (CODE)" for const_name
1706         * src/mcs51/peeph.def: made rule 226 more generic
1707         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1708         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1709         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1710         * src/z80/main.c (z80_port): added NULL for const_name,
1711           (gbz80_port): added NULL for const_name
1712         * support/regression/tests/bug663539.c,
1713         * support/regression/tests/sfr16.c: new tests
1714
1715 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1716
1717         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1718
1719 2005-06-24 Raphael Neider <rneider AT web.de>
1720
1721         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1722           corrected typos...
1723         * device/include/pic16/signal.h: added USBIF
1724           and SIG_USB
1725
1726 2005-06-24 Raphael Neider <rneider AT web.de>
1727
1728         * device/lib/pic16/libdev/pic18f2455.c,
1729           device/include/pic16/pic18f2455.h: NEW
1730         * device/include/pic16/pic18fregs.h,
1731           device/lib/pic16/pics.all,
1732           src/pic16/device.c: added 18f2455
1733         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1734           device/include/pic16/{pic18f[68][567].h,usart.h}:
1735           replaced MULTIPLE_USARTS define with more relaible
1736           compatibility sfrs (for USART access)
1737
1738 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1739
1740         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1741           and the output asm file line is printed on two lines.
1742
1743 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1744
1745         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1746           BGT, BLE, BHI, and BLS instructions
1747         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1748           genCmpEq): removed
1749         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1750           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1751           fixes bug #1216342
1752         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1753
1754 2005-06-15 Raphael Neider <rneider AT web.de>
1755
1756         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1757         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1758         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1759           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1760           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1761
1762 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1763
1764         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1765           Marcel Telka in bug #1215704
1766
1767 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1768
1769         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1770           located in shared memory bank.
1771
1772 2005-05-31 Raphael Neider <rneider AT web.de>
1773
1774         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1775           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1776           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1777
1778 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1779
1780         * device/lib/_strncpy.c: fixed the fix
1781
1782 2005-05-26 Raphael Neider <rneider AT web.de>
1783
1784         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1785           initializers with \0, bug #1208187
1786         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1787           intializers with \0, bug #1208187
1788
1789 2005-05-26 Raphael Neider <rneider AT web.de>
1790
1791         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1792           initializers with \0, bug #1208187
1793         * src/pic16/main.c (_process_pragma): added sanity checks
1794           for stack position and size, emit warnings when appropriate
1795
1796 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1797
1798         * device/lib/_strncpy.c: fixed not filling with \0
1799
1800 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1801
1802         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1803           createFunction),
1804         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1805           compound_statement),
1806         * src/SDCCsymt.h,
1807         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1808
1809 2005-05-24 Raphael Neider <rneider AT web.de>
1810
1811         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1812
1813 2005-05-24 Raphael Neider <rneider AT web.de>
1814
1815         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1816           TRISE definitions, closes bug #1162453
1817
1818 2005-05-22 Raphael Neider <rneider AT web.de>
1819
1820         * src/pic16/main.c (_process_pragma): check for missing
1821           arguments to pragmas code and udata
1822         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1823           consistency fixes to match other headers (thanks to Jim Paris)
1824         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1825
1826 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1827
1828         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1829
1830 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1831
1832         * support/regression/tests/bug1198642.c: new test
1833         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1834         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1835         * support/scripts/resource.h,
1836         * support/scripts/resource.rc,
1837         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1838         * support/scripts/sdcc.ico: added 32x32 icon
1839
1840 2005-05-18 Raphael Neider <rneider AT web.de>
1841
1842         * device/lib/pic16/libdev/pic18f*.c,
1843         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1844           keywords to "__sfr" and "__at (X)"
1845         * device/include/pic16/pic18fregs.h: added pic18f4520
1846         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1847           #1203088 (MPLAB compatibility)
1848
1849 2005-05-17 Raphael Neider <rneider AT web.de>
1850
1851         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1852         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1853         * device/lib/pic16/pics.all: added new devices
1854         * src/pic16/device.c: added support for pic18f4520
1855
1856 2005-05-16 Raphael Neider <rneider AT web.de>
1857         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1858         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1859         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1860           convenience function for bit access
1861
1862 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1863
1864         * device/lib/printf_large.c: fixed bug 1193299
1865         * support/regression/tests/bug1057979.c: added test %3.3s
1866
1867 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1868
1869         * device/include/mcs51/8051.h,
1870         * device/include/mcs51/8052.h: made parseable with lint
1871         * device/include/mcs51/lint.h: added include file for (sp)lint
1872         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1873         * doc/cdbfileformat.lyx,
1874         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1875
1876 2005-05-14 Raphael Neider <rneider AT web.de>
1877
1878         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1879         * device/lib/pic16/libc/stdlib/itoa.c (new)
1880         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1881         * device/lib/pic16/libio/Makefile: exclude subdir according to
1882           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1883         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1884         * src/pic16/gen.c (genFunction): prevent annoying warning
1885         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1886           nameclashes on BeOS
1887         * support/cpp2/cppmain.c (cpp_output_string): new
1888         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1889           fixes bug 1116802
1890
1891 2005-05-13 Borut Razem <borut.razem AT siol.net>
1892
1893         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1894
1895 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1896
1897         * .version: changed to version 2.5.1; back to bleeding edge development
1898
1899 2005-05-11 Borut Razem <borut.razem AT siol.net>
1900
1901         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1902           generate PDF version 1.3 documents
1903
1904 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1905
1906         * .version: changed to version 2.5.0
1907
1908 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1909
1910         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1911
1912 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1913
1914         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1915         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1916         well as many smaller updates.
1917         * .version: changed to version 2.5.0-pre1
1918
1919 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1920
1921         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1922
1923 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1924
1925         * support/regression/tests/bug1185672.c: added
1926         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1927           bug 1185672
1928         * src/mcs51/gen.c (genCall): added comments, made it look safer
1929         * src/mcs51/gen.c (genEndFunction): simplified
1930
1931 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1932
1933         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1934
1935 2005-04-14 Borut Razem <borut.razem AT siol.net>
1936
1937         * fixed bug 1045046 - SIGSEGV with really simple code?:
1938           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1939           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1940
1941 2005-04-14 Borut Razem <borut.razem AT siol.net>
1942
1943         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1944           src/pic16/device.h: temporarily disabled experimental #inline pragma
1945           for 2.5.0 release
1946
1947 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1948
1949         * device/include/z80/stdio.h,
1950         * device/include/z80/string.h: removed these highly incomplete files so
1951           SDCC can use the default ones in device/include/
1952
1953 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1954
1955         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1956         gcc warning.
1957         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1958         fix sdcpp warnings.
1959
1960 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1961
1962         * device/include/malloc.h: removed redundant __reentrant prototypes
1963         * device/lib/_mullong.c: added working xstack variant in asm (C version
1964           doesn't pass regression tests)
1965         * device/lib/bpx.c: used __data and made bpx char for mcs51
1966         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1967           (createFunction): fixed bug with xstackPtr
1968         * src/SDCCcse.c: corrected comments
1969         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1970           (killDeadCode, eBBlockFromiCode): removed unused code
1971         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1972           corrected comments
1973         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1974           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1975           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1976           (genModOneByte): fixed warning in MSVC
1977         * src/mcs51/main.c (): added comments
1978         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1979
1980 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1981
1982         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1983
1984 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1985
1986         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1987
1988 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1989
1990         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1991         characters arrays of larger size than the declared one.
1992
1993 2005-04-10 Borut Razem <borut.razem AT siol.net>
1994
1995         * src/pic/gen.c (genInline),
1996           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1997           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1998           (findNextInstruction), (findPrevInstruction),
1999           (findInstructionUsingLabel),
2000           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2001         * src/pic/pcode.c (findLabel): added missing '\n'
2002         * src/src.dsp: added SDCCdwarf2.c to the project
2003
2004 2005-04-09 Borut Razem <borut.razem AT siol.net>
2005
2006         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2007
2008 2005-04-08 Raphael Neider <rneider AT web.de>
2009
2010         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2011           into the chain after a given one) and mergeDefmapSymbols (combine
2012           defmap entries for each symbol per pcode)
2013         * (createDefmap): have defmap entries merged in the end
2014         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2015           a symbol before replacing one access type's symbol, merge symbols in
2016           the end (replacement symbol might already have an entry)
2017         * (assignValnums): keep reference to written WREG intact
2018
2019 2005-04-08 Raphael Neider <rneider AT web.de>
2020
2021         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2022           Alpha)
2023
2024 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2025
2026         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2027         bytes
2028
2029 2005-04-07 Raphael Neider <rneider AT web.de>
2030
2031         * device/include/pic16/usart.h: added compatibility defines for
2032           devices with more than one USART
2033         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2034
2035 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2036
2037         * device/lib/Makefile.in: updated for port specific include
2038
2039 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2040
2041         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2042
2043 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2044
2045         * device/include/8051.h,
2046         * device/include/8052.h,
2047         * device/include/at89S8252.h,
2048         * device/include/at89c55.h,
2049         * device/include/at89x051.h,
2050         * device/include/at89x51.h,
2051         * device/include/at89x52.h,
2052         * device/include/mcs51reg.h,
2053         * device/include/reg51.h,
2054         * device/include/reg764.h,
2055         * device/include/regc515c.h,
2056         * device/include/sab80515.h: (re)moved these 12 files
2057         * device/include/mcs51/8051.h,
2058         * device/include/mcs51/8052.h,
2059         * device/include/mcs51/at89S8252.h,
2060         * device/include/mcs51/at89c55.h,
2061         * device/include/mcs51/at89x051.h,
2062         * device/include/mcs51/at89x51.h,
2063         * device/include/mcs51/at89x52.h,
2064         * device/include/mcs51/mcs51reg.h,
2065         * device/include/mcs51/reg51.h,
2066         * device/include/mcs51/reg764.h,
2067         * device/include/mcs51/regc515c.h,
2068         * device/include/mcs51/sab80515.h: and added them here
2069
2070 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2071
2072         * device/include/stdarg.h: changed SDCC specific keywords to double
2073           underlined form.
2074         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2075           mcs51 and ds390.
2076         * device/include/hc08/mc68hc908gp32.h,
2077         * device/include/hc08/mc68hc908jb8.h,
2078         * device/include/hc08/mc68hc908jkjl.h,
2079         * device/include/hc08/mc68hc908qy.h: fixed comments
2080         * device/include/mcs51/README: updated
2081         * device/include/mcs51/c8051f120.h: added PINRSF
2082         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2083         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2084           amidst code. Also inline is not supported.
2085
2086 2005-04-06 Raphael Neider <rneider AT web.de>
2087
2088         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2089         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2090           callers stack/frame pointers
2091
2092 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2093
2094         * device/include/pic16/usart.h: added, missing in previous commit,
2095         * device/include/pic16/adc.h: fixed typo,
2096         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2097         commit,
2098         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2099         <p18fxxx.inc>
2100         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2101         uninitialized because a bug appears with gplink
2102         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2103         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2104         complains for unrecognised option
2105
2106 2005-04-05 Raphael Neider <rneider AT web.de>
2107
2108         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2109           structs as well (using memcpy)
2110         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2111           on ISRs (GOTO has no label)
2112         * src/pic16/device.h: added OF_OPTIMIZE_DF
2113         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2114           new data flow analysis/optimization
2115         * src/pic16/pcode.c: added (prototypes for and implementation of)
2116           dataflow analysis functions, fixed pCodeInstructions' inCond and
2117           outCond values, made RCALL a branch instruction
2118         * (pic16_unlinkpCode): keep C line if possible
2119         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2120           C line moved if possible
2121         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2122         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2123           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2124         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2125           new flow)
2126         * (pic16_getJumptabpCode): NEW, needed in...
2127         * (LinkFlow): fixed handling of jumptables, calls and conditional
2128           branches
2129         * (pic16_InsertCommentAfter): NEW
2130         * (pic16_pCodeReplace): made verbose and flow preserving
2131         * (AnalyzeFlow): added call to data flow analysis
2132         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2133         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2134         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2135
2136 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2137
2138         * src/SDCCast.c (decorateType): fixed bug #1105626
2139
2140 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2141
2142         * device/include/asm/pic16/features.h,
2143         * pic18f*.h headers,
2144         * device/include/pic16/adc.h,
2145         * device/include/pic16/delay.h,
2146         * device/include/pic16/i2c.h,
2147         * device/include/pic16/malloc.h,
2148         * device/include/pic16/stdio.h,
2149         * device/include/pic16/stdlib.h,
2150         * device/include/pic16/string.h,
2151         * device/lib/pic16/libc/stdio/printf_tiny.c,
2152         * device/lib/pic16/libc/stdio/printf_small.c,
2153         * device/lib/pic16/libc/stdio/strmgpsim.c,
2154         * device/lib/pic16/libc/stdio/strmmssp.c,
2155         * device/lib/pic16/libc/stdio/strmusart.c,
2156         * device/lib/pic16/libc/stdio/vfprintf.c,
2157         * device/lib/pic16/libc/stdlib/ltoa.c,
2158         * device/lib/pic16/libc/stdlib/putchar.c,
2159         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2160         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2161         * device/lib/pic16/libc/stdlib/memchrram.c,
2162         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2163         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2164         * device/lib/pic16/libio/adc/adcbusy.c,
2165         * device/lib/pic16/libio/adc/adcread.c,
2166         * device/lib/pic16/libio/adc/adcsetch.c,
2167         * device/lib/pic16/libio/usart/ubaud.c,
2168         * device/lib/pic16/libio/usart/ubusy.c,
2169         * device/lib/pic16/libio/usart/udrdy.c,
2170         * device/lib/pic16/libio/usart/uopen.c,
2171         * device/lib/pic16/libio/usart/uputc.c,
2172         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2173         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2174         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2175         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2176         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2177         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2178         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2179         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2180         specific keywords to double underlined form,
2181         * device/lib/pic16/libc/Makefile.rules,
2182         * device/lib/pic16/libsdcc/Makefile.rules,
2183         * device/lib/pic16/libm/Makefile,
2184         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2185         to compile with C standard set in Makefile.common
2186         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2187         rand.c and crc.c in compilation process,
2188         * device/lib/pic16/libsdcc/int/divuint.c,
2189         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2190         `c' from signed to unsigned,
2191         * device/lib/pic16/startup/crt0.c,
2192         * device/lib/pic16/startup/crt0i.c,
2193         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2194         keywords to double underlined form, bug fixes in _do_cinit function
2195         which prevented the correct initialization of the .idata segment,
2196         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2197         core to enter a infinite loop
2198         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2199
2200 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2201
2202         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2203
2204 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2205
2206         * device/include/Makefile.in: add support for hc08 subdirectory
2207         * device/include/hc08/: new subdirectory
2208         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2209         Lucas Loizaga, thanks!
2210         * device/include/hc08/mc68hc908qy.h,
2211         * device/include/hc08/mc68hc908gp32.h,
2212         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2213         their own directory. Changed internal macro names to use the compiler
2214         reserved namespace. Changed SDCC specific keywords to double
2215         underlined form.
2216         * device/include/math.h,
2217         * device/include/malloc.h,
2218         * device/include/stdarg.h,
2219         * device/include/stdbool.h
2220         * device/include/string.h,
2221         * device/include/tinibios.h,
2222         * device/include/ds400rom.h,
2223         * device/include/8051.h,
2224         * device/include/8052.h,
2225         * device/include/80c51xa.h,
2226         * device/include/at89c55.h,
2227         * device/include/at89S8252.h,
2228         * device/include/at89x51.h,
2229         * device/include/at89x52.h,
2230         * device/include/ds80c390.h,
2231         * device/include/reg764.h,
2232         * device/include/regc515c.h,
2233         * device/include/sab80515.h,
2234         * device/include/mcs51/c8051f000.h,
2235         * device/include/mcs51/c8051f018.h,
2236         * device/include/mcs51/c8051f020.h,
2237         * device/include/mcs51/c8051f040.h,
2238         * device/include/mcs51/c8051f060.h,
2239         * device/include/mcs51/c8051f120.h,
2240         * device/include/mcs51/c8051f300.h,
2241         * device/include/mcs51/c8051f310.h,
2242         * device/include/mcs51/c8051f320.h,
2243         * device/include/mcs51/c8051f330.h,
2244         * device/include/mcs51/c8051f350.h,
2245         * device/include/z180.h: Changed SDCC specific keywords to double
2246         underlined form.
2247
2248 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2249
2250         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2251         18F4455,
2252         * (pic16_assignConfigWordValue): disable testing of configuration
2253         register value with config mask,
2254         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2255         function with port->fun_prefix,
2256         * (genFunction): when generating a naked interrupt function never
2257         create an absolute segment placed in interrupt vector address, place
2258         the actual interrupt function at IVA instead, when an interrupt
2259         function is generated with unspecified interrupt then do not create
2260         the absolute section,
2261         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2262         code for generating a call to generic pointer get/put function with
2263         a call to function pic16_callGenericPointer(),
2264         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2265         the call to the generic pointer get/put functions with prefixing the
2266         function name with port->fun_prefix,
2267         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2268         * src/pic16/main.c (_process_pragma): prefix function with
2269         port->fun_prefix,
2270         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2271         calling assembler, old 18Fxxxx macro is deprecated,
2272         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2273         PC_ASMDIR in while condition,
2274         * (findInstruction): add PC_ASMDIR in while condition,
2275         * (buildCallTree): prefix main with port->fun_prefix,
2276         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2277         identifier for variable with banked access in instructions BTFSS,
2278         BTFSC, BCF, BSF, BTG
2279         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2280         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2281         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2282         perform optimization when enviroment variable NO_REG_OPT is set,
2283         * (insideLRBlock): NEW, return 1 if register is inside an
2284         INF_LOCALREGS block,
2285         * (RemoveRegFromLRBlock): remove a register that is completely
2286         eliminated by register optimization, but it is still left in local
2287         register store/restore in/from stack block,
2288         * (Remove2pcodes): after removing register, check to see if it
2289         should be removed from local register store/restore in/from stack
2290         block,
2291         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2292         DUMMY_READ_VOLATILE,
2293
2294         * device/include/pic16/adc.h: minor prototype modifications and
2295         update,
2296         * device/include/pic16/malloc.h: added GPL notice various
2297         modifications,
2298         * device/include/pic16/stdint.h: NEW, standard header for ints
2299         * device/include/pic16/delay.h: NEW, header for delay functions,
2300         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2301         delay1mtcy,
2302         * device/include/pic16/signal.h: NEW, header providing helper macros
2303         for implementing signal handlers,
2304         * device/include/pic16/stdio.h: added prototypes for functions,
2305         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2306         prototypes for stdin and stdout, added macro PUTCHAR to
2307         automatically implement putchar function prototype,
2308         * device/include/pic16/usart.h: modified and updated USART library,
2309         * device/lib/pic16/libio/adc/,
2310         * device/lib/pic16/libio/i2c: some modifications to improve library
2311         performance,
2312         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2313         family of functions,
2314         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2315         family of functions and other sources,
2316         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2317         of the PIC18Fxx[28] devices,
2318         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2319         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2320         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2321         _do_cinit function, because the previous failed when local variables
2322         where not placed in the same memory bank,
2323         * device/lib/pic16/libsdcc/char/: various modifications to improve
2324         library performance,
2325         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2326         information on the new functions of the c library and more...
2327
2328 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2329
2330         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2331
2332 2005-03-26 Raphael Neider <rneider AT web.de>
2333
2334         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2335           if condition == CARRY)
2336         * (genCmp): adapted to new genSkipc semantics
2337         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2338           on rIfx (genCmp was broken)
2339
2340 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2341
2342         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2343         * src/z80/main.c (_keywords[]),
2344         * src/SDCCglobal.h (struct options),
2345         * src/SDCC.y,
2346         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2347         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2348         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2349         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2350         always available in leading double underscore form. The C99 support is
2351         mostly missing, but it's a start.
2352         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2353         reserved identifier "__data".
2354
2355 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2356
2357         * src/mcs51/peeph.def: fixed bug 1170013
2358
2359 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2360
2361         * device/include/mcs51reg.h: fixed bug 842007
2362
2363 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2364
2365         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2366         last time.
2367
2368 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2369
2370         * src/port.h (struct PORT),
2371         * src/avr/ralloc.c (avr_assignRegisters),
2372         * src/avr/main.c,
2373         * src/ds390/ralloc.c (ds390_assignRegisters),
2374         * src/ds390/main.c,
2375         * src/hc08/ralloc.c (hc08_assignRegisters),
2376         * src/hc08/main.c,
2377         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2378         * src/mcs51/main.c,
2379         * src/pic/ralloc.c (pic14_assignRegisters),
2380         * src/pic/main.c,
2381         * src/pic16/ralloc.c (pic16_assignRegisters),
2382         * src/pic16/main.c,
2383         * src/xa51/ralloc.c (xa51_assignRegisters),
2384         * src/xa51/main.c,
2385         * src/z80/ralloc.c (z80_assignRegisters),
2386         * src/z80/ralloc.h,
2387         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2388         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2389         * src/SDCCcse.h,
2390         * src/SDCCdflow.c (computeDataFlow),
2391         * src/SDCCdflow.h,
2392         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2393         * src/SDCCloop.h,
2394         * src/SDCCcflow.c (*),
2395         * src/SDCCcflow.h,
2396         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2397         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2398         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2399         immedDom() returning wrong block; probably fixes bug #1160833)
2400
2401 2005-03-20 Borut Razem <borut.razem AT siol.net>
2402
2403         * support/scripts/inc2h.pl: WIN32 port
2404
2405 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2406
2407         * device/lib/makefile.in: added abs.c and labs.c
2408
2409 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2410
2411         * device/include/stdint.h: added
2412         * device/lib/abs.c: added
2413         * device/lib/labs.c: added
2414         * device/include/stdlib.h: added abs() and labs() prototypes
2415         * device/lib/libsdcc.lib: added abs and labs
2416         * device/include/float.h,
2417         * device/lib/_fsmul.c,
2418         * device/lib/printf_fast.c,
2419         * device/lib/printf_tiny.c: updated comments
2420
2421 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2422
2423         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2424         bug #1164313
2425
2426 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2427
2428         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2429         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2430
2431 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2432
2433         * device/lib/printf_large.c: removed inline assembly for portability and
2434           readability. Use printf_fast if speed or size are more important.
2435         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2436         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2437
2438 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2439
2440         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2441         prevent compiler warning
2442
2443 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2444
2445         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2446         moved to level 0 and declared as static. Also they are explicit
2447         placed in access bank. This was necessery because some times they
2448         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2449         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2450         optimizations. Currently only compare to unsigned char is implemented,
2451         * src/pic16/gen.c: added fReturnIdx array,
2452         * (struct resolvedIfx) is moved to gen.h and made public,
2453         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2454         * (aopForSym): added an optimization to directly store in stack of
2455         the operand of a SEND iCode,
2456         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2457         but as registers instead (AOP_REG) using the fReturnIdx array,
2458         * (pic16_freeAsmop): remove the freed register from the
2459         _G.sregsAlloc field,
2460         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2461         a compare of 'WREG',
2462         * (pic16_popGetTempRegCond): changed function prototype, now
2463         function takes also a bitVector argument v which holds the current
2464         set of registers that are allocated for stack access by aopForSym,
2465         registers allocated in aopForSym for accessing stack symbols are not
2466         any more part of the functions usedRegs field,
2467         * (genCall): some times aopOp is called for a stack variable to be
2468         send, aopForSym might perform the push, if this is true make sure
2469         that genCall doesn't push the variable twice by testing _G.resDirect,
2470         * (genFunction): changed testing for unspecified interrupt number
2471         from 256 to INTNO_UNSPEC,
2472         * modified selection scheme of frame pointer generation. Previously
2473         if function did use local registers a frame pointer was generated,
2474         now a frame pointer is generated only if function has arguments
2475         (that need PLUSW2 register access), or has stack arguments, or the
2476         compiler is not instructed to omit the frame pointer,
2477         * (genEndFunction): before restoring local registers that were saved
2478         in the function preamble, also restore the registers that *might*
2479         have been allocated for stack access,
2480         * (genRet): removed some old comments,
2481         * (genCmp, the active (RN's) version): added a call to the
2482         pic16_genCmp_special function to perform the compare with a more
2483         robust and optimized way,
2484         * (genInline): a feature has been added in inline code generation,
2485         which allows a wildcard variable substitution when writing inline
2486         assembly. Code is incomplete and experimental therefore undocumented,
2487         * (genCast): changed order of aopOp for result and right to allow
2488         aopForSym to directly load the result if possible,
2489         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2490         perform an optimized compare on some selected special occasions,
2491         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2492         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2493         generate an IVT any more,
2494         * src/pic16/main.c (pic16_optionsTable): added command line option
2495         --optimize-cmp,
2496         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2497         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2498         macros,
2499         * src/pic16/NOTES: Raphael Neider added in list of active developers
2500         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2501         jumptable_end to prevent bug #,
2502         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2503         inCond and outCond fields,
2504         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2505         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2506         turn off register spilling,
2507         * (packRegsForOneUse): synced with other ports' versions although it
2508         is not used currently,
2509         * (pic16_packRegisters): added an optimization while reading
2510         structure bitfields, some registers may be saved (malloc code is
2511         decreased by 80 bytes)
2512
2513 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2514
2515         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2516         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2517         this can be optimized more?
2518
2519 2005-03-10 Raphael Neider <rneider AT web.de>
2520
2521         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2522           genNearPointerGet): (hopefully) fixed access to bitfields via
2523           pointers (p->bitN = x; and x = p->bitN; failed)
2524
2525 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2526
2527         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2528
2529 2005-03-09 Raphael Neider <rneider AT web.de>
2530
2531         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2532
2533 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2534
2535         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2536         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2537           (regTypeNum): set REG_BIT type if necessary
2538         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2539         * support/regression/tests/critical.c: check bug 1144613
2540
2541 2005-03-02 Raphael Neider <rneider AT web.de>
2542
2543         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2544
2545 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2546
2547         * src/avr/ralloc.c (serialRegAssign),
2548         * src/ds390/ralloc.c (serialRegAssign),
2549         * src/hc08/ralloc.c (serialRegAssign),
2550         * src/mcs51/ralloc.c (serialRegAssign),
2551         * src/pic/ralloc.c (serialRegAssign),
2552         * src/pic16/ralloc.c (serialRegAssign),
2553         * src/xa51/ralloc.c (serialRegAssign),
2554         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2555
2556 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2557
2558         * src/SDCCast.c (decorateType): fixed bug 1124787
2559
2560 2005-02-20 Hubert Sack <sack AT digiplan.de>
2561         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2562
2563         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2564         patch #1121755
2565
2566 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2567
2568         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2569         to keep the correct label reference count when adding/removing references
2570         to labels. A peephole file using this is appended to patch #1144962.
2571
2572 2005-02-14 Raphael Neider <rneider AT web.de>
2573
2574         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2575         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2576         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2577           retrievals of result operand's value on assignment
2578
2579 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2580
2581         * device/include/pic16/string.h: modified prototype for memccpy()
2582         to memccpy(void *, void *, char, size_t)
2583         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2584         check whether to omit frame pointer or not,
2585         * (genInline): convert all occurences of "\n" to LF in inline
2586         assembler blocks, this helps formatting the inline text,
2587         * (pic16_loadFSR0): modified prototype,
2588         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2589         removed some 8051 legacy code,
2590         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2591         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2592         before allocating temporary registers in functions,
2593
2594 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2595
2596         * support/regression/tests/bitvars.c: corrected the "fix"
2597
2598 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2599
2600         * support/regression/tests/bitvars.c,
2601         * support/regression/tests/bitwise.c,
2602         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2603
2604 2005-02-10 Raphael Neider <rneider AT web.de>
2605
2606         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2607           different size for Alpha
2608         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2609
2610 2005-02-09 Raphael Neider <rneider AT web.de>
2611
2612         * src/SDCC.lex(doPragma) : save and restore warning options as well
2613           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2614         * have #pragma less_pedantic set the errorlevel to WARNING
2615           (fixes #1117001)
2616         * (cloneOptimize) : fixed wrong malloc's size
2617         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2618           facilitate correct handling of #pragma (save|restore)
2619
2620 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2621
2622         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2623
2624 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2625
2626         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2627
2628 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2629
2630         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2631
2632 2005-02-02 Raphael Neider <rneider AT web.de>
2633
2634         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2635         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2636         * (pic16_storeForReturn): fixed to allow returning function pointers
2637         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2638         * device/include/pic16/{stddef.h,stdbool.h}: added
2639
2640 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2641
2642         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2643
2644 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2645
2646         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2647         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2648          appeared to be required
2649
2650 2005-01-31 Borut Razem <borut.razem AT siol.net>
2651
2652         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2653           include/mcs51 and include/z80 directories to the package
2654
2655 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2656
2657         * src/hc08/gen.c (genFunction): fixed bug #1112752
2658
2659 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2660
2661         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2662
2663 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2664
2665         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2666
2667 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2668
2669         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2670
2671 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2672
2673         * device/include/c8051fxxx.h: removed these 6 files
2674         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2675
2676 2005-01-26 Raphael Neider <rneider AT web.de>
2677
2678         * src/pic16/gen.c (genAssign): fixed assignment from longs
2679           in codespace (were cut to three bytes)
2680         * (genDummyRead): implemented (except for CODESPACE...),
2681           fixed bug #1108575
2682         * src/pic16/glue.c (emitStatistics): beautified
2683         * device/lib/pic16/libm/Makefile: added include path
2684
2685 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2686
2687         * src/z80/gen.c (aopPut): fixed bug #1103902
2688
2689 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2690
2691         * device/lib/expf.c: fixed bug #1095792
2692
2693 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2694
2695         * device/lib/pic16/libm: added Math library sources
2696
2697 2005-01-24 Raphael Neider <rneider AT web.de>
2698
2699         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2700           to enable upcast to pCodeOpReg2 (there is no type tag to
2701           differenciate the two and pic16_popGet2p cast into PCOR2)
2702         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2703           (sizeof(sectNames) changed to sizeof(sectName))
2704           Both patches fix segfaults under MinGW.
2705
2706 2005-01-23 Raphael Neider <rneider AT web.de>
2707
2708         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2709           Safe_[mc]?alloc()'ed variables
2710         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2711           of (byte sized) temporaries (assign them to WREG for now)
2712         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2713           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2714           this might fix SIGSEGVs on MinGW...
2715         * src/SDCCopt.c (killDeadCode): restored original behaviour
2716           (volatile operands might get thrown away though)
2717
2718 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2719
2720         * src/pic16/gen.c: fixed bug #1106975,
2721         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2722         pointer update, INTCON is saved, global interrupts are disabled and
2723         restored after updateing TOS.
2724         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2725         * added function attribute 'shadowregs' to take advantage of shadow
2726         registers,
2727         * added function attribute 'wparam' as an alternative to the wparam
2728         pragma,
2729         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2730         user declares a non-ISR function as 'shadowregs',
2731         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2732
2733 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2734
2735         * .version: bumped version number to 2.4.8
2736         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2737         pic16 port,
2738         * device/lib/pic16/libio/i2c/: I2C module support library,
2739         * device/include/pic16/i2c.h: I2C support library header,
2740         * device/lib/pic16/libc/stdio/: standard IO support sources,
2741         * (printf_small.c): printf_small() source, supports float print,
2742         * (printf_tiny.c): printf_tiny() source, does not support floats,
2743         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2744         enable global optimizations for entire library source, other
2745         Makefiles in the source tree are also modified to reflect this,
2746         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2747         function,
2748         * doc/sdccman.lyx: updated to reflect new changes,
2749         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2750         sym->onStack if-case,
2751         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2752         sbit, idata, _idata, xdata, _xdata,
2753         * added pragma library, to link an external library, (see doc),
2754         * removed command line options, --pomit-config-words, --pomit-ivt,
2755         --pleave-reset-vector,
2756         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2757         when calling assembler to reflect memory model used, also define
2758         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2759         reflect stack model used,
2760         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2761         on stack return NULL,
2762
2763 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2764
2765         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2766           of the operands is volatile. Fixes #1020220
2767
2768 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2769
2770         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2771         * (OptimizeRegUsage): make sure that there is really no other flow where
2772           the first pCode is used
2773
2774 2005-01-22 Raphael Neider <rneider AT web.de>
2775
2776         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2777           to fix #1106967 (pCode->seq are not set up correctly)
2778
2779 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2780
2781         * src/SDCCglue.c (glue): make sure code area is declared before the
2782         static initialization area.
2783
2784 2005-01-21 Raphael Neider <rneider AT web.de>
2785
2786         * device/lib/Makefile.in: fixed test for pic16 install dir
2787         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2788           optimizations
2789         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2790           added --optimize-goto compiler switch and pragma wparam documentation
2791         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2792         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2793           and PRODH closing bug #1071770 (peephole optimizer)
2794
2795 2005-01-19 Raphael Neider <rneider AT web.de>
2796
2797         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2798           cmdLine buffers (used when calling sdcpp...) are large enough
2799           (MAX_PATH=256 truncates arguments leading to system halts when
2800           used in MinGW...)
2801         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2802         * (genUminus): rewritten to for efficiency
2803         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2804           used uninitialized in some cases)
2805         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2806           copy the third byte from the int -- now assumes 0x80 (data memory)
2807         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2808           operands (genAddLit expects the iCode's operands to swapped as
2809           well), fixed leftover bytes (crashed for short left operands)
2810         * (pic16_genMinusDec): performance improvements, removed false
2811           PIC14 emitSKPNCs
2812         * (pic16_genMinus): fixed to cope with differently sized operands
2813         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2814           for --obanksel > 1
2815         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2816         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2817           new banksel optimization
2818         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2819           analysis for temporary registers (segfaults...)
2820         * src/pic16/peeph.def: added rule
2821
2822 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2823
2824         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2825         which converts a float number to its ASCII representation
2826         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2827         functions to convert the fractional and integer part of a float to ASCII,
2828         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2829         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2830         ram
2831         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2832         _STATMEM macros,
2833         * device/include/pic16/adc.h: added GPL info,
2834         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2835         a pCodeOp as tested operand,
2836         * (genNearPointerGet): optimized bit testing, does not use
2837         intermediate register for bit value, test directly instead with
2838         BTFSS, BTFSC, works only for single bits,
2839         * (genpic16Code): dump the name of the iCode in the asm,
2840         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2841         renamed to pic16_decodeOp,
2842         * (serialRegAssign): do not allocate a temporary register for iCode
2843         sequences that test a single bit for 1/0
2844
2845 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2846
2847         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2848         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2849         access stack and frame pointers. They are initially assigned to
2850         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2851         accessing SFRs. Updated all occurences of modification of stack or
2852         frame pointer in gen.c and pcode.c,
2853         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2854         assigning of a literal value to pointers,
2855         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2856         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2857         selected
2858
2859 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2860
2861         * doc/sdccman.lyx: update documentation about stack pragma, added
2862         some info for stack memory models
2863
2864 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2865
2866         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2867
2868 2005-01-08 Raphael Neider <rneider AT web.de>
2869
2870         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2871           udata sections to fix bug #1097823
2872
2873 2005-01-05 Raphael Neider <rneider AT web.de>
2874
2875         * src/pic16/gen.c (genGenericShift): added handling of differently
2876           sized left operand and result
2877
2878 2005-01-04 Raphael Neider <rneider AT web.de>
2879
2880         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2881         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2882           to hold the condition bit)
2883         * added new version of genCmp (old code available via #define)
2884         * added new version of genShiftLeft/genShiftRight in a generic
2885           way, now supports shifting by negative values
2886         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2887           shiftCount (expected by genGenericShift)
2888         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2889         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2890           dump
2891         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2892           is an invalid literal too...)
2893
2894 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2895
2896         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2897         from Raphael Neider,
2898         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2899         for 8-bit literals. This fixes some literal operands which are sign
2900         extended to 16-bits ints when instruction needs only 8-bits.
2901
2902 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2903
2904         * device/lib/logf.c: added mcs51 assembly version
2905         * device/lib/expf.c: added mcs51 assembly version
2906         * device/lib/_logexpf.c: new shared asm code for expf and logf
2907         * device/include/math.h: add defines for assembly math library
2908         * device/lib/Makefile.in: build new _logexpf.c
2909         * device/lib/libfloat.lib: use new _logexpf.c
2910
2911 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2912
2913         * src/pic/device.c
2914         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2915           device types which have less than 0x7f registers.
2916
2917 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2918
2919         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2920
2921 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2922
2923         * device/lib/printf_fast.c: only build on supported arch.
2924         * device/lib/printf_tiny.c: only build on supported arch.
2925         * device/lib/printf_fast_f.c: only build if asm float lib
2926         * device/lib/_fsget1arg.c: only build if asm float lib
2927         * device/lib/_fsget2args.c: only build if asm float lib
2928         * device/lib/_fsnormalize.c: only build if asm float lib
2929         * device/lib/_fsreturnval.c: only build if asm float lib
2930         * device/lib/_fsrshift.c: only build if asm float lib
2931         * device/lib/_fsswapargs.c: only build if asm float lib
2932         * device/include/stdio.h: don't provide print_fast,
2933           print_fast_f, print_tiny prototypes if --xstack used
2934
2935 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2936
2937         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2938         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2939           to the SOURCES
2940
2941 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2942
2943         * device/lib/printf_fast_f.c: same as printf_fast, but
2944           with floating point enabled
2945         * device/lib/printf_fast.c: minor tweaks
2946         * device/include/stdio.h: add printf_fast_f
2947
2948 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2949
2950         * src/SDCCmain.c: make --float-reent default for mcs51
2951         * device/lib/_fsadd.c: added mcs51 assembly version
2952         * device/lib/_fssub.c: added mcs51 assembly version
2953         * device/lib/_fsmul.c: added mcs51 assembly version
2954         * device/lib/_fsdiv.c: added mcs51 assembly version
2955         * device/lib/_fseq.c: added mcs51 assembly version
2956         * device/lib/_fsneq.c: added mcs51 assembly version
2957         * device/lib/_fsgt.c: added mcs51 assembly version
2958         * device/lib/_fslt.c: added mcs51 assembly version
2959         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2960         * device/lib/Makefile.in: add _fscmp to build
2961         * device/lib/libfloat.lib: add _fscmp to build
2962
2963 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2964
2965         * device/lib/_fs2slong.c: added mcs51 assembly version
2966         * device/lib/_fs2sint.c: added mcs51 assembly version
2967         * device/lib/_fs2schar.c: added mcs51 assembly version
2968         * device/lib/_fs2ulong.c: added mcs51 assembly version
2969         * device/lib/_fs2uint.c: added mcs51 assembly version
2970         * device/lib/_fs2uchar.c: added mcs51 assembly version
2971         * device/lib/_slong2fs.c: added mcs51 assembly version
2972         * device/lib/_sint2fs.c: added mcs51 assembly version
2973         * device/lib/_schar2fs.c: added mcs51 assembly version
2974         * device/lib/_ulong2fs.c: added mcs51 assembly version
2975         * device/lib/_uint2fs.c: added mcs51 assembly version
2976         * device/lib/_uchar2fs.c: added mcs51 assembly version
2977         * device/include/float.h: added #define to select asm vs c
2978
2979 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2980
2981         * device/lib/printf_fast.c: improvements to float output
2982         * device/include/float.h: add defines for assembly float library
2983         * device/lib/_fsget1arg.c: receive 1 float arg
2984         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2985         * device/lib/_fsnormalize.c: normalize a float
2986         * device/lib/_fsreturnval.c: return float, various helper routines
2987         * device/lib/_fsrshift.c: right shift a float's mantissa
2988         * device/lib/_fsswapargs.c: swap 2 floats
2989         * device/lib/Makefile.in: build these 6 new files for mcs51
2990         * device/lib/libfloat.lib: add these 6 files to the library
2991
2992 2004-12-26 Borut Razem <borut.razem AT siol.net>
2993
2994         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2995           built by gcc 3.4.2
2996
2997 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2998
2999         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3000           and fully reentrant and register bank neutral.
3001         * device/lib/printf_fast.c: added float (not enabled by default),
3002           added compact/slower integer (also not enabled by default),
3003           improved size/speed of fast integer code, other minor changes
3004         * device/include/stdio.h, device/lib/Makefile.in,
3005           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3006
3007 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3008
3009         * src/pic16/pcode.c: declaring variables other than at the start of a
3010           block is not supported in C by VC6.
3011
3012 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3013
3014         * applied a previous patch from Raphael Neider that wasn't included
3015         in the previous commits, which fixes infinite loops within jumptable
3016         improvements,
3017         * made some fixes that previous patches introduced
3018
3019 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3020
3021         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3022         that fixes an issue with AOP_PCODE asmop's offset,
3023         * (pic16_popCopyReg): update instance field too,
3024         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3025         function of pic port,
3026         * (genCmp, genAnd, genAssign),
3027         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3028
3029 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3030
3031         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3032         variables initial values to idata section,
3033         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3034         variables in some functions. This utilizes parmBytes field of iCode
3035         structure to hold the offset of the variable in stack. (might be
3036         able to use the stack field too?)
3037         * applied patch from Raphael Neider # ### , # ###
3038         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3039         variable initial values in idata section,
3040         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3041         for static variables with initial value
3042         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3043         applied fix in while loop from Raphael Neider.
3044
3045 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3046
3047         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3048         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3049         * src/ds390/ralloc.c (serialRegAssign): spill bits
3050         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3051         * support/Util/SDCCerr.c,
3052         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3053         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3054         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3055
3056 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3057
3058         * device/include/sdcc-lib.h: inserted LGPL, added includes
3059           asm/ds390/features.h and asm/mcs51/features.h
3060         * device/include/asm/default/features.h,
3061         * device/include/asm/gbz80/features.h,
3062         * device/include/asm/z80/features.h: added empty _AUTOMEM
3063           and _STATMEM
3064         * device/include/asm/ds390/features.h,
3065         * device/include/asm/mcs51/features.h: added files with defines for
3066           _AUTOMEM and _STATMEM indicating automatic and static storage class
3067         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3068         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3069         * src/SDCCicode.c (geniCodeCast),
3070         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3071         * src/SDCCloop.c (loopInduction): removed unused variable lr
3072         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3073           to convertToFcall to include char modulo (RFE 1065037), added check
3074           if left operand is unsigned and use abs of literal value
3075         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3076           as it doesn't work after conversion from peephole.def to peephole.rul
3077         * src/mcs51/gen.c (toBoolean): added check for size,
3078           (genModOneByte): optimized code for signed char modulo a literal
3079           power of 2 (thanks to Hubert Sack),
3080           (genRRC): removed unnecessary "clr c",
3081           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3082         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3083           jump optimization,
3084           swapped rules 256.c and 256.d,
3085           extended 256.d by using new multiple checks (thanks Erik),
3086           added rules 256.e and 256.f,
3087           updated rule 261.a and 261.b to new generated code
3088         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3089
3090 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3091
3092         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3093           induction related bugs, including first part of bug #1074377
3094
3095 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3096
3097         * applied patch from bug-report #1076292,
3098         * applied patches for genAnd and Goto-optimizations for Raphael
3099         Neider,
3100         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3101         dump a less iCode information,
3102         * src/pic16/device.h (pic16_options_t): added field debgen,
3103         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3104         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3105         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3106         puclic,
3107         * (various functions): added macros FENTRY and FENTRY2 to functions,
3108         to emit function prologue,
3109         * (various functions): fixed indentation,
3110         * (genNearPointerGet): fixed loading of FSR0,
3111         * (genPackBits): applied patch from Raphael Neider to fix updating
3112         of FSR0 and touching only the modified bits,
3113         * src/pic16/genarith.c (various functions): added macros FENTRY to
3114         emit function prologue in comments,
3115         * src/pic16/pcode.h: added functions debugf2, debugf3,
3116         * src/pic16/ralloc.c: partial fix for packForPush caused
3117         segmentation fault,
3118
3119 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3120
3121         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3122           <stsp AT users.sourceforge.net> with reversed byte order
3123         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3124
3125 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3126
3127         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3128           bug #1074377
3129         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3130         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3131
3132 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3133
3134         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3135
3136 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3137
3138         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3139           conditions,
3140           (setFromConditionArgs): friendly operand parser for peephole rules,
3141           (operandBaseName, operandsNotRelated): new peephole condition
3142           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3143           architecture specific register naming into account, handles n-way
3144           comparisons, and supports quoted literals
3145         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3146
3147 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3148
3149         * src/mcs51/peeph.def: fixed bug #1076940
3150
3151 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3152
3153         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3154
3155 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3156
3157         Adding support for replacing ljmps with sjmps in jumptables
3158         generated for switch statements. For now you need to set the
3159         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3160         Now 4 algorithms for mcs51 jumptable generation are used:
3161         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3162         addresses loaded pc-relative for up to 112 cases and stack-pushing
3163         target addresses loaded with offset from dptr for up to 256 cases.
3164
3165         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3166         * src/mcs51/main.c: adapted constants for switch table generation
3167         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3168
3169 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3170
3171         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3172         * support/regression/tests/bug1057979.c: added test for bug 1073386
3173
3174 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3175
3176         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3177         compilers
3178
3179 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3180
3181         * src/pic16/device.h,
3182         * src/pic16/genarith.c,
3183         * src/pic16/glue.c,
3184         * src/pic16/main.c,
3185         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3186
3187 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3188
3189         Large cummulative patch for pic16 port.
3190         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3191         to call when a stack overflow occurs,
3192         * (malloc.h): added CVS Id tag,
3193         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3194         variable,
3195         * added libc directory. The current version of LibC contains string
3196         functions, ctype functions and macros and some functions of the
3197         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3198         be extensively tested in the future. Standard disclaimer here.
3199         Library is not automatically build yet. But one can build it by
3200         invoking 'make' inside the libc directory.
3201         * added ADC library under libio. Preliminary version yet.
3202
3203         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3204         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3205         aopForRemat() now and not by pic16_aopOp(),
3206         * (pic16_popGetTempReg): removed warning messgae when allocating
3207         temporary registers, its a buggy feature and will be removed,
3208         * (pic16_popGet): set register instance field in AOP_CRY,
3209         * (pic16_outBitC): fixed for results in size greater than 1,
3210         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3211         * (pic16_storeForReturn): optimized return of 0,
3212         * (genCmp): experimental code for new genCmp which uses PIC18's
3213         special compare&skip instructions. Initial tests fail some times
3214         with variables grater than 1 byte in size, so new code is disabled,
3215         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3216         a single bit,
3217         * (genCast): began a fix to optimize the casting of a bit to another
3218         bit, now assigning a bitfield to another bitfield will fail, sorry,
3219         * src/pic16/main.c: disabled the use of lr-support feature,
3220         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3221         * added some function prototypes, added function _debugf prototype,
3222         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3223         bits with offset (case PO_GPR_BIT),
3224         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3225         command line,
3226         * (isBankInstruction): modified to return 0 for no banking instruction,
3227         and 1 for banking instruction,
3228         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3229         caused stop processing pCodes after a inline assembly block,
3230         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3231         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3232         registers when it shouldn't,
3233         * src/pic16/ralloc.c (allocReg): add preliminary support for
3234         supporting a limited set of temporary registers,
3235
3236 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3237
3238         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3239           genDataPointerSet): ensure assignments always copy in MSB to LSB
3240           order,
3241           (loadRegFromAop): recognize CLRH optimization,
3242           (genFunction): optimize RECEIVE iCodes in reentrant functions
3243
3244 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3245
3246         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3247           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3248           selected.
3249         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3250         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3251           contiguous with data
3252
3253 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3254
3255         * device/lib/_gptrget.c (_gptrget),
3256         * device/lib/_gptrgetc.c (_gptrgetc),
3257         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3258           instead of sjmp to ret
3259         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3260           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3261
3262 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3263
3264         * .version: bumped version to 2.4.7
3265         * device/lib/_gptrget.c (_gptrget): is now _naked
3266         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3267         * device/lib/_gptrput.c (_gptrput): is now _naked
3268         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3269           (createFunction): fixed xstack
3270         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3271         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3272           or bit either,
3273           (geniCodeCritical): store original interrupt state in an iTemp bit
3274           var unless stack-auto
3275         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3276         * src/SDCCmain.c (setIncludePath): added include/target to search path
3277         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3278         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3279           prototype,
3280           (processFuncArgs): put bit vars in bit area
3281         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3282           unsaveRBank): fixed xstack,
3283           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3284           (genFunction, genEndFunction): fixed xstack,
3285           (genAssign): optimization don't walk backwards through mem
3286         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3287         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3288         * support/regression/Makefile: also make library (for stack-auto) when
3289           making "all" and added "test-mcs51-xstack-auto"
3290         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3291         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3292         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3293         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3294         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3295           make-library by MAKE_LIBRARY
3296         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3297           regression tests for xstack
3298         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3299         * support/regression/tests/critical.c: test for critical on mcs51
3300
3301 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3302
3303         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3304           built version of sdcc instead of installed version
3305
3306 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3307
3308         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3309         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3310           vprintf.c now
3311         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3312         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3313           WARNING: remove device/lib/build/z80/printf.o by hand when
3314           updating from previous build!
3315         * device/lib/z80/printf.c: updated comment
3316         * support/regression/tests/bug1057979.c: test all ports now
3317         * support/regression/tests/bug1065458.c: file added
3318
3319 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3320
3321         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3322           *_start and *_end symbols for static functions
3323
3324 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3325
3326         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3327           and search crt0.o in all library paths,
3328           (setIncludePath): proper handling of --nostdinc,
3329           (setLibPath): proper handling of --nostdlib
3330         * support/regression/Makefile,
3331         * support/regression/ports/ds390/spec.mk,
3332         * support/regression/ports/gbz80/spec.mk,
3333         * support/regression/ports/hc08/spec.mk,
3334         * support/regression/ports/mcs51/spec.mk,
3335         * support/regression/ports/mcs51-large/spec.mk,
3336         * support/regression/ports/mcs51-stack-auto/spec.mk,
3337         * support/regression/ports/z80/spec.mk: use include and lib files from
3338           built version of sdcc instead of installed version
3339         * doc/sdccman.lyx: fixed typo in --nostdinc
3340
3341 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3342
3343         * src/pic/pcode.c,
3344         * src/pic/device.c,
3345         * src/pic/ralloc.c,
3346         * src/pic/gen.c : added support to generate code for struct bit fields.
3347
3348 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3349
3350         * as/xa51/xa_version.h,
3351         * device/include/errno.h,
3352         * device/include/regc515c.h,
3353         * device/lib/_itoa.c,
3354         * device/lib/_ltoa.c,
3355         * device/lib/ser_ir_cts_rts.c,
3356         * sim/ucsim/xa.src/glob.cc,
3357         * sim/ucsim/xa.src/inst_gen.cc,
3358         * sim/ucsim/xa.src/xa_bit.cc,
3359         * sim/ucsim/xa.src/xa_sfr.cc,
3360         * sim/ucsim/z80.src/inst_dd.cc,
3361         * sim/ucsim/z80.src/inst_fdcb.cc,
3362         * support/scripts/keil2sdcc.pl,
3363         * src/pic16/pic16.dsp,
3364         * src/pic16/pic16a.dsp: corrected cvs line endings
3365         * device/lib/printf_large.c: fixed bug 1057979
3366         * src/pic16/gen.c: fixed non-C standard code
3367         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3368         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3369         * support/regression/ports/mcs51/support.c: reload T1 asap
3370         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3371           pdata use and clear idata startup behaviour
3372         * support/regression/tests/bug1057979.c: added
3373
3374 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3375
3376         * device/examples/ds390/ow390/ad26.h,
3377         * device/examples/ds390/ow390/cnt1d.h,
3378         * device/examples/ds390/ow390/crcutil.c,
3379         * device/examples/ds390/ow390/ownet.h,
3380         * device/examples/ds390/ow390/owsesu.c,
3381         * device/examples/ds390/ow390/swt12.h,
3382         * device/examples/ds390/ow390/swtoper.c,
3383         * device/examples/ds390/ow390/temp10.h,
3384         * device/examples/ds390/ow390/thermodl.c,
3385         * device/examples/ds390/tinitalk/tinitalk.dsp,
3386         * device/examples/ds390/tinitalk/tinitalk.dsw,
3387         * device/examples/mcs51/clock/hw.h,
3388         * device/examples/mcs51/simple2/go.bat,
3389         * device/examples/serialcomm/windows/serial.h,
3390         * device/examples/xa51/dummy.c,
3391         * device/examples/xa51/hello.c,
3392         * device/include/80c51xa.h,
3393         * device/include/at89x051.h: corrected cvs line endings
3394
3395 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3396
3397         * src/pic16/main.c (options): added command line --gstack, to trace
3398         stack over/under flows,
3399         * added pragma 'wparam' to allow passing first byte of function
3400         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3401         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3402         call to __gstack_test function and sets up the symbol as extern,
3403         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3404         * popaop): added call to pic16_testStackOverflow,
3405         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3406         wparamList list,
3407         * (genCall, genPcall): now all parameters are passed via stack
3408         except in functions that are pass to wparam pragma in which WREG is
3409         used too,
3410         * (genPcall): REENTRANT flag is checked to see if variable prototype
3411         contains reentrant keyword, don't call a non-reentrant function, via
3412         a reentrant function pointer or vice versa, functions are never
3413         passed via WREG,
3414         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3415         D.Winkler,
3416         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3417         SIGSEGV when accessing a NULL register stucture,
3418         * (pic16_printGPointerType): modified to handle UPPER modifier for
3419         function initializers, changed prototype of function to simpler one,
3420         * (pic16_printIvalFuncPtr): check to see if function is already
3421         added in externs list,
3422         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3423         optimized a move from W to SFR with a move to the same register
3424         later after a CALL,
3425         * device/lib/pic16/debug: NEW directory, contains debug features
3426         which are enabled when linking with libdebug.lib, currently command
3427         line option --gstack enables stack pointer tracing for over/under
3428         flow, corresponding sources are in debug/gstack
3429
3430 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3431
3432         * doc/sdccman.lyx: updated SDCC version,
3433         * (PIC16 port): update list of command line options,
3434         * src/pic16/device.h (structure pic16_options_t): added field gstack
3435         to enable stack overflow tracing on push/pops,
3436         * src/pic16/device.c (statistics structure): added statistics
3437         structure,
3438         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3439         pic16_dump_int_registers): increase statistics counters for each
3440         * variable which is encountered
3441         * (pic16_dump_usection): emit each .udata variable to its own udata
3442         section,
3443         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3444         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3445         parameters via stack, otherwise use old scheme,
3446         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3447         assembler output file,
3448         * src/pic16/main.c: added command line options --gstack to enable
3449         push/pop tracing for stack overflow,
3450         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3451         instructions): added size of each instruction,
3452         * (pic16_countInstruction): estimate size of instructions in
3453         the_pFile list, inline assembly blocks are not counted,
3454         * (pic16_FixRegisterBanking): trace previous register usage, when
3455         banksel optimizations is greater than 0, don't emit a redudant
3456         banksel directive,
3457
3458 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3459
3460         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3461         * src/pic16/ralloc.c : applied same fix for pic16.
3462         * src/pic/gen.c : tidied it up a little.
3463
3464 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3465
3466         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3467         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3468
3469 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3470
3471         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3472
3473 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3474
3475         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3476         non-reentrant function __modsint in the interrupt function (thus
3477         corrupting math operations during serial I/O)
3478         * device/lib/ser_ir.c: as above, changed buffersize
3479         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3480         256.c,d for zeroing
3481         * doc/Makefile: added option -t for rsync
3482
3483 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3484
3485         * src/SDCCast.h (struct ast),
3486         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3487
3488 2004-10-20 Borut Razem <borut.razem AT siol.net>
3489
3490         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3491         package
3492
3493 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3494
3495         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3496         makefile targets,
3497         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3498         support functions to replace long sequences of MOVFF's from access
3499         bank registers to stack and vice versa,
3500         * src/pic16/device.h: added new field opt_flags, where optimization
3501         flags can be set to enable certain features,
3502         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3503         * pBlock, (genFunction, genEndFunction): surroung loop for
3504         saving/loading used registers in stack with PC_INFO pCodes,
3505         INF_LREGS. Code in between can then be optimized by pCode optimizer
3506         to support function calls,
3507         * (genDataPointerSet): fixed bug which loaded float fields in
3508         structures with corrupt data,
3509         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3510         in a standard way debug info on stderr. Feature used for developing
3511         and debugging only,
3512         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3513         obsolete chunks of code,
3514         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3515         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3516         * pic16/src/pcode.c (pic16_newpCodeInfo,
3517         * (pic16_newpCodeOpLocalRegs),
3518         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3519         feature,
3520         * (pic16_pCodeConstString): printing of the initial value of a
3521         symbol as a comment is inhibited since parsing was already done by
3522         copyStr and output is corrupt,
3523         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3524
3525 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3526
3527         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3528
3529 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3530
3531         * as/mcs51/lkarea.c: removed old K&R style,
3532           (lnksect): changed check on boundary error,
3533           (lnksect2): changed check on boundary error,
3534           (lnksect2): extend XSTK to end of page if size = 1
3535         * as/mcs51/lkmain.c: removed old K&R style,
3536           (Areas51): create l_IRAM symbol
3537         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3538         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3539           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3540         * device/lib/_mullong.c: added version to be compiled with xstack
3541         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3542         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3543         * device/lib/mcs51/crtxstack.asm: fixed comment
3544         * src/SDCCglue.c: maxInterrupts defaults to 0,
3545           (emitMaps): added pdata,
3546           (createInterruptVect): (re)moved default,
3547           (glue): added pdata,
3548           (glue): moved __start__xstack to XSTK with default size 1
3549         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3550           and options.float_rent when options.stackAuto is set,
3551           (linkEdit): only write XDATA_NAME if provided on command line
3552         * src/SDCCmem.h,
3553         * src/SDCCmem.c: added pdata
3554         * src/port.h: added pdata_name to PORT
3555         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3556           (saveRegisters, unsaveRegisters): removed usage of B,
3557           (genMinus): fixed accumulator clash,
3558           (genJumpTab): added comment, this needs another look
3559         * src/mcs51/gen.c: added check for "B in use" paranoia,
3560           added pushB() and popB()
3561         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3562           chance
3563         * src/avr/main.c,
3564         * src/ds390/main.c,
3565         * src/hc08/main.c,
3566         * src/mcs51/main.c,
3567         * src/pic/main.c,
3568         * src/pic16/main.c,
3569         * src/xa51/main.c,
3570         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3571           added PSEG (PAG,XDATA) or NULL to port specifier
3572         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3573         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3574           (_mcs51_genInitStartup): removed __start__xstack equ,
3575           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3576         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3577         * src/z80/gen.c (_rleAppend): fixed warnings
3578         * support/regression/tests/zeropad.c: added pdata test
3579         * .version: bumped to 2.4.6
3580
3581 2004-10-17 Borut Razem <borut.razem AT siol.net>
3582
3583         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3584         as a part of nightly build
3585
3586 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3587
3588         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3589         WREG holds the first byte function parameters,
3590         * (aopForSym): take special case for symbols which are in FARSPACE
3591         but in CODESPACE too,
3592         * (assignResultValue): modified to take into account _G.useWreg,
3593         * (genCall): don't use wreg for parameter passing when function is
3594         declared as reentrant, too, added optimization INCF to stack
3595         pointer when stack parameter count is 1,
3596         * (genFunction, genEndFunction): refurnished and fixed to not using
3597         wreg for passing parameters when function has varargs or is
3598         reentrant, fixed bug with symbol name compare for generating
3599         functions in absolute address,
3600         * (pic16_storeForReturn): refurnished,
3601         * (genCmp): began writing a new version of the function, not ready
3602         yet, therefore it is disabled,
3603         * (genAssign): do not read code memory when assigning a function to
3604         a pointer function,
3605         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3606         array of characters, not pointer,
3607         * (pic16initialComments): in debug mode emit an .ident directive for
3608         the assembler,
3609         * (_process_pragma): emit a new warning type (internal to pic16)
3610         when setting stack to default length, emit a similar warning when
3611         placing a function at absolute address and address is not word aligned
3612         * (_pic16_parseOptions): added 'return TRUE' statement,
3613         * (_pic16_linkEdit): if compiling a source, then add the source's
3614         file object, first in the list of objects to link,
3615
3616 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3617
3618         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3619         * src/pic/main.c : removed VC warning.
3620         * src/pic/gen.c : changed comment.
3621
3622 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3623
3624         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3625         reference to a deprecated symbol _GPTRREG was causing failure to
3626         link. Thanks G. M. Gallant for the info.
3627
3628 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3629
3630         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3631         comments for Bugs item #954788.
3632
3633 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3634
3635         * src/pic16/device.c (pic16_dump_gsection,
3636         * pic16_groupRegistersInSection): handle symbols declared to be in
3637         access bank differently,
3638         * src/pic16/gen.c (struct _G): added field resDirect,
3639         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3640         send values read from stack directly to result and don't allocate
3641         temporary values,
3642         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3643         same registers,
3644         * (pic16_sameRegsOfs): NEW,
3645         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3646         free because they were not allocated from temporary pool,
3647         * pic16_popRegFromString): workaround to fix a problem with
3648         allocating variables twice or never,
3649         * (genGenPointerGet): using PRODL instead of FSR0H,
3650         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3651         instead of FSR0H,
3652         * (genAssign): take advantage of the _G.resDirect flag,
3653         * (genCast): around line 11844, use mov2f instead of directly
3654         MOVFF'ing between operands to account for literal values,
3655         * src/pic16/genutils.c: some new debug functions for gpsim have been
3656         added,
3657         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3658         float with integer part only,
3659         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3660         place variables in access bank
3661         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3662         updated sources to reflect recent changes in gen.c
3663
3664 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3665
3666         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3667         sources that searched for headers in installation path, now the
3668         device/include/pic16 is used,
3669         * src/pic16/glue.c (pic16glue),
3670         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3671         .line directives if not in debug mode, this suppresses assembler's
3672         warnings for ignored directives
3673
3674 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3675
3676         * src/port.h: made reset_regparms prototype void parameter explicit.
3677         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3678         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3679         * doc/sdccman.lyx: documented warning disabling and how to use
3680           printf_large to make it print floats.
3681         * device/include/stdbool.h: NEW
3682         * device/lib/_atof.c,
3683         * device/lib/_divuint.c,
3684         * device/lib/_divulong.c,
3685         * device/lib/expf.c,
3686         * device/lib/printf_large.c,
3687         * device/lib/sincosf.c,
3688         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3689         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3690           a completely reentrant lib.
3691
3692 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3693
3694         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3695         * device/include/pic16/stdio.h: fixed bug with colon
3696
3697 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3698
3699         * device/include/pic16/stdio.h,
3700         * device/include/pic16/stdlib.h,
3701         * device/include/pic16/math.h: NEW
3702         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3703         declared as _naked to reduce overhead
3704         * device/lib/Makefile.in (target port-specific-objects-pic16):
3705         changed * to *.* so to ignore the CVS directory,
3706         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3707         stacked variables back in stack,
3708         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3709         corruption
3710
3711 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3712
3713         * .version: bumped version number to 2.4.5
3714         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3715         * support/Util/SDCCerr.c (messages structure): added entry for
3716         W_POSSBUG2
3717
3718         Large cumulative patch for pic16 port and libraries.
3719         * device/include/pic16/sdcc-lib.h,
3720         * device/include/pic16/stdarg.h,
3721         * device/include/asm/pic16/features.h,
3722         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3723         * device/include/pic16/float.h: changes reentrant keyword with
3724         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3725         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3726         updated target build-libraries to include objects from gptr,
3727         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3728         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3729         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3730         all function headings,
3731         * src/SDCCmain.c: added global parameter userIncDirsSet,
3732         * (parseCmdLine): when option -I is encountered add directory to
3733         userIncDirsSet too,
3734         * src/version.awk: added space between control and long,
3735         * src/pic16/NOTES: added some notes for the port,
3736         * src/pic16/gen.c: added prototype for mov2fp function,
3737         * (fReturnpic16[]): properly named return value registers,
3738         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3739         * (aopForSym): added code to handle symbols with onStack flag set,
3740         symbols onStack are allocated PTRSIZE bytes,
3741         * (aopFreeAsmop): handles special case where asmops are stack objects,
3742         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3743         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3744         added argument lock to trace flaws in allocating temporary registers
3745         when developing port,
3746         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3747         * (pic16_popRegFromString): reenabled allocating a direct register
3748         from string,
3749         * (assignResultValue): various beautifications,
3750         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3751         referenced function argument,
3752         * (genIpush): reenabled to allow stacked arguments, handles only
3753         ic->parmPush iCodes,
3754         * (genCall, genPcall): major changes to allow for variable argument
3755         functions, fixed a bug with falsely restoring stack pointer after
3756         returning from call,
3757         * (genFunction): pending code for critical function,
3758         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3759         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3760         * (genNearPointerGet): fixed bug with indirect reading, was always
3761         reading from INDF0
3762         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3763         pointers,
3764         * (genAddrOf): rewrote code to take address of a stacked function parameter
3765         * (genCast): fixed casting to generic pointer type,
3766         * src/pic16/gen.h: added AOP_STA,
3767         * (struct asmop): added field stk,
3768         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3769         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3770         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3771         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3772         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3773         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3774         generic pointers,
3775         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3776         and library paths,
3777         * (pic16_port structure): generic pointer size is set to 3,
3778         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3779         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3780         compiler warning,
3781         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3782         operand is an iTemp,
3783
3784 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3785
3786         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3787         * debugger/mcs51/simi.c: addapt new syntax of s51
3788
3789 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3790
3791         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3792         * src/pic16/pcode.c: commented out some calls to free() in order to
3793         fix bug #989576,
3794
3795 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3796
3797         * src/SDCCicode.h,
3798         * src/SDCCicode.c (isiCodeInFunctionCall),
3799         * src/avr/ralloc.c (selectSpil),
3800         * src/pic/ralloc.c (selectSpil),
3801         * src/pic16/ralloc.c (selectSpil),
3802         * src/ds390/ralloc.c (selectSpil),
3803         * src/hc08/ralloc.c (selectSpil),
3804         * src/xa51/ralloc.c (selectSpil),
3805         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3806         stack in the middle of a function call sequence (fixes bug #1020268)
3807         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3808         costs associated with the minimum switch case.
3809
3810 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3811
3812         * src/SDCC.lex: fixed bug #1030549
3813
3814 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3815
3816         * src/SDCCcse.h (struct cseDef),
3817         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3818         over a function call if the CSE is derived from a symbol whose
3819         address has been taken (fixes bug #1029883)
3820         * support/regression/tests/bug-1029883: a new regression test for
3821         this bug
3822
3823 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3824
3825         * src/hc08/gen.c (emitinline): fixed bug #1029778
3826         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3827         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3828         and starts toward RFE #905167)
3829
3830 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3831
3832         * src/pic16/gen.c (mov2f): New function to move an operand to
3833         another without considering if it is a literal or a register,
3834         * (pic16_sameRegs): don't check if they are both AOP_REG,
3835         * (AccRsh): removed andmask=0 lines,
3836         * (genLeftShift): duplicated to be improved in future versions,
3837         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3838         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3839         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3840         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3841         * (insertBankSwitch): fixed inserting banksel directives algorithm
3842         for instructions that follow a skip instruction, this fixes a report
3843         for broken subtraction code generation,
3844         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3845         iCode is a left op, just in case result and right share the same
3846         registers
3847
3848 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3849
3850         * src/hc08/main.c,
3851         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3852         preservation of HX
3853         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3854         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3855         on 2004-09-12; it was buggy
3856
3857 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3858
3859         * src/SDCCsymt.h: removed RESULT_CHECK
3860         * src/SDCCast.c,
3861         * src/SDCCglue.c,
3862         * src/SDCCval.c,
3863         * src/pic/glue.c,
3864         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3865
3866 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3867
3868         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3869         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3870         configuration values no more rejected by compiler, they are assigned
3871         to configuration registers with a warning message instead,
3872         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3873         the for-loop so last conf register is emitted too,
3874         * (_pic16_initPaths): link library libsdcc.lib by default,
3875         * (_hasNativeMulFor): modified test for multiplication according to
3876         Raphael Neider's remarks. Integer multiplication is also done with
3877         support functions,
3878         * device/include/pic16/pic18fregs.h: corrected type error in while
3879         testing and including 18f6720 header file
3880
3881 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3882
3883         * src/pic16/device.h (pic16_options): removed field use_crt,
3884         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3885         until an optimization to handle single bits is added,
3886         * (pic16_loadFSR0): moved before genUnpackBits,
3887         * (genAnd): some white lines removed,
3888         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3889         leave_reset flags in pic16_options when using crt modules,
3890
3891 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3892
3893         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3894           for bugs 898889 & 979599. Also used some safer print instructions.
3895
3896 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3897
3898         * src/pic16/device.h (pic16_options_t): added field use_crt,
3899         crt_name, no_crt,
3900         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3901         catch a probable future bug,
3902         * src/pic16/gen.c: aopIdx function commented out,
3903         * (genAssign): commented out old code which used aopIdx,
3904         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3905         code, added if conditionals to take into account the --use-crt
3906         command line options,
3907         * src/pic16/main.c (pic16_optionsTable): added new command line
3908         options, --use-crt= and --no-crt,
3909         * (_pic16_linkEdit): now the proper crt object is added in the
3910         linker command line except than when --no-crt is specified,
3911         * src/pic16/pcode.c,
3912         * src/pic16/pcode.h: added some structures and functions for a new
3913         optimization scheme to compansate for instruction overhead between
3914         same iCodes, this scheme is currently under development and is not
3915         working in any way,
3916         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3917         to && operator,
3918         * device/lib/pic16/startup/crt0i.c,
3919         * device/lib/pic16/startup/crt0iz.c: added global char variable
3920         __uflags to force the generation of an idata section
3921
3922 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3923
3924         * doc/Makefile,
3925         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3926         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3927
3928 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3929
3930         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3931         Frieder) and clarified the default code optimization mode
3932
3933 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3934
3935         * src/SDCC.lex (doPragma, process_pragma),
3936         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3937         "opt_code_size", and "opt_code_balanced"
3938         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3939         regrouped options by category, added support for category headers
3940         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3941         and "--opt-code-size"
3942         * doc/sdccman.lyx: documented these new options and pragmas
3943         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3944         preference into account
3945
3946 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3947
3948         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3949           geniCodePreDec): Fixed bug 904237 by generating a warning
3950         * src/SDCCerr.h,
3951         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3952
3953 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3954
3955         * src/pic/device.c : When no max ram set validate full memory range.
3956         * src/pic/pcode.c,
3957         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3958
3959 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3960
3961         * device/lib/_gptrget.c,
3962         * device/lib/_gptrput.c: updated comment
3963         * device/lib/calloc.c,
3964         * device/lib/free.c,
3965         * device/lib/malloc.c,
3966         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3967         * src/SDCCcse.c (cseBBlock),
3968         * src/SDCCicode.c (printOperand, geniCodeArray),
3969         * src/SDCCicode.h (struct operand): fixed bug 868103
3970         * support/regression/tests/bug-868103.c: added
3971         * src/SDCCast.c (searchLitOp),
3972         * src/SDCCcse.h (struct cseDef),
3973         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3974         * src/SDCCicode.h (struct operand),
3975         * src/SDCCsymt.h (struct sym_link),
3976         * src/avr/gen.c (hasInc),
3977         * src/ds390/gen.c (hasInc),
3978         * src/hc08/gen.c (genPlusIncr, hasInc),
3979         * src/mcs51/gen.c (hasInc),
3980         * src/pic16/glue.c (pic16_printIvalChar),
3981         * src/pic16/ralloc.c (regWithIdx),
3982         * src/xa51/gen.c (hasInc) : removed warnings
3983         * src/SDCCast.c (createBlock): added comment ???
3984         * src/hc08/ralloc.c: updated comments
3985
3986 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3987
3988         * doc/sdccman.lyx: updated section on switch statements, added
3989         section about semaphore locking
3990         * doc/Makefile: added option -info for latex2html
3991         * device/lib/_gptrget.c,
3992         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3993
3994 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3995
3996         * src/pic/device.h,
3997         * src/pic/device.c,
3998         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3999          maxram is less than 0x100.
4000
4001 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4002
4003         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4004
4005 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4006
4007         * src/port.h,
4008         * src/mcs51/main.c,
4009         * src/ds390/main.c,
4010         * src/z80/main.c,
4011         * src/hc08/main.c,
4012         * src/pic/main.c,
4013         * src/pic16/main.c,
4014         * src/avr/main.c,
4015         * src/xa51/main.c
4016         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4017         a jump table is the best form for a switch statement, including
4018         automatic insertion of missing cases to make the case range
4019         continuous. Developed in collaboration with Frieder Ferlemann.
4020
4021 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4022
4023         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4024         accumulator result if it needs sign extension
4025
4026 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4027
4028         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4029
4030 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4031
4032         * device/lib/gbz80/printf.c,
4033         * device/lib/z80/printf.c: removed define for NULL
4034
4035 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4036
4037         * as/xa51/xa_link.c,
4038         * device/examples/ds390/ow390/ad26.c,
4039         * device/examples/ds390/ow390/cnt1d.c,
4040         * device/examples/ds390/ow390/counter.c,
4041         * device/examples/ds390/ow390/ds2480.h,
4042         * device/examples/ds390/ow390/ds2480ut.c,
4043         * device/examples/ds390/ow390/findtype.c,
4044         * device/examples/ds390/ow390/gethumd.c,
4045         * device/examples/ds390/ow390/owllu.c,
4046         * device/examples/ds390/ow390/ownetu.c,
4047         * device/examples/ds390/ow390/swt12.c,
4048         * device/examples/ds390/ow390/swtloop.c,
4049         * device/examples/ds390/ow390/temp.c,
4050         * device/examples/ds390/ow390/temp10.c,
4051         * device/examples/ds390/ow390/thermo21.c,
4052         * device/examples/ds390/ow390/tinilnk.c,
4053         * device/examples/ds390/ow390/tstfind.c,
4054         * device/examples/serialcomm/windows/serial.cpp,
4055         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4056         * device/include/reg51.h: fixed line endings for cvs
4057
4058 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4059
4060         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4061         packRegsForAccUse, packRegisters): new accumulator register
4062         packing algorithm
4063         * support/regression/ports/hc08/support.c (_putchar): suppress
4064         warning of unused variable
4065         * src/SDCCicode.c: added SWAP entry to codeTable
4066
4067 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4068
4069         * device/lib/sprintf.c: forgot to add this file before previous commit
4070
4071 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4072
4073         * src/pic16/gen.c (genPackBits): added operand right in function
4074         parameters, load result directly if p_type is POINTER (that is
4075         called by genNearPointerSet)
4076         * (genUnPackBits): added operand left in function parameters,
4077         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4078         FSR0 if accessing bitfields,
4079
4080 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4081
4082         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4083           _print_format; updated printf, sprintf, vsprintf
4084         * device/include/asm/default/features.h: corrected comment/define
4085         * device/lib/Makefile.in: added sprintf.c
4086         * device/lib/libsdcc.lib: added sprintf module
4087         * device/lib/printf_large.c,
4088         * device/lib/vprintf.c,
4089         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4090           into these 3 files
4091         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4092         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4093         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4094           hc08 test
4095         * support/regression/tests/zeropad.c: define idata as data for hc08
4096
4097 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4098
4099         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4100         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4101         labels are referenced at least once (even if a reference is not found)
4102         * src/hc08/gen.c (emitcode): set isComment flag for comments
4103         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4104         loads), rules 6a..6b (optimize jumps to return)
4105
4106 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4107
4108         * device/lib/acosf.c (acosf),
4109         * device/lib/asinf.c (asinf),
4110         * device/lib/atanf.c (atanf),
4111         * device/lib/ceilf.c (ceilf),
4112         * device/lib/cosf.c (cosf),
4113         * device/lib/coshf.c (coshf),
4114         * device/lib/cotf.c (cotf),
4115         * device/lib/fabsf.c (fabsf),
4116         * device/lib/floorf.c (floorf),
4117         * device/lib/log10f.c (log10f),
4118         * device/lib/logf.c (logf),
4119         * device/lib/sinf.c (sinf),
4120         * device/lib/sinhf.c (sinhf),
4121         * device/lib/sqrtf.c (sqrtf),
4122         * device/lib/tanf.c (tanf),
4123         * device/lib/tanhf.c (tanhf),
4124         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4125         replaced all instances of "reentrant" in the library functions
4126         defined in math.h with this macro.
4127         * support/regression/tests/float_trans.c: reenabled test for hc08
4128
4129 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4130
4131         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4132         erroneously deleted
4133
4134 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4135
4136         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4137         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4138         multi-byte volatile operands are used
4139         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4140         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4141         initialization to area GSINIT0 so that it would always precede
4142         any static initializers in GSINIT
4143         * support/regression/tests/zeropad.c: fixed idata define for hc08
4144         * support/regression/tests/bug-927659.c,
4145         * support/regression/tests/float_trans.c: disabled tests for hc08
4146         pending missing library routines
4147         * .version: increased version number to 2.4.4 - hc08 port now passes
4148         regression tests
4149
4150
4151 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4152
4153         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4154         * Makefile.common.in,
4155         * as/Makefile,
4156         * as/hc08/Makefile.in,
4157         * as/mcs51/Makefile.in,
4158         * as/z80/Makefile.in,
4159         * debugger/mcs51/Makefile.in,
4160         * device/include/Makefile.in,
4161         * device/lib/Makefile.in,
4162         * doc/Makefile,
4163         * link/Makefile,
4164         * link/z80/Makefile.in,
4165         * packihx/Makefile.in,
4166         * sim/ucsim/main_in.mk,
4167         * sim/ucsim/avr.src/Makefile.in,
4168         * sim/ucsim/doc/Makefile.in,
4169         * sim/ucsim/gui.src/serio.src/Makefile.in,
4170         * sim/ucsim/hc08.src/Makefile.in,
4171         * sim/ucsim/s51.src/Makefile.in,
4172         * sim/ucsim/xa.src/Makefile.in,
4173         * sim/ucsim/z80.src/Makefile.in,
4174         * src/Makefile.in,
4175         * support/cpp2/Makefile.in,
4176         * support/librarian/Makefile,
4177         * support/makebin/Makefile: added DESTDIR to the install path proposed
4178         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4179         * doc/sdccman.lyx: added DESTDIR documentation
4180
4181 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4182
4183         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4184         instruction for interrupt handlers, use fast returns when returning
4185         from high priority interrupts
4186
4187 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4188
4189         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4190         code generation
4191         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4192         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4193         bugs, ported much of Bernhard's code from mcs51
4194         * src/mcs51/gen.c (genSend),
4195         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4196         than one when calling a reentrant function
4197         * device/lib/_mullong.c: defined an alternate struct layout for big
4198         endian ports (hc08)
4199
4200 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4201
4202         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4203         test
4204
4205 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4206
4207         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4208         are sane and complete before asking the port its prefered parameter
4209         passing method (fixes bug #1017633)
4210         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4211         and _ret3
4212
4213 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4214
4215         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4216         problem in bitfields >= 8 bits.
4217
4218 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4219
4220         * src/SDCCsymt.c: undid changes that were not meant to be committed
4221
4222 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4223
4224         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4225
4226 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4227
4228         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4229           copied and wrong bit got inverted
4230
4231 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4232
4233         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4234         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4235         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4236         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4237         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4238         assignments to bitfields at known addresses
4239         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4240         reads from bitfields at known addresses
4241         * src/hc08/ralloc.c (packRegisters),
4242         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4243         genhc08Code): optimize pointer get values used as conditionals
4244         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4245         and branch
4246
4247 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4248
4249         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4250         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4251         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4252         as conditionals
4253
4254 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4255
4256         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4257
4258 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4259
4260         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4261         related problems
4262
4263 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4264
4265         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4266
4267 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4268
4269         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4270         mcs51 port
4271
4272 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4273
4274         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4275
4276 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4277
4278         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4279         cases use more compact code.
4280
4281 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4282
4283         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4284
4285 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4286
4287         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4288
4289 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4290
4291         * src/SDCCsymt.h,
4292         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4293         parameter of changePointer() from symbol* to sym_link*
4294         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4295         * src/SDCCsymt.c (compareType): void* type is castable to other
4296         pointers, but not necesarily an exact match.
4297         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4298         is no longer blindly treated as an exact match.
4299         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4300
4301 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4302
4303         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4304
4305 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4306
4307         * src/pic/gen.c,
4308         * src/pic/pcode.c,
4309         * src/pic/ralloc.h,
4310         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4311
4312 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4313
4314         * src/pic/device.c,
4315         * src/pic/device.h,
4316         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4317
4318 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4319
4320         * src/mcs51/gen.c (emitcode): fixed bug #992819
4321
4322 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4323
4324         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4325           there's no need to make it worse
4326
4327 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4328
4329         * src/mcs51/ralloc.c (deassignLR),
4330         * src/ds390/ralloc.c (deassignLR),
4331         * src/hc08/ralloc.c (deassignLR),
4332         * src/z80/ralloc.c (deassignLR),
4333         * src/pic/ralloc.c (deassignLR),
4334         * src/pic16/ralloc.c (deassignLR),
4335         * src/avr/ralloc.c (deassignLR),
4336         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4337         rlivePoint): fixed another part of bug #971834
4338
4339 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4340
4341         * src/z80/main.c: enabled "critical" keyword
4342         * src/z80/mappings.i,
4343         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4344         functions (fixes bug #979646)
4345         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4346
4347 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4348
4349         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4350           such as c:\mydir.
4351
4352 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4353
4354         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4355           doesn't disable too much optimizations
4356
4357 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4358
4359         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4360
4361 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4362
4363         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4364
4365 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4366
4367         * src/pic/gen.c tidied up tabs
4368         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4369         * src/pic/main.c tidied up tabs
4370         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4371         * src/pic/pcoderegs.c tidied up tabs
4372         * src/pic/ralloc.c tidied up tabs
4373
4374 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4375
4376         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4377         to S_FIXED for pic16 port and when symbol is not in level 0,
4378         allocate for S_REGISTER storage class and pic16 port, too,
4379         * src/pic16/device.h: prototype for checkSym,
4380         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4381         * (pic16_assignConfigWordValue): test the value and the mask to
4382         validate that the value is suitable for the configuration word,
4383         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4384         collect extern declared symbols, don't emit symbol twice, check
4385         first if symbol is in publics set first,
4386         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4387         * added command line '--fstack' which enables an experimental
4388         feature for stack access, too buggy to be used yet...
4389         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4390         * (pic16_allocDirReg): when register has storage class S_REGISTER
4391         allocate in pic16_dynAccessRegs,
4392         * device/include/pic16/pic18f????.h: modified configuration word
4393         naming convention, words started as CONFIG0H but should be CONFIG1H
4394
4395 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4396
4397         * device/include/mcs51reg.h: fixed bug 970993
4398
4399 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4400
4401         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4402         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4403         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4404         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4405         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4406         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4407           error/warning numbers,
4408           added function setWarningDisabled()
4409         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4410         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4411           _memcmp.c _memmove.c calloc.c realloc.c free.c
4412         * support/regression/tests/malloc.c: added tests for new functionality
4413         * support/regression/tests/zeropad.c: added tests for truncated initializers
4414           and initialized char arrays starting with '\x0'
4415         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4416
4417 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4418
4419         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4420
4421 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4422
4423         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4424         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4425         peephole 177.e. Thanks to anonymous
4426
4427 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4428
4429         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4430         function isn't used in the source but referenced as a
4431         variable initializer then declare it as extern in .asm file
4432
4433 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4434
4435         * .version: increased version number to 2.4.3
4436
4437         Adding version extension according to ChangeLog CVS revision
4438         * src/Makefile.in (target all): added dependency 'version.h'
4439         * (rule version.h): added rule to create version.h from ChangeLog,
4440         * (rule dep): added dependency version.h,
4441         * src/version.awk: AWK script to create version.h
4442         * src/SDCCdwarf2.c (dwWriteModule),
4443         * src/SDCCglue.c (initialComments),
4444         * src/SDCCmain.c (printVersionInfo): modified to write after
4445         version string the version extension number,
4446         * src/SDCCutil.c: included "version.h"
4447         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4448         number,
4449         * src/SDCCutil.h: added prototype for getBuildNumber
4450
4451         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4452         includeDirsSet, too,
4453         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4454         const char [] is found in function prototype...
4455
4456         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4457         moving to WREG with source is already in WREG,
4458         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4459         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4460         * (aopForSym): stack'ed symbols are partially supported, added
4461         if-clause to support symbols in FARSPACE,
4462         * (sameRegs): added test for AOP_ACC to see if registers are same,
4463         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4464         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4465         * (pic16_popRegFromString): will not allocate a new register if it
4466         doesn't find one by name, bug may have introduced...
4467         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4468         * (genIpush): revived to use pic16 port's stack,
4469         * (genAddrOf): added incomplete case for stack'ed operand,
4470         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4471         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4472         can handle multibyte operands,
4473         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4474         * (pic16initialComments): added message for MPLAB compatibility
4475         mode enabled,
4476         * src/pic16/main.h: prototype for pic16_mplab_comp,
4477         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4478         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4479         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4480         because of increased complexity of procedure,
4481         * (_process_pragma): stack pragma changed to format 'stack pos len',
4482         emit symbol '_stack_end' to conform with gplink,
4483         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4484         to search for register,
4485         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4486         PO_GPR_REGISTER,
4487         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4488         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4489         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4490         case for PO_GPR_REGISTER,
4491         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4492         dies, the new era is ahead !...
4493         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4494         pic16_dynInternalRegs,
4495         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4496         * (pic16_allocDirReg): minor optimizations and bug fixes,
4497         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4498
4499         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4500         load stack and frame pointer with address of 'stack_end' symbol
4501
4502 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4503
4504         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4505         without source code but only variable initializers
4506
4507 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4508
4509         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4510         external are not declared as extern to reduce overhead while linking
4511
4512 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4513
4514         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4515
4516 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4517
4518         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4519           Yee Keat for the patch
4520         * src/SDCCast.c (decorateType): fixed bug #979599
4521         * src/ds390/gen.h: removed local fReturnSizeDS390
4522         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4523         * src/ds390/gen.c (genAnd, genOr, genXor),
4524         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4525
4526 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4527
4528         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4529         add relFilesSet to $3, manipulate $2 to handle linking of object
4530         files without source files in command line,
4531         * device/include/pic16 (all headers): added ID location macros,
4532         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4533         entries for ID location bytes,
4534         * (pic16_assignIdByteValue): NEW,
4535         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4536         added field dumpcalltree to pic16_options_t,
4537         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4538         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4539         emitting rFalseIfx label after check_carry label,
4540         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4541         pic16_emitDIRegs), NEW
4542         * (pic16glue): dump .calltree file when option --calltree found,
4543         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4544         * (_pic16_genAssemblerPreamble): emit ID locations after
4545         configuration registers,
4546         * (pic16_linkCmd): modifications of the link command,
4547         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4548         * (pic16_pCodeInitRegisters): don't init stack registers,
4549         * (pic16_findPrevInstruction): fixed bug,
4550         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4551         bug with immediate registers,
4552         * (buildCallTree): traces stack push and pop,
4553         * (pct2): dump also stack usage for each function,
4554         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4555         * (pic16_allocDirReg): various modifications,
4556         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4557         fixed to 1,
4558
4559 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4560
4561         * src/pic16/pcode.c: removed buggy double colon
4562
4563 2004-07-01 Borut Razem <borut.razem AT siol.net>
4564
4565         * support/scripts/sdcc.nsi: added include/pic16 to setup
4566
4567 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4568
4569         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4570         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4571         target 'clean',
4572         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4573         specific command line arguments. Also added sample lkr script
4574         for placing a variable at a specific memory bank.
4575         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4576         at a specific memory bank,
4577         * (pic16_dump_isection): fixed bug which caused string literals to
4578         be omitted when dumping idata section,
4579         * (pic16_groupRegistersInSection): added code to handle registers
4580         in specific memory banks,
4581         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4582         public, all references are renamed too,
4583         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4584         AOP_DPTR2,
4585         * (pic16_storeForReturn): added case to handle when dest is WREG,
4586         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4587         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4588         pic16_rel_udata, check to see if that register is marked as being
4589         a member of a specific memory bank,
4590         * (pic16_printIvalCharPtr): added code to add string literals either
4591         to code or the idata sections,
4592         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4593         also accept the 'udata' pragma,
4594         * src/pic16/main.h: new structure types sectName and sectSym
4595         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4596         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4597         * (pic16_findPrevInstruction): fixed, it returned nothing,
4598         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4599         instruction combinations,
4600         * (pic16_FixRegisterBanking): heavily reorganised,
4601         * (pic16_AnalyzeBanking): if generating banksel directives is
4602         disabled, then don't call FixRegisterBanking at all,
4603         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4604         completely removed,
4605         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4606
4607 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4608
4609         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4610         Phuah Yee Keat <yk.phuah AT nestac.com>
4611
4612 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4613
4614         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4615         correctly the IVT even if it is relocated to some other location
4616
4617 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4618
4619         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4620         * device/include/pic16/pic18f2220.h: NEW,
4621         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4622         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4623         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4624         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4625         nodefaultlibs, ivt_loc is the location of the interrupt vector
4626         table, and nodefaultlibs signs that default libraries should not be
4627         linked in link stage,
4628         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4629         according to --ivt-loc argument,
4630         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4631         when pragma stack is found,
4632
4633 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4634
4635         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4636         256 (range check), 257 (do while), 258.a-f (bit banging
4637         f.e. on 3-wire SPI bus)
4638
4639 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4640
4641         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4642         variables used exclusively within a loop
4643
4644 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4645
4646         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4647
4648 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4649
4650         * src/SDCClrange.c (computeClash): fixed bug #971834
4651
4652 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4653
4654         * src/mcs51/gen.c (genCmp): fixed bug #975903
4655         * src/hc08/gen.c (operandsEqu),
4656         * src/ds390/gen.c (operandsEqu),
4657         * src/z80/gen.c (operandsEqu),
4658         * src/pic/gen.c (operandsEqu),
4659         * src/pic16/gen.c (operandsEqu),
4660         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4661         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4662
4663 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4664
4665         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4666
4667 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4668
4669         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4670         default case in switch statement,
4671         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4672         to eliminate problem with initialisation of pointers, but problem
4673         still exists,
4674         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4675         * (emitStaticSegment): removed various lines emitting debug info,
4676         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4677         added processor registers for utilizing EEPROM,
4678         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4679         configurable and set 8
4680
4681 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4682
4683         * .version: increased version number to 2.4.2,
4684
4685         Cumulative patch for pic16 port
4686         * src/pic16/device.c: changed scheme to dump initial values for
4687         variables in idata segment, all print_idata* functions were removed,
4688         now the pic16_printIval* will be called,
4689         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4690         * _pic16_printPointerType, pic16_printPointerType,
4691         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4692         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4693         NEW, similar to the respective functions in SDCCglue.c,
4694         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4695         way, emitting hex bytes,
4696         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4697
4698 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4699
4700         * src/avr/ralloc.c (serialRegAssign),
4701         * src/xa51/ralloc.c (serialRegAssign),
4702         * src/pic/ralloc.c (serialRegAssign),
4703         * src/pic16/ralloc.c (serialRegAssign),
4704         * src/hc08/ralloc.c (serialRegAssign),
4705         * src/z80/ralloc.c (serialRegAssign),
4706         * src/ds390/ralloc.c (serialRegAssign),
4707         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4708
4709 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4710
4711         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4712         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4713
4714 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4715
4716         Cumulative patch for pic16 port:
4717         * src/pic16/device.h (typedef PIC16_device) modified fields for
4718         defining microcontrollers,
4719         * src/pic16/device.c: added new info for all devices in Pics16 array,
4720         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4721         to be optimised out by the pCode optimiser,
4722         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4723         specially, bug reported by G.M. Gallant,
4724         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4725         as force'd so that cannot be optimised out by pCode optimiser,
4726         * src/pic16/pcode.c,
4727         * src/pic16/pcodepeeph.c,
4728         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4729         they are disabled by default, but can be enabled explicit with
4730         command argument --denable-peeps, for testing,
4731         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4732         --pomit-ivt in COMPILE_FLAGS
4733
4734 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4735
4736         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4737           compilation on MSVC
4738
4739 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4740
4741         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4742
4743 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4744
4745         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4746         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4747
4748 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4749
4750         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4751         would only assign 0x300001 register.
4752
4753 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4754
4755         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4756         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4757
4758 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4759
4760         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4761         for ds80c400
4762         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4763         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4764         added peephole 254 (left shift), 255 (jump table)
4765
4766 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4767
4768         * device/lib/Makefile.in: removed comment line with model-pic16,
4769         * (target port-specific-objects-pic16): the libraries and objects
4770         are copied to the build directory form the device/lib/pic16/bin
4771         directory
4772
4773         Cumulative patch concerning pic16 port:
4774         * library directory has been re-organized,
4775         * added support for PIC18F1220,
4776         * added headers and library sources for chips 18f1220,18f6520,
4777         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4778
4779         * configuration registers setting has changed, now each supported
4780         device has a complete description of the registers it uses,
4781         * all initialisations are moved to idata sections, these section
4782         can be absolute or relocatable,
4783         * fixed initialisation of codespace variables,
4784         * fixed warning about PCLATU and gpsim,
4785         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4786         * (genAssign): use table reads when assigning from variables in codespace,
4787         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4788         char/int variables placed in codespace,
4789         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4790         registers set in .asm file, no need for --pomit-config-words anymore,
4791         * (pic16glue): some 8051 legacy segments are commented out
4792         (to be removed completely),
4793         * added support for alternative assembler and linker with --asm=
4794         and --link= command line arguments,
4795         * peepholes are disabled automatically in the port, no need to
4796         specify on command line,
4797         * port supports natively char/int/long multiplication, but converts
4798         all divisions to support functions,
4799         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4800         to the file set in variable $2,
4801         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4802         strings in ASCII format and not in hex,
4803         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4804         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4805         allocate proper register if iCodes aren't temporary,
4806
4807 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4808
4809         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4810
4811 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4812
4813         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4814         is commented out
4815
4816 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4817
4818         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4819         computed address is reused
4820         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4821         multi-byte bitfields
4822
4823 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4824
4825         * src/z80/gen.c: (genArrayInit): must check for pointers too
4826
4827 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4828
4829         * support/regression/tests/zeropad.c: never meant to commit the
4830           nestedstruct test: removed, added check for GCC version
4831
4832 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4833
4834         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4835         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4836         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4837           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4838           bugs 928906 and 954082 half-empty initializers
4839         * src/SDCCsymt.h,
4840         * src/SDCCsymt.c (getAllocSize): added for above fix
4841         * src/z80/gen.c (genArrayInit): fixed bug 741044
4842         * support/regression/tests/zeropad.c: added tests
4843
4844 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4845
4846         * src/pic16/device.c (pic16_dump_section): corrected bug which
4847         caused some symbols of the libraries to be misplaced
4848
4849 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4850
4851         * src/pic16/glue.c,
4852         * src/pic16/ralloc.h,
4853         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4854         to fix conflict with pic port
4855
4856 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4857
4858         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4859         externs configuration variables,
4860         * src/pic16/ralloc.h,
4861         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4862         prototype in header, commented out some debug messages
4863
4864 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4865
4866         * src/pic16/glue.c,
4867         * src/pic16/main.c,
4868         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4869         for gpasm COFF object generation. Thanks to D. Hawkins for
4870         his patch info
4871
4872 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4873
4874         * src/ds390/main.c,
4875         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4876         Brock for spotting this)
4877         * src/ds390/gen.c (genEndFunction),
4878         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4879         interrupt handler and critical. Disable push/pop optimizations when
4880         peephole optimizations disabled.
4881
4882 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4883
4884         Updated pic16 library sources and headers.
4885         * device/lib/pic16/pic18f*/ ,
4886         * device/include/pic16/*.h: modified to handle structured SFR
4887         definitions
4888
4889 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4890
4891         * src/port.h (PORT structure): added hook initPaths, now each
4892         port can declare its own default search paths,
4893         which can been seen with the --print-search-dirs option,
4894         see pic16 port for example,
4895         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4896         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4897         * (doPrintSearchDirs): NEW, replaces in a central manner the
4898         printing of search dirs which was split in set*Paths functions,
4899         * (main): added call to port->initPaths and doPrintSearchDirs,
4900         * src/avr/main.c,
4901         * src/ds390/main.c,
4902         * src/hc08/main.c,
4903         * src/izt/i186.c,
4904         * src/izt/tlcs900h.c,
4905         * src/mcs51/main.c,
4906         * src/pic/main.c,
4907         * src/pic16/main.c: modified port structures to reflect addition of
4908         initPaths hook,
4909
4910         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4911         * (pic16_dump_section): for registers in same address reserve memory once,
4912         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4913         to no_banksel,
4914         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4915         result is greater in size than right or left,
4916         * (pic16_genUMult8X8_8): there are some cases where the result can
4917         be 16 bits size, so handle these,
4918         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4919         * (pic16_outBitC): modified to emit pcodes,
4920         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4921         or not,
4922         * (genDivOneByte): implemented algorithm to divide 8-bits,
4923         * (genCmp): uncommented goto, but issues still exist,
4924         * (genAnd): fixed a bug with variables >8bits,
4925         * (genPackBits): optimization added that uses BCF/BSF to change a
4926         single bit,
4927         * (genAssign): fixed bug when assigning floating point literals,
4928         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4929         __sdcc_gsinit_startup label,
4930         * src/pic16/main.c (_pic16_init): removed search directory
4931         initialisations,
4932         * (_pic16_initPaths): NEW, used to initialise search directories,
4933         * (_hasNativeMulFor): support functions for all except char/int
4934         multiplication, and char division,
4935         * (PIC16_port struct): modified entry for native mul support,
4936         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4937         no_banksel option,
4938         * (buildCallTree): call to register_usage is ifdef'ed out,
4939
4940 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4941
4942         * device/include/string.h: applied Stas Sergeev's patch to make this
4943         header file compatible with the preprocessor -Wundef option
4944         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4945         failure (fixes bug #941458)
4946
4947 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4948
4949         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4950         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4951         that the variable, not the function, should be static
4952         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4953         to be consistent with non-literal case
4954
4955 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4956
4957         * src/SDCCast.c (isConformingBody): fixed bug #949967
4958         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4959         convilong): fixed bug #952086
4960
4961 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4962
4963         * src/SDCCmem.c (allocVariables): fixed bug #955321
4964
4965 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4966
4967         * src/hc08/main.c (_hc08_genAssemblerEnd),
4968         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4969         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4970         completely eliminated the use of a temporary file
4971         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4972         when more than one file linked
4973         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4974
4975 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4976
4977         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4978         which fixes bug #543481
4979         * support/regression/tests/bug-751703.c: fixed comments left from a
4980         cut and paste error
4981         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4982         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4983         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4984         scopes
4985         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4986         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4987         are now changed to underscores in moduleName
4988
4989 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4990
4991         * as/mcs51/lkmem.c: better fix for bug #954173
4992
4993 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4994         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4995
4996         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4997         * device/include/c8051f000.h,
4998         * device/include/c8051f120.h,
4999         * device/include/c8051f300.h,
5000         * device/include/c8051f310.h,
5001         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5002         PWM16) and detab'ed
5003
5004 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5005
5006         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5007         and mailing lists, doc'ed --no-peep-comments, removed reference
5008         to knoppix (newest version has no LyX/LaTeX), other minor changes
5009         * src/SDCCglue.c (glue): save 2 bytes stack space with
5010         option --main-return. The ljmp could probably be avoided too
5011
5012 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5013
5014         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5015
5016 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5017
5018         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5019         * src/SDCCopt.c (isLocalWithoutDef),
5020         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5021         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5022         (credit to Maarten Brock for patch #949363, on which this is based)
5023         * support/regression/tests/bug-751703.c: some test cases of extern used
5024         within inner scopes.
5025
5026 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5027
5028         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5029         SPEC_STRUCT
5030         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5031         struct definitions
5032         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5033         dwWriteLabel): fix to create valid debugger symbols even when
5034         the module name has non-alphanumeric symbols in it
5035         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5036         when a variable's allocation has been optimized away
5037
5038
5039 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5040
5041         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5042         * src/hc08/main.c,
5043         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5044         * src/mcs51/main.c,
5045         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5046         * src/ds390/main.c,
5047         * src/z80/gen.c (z80_emitDebuggerSymbol),
5048         * src/z80/main.c,
5049         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5050         * src/pic/main.c,
5051         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5052         * src/pic16/main.c,
5053         * src/avr/gen.c (avr_emitDebuggerSymbol),
5054         * src/avr/main.c,
5055         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5056         * src/xa51/main.c,
5057         * src/SDCCdebug.c (emitDebuggerSymbol),
5058         * src/SDCCdebug.h,
5059         * src/port.h: added a debugger struct to the port struct. Added a
5060         callback for defining debugger symbols
5061
5062         * src/SDCCast.c (createLabel),
5063         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5064         with isitmp = 1
5065         * src/SDCCicode.h,
5066         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5067         iCode back to the ast for the function
5068
5069         * src/hc08/ralloc.c (hc08_assignRegisters),
5070         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5071         unneeded fields from the regs struct.
5072         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5073         pushReg() & pullReg() functions instead of emitcode()
5074
5075         * src/hc08/gen.c (genLabel, genhc08Code),
5076         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5077
5078         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5079         debugger hooks
5080
5081         * src/hc08/gen.c (genEndFunction, genhc08Code),
5082         * src/hc08/gen.h,
5083         * src/mcs51/gen.c (genEndFunction, gen51Code),
5084         * src/mcs51/gen.h,
5085         * src/ds390/gen.c (genEndFunction, gen390Code),
5086         * src/ds390/gen.h,
5087         * src/z80/gen.c (genEndFunction, genZ80Code),
5088         * src/z80/gen.h,
5089         * src/z80/z80.h,
5090         * src/pic/gen.c (genEndFunction, genpic14Code),
5091         * src/pic/gen.h,
5092         * src/pic16/gen.c (genEndFunction, genpic16Code),
5093         * src/pic16/gen.h,
5094         * src/avr/gen.c (genEndFunction, genAVRCode),
5095         * src/avr/gen.h,
5096         * src/xa51/gen.c (genEndFunction, genXA51Code),
5097         * src/xa51/gen.h,
5098         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5099         specific code to cdbFile.c and out of the backend code generators
5100
5101         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5102         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5103         starting address is now 0
5104
5105         * as/hc08/asm.h,
5106         * as/hc08/m08pst.c,
5107         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5108         assembler directive for DWARF support
5109         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5110
5111         * src/src.dsp,
5112         * src/Makefile.in,
5113         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5114
5115 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5116
5117         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5118         and inappropriate peephole optimization in jump tables
5119
5120 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5121
5122         * as/hc08/m08pst.c,
5123         * src/SDCCglue.c: sdccopt works for the hc08 port now
5124
5125 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5126
5127         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5128
5129 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5130
5131         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5132
5133 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5134
5135         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5136         rules
5137         * src/SDCCmain.c,
5138         * src/SDCCglobl.h,
5139         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5140         comments from the peephole optimizer replacement rules
5141         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5142         symbols
5143         * src/SDCCcse.c (updateSpillLocation),
5144         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5145         equivalents
5146         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5147         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5148         objects far pointers
5149
5150 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5151
5152         * src/SDCCsymt.h: a missing part of my last change
5153         * src/pic/ralloc.c (regTypeNum),
5154         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5155
5156 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5157
5158         * src/SDCCicode.h,
5159         * src/SDCCicode.c (aggrToPtrDclType),
5160         * src/SDCCptropt.h,
5161         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5162         ptrPseudoSymConvert),
5163         * src/pic/ralloc.c (regTypeNum),
5164         * src/pic16/ralloc.c (regTypeNum),
5165         * src/hc08/ralloc.c (regTypeNum),
5166         * src/ds390/ralloc.c (regTypeNum),
5167         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5168         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5169
5170 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5171
5172         * link/z80/lkmain.c (afile),
5173         * as/hc08/lkmain.c (afile),
5174         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5175         prevent a pointer problem when a filename has no directory and
5176         no extension specified.
5177
5178 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5179
5180         * link/z80/lkmain.c (afile): allow periods in directory names
5181         * link/z80/lkmain.c (afile),
5182         * as/mcs51/lkmain.c (afile),
5183         * as/hc08/lkmain.c (afile): allow linker script file to have an
5184         extension other than ".lnk"
5185         * link/z80/lklex.c (getfid),
5186         * link/z80/lkmain.c (parse),
5187         * as/mcs51/lklex.c (getfid),
5188         * as/mcs51/lkmain.c (parse),
5189         * as/hc08/lklex.c (getfid),
5190         * as/hc08/lkmain.c (parse): Support comments in the linker script
5191         file on lines by themselves and after filenames
5192
5193 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5194
5195         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5196
5197 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5198
5199         * src/z80/peeph-z80.def: removed some peephole rules that don't
5200         work with multibyte arithmetic (fixed bug #937126)
5201         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5202         to registers and not global variables
5203         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5204         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5205         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5206         checking for assignments not internally generated (fixed bug #931895)
5207         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5208         structure member (fixed bug #930072)
5209
5210 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5211
5212         * src/SDCCmain.c (linkEdit),
5213         * src/hc08/main.c (_hc08_parseOptions),
5214         * as/hc08/Makefile.in,
5215         * as/hc08/aslink.h,
5216         * as/hc08/asm.h,
5217         * as/hc08/m08pst.c,
5218         * as/hc08/lkrloc.c (relr, rele),
5219         * as/hc08/lkarea.c (lnkarea)
5220         * as/hc08/lkmain.c (afile, parse),
5221         * as/hc08/lkelf.c: support for ELF output
5222         * as/hc08/lks19.c (s19),
5223         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5224
5225 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5226
5227         * as/mcs51/lkihx.c: Fixed bug #899105.
5228
5229 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5230
5231         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5232         .dsp files from Unix to DOS.
5233
5234 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5235
5236         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5237         function pointers; we have been compliant for several months now.
5238         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5239         change that was accidently commented out
5240         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5241         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5242         bug #922319
5243
5244 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5245
5246         * src/hc08/gen.c: output of all of the internal debugging information
5247         is now controlled by the D() macro; it is disabled by default
5248
5249 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5250
5251         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5252         harder to keep the same registers during a CAST iCode
5253         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5254         long via int can be done in a single cast, if the signedness is
5255         correct.
5256         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5257         putchar() in tinibios.c in ds390's library
5258
5259 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5260
5261         * src/SDCCast.c (decorateType): fixed bug #898889,
5262         cast result of a literal complement too
5263         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5264         fixed check for bitfields
5265
5266 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5267
5268         * src/SDCCicode.c (geniCodeLogic): made it static,
5269         (geniCodeLogicAndOr): added in order to fix bug #905492,
5270         (ast2iCode): fixed bug #905492
5271         * support/regression/tests/bug-905492.c: added
5272         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5273         (processParms): fixed bug #927659: don't copy parms, this will clear
5274         decorated flag
5275         * support/regression/tests/bug-927659.c: added
5276
5277 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5278
5279         * src/SDCCast.c (addCast): don't cast float to char
5280         * device/lib/libsdcc.lib: added _memmove
5281
5282 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5283
5284         * device/lib/large/Makefile: fixed parallel execution by
5285         replacing `make` by `$(MAKE)`
5286
5287 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5288
5289         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5290         offsets (fixes bug #923936)
5291
5292 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5293
5294         * device/lib/small/Makefile: fixed parallel execution by
5295         replacing `make` by `$(MAKE)`
5296
5297 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5298
5299         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5300
5301 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5302
5303         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5304         * src/regression/Makefile: Regression test was not running.
5305
5306 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5307
5308         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5309         complement if possible
5310         * src/SDCCval.c (valComplement),
5311         * src/SDCCicode.c (operandOperation): fixed complement of literal
5312         * support/regression/tests/onebyte.c (testComplement): added
5313
5314 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5315
5316         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5317         return an optimized tree; actually replace actParm with the new tree
5318         * src/SDCCast.h: added some parantheses to remove side effects
5319         * support/regression/tests/bug-920866.c
5320
5321 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5322         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5323         Bit operands were not being handled properly in the pic14 port.
5324         (now src/regression/add.c passes again).
5325
5326 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5327
5328         * src/SDCC.y (labeled_statement): case and default no longer require
5329         a following statement (RFE #893037)
5330
5331 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5332
5333         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5334         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5335         disabled (fixes bug #916294)
5336         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5337         "mov a,acc"; patch provided by Lenny Story
5338         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5339
5340 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5341
5342         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5343         functions
5344         * src/ds390/gen.c (genFunction, genEndFunction),
5345         * src/ds390/ralloc.c (ds390_assignRegisters),
5346         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5347         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5348         pushed if there are parameters passed on the stack. Also, a cleaner
5349         way to decide if r0/r1 should be pushed/popped. (Together they fix
5350         bug #918693)
5351
5352 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5353
5354         * doc/sdccman.lyx,
5355         * device/lib/mcs51/crtpagesfr.asm,
5356         * device/lib/mcs51/crtxinit.asm,
5357         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5358         to avoid confusion with Si Lab's SFRPAGE register.
5359
5360 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5361
5362         * src/SDCCglue.c (emitMaps): allow public sfr variables
5363         * src/SDCCglue.c (initialComments): include compiler build date
5364         with compiler version and put the timestamp of the generated
5365         assembly file on a serperate line to be less confusing.
5366         * src/port.h: added genInitStartup hook
5367         * src/avr/main.c,
5368         * src/ds390/main.c,
5369         * src/hc08/main.c,
5370         * src/pic/main.c,
5371         * src/pic16/main.c,
5372         * src/xa51/main.c,
5373         * src/z80/main.c: genInitStartup initialize as NULL (default to
5374         historical behaviour)
5375         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5376         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5377         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5378         library instead of hard coding it into the compiler.
5379         * support/regression/ports/mcs51-stack-auto/spec.mk,
5380         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5381         * device/lib/mcs51/Makefile,
5382         * device/lib/small/Makefile,
5383         * device/lib/large/Makefile,
5384         * device/lib/mcs51/crtpagesfr.asm,
5385         * device/lib/mcs51/crtstart.asm,
5386         * device/lib/mcs51/crtxclear.asm,
5387         * device/lib/mcs51/crtxinit.asm,
5388         * device/lib/mcs51/crtclear.asm,
5389         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5390         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5391         and into user configurable files.
5392         * device/lib/clean.mk: clean mcs51 directory too
5393         * support/regression/tests/longlit.c: added static to T1 declaration
5394         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5395         accesses in the initialization code
5396
5397 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5398
5399         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5400         OSCTRIMVAL as noted in bug #916008
5401
5402 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5403
5404         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5405         in loops with multiple exits (reported as incorrect registers
5406         used by Martin Helmling in Sdcc-user list)
5407
5408 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5409
5410         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5411         made ds390 register extensions look less like error messages
5412
5413 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5414
5415         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5416         reported by Adam Wozniak in Sdcc-user list
5417
5418 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5419
5420         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5421         arithmetic optimizations, added debug output
5422
5423 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5424
5425         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5426         * sdcc.spec: updated and split sdcc into 3 rpms
5427         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5428         needed for literals of LEFT_OP and '+'
5429         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5430         introduced RESULT_TYPE_NOPROM
5431         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5432         left shift
5433         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5434         limited promotion to int only for '*'
5435         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5436
5437 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5438
5439         * src/pic16/gen.c (genSkip),
5440         (genc16bit2lit), (gencjneshort): commented out
5441         (is_LitOp): new helper function, checks operand type
5442         (genCmpEq): rewritten
5443
5444 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5445
5446         * support/regression/tests/bug-908454.c: added
5447
5448 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5449
5450         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5451         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5452         (geniCodeCast): cosmetic, don't preserve bit storage class
5453         (geniCodeLeftShift): added promotion
5454         (geniCodeLogic): fixed regression
5455         * src/SDCCsymt.c (computeTypeOr): accept bits too
5456         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5457
5458 2004-03-07  Borut Razem <borut.razem AT siol.net>
5459
5460         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5461
5462 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5463
5464         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5465         version of pic16_genPackRegisters which does not check if ic is a
5466         CAST operator,
5467         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5468         function cause string1.c regression test fails
5469
5470 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5471
5472         * sim/ucsim/configure.in,
5473         * sim/ucsim/configure,
5474         * sim/ucsim/doc/Makefile.in: use docdir
5475         * src/SDCC.y: fixed sbit atrributes
5476         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5477         * src/SDCCast.c (decorateType): |^& need special promotion handling
5478         * src/SDCCast.h,
5479         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5480         * src/SDCCsymt.h (computeType),
5481         * src/SDCCicode.c: computeType() needs op
5482         * src/SDCCsymt.c (checkTypeSanity),
5483         * doc/sddman.lyx: "plain" bitfields are unsigned
5484         * src/SDCCsymt.c (computeTypeOr): added
5485         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5486         |^& ops
5487         * src/SDCCval.c (val*): computeType() needs op
5488         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5489         * support/regression/tests/onebyte.c: added tests for |^&
5490
5491 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5492
5493         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5494         for writing icode into asm output.
5495
5496 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5497
5498         * src/pic16/device.c: added some debug lines enabled
5499         with macro DEBUG_CHECK,
5500         * src/pic16/genarith.c: more debug in genPlus,
5501         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5502         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5503         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5504         * (aopForSym): onStack symbols are re-placed in data memspace,
5505         and onStack flag is cleared,
5506         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5507         copy temporary pcodeop,
5508         * (genPcall): added warning for not updating PCLATU,
5509         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5510         always true for pic16 port,
5511         * (genMultOneWord): NEW, supports integer multiplication,
5512         * (genMult): modified to call genMultOneWord,
5513         * (ifxForOp): added warning when return NULL,
5514         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5515         flag is set before call to operandFromSymbol for implicit
5516         added structures,
5517         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5518         options.intlong_rent are set by default,
5519         * (_hasNativeMulFor): modified to allow port generation of integer
5520         multiplication,
5521         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5522         set regtype to REG_SFR for all registers, restricting seting the
5523         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5524
5525 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5526
5527         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5528         more than 500 times in the regression tests
5529
5530 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5531
5532         * support/Util/SDCCerr.h,
5533         * support/Util/SDCCerr.c,
5534         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5535         enumerator_list),
5536         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5537         for symbol conflicts.
5538         * support/valdiags/tests/enum.c,
5539         * support/valdiags/tests/tentdecl.c,
5540         * support/valdiags/tests/struct.c: expect possible error messages
5541         referring to original symbol definitions.
5542         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5543         * src/SDCCsymt.h,
5544         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5545
5546 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5547
5548         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5549
5550 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5551
5552         * src/pic16/ralloc.c (newReg): fixed bug #908929
5553
5554 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5555
5556         * src/ds390/gen.c: added missing #include "main.h"
5557
5558 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5559
5560         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5561         checking if symbol is already in set,
5562         * src/pic16/device.h: prototype for checkAddSym,
5563         * src/pic16/gen.c: (_G): added entry interruptvector,
5564         * (assignResultValue): removed some commented out lines,
5565         * (genFunction): check for ISR via sym->type, absolute section for
5566         interrupt code is created via a new pBlock, the goto instruction is
5567         placed now correctly at the interrupt vector position, changed all
5568         references from ivec to _G.interruptvector,
5569         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5570         is the interrupt is a high priority one, same for return from ISR,
5571         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5572         externs to calls of checkAddSym,
5573         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5574         pic16_pcode_verbose flag is set,
5575         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5576         * src/pic16/pcoderegs.c: message about how many registers are saved
5577         will only be emitted if pic16_pcode_verbose flag is set,
5578
5579 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5580
5581         * src/ds390/ralloc.h,
5582         * src/ds390/ralloc.c (ds390_regWithIdx),
5583         * src/ds390/gen.c (emitcode),
5584         * src/ds390/main.h,
5585         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5586         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5587         ds390operandCompare, getRegsRead, getRegsWritten,
5588         initializeAsmLineNode): customized instruction size calculation for
5589         ds390, started basis for some register optimizations
5590         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5591         corresponding assembly output
5592         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5593         missing push/pop of r0/r1. Optimized push/pops
5594
5595 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5596
5597         * src/mcs51/main.c (instructionSize): fixed ACALL size
5598         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5599
5600 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5601
5602         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5603         the sorting of rlist with NULL elements
5604         * (print_idataType, print_idata): NEW to create idata sections
5605         * src/pic16/device.h: idataSymSet new variable
5606         * src/pic16/gen.c (genFunction): fixed some bugs in string
5607         comparing, improved the absolute section creation for ISRs,
5608         added FSR0L/FSR0H in registers that are saved in an ISR,
5609         * (genInline): fixed the processing of inline snippets,
5610         now they undergo no process by the peephole optimizer
5611         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5612         are placed in idataSymSet,
5613         * (pic16emitStaticSeg): extern symbols are added in externs,
5614         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5615         switching when aboslute variables are placed in access bank memory
5616         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5617         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5618         commented out with #if,
5619         * (pic16_packRegisters): reintroduce the check for CAST because some
5620         symbols are not correctly handled,
5621         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5622         pCodeInstruction instead of pCode,
5623         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5624         pCodeAsmDir definition,
5625         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5626         directive, then the argument directive is emitted without the leading
5627         tab, hack for inline labels which must be in the first column,
5628         * (compareLabel,pic16_findNextInstruction),
5629         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5630         * (insertBankSwitch): modified for the new pCodeAsmDir,
5631
5632 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5633         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5634
5635         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5636         instance,
5637         * (pushSide): commented out with #if,
5638         * (assignResultValue): fixed some typos in saving
5639         registers,
5640         * (genPcall): FIXED and sync'ed with genCall,
5641         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5642         * (genNearPointerGet): fixed to handle some more cases,
5643         implementation scheme via table reads,
5644         * (genConstPointerGet): modified to access code memory correct,
5645         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5646         and improved to handle some cases
5647         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5648         instead of "RETLW" for init data
5649         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5650         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5651         variables are placed in access bank memory (<0x80 and >=0xf80),
5652         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5653         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5654         TBLWT_POSTDEC,TBLWT_PREINC
5655         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5656         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5657         directives
5658         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5659         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5660         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5661         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5662
5663 2004-02-29  Borut Razem <borut.razem AT siol.net>
5664
5665         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5666         support/Util/findme.h, support/Util/system.h: enhance binary relative
5667         search for lib and include by using findProgramPath()
5668
5669 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5670
5671         * src/SDCCpeeph.h,
5672         * src/SDCCpeeph.c (pcDistance),
5673         * src/port.h,
5674         * src/mcs51/ralloc.h,
5675         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5676         * src/mcs51/main.h,
5677         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5678         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5679         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5680         size calculation port specific, started basis for some register
5681         optimizations
5682         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5683         missing push/pop of r0/r1. Optimized push/pops
5684         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5685         * device/lib/_modsint.c (_modsint),
5686         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5687         and stack version so regression tests pass
5688
5689 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5690
5691         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5692         * src/SDCCast.c (decorateType): catch another small optimization
5693         with '?' operator
5694         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5695         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5696         modified to finally use computeType() all over SDCC,
5697         see Feature Request #877103
5698         * src/SDCCval.h: cosmetic
5699         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5700         valCompare(); regression tested in muldiv.c
5701         * support/regression/tests/muldiv.c (testMod): mod sign follows
5702         dividend only
5703
5704 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5705
5706         * src/SDCCast.c (decorateType): fixed bug #902362
5707         * doc/INSTALL.txt: fixed install instructions for win32
5708
5709 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5710
5711         * device/include/Makefile.in (install): fixed by replacing spaces
5712         by tabs
5713         * doc/README.txt,
5714         * doc/INSTALL.txt: updated for release
5715         * doc/sdccman.lyx: added warning for --xstack being buggy
5716
5717 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5718
5719         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5720         to eliminate build warnings.
5721         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5722
5723 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5724            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5725
5726         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5727         removed -penable-stack, added comment for stack pragma, added
5728         warning for not initializing the stack/frame registers, removed
5729         comment at interrupts section
5730
5731         Stack is made permanent, there is no ability to disable stack usage.
5732         * src/pic16/device.h,
5733         * src/pic16/device.c: removed all references to USE_STACK macro,
5734         * src/pic16/device.c (pic16_dump_section): when no elements in
5735         rlist, free rlist before return,
5736         * (pic16_dump_int_registers): NEW, internal registers are a new set
5737         of general purpose registers reused by each function,
5738         * (checkAddReg): returns 1 if registers is added to set,
5739         * (pic16_groupRegistersInSection): when a registers is of type
5740         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5741         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5742         SRCASECMP macro is moved here from device.c
5743         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5744         PO_PCLATU, PO_PRODL, PO_PRODH,
5745         * (pic16_pCodeOpType, genMinus,
5746         changed compares to "a" register, with AOP_ACC,
5747         * (pic16_genPlus): fixed some bugs and indented properly,
5748         * (pic16_addSign): changed size to size+offset in the MOVWF
5749         instruction,
5750         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5751         multiply 8-bit operand by literal, result is 8-bit,
5752         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5753         multiply 2 8-bit operand, result is 8-bit,
5754         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5755         genUMult8X*_16,
5756         * src/pic16/gen.c: changed accUse to contain WREG only,
5757         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5758         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5759         true, do not use immediate addressing any more unless sym is a
5760         pointer in codespace,
5761         * (aopForRemat): do not use immediate addressing when symbol not in
5762         codespace and when symbol's address is requested,
5763         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5764         accUse size (= 1),
5765         * (aopGet): added case for AOP_ACC and don't return "accumulator
5766         bug" but WREG instead,
5767         * (popGetTempReg): pushes contents of temporary register in stack,
5768         * (popReleaseTempReg): pops contents of temporary register from
5769         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5770         * (pic16_popGet): separated case AOP_ACC to return register WREG
5771         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5772         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5773         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5774         the use of immediate pointers to certain cases only.
5775
5776         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5777         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5778         * (assignResultValue, genCall, genRet): modified to use the new
5779         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5780         genPcall is still broken,
5781         * (genFunction): added code to create 'A' type pBlocks when
5782         interrupt functions are generated, code not extensively tested yet,
5783         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5784         * (genEndFunction): modified so ISRs pop stored registers from stack,
5785         * (genMultOneByte): cleanup,
5786         * (AccRsh): added flag andmask, to and result with appropriate mask,
5787         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5788         * (genDataPointerGet): fixed and reenabled its use,
5789         * (genNearDataPointerGet): bugs fixed,
5790         * (genDataPointerSet): bugs fixed,
5791         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5792         pic16_DumpSymbol, pic16_DumpOp,
5793         * src/pic16/genutils.h: function prototypes for the above functions,
5794         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5795         pointers,
5796         * (pic16emitRegularMap): many many many improvements, but needs a
5797         major cleanup,
5798         * src/pic16/main.c: enable_stack in pic16_options is removed,
5799         * (_pic16_parseOptions): removed command line options -penable-stack,
5800         * (_process_pragma): emit stack symbol only when stack pragma is
5801         processed,
5802         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5803         redirected to FSR0L/FSR0H pair,
5804         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5805         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5806         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5807         for immediates,
5808         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5809         * (dumpPicOptype): NEW,
5810         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5811         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5812         with movff instruction,
5813         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5814         added pic16_int_regs, some packRegsFor* functions are commented out,
5815         because produce errors,
5816         * src/pic16/NOTES: minor modifications
5817
5818 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5819
5820         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5821         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5822         --pack-iram.
5823         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5824         * as/mcs51/lkaomf51.c: fixed bug #895763
5825
5826 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5827
5828         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5829
5830 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5831
5832         * doc/sdccman.lyx: added details about the HC08 storage classes and
5833         interrupts, fixed the register usage info for z80 & gbz80
5834
5835 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5836
5837         * doc/sdccman.lyx: added more pic16 port documentation
5838         * device/include/pic16/: added header pic18fregs.h
5839
5840 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5841
5842         * doc/sdccman.lyx: added Vangelis' contribution
5843
5844 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5845
5846         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5847         extend to the next CALL or PCALL, not just to the next CALL.
5848
5849 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5850
5851         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5852
5853 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5854
5855         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5856         bug #895752 and a better fix for bug #716790
5857
5858 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5859
5860         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5861
5862 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5863
5864         * doc/sdccman.lyx: minor changes, minor changed
5865
5866 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5867
5868         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5869         which can't handle SDCC_NEWONEBYTEOPS,
5870         (geniCodeMultiply): removed conversion from mult to shift for pic14
5871         and pic16
5872
5873 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5874
5875         * src/hc08/gen.h,
5876         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5877         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5878         thus fixing bug #895406
5879
5880 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5881
5882         * device/lib/_modsint.c,
5883         * device/lib/_modslong.c: sign follows divisor only
5884         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5885         signs or signedness can be ignored
5886         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5887         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5888         added optimization for IFX,
5889         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5890         arguments;
5891         reenabled optimization for IFX, which was removed on 2004-01-11
5892         * src/SDCCast.h: added return type IFX
5893         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5894         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5895         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5896         SDCC_OLDONEBYTEOPS selects the old behaviour
5897         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5898         changed again and commented promotion rule
5899         * src/SDCCval.c (valDiv): promotion no longer necessary
5900         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5901         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5902         rewritten
5903         * support/regression/tests/onebyte.c: added
5904
5905 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5906
5907         * gen.c (genInline): reverted to old code for assemnling inline
5908         code because of bug reported James Chadd
5909
5910 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5911
5912         * ralloc.h: missing declarations from previous patch,
5913         seems that patch for ralloc.h was never applied, fixed
5914
5915 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5916            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5917
5918         * pcode.c,
5919         * pcode.h,
5920         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5921         indirect addressing. Marked FSR0 as deprecated
5922         * gen.c (pointerCode): commented out, not needed now
5923         (pic16_popGet2p): new MOVFF helper function
5924         (genGenPointerGet),
5925         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5926         (shiftRLong): removed duplicate debugging info
5927
5928 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5929
5930         * src/ds390/gen.c (genNearPointerGet),
5931         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5932         optimization with bits, but not bitfields.
5933         * src/ds390/ralloc.c (packRegisters),
5934         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5935
5936 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5937
5938         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5939
5940 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5941
5942         * src/SDCCsymt.h,
5943         * src/SDCCicode.c (operandFromSymbol),
5944         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5945         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5946         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5947         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5948         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5949         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5950         bug #892038
5951         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5952         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5953         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5954         * src/SDCCsymt.c (newSymbol),
5955         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5956         enumerator_list),
5957         * src/SDCCval.h,
5958         * src/SDCCval.c (newiList): fixed bug #885705
5959
5960 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5961
5962         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5963         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5964
5965 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5966
5967         * device/include/c8051f120.h,
5968         * device/include/c8051f300.h,
5969         * device/include/c8051f310.h: added/updated header files for Silicon
5970         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5971         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5972         in new section Submitting patches
5973
5974 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5975
5976         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5977         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5978         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5979         genGenPointerSet),
5980         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5981         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5982         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5983         genGenPointerSet),
5984         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5985         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5986         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5987         genGenPointerSet),
5988         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5989         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5990         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5991         genGenPointerSet): fixed bug #892400
5992         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5993         to eliminate build warnings.
5994         * src/SDCCast.c (processParms),
5995         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5996         fixed bug 751859
5997         * support/valdiag/valdiag.py: added GCC to the list of defines active
5998         when compiling with gcc
5999
6000 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6001
6002         * support/Util/SDCCerr.h,
6003         * support/Util/SDCCerr.c,
6004         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6005         with an incomplete type (fixed bug #883734)
6006         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6007
6008 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6009
6010         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6011
6012 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6013
6014         * src/SDCCast.c (decorateType),
6015         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6016         function pointer implementation
6017         * support/regression/tests/funptrs.c: added tests to verify both forms
6018         of function pointers work correctly. Added tests to verify parameters
6019         are passed in the correct order.
6020
6021 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6022
6023         * device.c (regCompare): registers are sorted by ascending
6024         address and increasing size,
6025         * main.c (_pic16_finaliseOptions): removed the declaration
6026         of compiler macro MCU. Now a macro of the format pic18fxxxx
6027         will be defined from the command line
6028
6029 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6030             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6031
6032         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6033         PCOP_RLCF was overwritten!
6034         * gen.c (genSkip): commented out calls to pic16_emitcode,
6035         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6036         * (genlshTwo),
6037         * (genRRC): added debugging info,
6038         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6039         overwritten while shifting,
6040         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6041         overwritten while shifting,
6042         * (AccLsh),
6043         * (AccRsh),
6044         * (shiftLLeftOrResult),
6045         * (shiftRLeftOrResult),
6046         * (shiftRLong),
6047         * (shiftLLong): Implemented with pic16_emitpcode
6048         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6049         * (genLeftShift): Fixed bug, operand for shift by variable always
6050         was "and"ed with 0x0f,
6051         * (genLeftShiftLiteral),
6052         * (genrshTwo),
6053         * (genRightShiftLiteral): added debugging info,
6054         * (genrshFour): added comment,
6055         * (genRightShift): determined signedness from operand "left"
6056         instead of "result"
6057
6058 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6059
6060         * src/SDCCicode.c (geniCodeParms),
6061         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6062         function pointers, fixed function pointer bugs #861242 and #861896
6063
6064 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6065
6066         * device/include/c8051f000.h,
6067         * device/include/c8051f120.h,
6068         * device/include/c8051f300.h: added header files for Silicon
6069         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6070
6071 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6072
6073         * src/SDCCast.c (processParams): added new type flow and restructured
6074         (gatherAutoInit): added new type flow
6075         (addCast): cosmetic changes
6076         (getLeftResultType): added new type flow for array indices, patch
6077         provided by Stas, see FR #877103
6078         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6079         array index patch by Stas
6080         * src/SDCCast.h: added prototype getResultTypeFromType()
6081         * src/SDCCval.h,
6082         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6083         * src/pic/glue.c (pic14emitStaticSeg),
6084         * src/pic16/glue.c (pic16emitStaticSeg),
6085         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6086         for initialization of symbols
6087         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6088         * support/Util/SDCCerr.h:
6089         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6090         * .version: bumped version number to 2.3.8
6091         * device/include/Makefile.in (install),
6092         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6093         avoid warnings
6094
6095 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6096
6097         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6098         Slade Rich fixed an optimization bug
6099         * src/pic/pcodepeep.c,
6100         * src/pic/pcoderegs.c
6101         * doc/Makefile (install): added test for directory
6102
6103 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6104
6105         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6106         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6107         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6108         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6109         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6110         * as/mcs51/asexpr.c (term),
6111         * as/hc08/asexpr.c (term): fixed bug #887146
6112
6113 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6114
6115         * src/z80/gen.c (genMult): handle single byte result product
6116         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6117         DUMMY_READ_VOLATILE (fixed bug #886367)
6118
6119 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6120
6121         * support/regression/tests/libmullong.c: fixed logic, on little endian
6122         hosts we ended without a mullong_wrapper()
6123
6124 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6125
6126         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6127         virus/worm forged address usage.
6128
6129 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6130
6131         Fixed promotion, it should be done on AST level:
6132         * src/SDCCast.c (addCast): added promotion to int
6133         (decorateType): updated call to upCast()
6134         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6135         usualUnaryConversions()
6136
6137 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6138
6139         * support/regression/tests/literalop.c (mulWrapper): Added a
6140         wrapper to remove integer overflow warnings.
6141
6142         * support/regression/tests/float_trans.c: Made work on host.
6143
6144         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6145         location of sz80.
6146
6147         * support/regression/generate-cases.py (main): Changed from inline
6148         to a main method.
6149
6150         * doc/Makefile (install): Changed to depth first to get rid of
6151         missing directory install warning.
6152
6153         * as/Makefile (install-doc): Made work on Mac.
6154
6155 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6156
6157         * src/SDCCast.c: added an additional type flow in decorateType() of
6158         opposite direction, see feature request #860006; it's enabled at runtime
6159         by setting the environment variable SDCC_NEWTYPEFLOW
6160         * src/SDCCast.h: changed prototype of decorateType()
6161         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6162         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6163         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6164         see feature request #877103
6165         * src/SDCCval.c: updated call of decorateType()
6166         (valBitwise): fixed bug #882876
6167         (valMinus): added promotion
6168         (valLogicAndOr): result is unsigned
6169         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6170         * src/SDCCsymt.c (computeType),
6171         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6172         must not cause an unsigned operation
6173         * src/pic/glue (pic14emitRegularMap),
6174         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6175
6176 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6177
6178         * src/pic/pcode.c (PCodeID): commented out left over debug code
6179
6180 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6181
6182         * support/valdiag/tests/overflow.c: added shift tests
6183         * src/pic/device.c,
6184         * src/pic/gen.c,
6185         * src/pic/gen.h,
6186         * src/pic/glue.c,
6187         * src/pic/main.c,
6188         * src/pic/pcode.c,
6189         * src/pic/pcode.h,
6190         * src/pic/pcodepeep.c,
6191         * src/pic/pcoderegs.c,
6192         * src/pic/ralloc.c,
6193         * src/pic/ralloc.h: applied patch from Slade Rich;
6194         added support for multiple code pages and multiple RAM banks on the
6195         PIC 14 port. The ASM files now no longer simply assume all the
6196         code / RAM are in the same page / bank. This means the linker can
6197         safely allocate code/RAM of separate ASM files to different pages/banks.
6198         * doc/sdccman.lyx: added Slade's tips
6199         * src/mcs51/peeph.def: fixed bug #880768
6200
6201 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6202
6203         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6204         * src/SDCCast.c (decorateType): fixed bug #880197
6205
6206 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6207
6208         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6209         getopt.h.
6210
6211         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6212         strtof is not part of C89 and isn't included with Mac OS X.
6213
6214 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6215
6216         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6217         shiftL2Left2Result): fixed bug #879326
6218         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6219         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6220         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6221         address fetch for clr instruction
6222         * device/lib/hc08/_mulint.c: created optimized assembly version
6223         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6224
6225 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6226
6227         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6228         proposed in FR #877103
6229
6230 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6231
6232         * src/SDCCval.c (cheapestVal): added missing checks
6233         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6234         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6235
6236 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6237
6238         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6239         equal operands
6240
6241 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6242
6243         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6244         loaded with the linker search paths (-L arguments) and the libraries
6245         to be linked with the current source (-l arguments). Changes
6246         currently will affect only the pic16 port.
6247         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6248         include path the port specific paths and port specific libraries,
6249         * gplink command now contains the $3 argument,
6250         * src/pic16/device.h,
6251         * src/pic16/device.c,: structure PIC_device is made public and
6252         renamed to PIC16_device, the same for variable Pics which is renamed
6253         to Pics16. Updated all references to them.
6254         * src/pic16/glue.c (pic16glue): corrected bug with code
6255         initialization which bypassed the variable initializations block.
6256
6257         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6258         COMPILE_FLAGS and added the --nostdinc option
6259
6260 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6261
6262         * device/include/mc68hc908jb8.h: Register defs for another member
6263         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6264
6265 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6266
6267         Documenting changes from previous commits.
6268         * configure.in (version 1.56),
6269         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6270         when generating output files to configure the pic16 library,
6271         but now I've commented it out, since gputils aren't installed in the
6272         SF compile farm, so library won't compile
6273
6274         * device/lib/Makefile.in (version 1.56): initially I've added in
6275         target 'all' the prerequestive 'model-pic16' so it compiled the
6276         pic16 library, but now I've commented it out for the same reasons
6277         above,
6278         * added targets 'model-pic16' and 'objects-pic16' to compile the
6279         library
6280         * added target 'port-specific-objects-pic16' to handle the
6281         generated libraries and copy them into the build/ directory
6282         * added target 'clean-intermediate-pic16' to clean intermediate
6283         files into pic16 directory
6284         * in target 'installdirs' added line to create directory pic16 in
6285         the installation path
6286
6287         * device/include/Makefile.in (version 1.11): in target 'install'
6288         added lines to copy all header files to installation path,
6289         * in target 'installdirs' added line create directory for pic16
6290         headers in the installation path
6291
6292 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6293
6294         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6295          a function call
6296
6297 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6298
6299         * configure,
6300         * device/lib/configure.in,
6301         * device/lib/configure: fixed for autoconf 2.57
6302
6303 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6304
6305         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6306         option so that it actually works. Made it specific to the z80, since
6307         the gbz80 doesn't have these kinds of I/O ports.
6308
6309 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6310
6311         * device/include/z180.h,
6312         * device/lib/_memcpy.c,
6313         * device/lib/_memmove.c,
6314         * device/lib/_mulint.c,
6315         * device/lib/ser_ir.c,
6316         * device/lib/ser_ir_cts_rts.c,
6317         * device/lib/_strcmp.c,
6318         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6319         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6320         portmode; added deprecation warning for bank= and protmode= forms.
6321         Also, guard against buffer overflow.
6322         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6323
6324 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6325
6326         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6327         changed interrupt vector table generation to only emit declared vectors.
6328         * device/include/Makefile.in: added missing backslash
6329         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6330
6331 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6332
6333         Mainly changes to support compilation of the device libraries
6334         * src/pic16/device.c: stack is allocated via symbol and not
6335         via literal number. The symbol is placed in the corresponding
6336         position of the data ram
6337         * (pic16_dump_section): relocatable and absolute uninitialized
6338         data are now emitted in sorted order to reduce section naming,
6339         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6340         weren't marked as being in the access bank,
6341
6342 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6343
6344         Added portion of GNU PIC Library under the directory
6345         device/include/pic16 and device/lib/pic16. These files
6346         contain the declarations of SFRs for the PIC18Fxx2 devices.
6347         The directory is initialized via configure from toplevel.
6348
6349 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6350
6351         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6352         the spilllocations to be compared correctly
6353
6354 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6355
6356         * src/SDCCast.c (decorateType): fixed bug introduced today
6357
6358 2004-01-12  Borut Razem <borut.razem AT siol.net>
6359
6360         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6361         doc/sdccman.lyx: upper case pragmas are deprecated
6362
6363 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6364
6365         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6366         in simpler and even better code
6367
6368 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6369
6370         * src/SDCCicode.c (operandOperation): fixed bug #874819
6371         * src/SDCCast.c (decorateType): fixed
6372         char foo (unsigned long ul) { return ul > 0; }
6373
6374 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6375
6376         * doc/sdccman.lyx: Moved and added some sections, small changes
6377         all over. Telling LaTeX to be less strict with word spacing
6378         to better keep the right margin. Changed some notes about
6379         maintainance of the ports in section 3.2.1 - is it OK like this?
6380
6381 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6382
6383         SDCC source changes:
6384         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6385         convilong): modified to inform the pic16 port that builtin functions
6386         are external
6387
6388         PIC16 PORT specific changes:
6389         * src/pic16/device.c pic16_dump_equates() added,
6390         processor registers declared internally by the port are emitted in
6391         the translation as equates,
6392         * src/pic16/gen.c: inline code is passed unprocessed to the
6393         translation,
6394         * (pic16_popGetLit2): fnuction modified to take second operand as
6395         pCodeOp pointer and not as literal,
6396         * (popRegFromIdx): prefixed with pic16_,
6397         * (pic16_popCombine2): modified to receive already allocated pCode
6398         operands,
6399         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6400         * (genFunction): initializes local stack frame and pushes on stack
6401         all the registers used by this function,
6402         * (genEndFunction): restores all registers from stack and restores
6403         stack frame,
6404         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6405         improvements,
6406         * (pic16glue): changed the program startup sequence,
6407         * added new dbName code 'A' for functions placed in absolute section
6408         * src/pic16/main.c: added function attribute _naked,
6409         * added pragma 'code' to place a fnuction at an absolute address,
6410         * added command line arguments --debug-ralloc and --pcode-verbose,
6411         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6412         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6413         * (pic16_newpCodeOpLit2): modified to take the second operand as
6414         pCodeOp pointer,
6415         * (pic16_printpBlock): modified to emit each function in a separate
6416         section,
6417         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6418         UPPER for immediate operands,
6419         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6420         instruction,
6421         * src/pic16/peeph.def: all peepholes with movff are commented out,
6422         because there is a problem in the pcode peep optimizer,
6423         * src/pic16/ralloc.c: the register allocator can now reuse local
6424         function symbols for another function. This saves register usage.
6425         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6426
6427         Added file src/pic16/NOTES with information about program writing on
6428         the current port version.
6429
6430 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6431
6432         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6433         and peephole 252 (array access)
6434
6435 2004-01-09  Borut Razem <borut.razem AT siol.net>
6436
6437         * src/SDCCmain.c : fixed #872250: -l command line defined library
6438           files are scanned before standard library files
6439
6440 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6441
6442         * src/SDCCast.c (decorateType): fixed bug #874046
6443
6444 2004-01-09  Borut Razem <borut.razem AT siol.net>
6445
6446         * support/scripts/sdcc.nsi: remove previous installation
6447
6448 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6449
6450         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6451         bytes for last interrupt vector (mcs51)
6452         * sdcc.spec: fixed typo
6453
6454 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6455
6456         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6457         gen51Code): more efficient parameter receive for --model-large
6458         ("bug" #845294)
6459
6460 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6461
6462         * src/ds390/main.c,
6463         * src/z80/main.c: added missed needLinkerScript flags (more than
6464         one port structure defined in these file)
6465         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6466         bug #795325
6467
6468 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6469
6470         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6471         * src/port.h: added flag needLinkerScript in port->linker
6472         structure to inform whether to create a .lnk file or not,
6473         * src/avr/main.c,
6474         * src/ds390/main.c,
6475         * src/hc08/main.c,
6476         * src/mcs51/main.c,
6477         * src/pic/main.c,
6478         * src/pic16/main.c,
6479         * src/xa51/main.c,
6480         * src/z80/main.c: changed appropriately to configure
6481         needLinkerScript flag
6482         * src/pic/gen.c,
6483         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6484         * src/pic/glue.c: added variable udata_section_name to
6485         override default uninitialized data segment definition for
6486         devices only with SHAREBANK memory (reported from Erik Epetrich)
6487         * (pic14emitOverlay): modified to emit a commented overlay segment
6488         directive when no overlay data exist
6489         * (picglue): modified to emit uninitialized data segment
6490         according to udata_section_name
6491         * src/pic/main.c (_pic14_parseOptions): added command line
6492         options --udata-section-name=[name] to override default
6493         udata definition name
6494         * modified _linkCmd and _asmCmd to include compiler passed
6495         arguments via -W option
6496         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6497         object file from '.rel' to '.o' in port->linker structure,
6498         changed size of fptr from 2 to 3 in port structure
6499
6500 2004-01-07  Borut Razem <borut.razem AT siol.net>
6501
6502         * support/scripts/sdcc.nsi: update PATH
6503         * support/scripts/sdcc.ico: craeted
6504
6505 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6506
6507         * device/include/Makefile.in: fix install
6508         * doc/Makefile: fix install
6509
6510 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6511
6512         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6513         in bug #860505
6514         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6515         how the function variable allocation summary is displayed; also
6516         include information about variables allocated to the overlay
6517         segment
6518
6519 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6520
6521         * as/mcs51/lkmain.c: Help about -Y option
6522         * as/mcs51/lkarea.c: Fixed gcc warnings
6523
6524 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6525
6526         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6527         fixed warning
6528         * support/valdiag/tests/overflow.c: added
6529         * src/SDCCast.c (decorateType),
6530         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6531         LEFT_OP (left shift)
6532
6533 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6534
6535         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6536         (default behaviour).
6537
6538 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6539
6540         A python script to validate compiler diagnostic messages. It can be
6541         used to verify that sdcc complains about bad c source code and
6542         gives a good location of the error.
6543         * support/valdiag/Makefile,
6544         * support/valdiag/valdiag.py,
6545         * support/valdiag/tests/*
6546
6547 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6548
6549         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6550         * src/SDCCsymt.c (newEnumType),
6551         * src/SDCCsymt.h
6552         * support/Util/SDCCerr.c,
6553         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6554         enum related bugs.
6555         * support/regression/tests/enum.c: added test for enum values that
6556         require at least 2 bytes of storage.
6557
6558 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6559
6560         * src/common.h: added ifndef/define/endif macros
6561         around the header file.
6562         Bug reported from Jesus Calvino-Fraga
6563
6564 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6565
6566         * sdcc.spec: updated
6567         * device/include/Makefile.in: don't install CVS directories
6568         * device/lib/Makefile.in: added removal of CVS directories after install
6569         * doc/Makefile: fixed install, added local_icons
6570         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6571         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6572         * src/ds390/gen.c (genRightShift): fixed bug #870788
6573         * src/SDCCast.c (decorateType): fixed bug #870781
6574
6575 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6576
6577         PIC16 port related changes:
6578         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6579         added variable stackPos,
6580
6581         * gen.c: genCall, assignResultValue: added support for
6582         pushing/retrieving function parameters to/from stack,
6583         genFunction,genEndFunction: setup stack frame for the
6584         generated function,
6585         genAddrOf: will be changed according to bug 863624
6586
6587         * added files genutils.c and genutils.h which contain gen*
6588         debugged and optimised functions extracted from gen.c
6589
6590         * glue.c: added variable 'externs' which holds extern symbols,
6591         pic16emitRegularMap: is modified to properly handle relocatable
6592          symbols under the new scheme,
6593         pic16createInterruptVect: is modified
6594         pic16printPublics: is modified to emit 'global' assembler directives,
6595         added pic16_printExterns to print extern symbols,
6596         pic16glue: initializes stack/frame pointer in the beginning of
6597         the assembly output. Temporary hack, will be corrected later,
6598         because gplink yet does not support stack and SDCC does not
6599         yet support a type of crt0.o object to create the final binary.
6600
6601         * Removed many lines that contain 8051 legacy code.
6602         * The code is finally placed under a 'code' directive.
6603         * Added port specific options.
6604
6605         * _process_pragma: simplified since now we do not need *special*
6606         include file to define SFR registers. But a separate header
6607         will be needed. This will be developed later.
6608         * _pic16_parseOptions: added, parses port specific options:
6609         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6610         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6611         --preplace-udata-with=
6612
6613         * _pic16_setDefaultOptions: modified to initialize section names,
6614         but hack is temporarly out of order since it needs improvement.
6615         * _pic16_genAssemblerPreamble: configuration words are emitted by
6616         their address instead of their name. This part is incomplete and
6617         supports only the 18Fxx2 devices. Other devices will emit an error
6618         during assembly since they do not contain the same set of config
6619         registers
6620         * _pic16_genIVT: is modified,
6621
6622         * pcode.c: added definitions for some hardware registers that are needed
6623         for stack support
6624         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6625         All PCI entries are updated. Now LFSR is supported.
6626         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6627         * added pic16_newpCodeOpLit2 to support instructions with
6628         two literal arguments
6629         * pic16_pCode2str: corrected code that emits assembler instructions
6630         with two literal operands and those that have an access bit modifier
6631         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6632         this fixes a bug which caused some labels to be lost, when an
6633         assembler directive was added, i.e. banksel,
6634         * pic16_FixRegisterBanking: improved logic that causes the insertion
6635         of bank switching,
6636         * InlineFunction: functions that are called once, are not any more
6637         inlined. This can be a port option in the future,
6638
6639         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6640
6641         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6642         hold the corresponding uninitialized symbols,
6643         * pic16_allocProcessorRegister: registers have explicit marked the
6644         accessBank field,
6645         * pic16_allocInternalRegister: registers are explicit marked as
6646         not used,
6647         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6648         processing list, so bit registers were lost,
6649         *
6650
6651         * ralloc.h: added field 'accessBank' and original symbol operand
6652         in register definition,
6653         * removed the field isMapped from register definition,
6654
6655         ** Several functions have been removed from various sources:
6656         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6657         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6658         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6659         pic16_assignRelocatableRegisters
6660
6661         ** others have been introduced:
6662         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6663         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6664
6665 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6666
6667         * support/scripts/inc2h.pl: changed definition of BIT_AT
6668         to emit 'sbit at' instead of 'bit at'. This was a request.
6669
6670         PIC16 port related preliminary changes:
6671         * gen.c: prefixed function popRegFromString with
6672         pic16_ and all references to it corrected
6673         * pcode.c: all pic16_pc_* hardware registers prefixed
6674         with underscore (_),
6675         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6676         * ralloc.c: newReg(): when register is REG_SFR then
6677         set address to rIdx,
6678         pic16_allocProcessorRegister(): marks register wasUsed=0
6679         pic16_writeUsedRegs(): added a call to assign processor
6680         registers via pic16_assignFixedRegisters
6681
6682 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6683
6684         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6685         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6686         variables in unused register banks.  Also the SSEG is placed
6687         wherever there is enough space for it, and IDATA can be anywhere
6688         in internal RAM.  For now compile using -Wl-Y[stack_size].
6689         The mem file is different for this option as well, since it
6690         makes no sense of talking about DSEG lenght.
6691
6692 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6693
6694         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6695         in certain cases, e.g. when ROM assignment, patch provided
6696         from Albert den Haan.
6697
6698 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6699
6700         Many signedness and type propagation fixes:
6701         * src/SDCCicode.c: made geniCodeCast() static
6702         replaced SPEC_ by IS_ (cosmetic)
6703         (operandOperation): fixed div and mod operation
6704         (usualBinaryConversions): added support for promotion of char
6705         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6706         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6707         (geniCodeAdd): an array index will stay unsigned, even if promoted
6708         from char to int
6709         (geniCodeArray): ditto
6710         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6711         * src/SDCCsymt.c (computeType): added more support for char;
6712         promotion of char is selectable by promoteCharToInt, fixed signedness
6713         for all cases
6714         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6715         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6716         * src/SDCCval (val*): replaced signedness calculation by
6717         computeType()
6718         rearranged if-branches (cosmetic)
6719         (valShift): added warning W_SHIFT_CHANGED
6720         (valCompare): fixed problem with different types
6721         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6722         * support/regression/tests/literalop.c: added many cases
6723         * support/regression/tests/ast_constant_folding.c: changed finally to
6724         'unsigned int'
6725         * .version: new year, new version: 2.3.7
6726         * src/SDCCmain.c (main): applied patch #866468
6727         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6728         provided by Scott Bronson
6729         * doc/sdccman.lyx: updated documentation for sdcdb
6730         updated and added chapter tips
6731
6732 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6733
6734         * src/SDCCsymt.h: missing from yesterday's commits
6735
6736 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6737
6738         * src/SDCC.y (struct_or_union_specifier),
6739         * support/Util/SDCCerr.c,
6740         * support/Util/SDCCerr.h: verify that struct & union tags are used
6741         as declared.
6742
6743 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6744
6745         * src/SDCCglobl.h: missing from yesterday's commits
6746
6747 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6748
6749         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6750         sft_attributes, struct_declaration, parameter_declaration,
6751         type_name, start_block, declaration_list),
6752         * src/SDCC.lex (check_type): support redefinition of typedef names
6753
6754 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6755
6756         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6757         aligned xdata arrays. Erik helped me with the if clause.
6758
6759 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6760
6761         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6762         warning
6763
6764 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6765
6766         * src/SDCCast.h,
6767         * src/SDCCast.c (newAst_),
6768         * src/SDCCicode.h,
6769         * src/SDCCicode.c (ast2iCode, newiCode),
6770         * src/SDCCglobl.h,
6771         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6772         expr, statement, expression_statement, selection_statement,
6773         iteration_statement, expr_opt, jump_statement): foundation for tracking
6774         sequence points
6775         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6776         point code too)
6777
6778 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6779
6780         * support/Util/SDCCerr.c,
6781         * src/SDCCast.h,
6782         * src/SDCCast.c (createCase, createDefault, decorateType),
6783         * src/SDCClabel.c (labelUnreach),
6784         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6785         to error messages.
6786         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6787         (with thanks to Stas Sergeev)
6788         * device/include/time.h,
6789         * device/lib/time.c (CheckTime): suppress unreachable code warning
6790
6791 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6792
6793         * src/SDCCast.c (createIvalCharPtr),
6794         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6795         bug #753752)
6796         * support/regression/tests/nullstring.c: tests for these two bugs
6797
6798 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6799
6800         * support/Util/SDCCerr.h,
6801         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6802         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6803         about storage class and 'at' used inside struct or union
6804         * src/SDCCBBlock.c (iCodeFromeBBlock),
6805         * src/SDCCcse.c (ifxOptimize),
6806         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6807         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6808         printIval, emitStaticSeg, emitOverlay),
6809         * src/SDCClabel.c (deleteIfx),
6810         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6811         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6812         gatherAutoInit, processParms),
6813         * support/Util/SDCCerr.h,
6814         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6815         reporting for post-parse errors.
6816
6817 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6818
6819         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6820         implicit casts via union; they don't work on big endian systems
6821         (possible fix for bug #861138)
6822
6823 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6824
6825         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6826         * src/mcs51/main.c: fixed the fix for bug #737001
6827
6828 2003-12-15  Borut Razem <borut.razem AT siol.net>
6829
6830         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6831
6832 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6833
6834         * support/makebin/makebin.c: put output in binary mode
6835
6836 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6837
6838         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6839         xdata and data memory on startup. Set the environment variable
6840         SDCC_NOGENRAMCLEAR to disable this.
6841         * src/mcs51/peephole.def,
6842         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6843         (allows non-interrupt and interrupt code to safely compete for a resource
6844         without the non-interrupt code having to disable interrupts)
6845
6846 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6847
6848         * src/SDCCicode.c (geniCodeAdd),
6849         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6850         with valFromType if type might be a pointer and host is big endian).
6851         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6852         types, not just integer types.
6853         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6854         multiply defined with mismatching "at" address.
6855
6856 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6857
6858         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6859         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6860         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6861         with embedded nulls (fixed bug #753752)
6862
6863 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6864
6865         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6866         Apparently this did not see much testing (endless loop)
6867
6868 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6869
6870         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6871
6872 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6873
6874         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6875         gracefully handle NULL memmap pointers
6876
6877 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6878
6879         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6880         instead of deleting the iCode when an operand is volatile
6881         * src/z80/gen.c (genDummyRead),
6882         * src/mcs51/gen.c (genDummyRead),
6883         * src/ds390/gen.c (genDummyRead),
6884         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6885         not just IC_RIGHT
6886         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6887         * src/SDCC.y: fixed bug #850420
6888
6889 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6890
6891         Applied z80 i/o port patch from Peter Townson and fixed some operators
6892         to better handle operands in A register.
6893         * device/include/z180.h
6894         * src/SDCC.y
6895         * src/SDCCglue.c
6896         * src/z80/gen.c
6897         * src/z80/gen.h
6898         * src/z80/main.c
6899         * src/z80/peeph-z80.def
6900         * src/z80/peeph.def
6901         * src/z80/z80.h
6902
6903 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6904
6905         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6906
6907 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6908
6909         * device/lib/hc08/_mullong.c: Removed extra #endif
6910
6911 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6912
6913         * sim/ucsim/hc08.src/inst.cc,
6914         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6915         carries from x to h
6916         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6917         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6918         * device/include/stdarg.h: fixed varargs for hc08
6919         * device/lib/Makefile.in,
6920         * device/lib/hc08/Makefile,
6921         * device/lib/hc08/_mulint.c,
6922         * device/lib/hc08/_mullong.c: fixed some endian problems
6923
6924 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6925
6926         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6927         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6928         * device/lib/_gptrget.c,
6929         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6930
6931 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6932
6933         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6934         * src/SDCCast.c (astErrors): fixed bug #846007
6935         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6936
6937 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6938
6939         * src/SDCCast.c (decorateType): disabled a transformation I added in
6940         revision 1.188 (access to fields of a structure at an absolute address);
6941         it breaks with bitfields, extern declarations, and gcse analysis.
6942         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6943         could be assigned through a pointer, so don't complain.
6944         * src/SDCCast.c (astErrors),
6945         * src/SDCCast.h,
6946         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6947
6948 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6949
6950         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6951         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6952         output of __config directives, since gpasm now supports them
6953         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6954         pre-processor macro, i.e. -DMCU=p18f452
6955         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6956         and modified to handle 'cast' icode similarly to '=' icode
6957         * src/pic16/device.h (typedef struct PIC_device): added field
6958         'extMIface' to indicate that chip has external memory interface
6959         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6960         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6961         18F8720
6962
6963 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6964
6965         * src/SDCC.y (pointer): fixed bug #846006
6966         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6967         * src/SDCCast.c (decorateType): fixed bug #846009
6968         * src/ds390/peeph.def,
6969         * src/ds390/gen.c (genAnd, genOr),
6970         * src/mcs51/peeph.def,
6971         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6972
6973 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6974
6975         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6976         * src/SDCCdflow.c
6977         * src/SDCCcse.c
6978         * src/SDCCcse.h
6979         * src/SDCCBBlock.h
6980         * src/SDCCBBlock.c
6981
6982 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6983
6984         fixed bug #845089
6985         * src/SDCCbitv.h,
6986         * src/SDCCbitv.c: added function to free a bitvector
6987         * src/SDCClrange.h,
6988         * src/SDCClrange.c: added function to recompute the liveranges
6989         * src/avr/ralloc.c,
6990         * src/ds390/ralloc.c,
6991         * src/hc08/ralloc.c,
6992         * src/mcs51/ralloc.c,
6993         * src/pic/ralloc.c,
6994         * src/pic16/ralloc.c,
6995         * src/xa51/ralloc.c,
6996         * src/z80/ralloc.c: recompute the liveranges after register packing
6997
6998 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6999
7000         * src/SDCCloop.c (newInduction): fixed bug #845630
7001
7002 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7003
7004         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7005         inadvertantly left behind from my 2003-11-12 change
7006
7007 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7008
7009         Updated headers I neglected to commit yesterday.
7010         * src/SDCClrange.h,
7011         * src/SDCCicode.h
7012
7013 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7014
7015         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7016         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7017         * src/SDCCopt.c (eBBlockFromiCode),
7018         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7019         the creation of the key hash table from the sequencing so it can be used
7020         earlier (for some GCSE bug fixes still pending)
7021
7022 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7023
7024         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7025         * support/regression/tests/addsub.c: testing genPlus shortcut
7026
7027 2003-11-15  Borut Razem <borut.razem AT siol.net>
7028
7029         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7030
7031 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7032
7033         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7034         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7035         ordering is immaterial.
7036         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7037
7038 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7039
7040         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7041         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7042         (SIGSEV) of bug #840381
7043         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7044         unlink new file before rename if new and old filenames are the same)
7045
7046 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7047
7048         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7049         uninitialized variables) for the mcs51. Set environment variable
7050         SDCC_GENRAMCLEAR to test.
7051         xdata initialization slightly shorter
7052
7053 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7054
7055         * src/SDCCsymt.h,
7056         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7057         #838241 & 780691 (basicly the same bug)
7058         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7059         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7060
7061 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7062
7063         * src/SDCCmain.c (linkEdit): "fix" #834252
7064
7065 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7066
7067         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7068         * src/SDCCast.h,
7069         * src/SDCC.y: fixed bug #819403
7070
7071 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7072
7073         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7074         the reentrant attribute.
7075         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7076         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7077         simulation
7078         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7079         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7080         erroneously reduced to a literal.
7081         * src/hc08/ralloc.c (packRegisters, rematStr),
7082         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7083         some cases
7084
7085 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7086
7087         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7088         * doc/sdccman.lyx: changed from 'article' to 'book'
7089         * doc/Makefile: readded test_suite_spec and cdbfileformat
7090
7091 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7092
7093         * device/include/stdlib.h: include malloc.h to comply with ANSI
7094         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7095
7096 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7097
7098         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7099         * doc/clean.mk: also remove *.out files
7100         * doc/sdccman.lyx: some additions, larger top/bottom margins
7101
7102 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7103
7104         * src/SDCC.y: fixed bug #837365
7105         * support/regression/tests/bitopcse.c
7106         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7107         a symbol (might be valop instead)
7108         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7109         * device/lib/clean.mk: added hc08 to the cleaning list
7110
7111 2003-11-04  Borut Razem <borut.razem AT siol.net>
7112
7113         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7114           made 2003-11-04
7115         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7116           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7117           malloc is declared in standard stdlib.h
7118
7119 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7120
7121         * device/lib/hc08/Makefile: need to clean .rel not .o files
7122         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7123
7124 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7125
7126         * src/port.h,
7127         * src/hc08/main.c,
7128         * src/mcs51/main.c,
7129         * src/ds390/main.c,
7130         * src/z80/main.c,
7131         * src/avr/main.c,
7132         * src/pic/main.c,
7133         * src/pic16/main.c,
7134         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7135         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7136         tests (which uses the port's oclsExpense function)
7137         * src/SDCC.y,
7138         * src/SDCCast.c,
7139         * src/SDCCicode.c,
7140         * src/hc08/gen.c,
7141         * src/ds390/gen.c,
7142         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7143
7144 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7145
7146         * src/SDCCcse.c (ifxOptimize),
7147         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7148         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7149         deleting the IFX iCode.
7150         * src/hc08/ralloc.c: reduced unneeded slocs
7151         * src/hc08/gen.c: fixed bug in asmopToBoolean
7152
7153 2003-11-04  Borut Razem <borut.razem AT siol.net>
7154
7155         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7156           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7157           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7158           transferred to configure
7159
7160 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7161
7162         Use headers defined in the C[++] standards:
7163         * sim/ucsim/gui.src/serio.src/fileio.cc
7164         * sim/ucsim/gui.src/serio.src/frontend.cc
7165         * sim/ucsim/gui.src/serio.src/main.cc
7166         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7167         * support/Util/NewAlloc.c
7168         * as/hc08/lklibr.c
7169         * as/mcs51/lklibr.c
7170         * as/z80/aslist.c
7171         * as/z80/assym.c
7172
7173 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7174
7175         * Added MSVC projects for hc08 assembler and linker:
7176         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7177         /as/hc08/link_hc08.dsp
7178
7179 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7180
7181         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7182
7183 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7184
7185         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7186
7187 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7188
7189         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7190
7191 2003-10-31  Borut Razem <borut.razem AT siol.net>
7192
7193         * support/cpp2/cpplib.h,
7194           support/cpp2/cpplib.c,
7195           support/cpp2/cpplex.c,
7196           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7197           to switch _asm block preprocessing on / off. Default is
7198           #pragma preproc_asm +
7199
7200 2003-10-31  Borut Razem <borut.razem AT siol.net>
7201
7202         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7203           when outputting comment blocks (when executed with -C option) and
7204           _asm (SDCPP specific) blocks
7205
7206 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7207
7208         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7209
7210 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7211
7212         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7213
7214 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7215
7216         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7217         * src/SDCCast.c (decorateType): fixed bug #832664
7218
7219 2003-10-31  Borut Razem <borut.razem AT siol.net>
7220
7221         * support\cpp2\cpplex.c: fixed for SDCPP:
7222           comments(when executed with -C option) and _asm blocks
7223           were included even if they where in skipped #if block.
7224           Applied solution from GCC cpp 3.3.2
7225
7226 2003-10-31  Borut Razem <borut.razem AT siol.net>
7227
7228         * src/SDCC.lex: sdcc now understands both formats:
7229           '# <line_number> <file_name>' and
7230           '#line <line_number> <file_name>'
7231         * support/cpp2/cppmain.c: sdcpp now generates the standard
7232           '# <line_number> <file_name>' instead of former
7233           '#line <line_number> <file_name>'
7234
7235 2003-10-30  Borut Razem <borut.razem AT siol.net>
7236
7237         * support/cpp2/cpphash.h,
7238         * support/cpp2/cpplib.h
7239         * support/cpp2/cpplex.c,
7240         * support/cpp2/cppmain.c,
7241         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7242
7243 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7244
7245         Fixed a number of problems revealed by bug #827883.
7246         * src/SDCCloop.c (loopInvariants): Spill location of the
7247         result operand should be recomputed if extracted from
7248         a loop. Also, don't extract assignments of an iTemp
7249         from a literal.
7250         * src/SDCCast.c (isConformingBody): loop reversal should
7251         not occur if the control variable is involved with a
7252         relational operator.
7253
7254 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7255
7256         * .version: bumped to 2.3.6 to reflect the big improvements
7257         made by Erik and Klaus. Thanks!
7258
7259 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7260
7261         Replaced the livrange code.
7262         * src/SDCClrange.c: added new LR code
7263         * src/SDCCloop.c,
7264         * src/SDCCBBlock.h: removed remainig parts from old LR code
7265         * src/ds390/ralloc.c,
7266         * src/ds390/gen.c: minor fixes to make it work with new code
7267
7268 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7269
7270         * as/hc08/asm.h,
7271         * as/hc08/lkrloc.c,
7272         * src/hc08/gen.c,
7273         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7274         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7275         (tweaked fix for bug #818696)
7276
7277 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7278
7279         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7280
7281 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7282
7283         * src/SDCCmain.c,
7284         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7285         * src/mcs51/gen.c (gencjneshort),
7286         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7287         more efficient (per Scott Bronson's suggestion)
7288
7289 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7290
7291         Extended the semantics of the critical keyword to include
7292         individual statements. See RFE #827755 and #799831
7293         * src/SDCC.y
7294         * src/SDCCicode.c
7295         * src/SDCCopt.c
7296         * src/SDCCast.c
7297         * support/Util/SDCCerr.c
7298         * support/Util/SDCCerr.h
7299         * src/mcs51/gen.c
7300         * src/ds390/gen.c
7301         * src/hc08/gen.c
7302
7303 2003-10-19  Borut Razem <borut.razem AT siol.net>
7304
7305         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7306
7307 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7308
7309         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7310         Fixed bug #818696
7311         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7312         and predecrement operand is displayed
7313
7314 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7315
7316         * src/SDCCval.c (valMinus): fixed bug #826041
7317
7318 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7319
7320         Some hc08 related updates that I missed earlier
7321         * sim/ucsim/stypes.h
7322         * support/regression/ports/hc08/spec.mk
7323
7324 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7325
7326         New target "hc08" for the Motorola 68hc08 family of micros
7327
7328         * configure
7329         * configure.in
7330         * Makefile
7331         * src/hc08/*
7332         * src/SDCCmain.c
7333         * src/port.h
7334         * sim/ucsim/hc08.src/*
7335         * sim/ucsim/configure.in
7336         * src/ucsim/configure
7337         * sim/ucsim/packages_in.mk
7338         * as/hc08/*
7339         * as/Makefile
7340         * device/include/mc68hc908qy.h
7341         * device/lib/hc08/*
7342         * device/lib/Makefile.in
7343         * support/regression/ports/hc08/*
7344         * support/regression/Makefile
7345
7346 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7347
7348         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7349         regression test
7350         * src/ds390/gen.c (genCast): fixed bug #821957
7351
7352 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7353
7354         * device/lib/logf.c: "fixed" overlay bug
7355         * support/regression/ports/host/spec.mk: added m library
7356         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7357         * support/regression/tests/float_trans: added (for Eric)
7358
7359 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7360
7361         * src/mcs51/gen.c (genCpl): fixed bug
7362         http://sf.net/mailarchive/message.php?msg_id=6263915
7363
7364 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7365
7366         * src/SDCCast.c (decorateType): added extended constant folding
7367         * src/SDCCsymt.c (computeType): cleanup
7368         * src/SDCCval.c (valShift): minor optimization
7369         * support/regression/tests/ast_constant_folding.c: added
7370
7371 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7372
7373         * src/SDCCmain.c: removed some unintended changes
7374
7375 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7376
7377         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7378         * src/z80/gen.c: fixed part of bug #817589
7379         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7380
7381 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7382
7383         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7384         * src/SDCCcflow.c
7385         * src/SDCCcse.c
7386         * src/SDCCdflow.c
7387         * src/SDCClabel.c
7388         * src/SDCClrange.c
7389         * src/SDCCmem.c
7390         * src/SDCCopt.c
7391         * src/SDCCpeeph.c
7392         * src/SDCCset.c
7393         * src/avr/ralloc.c
7394         * src/ds390/ralloc.c
7395         * src/izt/ralloc.c
7396         * src/mcs51/ralloc.c
7397         * src/pic/ralloc.c
7398         * src/pic16/ralloc.c
7399         * src/xa51/ralloc.c
7400         * src/z80/ralloc.c
7401         * src/z80/gen.c: removed unused label "release:"
7402
7403 2003-10-06  Borut Razem <borut.razem AT siol.net>
7404
7405         * src/SDCC.lex: removed definition of unused variables
7406           save_optimize and save_options
7407
7408 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7409
7410         * clean.mk: removed '=' in "-maxdepth=1"
7411         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7412         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7413
7414 2003-10-06  Borut Razem <borut.razem AT siol.net>
7415
7416         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7417           my_unput() replaced by unput()
7418
7419 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7420
7421         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7422         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7423         type-punned pointer will break strict-aliasing rules"
7424         Old LR behaviour is again default; Klaus' LR can be choosen by
7425         defining the environment variable LRKLAUS
7426         * src/SDCCBBlock.h
7427         * src/SDCCloop.c
7428         * src/SDCClrange.c
7429         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7430         * clean.mk: fixed removal of files in bin/CVS/
7431         * device/lib/clean.mk: fixed removal of directories small and large
7432         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7433         * src/SDCCicode.c,
7434         * src/SDCCval.c: removed superflous test for pedantic
7435
7436 2003-10-05  Borut Razem <borut.razem AT siol.net>
7437
7438         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7439           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7440           message "unmatched #pragma SAVE and #pragma RESTORE"
7441
7442 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7443
7444         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7445           assembly, critical functions, atomic, nojtbound)
7446
7447 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7448
7449         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7450         * src/SDCCBBlock.h
7451         * src/SDCCloop.c
7452         * src/SDCCloop.h
7453         * src/SDCClrange.c
7454
7455 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7456
7457         * src/z80/gen.h,
7458         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7459         * src/mcs51/gen.h
7460         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7461         * src/ds390/gen.h
7462         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7463         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7464         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7465
7466 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7467
7468         * src/z80/gen.c (genRet): fixed bug #524753
7469         * src/z80/gen.c (genCast): fixed internal error on cast from
7470         pointer to long
7471         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7472         fix for bug #477835 to the z80
7473         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7474         for tracking iCodes in the peephole optimizer for z80
7475
7476 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7477
7478         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7479         the other part of bug #814548
7480         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7481
7482 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7483
7484         * src/SDCCcse.c: fixed part of bug #814548
7485
7486 2003-09-28  Borut Razem <borut.razem AT siol.net>
7487
7488         * src/asm.c: rewrite of printILine() to use temporary file instead
7489           a pipe
7490         * src/xa51/main.c: commented out declaration of int rewinds
7491
7492 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7493
7494         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7495
7496 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7497
7498         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7499         * src/asm.c (printILine): Fixed bug #811015
7500
7501 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7502
7503         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7504         freeing.
7505
7506 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7507
7508         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7509         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7510         to correctly handle general case of AOP_PAIRPTR
7511         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7512
7513 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7514
7515         * src/mcs51/ralloc.c (fillGaps),
7516         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7517         register positioning bug)
7518
7519 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7520
7521         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7522
7523 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7524
7525         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7526         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7527         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7528         (ralloc doesn't intentionally do this now, but perhaps later)
7529         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7530         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7531         register positioning bugs (Fixed bug #762602 and #795325)
7532         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7533         (Fixed bug #808779)
7534         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7535         lines that --i-code-in-asm generates
7536
7537 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7538
7539         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7540         trying to fclose a FILE* that was already closed.
7541
7542 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7543
7544         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7545         of const struct should be treated as if const themselves)
7546
7547 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7548
7549         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7550
7551 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7552
7553         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7554         Unix (/n) and DOS (/r/n) line terminations.
7555
7556 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7557
7558         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7559         bug #613775
7560
7561 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7562
7563         * src/mcs51/gen.c (genFunction, genEndFunction),
7564         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7565         and restore of EA so that stack offsets to parameters are
7566         correct when using both critical and reentrant/stack-auto.
7567         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7568         size (can be triggered in error if sloc is shared between
7569         different sized objects)
7570         * device/include/float.h: fixed macros to explicitly use
7571         unsigned long where needed
7572
7573 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7574
7575         Feature req. 799831: added code to allow nesting of critical functions
7576         * src/mcs51/gen.c (genFunction, genEndFunction)
7577         * src/ds390/gen.c (genFunction, genEndFunction)
7578
7579 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7580
7581         * src/SDCCsymt.c (sclsFromPtr),
7582         * src/SDCCsymt.h,
7583         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7584         support for standard C idiom of memory mapped variables; for
7585         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7586         to xdata int at 0x1234 tempvar = 1.
7587         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7588         provided by Akiya ISHIDA
7589
7590 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7591
7592         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7593         * src/SDCCval.c (constVal): added reduction from int to char
7594         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7595         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7596         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7597         to ignore the sign
7598         * support/regression/tests/shifts.c: fixed
7599
7600 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7601
7602         * src/z80/gen.c (genXor): Fixed bug #805445
7603
7604 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7605
7606         Fixed bug #621531 (const & volatile confusion in the type chain).
7607         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7608         refer to the const or volatile state of the pointer itself.
7609
7610         * src/SDCCast.c
7611         * src/SDCCglue.c
7612         * src/SDCCicode.c
7613         * src/SDCCsymt.c
7614         * src/SDCCval.c
7615         * src/SDCC.y
7616         * src/SDCCsymt.h
7617         * src/pic/gen.c
7618         * src/pic/ralloc.c
7619         * src/pic16/gen.c
7620         * src/pic16/ralloc.c
7621         * support/regression/tests/const.c
7622
7623 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7624
7625         When checking for duplicated modules, use absolute paths
7626         instead of relative paths.  Files changed:
7627
7628         * as/mcs51/lklib.c
7629         * link/z80/lklib.c
7630
7631 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7632
7633         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7634
7635 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7636
7637         * device/include/string.h: added size_t typedef, changed
7638         prototypes to use size_t, eliminated separate reentrant and
7639         non-reentrant declarations, added _memmove declaration
7640         * device/lib/_memcpy.c: changed to use size_t instead of int,
7641         changed /4 to >>2 to avoid division library call
7642         * device/lib/_memcmp.c,
7643         * device/lib/_memset.c,
7644         * device/lib/_strncat.c,
7645         * device/lib/_strncpy.c,
7646         * device/lib/_strncmp.c: changed to use size_t instead of int
7647         * device/lib/_memmove.c: new file (fixed bug #772294)
7648         * device/lib/Makefile.in: added _memmove.c
7649         * device/lib/z80/asm_strings.s: fixed bug #772290
7650         * support/regression/tests/bitfields.c: attempt to fix host assertion
7651         failure on amd64-unknown-linux2.2
7652
7653 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7654
7655         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7656         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7657         * as/z80/asmain.c (main): fixed bug #801766
7658
7659 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7660
7661         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7662         compilers
7663
7664 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7665
7666         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7667         reported in bug #800609
7668
7669 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7670
7671         * Top header beautifications in src/pic16 directory:
7672           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7673           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7674           pcoderegs.h, ralloc.c, ralloc.h
7675         * main.c: added top header and GPL license notice
7676         * pcode.c: fixed the if-conditional warning
7677
7678 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7679
7680         * device/lib/_mullong.c: replaced int by short for gcc
7681
7682 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7683
7684         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7685         and JUMPTABLE iCodes properly now (worked by accident before)
7686         * src/mcs51/gen.c (leftRightUseAcc),
7687         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7688         iCode properly now. Use getSize instead of nRegs since a & b
7689         aren't part of the nRegs tally.
7690
7691 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7692
7693         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7694         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7695           before instructions that use the _STATUS register
7696
7697 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7698
7699         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7700         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7701         fetching of the pointer
7702         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7703         copied from genNearPointerSet()
7704         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7705         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7706         If they pop r0/r1 they must be called in the opposite order than aopOp().
7707         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7708         (resp. --stack-auto), prepared for --xstack
7709
7710 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7711
7712         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7713
7714 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7715
7716         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7717         these ports have their own __sdcc_external_start()
7718
7719 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7720
7721         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7722         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7723         type for bits was changed. It resulted in bit variables becoming
7724         global, which is not permitted in PIC 14 assembly output.
7725
7726 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7727
7728         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7729
7730 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7731
7732         Z80 and MCS51 linkers complaint if a public symbol is defined
7733         in more than one library module:
7734
7735         * as/mcs51/lklib.c
7736         * link/z80/lklib.c
7737         * as/mcs51/Makefile.in
7738
7739 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7740
7741         A few small changes that speed up the peephole optimizer.
7742
7743         * src/SDCCpeeph.c
7744
7745 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7746
7747         Try to make the peephole optimizer smarter by maintaining
7748         an association between the assembly source code and the
7749         iCodes that originated them. Put this information to use
7750         with a new peephole rule condition "notVolatile" so that
7751         the rules can be aggressive yet still safe.
7752
7753         * src/SDCCpeeph.c
7754         * src/SDCCpeeph.h
7755         * src/mcs51/gen.c
7756         * src/mcs51/peeph.def
7757
7758 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7759
7760         Fixed bug #741761
7761
7762         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7763         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7764         if the left or right operand symbols have the accuse flag set.
7765
7766 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7767
7768         Changed the type of the result of the ! (NOT) operator to char;
7769         previously it returned the same type as the source. This allows
7770         us to eliminate all the genFloatNot functions (all of its target
7771         implementations were very buggy) since !float can use the same
7772         code as !long now.
7773
7774         * src/SDCCicode.c (ast2iCode): ! returns char
7775         * src/mcs51/gen.c (genNot, genNotFloat),
7776         * src/ds390/gen.c (genNot, genNotFloat),
7777         * src/z80/gen.c (genNot, genNotFloat),
7778         * src/pic/gen.c (genNot, genNotFloat),
7779         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7780
7781 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7782
7783         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7784         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7785            during interrupts. Ensure WSAVE is located at a shared bank address.
7786         2. Fixed page selection in some places
7787         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7788            the registers name strings.
7789         4. Fixed "signed / unsigned compare" compiler warnings.
7790         5. The PIC port manages its own allocation of the general purpose
7791            registers, but makes no attempt to reuse them. As a result when
7792            compiling it soon runs out of general purpose registers. Some
7793            additional code was added to the files pcode.c and device.c to walk
7794            through the function call tree and rename the registers so that they
7795            get reused.
7796
7797         * src/pic/device.c
7798         * src/pic/gen.c
7799         * src/pic/glue.c
7800         * src/pic/pcode.c
7801         * src/pic/pcode.h
7802         * src/pic/ralloc.c
7803         * src/pic/ralloc.h
7804         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7805         genPlus() & genMinus() when the result is the same as left or right
7806
7807 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7808
7809         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7810
7811 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7812
7813         Made bitfield a distinct type from bit so that bitfields
7814         convert as per ANSI C and bits retain their traditional
7815         boolean style behaviour. Implemented bitfield support in
7816         the z80 port.
7817
7818         * src/SDCCsymt.h,
7819         * src/SDCCsymt.c,
7820         * src/SDCCast.c,
7821         * src/cdbFile.c,
7822         * src/mcs51/gen.c,
7823         * src/ds390/gen.c: bit v bitfield split
7824         * src/z80/gen.c: New support for bitfields
7825         * support/regression/tests/bitfields.c: reenabled z80,
7826         added more tests
7827
7828 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7829
7830         Rules 246.x, 247.x relate to bitfields, the others speed up
7831         access to xdata mapped I/O devices.
7832
7833         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7834
7835 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7836
7837         Cleaned up genPackBits and genUnpackBits and added two helper
7838         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7839         for literal assignments in genPackBits (thanks to Frieder for
7840         reminding me).
7841
7842         * src/mcs51/gen.c
7843         * src/ds390/gen.c
7844
7845 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7846
7847         Fixed bug #748310 (pointer to function type mishandled when the
7848         function name is omitted). Also fixed a SIGSEGV when a function
7849         attribute (reentrant, etc) is used on a non-function or on a
7850         function but misplaced before the parameter list.
7851
7852         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7853         bug #748310
7854         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7855         * support/Util/SDCCerr.h,
7856         * support/Util/SDCCerr.c: Added func attr misuse error msg
7857
7858 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7859
7860         Fixed bug #787649 by anonymous
7861         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7862         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7863
7864 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7865
7866         Fixed numerous bitfield problems.
7867
7868         * src/SDCC.y: More bitfield related error checking
7869         * src/SDCCsymt.h,
7870         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7871         * support/Util/SDCCerr.h,
7872         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7873         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7874         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7875         * support/regression/tests/bitfields.c: tests added
7876
7877 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7878
7879         Made the constant following the "interrupt" keyword optional. If
7880         omitted, the function will not automatically be given an entry
7881         in the interrupt vector table (similar to #pragma NOIV, but
7882         less syntacticly kludgy). The interrupt number is also now
7883         range checked. Also fixed a bug in the high order bit example
7884         in the manual.
7885
7886         * src/SDCC.y
7887         * src/SDCCmem.c
7888         * src/SDCCglue.c
7889         * src/SDCCsymt.h
7890         * support/Util/SDCCerr.c
7891         * support/Util/SDCCerr.h
7892         * doc/sdccman.lyx
7893
7894 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7895
7896         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7897         * src/SDCCicode.c (operandOperation): rewritten some ops
7898         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7899         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7900         other type
7901         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7902         be re-activated by defining REDUCE_LITERALS)
7903         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7904         unsigned, but are signed by default
7905         * src/SDCCval.c (constVal): rearranged
7906         * src/SDCCval.c (valMod): preliminary fix
7907         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7908         * support/regression/literalop.c: added, work in progress
7909
7910 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7911
7912         Generate warnings for useless declarations like "char data;"
7913         that don't do what new users expect.
7914
7915         * src/SDCC.y
7916         * support/Util/SDCCerr.h
7917         * support/Util/SDCCerr.c
7918
7919 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7920
7921         * src/SDCCval.c (valMult): fix overflow detection of negative int
7922
7923 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7924
7925         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7926
7927         Changes to support big endian targets:
7928
7929         * src/ports.h
7930         * src/SDCCglue.c
7931         * src/avr/main.c
7932         * src/ds390/main.c
7933         * src/izt/i186.c
7934         * src/mcs51/main.c
7935         * src/pic/main.c
7936         * src/pic16/main.c
7937         * src/xa51/main.c
7938         * src/z80/main.c
7939
7940 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7941
7942         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7943         * device/lib/time.c: fixed warning "integer overflow in expression"
7944
7945 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7946
7947         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7948         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7949         constants are unsigned; added recognition of "u" flag for unsigned
7950         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7951         * src/SDCCval.c (valDiv, valMod): fixed signdness
7952         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7953         signedness of modulo, left and right shift
7954         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7955         * support/Util/SDCCerr.h: added warning W_INT_OVL
7956         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7957         * src/SDCCast.c (ast_print): improved output of constants
7958
7959 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7960
7961         Fixed some warnings when building with MSVC:
7962
7963         * as\mcs51\asdata.c
7964         * as\z80\asdata.c
7965         * as\mcs51\asm.h
7966         * as\z80\asm.h
7967         * link\z80\aslink.h
7968         * link\z80\lkdata.c
7969         * link\z80\lkeval.c
7970         * link\z80\lkgb.c
7971         * link\z80\lkihx.c
7972         * link\z80\lks19.c
7973         * link\z80\lksym.c
7974         * support\cpp2\cpplib.c
7975         * src\ds390\gen.c
7976         * src\mcs51\gen.c
7977
7978 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7979
7980         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7981
7982 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7983
7984         * support\librarian\clean.mk: Do not remove Makefile.
7985         * support\librarian\Makefile: added.
7986
7987 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7988
7989         Added librarian to MSVC build:
7990         * all.dsp
7991         * sdcc.dsw
7992         * support\librarian\librarian.dsp
7993
7994         'configure' not needed for librarian, removed:
7995         * support\librarian\configure
7996         * support\librarian\configure.in
7997         * support\librarian\config_in.h
7998         * support\librarian\Makefile.in
7999
8000         Hopefully these ones built the librarian and the rest of sdcc properly:
8001         * Makefile
8002         * Makefile.common.in
8003
8004         Messed up 'configure', so revert to previous version:
8005         * configure
8006         * configure.in
8007
8008 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8009
8010         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8011         there, while the mantissa of a double is "only" 53 bits wide.
8012
8013 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8014
8015         Adding sdcclib to the build.  MSVC project coming soon.
8016         Files added/changed:
8017
8018         * support\librarian\clean.mk
8019         * support\librarian\configure
8020         * support\librarian\configure.in
8021         * support\librarian\config_in.h
8022         * support\librarian\Makefile.bcc
8023         * support\librarian\Makefile.in
8024         * support\librarian\sdcclib.c
8025         * Makefile.bcc
8026         * Makefile
8027         * Makefile.common.in
8028         * configure
8029         * configure.in
8030
8031 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8032
8033         Linker now complaints if linked modules have conflicting options, for
8034         example, one compiled using --model-large and another one compiled with
8035         --model-small.  The following files were modified:
8036
8037         * as\mcs51\asdata.c
8038         * as\mcs51\aslink.h
8039         * as\mcs51\asm.h
8040         * as\mcs51\asmain.c
8041         * as\mcs51\asout.c
8042         * as\mcs51\i51pst.c
8043         * as\mcs51\lkdata.c
8044         * as\mcs51\lklibr.c
8045         * as\mcs51\lkmain.c
8046         * as\z80\asdata.c
8047         * as\z80\asm.h
8048         * as\z80\asmain.c
8049         * as\z80\asout.c
8050         * as\z80\z80pst.c
8051         * link\z80\aslink.h
8052         * link\z80\lkdata.c
8053         * link\z80\lklibr.c
8054         * link\z80\lkmain.c
8055         * src\SDCCglue.c
8056
8057 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8058
8059         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8060         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8061
8062 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8063
8064         * src/z80/mappings.i: fix _mul[us][int,long] entries
8065
8066 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8067
8068         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8069
8070 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8071
8072         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8073         * support/regression/tests/bitopcse.c: added
8074         fixed warning:
8075         * src/avr/gen.c:
8076         * src/pic/gen.c:
8077         * src/pic16/gen.c:
8078         * src/z80/gen.c:
8079         * src/xa51/gen.c:
8080
8081 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8082
8083         added support for new library format to z80, gbz80 linkers:
8084         *link/z80/aslink.h
8085         *link/z80/lklex.c
8086         *link/z80/lklib.c
8087         *link/z80/lklist.c
8088
8089 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8090
8091         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8092         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8093
8094 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8095
8096         added DUMMY_READ_VOLATILE:
8097         * src/SDCC.y:
8098         * src/avr/gen.c:
8099         * src/xa51/gen.c:
8100         * src/z80/gen.c:
8101         * src/pic/gen.c:
8102         * src/pic16/gen.c:
8103         * src/mcs51/gen.c:
8104         * src/ds390/gen.c:
8105         * src/SDCCcse.c (algebraicOpts): many improvements
8106         * src/SDCCcse.h: removed algebraicOpts()
8107         * src/SDCCicode.c (picDummyRead): added
8108
8109 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8110
8111         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8112         "Insufficient space in data memory".
8113
8114 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8115
8116         * src/mcs51/gen.c: fixed bug #771358
8117         * src/z80/gen.c: fixed bug #759087
8118
8119 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8120
8121         * src/pic16/glue.c: minor cleanup by Vangelis
8122
8123 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8124
8125         * device/include/regc515c.h: fixed #758477
8126         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8127         * device/lib/_gptrput.c: saved a few bytes
8128         * my tab spacing is 8, yours too?)
8129         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8130         * device/lib/serial.c: process RX bytes earlier than TX bytes
8131         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8132
8133 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8134
8135         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8136
8137 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8138
8139     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8140
8141 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8142
8143         * device/lib/Makefile.in: bad fix, reverted to 1.43
8144
8145 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8146
8147         * device/lib/Makefile.in: added missing z80 object files
8148
8149 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8150
8151         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8152         pic16 progress by Vangelis:
8153         * src/SDCCglobl.h:
8154         * src/SDCCmain.c:
8155         * src/pic/Makefile:
8156         * src/pic:
8157         * pic/Makefile:
8158         * pic16/device.c:
8159         * pic16/device.h:
8160         * pic16/gen.c:
8161         * pic16/gen.h:
8162         * pic16/genarith.c:
8163         * pic16/glue.c:
8164         * pic16/main.c:
8165         * pic16/pcode.c:
8166         * pic16/pcode.h:
8167         * pic16/pcodepeep.c:
8168         * pic16/peeph.def:
8169
8170 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8171
8172     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8173
8174 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8175
8176     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8177     added gbz80 build to MSVC project.
8178     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8179     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8180     from 8051 stuff and setup so it links using a .lnk file.
8181
8182 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8183
8184     * support/librarian/sdcclib.c: sdcc librarian.
8185     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8186     with sdcclib.
8187
8188 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8189
8190     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8191
8192 2003-07-02  Borut Razem <borut.razem AT siol.net>
8193
8194         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8195         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8196         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8197         src/xa51/main.c, src/z80/main.c:
8198         virtualization of glue() function: each port has it's own glue function,
8199         which is accessed by do_glue function pointer in PORT.general structure
8200
8201 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8202
8203         * DS800C400 fun, improved ROM interface and tinibios.
8204
8205 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8206
8207         * More support for DS80C400. Now includes beginning of interface to ROM.
8208
8209 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8210
8211         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8212
8213 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8214
8215         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8216
8217 2003-06-19  Borut Razem <borut.razem AT siol.net>
8218
8219         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8220
8221 2003-06-19  Borut Razem <borut.razem AT siol.net>
8222
8223         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8224         fixed Z80 port - crt0.o: cannot open.
8225
8226 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8227
8228         * support/Util/MySystem.c (merge_command): revert bad fix
8229
8230 2003-06-18  Borut Razem <borut.razem AT siol.net>
8231
8232         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8233
8234 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8235
8236         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8237         option --use-stdout sends errors to stdout instead of stderr.
8238
8239 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8240
8241         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8242
8243 2003-06-15  Borut Razem <borut.razem AT siol.net>
8244
8245         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8246         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8247         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8248         fixed width array of pointers replaced with sets;
8249         multiple include and lib paths ared transferred to preprocessor and linker
8250         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8251         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8252         fixed width array of pointers
8253         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8254         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8255         fixupPath(), getPathDifference()
8256         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8257         fixed width array of pointers
8258
8259 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8260
8261         * src/pic16/ralloc.c: fix warnings
8262         * src/pic16/pcode.c: fix warning
8263
8264 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8265
8266          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8267         know all the details, but essentially this set of changes enable
8268         the pic16 port to generate movff instructions and generate assembler
8269         directives,
8270         * src/SDCCmain.c:
8271         * src/pic16/gen.c:
8272         * src/pic16/glue.c:
8273         * src/pic16/pcode.c:
8274         * src/pic16/device.c:
8275         * src/pic16/main.c:
8276         * src/pic16/pcode.h:
8277         * src/pic16/pcoderegs.c:
8278         * src/pic16/ralloc.c:
8279         * src/pic16/ralloc.h:
8280
8281 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8282
8283         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8284         added option --vc, so sdcc errors and warnings are compatible with
8285         Microsoft Visual Studio.
8286
8287 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8288
8289         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8290           device/lib/libfloat.lib: added atof function.
8291
8292 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8293
8294         * doc/sdccman.lyx: updated to Lyx 1.3
8295         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8296         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8297         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8298
8299 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8300
8301         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8302
8303 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8304
8305         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8306           additions to the "related tools/documentation" section
8307
8308 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8309
8310         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8311
8312 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8313
8314         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8315         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8316
8317 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8318
8319         * doc/sdccman.lyx: fix double dash and other minor things
8320         * doc/Makefile: fix double dash
8321
8322 2003-05-28  Karl Bongers(patches from Martin Helmling)
8323         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8324           condition and ignore commands.
8325
8326 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8327
8328         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8329           is in parts still quite out of date, I did changes as far as I felt makes sense
8330           for a non-native english speaker.
8331           Please feel free to add to the manual or to correct my changes.
8332         * doc/Makefile: undid touching the date of intermediate tex files.
8333
8334 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8335
8336         * doc/sdccman.lyx: Manual has an index now
8337
8338 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8339
8340         Finalize muluint/mulsint and mululong/mulslong merging:
8341         * device/lib/_mulint.c
8342         * device/lib/_mullong.c
8343         * device/lib/gbz80/mul.s
8344         * device/lib/gbz80/stubs.s
8345         * device/lib/z80/mul.s
8346         * device/lib/z80/stubs.s
8347         * src/SDCCsymt.c (initCSupport)
8348
8349 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8350
8351         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8352         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8353           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8354           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8355           instead of /Zm500.
8356
8357 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8358
8359         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8360           the regression tests I'm not brave enough to enable 245.b, 245.c
8361         * doc/sdccman.lyx: added latex preamble for hyperref package.
8362           Using pdflatex this will give you a hyperlinked pdf file with
8363           bookmarks. (prepend '%' before /usepackage if this breaks something)
8364
8365 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8366
8367          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8368
8369 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8370
8371         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8372
8373 2003-05-21    <johan AT balder>
8374
8375         * src/SDCCglue.c (printIval): fixed bug #739934
8376
8377 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8378
8379         Applied patch from bug 737905 (renamed yylineo to mylineno):
8380         * src/altlex.c
8381         * src/SDCCast.c
8382         * src/SDCglobl.h
8383         * src/SDCC.lex
8384         * src/SDCCsymt.c
8385         * src/SDCCval.c
8386         * src/pic16/pcode.c: Cleaned warnings
8387         * src/pic16/pcodeflow.c: Cleaned warnings
8388         * src/pic16/pcoderegs.c: Cleaned warnings
8389
8390 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8391
8392         * src/pic16/pcode.c: Cleaned warnings
8393         * src/pic16/pcodepeep.c: Cleaned warnings
8394         * src/pic16/ralloc.c: Cleaned warnings
8395
8396 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8397
8398         * doc/sdccman.lyx: fixed bug 739745
8399         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8400
8401 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8402
8403         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8404         it can be defined with CFLAGS when running configure
8405         * src/SDCCmain.c: fixed compiling + linking with object files
8406
8407 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8408
8409         * configure.in: configure for pic16 port,
8410             added --disable-pic16-port
8411         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8412         * src/SDCCmain.c: linkOptions is changed to set *,
8413             added if/endif conditional macros to remove options help
8414             messages from optionsTable when a port is not configured, added
8415             support for the PIc16 port in the ports table, when executing
8416             the compiler with no port specified on command line, a default
8417             port is selected with the new macro DEFAULT_PORT which is
8418             defined in port.h, in setDefaultOptions() linkOptions is removed
8419             from initialization assignment, since now it is a set,
8420             parseCmdLine uses setParseWithComma for linkOptions, in
8421             linkEdit() linkOptions are accessed with new function indexSet()
8422             which returns the i'th item of a set variable. See SDCCset.c, in
8423             linkEdit() when calling buildCmdLine(), added linkOptions as
8424             last argument. Now users can pass arguments to gplink via the
8425             -Wl option, main() uses pic16glue() to glue up pic16 programs
8426         * src/SDCCpeeph.c: various changes to support pic16
8427         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8428             return the i'th item of the set
8429         * src/SDCCset.h: added function prototype for indexSet()
8430         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8431         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8432         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8433             added macro DEFAULT_PORT
8434         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8435         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8436             generated
8437         * src/pic16/glue.c: commented out some error producing lines
8438         * src/pic16/main.c: __config directives are commented out to stop
8439             gpasm complaining and test the linkage with gplink, _linkCmd and
8440             _asmCmd changed to be more gplink and gpasm friendly
8441         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8442             produced an error when parsed, peep rule 12 is added to utilize
8443             movff, but it is commented out since the pCode does not support
8444             yet a command with 2 address arguments
8445
8446 2003-05-18    <johan AT balder>
8447
8448         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8449         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8450 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8451
8452         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8453   Added feature to script commands from file.
8454
8455 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8456
8457         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8458         * src/SDCCutil.c: include ctype.h for win32
8459
8460 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8461
8462         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8463
8464 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8465
8466         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8467   Fixed so you can set breakpoints prior to run, run does not stop
8468   on entry now.  Add tbreak.  Other enhancements and fixes for use
8469   with ddd.
8470
8471 2003-05-12  Borut Razem <borut.razem AT siol.net>
8472
8473         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8474
8475 2003-05-11  Borut Razem <borut.razem AT siol.net>
8476
8477         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8478         the path of bin directory, so that PATH is the only env. variable, which has to be set
8479         in case of standard installation.
8480         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8481         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8482         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8483
8484 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8485
8486         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8487         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8488         temp files are in the port dir; clean the gen/test directory when
8489         generating new test.c
8490         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8491         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8492         * support/regression/tests/zeropad.c: added
8493
8494 2003-05-09    <johan AT balder>
8495
8496         * src/SDCCglue.c: fixed bug #597940
8497
8498 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8499
8500         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8501   cache sfr, optimize next,step, fix off by one sourceline,
8502   support ddd list function.
8503         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8504
8505 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8506
8507         * support/regression/HTMLgen.py: added compare_s2f()
8508         * support/regression/Makefile: redo 1.27
8509         * support/regression/generate-cases.py: redo 1.5
8510
8511 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8512
8513         * support/regression/tests/float.c: workaround 33 bit hex constant
8514         * support/regression/tests/simplefloat.c: fix division for host
8515
8516 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8517
8518         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8519         that tame's the PIC's over-aggressive optimizer.
8520
8521 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8522
8523          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8524          support for MSVC.
8525
8526 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8527
8528         Initial support for DS80C400. "Hello world" runs on TINIm400
8529         (with polled I/O).
8530
8531 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8532
8533          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8534          * Some notes on ddd usage added in debugger/README
8535          Martin Helmling adding more features and fixes for ddd GUI debugger.
8536          Code added for nexti, stepi, up, down, and other adjustments.
8537
8538 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8539
8540         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8541         * src/pic/peeph.def Added two rules to optimize carry manipulation
8542         * src/pic/* removed debug printfs
8543
8544 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8545
8546         * debugger/mcs51/cmd.c: added header newalloc.h
8547
8548 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8549
8550         * as/Makefile: new EXEEXT
8551         * as/z80/Makefile: remove trailing slash of BUILDIR
8552         * as/z80/clean.mk: new EXEEXT
8553         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8554         * support/cpp2/Makefile.in: new EXEEXT
8555         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8556
8557 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8558
8559         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8560         EXEEXT was introduced to fix all related problems with targets
8561         "clean", "install" and "uninstall"; a couple of further flaws
8562         especially with "clean" have been fixed too
8563         * as/mcs51/Makefile.in
8564         * as/mcs51/clean.mk
8565         * as/z80/Makefile
8566         * Makefile
8567         * clean.mk
8568         * debugger/mcs51/Makefile.in
8569         * debugger/mcs51/clean.mk
8570         * link/z80/Makefile
8571         * link/z80/Makefile.in
8572         * link/z80/clean.mk
8573         * link/Makefile
8574         * packihx/Makefile.in
8575         * packihx/clean.mk
8576         * sim/ucsim/Makefile
8577         * sim/ucsim/clean.mk
8578         * sim/ucsim/avr.src/Makefile.in
8579         * sim/ucsim/avr.src/clean.mk
8580         * sim/ucsim/s51.src/Makefile.in
8581         * sim/ucsim/s51.src/clean.mk
8582         * sim/ucsim/xa.src/Makefile.in
8583         * sim/ucsim/xa.src/clean.mk
8584         * sim/ucsim/z80.src/Makefile.in
8585         * sim/ucsim/z80.src/clean.mk
8586         * sim/ucsim/main_in.mk
8587         * sim/ucsim/packages_in.mk
8588         * sim/ucsim/gui.src/Makefile.in
8589         * sim/ucsim/gui.src/serio.src/Makefile.in
8590         * sim/ucsim/gui.src/serio.src/clean.mk
8591         * src/Makefile.in
8592         * src/clean.mk
8593         * support/cpp2/Makefile.in
8594         * support/cpp2/clean.mk
8595         * support/makebin/Makefile
8596         * support/makebin/clean.mk
8597         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8598         * doc/sdccman.lyx: --program-suffix no longer needed
8599
8600 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8601
8602          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8603          Martin Helmling added support for ddd GUI debugger.
8604          Code added to display assembly, set variables, and other commands
8605          to interface to ddd.
8606
8607 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8608
8609         * as/Makefile: fix target clean
8610         * as/clean.mk: fix target clean
8611         * as/z80/clean.mk: fix target clean
8612
8613 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8614
8615         * Makefile.common.in: added  AT EXEEXT AT
8616         * configure.in: removed all mingw32 stuff
8617         * configure: rebuilt from configure.in
8618         * doc/sdccman.lyx: updated section "installation"
8619         * support/scripts/sdcc_mingw32: adapted to configure
8620         * support/scripts/sdcc_cygwin_mingw32: added
8621
8622 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8623
8624         * src/pic Added object file support for the PIC port
8625         * src/pic Applied patch from Craig Franklin (this started the object file support)
8626         * src/regression Updated the PIC regression tests for object files
8627
8628 2003-04-20  Borut Razem <borut.razem AT siol.net>
8629
8630         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8631           lklex.c: In function `getfid':
8632           lklex.c:203: warning: array subscript has type `char'
8633         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8634           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8635         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8636           stack handling macros
8637
8638 2003-04-19  Borut Razem <borut.razem AT siol.net>
8639
8640         * "handling space characters in file path" task:
8641         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8642         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8643         * support/Util/MySystem.h: make it self-sufficient
8644         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8645           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8646           handling space characters in file path
8647         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8648           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8649         * support/Util/MySystem.c: handling space characters in executable's path
8650
8651 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8652
8653         * as/z80/Makefile: fix permanent rebuild of z80
8654         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8655         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8656
8657 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8658
8659         * src/SDCCopt.c: add special case optimization to replace modulo by
8660           a power of two with a bitwise AND.
8661
8662 2003-04-18    <johan AT balder>
8663
8664         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8665
8666 2003-04-17    <johan AT balder>
8667
8668         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8669         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8670
8671 2003-04-13  Borut Razem <borut.razem AT siol.net>
8672
8673         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8674         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8675           fixed mingw problem in adl_NORMALIZE_PATH
8676
8677 2003-04-12  Borut Razem <borut.razem AT siol.net>
8678
8679         * fixed "#pragma SAVE/RESTORE can not be nested":
8680         * src/SDCC.lex: reworked pragma handling functions
8681         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8682         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8683
8684 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8685
8686         * src/SDCCutil.c (pathEquivalent): defined but not used
8687         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8688         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8689         * configure: rebuilt from configure.in
8690         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8691         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8692         * device/include/Makefile.in: replace sdcc_datadir
8693         * device/lib/Makefile.in: replace sdcc_datadir
8694         * Makefile.common.in: add LDFLAGS from configure
8695         * packihx/Makefile.in: use LDFLAGS
8696         * src/Makefile.in: use LDFLAGS
8697         * support/cpp2/Makefile.in: add LDFLAGS from configure
8698         * support/makebin/Makefile: use LDFLAGS
8699         * .version: bumped version number to 2.3.5
8700
8701 2003-04-12  Borut Razem <borut.razem AT siol.net>
8702
8703         * completed "different paths" task:
8704         * src/SDCCmacro.c: fixed bug in handling quotes
8705         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8706         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8707
8708 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8709
8710         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8711
8712 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8713
8714         * ds390/gen.c ds390/peeph.def: fix bug 706781
8715
8716 2003-04-11  Borut Razem <borut.razem AT siol.net>
8717
8718         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8719
8720 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8721
8722         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8723         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8724          set - this bit used to not be set...).
8725         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8726           bad code in PIC Port
8727         * src/regression/and2.c added to test bug 609268
8728         * src/regression/Makefile added and2.c to regression test
8729
8730
8731 2003-04-08    <johan AT CP255758-A>
8732
8733         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8734         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8735         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8736
8737 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8738
8739         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8740         fix bug #487815
8741         * support/cpp2/Makefile.in: fix bug #487815
8742         * configure: rebuilt from configure.in
8743         * Makefile.common.in: docdir changed, new path suffixes
8744         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8745         * sdcc_vc_in.h: reflect changes from sdccconf.h
8746         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8747         * src/SDCCutil.h: remove BINDIR hack
8748         * doc/sdccman.lyx: update new path hierarchy
8749
8750 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8751
8752         * src/SDCCpeeph.c: added okToRemoveSLOC test
8753
8754 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8755
8756         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8757
8758 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8759
8760         * src/SDCCpeeph.c: added labelIsReturnOnly test
8761         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8762
8763 2003-04-05    <johan AT balder>
8764
8765         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8766         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8767         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8768         * src/SDCCast.c: fixed a warning
8769         * src/SDCCast.h: fixed a warning
8770         * src/SDCCicode.c (operandFromAst): fixed a warning
8771
8772 2003-04-04    <johan AT balder>
8773
8774         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8775         * src/SDCCast.c (decorateType): fixed bug #715076
8776         * src/SDCC.y: fixed bug #702907
8777
8778 2003-04-03    <johan AT balder>
8779
8780         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8781         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8782         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8783         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8784         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8785
8786 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8787
8788         * _decdptr.c: fix return values
8789         * _gptrget.c: fix return values
8790         * _gptrgetc.c: fix return values
8791         * _gptrput.c: fix return values
8792         * _mulint.c: fix return values
8793         * as/z80/Makefile: fix 'make -j' problem
8794
8795 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8796
8797         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8798         * configure.in: big cleanup, updated to autoconf 2.5x
8799         * configure: rebuilt from configure.in
8800         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8801         * sdcc_vc_in.h: reflect changes from sdccconf.h
8802         * doc/Makefile: fixed a flaw in "make install"
8803
8804 2003-04-02    <johan AT balder>
8805
8806         * src/ds390/gen.c (genCmp): no comments
8807         * src/mcs51/gen.c (genCmp): no comments
8808         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8809         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8810
8811 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8812
8813         * support/regression/generate-cases.py: place generated file in given sub directory
8814         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8815         * support/regression/Makefile: improvements for 'make -j';
8816         side effect: it's simpler and faster now
8817
8818 2003-03-31  Borut Razem <borut.razem AT siol.net>
8819
8820         * src/z80/main.c: link-{port} and as-{port} defined without path
8821         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8822
8823 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8824
8825         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8826
8827 2003-03-30  Borut Razem <borut.razem AT siol.net>
8828
8829         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8830           changed type of list parameter to set
8831         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8832         * src/port.h: changed type of do_assemble() parameter to set
8833         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8834           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8835           definition of "cppoutfilename" macro with NULL value in preProcess()
8836         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8837         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8838         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8839           replaced with set *binPathSet
8840         * shash_add() deallocates the item, if allready exsists, before adding the new one
8841         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8842
8843 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8844
8845         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8846           a nested for loop bug in the PIC port
8847         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8848           for loops
8849
8850 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8851
8852         * support/Util/dbuf.h: remove C++ stuff to make it portable
8853
8854 2003-03-28  Borut Razem <borut.razem AT siol.net>
8855
8856         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8857           literal strings in stringLiteral()
8858         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8859         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8860           to the project
8861
8862 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8863
8864         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8865
8866 2003-03-26    <johan AT balder>
8867
8868         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8869         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8870         * src/SDCCast.c (decorateType): fixed " -v < 3"
8871
8872 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8873
8874         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8875         Added Lenny Story's debug infrastructure changes:
8876         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8877         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8878         * src/cdbFile.c: added
8879         * src/SDCCdebug.c: added
8880         * src/SDCCdebug.h: added
8881         * src/SDCCast.c (createFunction)
8882         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8883         * src/SDCCmain.c (parseCmdLine, main)
8884         * src/SDCCmem.c (redoStackOffsets)
8885         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8886         * src/SDCCsymt.h
8887         * src/common.h
8888         * src/avr/gen.c (genAVRCode)
8889         * src/ds390/gen.c (gen390Code)
8890         * src/mcs51/gen.c (gen51Code)
8891         * src/pic/gen.c (genpic14Code)
8892         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8893         * src/xa51/gen.c (genXA51Code)
8894         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8895
8896 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8897
8898         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8899         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8900
8901 2003-03-22    <johan AT balder>
8902
8903         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8904
8905 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8906
8907         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8908         * doc/cdbfileformat.lyx: added, written by Lenny Story
8909         * doc/Makefile: added cdbfileformat.lyx
8910         * doc/clean.mk: added cdbfileformat.lyx
8911
8912 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8913
8914         * src/mcs51/peeph.def: fix bug #705773
8915
8916 2003-03-20    <johan AT balder>
8917
8918         An sfr/sbit can have an "at #" AND an initializer
8919         * src/SDCCsymt.c (checkSClass):
8920         * src/SDCCmem.c (allocGlobal):
8921         * src/SDCCmem.c (allocLocal):
8922         * src/SDCCast.c (createBlock):
8923
8924 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8925
8926         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8927
8928 2003-03-16    <johan AT balder>
8929
8930         Undid the hackup of const and volatile, the problem is much bigger
8931         * src/SDCC.y:1.65
8932         * src/SDCCast.c:1.171
8933         * src/SDCCglue.c:1.138
8934         * src/SDCCicode.c:1.146
8935         * src/SDCCsymt.c:1.150
8936         * src/SDCCval.c:1.65
8937
8938 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8939
8940         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8941         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8942
8943 2003-03-13    <johan AT balder>
8944
8945         Hackup const and volatile modifiers in type chains a bit:
8946         * src/SDCC.y:1.63
8947         * src/SDCCast.c:1.169
8948         * src/SDCCglue.c:1.136
8949         * src/SDCCicode.c:1.143
8950         * src/SDCCsymt.c1.146
8951         * src/SDCCsymt.h1.59
8952         * src/SDCCval.c:1.63
8953
8954 2003-03-12    <johan AT balder>
8955
8956         * src/SDCCBBlock.h: more LRH debugging junk
8957         * src/SDCCcflow.h: more LRH debugging junk
8958         * src/SDCCloop.c: more LRH debugging junk
8959         * src/SDCC.y (struct_declaration): fixed bug #697590
8960         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8961         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8962         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8963
8964 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8965         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8966         test function names must now match exactly).
8967         * src/SDCCcse.c: added special case in findCheaperOp to allow
8968         extending a short integer. Makes less awful code for bug 700121 test case.
8969
8970 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8971
8972         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8973         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8974
8975 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8976
8977         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8978         actually called (operandsNotEqual() was called for all
8979         operandsNotEqualX tests).
8980
8981 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8982
8983         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8984         with shorter literals. Fixes bug 700121.
8985
8986 2003-03-11    <johan AT balder>
8987
8988         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8989
8990 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8991
8992         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8993         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8994
8995 2003-03-10  Borut Razem <borut.razem AT siol.net>
8996
8997         * src/SDCCmain.c: pipe preprocessor's output
8998         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8999         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9000         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9001         which closes all pipes in pipeSet set
9002         * src/SDCCset.c: free deleted item in function deleteSetItem()
9003         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9004         moved from z80 to src subproject
9005         * .version: increased version number to 2.3.4
9006
9007 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9008
9009         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9010         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9011         * support/regression/ports/xa51/spec.mk: fix typo
9012
9013 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9014
9015         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9016
9017 2003-03-09  Borut Razem <borut.razem AT siol.net>
9018
9019         * src/SDCCmain.c: pipe preprocessor's output
9020         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9021         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9022         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9023         which closes all pipes in pipeSet set
9024         * src/SDCCset.c: free deleted item in function deleteSetItem()
9025         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9026         moved from z80 to src subproject
9027
9028 2003-03-09  Borut Razem <borut.razem AT siol.net>
9029
9030         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9031         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9032         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9033         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9034         * src/SDCCglobl.h: unification of WIN32 native definitions
9035
9036 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9037
9038         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9039
9040 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9041
9042         * src/configure.in:   check for endianess (even while cross-compiling)
9043         * src/configure:      check for endianess (even while cross-compiling)
9044         * src/configure_in.h: check for endianess (even while cross-compiling)
9045         * src/avr/gen.c:        remove old endianess stuff
9046         * src/mcs51/gen.c:      remove old endianess stuff
9047         * src/ds390/gen.c:      remove old endianess stuff
9048         * src/pic/gen.c:        remove old endianess stuff
9049         * src/pic/genarith.c:   remove old endianess stuff
9050         * src/pic/glue.c:       fix endianess check
9051         * src/pic16/gen.c:      remove old endianess stuff
9052         * src/pic16/genarith.c: remove old endianess stuff
9053         * src/pic16/glue.c:     fix endianess check
9054         * src/xa51/gen.c:       remove old endianess stuff
9055         * src/z80/gen.c:        fix endianess check
9056         * src/SDCCglue.c:       fix endianess check
9057         * src/ds390/peeph.def: fix bug 700036
9058
9059 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9060
9061         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9062         * src/configure: find appropriate data-types on host for SDCC's int and long
9063         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9064         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9065         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9066
9067 2003-03-07    <johan AT balder>
9068
9069         Just a big NOOP:
9070                 some minor cleanups before the big shot
9071                 OP_DEFS and OP_USES now use Kevin's protection
9072                 new option --nolabelopt
9073
9074         * src/SDCCBBlock.c:
9075         * src/SDCCast.c,:
9076         * src/SDCCcflow.c:
9077         * src/SDCCcse.c:
9078         * src/SDCCicode.c:
9079         * src/SDCCicode.h:
9080         * src/SDCClabel.c:
9081         * src/SDCCloop.c:
9082         * src/SDCCmain.c:
9083         * src/ds390/ralloc.c:
9084         * src/mcs51/ralloc.c:
9085         * src/pic/ralloc.c:
9086         * src/xa51/ralloc.c:
9087         * src/z80/ralloc.c:
9088
9089 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9090
9091         * src/pic/pcode.c (get_op): fix 64 bit warnings
9092         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9093         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9094         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9095         * support/regression/tests/malloc.c: fix 64 bit warnings
9096
9097 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9098
9099         * src/mcs51/gen.c (genMinus): fixed bug 696436
9100
9101 2003-03-02  Borut Razem <borut.razem AT siol.net>
9102
9103         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9104
9105 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9106
9107         * configure.in: test for mkstemp
9108         * sdccconf_in.h: add HAVE_MKSTEMP
9109
9110 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9111
9112         * device/include/ctype.h: removed warning while using --stack-auto
9113         * device/include/malloc.h: removed warning while using --stack-auto
9114         * device/include/string.h: removed warning while using --stack-auto
9115
9116 2003-02-23  Borut Razem <borut.razem AT siol.net>
9117
9118         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9119         because NDEBUG is defined (see man assert)
9120         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9121
9122 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9123
9124         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9125         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9126
9127 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9128
9129         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9130         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9131
9132 2003-02-18    <johan AT balder>
9133
9134         * as/mcs51/asmain.c (asmbl): module can start with a digit
9135         * as/z80/asmain.c (asmbl): module can start with a digit
9136
9137 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9138
9139         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9140         * src/asm.c: fix pipe() for Mingw32
9141
9142 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9143
9144         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9145         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9146         make -V work again; --c1mode reads now from stdin
9147         * doc/sdccman.lyx: added --c1mode
9148         * support/Util/SDCCerr.c: new messages for c1 mode
9149         * support/Util/SDCCerr.h: new messages for c1 mode
9150         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9151
9152 2003-02-15    <johan AT balder>
9153
9154         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9155
9156 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9157
9158         * doc/sdccman.lyx: Environment variables, -o and other minor things
9159
9160 2003-02-14    <johan AT balder>
9161
9162         * src/xa51/main.c: before anyone really tries to use it :)
9163
9164         * Install doc's in share/sdcc/doc
9165         * removed some obsolete files
9166         * Do a proper make distclean and uninstall
9167         M Makefile.common.in
9168         R sdccbuild.sh
9169         M as/Makefile
9170         M device/include/Makefile.in
9171         M device/lib/Makefile.in
9172         M doc/sdccman.lyx
9173         M link/Makefile
9174         M sim/ucsim/doc/Makefile.in
9175         M src/clean.mk
9176         R src/avr/peeph.rul
9177         R src/xa51/peeph.rul
9178         M support/cpp2/Makefile.in
9179         M support/makebin/Makefile
9180
9181
9182 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9183
9184         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9185
9186 2003-02-10  Borut Razem <borut.razem AT siol.net>
9187
9188         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9189         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9190         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9191         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9192         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9193         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9194         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9195         src/z80/Makefile.bcc: Borland Makefile cleanup
9196         * as/z80/Makefile.bcc: Added Borland Makefile
9197         * support/cpp2/borland.h: Removed
9198
9199 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9200
9201         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9202         * src/SDCC.lex: new pragma NOIV
9203         * src/SDCCglobl.h: new pragma NOIV
9204         * src/SDCCmem.c: new pragma NOIV
9205
9206 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9207
9208         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9209
9210 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9211
9212         * src/SDCCmain.c: signal handling is switched off by --debug
9213         * doc/Makefile: small fix for install; use clean.mk again
9214         * doc/clean.mk: clean *.pdf and *.html too
9215
9216 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9217
9218         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9219         * device/lib/printfl.c: fix a ds390 bug by making it portable
9220         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9221         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9222         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9223         * debugger/mcs51/cmd.c: converted multi-line string literals
9224         * sim/ucsim/globals.cc: converted multi-line string literals
9225         * src/SDCCmain.c: introduced signal handler to remove temp files
9226         * doc/Makefile: small tweaks, implement clean
9227         * doc: removed generated files
9228
9229 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9230
9231         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9232         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9233         Address Record is not correctly generated for DS390."
9234
9235 2003-02-02  Borut Razem <borut.razem AT siol.net>
9236
9237         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9238         * as/mcs51/asm.h: fixed compilation with Borland C
9239         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9240         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9241         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9242         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9243         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9244         src/z80/Makefile.bcc: delete $(LIB) only if exist
9245         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9246
9247 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9248
9249         * device/include/malloc.h: introduced NULL
9250         * device/include/string.h: introduced NULL
9251         * device/include/stdlib.h: introduced NULL
9252         * device/lib/_memcpy.c: removed NULL
9253         * device/lib/_strcat.c: removed NULL
9254         * device/lib/_strchr.c: removed NULL
9255         * device/lib/_strcmp.c: removed NULL
9256         * device/lib/_strcpy.c: removed NULL
9257         * device/lib/_strcspn.c: removed NULL
9258         * device/lib/_strlen.c: removed NULL
9259         * device/lib/_strncat.c: removed NULL
9260         * device/lib/_strncmp.c: removed NULL
9261         * device/lib/_strncpy.c: removed NULL
9262         * device/lib/_strpbrk.c: removed NULL
9263         * device/lib/_strrchr.c: removed NULL
9264         * device/lib/_strspn.c: removed NULL
9265         * device/lib/_strstr.c: removed NULL
9266         * device/lib/_strtok.c: removed NULL
9267         * device/lib/malloc.c: removed NULL, include own header
9268
9269 2003-02-02    <johan AT balder>
9270
9271         * 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
9272         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9273         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9274         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9275         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9276         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9277
9278 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9279
9280         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9281         area 'DATA'"
9282
9283 2003-02-01    <johan AT balder>
9284
9285         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9286
9287 2003-01-31    <johan AT CP255758-A>
9288
9289         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9290
9291 2003-01-30    <johan AT balder>
9292
9293         * src/SDCCBBlock.c: automatic bug detection
9294         * src/SDCCicode.c: automatic bug detection
9295
9296 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9297
9298         * src/SDCCglobl.h:   now --xram-size 0 works
9299         * src/SDCCmain.c:    now --xram-size 0 works
9300
9301 2003-01-29    <johan AT balder>
9302
9303         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9304
9305 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9306
9307         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9308         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9309         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9310         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9311         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9312         * src/SDCCmain.c:    Added options --xram-size and --code-size
9313
9314 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9315
9316         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9317         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9318
9319 2003-01-27    <johan AT balder>
9320
9321         * src/SDCC.y: fixed bug #613764
9322
9323 2003-01-26    <johan AT balder>
9324
9325         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9326         * src/SDCCsymt.h: fixed bug #673374
9327         * src/SDCCglue.c: fixed bug #661910
9328         * src/SDCCast.c: fixed bug #458099 and 673374
9329
9330 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9331
9332         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9333         * as/mcs51/strcmpi.h: added
9334         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9335         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9336         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9337         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9338         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9339         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9340         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9341         * as/mcs51/Makefile.aslink: new module strcmpi
9342         * as/mcs51/Makefile.asx8051: new module strcmpi
9343         * as/mcs51/Makefil.bcc: new module strcmpi
9344         * as/mcs51/Makefile.in: new module strcmpi
9345         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9346
9347 2003-01-26    <johan AT balder>
9348
9349         * src/SDCCglue.c: reverted back to 1.124
9350         * src/SDCCast.c: reverted back to 1.156
9351         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9352
9353 2003-01-25    <johan AT balder>
9354
9355         * src/SDCCglue.c: A better fix for bug #661910
9356         * src/SDCCast.c: A better fix for bug #661910
9357         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9358
9359 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9360
9361         * src/Makefile.in: remove spawn.o
9362         * src/SDCCmain.c: remove spawn.h
9363         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9364         * src/spawn.c: removed
9365         * src/spawn.h: removed
9366         * support/regression/ports/ds390/spec.mk: link with -r
9367
9368 2003-01-24    <johan AT CP255758-A>
9369
9370         * src/ds390/gen.c (aopOp): fixed bug #667458
9371         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9372         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9373         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9374
9375 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9376
9377         * src/mcs51/peeph.def: better assembler identation by Frieder
9378         * src/mcs51/gen.c: better assembler identation by Frieder
9379
9380 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9381
9382         * as/z80/string.h: removed for gcc 3.2
9383         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9384         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9385
9386 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9387
9388         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9389         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9390         * support/regression/Makefile: separate temp files for ports
9391         * support/regression/generate-cases.py: separate temp files for ports
9392         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9393         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9394
9395 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9396
9397         * moved tinitalk to device/examples/ds390
9398
9399 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9400
9401         * as/mcs51/lkmem.c: rflag is for DS390
9402         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9403         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9404                          (linkEdit): move mem- and map-files the same way as ihx-files
9405         * src/z80/main.c (_setDefaultOptions): removed --generic
9406         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9407         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9408         * src/pic/glue.c (picglue): --c1mode works again
9409         * src/pic16/glue.c (pic16glue): --c1mode works again
9410         * src/asm.c (printCLine): fix #660034
9411
9412 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9413
9414         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9415         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9416         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9417         * as/mcs51/lkmem (summary): better fix for sp problem
9418         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9419         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9420         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9421                                               remove --stack-after-data
9422
9423 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9424
9425         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9426         * src/SDCCutil.c (join): ugly bug: missing '\0'
9427         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9428
9429 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9430
9431         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9432         * src/port.h: typo
9433         * src/pic/main.c (_asmCmd): gpasm supports -o
9434         * src/z80/main.c: more general macros
9435         * device/lib/Makefile.in: remove intermediate files
9436
9437 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9438
9439         * .version: Bumped version number to 2.3.3
9440         * src/SDCCBBlock.c: new option -o
9441         * src/SDCCglobl.h: new option -o
9442         * src/SDCCglue.c: new option -o
9443         * src/SDCCmain.c: new option -o
9444         * src/asm.c: new option -o
9445         * src/ds390/main.c: new option -o
9446         * src/pic/glue.c: new option -o
9447         * src/pic/pcode.c: new option -o
9448         * src/pic/ralloc.c: new option -o
9449         * src/pic16/glue.c: new option -o
9450         * src/pic16/pcode.c: new option -o
9451         * src/pic16/ralloc.c: new option -o
9452         * src/z80/main.c: new option -o
9453         * device/lib/Makefile.in: use -o
9454         * support/regression/ports/ds390/spec.mk: use -o
9455         * support/regression/ports/gbz80/spec.mk: use -o
9456         * support/regression/ports/mcs51/spec.mk: use -o
9457         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9458         * support/regression/ports/z80/spec.mk: use -o
9459         * support/regression/ports/ucz80/spec.mk: use -o
9460         * support/regression/ports/xa51/spec.mk: use -o
9461         * support/regression/fwk/lib/timeout.c: fix usage string
9462
9463 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9464         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9465
9466 2003-01-07    <johan AT balder>
9467
9468         * src/SDCCast.c (decorateType): fixed bug #600035
9469
9470 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9471         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9472         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9473         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9474         * src/pic/pcode.c: outcommented unused variable to remove warnings
9475         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9476
9477 2003-01-06    <karl AT turbobit.com>
9478         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9479    regression tests.
9480
9481 2003-01-06    <johan AT balder>
9482
9483         * src/SDCCicode.c: fixed array add
9484
9485 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9486         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9487         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9488
9489 2003-01-04    <johan AT balder>
9490
9491         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9492
9493 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9494         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9495
9496 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9497         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9498         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9499
9500 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9501         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9502
9503 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9504         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9505
9506 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9507         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9508
9509 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9510
9511     * in \sdcc\as\mcs51\ changed these files in order to create an
9512     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9513     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9514     following files to include the previous two files: aslink.dsp,
9515     Makefile.aslink, Makefile.bcc, and Makefile.in.
9516
9517     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9518     .adb instead of .cdb
9519
9520 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9521
9522         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9523         value from option --iram-size.
9524
9525 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9526
9527         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9528         dram[] array.
9529
9530 2002-09-18    <wiml AT hhhh.org>
9531
9532         * SDCClrange.h: exposed setFromRange() and setToRange()
9533         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9534           packRegsForAccUse() (bug 542397)
9535         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9536           multiple times and emitting the fetch operations more than once
9537           added aopGetUsesAcc() function to allow binary operators to
9538           fetch their operands in the correct order; made genMinus() emit
9539           compact code for X = LITERAL - Y
9540
9541 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9542         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9543         sprintf() in line 1267.
9544
9545 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9546         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9547         like ports.
9548
9549 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9550         Changes to aslink (All the changes are marked with 'JCF'):
9551
9552         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9553         summary().
9554
9555         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9556         area BSEG.  Also moves, if possible, the DATA area down into the internal
9557         ram so more space is available.
9558
9559         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9560         sflag.
9561
9562         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9563         not bytes.  Function summary() which creates a memory usage summary
9564         file with extension .mem.  Reports of overlaping stack and small stack
9565         size.  If the space for the stack is less than 16 bytes aslink trows a
9566         warning.
9567
9568         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9569         the 8051.  Option 'y' for memory summary output file.
9570
9571         Changes to sdcc (All the changes are marked with 'JCF'):
9572
9573         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9574
9575         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9576         overlaying area for it (uses RegBankUsed[4]).
9577
9578         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9579         bank zero as used by default.  By default aslink locates the stack
9580         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9581         the creation of the .mem file.  Delegates the allocation of data area
9582         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9583         the begining of the stack area to aslink.
9584
9585         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9586         glue() in SDCCglue.c creates an area for it.
9587
9588 2002-09-03  Borut Razem <borut.razem AT siol.net>
9589         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9590         sdcc/src/pic/glue.c:
9591         introduced atexit() handler for teporay files removal in case of
9592         errors, assertions, ...
9593
9594 2002-08-29  Borut Razem <borut.razem AT siol.net>
9595         * sdcc/support/cpp2/auto-host_vc_in.h:
9596         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9597         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9598         Maybe there is a similar problem with BORLANDC? It should be checked!
9599
9600         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9601         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9602         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9603         was not executed, and the compiler (cl) launched a warning:
9604         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9605
9606 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9607         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9608
9609 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9610         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9611
9612         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9613           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9614           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9615           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9616           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9617           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9618           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9619         - added Release configuration in VS projects
9620         - review of compiler an linker options
9621         - VC .exe files are generated in bin_vc directory, not to interfere
9622           with binaries generated from other projects (cygwin, mingw, bcc ...)
9623
9624         * sdcc/src/yacc.dsp: added
9625
9626         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9627         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9628         and insert the version number definitions from .version
9629
9630         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9631
9632         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9633         added - genarate auto-host.h using auto-host_vc_in.h as template
9634
9635         * sdcc/sdcc_vc.h,
9636         removed from CVS, generated automatically
9637
9638 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9639         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9640
9641 2002-08-11  Borut Razem <borut.razem AT siol.net>
9642         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9643
9644 2002-08-10  Borut Razem <borut.razem AT siol.net>
9645         * src/SDCCmain.c (main):
9646         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9647         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9648         The consequence was that some temporary files were not removed.
9649
9650         * src/SDCCglue.c:
9651         unification of code in functions tempfilename() and tempfile():
9652         function tempnam() is defined in Visual Studio 6.0 and .NET
9653
9654         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9655
9656         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9657           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9658         - removed compiler command line option /WX: Treats all warnings as errors
9659         - update a list of source files, included into the project
9660
9661         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9662           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9663         changed project type to Generic Project so that can be correcly converted to VS.NET project
9664
9665         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9666
9667         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9668
9669         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9670
9671         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9672         added return 0 statements after assert() to make compiler happy
9673
9674         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9675         added newline in the def file to keep MSC compiler satisfied
9676
9677         * sdcc/src/z80/gen.c:
9678         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9679           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9680         - solved MSC error in function aopDump()
9681
9682         * sdcc_vc.h: define PREFIX as "\\sdcc"
9683
9684 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9685         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9686
9687 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9688         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9689         - Rewrote the register banking algorithm.
9690         - Added pCode live-range analysis to registers (for now, only non-used and
9691         singly-used registers optimized away)
9692
9693         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9694
9695         * 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.
9696
9697 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9698         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9699
9700 2002-04-22  Michael Hope  <michaelh AT vroom>
9701
9702         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9703
9704         * configure.in (DD_COPT): Added include support required for gbdk.
9705
9706         * .version: Bumped version number just to increase it.
9707
9708         * src/SDCCmain.c: Added -nostdinc to the default options.
9709
9710 2002-04-15  Michael Hope  <michaelh AT vroom>
9711
9712         * device/lib/z80/printf.c (sprintf): Added.
9713
9714         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9715
9716         * src/z80/peeph.def: Added transpose redundent load rule.
9717
9718         * src/z80/main.c: Added force callee saves for jaune.
9719
9720         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9721
9722         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9723
9724 2002-03-28  Johan Knol  <johan AT balder>
9725
9726         * src/SDCCval.c: fixed bug #532436
9727
9728 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9729         * /src/port.h:
9730         Added "char *Processor" field to the port structure.
9731
9732         * /src/SDCCmain.c:
9733         Added -p option. Allows port dependent processor to be specified.
9734
9735         * all ports:
9736         Initialized the new field char *Processor field to NULL in all ports
9737
9738         * /src/pic/*:
9739         Compiler generated registers for interrupt context saving
9740         were not getting allocated.
9741
9742 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9743
9744         * /src/SDCCast.c:
9745         Fixed left shift. Will promote the left side of a left shift
9746         if a) left shifting more than size of operand or b) when assigned
9747         to something size > size of left side
9748
9749 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9750         * src/pic/*
9751         tons of changes. Register allocation has been
9752         rewritten. Added customization for the various PICs. Flow
9753         analysis is restructured. ...
9754
9755         * src/pic/device.h:
9756         Added
9757
9758         * src/pic/device.c:
9759         Added. device.c is a PIC port hack to accomodate variations
9760         in PIC devices.
9761
9762 2002-03-13  Michael Hope  <michaelh AT vroom>
9763
9764         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9765
9766 2002-03-04  johanknol  <johanknol AT manik>
9767
9768         * /src/SDCCval.c: fixed
9769
9770         const unsigned char arr[][2] = { { 0, 1 } };
9771         t18.c:1: error: Initializer element is not constant
9772
9773 2002-03-04  bela  <bela AT manik>
9774
9775         * /device/include/mcs51reg.h:
9776         ds89c420 register definition update
9777
9778 2002-03-03    <johan AT FRIJA>
9779
9780         * support/Util/SDCCerr.c: did something, but don't no why anymore
9781
9782         * support/regression/tests/bug-524691.c: made it a little less shy
9783
9784         * src/SDCCast.c (decorateType): fixed bug #524697
9785
9786         * src/SDCCast.c: made some lineno improvements
9787
9788         * src/SDCCval.c (getNelements): changed warning to error
9789
9790         * src/SDCCglue.c (printIvalArray): changed warning to error
9791
9792         * src/SDCCicode.c: fixed a warning for mingw
9793
9794         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9795
9796         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9797
9798 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9799
9800         * src/ds390/peeph.def:
9801         Added some more peephole rules
9802
9803         * src/ds390/gen.c: Various fixes & enhancements
9804
9805         * src/SDCClrange.c, src/SDCClrange.h:
9806         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9807
9808         * src/ds390/ralloc.c:
9809         various fixes & enhancements (ds390) specific
9810
9811         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9812         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9813         from rallocs.
9814
9815         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9816
9817 2002-03-02    <johan AT FRIJA>
9818
9819         * src/SDCCast.c (decorateType): fixed bug #524708
9820
9821         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9822
9823         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9824
9825 2002-03-01  Michael Hope  <michaelh AT vroom>
9826
9827         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9828
9829         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9830
9831 2002-03-01    <johan AT FRIJA>
9832
9833         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9834
9835         * src/SDCCast.c (decorateType): fixed bug #524209
9836
9837         * src/SDCCval.c (valNot): fixed bug #524195
9838
9839 2002-02-26    <johan AT balder>
9840
9841         * src/xa51/gen.c: fixed a warning
9842
9843         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9844
9845         * src/SDCCast.c (decorateType): fixed bug #522534
9846
9847 2002-02-23    <johan AT balder>
9848
9849         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9850
9851 2002-02-22    <johan AT balder>
9852
9853         * src/SDCCast.c: fixed bug #514865
9854
9855         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9856
9857 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9858
9859         * sdcc/src/SDCCloop.c:
9860         Previous fix was not good. basic blocks that have "break" or "return" are
9861         not really partof a loop , but live ranges used in these blocks should
9862         be live thru the entire loop, so set partOfLoop but don't add them to
9863         loop region
9864
9865 2002-02-21    <johan AT FRIJA>
9866
9867         * src/SDCCcse.c: fixed bug #514308
9868
9869 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9870
9871         * src/SDCCloop.c:
9872         Fixed BUG #519583. If a conditional block ended in a return/break
9873         statement inside a loop, it was not being considered part of the loop.
9874
9875         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9876
9877 2002-02-10  Karl Bongers <karl AT turbobit.com>
9878
9879         * debugger/*:
9880         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9881         with lots of comments and notes.
9882
9883         * device/examples/test2.c:
9884         Fix bug, "red" variable not being initialized(compiler complained).
9885
9886         * device/examples/Makefile, examples/test3.c:
9887         Add Makefile in device/examples folder, compiles test3.c
9888         for use as a multiple module SDCDB test case.
9889
9890         * sim/ucsim/cmd.src/cmdset.cc:
9891         Took out debug printfs in ucsim "next" command.
9892
9893         * sim/ucsim/xa.src:
9894         Karl and Johan start ucsim XA support.  Most dissassembly working,
9895         about 75% emulation done(plenty of work remaining).
9896
9897         * sim/ucsim/z80.src:
9898         Add Z80 support to ucsim, add test-ucz80 regression test,
9899         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9900         Notice z80 compiler fails on examples/test3.c/crc code.
9901
9902 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9903
9904         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9905         Added support for --parms-in-bank1
9906
9907         * src/ds390/peeph.def:
9908         added a few more peephole optimzations
9909
9910         * src/ds390/main.c:
9911         1) added __builtin_inp & __builtin_outp used to read in data of given length
9912            from a memory mapped port
9913         2) added __builtin_memcmp
9914         3) added __builtin_swapw swap bytes of a short
9915
9916         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9917         1) handle multiple send & receives from register bank1
9918         2) ralloc can now allocate DPTR1 to some liveRanges
9919
9920         * src/SDCCsymt.c, src/SDCCsymt.h:
9921         changes to handle multiple sends & receives
9922
9923         * src/SDCCptropt.h:
9924         added some pointer arithmetic optimization
9925
9926         * src/SDCCptropt.c:
9927         added some pointer arithmetic optimizations but not stable yet so not
9928         called from anywhere (will get this working shortly)
9929
9930         * src/SDCCopt.c: fixed for multiple sends & receives
9931
9932         * src/SDCCmain.c:
9933         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9934         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9935            set preprocessor defines (depending on options)
9936
9937         * src/SDCCicode.c, src/SDCCicode.h:
9938         changes made to handle multiple sends & receives
9939
9940         * src/SDCCglobl.h:
9941         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9942
9943         * src/SDCCcse.c, src/SDCCcse.h:
9944         added function findbackward def (to be used in upcoming optimization)
9945
9946         * src/SDCCcflow.c, src/SDCCcflow.h:
9947         added function returnAtEnd - to determine if a basic block terminates with
9948         a RETURN iCode
9949
9950         * src/SDCCast.c, src/SDCCast.h:
9951         added option parms-in-bank1
9952
9953         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9954         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9955         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9956         adjusted for --parms-in-bank1 option
9957
9958         * device/include/string.h:
9959         donot redefine "reentrant" keyword
9960
9961         * device/include/ds80c390.h: Added some more SFRs
9962
9963 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9964
9965         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9966
9967 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9968
9969         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9970
9971 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9972
9973         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9974
9975 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9976
9977         * Added --xram-movc option
9978
9979 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9980
9981         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9982
9983 2002-01-11  Johan Knol
9984
9985         * Added math lib of Jesus Calvino-Fraga
9986
9987 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9988
9989         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9990         * support/regression/Makefile: new target test-mcs51-stack-auto
9991         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9992
9993 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9994
9995         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9996
9997 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9998
9999         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10000
10001 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10002
10003         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10004
10005         * src/SDCCglue.h: add definition for printIvalChar()
10006
10007 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10008
10009         * src/SDCCast.c: fix #498138 by Johan
10010
10011         * src/SDCCglue.c: fix #498138 by Johan
10012
10013 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10014
10015         * support/regression/Makefile: fix clean
10016
10017         * support/regression/ports/ds390/support.c: fix transmission of last character
10018
10019 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10020
10021         * /sdcc/src/ds390/gen.c:
10022         a) improved computing address of stack variable
10023         b) took out some #if 0 code
10024         c) improved parmBytes adjustment
10025         d) improved genPlusIncr & genMinusIncr
10026         e) genCmp could generate bad code (when left assigned to DPTR)
10027         f) Fixed bug in hasInc
10028
10029         * /sdcc/src/ds390/ralloc.c:
10030         a) packRegsForSupport could mess up live information (Fixed)
10031         b) packRegsDPTRuse could be incorrect for left & right shift
10032
10033         * /sdcc/src/mcs51/ralloc.c:
10034         packRegsForSupport could mess up the live information (Fixed)
10035
10036         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10037
10038         * /sdcc/src/SDCCast.c:
10039         can reverse a loop even if function call is present as long
10040         as the loop control variable is local & is not passed as parameter
10041
10042 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10043
10044         * /sdcc/ChangeLog: *** empty log message ***
10045
10046         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10047         More builtin function additions for TININative
10048
10049         * /sdcc/src/ds390/ralloc.c:
10050         Had broken the regression testsuite
10051
10052         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10053
10054         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10055         Added funcattr hasStackParms will be set for reentrant functions when there
10056         are paramteres on the stack, this helps in minimizing frame pointer generation
10057         typeFromStr can handle function pointers now
10058
10059         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10060         *** empty log message ***
10061
10062 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10063
10064         * /src/ds390/gen.c, /src/ds390/main.c:
10065         More builtin function additions for TININative
10066
10067         * /src/ds390/ralloc.c:
10068         Had broken the regression testsuite
10069
10070         * /src/SDCCast.c: Fixed a bug in dumptree
10071
10072         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10073         Added funcattr hasStackParms will be set for reentrant functions when there
10074         are paramteres on the stack, this helps in minimizing frame pointer generation
10075         typeFromStr can handle function pointers now
10076
10077         * /doc/builtins.txt, /doc/TININative.txt:
10078         *** empty log message ***
10079
10080
10081 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10082
10083         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10084         ALPHA version for -mTININative
10085
10086         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10087         updated to reflect changes in the port structure
10088
10089         * /src/port.h:
10090         added function do_assemble (similar to do_link) if non-null this function
10091         will be called to do assembly (-mTININative) requires a multi command
10092         assembly
10093         added function genAssemblerEnd will be called to generate assembler Epilogue
10094
10095         * /src/SDCCsymt.c:
10096         added _JavaNative to debug info printing
10097
10098         * /src/SDCCmain.c: added option --tini-libid
10099         added port->do_assemble function (-mTININative) has a multi command assemble
10100
10101         * /src/SDCCglue.c: Disabled "constExpr" check
10102         added port->genAssemblerEnd function
10103
10104         * /src/SDCCglobl.h: Added option --tini-libid value
10105
10106         * /src/SDCCast.h:
10107         tookout optimizeCompare from the header (has no external references)
10108
10109         * /src/SDCCast.c: made one more function "static"
10110
10111 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10112
10113         * src/z80/mappings.i: Added z80asm support.
10114
10115         * src/z80/main.c: Added z80asm support on --asm=z80asm
10116
10117         * src/z80/gen.c: Fixed asm portability issues.
10118
10119         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10120
10121         * src/SDCCglue.c (printExterns): Added global/extern split.
10122
10123 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10124
10125         * support/regression/Makefile: added test for mcs51 model large
10126
10127         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10128
10129         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10130
10131 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10132
10133         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10134
10135 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10136
10137         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10138
10139         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10140
10141 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10142
10143         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10144
10145         * support/regression/tests/simplefloat.c: Port to mcs51.
10146
10147 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10148         * support/regression/tests/bug-485362.c: Added.
10149
10150         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10151
10152         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10153
10154         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10155
10156         * src/z80/gen.c (aopDump): Added a dump function.
10157
10158 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10159         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10160
10161         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10162
10163         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10164
10165         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10166
10167         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10168
10169         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10170
10171         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10172
10173         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10174
10175         * support/regression/ports/ds390/support.c: Use tinibios.
10176
10177         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10178
10179 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10180
10181         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10182         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10183
10184         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10185
10186         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10187
10188 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10189
10190         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10191
10192         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10193         (packRegsForIYUse): Created and optimised.
10194
10195 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10196
10197         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10198 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10199
10200         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10201
10202         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10203
10204         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10205
10206 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10207
10208         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10209
10210         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10211
10212 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10213
10214         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10215
10216         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10217
10218         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10219
10220 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10221
10222         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10223         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10224         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10225
10226         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10227
10228         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10229         (genNotFloat): Added.
10230         (genUminusFloat): Added.
10231
10232         * device/lib/z80/Makefile: Added floating pt stubs.
10233
10234         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10235
10236         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10237
10238         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10239
10240 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10241
10242         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10243
10244         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10245
10246         * sdcc/support/regression/Makefile: Add port ds390.
10247
10248         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10249
10250         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10251
10252         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10253
10254         * sdcc/support/regression/ports/ds390/support.c: Added.
10255
10256         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10257
10258         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10259
10260         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10261
10262 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10263
10264         * device/include/malloc.h: Added z80 and gbz80 support.
10265
10266         * device/lib/gbz80/heap.s: Added.
10267
10268         * device/lib/z80/heap.s: Added.
10269
10270         * device/lib/malloc.c: Added z80 and gbz80 support.
10271
10272         * support/regression/tests/malloc.c (testMalloc): Added.
10273
10274         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10275
10276         * support/regression/tests/bug-478094.c: Added.
10277
10278         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10279
10280 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10281
10282         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10283
10284         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10285
10286         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10287
10288         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10289
10290         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10291
10292 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10293
10294         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10295
10296 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10297
10298         * support/regression/tests/bug-477927.c: Added.
10299
10300         * src/z80/peeph.def: Added minor rules.
10301
10302         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10303
10304         * src/z80/peeph.def: Added jump optimisation modification.
10305
10306 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10307
10308         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10309
10310 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10311
10312         * support/regression/tests/funptrs.c: Added.
10313
10314 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10315
10316         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10317
10318 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10319
10320         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10321
10322         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10323
10324         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10325         (movLeft2ResultLong): Created.
10326
10327         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10328         (joinPushes): Added.  Joins two char pushes into a word push.
10329
10330 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10331
10332         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10333
10334         * support/makebin/Makefile (install): Added creation of dest dir.
10335
10336 2001-10-24 Karl Bongers <karl AT turbobit.com>
10337
10338         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10339
10340 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10341
10342         * src/z80/ralloc.c: Turned off faulty pack for one use.
10343
10344         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10345
10346         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10347
10348 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10349
10350         * support/regression/Makefile: Improved clean
10351
10352         * support/regression/ports/gbz80/spec.mk: Added clean
10353
10354         * support/regression/ports/host/spec.mk: Added clean
10355
10356         * support/regression/ports/z80/spec.mk: Added clean
10357
10358         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10359
10360         * support/regression/ports/mcs51/timeout.c: little improvements
10361
10362 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10363
10364         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10365
10366         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10367
10368         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10369
10370 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10371
10372         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10373
10374         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10375
10376 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10377         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10378
10379         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10380
10381         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10382
10383         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10384
10385         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10386
10387         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10388
10389         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10390
10391         * support/regression/tests/longor.c: Added.
10392
10393 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10394
10395         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10396
10397         * as/mcs51/aslink.h: define PATH_MAX
10398
10399         * as/mcs51/asm.h: define PATH_MAX
10400
10401         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10402
10403         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10404
10405         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10406
10407         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10408
10409         * src/SDCCglobl.h: define PATH_MAX
10410
10411         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10412
10413         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10414
10415 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10416
10417         * src/z80/gen.c (gencjneshort): Fixed
10418
10419         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10420
10421 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10422
10423         * support/regression/tests/bug-469671.c: Added.
10424
10425         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10426
10427 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10428
10429         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10430
10431         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10432
10433 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10434
10435         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10436
10437         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10438
10439         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10440
10441         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10442
10443         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10444
10445         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10446
10447         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10448
10449 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10450
10451         * 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.
10452
10453         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10454
10455         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10456
10457 2001-10-07    <johan AT FRIJA>
10458
10459         * device/lib/gets.c (gets): fixed the return value.
10460
10461 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10462         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10463
10464         * 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.
10465
10466         * 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.
10467
10468         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10469
10470         * src/pic/gen.c: Removed Safe_strdup.
10471
10472         * configure.in: Added option to enable libgc support.
10473
10474         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10475         (bitVectUnion): Optimised.
10476         (bitVectIntersect): Optimised.
10477         (bitVectBitsInCommon): Optimised.
10478         (bitVectCplAnd): Optimised.
10479
10480         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10481
10482 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10483
10484         * src/SDCCmain.c: distinguish between assembler debug and plain options
10485
10486         * src/avr/main.c:   remove standard assembler options
10487
10488         * src/ds390/main.c: remove standard assembler options
10489
10490         * src/mcs51/main.c: remove standard assembler options
10491
10492         * src/port.h: removed "PENDING" comment
10493
10494 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10495
10496         * src/device/lib/_mulint.c  : new, with assember functions
10497
10498         * src/device/lib/_mullong.c : new, with assember functions
10499
10500         * src/device/lib/_divuint.c : with assember functions
10501
10502         * src/device/lib/_divsint.c : with assember functions
10503
10504         * src/device/lib/_divulong.c: with assember functions
10505
10506         * src/device/lib/_divslong.c: with assember functions
10507
10508         * src/device/lib/_moduint.c : with assember functions
10509
10510         * src/device/lib/_modsint.c : with assember functions
10511
10512         * src/device/lib/_modulong.c: with assember functions
10513
10514         * src/device/lib/_modslong.c: with assember functions
10515
10516         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10517
10518         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10519
10520         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10521                                       replaced _mululong.c and _mulslong.c by _mullong.c
10522
10523 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10524
10525         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10526
10527 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10528
10529         * src/SDCCglue.c: test, if win32api is available for MINGW
10530
10531 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10532
10533         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10534         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10535         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10536         * support/regression/ports/host/spec.mk: removed GENERIC
10537         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10538         * support/regression/ports/z80/spec.mk: removed GENERIC
10539
10540 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10541
10542         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10543
10544         * support/regression/tests/bug-467035.c: Created.
10545
10546 2001-10-01    <johan AT FRIJA>
10547
10548         * src/SDCC.y: fixed bug #466586 part 1
10549
10550 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10551
10552         * SDCCicode.c: z80 has no generic pointers
10553         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10554
10555 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10556
10557         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10558
10559 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10560
10561         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10562
10563         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10564
10565 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10566
10567         * configure.in: Fixed up so that ucsim is only configured once.
10568
10569         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10570
10571         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10572         (getPathDifference): As above.
10573
10574         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10575
10576         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10577
10578 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10579         * .version: Updated to 2.3.1
10580
10581         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10582         Added copyright header.
10583
10584         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10585         (assemble): Added support for macro based assembler commands.
10586         (linkEdit): Added support for macro based linker commands.
10587         (preProcess): Changed the pre-processor to use macros.
10588         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10589         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10590
10591         * device/lib/z80/crt0.s: Added module name for debugging.
10592
10593 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10594
10595         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10596
10597         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10598
10599         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10600
10601         * src/Makefile.in: Added SDCCmacro and SDCCutil
10602
10603 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10604
10605         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10606
10607 2001-09-16    <johan AT FRIJA>
10608
10609         * 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.
10610
10611 2001-09-15    <johan AT FRIJA>
10612
10613         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10614         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10615
10616 2001-09-11    <johan AT FRIJA>
10617
10618         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10619
10620 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10621
10622         * support/regression/tests/bug-460444.c: Added test case.
10623
10624         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10625         (genCast): Added justification for all of the asserts.
10626
10627 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10628
10629         * support/regression/support.c: _xdata replaced by xdata
10630
10631         * support/regression/spec.mk: removed _generic
10632
10633 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10634
10635         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10636
10637         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10638         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10639
10640         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10641
10642         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10643
10644         * support/regression/tests/bug-460010.c: Added test case.
10645
10646         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10647
10648 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10649
10650         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10651
10652         * support/regression/testfwk.c: removed workaround for bug #436344
10653
10654         * support/regression/tests/bp.c: use less memory with mcs51
10655
10656         * support/regression/tests/bug-441448.c: use less memory
10657
10658         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10659
10660         * support/regression/collate-results.py: typo
10661
10662 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10663
10664         * support/regression/tests/fetchoverlap.c: Added new test case.
10665
10666         * support/regression/tests/bp.c: Added new test case.
10667
10668         * support/regression/tests/bug-448984.c: Added new test case.
10669
10670         * support/regression/tests/pow2shifts.c: Added new test case.
10671
10672         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10673         (genlshTwo): Fixed right shift for count > 8.
10674
10675         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10676
10677 2001-09-08    <johan AT FRIJA>
10678
10679         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10680
10681 2001-09-07    <johan AT FRIJA>
10682
10683         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10684
10685         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10686
10687 2001-09-06    <johan AT FRIJA>
10688
10689         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10690         * bernhard noted me at this: "() equals to (void)" (1.38)
10691
10692 2001-09-05    <johan AT FRIJA>
10693
10694         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10695
10696 2001-09-04    <johan AT FRIJA>
10697
10698         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10699
10700
10701 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10702
10703         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10704
10705 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10706
10707         * link/z80/aslink.h: Fixed path for PATH_MAX
10708
10709 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10710
10711         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10712
10713         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10714
10715         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10716
10717         * 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.
10718
10719 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10720
10721         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10722         (genCmp): Fixed up genCmp for the GB with longs.
10723
10724         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10725
10726         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10727
10728         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10729
10730         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10731
10732 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10733
10734         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10735
10736 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10737
10738         * 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.
10739
10740         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10741
10742 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10743
10744         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10745
10746         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10747
10748 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10749
10750   * sim/ucsim/configure:    little improvement of Cygwin-detection
10751   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10752   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10753   * support/regression/tests/bug-221100.c: small changes for mcs51
10754   * support/regression/tests/bug-221168.c: small changes for mcs51
10755   * support/regression/tests/bug-227710.c: small changes for mcs51
10756   * support/regression/tests/staticinit.c: small changes for mcs51
10757   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10758   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10759   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10760
10761 $Revision$