9c8c7f5fba3758de891c4970a81383026155a6f7
[fw/sdcc] / ChangeLog
1 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2
3         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
4         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
5         * support/regression/bug1464657.c: added, new test
6
7 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
8
9         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
10           version number
11
12 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
13
14         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
15           --no-peep and --peep-file <file> are used don't use default rules but
16           do use the <file>
17
18 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
19
20         * src/mcs51/gen.c (genCall): fixed bug 1457608
21
22 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
23
24         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
25         changes seem to cause (trigger?) problems with the build system.
26
27 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
28
29         * src/SDCCpeeph.c (operandsLiteral): new, added,
30           (callFuncByName): inserted operandsLiteral
31         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
32
33 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
34
35         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
36         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
37
38 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
39
40         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
41           implemented patch 1120823 Thanks to Willy De la Court (normal
42           interrupts need an interrupt number now if they are made critical),
43           and enabled nesting of critical functions though not for gbz80
44           (genCritical, genEndCritical): added functions
45           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
46         * src/z80/mappings.i: added "ei" to all mappings
47
48 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
49
50         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
51         submitted by the Debian SDCC maintainer Aurelien Jarno:
52         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
53         archive with gcc 4.1 on mips and wrote the patch"
54
55 2006-03-16 Raphael Neider <rneider AT web.de>
56
57         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
58           the left operand is shorter than the result (c* = lit-c* + int),
59           fixes bug #1450796
60         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
61           OP_SYMBOL
62
63 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
64
65         * src/.version: increased version number to 2.5.5
66         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
67         linking is done manually in pic16 port's _linkEdit,
68         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
69         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
70         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
71         allocate asmop as AOP_ACC,
72         (aopForRemat): added parameter 'bool result' in function declaration,
73         (pic16_aopGet): return AOP_ACC when accessing WREG,
74         (pic16_popGetTempReg): minor modification,
75         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
76         'pic16_allocWithIdx',
77         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
78         calling function in absolute addresses,
79         (genAssign): take into account AOP_ACC asmop,
80         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
81         * src/pic16/pcoderegs.c: some debug functions and lines added,
82         * src/pic16/ralloc.c (decodeRegType): added but commented out,
83         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
84         register too,
85         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
86         call to allocReg, not by manually allocating a new one,
87         (pic16_assignRegisters): now before going through the register
88         allocating functions mark all registers as free. This eliminates some
89         side effects resulting from peephole parser done earlier in the backbone
90
91 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
92
93         * src/SDCCicode.c (geniCodeLogic),
94         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
95
96 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
97
98         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
99           (genSend): bugfix, do not allocate and free twice,
100           (shiftRLong): handle partially overlapping aops
101         * support/regression/tests/bitopcse.c: fixed warning redefined idata
102
103 2006-03-08 Borut Razem <borut.razem AT siol.net>
104
105         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
106           for pic16
107
108 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
109
110         * support/regression/tests/bug1409955.c: new, added
111         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
112         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
113           (aopForSym, aopOp): increment asmop.allocated if reused,
114           (freeAsmop): decrement asmop.allocated and check for zero instead of
115           using asmop.freed,
116           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
117           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
118            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
119            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
120            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
121            genSignedRightShift, genRightShift, genDataPointerGet,
122            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
123            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
124             in reverse order from allocation,
125           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
126             added swappedLR to keep track
127         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
128           pdata & code for GCC, z80, gbz80 & hc08
129         * support/regression/tests/zeropad.c: moved defines to testfwk.h
130
131 2006-03-08 Raphael Neider <rneider AT web.de>
132
133         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
134
135 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
136
137         * device/include/mcs51/c8051f410.h: new SiLabs mcu
138         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
139         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
140
141 2006-03-06 Borut Razem <borut.razem AT siol.net>
142
143         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
144           made the linker quiet
145
146 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
147
148         * src/pic16/gen.c (genPcall): fixed bug #1443644
149         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
150         which dumps before the function entry point a data byte which represents
151         the number of the local variables used by the specified function, added
152         'xinst' for initial support for Extended Instruction Support,
153         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
154         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
155         port->fun_prefix anymore (may change later),
156         (genFunction, genEndFunction): do not store/restore local registers for
157         _main (this should take care the --main-return command line option in
158         the future),
159         (genOr): removed some legacy pic-port instructions,
160         * src/pic16/genarith.c (genAddLit): re-enabled old code because
161         performing operations with SFR's causes data to be written more than
162         once to each SFR. Perhaps SFRs should be handled in special cases...
163         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
164         pcode.h
165         * src/pic16/main.c (_process_pragma): stack bound checking did not take
166         into account for stack starting position,
167         (struct OPTIONS pic16_optionsTable): added command line argument
168         --extended or -y for Extended Instruction Support,
169         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
170         (deassignLRs): *** perhaps the most important change, old 'for' code
171         (commented out for reference), didn't account for some registers which
172         were left marked 'not free' after a pointer operation. The change
173         reduces register usage a lot in some cases
174
175 2006-03-04 Borut Razem <borut.razem AT siol.net>
176
177         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
178           _clean
179         * support/regression/tests/bug-524697.c: decreased array size for
180           mcs51 to fit into the internal RAM
181         * support/regression/Makefile.in: a little bit more verbose
182
183 2006-03-03 Borut Razem <borut.razem AT siol.net>
184
185         * support/regression/fwk/lib/testfwk.c,
186           support/regression/fwk/include/testfwk.h: introduced function
187           _prints(), nonrecursive _printn(), call _initEmu() from main()
188         * support/regression/ports/gbz80/support.asm,
189           support/regression/ports/ucz80/support.asm,
190           support/regression/ports/z80/support.asm,
191           support/regression/ports/ds390/support.c,
192           support/regression/ports/hc08/support.c,
193           support/regression/ports/host/support.c,
194           support/regression/ports/mcs51/support.c,
195           support/regression/ports/xa51/support.c: added empty _initEmu()
196           function
197         * support/regression/ports/pic16/gpsim.cmd,
198           support/regression/ports/pic16/spec.mk,
199           support/regression/ports/pic16/support.c,
200           support/regression/Makefile.in: added pic16 regression test
201
202 2006-03-01 Raphael Neider <rneider AT web.de>
203
204         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
205           genConstPointerGet): use safe way of generating MOVFF to cover
206             literals as well as registers, fixes bug #1440527
207         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
208             dereference
209           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
210             more correctly, fixes bug #1232186
211           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
212         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
213             gplink guess the correct processor in more cases, applied patch
214             from Till Riedel attached to and fixing bug #1436552
215
216 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
217
218         * support/regression/tests/array.c: added, contains check for #1434401
219         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
220
221 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
222
223         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
224         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
225         * device/include/mcs51/c8051f326.h,
226         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
227         * device/include/mcs51/c8051f000.h,
228         * device/include/mcs51/c8051f018.h,
229         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
230           PCON_IDLE,PCON_STOP and added sfr16 definitions
231
232 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
233
234         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
235           genGetWord): fixed bug 1409955
236
237 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
238
239         * device/include/hc08/mc68hc908gp32.h,
240         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
241
242 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
243
244         * src/SDCCast.c (constExprValue): return NULL if not a value
245         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
246         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
247         * support/regression/tests/bitfields.c: enabled signed bitfield for all
248
249 2006-02-13 Borut Razem <borut.razem AT siol.net>
250
251         * src/regression/ptrarg.c: added, fails due to bug #1430967
252         * src/regression/Makefile: ptrarg.c added, ...
253
254 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
255
256         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
257         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
258
259 2006-02-11 Borut Razem <borut.razem AT siol.net>
260
261         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
262           print "Processor: xxx" message to stdout only if --verbose
263
264 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
265
266         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
267         * support/regression/tests/bug1426356.c: added
268         * support/regression/tests/bitfields.c: removed 2 tests
269
270 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
271
272         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
273         * device/include/mcs51/c8051f330.h,
274         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
275           PCON_IDLE,PCON_STOP and added sfr16 definitions
276         * device/lib/_divsint.c,
277         * device/lib/_divuint.c,
278         * device/lib/_divulong.c,
279         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
280           register bank bug for small stackauto
281
282 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
283
284         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
285
286 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
287
288         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
289         * all.dsp: corrected several bin paths
290         * device/include/mcs51/c8051f120.h,
291         * device/include/mcs51/c8051f300.h,
292         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
293           to PCON_IDLE,PCON_STOP
294         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
295         * device/lib/printf_large.c (output_float): fixed bug 1388703
296         * support/regression/tests/bug1057979.c: added test for bug 1388703
297
298 2006-02-08 Raphael Neider <rneider AT web.de>
299
300         * src/pic/pcode.c (pciTRIS): fixed typo,
301           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
302           (LinkFlow): fixed handling of flows that end in a call,
303           (ReuseReg): perform safety check earlier
304         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
305             to work with flows at the beginning of a pBlock,
306             fixes #1426557 (Symbol not previously defined),
307           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
308             usage information
309           (RemoveUnusedRegisters): update register usage info
310         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
311             created, reuse existing ones instead
312         * src/pic/gen.c (genPcall): fixed #1424719
313
314 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
315
316         * link/z80/lkmain.c,
317         * link/z80/lklex.c,
318         * link/z80/lkdata.c,
319         * link/z80/aslink.h: fixed build on current cygwin:
320         replaced getline() by lk_getline()
321
322 2006-02-01 Borut Razem <borut.razem AT siol.net>
323
324         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
325           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
326           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
327           src/regression/bool1.c, src/regression/bool2.c,
328           src/regression/bool3.c, src/regression/call1.c,
329           src/regression/compare.c, src/regression/compare10.c,
330           src/regression/compare2.c, src/regression/compare3.c,
331           src/regression/compare4.c, src/regression/compare5.c,
332           src/regression/compare6.c, src/regression/compare7.c,
333           src/regression/compare8.c, src/regression/compare9.c,
334           src/regression/configword.c, src/regression/for.c,
335           src/regression/inline.c, src/regression/mult1.c,
336           src/regression/nestfor.c, src/regression/or1.c,
337           src/regression/pointer1.c, src/regression/ptrfunc.c,
338           src/regression/rotate1.c, src/regression/rotate2.c,
339           src/regression/rotate3.c, src/regression/rotate4.c,
340           src/regression/rotate5.c, src/regression/rotate6.c,
341           src/regression/rotate7.c, src/regression/string1.c,
342           src/regression/struct1.c, src/regression/sub.c,
343           src/regression/sub2.c, src/regression/switch1.c,
344           src/regression/while.c, src/regression/xor.c,
345           src/regression/create_stc, src/regression/simulate,
346           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
347           regression tests
348         * src/regression/gpsim_assert.h: added
349
350 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
351
352         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
353         ((void (code *) (void)) 0) ();
354         * as/hc08/aslex.c,
355         * as/hc08/aslink.h,
356         * as/hc08/asm.h,
357         * as/hc08/asmain.c,
358         * as/hc08/lkdata.c,
359         * as/hc08/lklex.c,
360         * as/hc08/lkmain.c,
361         * as/mcs51/aslex.c,
362         * as/mcs51/aslink.h,
363         * as/mcs51/asm.h,
364         * as/mcs51/asmain.c,
365         * as/mcs51/lkdata.c,
366         * as/mcs51/lklex.c,
367         * as/mcs51/lkmain.c,
368         * as/z80/aslex.c,
369         * as/z80/asm.h,
370         * as/z80/asmain.c: fixed build on current cygwin:
371         replaced getline() by as_getline()
372
373 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
374
375         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
376         declarator in the symbol chain
377         * src/SDCCsymt.h,
378         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
379         parameter list for function pointers
380         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
381         * support/regression/tests/bug-716242.c: added
382
383 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
384
385         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
386         offset if possible
387         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
388
389 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
390
391         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
392         inifinitely recurseable, added static
393         * support/regression/tests/bug-1408066.c: added
394
395 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
396
397         * src/SDCCicode.h,
398         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
399         renamed, added possibility to create "postLoopLbl"-labels
400         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
401         newiTempLoopHeaderLabel
402         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
403         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
404         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
405         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
406         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
407         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
408         (basicInduction): fixed bug #136564, made static,
409         (loopInduction): changed parameter of basicInduction, made static,
410         (addPostLoopBlock): added
411         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
412         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
413         findLoopEndSeq
414         * support/regression/tests/bug-136564.c: added
415         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
416         --std-sdcc99 to LIBSDCCFLAGS
417
418 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
419
420         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
421         while loop
422         * support/regression/tests/bug-1406131.c: added
423
424 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
425
426         * src/SDCCast.c (decorateType): fix promotion of unary minus
427         * src/SDCCsymt.c (computeType): beautified
428         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
429         (valUnaryPM, valComplement): fix sign and promotion,
430         (valNot): ANSI: result type is int (SDCC: unsigned char)
431         * support/regression/tests/uminus.c: speedup by removing superflous
432         test case 'int'
433         * support/regression/tests/onebyte.c: added promotion and signedness
434         tests for unary minus
435         * support/regressions/tests/bug-477927.c: disable warning about
436         uninitialized variables
437         * support/regression/tests/not.c: added
438
439 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
440
441         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
442         * src/mcs51/gen.c (gen51Code): show final register usage after
443         fillGaps in asm with --i-code-in-asm
444         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
445         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
446         incUsed, rliveClear, adjustIChain): made static,
447         (setFromRange): excluded because it's unused,
448         (findPrevUseSym, markWholeLoop): added,
449         (findPrevUse): rewritten; fixes bug 895992; now a complete search
450         through all branches of predecessors enables sdcc to emit the warning
451         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
452         (rlivePoint): made static, added parameter emitWarnings which is only
453         true during the first run out of two,
454         (findRecursiveSucc, findRecursivePred): removed,
455         (computeLiveRanges): made static, added parameter emitWarnings,
456         (dumpIcRlive): added for debugging only
457         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
458         removed prototype of setFromRange()
459         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
460         in call of computeLiveRanges()
461         * support/regression/tests/bug-895992.c: added
462         * support/regression/tests/bug-971834.c: added
463         * support/valdiag/tests/bug-895992.c: added
464         * support/valdiag/tests/bug-971834.c: added
465
466 2005-12-18 Raphael Neider <rneider AT web.de>
467
468         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
469           (genUnpackBits): improved code for direct operands,
470           (genPackBits): improved code for literal assignment to bitfields
471             and for direct destination operands (no FSR indirection),
472             prevented redundant AND, fixes #1362800,
473           (AccLsh): added parameter to disable masking of the result
474         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
475           skip instructions with side-effects (like incfsz),
476           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
477         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
478         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
479           fixes #1375263
480
481 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
482
483         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
484         volatile variables as spill location
485
486 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
487
488         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
489         replacing literals
490         * support/regression/tests/bug-1376320.c: added
491
492 2005-12-08 Raphael Neider <rneider AT web.de>
493
494         * src/pic/device.c: renamed is_shared to pic14_is_shared
495         * src/pic/gen.c (genIfx): re-enabled handling of sbits
496         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
497           (is_valid_identifier): added for above workaround
498
499 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
500
501         * device/lib/Makefile.in: fixed to enable port-specific-objects
502         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
503           char, thanks Hubert Sack
504         * doc/sdccman.lyx: documented --xstack-loc,
505           elaborated a bit more on interrupts and pitfalls,
506           removed "setjmp/longjmp unsupported",
507           documented some unsupported C99 features
508         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
509         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
510           if, thanks Hubert Sack
511         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
512         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
513           make make_library
514         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
515           regression tests can report resource usage (rfe 700441)
516         * support/regression/collate-results.py: report resource usage
517         * support/regression/ports/ds390/spec.mk,
518         * support/regression/ports/hc08/spec.mk,
519         * support/regression/ports/mcs51/spec.mk,
520         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
521         * support/regression/ports/ds390/uCsim.cmd,
522         * support/regression/ports/hc08/uCsim.cmd,
523         * support/regression/ports/mcs51/uCsim.cmd,
524         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
525         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
526           library, use the default one
527         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
528           building the library
529
530 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
531
532         * config.dsp: added dependency on .version and configure_vc.awk
533         * device/include/setjmp.h: updated for --stack-auto and --xstack
534         * device/include/mcs51/at89c51snd1c.h: corrected line endings
535         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
536         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
537         * device/lib/libsdcc.lib: added _setjmp
538         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
539           (decorateType): fixed bug 1372851,
540           (optimizeGetHbit): fixed warning
541         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
542           array initialisation
543         * support/regression/tests/bug1057979.c: added test for bug 1358192
544         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
545
546 2005-12-03 Borut Razem <borut.razem AT siol.net>
547
548         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
549           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
550
551 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
552
553         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
554         createIval): implement symbol independant "flexible array member",
555         (createIvalCharPtr): implemented flexible array initialisation with a
556         string
557         * src/SDCCsymt.c (copyStruct): removed,
558         (getSize): fixed misleading comment,
559         (getAllocSize): removed, the additional allocation size is now in
560         sym->flexArrayLength,
561         (checkStructFlexArray): new, syntax checks for flexible array members,
562         (compStructSize): added syntax checks for "flexible array members"
563         (copyStruct): removed,
564         (copyLinkChain): removed inefficient fix for bug 770487
565         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
566         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
567         symbol->flexArrayLength
568         * src/SDCCerr.c,
569         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
570         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
571         * support/regression/tests/structflexarray.c: added
572         * support/valdiag/tests/structflexiblearray.c: added
573
574 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
575
576         * src/SDCCast.c (decorateType): fixed bug 1368489
577         * support/Util/SDCCerr.c,
578         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
579
580 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
581
582         * device/include/mcs51/at89c51snd1c.h: added file submitted by
583           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
584
585 2005-11-27 Borut Razem <borut.razem AT siol.net>
586
587         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
588           support/cpp2/mkdeps.h: added command line option
589           -obj-ext=<extension> to SDCPP to define object file externion, used
590           for generation of make dependencies (-M)
591         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
592
593 2005-11-26 Borut Razem <borut.razem AT siol.net>
594
595         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
596           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
597           added pic and pic16 libraries
598
599 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
600
601         * device/include/float.h: Corrected typo in prototype of __fsgt
602
603 2005-11-25 Borut Razem <borut.razem AT siol.net>
604
605         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
606           added creation of model-mcs51-stack-auto libraries
607
608 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
609
610         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
611         and fields-list too
612         * src/SDCCast.c (createIvalArray): removed obsolete comment
613
614 2005-11-24 Borut Razem <borut.razem AT siol.net>
615
616         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
617           added missing device/lib/mcs51/crt*.asm sources
618
619 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
620
621         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
622
623 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
624
625         * device/lib/_fs2schar.c,
626         * device/lib/_fs2sint.c,
627         * device/lib/_fs2slong.c: optimized inline asm
628
629 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
630
631         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
632           Better handling of floats between -1.0 and 0.0.
633
634 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
635
636         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
637           (the missing "if"s prohibited removal of redundant labels)
638
639 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
640
641         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
642           Properly convert floats between -1.0 and 0.0 to long, int, and char
643           types (max integer value of negative floats tends to zero).
644         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
645           Removed changes made so to work properly with floats between
646           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
647           and _fs2char.c
648
649 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
650
651         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
652         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
653         (genCast) cosmetic change
654         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
655         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
656         from mcs51
657         * support/regression/tests/bitfields (testSignedBitfields): added
658
659 2005-11-18 Borut Razem <borut.razem AT siol.net>
660
661         * sdcc/device/lib/Makefile.in: remove all unnecessary files
662         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
663           introduced SILENT option to make building of pic16 libraries less
664
665 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
666
667         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
668           Now they work properly with floats between -1.0 and 0.0
669         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
670
671 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
672
673         * src/SDCCicode.c (printOperand): added missing else
674
675 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
676
677         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
678         reformatted for better readability
679         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
680         signed bitfields
681
682 2005-11-17 Borut Razem <borut.razem AT siol.net>
683
684         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
685           introduced SILENT option to make building of pic16 libraries less
686           verbose - used for nightly snapshot build
687         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
688           available on Win32 platforms.
689         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
690           medium, large, pic and pic16
691
692 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
693
694         * device/lib/printf_large.c: Temporary patch for bug 1358192:
695           printf("%f"...) sets fraction to zero.
696
697 2005-11-16 Raphael Neider <rneider AT web.de>
698
699         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
700           fixes #1357221
701         * src/pic/gen.c (genIfx): implemented for CARRY bit
702         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
703           to generic pointers, fixes #1357332,
704           (pic16_movLit2f): NEW,
705           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
706
707 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
708
709         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
710
711 2005-11-11 Raphael Neider <rneider AT web.de>
712
713         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
714         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
715           compute pointer's type from operand,
716           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
717           improved single bit reads, fixes bug #1353379
718
719 2005-11-09 Borut Razem <borut.razem AT siol.net>
720
721         * support/scripts/sdcc.nsi: added lib/pic to the package
722
723 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
724
725         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
726
727 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
728
729         * support/regression/tests/bug1348008.c: added
730         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
731         * support/regression/tests/bug1337835.c: updated comment
732
733 2005-11-06 Borut Razem <borut.razem AT siol.net>
734
735         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
736           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
737           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
738           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
739           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
740           dynamic construction of cl_error_class and derivates - 2.nd try
741
742 2005-11-05 Borut Razem <borut.razem AT siol.net>
743
744         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
745           bug, which caused Bus Errors on sparc solaris
746
747 2005-11-04 Borut Razem <borut.razem AT siol.net>
748
749         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
750           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
751           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
752           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
753           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
754           and derivates to resolve the initialization problem on OSX
755
756 2005-11-02 Borut Razem <borut.razem AT siol.net>
757
758         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
759           corrected typo - #include <winsock2.h>
760
761 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
762
763         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
764           (_asxxxx_mapping): added org directive for future enhancements
765
766 2005-11-01 Borut Razem <borut.razem AT siol.net>
767
768         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
769           enabled sockets on WIN32
770         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
771
772 2005-10-31 Borut Razem <borut.razem AT siol.net>
773
774         * support/regression/generate-cases.py: escape backslashes in {testcase}:
775           WIN32 backslash path delimiters should be escaped when used in C strings
776         * support/regression/tests/bitfields.c: exclude failing assertions for
777           __CYGWIN32__ and __MINGW32__ hosts
778
779 2005-10-30 Borut Razem <borut.razem AT siol.net>
780
781         * src/SDCCutil.c: corrected double comparison typo
782
783 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
784
785         * device/lib/medium/Makefile: added for new memory model medium
786         * device/include/asm/mcs51/features.h: updated for medium/pdata
787         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
788           added Multiply & Accumulate sbit's and MAC0_PAGE define
789         * device/include/mcs51/c8051f300.h: added sfr16 definitions
790         * device/include/mcs51/c8051f310.h: added sfr16 definitions
791         * device/lib/_mullong.c: update for medium model
792         * device/lib/incl.mk: added medium model
793         * doc/sdccman.lyx: documented medium model
794         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
795         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
796         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
797         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
798           (allocParms): set SCLS and OCLS to pdata for medium model
799         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
800           for pdata,
801           (powof2): return <0 if not power of 2
802         * src/avr/gen.c (genBitWise): use updated powof2
803         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
804           (shiftR2Left2Result): small optimization in setup, save acc when storing,
805           (shiftLLeftOrResult): use B if necessary
806         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
807         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
808         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
809         * support/regression/Makefile.in: added test-mcs51-medium
810         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
811
812 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
813
814         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
815         specifier unsigned
816         * device/lib/time.c (mktime): fixed bug 1334315
817
818 2005-10-28 Raphael Neider <rneider AT web.de>
819
820         * device/include/pic/p16f_common.inc: added common declarations
821         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
822
823 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
824
825         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
826           (aopPutUsesAcc): added to predict accumulator use,
827           (assignResultValue): save acc if necessary,
828           (genMinusDec): store result if indirectly addressed,
829           (genDivOneByte):  save acc if necessary,
830           (movLeft2Result): bugfix if left already in acc,
831           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
832             attention to accumulator use (esp. pdata),
833           (genReceive): receive pdata correctly
834         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
835         * src/SDCCicode.h: added isOperandInPagedSpace prototype
836
837 2005-10-27 Raphael Neider <rneider AT web.de>
838
839         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
840
841 2005-10-27 Raphael Neider <rneider AT web.de>
842
843         * .version: changed version to 2.5.4
844         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
845         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
846           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
847             arithmetics support routines
848         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
849         * device/lib/Makefile.in: also create installdir for pic
850
851         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
852           pic14 port as well
853         * src/pic/device.c (dump_sfr): rewritten to delegate register
854           placement to the linker (use `extern sym' rather than sym EQU addr),
855           (validAddress): fixed to check last specified address
856         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
857           (popGetLit): truncate literal value to 8 bit,
858           (popGet): moved assert to more appropriate place
859           (popGetExternal): create pCode operand from and mark the according
860             symbol as being `extern'
861           (popGetAddr): added sanity check on immediate's offset, provide
862             GPOINTER tag on demand
863           (aopPut): fixed for immediates,
864           (mov2w_op): move operand's address or contents to WREG (depending on
865             operand type), safer variant of mov2w,
866           (movwf,call_libraryfunc): NEW, handy abbreviations,
867           (get_argument_pcop,get_return_val_pcop,pass_argument,
868           get_returnvalue): interface for accessing function parameters and
869             return values,
870           (assignResultValuei,genRet): use new parameter/return value interface
871           (pic14_getDataSize): back to old version handling generic pointers,
872           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
873             provided implementation and/or fixed old one,
874           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
875             calls, removed legacy 8051 reference code
876           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
877           (loadSignToC): NEW, move the operands sign bit to CARRY,
878           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
879             genRightShiftSigned, accepts negative shift counts,
880           (setup_fsr): load FSR and adjust IRP (indirect memory access),
881           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
882             generic pointers, __data pointers and __code pointers,
883           (genUnpackBits,genPackBits): rewritten to work with generic pointers
884             and signed bitfields, limit bitfields to 8 bit,
885           (genDataPointerGet): fixed number of bytes read,
886           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
887           (genPointerGet,genPointerSet): fixed handling of __code pointers,
888             pointers to constant data are no longer assumed to point to __code
889             space, removed invalid pointer types,
890           (bitpatternFromVal): retrieve the PICs representation of an integer
891             or float literal,
892           (genDataPointerSet): fixed assigning to po_immediate operands,
893           (genGenPointerSet): implemented as library call,
894           (genIfx): fixed incorrect condition,
895           (genAddrOf): limit generic pointers' addresses to 2 bytes,
896             provide GPOINTER tag according to destination's storage class,
897           (genCast): added code to handle casting to generic pointers, added
898             sign-/zero extension of the result
899           (aop_isLitLike,op_isLitLike): fixed handling of immediates
900         * src/pic/gen.h: added macros to access IRP bit in STATUS register
901         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
902           extend the result
903         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
904           address/register resides in the shared banks
905           (emitSymbolToFile): improved to handle global and `pinned' symbols,
906             put all variables into separate sections (have the linker arrange
907             them)
908           (picglue): put init code and interrupt handlers in separate sections
909         * src/pic/main.c: added port specific options table, modified to PORT
910           structure to make GPOINTERs 3 byte, added pic14_options
911           (_pic14_do_link): private linking routine (update paths to libraries,
912             add libsdcc.lib by default)
913         * src/pic/main.h: declare pic14_options
914         * src/pic/pcode.c: fixed instructions i/o relations,
915           (RegCond): reverted to correct version,
916           (newpCodeOpLit): truncate literals to 8 bit,
917           (genericPrint): added debug output,
918           (getRegFromInstruction): fixed for various operand types, simplified
919           (BuildFlow): fixed broken handling of isntructions with labels
920           (LinkFlow): start at last instruction in flow (skip trailing comments),
921             pass the flow on to the next instruction after CALL
922           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
923           (insertPCodeInstruction): fixed inserting after a skip instruction,
924           (DoBankSelect): fixed for labeled instructions
925           (OptimizepBlock): honor --nopeep switch
926           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
927         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
928         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
929           (pCodeOptime2pCodes): allow disabling this optimization via
930             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
931             but is still buggy), started implementation of a dataflow based
932             pCode optimization (CSE + dead code elimination)
933           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
934         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
935           names are independant of the stack location and therefore portable across
936           devices
937
938 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
939
940         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
941           (selectSpil): fixed bug 1337835 by not spilling bit variables
942         * support/regression/tests/bug1337835.c: added test for this bug
943         * src/mcs51/peeph.def: restart after rule 3.c,
944           addded rules 263.x to optimize loading constants
945
946 2005-10-26 Raphael Neider <rneider AT web.de>
947
948         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
949         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
950           (genAssign): emit warning when casting literals to generic pointer
951             type, also applies when taking the address of a fixed variable,
952           (genCast): improved casting to generic pointers
953         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
954           extern variables, added verbose error message
955         * device/include/pic16/{string.h,errno.h}: added #pragma library c
956
957 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
958
959         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
960         carry must be complemented too
961         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
962         could be emitted by genMinus
963         * src/SDCCval.c (constVal): fixed bug 1305065
964
965 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
966
967         * src/SDCCast.c (addCast): added promotion for bit variables
968         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
969         promotion casts + optimisation
970         (optimizeGetWord): fix warning 'i' might be used uninitialized
971         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
972         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
973
974 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
975
976         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
977         all chars are promoted to int; promotion should be handled in SDCCast.c
978
979 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
980
981         * device/lib/_strcmp.c: Fixed bug 1326457
982
983 2005-10-11 Raphael Neider <rneider AT web.de>
984
985         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
986         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
987
988 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
989
990         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
991         * support/regression/tests/sfr16.c: added test for the sfr32 bug
992
993 2005-10-04 Raphael Neider <rneider AT web.de>
994
995         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
996           device/lib/pic16/pics.all: added pic18f1320
997         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
998
999 2005-09-30 Raphael Neider <rneider AT web.de>
1000
1001         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1002         * src/pic16/devices.inc: NEW, provides device descriptions
1003         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1004
1005 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1006
1007         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1008           GETHBIT
1009
1010 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1011
1012         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1013           documented Any Order Bit, Higher Order Byte and Higher Order Word
1014         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1015         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1016           (optimizeGetAbit): new, to get any bit, not only the high bit,
1017           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1018           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1019           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1020           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1021             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1022             GETABIT, GETBYTE, GETWORD: decorate them,
1023           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1024           (ast_print): added GETABIT, GETBYTE, GETWORD
1025         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1026         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1027           (geniCodeBinary): new generic binary icode,
1028           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1029         * src/port.h: updated comment for PORT.hasExtBitOp
1030         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1031           (genGetByte): new, to get a single byte,
1032           (genGetWord): new, to get a word from a long,
1033           (gen51Code): added GETABIT, GETBYTE, GETWORD
1034         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1035
1036 2005-09-23 Raphael Neider <rneider AT web.de>
1037
1038         * configure.in, configure: have device/lib/pic configured
1039         * device/lib/Makefile.in: added model-pic14
1040         * device/lib/clean.mk: added pic/ to clean rule
1041         * device/lib/pic: added rudimentary pic14 library providing support
1042           functions for multiplication/division/generic pointer access
1043         * src/SDCCopt.c (convilong): mark support functions as extern
1044           for pic14 port as well
1045         * src/pic/gen.c (genMult): added assertions,
1046           (genpic14Code): emit warning on unhandled iCodes
1047         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1048         * src/pic/pcode.c (pCodeOpCopy),
1049         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1050           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1051           SFR_REGISTER}), made safe for future extensions
1052         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1053           instructions even if preceeded by SKIP instructions (also remove
1054           them); removed unused code
1055         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1056           prevents leaving parts of the structure uninitialized after copying
1057
1058 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1059
1060         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1061           ago by me
1062         * support/regression/tests/addsub.c: added test for the bug
1063
1064 2005-09-21 Raphael Neider <rneider AT web.de>
1065
1066         * device/include/pic16/pic18f1220.h,
1067           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1068         * device/lib/pic16/Makefile.rules: added missing opening paren
1069         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1070           are provided in genutils.c,
1071           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1072           operand/result sizes,
1073           (genCmp): assert on NULL pointers first, then check deref'ed values
1074         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1075           result size
1076
1077 2005-09-18 Raphael Neider <rneider AT web.de>
1078
1079         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1080           as these are now unused,
1081           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1082         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1083           local, avoids uninitialized pointer dereference on r->name
1084         * src/pic16/ralloc.c (newReg): fixed indentation
1085
1086 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1087
1088         * src/SDCCval.c (constVal): fixed bug 730366
1089         * support/Util/SDCCerr.c,
1090         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1091
1092 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1093
1094         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1095
1096 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1097
1098         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1099
1100 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1101
1102         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1103           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1104         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1105           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1106         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1107         * packihx/packihx.c (hexDigit): made c unsigned char
1108         * as/mcs51/lklibr.c (fndsym),
1109         * link/z80/lkgb.c (gb),
1110         * link/z80/lklibr.c (fndsym),
1111         * link/z80/lkrloc.c (relr),
1112         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1113         * src/SDCC.lex (checkCurrFile, process_pragma),
1114         * src/SDCCglue.c (spacesToUnderscores),
1115         * src/SDCCmain.c (setParseWithComma, processFile),
1116         * src/asm.c (tvsprintf, printCLine),
1117         * src/avr/gen.c (emitcode, aopPut),
1118         * src/ds390/gen.c (emitcode),
1119         * src/hc08/gen.c (emitcode, emitinline),
1120         * src/mcs51/gen.c (emitcode, genInline),
1121         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1122           tokenizeLineNode),
1123         * src/pic/ralloc.c (debugLog),
1124         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1125           tokenizeLineNode),
1126         * src/pic16/ralloc.c (debugLog),
1127         * src/z80/main.c (_process_pragma):
1128            made all ctype.h function calls safe
1129         * src/SDCCopt.c: include math.h for fabs
1130         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1131           and used them throughout the code to make ctype.h function calls safe
1132         * src/ds390/main.c (asmLineNodeFromLineNode),
1133         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1134         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1135            unsigned char*
1136         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1137           (newpCodeAsmDir): made ctype.h function calls safe
1138         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1139           pic16_emitcode):  made lbp unsigned char*
1140         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1141           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1142         * src/xa51/gen.c (emitcode),
1143         * src/z80/gen.c (_emit2): made lbp unsigned char*
1144         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1145            char*
1146
1147 2005-09-05 Raphael Neider <rneider AT web.de>
1148
1149         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1150           access bank splitpoint
1151
1152 2005-09-05 Raphael Neider <rneider AT web.de>
1153
1154         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1155
1156 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1157
1158         * .version: changed to version 2.5.3
1159         * doc/sdccman.lyx: changed version to 2.5.3,
1160           documented --codeseg and --constseg and pragma codeseg and constseg,
1161           documented bit parameters (reentrant) and bit returning
1162         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1163            currFunc->recvSize, but is this ok for all ports?
1164           (ast2iCode): result of ~ on unsigned char must be cast to int for
1165            bool to work
1166         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1167           function pointers in bit space
1168         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1169           (processFuncArgs): call port.reg_parm() with reentrancy info
1170         * src/port.h,
1171         * src/avr/main.c,
1172         * src/ds390/main.c,
1173         * src/hc08/main.c,
1174         * src/pic/main.c,
1175         * src/pic16/main.c,
1176         * src/xa51/main.c,
1177         * src/z80/main.c: port.reg_parm prototype extended with
1178           "bool reentrant" parameter
1179         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1180           options.stackAuto for allocating bit register parameters
1181         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1182           (genSend): set BitBankUsed if it is,
1183           (selectRegBank): factored out of genCall for use in genPcall,
1184           (genCall): removed redundant dtype assignmen, use selectRegBank,
1185           (genPcall): handle returning in Carry properly, save in F0 if needed,
1186           (genReceive): handle bit register parameters
1187         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1188           (mcs51_assignRegisters): enable bit registers for all reentrant
1189            functions and don't set BitBankUsed unconditionally
1190         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1191         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1192         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1193
1194 2005-08-27 Borut Razem <borut.razem AT siol.net>
1195
1196         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1197         ppc-osx (Darwin) does not support -u option. It seems that it is
1198         supported only on Linux - GNU cp
1199
1200 2005-08-25 Borut Razem <borut.razem AT siol.net>
1201
1202         * sim/ucsim/gui.src/serio.src/Makefile.in,
1203           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1204           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1205           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1206           install and strip, since the strip at /usr/ccs/bin should be used
1207           on solaris
1208
1209 2005-08-24 Borut Razem <borut.razem AT siol.net>
1210
1211         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1212
1213 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1214
1215         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1216         ffffffffu
1217
1218 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1219
1220         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1221         * as/mcs51/lkmain.c (link_main): fixed warning
1222         * device/include/stdbool.h: ds390 has no advanced bit support yet
1223         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1224         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1225         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1226           and updated their macros
1227         * src/SDCCval.c (constVal): updated comment for renamed b_long
1228
1229 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1230
1231         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1232         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1233           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1234           (oprio): set priority for '['
1235         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1236            and adb_24_bit
1237         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1238         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1239         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1240         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1241           added overlayable BIT_BANK area
1242         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1243           (summary2): explain 'T' in legenda
1244         * as/mcs51/lkrloc.c: replaced old K&R style,
1245           (relr): added R_BIT processing,
1246           (errmsg): added "Bit-addressable relocation error",
1247           (adb_bit): added for converting from byte- to bit-addressable space,
1248           (adb_24_bit): added for converting from byte- to bit-addressable space
1249         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1250            used in reentrant functions now even as return value
1251         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1252         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1253           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1254         * src/SDCCglobl.h: added indicator BitBankUsed
1255         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1256            the bit registers b0-b7
1257         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1258           (geniCodeCast): fixed bug 1263853,
1259           (geniCodeLogicAndOr): put result in bool or char,
1260           (geniCodeReceive): added parameter func for accessing the return type,
1261           (geniCodeFunctionBody): pass func to geniCodeReceive
1262         * src/SDCCmain.c: added indicator BitBankUsed
1263         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1264         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1265           (checkSClass): don't put automatic bool/bit on stack,
1266           (checkFunction): removed check on function cannot return bit
1267         * src/SDCCsymt.h: added newBoolLink prototype
1268         * src/mcs51/gen.c (rb1regs): added bit registers,
1269           (movc): created for assigning to carry,
1270           (pushReg, popReg): created for pushing registers,
1271           (sameRegs): check both AOP_REG and AOP_CRY types,
1272           (aopOp): handle bit registers,
1273           (aopPut): optimization no self-assign,
1274           (saveRegisters): push reg->base (bits) only once for bit registers,
1275            and use pushReg,
1276           (unsaveRegisters): pop reg->base only once and use popReg,
1277           (assignResultValue): added parameter func and return in carry for bits,
1278           (genIpush): optimization no reload in A if not changed,
1279           (genSend): bit parameters in reentrant functions are passed in bit
1280            registers by first assigning to bits in B, then save registers and
1281            copy B to bits,
1282           (genCall): handle returning in Carry properly, save it in F0 if needed,
1283           (genPcall): updated assignResultValue call, this is not safe yet for bit
1284            returning function !!!
1285           (genFunction): don't generate equ's for bit registers and use pushReg,
1286           (genEndFunction): take care of bit returning functions and use popReg,
1287           (genRet): return bit in Carry,
1288           (genIfx): optimize bit registers and other directly addressable bits,
1289           (genReceive): updated assignResultValue call
1290         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1291           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1292            registers when using stack-auto
1293         * src/mcs51/ralloc.c (_G): added allBitregs,
1294           (regs8051): added the bit registers,
1295           (createStackSpil): use macro IS_BIT,
1296           (getRegBit): added to allocate a bit register, else spill,
1297           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1298           (updateRegUsage): factored out to ease stepping while debugging,
1299           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1300            also allocate bit registers,
1301           (fillGaps): handle bit registers,
1302           (findAllBitregs): added to create bit vector with all bit registers,
1303           (mcs51_allBitregs): returns this bit vector,
1304           (mcs51_assignRegisters): when using stack-auto use bit registers for
1305            passing parameters and creating local variables
1306         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1307
1308 2005-08-22 Borut Razem <borut.razem AT siol.net>
1309
1310         * device/lib/Makefile.in: replaced find option -or with -o
1311           to make it run on solaris
1312
1313 2005-08-22 Raphael Neider <rneider AT web.de>
1314
1315         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1316           fixes #1265442 (crash on Solaris)
1317
1318 2005-08-20 Borut Razem <borut.razem AT siol.net>
1319
1320         * configure, configure.in: added tests for libsocket and libnsl libraries,
1321           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1322           from support/regression/Makefile.in
1323         * support/regression/Makefile.in: added
1324         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1325         * sim/ucsim/libtool: regenerated on sparc-solaris
1326         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1327           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1328           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1329           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1330           sparc-solaris, which doesn't use GNU ld linker
1331         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1332         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1333
1334 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1335
1336         * src/mcs51/peeph.def: updated comments
1337
1338 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1339
1340         * device/lib/_gptrget.c,
1341         * device/lib/_gptrput.c: slightly shorter
1342         * doc/sdccman.lyx: incremented version
1343         * src/mcs51/peeph.def: moved peephole comments to the line of first
1344           change to better keep line correlation, reanimated 186.e
1345         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1346
1347 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1348
1349         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1350           David Saxton with quotes around file name.
1351
1352 2005-08-15 Borut Razem <borut.razem AT siol.net>
1353
1354         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1355           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1356           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1357           make tests run on x86_64 platform
1358
1359 2005-08-13 Raphael Neider <rneider AT web.de>
1360
1361         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1362           as it might be executed DURING a build (parallel make is wonderful)
1363
1364 2005-08-13 Raphael Neider <rneider AT web.de>
1365
1366         * device/lib/Makefile.in (port-specific-objects-pic16):
1367           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1368         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1369           dependency
1370         * device/lib/pic16/Makefile.rules: build subdirs before creating
1371           the library, removed builddir rule, create $(builddir) early in
1372           recurse rule, use empty recurse rule for leaf directories
1373         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1374           mkdir errors (race condition), removed duplicate suffix "hex"
1375           from clean rules
1376         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1377         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1378           prevents mkdir -p from aborting on Alpha
1379
1380 2005-08-12 Raphael Neider <rneider AT web.de>
1381
1382         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1383           db-statements in order to allow for arrays of pointers in code
1384           sections to be placed without interspersed 0-padding, fixes
1385           bug #1256215
1386         * (emitStatistics): fixed division by zero for pic18f1220
1387         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1388           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1389         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1390         * (pic16_pCodeConstString): keep track of already emitted string
1391           literals to prevent "duplicate definitions of symbol _str_NR"
1392         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1393           debug message
1394         * device/lib/Makefile.in: ignore failing PIC16 library builds
1395         * device/lib/pic16/Makefile: do not build if gputils are missing
1396         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1397
1398 2005-08-10 Raphael Neider <rneider AT web.de>
1399
1400         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1401           my last commit)
1402
1403 2005-08-10 Raphael Neider <rneider AT web.de>
1404
1405         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1406           Rokas' patch to add the new fixed point type "__fixed16x16"
1407         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1408           functions for __fixed16x16 arithmetics
1409         * device/lib/pic16: reimplemented the build system to support
1410           a separate build directory, better handling of libio (create
1411           the library in a separate subdir for each architecture) and
1412           easier configuration (centralized in Makefile.common)
1413
1414 2005-08-07 Raphael Neider <rneider AT web.de>
1415
1416         * src/pic16/gen.c (genrshTwo): fixed sign extension
1417         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1418         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1419           added T0CONbits
1420         * device/include/pic16/pic18f4220.h: NEW, header for
1421           pic18f4220 and pic18f4320
1422         * device/include/pic16/pic18fregs.h: added new devices,
1423           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1424         * device/include/pic16/signal.h: resolved name clashes
1425           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1426           to also allow testing for interrupt enable bits, added
1427           comments on how to use the macros
1428         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1429         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1430           register definitions for the devices
1431         * device/lib/pic16/pics.all: added new devices
1432         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1433           allocated memory
1434         * device/lib/pic16/libc/stdlib/memfree: do not count
1435           the block header as free memory
1436         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1437           simplified and added missing end-of-blocklist-marker
1438           (reported by Peter Onion, fixes #1252814)
1439         * (_mergeHeapBlock): fixed loop condition
1440         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1441           len==0, restructured code
1442         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1443           up a bit, reduced bitfield accesses, prevent endless loops
1444           in case of heap corruption
1445         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1446           "unreferenced arguments/must return a value" warnings
1447         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1448           replaced BAUDREG with SPBRG
1449         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1450           device/lib/pic16/debug/gstack/gstack.c: replaced
1451           _naked, _asm, _endasm with __naked, __asm, __endasm
1452
1453 2005-08-05 Raphael Neider <rneider AT web.de>
1454
1455         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1456           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1457
1458 2005-08-05 Borut Razem <borut.razem AT siol.net>
1459
1460         * device/lib/Makefile.in: added missing ';'
1461         * configure: removed ^M characters
1462
1463 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1464
1465         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1466           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1467           License
1468
1469 2005-08-04 Borut Razem <borut.razem AT siol.net>
1470
1471         * configure.in: pic16 libraries build 2nd try - enable running
1472           configure in device/lib/pic16
1473         * configure: regenerated from configure.in
1474         * device/lib/Makefile.in: create $(PORT)/bin directory
1475
1476 2005-08-03 Raphael Neider <rneider AT web.de>
1477
1478         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1479           to get/set values via pointers
1480         * (genUnpackBits,genPackBits): changed detection of
1481           ptr->bitfield vs. sym.bitfield, fixed access via generic
1482           pointers, removed dead (wrong) code for multibyte bitfields
1483         * (genNearPointerGet, genGenPointerGet): removed useless code,
1484           fixed bitfield detection, fixes #1250594
1485         * (genNearPointerSet): removed useless code
1486         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1487           and introduced macro pic16_emitpcode that conditionally emits
1488           the origin of the following pCode (useful for debugging SDCC)
1489         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1490         * (createDefmap): fixed handling of LFSR for --optimize-df
1491
1492 2005-08-02 Borut Razem <borut.razem AT siol.net>
1493
1494         * device/lib/Makefile.in: pic16 libraries build enabled since
1495           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1496
1497 2005-08-02 Raphael Neider <rneider AT web.de>
1498
1499         * src/pic16/gen.c (genPackBits): removed deprecated warning
1500         * (genGenPointerSet): fixed bitfield detection
1501
1502 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1503
1504         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1505
1506 2005-07-31 Raphael Neider <rneider AT web.de>
1507
1508         * device/lib/pic16/libdev/pic18f458.c,
1509           device/include/pic16/pic18f458.h: added missing T0CONbits
1510
1511 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1512
1513         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1514
1515 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1516
1517         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1518
1519 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1520
1521         * device/include/mcs51/at89c51ed2.h: added.
1522
1523 2005-07-23 Raphael Neider <rneider AT web.de>
1524
1525         * src/pic/gen.h: added emitpcode macro for debugging
1526         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1527           and replace by macro adding debug information on demand
1528         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1529         * (gencjne): tried to fix; replaced with correct (slower) code
1530         * (gen{Unp,P}ackBits): fixed single bit access
1531         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1532         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1533           previous instruction
1534         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1535           register has to be handled with care (forbidding movement
1536           of assignments/uses, removing assignments completely, ...)
1537         * (pCodeOptime2pCodes): make use of regIsSpecial
1538         * added lots of debugging output (commented out)
1539         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1540           from being reused as result UNLESS it is known to work
1541
1542 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1543
1544         * support/Util/dbuf.h: include <stddef.h> for size_t
1545         * .version: changed to version 2.5.2
1546
1547 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1548
1549         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1550
1551 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1552
1553         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1554           (genModOneByte): removed needless psha/pula
1555
1556 2005-07-22 Raphael Neider <rneider AT web.de>
1557
1558         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1559           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1560         * src/pic/gen.c (resolveIfx): do not "invent" labels
1561         * (genSkipc): changed to positive logic
1562         * (genSkipCond): removed as no longer needed
1563         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1564           backport from PIC16
1565         * (genLeftShift): check operands are in different registers
1566         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1567           INCF does not update CARRY...
1568         * src/pic/main.c: fixed _linkCmd
1569         * src/pic/pcode.c (unlinkpCode): added inactive code
1570         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1571           alive (do not assign result and operand overlapping registers)
1572
1573 2005-07-22 Raphael Neider <rneider AT web.de>
1574
1575         * src/pic/device.c (dump_sfr): replaced register declaration with
1576           call to emitSymbolToFile() to avoid duplicate symbols
1577         * (assignRelocatableRegisters): do not declare external symbols
1578         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1579           right (take size of type, not etype)
1580         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1581         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1582         * (packRegsForAccUse): disabled assignment of WREG as
1583           the result reg to prevent occurence of just fixed #1235003,
1584           fixes #1242954
1585         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1586           symbols (avoids duplicate symbols in .asm file)
1587         * (pic14emitRegularMap): use emitSymbolToFile()
1588         * src/pic/gen.c (aopOp): fixed spillLocation handling
1589         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1590         * (genDataPointerSet): removed unneccessary variables/output
1591
1592 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1593
1594         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1595         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1596
1597 2005-07-21 Raphael Neider <rneider AT web.de>
1598
1599         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1600           architecture cannot handle them efficiently, fixes bug #1235003
1601         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1602           check for empty sets before using them (fixes bug #1232190)
1603
1604 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1605
1606         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1607           (lnksect2): generate warnings for memory overlap
1608         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1609           constseg to set the name of these segments so you can instruct the linker
1610           to place them in banks
1611         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1612         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1613           added code_seg and const_seg to options
1614         * src/SDCCglue.c (emitMaps): use options.const_seg,
1615           (createInterruptVect): put interrupt vectors in segment HOME,
1616           (glue): put HOME before static segment and put the main glue in HOME,
1617           (glue): use options.code_seg
1618         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1619         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1620           these segments so you can instruct the linker to place them in banks
1621           (linkEdit): use code_loc for HOME segment which should be the first
1622           segment in code memory now
1623         * src/SDCCmem.c: fixed more stuff like bug 1238386
1624         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1625           (changePointer): don't change function pointers to code pointers for
1626           banked functions,
1627           (compareType): added exceptional check for banked function pointers
1628         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1629         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1630           after static in code memory
1631         * src/mcs51/gen.c: added aopLiteralLong prototype,
1632           (aopForSym): use getSize for functions,
1633           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1634           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1635           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1636           the segment,
1637           (genPcall): use call for literal function pointers and generate banked
1638           calls over the one trampoline so there's only one place for the user to
1639           modify according to his/hers hardware,
1640           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1641           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1642         * src/mcs51/main.c: added keyword banked,
1643           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1644         * support/Util/SDCCerr.c,
1645         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1646           needed for passing the bank and address to the trampoline
1647         * device/lib/mcs51/crtbank.asm: added for bankswitching
1648         * device/lib/mcs51/Makefile: added crtbank
1649
1650 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1651
1652         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1653           for fields at offset 0 of a struct or union as reported
1654           on 2005-07-07 in the developer mailing list.
1655
1656 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1657
1658         * src/SDCCmem.c: fixed bug 1238386
1659
1660 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1661
1662         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1663           (patch #1144962), added peephole 300, enabled 259.x
1664         * doc/sdccman.lyx: removed screenshot and provided link instead
1665
1666 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1667
1668         * doc/sdccman.lyx: added section about debugging with ddd
1669         * doc/figures/ddd_example.eps: screenshot of debugging session
1670
1671 2005-07-04 Raphael Neider <rneider AT web.de>
1672
1673         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1674           like CODE pointers, fixes #1115683
1675         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1676           call, fixes bugs #1232211, #1228110,
1677           fixed wrong casts to pCodeFlow from pCodeInstructions
1678
1679 2005-07-04 Raphael Neider <rneider AT web.de>
1680
1681         * src/pic/gen.c (popGet): changed assert to allow for
1682           bit operands
1683         * (popGetAddr): changed signature to provide
1684           an additional index, patched all call sites
1685         * (genCmpEq): handle literal-like operands correctly
1686         * (genAddrOf): added sanity checks on __code/__data pointers
1687         * (genAssign): added handling of symbols from __code section
1688         * (gencjne): do not generate code for comparisons whose result
1689           is neither stored nor used, fixes bug #1171114
1690         * (AccLsh, AccRsh): operate on operand instead of WREG
1691         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1692           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1693           by known count
1694         * rewrote complete shift-by-literal logic, commented unused
1695           functions out
1696         * (genConstPointerGet): get multiple bytes (if result size > 1),
1697           fixed handling of non-immediate addresses
1698         * (genPointerGet): handle CODE pointers like CONST pointers
1699         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1700         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1701           operand is to be treated as a literal or not
1702         * (mov2w,genPcall,genCmpEq),
1703           src/pic/genarith.c: use aop_isLitLike() to decide between
1704           literal/register contents
1705         * (addSign): added missing offset
1706         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1707           only emit comment in debug-mode,
1708           use {aop,op}_isLitLike throughout the file
1709         * src/pic/glue.c: fix initializers for pointers (work in progress)
1710         * src/pic/pcode.c (get_op): honor index on _const symbols
1711         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1712         * (dumppBlock): added pCode size estimation
1713         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1714           check for IS_SYMOP before OP_SYMBOL'ing
1715         * fixed indentation, compacted switch-statements
1716         * (allocReg): find free register and allocate it instead of
1717           allocating new registers all the time
1718         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1719           registers as its operands (necessary only for multibyte GETs)
1720
1721 2005-07-01 Raphael Neider <rneider AT web.de>
1722
1723         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1724           debugging .asm-output macros FENTRY + FEXIT
1725         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1726           way... I wonder...
1727         * (emitpComment): NEW, printf to pCode
1728         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1729           offset handling
1730         * (popGetAddr): NEW, variant of popGet to access an immediates
1731           high(er) bytes instead of the n'th byte of memory they reference,
1732           replaced popGet with popGetAddr where neccessary
1733         * (genDataPointerGet): reactivated and fixed implementation
1734         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1735           accesses
1736         * (genDataPointerSet): fixed multibyte assignments
1737         * (genpic14Code): fixed --i-code-in-asm handling
1738         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1739         * (genPlus): fixed index-out-of-bounds error
1740         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1741         * src/pic/ralloc.c: added debugging output macro FENTRY2
1742         * (spillThis): fixed indentation, enbraced for-body for clarity
1743         * (rematStr): commented out as now unused
1744         * (regTypeNum): commented out special spill case (overwrites
1745           arbitrary values)
1746         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1747
1748 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1749
1750         * doc/sdccman.lyx: documented sfr16/sfr32,
1751           added example for using storage class with function pointers
1752         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1753
1754 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1755
1756         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1757         * device/lib/_itoa.c,
1758         * device/lib/_ltoa.c: optimized codesize
1759         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1760           but don't know how to suppress the double warning.
1761         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1762         * support/Util/SDCCerr.c,
1763         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1764
1765 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1766
1767         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1768           fixed old K&R prototypes
1769         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1770         * device/lib/_gptrget.c,
1771         * device/lib/_gptrgetc.c,
1772         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1773           also new versions for small generic pointers and banked generic pointers
1774         * src/port.h: added const_name
1775         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1776         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1777         * src/SDCCcse.c (findPrevIc): check all associative operators
1778         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1779         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1780         * src/SDCCmem.c: updated comments,
1781           set far-space to 0 for pdata, results in optimized code
1782         * src/SDCCmem.h: added macro CONST_NAME
1783         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1784           moving the info into the highest bits, see also gptrget/gptrput
1785         * src/src.dsp: added sdcc.ico to project files
1786         * src/avr/gen.c (genCast): fixed bug 0x%d
1787         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1788         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1789           relation between ptr_type and DCL_TYPE,
1790           (genCast): fixed bug 0x%d
1791         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1792           (CODE)" for const_name
1793         * src/hc08/gen.c (genCast): fixed bug 0x%d
1794         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1795           (hc08_port): added "CONST (CODE)" for const_name
1796         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1797           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1798           between ptr_type and DCL_TYPE,
1799           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1800           operand* and took AOP() inside function so sfr-ness can be checked,
1801           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1802           new prototype,
1803           (genFunction, genEndFunction): optimized stack setup,
1804           (genMinus): optimized for literals with ending zeroes (in bytes),
1805           (genCast): fixed bug 0x%d
1806         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1807           (mcs51_port): added "CONST (CODE)" for const_name
1808         * src/mcs51/peeph.def: made rule 226 more generic
1809         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1810         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1811         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1812         * src/z80/main.c (z80_port): added NULL for const_name,
1813           (gbz80_port): added NULL for const_name
1814         * support/regression/tests/bug663539.c,
1815         * support/regression/tests/sfr16.c: new tests
1816
1817 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1818
1819         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1820
1821 2005-06-24 Raphael Neider <rneider AT web.de>
1822
1823         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1824           corrected typos...
1825         * device/include/pic16/signal.h: added USBIF
1826           and SIG_USB
1827
1828 2005-06-24 Raphael Neider <rneider AT web.de>
1829
1830         * device/lib/pic16/libdev/pic18f2455.c,
1831           device/include/pic16/pic18f2455.h: NEW
1832         * device/include/pic16/pic18fregs.h,
1833           device/lib/pic16/pics.all,
1834           src/pic16/device.c: added 18f2455
1835         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1836           device/include/pic16/{pic18f[68][567].h,usart.h}:
1837           replaced MULTIPLE_USARTS define with more relaible
1838           compatibility sfrs (for USART access)
1839
1840 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1841
1842         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1843           and the output asm file line is printed on two lines.
1844
1845 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1846
1847         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1848           BGT, BLE, BHI, and BLS instructions
1849         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1850           genCmpEq): removed
1851         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1852           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1853           fixes bug #1216342
1854         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1855
1856 2005-06-15 Raphael Neider <rneider AT web.de>
1857
1858         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1859         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1860         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1861           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1862           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1863
1864 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1865
1866         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1867           Marcel Telka in bug #1215704
1868
1869 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1870
1871         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1872           located in shared memory bank.
1873
1874 2005-05-31 Raphael Neider <rneider AT web.de>
1875
1876         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1877           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1878           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1879
1880 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1881
1882         * device/lib/_strncpy.c: fixed the fix
1883
1884 2005-05-26 Raphael Neider <rneider AT web.de>
1885
1886         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1887           initializers with \0, bug #1208187
1888         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1889           intializers with \0, bug #1208187
1890
1891 2005-05-26 Raphael Neider <rneider AT web.de>
1892
1893         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1894           initializers with \0, bug #1208187
1895         * src/pic16/main.c (_process_pragma): added sanity checks
1896           for stack position and size, emit warnings when appropriate
1897
1898 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1899
1900         * device/lib/_strncpy.c: fixed not filling with \0
1901
1902 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1903
1904         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1905           createFunction),
1906         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1907           compound_statement),
1908         * src/SDCCsymt.h,
1909         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1910
1911 2005-05-24 Raphael Neider <rneider AT web.de>
1912
1913         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1914
1915 2005-05-24 Raphael Neider <rneider AT web.de>
1916
1917         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1918           TRISE definitions, closes bug #1162453
1919
1920 2005-05-22 Raphael Neider <rneider AT web.de>
1921
1922         * src/pic16/main.c (_process_pragma): check for missing
1923           arguments to pragmas code and udata
1924         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1925           consistency fixes to match other headers (thanks to Jim Paris)
1926         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1927
1928 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1929
1930         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1931
1932 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1933
1934         * support/regression/tests/bug1198642.c: new test
1935         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1936         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1937         * support/scripts/resource.h,
1938         * support/scripts/resource.rc,
1939         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1940         * support/scripts/sdcc.ico: added 32x32 icon
1941
1942 2005-05-18 Raphael Neider <rneider AT web.de>
1943
1944         * device/lib/pic16/libdev/pic18f*.c,
1945         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1946           keywords to "__sfr" and "__at (X)"
1947         * device/include/pic16/pic18fregs.h: added pic18f4520
1948         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1949           #1203088 (MPLAB compatibility)
1950
1951 2005-05-17 Raphael Neider <rneider AT web.de>
1952
1953         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1954         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1955         * device/lib/pic16/pics.all: added new devices
1956         * src/pic16/device.c: added support for pic18f4520
1957
1958 2005-05-16 Raphael Neider <rneider AT web.de>
1959         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1960         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1961         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1962           convenience function for bit access
1963
1964 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1965
1966         * device/lib/printf_large.c: fixed bug 1193299
1967         * support/regression/tests/bug1057979.c: added test %3.3s
1968
1969 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1970
1971         * device/include/mcs51/8051.h,
1972         * device/include/mcs51/8052.h: made parseable with lint
1973         * device/include/mcs51/lint.h: added include file for (sp)lint
1974         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1975         * doc/cdbfileformat.lyx,
1976         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1977
1978 2005-05-14 Raphael Neider <rneider AT web.de>
1979
1980         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1981         * device/lib/pic16/libc/stdlib/itoa.c (new)
1982         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1983         * device/lib/pic16/libio/Makefile: exclude subdir according to
1984           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1985         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1986         * src/pic16/gen.c (genFunction): prevent annoying warning
1987         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1988           nameclashes on BeOS
1989         * support/cpp2/cppmain.c (cpp_output_string): new
1990         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1991           fixes bug 1116802
1992
1993 2005-05-13 Borut Razem <borut.razem AT siol.net>
1994
1995         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1996
1997 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1998
1999         * .version: changed to version 2.5.1; back to bleeding edge development
2000
2001 2005-05-11 Borut Razem <borut.razem AT siol.net>
2002
2003         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2004           generate PDF version 1.3 documents
2005
2006 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2007
2008         * .version: changed to version 2.5.0
2009
2010 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2011
2012         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2013
2014 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2015
2016         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2017         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2018         well as many smaller updates.
2019         * .version: changed to version 2.5.0-pre1
2020
2021 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2022
2023         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2024
2025 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2026
2027         * support/regression/tests/bug1185672.c: added
2028         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2029           bug 1185672
2030         * src/mcs51/gen.c (genCall): added comments, made it look safer
2031         * src/mcs51/gen.c (genEndFunction): simplified
2032
2033 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2034
2035         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2036
2037 2005-04-14 Borut Razem <borut.razem AT siol.net>
2038
2039         * fixed bug 1045046 - SIGSEGV with really simple code?:
2040           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2041           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2042
2043 2005-04-14 Borut Razem <borut.razem AT siol.net>
2044
2045         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2046           src/pic16/device.h: temporarily disabled experimental #inline pragma
2047           for 2.5.0 release
2048
2049 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2050
2051         * device/include/z80/stdio.h,
2052         * device/include/z80/string.h: removed these highly incomplete files so
2053           SDCC can use the default ones in device/include/
2054
2055 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2056
2057         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2058         gcc warning.
2059         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2060         fix sdcpp warnings.
2061
2062 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2063
2064         * device/include/malloc.h: removed redundant __reentrant prototypes
2065         * device/lib/_mullong.c: added working xstack variant in asm (C version
2066           doesn't pass regression tests)
2067         * device/lib/bpx.c: used __data and made bpx char for mcs51
2068         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2069           (createFunction): fixed bug with xstackPtr
2070         * src/SDCCcse.c: corrected comments
2071         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2072           (killDeadCode, eBBlockFromiCode): removed unused code
2073         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2074           corrected comments
2075         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2076           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2077           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2078           (genModOneByte): fixed warning in MSVC
2079         * src/mcs51/main.c (): added comments
2080         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2081
2082 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2083
2084         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2085
2086 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2087
2088         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2089
2090 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2091
2092         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2093         characters arrays of larger size than the declared one.
2094
2095 2005-04-10 Borut Razem <borut.razem AT siol.net>
2096
2097         * src/pic/gen.c (genInline),
2098           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2099           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2100           (findNextInstruction), (findPrevInstruction),
2101           (findInstructionUsingLabel),
2102           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2103         * src/pic/pcode.c (findLabel): added missing '\n'
2104         * src/src.dsp: added SDCCdwarf2.c to the project
2105
2106 2005-04-09 Borut Razem <borut.razem AT siol.net>
2107
2108         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2109
2110 2005-04-08 Raphael Neider <rneider AT web.de>
2111
2112         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2113           into the chain after a given one) and mergeDefmapSymbols (combine
2114           defmap entries for each symbol per pcode)
2115         * (createDefmap): have defmap entries merged in the end
2116         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2117           a symbol before replacing one access type's symbol, merge symbols in
2118           the end (replacement symbol might already have an entry)
2119         * (assignValnums): keep reference to written WREG intact
2120
2121 2005-04-08 Raphael Neider <rneider AT web.de>
2122
2123         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2124           Alpha)
2125
2126 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2127
2128         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2129         bytes
2130
2131 2005-04-07 Raphael Neider <rneider AT web.de>
2132
2133         * device/include/pic16/usart.h: added compatibility defines for
2134           devices with more than one USART
2135         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2136
2137 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2138
2139         * device/lib/Makefile.in: updated for port specific include
2140
2141 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2142
2143         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2144
2145 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2146
2147         * device/include/8051.h,
2148         * device/include/8052.h,
2149         * device/include/at89S8252.h,
2150         * device/include/at89c55.h,
2151         * device/include/at89x051.h,
2152         * device/include/at89x51.h,
2153         * device/include/at89x52.h,
2154         * device/include/mcs51reg.h,
2155         * device/include/reg51.h,
2156         * device/include/reg764.h,
2157         * device/include/regc515c.h,
2158         * device/include/sab80515.h: (re)moved these 12 files
2159         * device/include/mcs51/8051.h,
2160         * device/include/mcs51/8052.h,
2161         * device/include/mcs51/at89S8252.h,
2162         * device/include/mcs51/at89c55.h,
2163         * device/include/mcs51/at89x051.h,
2164         * device/include/mcs51/at89x51.h,
2165         * device/include/mcs51/at89x52.h,
2166         * device/include/mcs51/mcs51reg.h,
2167         * device/include/mcs51/reg51.h,
2168         * device/include/mcs51/reg764.h,
2169         * device/include/mcs51/regc515c.h,
2170         * device/include/mcs51/sab80515.h: and added them here
2171
2172 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2173
2174         * device/include/stdarg.h: changed SDCC specific keywords to double
2175           underlined form.
2176         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2177           mcs51 and ds390.
2178         * device/include/hc08/mc68hc908gp32.h,
2179         * device/include/hc08/mc68hc908jb8.h,
2180         * device/include/hc08/mc68hc908jkjl.h,
2181         * device/include/hc08/mc68hc908qy.h: fixed comments
2182         * device/include/mcs51/README: updated
2183         * device/include/mcs51/c8051f120.h: added PINRSF
2184         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2185         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2186           amidst code. Also inline is not supported.
2187
2188 2005-04-06 Raphael Neider <rneider AT web.de>
2189
2190         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2191         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2192           callers stack/frame pointers
2193
2194 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2195
2196         * device/include/pic16/usart.h: added, missing in previous commit,
2197         * device/include/pic16/adc.h: fixed typo,
2198         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2199         commit,
2200         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2201         <p18fxxx.inc>
2202         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2203         uninitialized because a bug appears with gplink
2204         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2205         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2206         complains for unrecognised option
2207
2208 2005-04-05 Raphael Neider <rneider AT web.de>
2209
2210         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2211           structs as well (using memcpy)
2212         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2213           on ISRs (GOTO has no label)
2214         * src/pic16/device.h: added OF_OPTIMIZE_DF
2215         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2216           new data flow analysis/optimization
2217         * src/pic16/pcode.c: added (prototypes for and implementation of)
2218           dataflow analysis functions, fixed pCodeInstructions' inCond and
2219           outCond values, made RCALL a branch instruction
2220         * (pic16_unlinkpCode): keep C line if possible
2221         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2222           C line moved if possible
2223         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2224         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2225           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2226         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2227           new flow)
2228         * (pic16_getJumptabpCode): NEW, needed in...
2229         * (LinkFlow): fixed handling of jumptables, calls and conditional
2230           branches
2231         * (pic16_InsertCommentAfter): NEW
2232         * (pic16_pCodeReplace): made verbose and flow preserving
2233         * (AnalyzeFlow): added call to data flow analysis
2234         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2235         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2236         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2237
2238 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2239
2240         * src/SDCCast.c (decorateType): fixed bug #1105626
2241
2242 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2243
2244         * device/include/asm/pic16/features.h,
2245         * pic18f*.h headers,
2246         * device/include/pic16/adc.h,
2247         * device/include/pic16/delay.h,
2248         * device/include/pic16/i2c.h,
2249         * device/include/pic16/malloc.h,
2250         * device/include/pic16/stdio.h,
2251         * device/include/pic16/stdlib.h,
2252         * device/include/pic16/string.h,
2253         * device/lib/pic16/libc/stdio/printf_tiny.c,
2254         * device/lib/pic16/libc/stdio/printf_small.c,
2255         * device/lib/pic16/libc/stdio/strmgpsim.c,
2256         * device/lib/pic16/libc/stdio/strmmssp.c,
2257         * device/lib/pic16/libc/stdio/strmusart.c,
2258         * device/lib/pic16/libc/stdio/vfprintf.c,
2259         * device/lib/pic16/libc/stdlib/ltoa.c,
2260         * device/lib/pic16/libc/stdlib/putchar.c,
2261         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2262         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2263         * device/lib/pic16/libc/stdlib/memchrram.c,
2264         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2265         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2266         * device/lib/pic16/libio/adc/adcbusy.c,
2267         * device/lib/pic16/libio/adc/adcread.c,
2268         * device/lib/pic16/libio/adc/adcsetch.c,
2269         * device/lib/pic16/libio/usart/ubaud.c,
2270         * device/lib/pic16/libio/usart/ubusy.c,
2271         * device/lib/pic16/libio/usart/udrdy.c,
2272         * device/lib/pic16/libio/usart/uopen.c,
2273         * device/lib/pic16/libio/usart/uputc.c,
2274         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2275         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2276         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2277         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2278         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2279         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2280         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2281         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2282         specific keywords to double underlined form,
2283         * device/lib/pic16/libc/Makefile.rules,
2284         * device/lib/pic16/libsdcc/Makefile.rules,
2285         * device/lib/pic16/libm/Makefile,
2286         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2287         to compile with C standard set in Makefile.common
2288         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2289         rand.c and crc.c in compilation process,
2290         * device/lib/pic16/libsdcc/int/divuint.c,
2291         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2292         `c' from signed to unsigned,
2293         * device/lib/pic16/startup/crt0.c,
2294         * device/lib/pic16/startup/crt0i.c,
2295         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2296         keywords to double underlined form, bug fixes in _do_cinit function
2297         which prevented the correct initialization of the .idata segment,
2298         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2299         core to enter a infinite loop
2300         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2301
2302 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2303
2304         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2305
2306 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2307
2308         * device/include/Makefile.in: add support for hc08 subdirectory
2309         * device/include/hc08/: new subdirectory
2310         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2311         Lucas Loizaga, thanks!
2312         * device/include/hc08/mc68hc908qy.h,
2313         * device/include/hc08/mc68hc908gp32.h,
2314         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2315         their own directory. Changed internal macro names to use the compiler
2316         reserved namespace. Changed SDCC specific keywords to double
2317         underlined form.
2318         * device/include/math.h,
2319         * device/include/malloc.h,
2320         * device/include/stdarg.h,
2321         * device/include/stdbool.h
2322         * device/include/string.h,
2323         * device/include/tinibios.h,
2324         * device/include/ds400rom.h,
2325         * device/include/8051.h,
2326         * device/include/8052.h,
2327         * device/include/80c51xa.h,
2328         * device/include/at89c55.h,
2329         * device/include/at89S8252.h,
2330         * device/include/at89x51.h,
2331         * device/include/at89x52.h,
2332         * device/include/ds80c390.h,
2333         * device/include/reg764.h,
2334         * device/include/regc515c.h,
2335         * device/include/sab80515.h,
2336         * device/include/mcs51/c8051f000.h,
2337         * device/include/mcs51/c8051f018.h,
2338         * device/include/mcs51/c8051f020.h,
2339         * device/include/mcs51/c8051f040.h,
2340         * device/include/mcs51/c8051f060.h,
2341         * device/include/mcs51/c8051f120.h,
2342         * device/include/mcs51/c8051f300.h,
2343         * device/include/mcs51/c8051f310.h,
2344         * device/include/mcs51/c8051f320.h,
2345         * device/include/mcs51/c8051f330.h,
2346         * device/include/mcs51/c8051f350.h,
2347         * device/include/z180.h: Changed SDCC specific keywords to double
2348         underlined form.
2349
2350 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2351
2352         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2353         18F4455,
2354         * (pic16_assignConfigWordValue): disable testing of configuration
2355         register value with config mask,
2356         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2357         function with port->fun_prefix,
2358         * (genFunction): when generating a naked interrupt function never
2359         create an absolute segment placed in interrupt vector address, place
2360         the actual interrupt function at IVA instead, when an interrupt
2361         function is generated with unspecified interrupt then do not create
2362         the absolute section,
2363         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2364         code for generating a call to generic pointer get/put function with
2365         a call to function pic16_callGenericPointer(),
2366         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2367         the call to the generic pointer get/put functions with prefixing the
2368         function name with port->fun_prefix,
2369         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2370         * src/pic16/main.c (_process_pragma): prefix function with
2371         port->fun_prefix,
2372         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2373         calling assembler, old 18Fxxxx macro is deprecated,
2374         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2375         PC_ASMDIR in while condition,
2376         * (findInstruction): add PC_ASMDIR in while condition,
2377         * (buildCallTree): prefix main with port->fun_prefix,
2378         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2379         identifier for variable with banked access in instructions BTFSS,
2380         BTFSC, BCF, BSF, BTG
2381         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2382         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2383         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2384         perform optimization when enviroment variable NO_REG_OPT is set,
2385         * (insideLRBlock): NEW, return 1 if register is inside an
2386         INF_LOCALREGS block,
2387         * (RemoveRegFromLRBlock): remove a register that is completely
2388         eliminated by register optimization, but it is still left in local
2389         register store/restore in/from stack block,
2390         * (Remove2pcodes): after removing register, check to see if it
2391         should be removed from local register store/restore in/from stack
2392         block,
2393         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2394         DUMMY_READ_VOLATILE,
2395
2396         * device/include/pic16/adc.h: minor prototype modifications and
2397         update,
2398         * device/include/pic16/malloc.h: added GPL notice various
2399         modifications,
2400         * device/include/pic16/stdint.h: NEW, standard header for ints
2401         * device/include/pic16/delay.h: NEW, header for delay functions,
2402         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2403         delay1mtcy,
2404         * device/include/pic16/signal.h: NEW, header providing helper macros
2405         for implementing signal handlers,
2406         * device/include/pic16/stdio.h: added prototypes for functions,
2407         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2408         prototypes for stdin and stdout, added macro PUTCHAR to
2409         automatically implement putchar function prototype,
2410         * device/include/pic16/usart.h: modified and updated USART library,
2411         * device/lib/pic16/libio/adc/,
2412         * device/lib/pic16/libio/i2c: some modifications to improve library
2413         performance,
2414         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2415         family of functions,
2416         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2417         family of functions and other sources,
2418         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2419         of the PIC18Fxx[28] devices,
2420         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2421         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2422         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2423         _do_cinit function, because the previous failed when local variables
2424         where not placed in the same memory bank,
2425         * device/lib/pic16/libsdcc/char/: various modifications to improve
2426         library performance,
2427         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2428         information on the new functions of the c library and more...
2429
2430 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2431
2432         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2433
2434 2005-03-26 Raphael Neider <rneider AT web.de>
2435
2436         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2437           if condition == CARRY)
2438         * (genCmp): adapted to new genSkipc semantics
2439         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2440           on rIfx (genCmp was broken)
2441
2442 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2443
2444         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2445         * src/z80/main.c (_keywords[]),
2446         * src/SDCCglobal.h (struct options),
2447         * src/SDCC.y,
2448         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2449         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2450         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2451         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2452         always available in leading double underscore form. The C99 support is
2453         mostly missing, but it's a start.
2454         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2455         reserved identifier "__data".
2456
2457 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2458
2459         * src/mcs51/peeph.def: fixed bug 1170013
2460
2461 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2462
2463         * device/include/mcs51reg.h: fixed bug 842007
2464
2465 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2466
2467         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2468         last time.
2469
2470 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2471
2472         * src/port.h (struct PORT),
2473         * src/avr/ralloc.c (avr_assignRegisters),
2474         * src/avr/main.c,
2475         * src/ds390/ralloc.c (ds390_assignRegisters),
2476         * src/ds390/main.c,
2477         * src/hc08/ralloc.c (hc08_assignRegisters),
2478         * src/hc08/main.c,
2479         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2480         * src/mcs51/main.c,
2481         * src/pic/ralloc.c (pic14_assignRegisters),
2482         * src/pic/main.c,
2483         * src/pic16/ralloc.c (pic16_assignRegisters),
2484         * src/pic16/main.c,
2485         * src/xa51/ralloc.c (xa51_assignRegisters),
2486         * src/xa51/main.c,
2487         * src/z80/ralloc.c (z80_assignRegisters),
2488         * src/z80/ralloc.h,
2489         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2490         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2491         * src/SDCCcse.h,
2492         * src/SDCCdflow.c (computeDataFlow),
2493         * src/SDCCdflow.h,
2494         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2495         * src/SDCCloop.h,
2496         * src/SDCCcflow.c (*),
2497         * src/SDCCcflow.h,
2498         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2499         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2500         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2501         immedDom() returning wrong block; probably fixes bug #1160833)
2502
2503 2005-03-20 Borut Razem <borut.razem AT siol.net>
2504
2505         * support/scripts/inc2h.pl: WIN32 port
2506
2507 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2508
2509         * device/lib/makefile.in: added abs.c and labs.c
2510
2511 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2512
2513         * device/include/stdint.h: added
2514         * device/lib/abs.c: added
2515         * device/lib/labs.c: added
2516         * device/include/stdlib.h: added abs() and labs() prototypes
2517         * device/lib/libsdcc.lib: added abs and labs
2518         * device/include/float.h,
2519         * device/lib/_fsmul.c,
2520         * device/lib/printf_fast.c,
2521         * device/lib/printf_tiny.c: updated comments
2522
2523 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2524
2525         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2526         bug #1164313
2527
2528 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2529
2530         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2531         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2532
2533 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2534
2535         * device/lib/printf_large.c: removed inline assembly for portability and
2536           readability. Use printf_fast if speed or size are more important.
2537         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2538         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2539
2540 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2541
2542         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2543         prevent compiler warning
2544
2545 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2546
2547         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2548         moved to level 0 and declared as static. Also they are explicit
2549         placed in access bank. This was necessery because some times they
2550         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2551         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2552         optimizations. Currently only compare to unsigned char is implemented,
2553         * src/pic16/gen.c: added fReturnIdx array,
2554         * (struct resolvedIfx) is moved to gen.h and made public,
2555         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2556         * (aopForSym): added an optimization to directly store in stack of
2557         the operand of a SEND iCode,
2558         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2559         but as registers instead (AOP_REG) using the fReturnIdx array,
2560         * (pic16_freeAsmop): remove the freed register from the
2561         _G.sregsAlloc field,
2562         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2563         a compare of 'WREG',
2564         * (pic16_popGetTempRegCond): changed function prototype, now
2565         function takes also a bitVector argument v which holds the current
2566         set of registers that are allocated for stack access by aopForSym,
2567         registers allocated in aopForSym for accessing stack symbols are not
2568         any more part of the functions usedRegs field,
2569         * (genCall): some times aopOp is called for a stack variable to be
2570         send, aopForSym might perform the push, if this is true make sure
2571         that genCall doesn't push the variable twice by testing _G.resDirect,
2572         * (genFunction): changed testing for unspecified interrupt number
2573         from 256 to INTNO_UNSPEC,
2574         * modified selection scheme of frame pointer generation. Previously
2575         if function did use local registers a frame pointer was generated,
2576         now a frame pointer is generated only if function has arguments
2577         (that need PLUSW2 register access), or has stack arguments, or the
2578         compiler is not instructed to omit the frame pointer,
2579         * (genEndFunction): before restoring local registers that were saved
2580         in the function preamble, also restore the registers that *might*
2581         have been allocated for stack access,
2582         * (genRet): removed some old comments,
2583         * (genCmp, the active (RN's) version): added a call to the
2584         pic16_genCmp_special function to perform the compare with a more
2585         robust and optimized way,
2586         * (genInline): a feature has been added in inline code generation,
2587         which allows a wildcard variable substitution when writing inline
2588         assembly. Code is incomplete and experimental therefore undocumented,
2589         * (genCast): changed order of aopOp for result and right to allow
2590         aopForSym to directly load the result if possible,
2591         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2592         perform an optimized compare on some selected special occasions,
2593         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2594         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2595         generate an IVT any more,
2596         * src/pic16/main.c (pic16_optionsTable): added command line option
2597         --optimize-cmp,
2598         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2599         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2600         macros,
2601         * src/pic16/NOTES: Raphael Neider added in list of active developers
2602         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2603         jumptable_end to prevent bug #,
2604         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2605         inCond and outCond fields,
2606         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2607         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2608         turn off register spilling,
2609         * (packRegsForOneUse): synced with other ports' versions although it
2610         is not used currently,
2611         * (pic16_packRegisters): added an optimization while reading
2612         structure bitfields, some registers may be saved (malloc code is
2613         decreased by 80 bytes)
2614
2615 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2616
2617         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2618         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2619         this can be optimized more?
2620
2621 2005-03-10 Raphael Neider <rneider AT web.de>
2622
2623         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2624           genNearPointerGet): (hopefully) fixed access to bitfields via
2625           pointers (p->bitN = x; and x = p->bitN; failed)
2626
2627 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2628
2629         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2630
2631 2005-03-09 Raphael Neider <rneider AT web.de>
2632
2633         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2634
2635 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2636
2637         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2638         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2639           (regTypeNum): set REG_BIT type if necessary
2640         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2641         * support/regression/tests/critical.c: check bug 1144613
2642
2643 2005-03-02 Raphael Neider <rneider AT web.de>
2644
2645         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2646
2647 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2648
2649         * src/avr/ralloc.c (serialRegAssign),
2650         * src/ds390/ralloc.c (serialRegAssign),
2651         * src/hc08/ralloc.c (serialRegAssign),
2652         * src/mcs51/ralloc.c (serialRegAssign),
2653         * src/pic/ralloc.c (serialRegAssign),
2654         * src/pic16/ralloc.c (serialRegAssign),
2655         * src/xa51/ralloc.c (serialRegAssign),
2656         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2657
2658 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2659
2660         * src/SDCCast.c (decorateType): fixed bug 1124787
2661
2662 2005-02-20 Hubert Sack <sack AT digiplan.de>
2663         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2664
2665         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2666         patch #1121755
2667
2668 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2669
2670         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2671         to keep the correct label reference count when adding/removing references
2672         to labels. A peephole file using this is appended to patch #1144962.
2673
2674 2005-02-14 Raphael Neider <rneider AT web.de>
2675
2676         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2677         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2678         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2679           retrievals of result operand's value on assignment
2680
2681 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2682
2683         * device/include/pic16/string.h: modified prototype for memccpy()
2684         to memccpy(void *, void *, char, size_t)
2685         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2686         check whether to omit frame pointer or not,
2687         * (genInline): convert all occurences of "\n" to LF in inline
2688         assembler blocks, this helps formatting the inline text,
2689         * (pic16_loadFSR0): modified prototype,
2690         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2691         removed some 8051 legacy code,
2692         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2693         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2694         before allocating temporary registers in functions,
2695
2696 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2697
2698         * support/regression/tests/bitvars.c: corrected the "fix"
2699
2700 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2701
2702         * support/regression/tests/bitvars.c,
2703         * support/regression/tests/bitwise.c,
2704         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2705
2706 2005-02-10 Raphael Neider <rneider AT web.de>
2707
2708         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2709           different size for Alpha
2710         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2711
2712 2005-02-09 Raphael Neider <rneider AT web.de>
2713
2714         * src/SDCC.lex(doPragma) : save and restore warning options as well
2715           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2716         * have #pragma less_pedantic set the errorlevel to WARNING
2717           (fixes #1117001)
2718         * (cloneOptimize) : fixed wrong malloc's size
2719         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2720           facilitate correct handling of #pragma (save|restore)
2721
2722 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2723
2724         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2725
2726 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2727
2728         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2729
2730 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2731
2732         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2733
2734 2005-02-02 Raphael Neider <rneider AT web.de>
2735
2736         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2737         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2738         * (pic16_storeForReturn): fixed to allow returning function pointers
2739         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2740         * device/include/pic16/{stddef.h,stdbool.h}: added
2741
2742 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2743
2744         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2745
2746 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2747
2748         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2749         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2750          appeared to be required
2751
2752 2005-01-31 Borut Razem <borut.razem AT siol.net>
2753
2754         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2755           include/mcs51 and include/z80 directories to the package
2756
2757 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2758
2759         * src/hc08/gen.c (genFunction): fixed bug #1112752
2760
2761 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2762
2763         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2764
2765 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2766
2767         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2768
2769 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2770
2771         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2772
2773 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2774
2775         * device/include/c8051fxxx.h: removed these 6 files
2776         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2777
2778 2005-01-26 Raphael Neider <rneider AT web.de>
2779
2780         * src/pic16/gen.c (genAssign): fixed assignment from longs
2781           in codespace (were cut to three bytes)
2782         * (genDummyRead): implemented (except for CODESPACE...),
2783           fixed bug #1108575
2784         * src/pic16/glue.c (emitStatistics): beautified
2785         * device/lib/pic16/libm/Makefile: added include path
2786
2787 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2788
2789         * src/z80/gen.c (aopPut): fixed bug #1103902
2790
2791 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2792
2793         * device/lib/expf.c: fixed bug #1095792
2794
2795 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2796
2797         * device/lib/pic16/libm: added Math library sources
2798
2799 2005-01-24 Raphael Neider <rneider AT web.de>
2800
2801         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2802           to enable upcast to pCodeOpReg2 (there is no type tag to
2803           differenciate the two and pic16_popGet2p cast into PCOR2)
2804         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2805           (sizeof(sectNames) changed to sizeof(sectName))
2806           Both patches fix segfaults under MinGW.
2807
2808 2005-01-23 Raphael Neider <rneider AT web.de>
2809
2810         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2811           Safe_[mc]?alloc()'ed variables
2812         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2813           of (byte sized) temporaries (assign them to WREG for now)
2814         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2815           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2816           this might fix SIGSEGVs on MinGW...
2817         * src/SDCCopt.c (killDeadCode): restored original behaviour
2818           (volatile operands might get thrown away though)
2819
2820 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2821
2822         * src/pic16/gen.c: fixed bug #1106975,
2823         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2824         pointer update, INTCON is saved, global interrupts are disabled and
2825         restored after updateing TOS.
2826         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2827         * added function attribute 'shadowregs' to take advantage of shadow
2828         registers,
2829         * added function attribute 'wparam' as an alternative to the wparam
2830         pragma,
2831         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2832         user declares a non-ISR function as 'shadowregs',
2833         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2834
2835 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2836
2837         * .version: bumped version number to 2.4.8
2838         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2839         pic16 port,
2840         * device/lib/pic16/libio/i2c/: I2C module support library,
2841         * device/include/pic16/i2c.h: I2C support library header,
2842         * device/lib/pic16/libc/stdio/: standard IO support sources,
2843         * (printf_small.c): printf_small() source, supports float print,
2844         * (printf_tiny.c): printf_tiny() source, does not support floats,
2845         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2846         enable global optimizations for entire library source, other
2847         Makefiles in the source tree are also modified to reflect this,
2848         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2849         function,
2850         * doc/sdccman.lyx: updated to reflect new changes,
2851         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2852         sym->onStack if-case,
2853         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2854         sbit, idata, _idata, xdata, _xdata,
2855         * added pragma library, to link an external library, (see doc),
2856         * removed command line options, --pomit-config-words, --pomit-ivt,
2857         --pleave-reset-vector,
2858         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2859         when calling assembler to reflect memory model used, also define
2860         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2861         reflect stack model used,
2862         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2863         on stack return NULL,
2864
2865 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2866
2867         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2868           of the operands is volatile. Fixes #1020220
2869
2870 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2871
2872         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2873         * (OptimizeRegUsage): make sure that there is really no other flow where
2874           the first pCode is used
2875
2876 2005-01-22 Raphael Neider <rneider AT web.de>
2877
2878         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2879           to fix #1106967 (pCode->seq are not set up correctly)
2880
2881 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2882
2883         * src/SDCCglue.c (glue): make sure code area is declared before the
2884         static initialization area.
2885
2886 2005-01-21 Raphael Neider <rneider AT web.de>
2887
2888         * device/lib/Makefile.in: fixed test for pic16 install dir
2889         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2890           optimizations
2891         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2892           added --optimize-goto compiler switch and pragma wparam documentation
2893         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2894         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2895           and PRODH closing bug #1071770 (peephole optimizer)
2896
2897 2005-01-19 Raphael Neider <rneider AT web.de>
2898
2899         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2900           cmdLine buffers (used when calling sdcpp...) are large enough
2901           (MAX_PATH=256 truncates arguments leading to system halts when
2902           used in MinGW...)
2903         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2904         * (genUminus): rewritten to for efficiency
2905         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2906           used uninitialized in some cases)
2907         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2908           copy the third byte from the int -- now assumes 0x80 (data memory)
2909         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2910           operands (genAddLit expects the iCode's operands to swapped as
2911           well), fixed leftover bytes (crashed for short left operands)
2912         * (pic16_genMinusDec): performance improvements, removed false
2913           PIC14 emitSKPNCs
2914         * (pic16_genMinus): fixed to cope with differently sized operands
2915         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2916           for --obanksel > 1
2917         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2918         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2919           new banksel optimization
2920         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2921           analysis for temporary registers (segfaults...)
2922         * src/pic16/peeph.def: added rule
2923
2924 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2925
2926         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2927         which converts a float number to its ASCII representation
2928         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2929         functions to convert the fractional and integer part of a float to ASCII,
2930         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2931         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2932         ram
2933         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2934         _STATMEM macros,
2935         * device/include/pic16/adc.h: added GPL info,
2936         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2937         a pCodeOp as tested operand,
2938         * (genNearPointerGet): optimized bit testing, does not use
2939         intermediate register for bit value, test directly instead with
2940         BTFSS, BTFSC, works only for single bits,
2941         * (genpic16Code): dump the name of the iCode in the asm,
2942         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2943         renamed to pic16_decodeOp,
2944         * (serialRegAssign): do not allocate a temporary register for iCode
2945         sequences that test a single bit for 1/0
2946
2947 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2948
2949         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2950         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2951         access stack and frame pointers. They are initially assigned to
2952         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2953         accessing SFRs. Updated all occurences of modification of stack or
2954         frame pointer in gen.c and pcode.c,
2955         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2956         assigning of a literal value to pointers,
2957         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2958         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2959         selected
2960
2961 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2962
2963         * doc/sdccman.lyx: update documentation about stack pragma, added
2964         some info for stack memory models
2965
2966 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2967
2968         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2969
2970 2005-01-08 Raphael Neider <rneider AT web.de>
2971
2972         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2973           udata sections to fix bug #1097823
2974
2975 2005-01-05 Raphael Neider <rneider AT web.de>
2976
2977         * src/pic16/gen.c (genGenericShift): added handling of differently
2978           sized left operand and result
2979
2980 2005-01-04 Raphael Neider <rneider AT web.de>
2981
2982         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2983         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2984           to hold the condition bit)
2985         * added new version of genCmp (old code available via #define)
2986         * added new version of genShiftLeft/genShiftRight in a generic
2987           way, now supports shifting by negative values
2988         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2989           shiftCount (expected by genGenericShift)
2990         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2991         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2992           dump
2993         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2994           is an invalid literal too...)
2995
2996 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2997
2998         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2999         from Raphael Neider,
3000         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3001         for 8-bit literals. This fixes some literal operands which are sign
3002         extended to 16-bits ints when instruction needs only 8-bits.
3003
3004 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3005
3006         * device/lib/logf.c: added mcs51 assembly version
3007         * device/lib/expf.c: added mcs51 assembly version
3008         * device/lib/_logexpf.c: new shared asm code for expf and logf
3009         * device/include/math.h: add defines for assembly math library
3010         * device/lib/Makefile.in: build new _logexpf.c
3011         * device/lib/libfloat.lib: use new _logexpf.c
3012
3013 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3014
3015         * src/pic/device.c
3016         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3017           device types which have less than 0x7f registers.
3018
3019 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3020
3021         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3022
3023 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3024
3025         * device/lib/printf_fast.c: only build on supported arch.
3026         * device/lib/printf_tiny.c: only build on supported arch.
3027         * device/lib/printf_fast_f.c: only build if asm float lib
3028         * device/lib/_fsget1arg.c: only build if asm float lib
3029         * device/lib/_fsget2args.c: only build if asm float lib
3030         * device/lib/_fsnormalize.c: only build if asm float lib
3031         * device/lib/_fsreturnval.c: only build if asm float lib
3032         * device/lib/_fsrshift.c: only build if asm float lib
3033         * device/lib/_fsswapargs.c: only build if asm float lib
3034         * device/include/stdio.h: don't provide print_fast,
3035           print_fast_f, print_tiny prototypes if --xstack used
3036
3037 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3038
3039         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3040         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3041           to the SOURCES
3042
3043 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3044
3045         * device/lib/printf_fast_f.c: same as printf_fast, but
3046           with floating point enabled
3047         * device/lib/printf_fast.c: minor tweaks
3048         * device/include/stdio.h: add printf_fast_f
3049
3050 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3051
3052         * src/SDCCmain.c: make --float-reent default for mcs51
3053         * device/lib/_fsadd.c: added mcs51 assembly version
3054         * device/lib/_fssub.c: added mcs51 assembly version
3055         * device/lib/_fsmul.c: added mcs51 assembly version
3056         * device/lib/_fsdiv.c: added mcs51 assembly version
3057         * device/lib/_fseq.c: added mcs51 assembly version
3058         * device/lib/_fsneq.c: added mcs51 assembly version
3059         * device/lib/_fsgt.c: added mcs51 assembly version
3060         * device/lib/_fslt.c: added mcs51 assembly version
3061         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3062         * device/lib/Makefile.in: add _fscmp to build
3063         * device/lib/libfloat.lib: add _fscmp to build
3064
3065 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3066
3067         * device/lib/_fs2slong.c: added mcs51 assembly version
3068         * device/lib/_fs2sint.c: added mcs51 assembly version
3069         * device/lib/_fs2schar.c: added mcs51 assembly version
3070         * device/lib/_fs2ulong.c: added mcs51 assembly version
3071         * device/lib/_fs2uint.c: added mcs51 assembly version
3072         * device/lib/_fs2uchar.c: added mcs51 assembly version
3073         * device/lib/_slong2fs.c: added mcs51 assembly version
3074         * device/lib/_sint2fs.c: added mcs51 assembly version
3075         * device/lib/_schar2fs.c: added mcs51 assembly version
3076         * device/lib/_ulong2fs.c: added mcs51 assembly version
3077         * device/lib/_uint2fs.c: added mcs51 assembly version
3078         * device/lib/_uchar2fs.c: added mcs51 assembly version
3079         * device/include/float.h: added #define to select asm vs c
3080
3081 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3082
3083         * device/lib/printf_fast.c: improvements to float output
3084         * device/include/float.h: add defines for assembly float library
3085         * device/lib/_fsget1arg.c: receive 1 float arg
3086         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3087         * device/lib/_fsnormalize.c: normalize a float
3088         * device/lib/_fsreturnval.c: return float, various helper routines
3089         * device/lib/_fsrshift.c: right shift a float's mantissa
3090         * device/lib/_fsswapargs.c: swap 2 floats
3091         * device/lib/Makefile.in: build these 6 new files for mcs51
3092         * device/lib/libfloat.lib: add these 6 files to the library
3093
3094 2004-12-26 Borut Razem <borut.razem AT siol.net>
3095
3096         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3097           built by gcc 3.4.2
3098
3099 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3100
3101         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3102           and fully reentrant and register bank neutral.
3103         * device/lib/printf_fast.c: added float (not enabled by default),
3104           added compact/slower integer (also not enabled by default),
3105           improved size/speed of fast integer code, other minor changes
3106         * device/include/stdio.h, device/lib/Makefile.in,
3107           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3108
3109 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3110
3111         * src/pic16/pcode.c: declaring variables other than at the start of a
3112           block is not supported in C by VC6.
3113
3114 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3115
3116         * applied a previous patch from Raphael Neider that wasn't included
3117         in the previous commits, which fixes infinite loops within jumptable
3118         improvements,
3119         * made some fixes that previous patches introduced
3120
3121 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3122
3123         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3124         that fixes an issue with AOP_PCODE asmop's offset,
3125         * (pic16_popCopyReg): update instance field too,
3126         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3127         function of pic port,
3128         * (genCmp, genAnd, genAssign),
3129         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3130
3131 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3132
3133         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3134         variables initial values to idata section,
3135         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3136         variables in some functions. This utilizes parmBytes field of iCode
3137         structure to hold the offset of the variable in stack. (might be
3138         able to use the stack field too?)
3139         * applied patch from Raphael Neider # ### , # ###
3140         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3141         variable initial values in idata section,
3142         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3143         for static variables with initial value
3144         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3145         applied fix in while loop from Raphael Neider.
3146
3147 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3148
3149         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3150         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3151         * src/ds390/ralloc.c (serialRegAssign): spill bits
3152         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3153         * support/Util/SDCCerr.c,
3154         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3155         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3156         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3157
3158 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3159
3160         * device/include/sdcc-lib.h: inserted LGPL, added includes
3161           asm/ds390/features.h and asm/mcs51/features.h
3162         * device/include/asm/default/features.h,
3163         * device/include/asm/gbz80/features.h,
3164         * device/include/asm/z80/features.h: added empty _AUTOMEM
3165           and _STATMEM
3166         * device/include/asm/ds390/features.h,
3167         * device/include/asm/mcs51/features.h: added files with defines for
3168           _AUTOMEM and _STATMEM indicating automatic and static storage class
3169         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3170         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3171         * src/SDCCicode.c (geniCodeCast),
3172         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3173         * src/SDCCloop.c (loopInduction): removed unused variable lr
3174         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3175           to convertToFcall to include char modulo (RFE 1065037), added check
3176           if left operand is unsigned and use abs of literal value
3177         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3178           as it doesn't work after conversion from peephole.def to peephole.rul
3179         * src/mcs51/gen.c (toBoolean): added check for size,
3180           (genModOneByte): optimized code for signed char modulo a literal
3181           power of 2 (thanks to Hubert Sack),
3182           (genRRC): removed unnecessary "clr c",
3183           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3184         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3185           jump optimization,
3186           swapped rules 256.c and 256.d,
3187           extended 256.d by using new multiple checks (thanks Erik),
3188           added rules 256.e and 256.f,
3189           updated rule 261.a and 261.b to new generated code
3190         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3191
3192 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3193
3194         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3195           induction related bugs, including first part of bug #1074377
3196
3197 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3198
3199         * applied patch from bug-report #1076292,
3200         * applied patches for genAnd and Goto-optimizations for Raphael
3201         Neider,
3202         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3203         dump a less iCode information,
3204         * src/pic16/device.h (pic16_options_t): added field debgen,
3205         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3206         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3207         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3208         puclic,
3209         * (various functions): added macros FENTRY and FENTRY2 to functions,
3210         to emit function prologue,
3211         * (various functions): fixed indentation,
3212         * (genNearPointerGet): fixed loading of FSR0,
3213         * (genPackBits): applied patch from Raphael Neider to fix updating
3214         of FSR0 and touching only the modified bits,
3215         * src/pic16/genarith.c (various functions): added macros FENTRY to
3216         emit function prologue in comments,
3217         * src/pic16/pcode.h: added functions debugf2, debugf3,
3218         * src/pic16/ralloc.c: partial fix for packForPush caused
3219         segmentation fault,
3220
3221 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3222
3223         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3224           <stsp AT users.sourceforge.net> with reversed byte order
3225         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3226
3227 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3228
3229         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3230           bug #1074377
3231         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3232         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3233
3234 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3235
3236         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3237
3238 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3239
3240         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3241           conditions,
3242           (setFromConditionArgs): friendly operand parser for peephole rules,
3243           (operandBaseName, operandsNotRelated): new peephole condition
3244           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3245           architecture specific register naming into account, handles n-way
3246           comparisons, and supports quoted literals
3247         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3248
3249 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3250
3251         * src/mcs51/peeph.def: fixed bug #1076940
3252
3253 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3254
3255         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3256
3257 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3258
3259         Adding support for replacing ljmps with sjmps in jumptables
3260         generated for switch statements. For now you need to set the
3261         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3262         Now 4 algorithms for mcs51 jumptable generation are used:
3263         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3264         addresses loaded pc-relative for up to 112 cases and stack-pushing
3265         target addresses loaded with offset from dptr for up to 256 cases.
3266
3267         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3268         * src/mcs51/main.c: adapted constants for switch table generation
3269         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3270
3271 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3272
3273         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3274         * support/regression/tests/bug1057979.c: added test for bug 1073386
3275
3276 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3277
3278         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3279         compilers
3280
3281 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3282
3283         * src/pic16/device.h,
3284         * src/pic16/genarith.c,
3285         * src/pic16/glue.c,
3286         * src/pic16/main.c,
3287         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3288
3289 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3290
3291         Large cummulative patch for pic16 port.
3292         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3293         to call when a stack overflow occurs,
3294         * (malloc.h): added CVS Id tag,
3295         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3296         variable,
3297         * added libc directory. The current version of LibC contains string
3298         functions, ctype functions and macros and some functions of the
3299         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3300         be extensively tested in the future. Standard disclaimer here.
3301         Library is not automatically build yet. But one can build it by
3302         invoking 'make' inside the libc directory.
3303         * added ADC library under libio. Preliminary version yet.
3304
3305         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3306         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3307         aopForRemat() now and not by pic16_aopOp(),
3308         * (pic16_popGetTempReg): removed warning messgae when allocating
3309         temporary registers, its a buggy feature and will be removed,
3310         * (pic16_popGet): set register instance field in AOP_CRY,
3311         * (pic16_outBitC): fixed for results in size greater than 1,
3312         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3313         * (pic16_storeForReturn): optimized return of 0,
3314         * (genCmp): experimental code for new genCmp which uses PIC18's
3315         special compare&skip instructions. Initial tests fail some times
3316         with variables grater than 1 byte in size, so new code is disabled,
3317         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3318         a single bit,
3319         * (genCast): began a fix to optimize the casting of a bit to another
3320         bit, now assigning a bitfield to another bitfield will fail, sorry,
3321         * src/pic16/main.c: disabled the use of lr-support feature,
3322         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3323         * added some function prototypes, added function _debugf prototype,
3324         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3325         bits with offset (case PO_GPR_BIT),
3326         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3327         command line,
3328         * (isBankInstruction): modified to return 0 for no banking instruction,
3329         and 1 for banking instruction,
3330         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3331         caused stop processing pCodes after a inline assembly block,
3332         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3333         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3334         registers when it shouldn't,
3335         * src/pic16/ralloc.c (allocReg): add preliminary support for
3336         supporting a limited set of temporary registers,
3337
3338 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3339
3340         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3341           genDataPointerSet): ensure assignments always copy in MSB to LSB
3342           order,
3343           (loadRegFromAop): recognize CLRH optimization,
3344           (genFunction): optimize RECEIVE iCodes in reentrant functions
3345
3346 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3347
3348         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3349           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3350           selected.
3351         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3352         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3353           contiguous with data
3354
3355 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3356
3357         * device/lib/_gptrget.c (_gptrget),
3358         * device/lib/_gptrgetc.c (_gptrgetc),
3359         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3360           instead of sjmp to ret
3361         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3362           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3363
3364 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3365
3366         * .version: bumped version to 2.4.7
3367         * device/lib/_gptrget.c (_gptrget): is now _naked
3368         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3369         * device/lib/_gptrput.c (_gptrput): is now _naked
3370         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3371           (createFunction): fixed xstack
3372         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3373         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3374           or bit either,
3375           (geniCodeCritical): store original interrupt state in an iTemp bit
3376           var unless stack-auto
3377         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3378         * src/SDCCmain.c (setIncludePath): added include/target to search path
3379         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3380         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3381           prototype,
3382           (processFuncArgs): put bit vars in bit area
3383         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3384           unsaveRBank): fixed xstack,
3385           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3386           (genFunction, genEndFunction): fixed xstack,
3387           (genAssign): optimization don't walk backwards through mem
3388         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3389         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3390         * support/regression/Makefile: also make library (for stack-auto) when
3391           making "all" and added "test-mcs51-xstack-auto"
3392         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3393         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3394         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3395         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3396         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3397           make-library by MAKE_LIBRARY
3398         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3399           regression tests for xstack
3400         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3401         * support/regression/tests/critical.c: test for critical on mcs51
3402
3403 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3404
3405         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3406           built version of sdcc instead of installed version
3407
3408 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3409
3410         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3411         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3412           vprintf.c now
3413         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3414         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3415           WARNING: remove device/lib/build/z80/printf.o by hand when
3416           updating from previous build!
3417         * device/lib/z80/printf.c: updated comment
3418         * support/regression/tests/bug1057979.c: test all ports now
3419         * support/regression/tests/bug1065458.c: file added
3420
3421 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3422
3423         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3424           *_start and *_end symbols for static functions
3425
3426 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3427
3428         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3429           and search crt0.o in all library paths,
3430           (setIncludePath): proper handling of --nostdinc,
3431           (setLibPath): proper handling of --nostdlib
3432         * support/regression/Makefile,
3433         * support/regression/ports/ds390/spec.mk,
3434         * support/regression/ports/gbz80/spec.mk,
3435         * support/regression/ports/hc08/spec.mk,
3436         * support/regression/ports/mcs51/spec.mk,
3437         * support/regression/ports/mcs51-large/spec.mk,
3438         * support/regression/ports/mcs51-stack-auto/spec.mk,
3439         * support/regression/ports/z80/spec.mk: use include and lib files from
3440           built version of sdcc instead of installed version
3441         * doc/sdccman.lyx: fixed typo in --nostdinc
3442
3443 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3444
3445         * src/pic/pcode.c,
3446         * src/pic/device.c,
3447         * src/pic/ralloc.c,
3448         * src/pic/gen.c : added support to generate code for struct bit fields.
3449
3450 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3451
3452         * as/xa51/xa_version.h,
3453         * device/include/errno.h,
3454         * device/include/regc515c.h,
3455         * device/lib/_itoa.c,
3456         * device/lib/_ltoa.c,
3457         * device/lib/ser_ir_cts_rts.c,
3458         * sim/ucsim/xa.src/glob.cc,
3459         * sim/ucsim/xa.src/inst_gen.cc,
3460         * sim/ucsim/xa.src/xa_bit.cc,
3461         * sim/ucsim/xa.src/xa_sfr.cc,
3462         * sim/ucsim/z80.src/inst_dd.cc,
3463         * sim/ucsim/z80.src/inst_fdcb.cc,
3464         * support/scripts/keil2sdcc.pl,
3465         * src/pic16/pic16.dsp,
3466         * src/pic16/pic16a.dsp: corrected cvs line endings
3467         * device/lib/printf_large.c: fixed bug 1057979
3468         * src/pic16/gen.c: fixed non-C standard code
3469         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3470         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3471         * support/regression/ports/mcs51/support.c: reload T1 asap
3472         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3473           pdata use and clear idata startup behaviour
3474         * support/regression/tests/bug1057979.c: added
3475
3476 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3477
3478         * device/examples/ds390/ow390/ad26.h,
3479         * device/examples/ds390/ow390/cnt1d.h,
3480         * device/examples/ds390/ow390/crcutil.c,
3481         * device/examples/ds390/ow390/ownet.h,
3482         * device/examples/ds390/ow390/owsesu.c,
3483         * device/examples/ds390/ow390/swt12.h,
3484         * device/examples/ds390/ow390/swtoper.c,
3485         * device/examples/ds390/ow390/temp10.h,
3486         * device/examples/ds390/ow390/thermodl.c,
3487         * device/examples/ds390/tinitalk/tinitalk.dsp,
3488         * device/examples/ds390/tinitalk/tinitalk.dsw,
3489         * device/examples/mcs51/clock/hw.h,
3490         * device/examples/mcs51/simple2/go.bat,
3491         * device/examples/serialcomm/windows/serial.h,
3492         * device/examples/xa51/dummy.c,
3493         * device/examples/xa51/hello.c,
3494         * device/include/80c51xa.h,
3495         * device/include/at89x051.h: corrected cvs line endings
3496
3497 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3498
3499         * src/pic16/main.c (options): added command line --gstack, to trace
3500         stack over/under flows,
3501         * added pragma 'wparam' to allow passing first byte of function
3502         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3503         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3504         call to __gstack_test function and sets up the symbol as extern,
3505         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3506         * popaop): added call to pic16_testStackOverflow,
3507         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3508         wparamList list,
3509         * (genCall, genPcall): now all parameters are passed via stack
3510         except in functions that are pass to wparam pragma in which WREG is
3511         used too,
3512         * (genPcall): REENTRANT flag is checked to see if variable prototype
3513         contains reentrant keyword, don't call a non-reentrant function, via
3514         a reentrant function pointer or vice versa, functions are never
3515         passed via WREG,
3516         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3517         D.Winkler,
3518         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3519         SIGSEGV when accessing a NULL register stucture,
3520         * (pic16_printGPointerType): modified to handle UPPER modifier for
3521         function initializers, changed prototype of function to simpler one,
3522         * (pic16_printIvalFuncPtr): check to see if function is already
3523         added in externs list,
3524         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3525         optimized a move from W to SFR with a move to the same register
3526         later after a CALL,
3527         * device/lib/pic16/debug: NEW directory, contains debug features
3528         which are enabled when linking with libdebug.lib, currently command
3529         line option --gstack enables stack pointer tracing for over/under
3530         flow, corresponding sources are in debug/gstack
3531
3532 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3533
3534         * doc/sdccman.lyx: updated SDCC version,
3535         * (PIC16 port): update list of command line options,
3536         * src/pic16/device.h (structure pic16_options_t): added field gstack
3537         to enable stack overflow tracing on push/pops,
3538         * src/pic16/device.c (statistics structure): added statistics
3539         structure,
3540         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3541         pic16_dump_int_registers): increase statistics counters for each
3542         * variable which is encountered
3543         * (pic16_dump_usection): emit each .udata variable to its own udata
3544         section,
3545         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3546         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3547         parameters via stack, otherwise use old scheme,
3548         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3549         assembler output file,
3550         * src/pic16/main.c: added command line options --gstack to enable
3551         push/pop tracing for stack overflow,
3552         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3553         instructions): added size of each instruction,
3554         * (pic16_countInstruction): estimate size of instructions in
3555         the_pFile list, inline assembly blocks are not counted,
3556         * (pic16_FixRegisterBanking): trace previous register usage, when
3557         banksel optimizations is greater than 0, don't emit a redudant
3558         banksel directive,
3559
3560 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3561
3562         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3563         * src/pic16/ralloc.c : applied same fix for pic16.
3564         * src/pic/gen.c : tidied it up a little.
3565
3566 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3567
3568         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3569         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3570
3571 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3572
3573         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3574
3575 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3576
3577         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3578         non-reentrant function __modsint in the interrupt function (thus
3579         corrupting math operations during serial I/O)
3580         * device/lib/ser_ir.c: as above, changed buffersize
3581         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3582         256.c,d for zeroing
3583         * doc/Makefile: added option -t for rsync
3584
3585 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3586
3587         * src/SDCCast.h (struct ast),
3588         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3589
3590 2004-10-20 Borut Razem <borut.razem AT siol.net>
3591
3592         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3593         package
3594
3595 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3596
3597         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3598         makefile targets,
3599         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3600         support functions to replace long sequences of MOVFF's from access
3601         bank registers to stack and vice versa,
3602         * src/pic16/device.h: added new field opt_flags, where optimization
3603         flags can be set to enable certain features,
3604         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3605         * pBlock, (genFunction, genEndFunction): surroung loop for
3606         saving/loading used registers in stack with PC_INFO pCodes,
3607         INF_LREGS. Code in between can then be optimized by pCode optimizer
3608         to support function calls,
3609         * (genDataPointerSet): fixed bug which loaded float fields in
3610         structures with corrupt data,
3611         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3612         in a standard way debug info on stderr. Feature used for developing
3613         and debugging only,
3614         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3615         obsolete chunks of code,
3616         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3617         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3618         * pic16/src/pcode.c (pic16_newpCodeInfo,
3619         * (pic16_newpCodeOpLocalRegs),
3620         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3621         feature,
3622         * (pic16_pCodeConstString): printing of the initial value of a
3623         symbol as a comment is inhibited since parsing was already done by
3624         copyStr and output is corrupt,
3625         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3626
3627 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3628
3629         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3630
3631 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3632
3633         * as/mcs51/lkarea.c: removed old K&R style,
3634           (lnksect): changed check on boundary error,
3635           (lnksect2): changed check on boundary error,
3636           (lnksect2): extend XSTK to end of page if size = 1
3637         * as/mcs51/lkmain.c: removed old K&R style,
3638           (Areas51): create l_IRAM symbol
3639         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3640         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3641           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3642         * device/lib/_mullong.c: added version to be compiled with xstack
3643         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3644         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3645         * device/lib/mcs51/crtxstack.asm: fixed comment
3646         * src/SDCCglue.c: maxInterrupts defaults to 0,
3647           (emitMaps): added pdata,
3648           (createInterruptVect): (re)moved default,
3649           (glue): added pdata,
3650           (glue): moved __start__xstack to XSTK with default size 1
3651         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3652           and options.float_rent when options.stackAuto is set,
3653           (linkEdit): only write XDATA_NAME if provided on command line
3654         * src/SDCCmem.h,
3655         * src/SDCCmem.c: added pdata
3656         * src/port.h: added pdata_name to PORT
3657         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3658           (saveRegisters, unsaveRegisters): removed usage of B,
3659           (genMinus): fixed accumulator clash,
3660           (genJumpTab): added comment, this needs another look
3661         * src/mcs51/gen.c: added check for "B in use" paranoia,
3662           added pushB() and popB()
3663         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3664           chance
3665         * src/avr/main.c,
3666         * src/ds390/main.c,
3667         * src/hc08/main.c,
3668         * src/mcs51/main.c,
3669         * src/pic/main.c,
3670         * src/pic16/main.c,
3671         * src/xa51/main.c,
3672         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3673           added PSEG (PAG,XDATA) or NULL to port specifier
3674         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3675         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3676           (_mcs51_genInitStartup): removed __start__xstack equ,
3677           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3678         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3679         * src/z80/gen.c (_rleAppend): fixed warnings
3680         * support/regression/tests/zeropad.c: added pdata test
3681         * .version: bumped to 2.4.6
3682
3683 2004-10-17 Borut Razem <borut.razem AT siol.net>
3684
3685         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3686         as a part of nightly build
3687
3688 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3689
3690         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3691         WREG holds the first byte function parameters,
3692         * (aopForSym): take special case for symbols which are in FARSPACE
3693         but in CODESPACE too,
3694         * (assignResultValue): modified to take into account _G.useWreg,
3695         * (genCall): don't use wreg for parameter passing when function is
3696         declared as reentrant, too, added optimization INCF to stack
3697         pointer when stack parameter count is 1,
3698         * (genFunction, genEndFunction): refurnished and fixed to not using
3699         wreg for passing parameters when function has varargs or is
3700         reentrant, fixed bug with symbol name compare for generating
3701         functions in absolute address,
3702         * (pic16_storeForReturn): refurnished,
3703         * (genCmp): began writing a new version of the function, not ready
3704         yet, therefore it is disabled,
3705         * (genAssign): do not read code memory when assigning a function to
3706         a pointer function,
3707         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3708         array of characters, not pointer,
3709         * (pic16initialComments): in debug mode emit an .ident directive for
3710         the assembler,
3711         * (_process_pragma): emit a new warning type (internal to pic16)
3712         when setting stack to default length, emit a similar warning when
3713         placing a function at absolute address and address is not word aligned
3714         * (_pic16_parseOptions): added 'return TRUE' statement,
3715         * (_pic16_linkEdit): if compiling a source, then add the source's
3716         file object, first in the list of objects to link,
3717
3718 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3719
3720         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3721         * src/pic/main.c : removed VC warning.
3722         * src/pic/gen.c : changed comment.
3723
3724 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3725
3726         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3727         reference to a deprecated symbol _GPTRREG was causing failure to
3728         link. Thanks G. M. Gallant for the info.
3729
3730 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3731
3732         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3733         comments for Bugs item #954788.
3734
3735 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3736
3737         * src/pic16/device.c (pic16_dump_gsection,
3738         * pic16_groupRegistersInSection): handle symbols declared to be in
3739         access bank differently,
3740         * src/pic16/gen.c (struct _G): added field resDirect,
3741         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3742         send values read from stack directly to result and don't allocate
3743         temporary values,
3744         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3745         same registers,
3746         * (pic16_sameRegsOfs): NEW,
3747         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3748         free because they were not allocated from temporary pool,
3749         * pic16_popRegFromString): workaround to fix a problem with
3750         allocating variables twice or never,
3751         * (genGenPointerGet): using PRODL instead of FSR0H,
3752         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3753         instead of FSR0H,
3754         * (genAssign): take advantage of the _G.resDirect flag,
3755         * (genCast): around line 11844, use mov2f instead of directly
3756         MOVFF'ing between operands to account for literal values,
3757         * src/pic16/genutils.c: some new debug functions for gpsim have been
3758         added,
3759         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3760         float with integer part only,
3761         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3762         place variables in access bank
3763         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3764         updated sources to reflect recent changes in gen.c
3765
3766 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3767
3768         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3769         sources that searched for headers in installation path, now the
3770         device/include/pic16 is used,
3771         * src/pic16/glue.c (pic16glue),
3772         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3773         .line directives if not in debug mode, this suppresses assembler's
3774         warnings for ignored directives
3775
3776 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3777
3778         * src/port.h: made reset_regparms prototype void parameter explicit.
3779         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3780         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3781         * doc/sdccman.lyx: documented warning disabling and how to use
3782           printf_large to make it print floats.
3783         * device/include/stdbool.h: NEW
3784         * device/lib/_atof.c,
3785         * device/lib/_divuint.c,
3786         * device/lib/_divulong.c,
3787         * device/lib/expf.c,
3788         * device/lib/printf_large.c,
3789         * device/lib/sincosf.c,
3790         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3791         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3792           a completely reentrant lib.
3793
3794 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3795
3796         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3797         * device/include/pic16/stdio.h: fixed bug with colon
3798
3799 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3800
3801         * device/include/pic16/stdio.h,
3802         * device/include/pic16/stdlib.h,
3803         * device/include/pic16/math.h: NEW
3804         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3805         declared as _naked to reduce overhead
3806         * device/lib/Makefile.in (target port-specific-objects-pic16):
3807         changed * to *.* so to ignore the CVS directory,
3808         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3809         stacked variables back in stack,
3810         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3811         corruption
3812
3813 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3814
3815         * .version: bumped version number to 2.4.5
3816         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3817         * support/Util/SDCCerr.c (messages structure): added entry for
3818         W_POSSBUG2
3819
3820         Large cumulative patch for pic16 port and libraries.
3821         * device/include/pic16/sdcc-lib.h,
3822         * device/include/pic16/stdarg.h,
3823         * device/include/asm/pic16/features.h,
3824         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3825         * device/include/pic16/float.h: changes reentrant keyword with
3826         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3827         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3828         updated target build-libraries to include objects from gptr,
3829         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3830         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3831         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3832         all function headings,
3833         * src/SDCCmain.c: added global parameter userIncDirsSet,
3834         * (parseCmdLine): when option -I is encountered add directory to
3835         userIncDirsSet too,
3836         * src/version.awk: added space between control and long,
3837         * src/pic16/NOTES: added some notes for the port,
3838         * src/pic16/gen.c: added prototype for mov2fp function,
3839         * (fReturnpic16[]): properly named return value registers,
3840         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3841         * (aopForSym): added code to handle symbols with onStack flag set,
3842         symbols onStack are allocated PTRSIZE bytes,
3843         * (aopFreeAsmop): handles special case where asmops are stack objects,
3844         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3845         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3846         added argument lock to trace flaws in allocating temporary registers
3847         when developing port,
3848         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3849         * (pic16_popRegFromString): reenabled allocating a direct register
3850         from string,
3851         * (assignResultValue): various beautifications,
3852         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3853         referenced function argument,
3854         * (genIpush): reenabled to allow stacked arguments, handles only
3855         ic->parmPush iCodes,
3856         * (genCall, genPcall): major changes to allow for variable argument
3857         functions, fixed a bug with falsely restoring stack pointer after
3858         returning from call,
3859         * (genFunction): pending code for critical function,
3860         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3861         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3862         * (genNearPointerGet): fixed bug with indirect reading, was always
3863         reading from INDF0
3864         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3865         pointers,
3866         * (genAddrOf): rewrote code to take address of a stacked function parameter
3867         * (genCast): fixed casting to generic pointer type,
3868         * src/pic16/gen.h: added AOP_STA,
3869         * (struct asmop): added field stk,
3870         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3871         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3872         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3873         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3874         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3875         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3876         generic pointers,
3877         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3878         and library paths,
3879         * (pic16_port structure): generic pointer size is set to 3,
3880         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3881         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3882         compiler warning,
3883         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3884         operand is an iTemp,
3885
3886 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3887
3888         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3889         * debugger/mcs51/simi.c: addapt new syntax of s51
3890
3891 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3892
3893         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3894         * src/pic16/pcode.c: commented out some calls to free() in order to
3895         fix bug #989576,
3896
3897 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3898
3899         * src/SDCCicode.h,
3900         * src/SDCCicode.c (isiCodeInFunctionCall),
3901         * src/avr/ralloc.c (selectSpil),
3902         * src/pic/ralloc.c (selectSpil),
3903         * src/pic16/ralloc.c (selectSpil),
3904         * src/ds390/ralloc.c (selectSpil),
3905         * src/hc08/ralloc.c (selectSpil),
3906         * src/xa51/ralloc.c (selectSpil),
3907         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3908         stack in the middle of a function call sequence (fixes bug #1020268)
3909         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3910         costs associated with the minimum switch case.
3911
3912 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3913
3914         * src/SDCC.lex: fixed bug #1030549
3915
3916 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3917
3918         * src/SDCCcse.h (struct cseDef),
3919         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3920         over a function call if the CSE is derived from a symbol whose
3921         address has been taken (fixes bug #1029883)
3922         * support/regression/tests/bug-1029883: a new regression test for
3923         this bug
3924
3925 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3926
3927         * src/hc08/gen.c (emitinline): fixed bug #1029778
3928         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3929         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3930         and starts toward RFE #905167)
3931
3932 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3933
3934         * src/pic16/gen.c (mov2f): New function to move an operand to
3935         another without considering if it is a literal or a register,
3936         * (pic16_sameRegs): don't check if they are both AOP_REG,
3937         * (AccRsh): removed andmask=0 lines,
3938         * (genLeftShift): duplicated to be improved in future versions,
3939         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3940         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3941         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3942         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3943         * (insertBankSwitch): fixed inserting banksel directives algorithm
3944         for instructions that follow a skip instruction, this fixes a report
3945         for broken subtraction code generation,
3946         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3947         iCode is a left op, just in case result and right share the same
3948         registers
3949
3950 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3951
3952         * src/hc08/main.c,
3953         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3954         preservation of HX
3955         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3956         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3957         on 2004-09-12; it was buggy
3958
3959 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3960
3961         * src/SDCCsymt.h: removed RESULT_CHECK
3962         * src/SDCCast.c,
3963         * src/SDCCglue.c,
3964         * src/SDCCval.c,
3965         * src/pic/glue.c,
3966         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3967
3968 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3969
3970         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3971         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3972         configuration values no more rejected by compiler, they are assigned
3973         to configuration registers with a warning message instead,
3974         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3975         the for-loop so last conf register is emitted too,
3976         * (_pic16_initPaths): link library libsdcc.lib by default,
3977         * (_hasNativeMulFor): modified test for multiplication according to
3978         Raphael Neider's remarks. Integer multiplication is also done with
3979         support functions,
3980         * device/include/pic16/pic18fregs.h: corrected type error in while
3981         testing and including 18f6720 header file
3982
3983 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3984
3985         * src/pic16/device.h (pic16_options): removed field use_crt,
3986         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3987         until an optimization to handle single bits is added,
3988         * (pic16_loadFSR0): moved before genUnpackBits,
3989         * (genAnd): some white lines removed,
3990         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3991         leave_reset flags in pic16_options when using crt modules,
3992
3993 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3994
3995         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3996           for bugs 898889 & 979599. Also used some safer print instructions.
3997
3998 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3999
4000         * src/pic16/device.h (pic16_options_t): added field use_crt,
4001         crt_name, no_crt,
4002         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4003         catch a probable future bug,
4004         * src/pic16/gen.c: aopIdx function commented out,
4005         * (genAssign): commented out old code which used aopIdx,
4006         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4007         code, added if conditionals to take into account the --use-crt
4008         command line options,
4009         * src/pic16/main.c (pic16_optionsTable): added new command line
4010         options, --use-crt= and --no-crt,
4011         * (_pic16_linkEdit): now the proper crt object is added in the
4012         linker command line except than when --no-crt is specified,
4013         * src/pic16/pcode.c,
4014         * src/pic16/pcode.h: added some structures and functions for a new
4015         optimization scheme to compansate for instruction overhead between
4016         same iCodes, this scheme is currently under development and is not
4017         working in any way,
4018         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4019         to && operator,
4020         * device/lib/pic16/startup/crt0i.c,
4021         * device/lib/pic16/startup/crt0iz.c: added global char variable
4022         __uflags to force the generation of an idata section
4023
4024 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4025
4026         * doc/Makefile,
4027         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4028         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4029
4030 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4031
4032         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4033         Frieder) and clarified the default code optimization mode
4034
4035 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4036
4037         * src/SDCC.lex (doPragma, process_pragma),
4038         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4039         "opt_code_size", and "opt_code_balanced"
4040         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4041         regrouped options by category, added support for category headers
4042         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4043         and "--opt-code-size"
4044         * doc/sdccman.lyx: documented these new options and pragmas
4045         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4046         preference into account
4047
4048 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4049
4050         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4051           geniCodePreDec): Fixed bug 904237 by generating a warning
4052         * src/SDCCerr.h,
4053         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4054
4055 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4056
4057         * src/pic/device.c : When no max ram set validate full memory range.
4058         * src/pic/pcode.c,
4059         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4060
4061 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4062
4063         * device/lib/_gptrget.c,
4064         * device/lib/_gptrput.c: updated comment
4065         * device/lib/calloc.c,
4066         * device/lib/free.c,
4067         * device/lib/malloc.c,
4068         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4069         * src/SDCCcse.c (cseBBlock),
4070         * src/SDCCicode.c (printOperand, geniCodeArray),
4071         * src/SDCCicode.h (struct operand): fixed bug 868103
4072         * support/regression/tests/bug-868103.c: added
4073         * src/SDCCast.c (searchLitOp),
4074         * src/SDCCcse.h (struct cseDef),
4075         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4076         * src/SDCCicode.h (struct operand),
4077         * src/SDCCsymt.h (struct sym_link),
4078         * src/avr/gen.c (hasInc),
4079         * src/ds390/gen.c (hasInc),
4080         * src/hc08/gen.c (genPlusIncr, hasInc),
4081         * src/mcs51/gen.c (hasInc),
4082         * src/pic16/glue.c (pic16_printIvalChar),
4083         * src/pic16/ralloc.c (regWithIdx),
4084         * src/xa51/gen.c (hasInc) : removed warnings
4085         * src/SDCCast.c (createBlock): added comment ???
4086         * src/hc08/ralloc.c: updated comments
4087
4088 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4089
4090         * doc/sdccman.lyx: updated section on switch statements, added
4091         section about semaphore locking
4092         * doc/Makefile: added option -info for latex2html
4093         * device/lib/_gptrget.c,
4094         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4095
4096 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4097
4098         * src/pic/device.h,
4099         * src/pic/device.c,
4100         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4101          maxram is less than 0x100.
4102
4103 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4104
4105         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4106
4107 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4108
4109         * src/port.h,
4110         * src/mcs51/main.c,
4111         * src/ds390/main.c,
4112         * src/z80/main.c,
4113         * src/hc08/main.c,
4114         * src/pic/main.c,
4115         * src/pic16/main.c,
4116         * src/avr/main.c,
4117         * src/xa51/main.c
4118         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4119         a jump table is the best form for a switch statement, including
4120         automatic insertion of missing cases to make the case range
4121         continuous. Developed in collaboration with Frieder Ferlemann.
4122
4123 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4124
4125         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4126         accumulator result if it needs sign extension
4127
4128 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4129
4130         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4131
4132 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4133
4134         * device/lib/gbz80/printf.c,
4135         * device/lib/z80/printf.c: removed define for NULL
4136
4137 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4138
4139         * as/xa51/xa_link.c,
4140         * device/examples/ds390/ow390/ad26.c,
4141         * device/examples/ds390/ow390/cnt1d.c,
4142         * device/examples/ds390/ow390/counter.c,
4143         * device/examples/ds390/ow390/ds2480.h,
4144         * device/examples/ds390/ow390/ds2480ut.c,
4145         * device/examples/ds390/ow390/findtype.c,
4146         * device/examples/ds390/ow390/gethumd.c,
4147         * device/examples/ds390/ow390/owllu.c,
4148         * device/examples/ds390/ow390/ownetu.c,
4149         * device/examples/ds390/ow390/swt12.c,
4150         * device/examples/ds390/ow390/swtloop.c,
4151         * device/examples/ds390/ow390/temp.c,
4152         * device/examples/ds390/ow390/temp10.c,
4153         * device/examples/ds390/ow390/thermo21.c,
4154         * device/examples/ds390/ow390/tinilnk.c,
4155         * device/examples/ds390/ow390/tstfind.c,
4156         * device/examples/serialcomm/windows/serial.cpp,
4157         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4158         * device/include/reg51.h: fixed line endings for cvs
4159
4160 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4161
4162         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4163         packRegsForAccUse, packRegisters): new accumulator register
4164         packing algorithm
4165         * support/regression/ports/hc08/support.c (_putchar): suppress
4166         warning of unused variable
4167         * src/SDCCicode.c: added SWAP entry to codeTable
4168
4169 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4170
4171         * device/lib/sprintf.c: forgot to add this file before previous commit
4172
4173 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4174
4175         * src/pic16/gen.c (genPackBits): added operand right in function
4176         parameters, load result directly if p_type is POINTER (that is
4177         called by genNearPointerSet)
4178         * (genUnPackBits): added operand left in function parameters,
4179         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4180         FSR0 if accessing bitfields,
4181
4182 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4183
4184         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4185           _print_format; updated printf, sprintf, vsprintf
4186         * device/include/asm/default/features.h: corrected comment/define
4187         * device/lib/Makefile.in: added sprintf.c
4188         * device/lib/libsdcc.lib: added sprintf module
4189         * device/lib/printf_large.c,
4190         * device/lib/vprintf.c,
4191         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4192           into these 3 files
4193         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4194         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4195         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4196           hc08 test
4197         * support/regression/tests/zeropad.c: define idata as data for hc08
4198
4199 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4200
4201         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4202         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4203         labels are referenced at least once (even if a reference is not found)
4204         * src/hc08/gen.c (emitcode): set isComment flag for comments
4205         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4206         loads), rules 6a..6b (optimize jumps to return)
4207
4208 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4209
4210         * device/lib/acosf.c (acosf),
4211         * device/lib/asinf.c (asinf),
4212         * device/lib/atanf.c (atanf),
4213         * device/lib/ceilf.c (ceilf),
4214         * device/lib/cosf.c (cosf),
4215         * device/lib/coshf.c (coshf),
4216         * device/lib/cotf.c (cotf),
4217         * device/lib/fabsf.c (fabsf),
4218         * device/lib/floorf.c (floorf),
4219         * device/lib/log10f.c (log10f),
4220         * device/lib/logf.c (logf),
4221         * device/lib/sinf.c (sinf),
4222         * device/lib/sinhf.c (sinhf),
4223         * device/lib/sqrtf.c (sqrtf),
4224         * device/lib/tanf.c (tanf),
4225         * device/lib/tanhf.c (tanhf),
4226         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4227         replaced all instances of "reentrant" in the library functions
4228         defined in math.h with this macro.
4229         * support/regression/tests/float_trans.c: reenabled test for hc08
4230
4231 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4232
4233         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4234         erroneously deleted
4235
4236 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4237
4238         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4239         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4240         multi-byte volatile operands are used
4241         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4242         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4243         initialization to area GSINIT0 so that it would always precede
4244         any static initializers in GSINIT
4245         * support/regression/tests/zeropad.c: fixed idata define for hc08
4246         * support/regression/tests/bug-927659.c,
4247         * support/regression/tests/float_trans.c: disabled tests for hc08
4248         pending missing library routines
4249         * .version: increased version number to 2.4.4 - hc08 port now passes
4250         regression tests
4251
4252
4253 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4254
4255         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4256         * Makefile.common.in,
4257         * as/Makefile,
4258         * as/hc08/Makefile.in,
4259         * as/mcs51/Makefile.in,
4260         * as/z80/Makefile.in,
4261         * debugger/mcs51/Makefile.in,
4262         * device/include/Makefile.in,
4263         * device/lib/Makefile.in,
4264         * doc/Makefile,
4265         * link/Makefile,
4266         * link/z80/Makefile.in,
4267         * packihx/Makefile.in,
4268         * sim/ucsim/main_in.mk,
4269         * sim/ucsim/avr.src/Makefile.in,
4270         * sim/ucsim/doc/Makefile.in,
4271         * sim/ucsim/gui.src/serio.src/Makefile.in,
4272         * sim/ucsim/hc08.src/Makefile.in,
4273         * sim/ucsim/s51.src/Makefile.in,
4274         * sim/ucsim/xa.src/Makefile.in,
4275         * sim/ucsim/z80.src/Makefile.in,
4276         * src/Makefile.in,
4277         * support/cpp2/Makefile.in,
4278         * support/librarian/Makefile,
4279         * support/makebin/Makefile: added DESTDIR to the install path proposed
4280         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4281         * doc/sdccman.lyx: added DESTDIR documentation
4282
4283 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4284
4285         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4286         instruction for interrupt handlers, use fast returns when returning
4287         from high priority interrupts
4288
4289 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4290
4291         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4292         code generation
4293         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4294         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4295         bugs, ported much of Bernhard's code from mcs51
4296         * src/mcs51/gen.c (genSend),
4297         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4298         than one when calling a reentrant function
4299         * device/lib/_mullong.c: defined an alternate struct layout for big
4300         endian ports (hc08)
4301
4302 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4303
4304         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4305         test
4306
4307 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4308
4309         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4310         are sane and complete before asking the port its prefered parameter
4311         passing method (fixes bug #1017633)
4312         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4313         and _ret3
4314
4315 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4316
4317         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4318         problem in bitfields >= 8 bits.
4319
4320 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4321
4322         * src/SDCCsymt.c: undid changes that were not meant to be committed
4323
4324 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4325
4326         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4327
4328 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4329
4330         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4331           copied and wrong bit got inverted
4332
4333 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4334
4335         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4336         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4337         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4338         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4339         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4340         assignments to bitfields at known addresses
4341         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4342         reads from bitfields at known addresses
4343         * src/hc08/ralloc.c (packRegisters),
4344         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4345         genhc08Code): optimize pointer get values used as conditionals
4346         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4347         and branch
4348
4349 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4350
4351         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4352         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4353         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4354         as conditionals
4355
4356 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4357
4358         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4359
4360 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4361
4362         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4363         related problems
4364
4365 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4366
4367         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4368
4369 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4370
4371         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4372         mcs51 port
4373
4374 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4375
4376         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4377
4378 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4379
4380         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4381         cases use more compact code.
4382
4383 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4384
4385         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4386
4387 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4388
4389         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4390
4391 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4392
4393         * src/SDCCsymt.h,
4394         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4395         parameter of changePointer() from symbol* to sym_link*
4396         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4397         * src/SDCCsymt.c (compareType): void* type is castable to other
4398         pointers, but not necesarily an exact match.
4399         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4400         is no longer blindly treated as an exact match.
4401         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4402
4403 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4404
4405         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4406
4407 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4408
4409         * src/pic/gen.c,
4410         * src/pic/pcode.c,
4411         * src/pic/ralloc.h,
4412         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4413
4414 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4415
4416         * src/pic/device.c,
4417         * src/pic/device.h,
4418         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4419
4420 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4421
4422         * src/mcs51/gen.c (emitcode): fixed bug #992819
4423
4424 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4425
4426         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4427           there's no need to make it worse
4428
4429 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4430
4431         * src/mcs51/ralloc.c (deassignLR),
4432         * src/ds390/ralloc.c (deassignLR),
4433         * src/hc08/ralloc.c (deassignLR),
4434         * src/z80/ralloc.c (deassignLR),
4435         * src/pic/ralloc.c (deassignLR),
4436         * src/pic16/ralloc.c (deassignLR),
4437         * src/avr/ralloc.c (deassignLR),
4438         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4439         rlivePoint): fixed another part of bug #971834
4440
4441 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4442
4443         * src/z80/main.c: enabled "critical" keyword
4444         * src/z80/mappings.i,
4445         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4446         functions (fixes bug #979646)
4447         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4448
4449 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4450
4451         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4452           such as c:\mydir.
4453
4454 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4455
4456         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4457           doesn't disable too much optimizations
4458
4459 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4460
4461         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4462
4463 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4464
4465         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4466
4467 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4468
4469         * src/pic/gen.c tidied up tabs
4470         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4471         * src/pic/main.c tidied up tabs
4472         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4473         * src/pic/pcoderegs.c tidied up tabs
4474         * src/pic/ralloc.c tidied up tabs
4475
4476 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4477
4478         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4479         to S_FIXED for pic16 port and when symbol is not in level 0,
4480         allocate for S_REGISTER storage class and pic16 port, too,
4481         * src/pic16/device.h: prototype for checkSym,
4482         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4483         * (pic16_assignConfigWordValue): test the value and the mask to
4484         validate that the value is suitable for the configuration word,
4485         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4486         collect extern declared symbols, don't emit symbol twice, check
4487         first if symbol is in publics set first,
4488         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4489         * added command line '--fstack' which enables an experimental
4490         feature for stack access, too buggy to be used yet...
4491         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4492         * (pic16_allocDirReg): when register has storage class S_REGISTER
4493         allocate in pic16_dynAccessRegs,
4494         * device/include/pic16/pic18f????.h: modified configuration word
4495         naming convention, words started as CONFIG0H but should be CONFIG1H
4496
4497 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4498
4499         * device/include/mcs51reg.h: fixed bug 970993
4500
4501 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4502
4503         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4504         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4505         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4506         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4507         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4508         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4509           error/warning numbers,
4510           added function setWarningDisabled()
4511         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4512         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4513           _memcmp.c _memmove.c calloc.c realloc.c free.c
4514         * support/regression/tests/malloc.c: added tests for new functionality
4515         * support/regression/tests/zeropad.c: added tests for truncated initializers
4516           and initialized char arrays starting with '\x0'
4517         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4518
4519 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4520
4521         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4522
4523 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4524
4525         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4526         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4527         peephole 177.e. Thanks to anonymous
4528
4529 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4530
4531         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4532         function isn't used in the source but referenced as a
4533         variable initializer then declare it as extern in .asm file
4534
4535 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4536
4537         * .version: increased version number to 2.4.3
4538
4539         Adding version extension according to ChangeLog CVS revision
4540         * src/Makefile.in (target all): added dependency 'version.h'
4541         * (rule version.h): added rule to create version.h from ChangeLog,
4542         * (rule dep): added dependency version.h,
4543         * src/version.awk: AWK script to create version.h
4544         * src/SDCCdwarf2.c (dwWriteModule),
4545         * src/SDCCglue.c (initialComments),
4546         * src/SDCCmain.c (printVersionInfo): modified to write after
4547         version string the version extension number,
4548         * src/SDCCutil.c: included "version.h"
4549         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4550         number,
4551         * src/SDCCutil.h: added prototype for getBuildNumber
4552
4553         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4554         includeDirsSet, too,
4555         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4556         const char [] is found in function prototype...
4557
4558         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4559         moving to WREG with source is already in WREG,
4560         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4561         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4562         * (aopForSym): stack'ed symbols are partially supported, added
4563         if-clause to support symbols in FARSPACE,
4564         * (sameRegs): added test for AOP_ACC to see if registers are same,
4565         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4566         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4567         * (pic16_popRegFromString): will not allocate a new register if it
4568         doesn't find one by name, bug may have introduced...
4569         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4570         * (genIpush): revived to use pic16 port's stack,
4571         * (genAddrOf): added incomplete case for stack'ed operand,
4572         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4573         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4574         can handle multibyte operands,
4575         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4576         * (pic16initialComments): added message for MPLAB compatibility
4577         mode enabled,
4578         * src/pic16/main.h: prototype for pic16_mplab_comp,
4579         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4580         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4581         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4582         because of increased complexity of procedure,
4583         * (_process_pragma): stack pragma changed to format 'stack pos len',
4584         emit symbol '_stack_end' to conform with gplink,
4585         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4586         to search for register,
4587         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4588         PO_GPR_REGISTER,
4589         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4590         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4591         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4592         case for PO_GPR_REGISTER,
4593         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4594         dies, the new era is ahead !...
4595         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4596         pic16_dynInternalRegs,
4597         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4598         * (pic16_allocDirReg): minor optimizations and bug fixes,
4599         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4600
4601         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4602         load stack and frame pointer with address of 'stack_end' symbol
4603
4604 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4605
4606         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4607         without source code but only variable initializers
4608
4609 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4610
4611         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4612         external are not declared as extern to reduce overhead while linking
4613
4614 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4615
4616         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4617
4618 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4619
4620         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4621           Yee Keat for the patch
4622         * src/SDCCast.c (decorateType): fixed bug #979599
4623         * src/ds390/gen.h: removed local fReturnSizeDS390
4624         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4625         * src/ds390/gen.c (genAnd, genOr, genXor),
4626         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4627
4628 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4629
4630         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4631         add relFilesSet to $3, manipulate $2 to handle linking of object
4632         files without source files in command line,
4633         * device/include/pic16 (all headers): added ID location macros,
4634         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4635         entries for ID location bytes,
4636         * (pic16_assignIdByteValue): NEW,
4637         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4638         added field dumpcalltree to pic16_options_t,
4639         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4640         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4641         emitting rFalseIfx label after check_carry label,
4642         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4643         pic16_emitDIRegs), NEW
4644         * (pic16glue): dump .calltree file when option --calltree found,
4645         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4646         * (_pic16_genAssemblerPreamble): emit ID locations after
4647         configuration registers,
4648         * (pic16_linkCmd): modifications of the link command,
4649         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4650         * (pic16_pCodeInitRegisters): don't init stack registers,
4651         * (pic16_findPrevInstruction): fixed bug,
4652         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4653         bug with immediate registers,
4654         * (buildCallTree): traces stack push and pop,
4655         * (pct2): dump also stack usage for each function,
4656         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4657         * (pic16_allocDirReg): various modifications,
4658         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4659         fixed to 1,
4660
4661 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4662
4663         * src/pic16/pcode.c: removed buggy double colon
4664
4665 2004-07-01 Borut Razem <borut.razem AT siol.net>
4666
4667         * support/scripts/sdcc.nsi: added include/pic16 to setup
4668
4669 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4670
4671         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4672         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4673         target 'clean',
4674         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4675         specific command line arguments. Also added sample lkr script
4676         for placing a variable at a specific memory bank.
4677         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4678         at a specific memory bank,
4679         * (pic16_dump_isection): fixed bug which caused string literals to
4680         be omitted when dumping idata section,
4681         * (pic16_groupRegistersInSection): added code to handle registers
4682         in specific memory banks,
4683         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4684         public, all references are renamed too,
4685         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4686         AOP_DPTR2,
4687         * (pic16_storeForReturn): added case to handle when dest is WREG,
4688         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4689         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4690         pic16_rel_udata, check to see if that register is marked as being
4691         a member of a specific memory bank,
4692         * (pic16_printIvalCharPtr): added code to add string literals either
4693         to code or the idata sections,
4694         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4695         also accept the 'udata' pragma,
4696         * src/pic16/main.h: new structure types sectName and sectSym
4697         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4698         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4699         * (pic16_findPrevInstruction): fixed, it returned nothing,
4700         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4701         instruction combinations,
4702         * (pic16_FixRegisterBanking): heavily reorganised,
4703         * (pic16_AnalyzeBanking): if generating banksel directives is
4704         disabled, then don't call FixRegisterBanking at all,
4705         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4706         completely removed,
4707         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4708
4709 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4710
4711         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4712         Phuah Yee Keat <yk.phuah AT nestac.com>
4713
4714 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4715
4716         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4717         correctly the IVT even if it is relocated to some other location
4718
4719 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4720
4721         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4722         * device/include/pic16/pic18f2220.h: NEW,
4723         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4724         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4725         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4726         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4727         nodefaultlibs, ivt_loc is the location of the interrupt vector
4728         table, and nodefaultlibs signs that default libraries should not be
4729         linked in link stage,
4730         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4731         according to --ivt-loc argument,
4732         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4733         when pragma stack is found,
4734
4735 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4736
4737         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4738         256 (range check), 257 (do while), 258.a-f (bit banging
4739         f.e. on 3-wire SPI bus)
4740
4741 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4742
4743         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4744         variables used exclusively within a loop
4745
4746 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4747
4748         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4749
4750 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4751
4752         * src/SDCClrange.c (computeClash): fixed bug #971834
4753
4754 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4755
4756         * src/mcs51/gen.c (genCmp): fixed bug #975903
4757         * src/hc08/gen.c (operandsEqu),
4758         * src/ds390/gen.c (operandsEqu),
4759         * src/z80/gen.c (operandsEqu),
4760         * src/pic/gen.c (operandsEqu),
4761         * src/pic16/gen.c (operandsEqu),
4762         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4763         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4764
4765 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4766
4767         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4768
4769 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4770
4771         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4772         default case in switch statement,
4773         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4774         to eliminate problem with initialisation of pointers, but problem
4775         still exists,
4776         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4777         * (emitStaticSegment): removed various lines emitting debug info,
4778         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4779         added processor registers for utilizing EEPROM,
4780         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4781         configurable and set 8
4782
4783 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4784
4785         * .version: increased version number to 2.4.2,
4786
4787         Cumulative patch for pic16 port
4788         * src/pic16/device.c: changed scheme to dump initial values for
4789         variables in idata segment, all print_idata* functions were removed,
4790         now the pic16_printIval* will be called,
4791         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4792         * _pic16_printPointerType, pic16_printPointerType,
4793         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4794         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4795         NEW, similar to the respective functions in SDCCglue.c,
4796         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4797         way, emitting hex bytes,
4798         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4799
4800 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4801
4802         * src/avr/ralloc.c (serialRegAssign),
4803         * src/xa51/ralloc.c (serialRegAssign),
4804         * src/pic/ralloc.c (serialRegAssign),
4805         * src/pic16/ralloc.c (serialRegAssign),
4806         * src/hc08/ralloc.c (serialRegAssign),
4807         * src/z80/ralloc.c (serialRegAssign),
4808         * src/ds390/ralloc.c (serialRegAssign),
4809         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4810
4811 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4812
4813         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4814         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4815
4816 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4817
4818         Cumulative patch for pic16 port:
4819         * src/pic16/device.h (typedef PIC16_device) modified fields for
4820         defining microcontrollers,
4821         * src/pic16/device.c: added new info for all devices in Pics16 array,
4822         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4823         to be optimised out by the pCode optimiser,
4824         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4825         specially, bug reported by G.M. Gallant,
4826         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4827         as force'd so that cannot be optimised out by pCode optimiser,
4828         * src/pic16/pcode.c,
4829         * src/pic16/pcodepeeph.c,
4830         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4831         they are disabled by default, but can be enabled explicit with
4832         command argument --denable-peeps, for testing,
4833         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4834         --pomit-ivt in COMPILE_FLAGS
4835
4836 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4837
4838         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4839           compilation on MSVC
4840
4841 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4842
4843         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4844
4845 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4846
4847         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4848         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4849
4850 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4851
4852         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4853         would only assign 0x300001 register.
4854
4855 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4856
4857         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4858         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4859
4860 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4861
4862         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4863         for ds80c400
4864         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4865         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4866         added peephole 254 (left shift), 255 (jump table)
4867
4868 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4869
4870         * device/lib/Makefile.in: removed comment line with model-pic16,
4871         * (target port-specific-objects-pic16): the libraries and objects
4872         are copied to the build directory form the device/lib/pic16/bin
4873         directory
4874
4875         Cumulative patch concerning pic16 port:
4876         * library directory has been re-organized,
4877         * added support for PIC18F1220,
4878         * added headers and library sources for chips 18f1220,18f6520,
4879         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4880
4881         * configuration registers setting has changed, now each supported
4882         device has a complete description of the registers it uses,
4883         * all initialisations are moved to idata sections, these section
4884         can be absolute or relocatable,
4885         * fixed initialisation of codespace variables,
4886         * fixed warning about PCLATU and gpsim,
4887         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4888         * (genAssign): use table reads when assigning from variables in codespace,
4889         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4890         char/int variables placed in codespace,
4891         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4892         registers set in .asm file, no need for --pomit-config-words anymore,
4893         * (pic16glue): some 8051 legacy segments are commented out
4894         (to be removed completely),
4895         * added support for alternative assembler and linker with --asm=
4896         and --link= command line arguments,
4897         * peepholes are disabled automatically in the port, no need to
4898         specify on command line,
4899         * port supports natively char/int/long multiplication, but converts
4900         all divisions to support functions,
4901         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4902         to the file set in variable $2,
4903         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4904         strings in ASCII format and not in hex,
4905         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4906         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4907         allocate proper register if iCodes aren't temporary,
4908
4909 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4910
4911         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4912
4913 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4914
4915         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4916         is commented out
4917
4918 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4919
4920         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4921         computed address is reused
4922         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4923         multi-byte bitfields
4924
4925 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4926
4927         * src/z80/gen.c: (genArrayInit): must check for pointers too
4928
4929 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4930
4931         * support/regression/tests/zeropad.c: never meant to commit the
4932           nestedstruct test: removed, added check for GCC version
4933
4934 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4935
4936         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4937         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4938         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4939           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4940           bugs 928906 and 954082 half-empty initializers
4941         * src/SDCCsymt.h,
4942         * src/SDCCsymt.c (getAllocSize): added for above fix
4943         * src/z80/gen.c (genArrayInit): fixed bug 741044
4944         * support/regression/tests/zeropad.c: added tests
4945
4946 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4947
4948         * src/pic16/device.c (pic16_dump_section): corrected bug which
4949         caused some symbols of the libraries to be misplaced
4950
4951 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4952
4953         * src/pic16/glue.c,
4954         * src/pic16/ralloc.h,
4955         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4956         to fix conflict with pic port
4957
4958 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4959
4960         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4961         externs configuration variables,
4962         * src/pic16/ralloc.h,
4963         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4964         prototype in header, commented out some debug messages
4965
4966 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4967
4968         * src/pic16/glue.c,
4969         * src/pic16/main.c,
4970         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4971         for gpasm COFF object generation. Thanks to D. Hawkins for
4972         his patch info
4973
4974 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4975
4976         * src/ds390/main.c,
4977         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4978         Brock for spotting this)
4979         * src/ds390/gen.c (genEndFunction),
4980         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4981         interrupt handler and critical. Disable push/pop optimizations when
4982         peephole optimizations disabled.
4983
4984 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4985
4986         Updated pic16 library sources and headers.
4987         * device/lib/pic16/pic18f*/ ,
4988         * device/include/pic16/*.h: modified to handle structured SFR
4989         definitions
4990
4991 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4992
4993         * src/port.h (PORT structure): added hook initPaths, now each
4994         port can declare its own default search paths,
4995         which can been seen with the --print-search-dirs option,
4996         see pic16 port for example,
4997         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4998         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4999         * (doPrintSearchDirs): NEW, replaces in a central manner the
5000         printing of search dirs which was split in set*Paths functions,
5001         * (main): added call to port->initPaths and doPrintSearchDirs,
5002         * src/avr/main.c,
5003         * src/ds390/main.c,
5004         * src/hc08/main.c,
5005         * src/izt/i186.c,
5006         * src/izt/tlcs900h.c,
5007         * src/mcs51/main.c,
5008         * src/pic/main.c,
5009         * src/pic16/main.c: modified port structures to reflect addition of
5010         initPaths hook,
5011
5012         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5013         * (pic16_dump_section): for registers in same address reserve memory once,
5014         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5015         to no_banksel,
5016         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5017         result is greater in size than right or left,
5018         * (pic16_genUMult8X8_8): there are some cases where the result can
5019         be 16 bits size, so handle these,
5020         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5021         * (pic16_outBitC): modified to emit pcodes,
5022         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5023         or not,
5024         * (genDivOneByte): implemented algorithm to divide 8-bits,
5025         * (genCmp): uncommented goto, but issues still exist,
5026         * (genAnd): fixed a bug with variables >8bits,
5027         * (genPackBits): optimization added that uses BCF/BSF to change a
5028         single bit,
5029         * (genAssign): fixed bug when assigning floating point literals,
5030         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5031         __sdcc_gsinit_startup label,
5032         * src/pic16/main.c (_pic16_init): removed search directory
5033         initialisations,
5034         * (_pic16_initPaths): NEW, used to initialise search directories,
5035         * (_hasNativeMulFor): support functions for all except char/int
5036         multiplication, and char division,
5037         * (PIC16_port struct): modified entry for native mul support,
5038         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5039         no_banksel option,
5040         * (buildCallTree): call to register_usage is ifdef'ed out,
5041
5042 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5043
5044         * device/include/string.h: applied Stas Sergeev's patch to make this
5045         header file compatible with the preprocessor -Wundef option
5046         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5047         failure (fixes bug #941458)
5048
5049 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5050
5051         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5052         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5053         that the variable, not the function, should be static
5054         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5055         to be consistent with non-literal case
5056
5057 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5058
5059         * src/SDCCast.c (isConformingBody): fixed bug #949967
5060         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5061         convilong): fixed bug #952086
5062
5063 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5064
5065         * src/SDCCmem.c (allocVariables): fixed bug #955321
5066
5067 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5068
5069         * src/hc08/main.c (_hc08_genAssemblerEnd),
5070         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5071         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5072         completely eliminated the use of a temporary file
5073         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5074         when more than one file linked
5075         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5076
5077 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5078
5079         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5080         which fixes bug #543481
5081         * support/regression/tests/bug-751703.c: fixed comments left from a
5082         cut and paste error
5083         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5084         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5085         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5086         scopes
5087         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5088         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5089         are now changed to underscores in moduleName
5090
5091 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5092
5093         * as/mcs51/lkmem.c: better fix for bug #954173
5094
5095 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5096         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5097
5098         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5099         * device/include/c8051f000.h,
5100         * device/include/c8051f120.h,
5101         * device/include/c8051f300.h,
5102         * device/include/c8051f310.h,
5103         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5104         PWM16) and detab'ed
5105
5106 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5107
5108         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5109         and mailing lists, doc'ed --no-peep-comments, removed reference
5110         to knoppix (newest version has no LyX/LaTeX), other minor changes
5111         * src/SDCCglue.c (glue): save 2 bytes stack space with
5112         option --main-return. The ljmp could probably be avoided too
5113
5114 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5115
5116         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5117
5118 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5119
5120         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5121         * src/SDCCopt.c (isLocalWithoutDef),
5122         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5123         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5124         (credit to Maarten Brock for patch #949363, on which this is based)
5125         * support/regression/tests/bug-751703.c: some test cases of extern used
5126         within inner scopes.
5127
5128 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5129
5130         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5131         SPEC_STRUCT
5132         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5133         struct definitions
5134         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5135         dwWriteLabel): fix to create valid debugger symbols even when
5136         the module name has non-alphanumeric symbols in it
5137         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5138         when a variable's allocation has been optimized away
5139
5140
5141 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5142
5143         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5144         * src/hc08/main.c,
5145         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5146         * src/mcs51/main.c,
5147         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5148         * src/ds390/main.c,
5149         * src/z80/gen.c (z80_emitDebuggerSymbol),
5150         * src/z80/main.c,
5151         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5152         * src/pic/main.c,
5153         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5154         * src/pic16/main.c,
5155         * src/avr/gen.c (avr_emitDebuggerSymbol),
5156         * src/avr/main.c,
5157         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5158         * src/xa51/main.c,
5159         * src/SDCCdebug.c (emitDebuggerSymbol),
5160         * src/SDCCdebug.h,
5161         * src/port.h: added a debugger struct to the port struct. Added a
5162         callback for defining debugger symbols
5163
5164         * src/SDCCast.c (createLabel),
5165         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5166         with isitmp = 1
5167         * src/SDCCicode.h,
5168         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5169         iCode back to the ast for the function
5170
5171         * src/hc08/ralloc.c (hc08_assignRegisters),
5172         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5173         unneeded fields from the regs struct.
5174         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5175         pushReg() & pullReg() functions instead of emitcode()
5176
5177         * src/hc08/gen.c (genLabel, genhc08Code),
5178         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5179
5180         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5181         debugger hooks
5182
5183         * src/hc08/gen.c (genEndFunction, genhc08Code),
5184         * src/hc08/gen.h,
5185         * src/mcs51/gen.c (genEndFunction, gen51Code),
5186         * src/mcs51/gen.h,
5187         * src/ds390/gen.c (genEndFunction, gen390Code),
5188         * src/ds390/gen.h,
5189         * src/z80/gen.c (genEndFunction, genZ80Code),
5190         * src/z80/gen.h,
5191         * src/z80/z80.h,
5192         * src/pic/gen.c (genEndFunction, genpic14Code),
5193         * src/pic/gen.h,
5194         * src/pic16/gen.c (genEndFunction, genpic16Code),
5195         * src/pic16/gen.h,
5196         * src/avr/gen.c (genEndFunction, genAVRCode),
5197         * src/avr/gen.h,
5198         * src/xa51/gen.c (genEndFunction, genXA51Code),
5199         * src/xa51/gen.h,
5200         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5201         specific code to cdbFile.c and out of the backend code generators
5202
5203         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5204         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5205         starting address is now 0
5206
5207         * as/hc08/asm.h,
5208         * as/hc08/m08pst.c,
5209         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5210         assembler directive for DWARF support
5211         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5212
5213         * src/src.dsp,
5214         * src/Makefile.in,
5215         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5216
5217 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5218
5219         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5220         and inappropriate peephole optimization in jump tables
5221
5222 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5223
5224         * as/hc08/m08pst.c,
5225         * src/SDCCglue.c: sdccopt works for the hc08 port now
5226
5227 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5228
5229         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5230
5231 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5232
5233         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5234
5235 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5236
5237         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5238         rules
5239         * src/SDCCmain.c,
5240         * src/SDCCglobl.h,
5241         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5242         comments from the peephole optimizer replacement rules
5243         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5244         symbols
5245         * src/SDCCcse.c (updateSpillLocation),
5246         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5247         equivalents
5248         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5249         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5250         objects far pointers
5251
5252 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5253
5254         * src/SDCCsymt.h: a missing part of my last change
5255         * src/pic/ralloc.c (regTypeNum),
5256         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5257
5258 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5259
5260         * src/SDCCicode.h,
5261         * src/SDCCicode.c (aggrToPtrDclType),
5262         * src/SDCCptropt.h,
5263         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5264         ptrPseudoSymConvert),
5265         * src/pic/ralloc.c (regTypeNum),
5266         * src/pic16/ralloc.c (regTypeNum),
5267         * src/hc08/ralloc.c (regTypeNum),
5268         * src/ds390/ralloc.c (regTypeNum),
5269         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5270         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5271
5272 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5273
5274         * link/z80/lkmain.c (afile),
5275         * as/hc08/lkmain.c (afile),
5276         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5277         prevent a pointer problem when a filename has no directory and
5278         no extension specified.
5279
5280 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5281
5282         * link/z80/lkmain.c (afile): allow periods in directory names
5283         * link/z80/lkmain.c (afile),
5284         * as/mcs51/lkmain.c (afile),
5285         * as/hc08/lkmain.c (afile): allow linker script file to have an
5286         extension other than ".lnk"
5287         * link/z80/lklex.c (getfid),
5288         * link/z80/lkmain.c (parse),
5289         * as/mcs51/lklex.c (getfid),
5290         * as/mcs51/lkmain.c (parse),
5291         * as/hc08/lklex.c (getfid),
5292         * as/hc08/lkmain.c (parse): Support comments in the linker script
5293         file on lines by themselves and after filenames
5294
5295 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5296
5297         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5298
5299 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5300
5301         * src/z80/peeph-z80.def: removed some peephole rules that don't
5302         work with multibyte arithmetic (fixed bug #937126)
5303         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5304         to registers and not global variables
5305         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5306         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5307         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5308         checking for assignments not internally generated (fixed bug #931895)
5309         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5310         structure member (fixed bug #930072)
5311
5312 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5313
5314         * src/SDCCmain.c (linkEdit),
5315         * src/hc08/main.c (_hc08_parseOptions),
5316         * as/hc08/Makefile.in,
5317         * as/hc08/aslink.h,
5318         * as/hc08/asm.h,
5319         * as/hc08/m08pst.c,
5320         * as/hc08/lkrloc.c (relr, rele),
5321         * as/hc08/lkarea.c (lnkarea)
5322         * as/hc08/lkmain.c (afile, parse),
5323         * as/hc08/lkelf.c: support for ELF output
5324         * as/hc08/lks19.c (s19),
5325         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5326
5327 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5328
5329         * as/mcs51/lkihx.c: Fixed bug #899105.
5330
5331 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5332
5333         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5334         .dsp files from Unix to DOS.
5335
5336 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5337
5338         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5339         function pointers; we have been compliant for several months now.
5340         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5341         change that was accidently commented out
5342         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5343         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5344         bug #922319
5345
5346 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5347
5348         * src/hc08/gen.c: output of all of the internal debugging information
5349         is now controlled by the D() macro; it is disabled by default
5350
5351 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5352
5353         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5354         harder to keep the same registers during a CAST iCode
5355         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5356         long via int can be done in a single cast, if the signedness is
5357         correct.
5358         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5359         putchar() in tinibios.c in ds390's library
5360
5361 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5362
5363         * src/SDCCast.c (decorateType): fixed bug #898889,
5364         cast result of a literal complement too
5365         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5366         fixed check for bitfields
5367
5368 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5369
5370         * src/SDCCicode.c (geniCodeLogic): made it static,
5371         (geniCodeLogicAndOr): added in order to fix bug #905492,
5372         (ast2iCode): fixed bug #905492
5373         * support/regression/tests/bug-905492.c: added
5374         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5375         (processParms): fixed bug #927659: don't copy parms, this will clear
5376         decorated flag
5377         * support/regression/tests/bug-927659.c: added
5378
5379 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5380
5381         * src/SDCCast.c (addCast): don't cast float to char
5382         * device/lib/libsdcc.lib: added _memmove
5383
5384 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5385
5386         * device/lib/large/Makefile: fixed parallel execution by
5387         replacing `make` by `$(MAKE)`
5388
5389 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5390
5391         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5392         offsets (fixes bug #923936)
5393
5394 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5395
5396         * device/lib/small/Makefile: fixed parallel execution by
5397         replacing `make` by `$(MAKE)`
5398
5399 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5400
5401         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5402
5403 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5404
5405         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5406         * src/regression/Makefile: Regression test was not running.
5407
5408 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5409
5410         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5411         complement if possible
5412         * src/SDCCval.c (valComplement),
5413         * src/SDCCicode.c (operandOperation): fixed complement of literal
5414         * support/regression/tests/onebyte.c (testComplement): added
5415
5416 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5417
5418         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5419         return an optimized tree; actually replace actParm with the new tree
5420         * src/SDCCast.h: added some parantheses to remove side effects
5421         * support/regression/tests/bug-920866.c
5422
5423 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5424         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5425         Bit operands were not being handled properly in the pic14 port.
5426         (now src/regression/add.c passes again).
5427
5428 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5429
5430         * src/SDCC.y (labeled_statement): case and default no longer require
5431         a following statement (RFE #893037)
5432
5433 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5434
5435         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5436         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5437         disabled (fixes bug #916294)
5438         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5439         "mov a,acc"; patch provided by Lenny Story
5440         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5441
5442 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5443
5444         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5445         functions
5446         * src/ds390/gen.c (genFunction, genEndFunction),
5447         * src/ds390/ralloc.c (ds390_assignRegisters),
5448         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5449         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5450         pushed if there are parameters passed on the stack. Also, a cleaner
5451         way to decide if r0/r1 should be pushed/popped. (Together they fix
5452         bug #918693)
5453
5454 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5455
5456         * doc/sdccman.lyx,
5457         * device/lib/mcs51/crtpagesfr.asm,
5458         * device/lib/mcs51/crtxinit.asm,
5459         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5460         to avoid confusion with Si Lab's SFRPAGE register.
5461
5462 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5463
5464         * src/SDCCglue.c (emitMaps): allow public sfr variables
5465         * src/SDCCglue.c (initialComments): include compiler build date
5466         with compiler version and put the timestamp of the generated
5467         assembly file on a serperate line to be less confusing.
5468         * src/port.h: added genInitStartup hook
5469         * src/avr/main.c,
5470         * src/ds390/main.c,
5471         * src/hc08/main.c,
5472         * src/pic/main.c,
5473         * src/pic16/main.c,
5474         * src/xa51/main.c,
5475         * src/z80/main.c: genInitStartup initialize as NULL (default to
5476         historical behaviour)
5477         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5478         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5479         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5480         library instead of hard coding it into the compiler.
5481         * support/regression/ports/mcs51-stack-auto/spec.mk,
5482         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5483         * device/lib/mcs51/Makefile,
5484         * device/lib/small/Makefile,
5485         * device/lib/large/Makefile,
5486         * device/lib/mcs51/crtpagesfr.asm,
5487         * device/lib/mcs51/crtstart.asm,
5488         * device/lib/mcs51/crtxclear.asm,
5489         * device/lib/mcs51/crtxinit.asm,
5490         * device/lib/mcs51/crtclear.asm,
5491         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5492         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5493         and into user configurable files.
5494         * device/lib/clean.mk: clean mcs51 directory too
5495         * support/regression/tests/longlit.c: added static to T1 declaration
5496         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5497         accesses in the initialization code
5498
5499 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5500
5501         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5502         OSCTRIMVAL as noted in bug #916008
5503
5504 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5505
5506         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5507         in loops with multiple exits (reported as incorrect registers
5508         used by Martin Helmling in Sdcc-user list)
5509
5510 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5511
5512         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5513         made ds390 register extensions look less like error messages
5514
5515 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5516
5517         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5518         reported by Adam Wozniak in Sdcc-user list
5519
5520 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5521
5522         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5523         arithmetic optimizations, added debug output
5524
5525 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5526
5527         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5528         * sdcc.spec: updated and split sdcc into 3 rpms
5529         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5530         needed for literals of LEFT_OP and '+'
5531         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5532         introduced RESULT_TYPE_NOPROM
5533         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5534         left shift
5535         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5536         limited promotion to int only for '*'
5537         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5538
5539 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5540
5541         * src/pic16/gen.c (genSkip),
5542         (genc16bit2lit), (gencjneshort): commented out
5543         (is_LitOp): new helper function, checks operand type
5544         (genCmpEq): rewritten
5545
5546 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5547
5548         * support/regression/tests/bug-908454.c: added
5549
5550 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5551
5552         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5553         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5554         (geniCodeCast): cosmetic, don't preserve bit storage class
5555         (geniCodeLeftShift): added promotion
5556         (geniCodeLogic): fixed regression
5557         * src/SDCCsymt.c (computeTypeOr): accept bits too
5558         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5559
5560 2004-03-07  Borut Razem <borut.razem AT siol.net>
5561
5562         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5563
5564 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5565
5566         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5567         version of pic16_genPackRegisters which does not check if ic is a
5568         CAST operator,
5569         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5570         function cause string1.c regression test fails
5571
5572 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5573
5574         * sim/ucsim/configure.in,
5575         * sim/ucsim/configure,
5576         * sim/ucsim/doc/Makefile.in: use docdir
5577         * src/SDCC.y: fixed sbit atrributes
5578         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5579         * src/SDCCast.c (decorateType): |^& need special promotion handling
5580         * src/SDCCast.h,
5581         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5582         * src/SDCCsymt.h (computeType),
5583         * src/SDCCicode.c: computeType() needs op
5584         * src/SDCCsymt.c (checkTypeSanity),
5585         * doc/sddman.lyx: "plain" bitfields are unsigned
5586         * src/SDCCsymt.c (computeTypeOr): added
5587         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5588         |^& ops
5589         * src/SDCCval.c (val*): computeType() needs op
5590         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5591         * support/regression/tests/onebyte.c: added tests for |^&
5592
5593 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5594
5595         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5596         for writing icode into asm output.
5597
5598 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5599
5600         * src/pic16/device.c: added some debug lines enabled
5601         with macro DEBUG_CHECK,
5602         * src/pic16/genarith.c: more debug in genPlus,
5603         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5604         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5605         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5606         * (aopForSym): onStack symbols are re-placed in data memspace,
5607         and onStack flag is cleared,
5608         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5609         copy temporary pcodeop,
5610         * (genPcall): added warning for not updating PCLATU,
5611         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5612         always true for pic16 port,
5613         * (genMultOneWord): NEW, supports integer multiplication,
5614         * (genMult): modified to call genMultOneWord,
5615         * (ifxForOp): added warning when return NULL,
5616         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5617         flag is set before call to operandFromSymbol for implicit
5618         added structures,
5619         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5620         options.intlong_rent are set by default,
5621         * (_hasNativeMulFor): modified to allow port generation of integer
5622         multiplication,
5623         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5624         set regtype to REG_SFR for all registers, restricting seting the
5625         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5626
5627 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5628
5629         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5630         more than 500 times in the regression tests
5631
5632 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5633
5634         * support/Util/SDCCerr.h,
5635         * support/Util/SDCCerr.c,
5636         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5637         enumerator_list),
5638         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5639         for symbol conflicts.
5640         * support/valdiags/tests/enum.c,
5641         * support/valdiags/tests/tentdecl.c,
5642         * support/valdiags/tests/struct.c: expect possible error messages
5643         referring to original symbol definitions.
5644         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5645         * src/SDCCsymt.h,
5646         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5647
5648 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5649
5650         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5651
5652 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5653
5654         * src/pic16/ralloc.c (newReg): fixed bug #908929
5655
5656 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5657
5658         * src/ds390/gen.c: added missing #include "main.h"
5659
5660 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5661
5662         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5663         checking if symbol is already in set,
5664         * src/pic16/device.h: prototype for checkAddSym,
5665         * src/pic16/gen.c: (_G): added entry interruptvector,
5666         * (assignResultValue): removed some commented out lines,
5667         * (genFunction): check for ISR via sym->type, absolute section for
5668         interrupt code is created via a new pBlock, the goto instruction is
5669         placed now correctly at the interrupt vector position, changed all
5670         references from ivec to _G.interruptvector,
5671         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5672         is the interrupt is a high priority one, same for return from ISR,
5673         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5674         externs to calls of checkAddSym,
5675         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5676         pic16_pcode_verbose flag is set,
5677         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5678         * src/pic16/pcoderegs.c: message about how many registers are saved
5679         will only be emitted if pic16_pcode_verbose flag is set,
5680
5681 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5682
5683         * src/ds390/ralloc.h,
5684         * src/ds390/ralloc.c (ds390_regWithIdx),
5685         * src/ds390/gen.c (emitcode),
5686         * src/ds390/main.h,
5687         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5688         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5689         ds390operandCompare, getRegsRead, getRegsWritten,
5690         initializeAsmLineNode): customized instruction size calculation for
5691         ds390, started basis for some register optimizations
5692         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5693         corresponding assembly output
5694         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5695         missing push/pop of r0/r1. Optimized push/pops
5696
5697 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5698
5699         * src/mcs51/main.c (instructionSize): fixed ACALL size
5700         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5701
5702 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5703
5704         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5705         the sorting of rlist with NULL elements
5706         * (print_idataType, print_idata): NEW to create idata sections
5707         * src/pic16/device.h: idataSymSet new variable
5708         * src/pic16/gen.c (genFunction): fixed some bugs in string
5709         comparing, improved the absolute section creation for ISRs,
5710         added FSR0L/FSR0H in registers that are saved in an ISR,
5711         * (genInline): fixed the processing of inline snippets,
5712         now they undergo no process by the peephole optimizer
5713         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5714         are placed in idataSymSet,
5715         * (pic16emitStaticSeg): extern symbols are added in externs,
5716         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5717         switching when aboslute variables are placed in access bank memory
5718         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5719         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5720         commented out with #if,
5721         * (pic16_packRegisters): reintroduce the check for CAST because some
5722         symbols are not correctly handled,
5723         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5724         pCodeInstruction instead of pCode,
5725         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5726         pCodeAsmDir definition,
5727         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5728         directive, then the argument directive is emitted without the leading
5729         tab, hack for inline labels which must be in the first column,
5730         * (compareLabel,pic16_findNextInstruction),
5731         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5732         * (insertBankSwitch): modified for the new pCodeAsmDir,
5733
5734 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5735         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5736
5737         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5738         instance,
5739         * (pushSide): commented out with #if,
5740         * (assignResultValue): fixed some typos in saving
5741         registers,
5742         * (genPcall): FIXED and sync'ed with genCall,
5743         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5744         * (genNearPointerGet): fixed to handle some more cases,
5745         implementation scheme via table reads,
5746         * (genConstPointerGet): modified to access code memory correct,
5747         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5748         and improved to handle some cases
5749         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5750         instead of "RETLW" for init data
5751         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5752         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5753         variables are placed in access bank memory (<0x80 and >=0xf80),
5754         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5755         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5756         TBLWT_POSTDEC,TBLWT_PREINC
5757         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5758         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5759         directives
5760         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5761         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5762         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5763         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5764
5765 2004-02-29  Borut Razem <borut.razem AT siol.net>
5766
5767         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5768         support/Util/findme.h, support/Util/system.h: enhance binary relative
5769         search for lib and include by using findProgramPath()
5770
5771 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5772
5773         * src/SDCCpeeph.h,
5774         * src/SDCCpeeph.c (pcDistance),
5775         * src/port.h,
5776         * src/mcs51/ralloc.h,
5777         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5778         * src/mcs51/main.h,
5779         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5780         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5781         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5782         size calculation port specific, started basis for some register
5783         optimizations
5784         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5785         missing push/pop of r0/r1. Optimized push/pops
5786         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5787         * device/lib/_modsint.c (_modsint),
5788         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5789         and stack version so regression tests pass
5790
5791 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5792
5793         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5794         * src/SDCCast.c (decorateType): catch another small optimization
5795         with '?' operator
5796         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5797         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5798         modified to finally use computeType() all over SDCC,
5799         see Feature Request #877103
5800         * src/SDCCval.h: cosmetic
5801         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5802         valCompare(); regression tested in muldiv.c
5803         * support/regression/tests/muldiv.c (testMod): mod sign follows
5804         dividend only
5805
5806 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5807
5808         * src/SDCCast.c (decorateType): fixed bug #902362
5809         * doc/INSTALL.txt: fixed install instructions for win32
5810
5811 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5812
5813         * device/include/Makefile.in (install): fixed by replacing spaces
5814         by tabs
5815         * doc/README.txt,
5816         * doc/INSTALL.txt: updated for release
5817         * doc/sdccman.lyx: added warning for --xstack being buggy
5818
5819 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5820
5821         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5822         to eliminate build warnings.
5823         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5824
5825 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5826            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5827
5828         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5829         removed -penable-stack, added comment for stack pragma, added
5830         warning for not initializing the stack/frame registers, removed
5831         comment at interrupts section
5832
5833         Stack is made permanent, there is no ability to disable stack usage.
5834         * src/pic16/device.h,
5835         * src/pic16/device.c: removed all references to USE_STACK macro,
5836         * src/pic16/device.c (pic16_dump_section): when no elements in
5837         rlist, free rlist before return,
5838         * (pic16_dump_int_registers): NEW, internal registers are a new set
5839         of general purpose registers reused by each function,
5840         * (checkAddReg): returns 1 if registers is added to set,
5841         * (pic16_groupRegistersInSection): when a registers is of type
5842         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5843         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5844         SRCASECMP macro is moved here from device.c
5845         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5846         PO_PCLATU, PO_PRODL, PO_PRODH,
5847         * (pic16_pCodeOpType, genMinus,
5848         changed compares to "a" register, with AOP_ACC,
5849         * (pic16_genPlus): fixed some bugs and indented properly,
5850         * (pic16_addSign): changed size to size+offset in the MOVWF
5851         instruction,
5852         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5853         multiply 8-bit operand by literal, result is 8-bit,
5854         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5855         multiply 2 8-bit operand, result is 8-bit,
5856         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5857         genUMult8X*_16,
5858         * src/pic16/gen.c: changed accUse to contain WREG only,
5859         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5860         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5861         true, do not use immediate addressing any more unless sym is a
5862         pointer in codespace,
5863         * (aopForRemat): do not use immediate addressing when symbol not in
5864         codespace and when symbol's address is requested,
5865         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5866         accUse size (= 1),
5867         * (aopGet): added case for AOP_ACC and don't return "accumulator
5868         bug" but WREG instead,
5869         * (popGetTempReg): pushes contents of temporary register in stack,
5870         * (popReleaseTempReg): pops contents of temporary register from
5871         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5872         * (pic16_popGet): separated case AOP_ACC to return register WREG
5873         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5874         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5875         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5876         the use of immediate pointers to certain cases only.
5877
5878         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5879         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5880         * (assignResultValue, genCall, genRet): modified to use the new
5881         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5882         genPcall is still broken,
5883         * (genFunction): added code to create 'A' type pBlocks when
5884         interrupt functions are generated, code not extensively tested yet,
5885         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5886         * (genEndFunction): modified so ISRs pop stored registers from stack,
5887         * (genMultOneByte): cleanup,
5888         * (AccRsh): added flag andmask, to and result with appropriate mask,
5889         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5890         * (genDataPointerGet): fixed and reenabled its use,
5891         * (genNearDataPointerGet): bugs fixed,
5892         * (genDataPointerSet): bugs fixed,
5893         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5894         pic16_DumpSymbol, pic16_DumpOp,
5895         * src/pic16/genutils.h: function prototypes for the above functions,
5896         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5897         pointers,
5898         * (pic16emitRegularMap): many many many improvements, but needs a
5899         major cleanup,
5900         * src/pic16/main.c: enable_stack in pic16_options is removed,
5901         * (_pic16_parseOptions): removed command line options -penable-stack,
5902         * (_process_pragma): emit stack symbol only when stack pragma is
5903         processed,
5904         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5905         redirected to FSR0L/FSR0H pair,
5906         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5907         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5908         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5909         for immediates,
5910         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5911         * (dumpPicOptype): NEW,
5912         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5913         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5914         with movff instruction,
5915         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5916         added pic16_int_regs, some packRegsFor* functions are commented out,
5917         because produce errors,
5918         * src/pic16/NOTES: minor modifications
5919
5920 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5921
5922         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5923         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5924         --pack-iram.
5925         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5926         * as/mcs51/lkaomf51.c: fixed bug #895763
5927
5928 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5929
5930         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5931
5932 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5933
5934         * doc/sdccman.lyx: added details about the HC08 storage classes and
5935         interrupts, fixed the register usage info for z80 & gbz80
5936
5937 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5938
5939         * doc/sdccman.lyx: added more pic16 port documentation
5940         * device/include/pic16/: added header pic18fregs.h
5941
5942 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5943
5944         * doc/sdccman.lyx: added Vangelis' contribution
5945
5946 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5947
5948         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5949         extend to the next CALL or PCALL, not just to the next CALL.
5950
5951 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5952
5953         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5954
5955 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5956
5957         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5958         bug #895752 and a better fix for bug #716790
5959
5960 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5961
5962         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5963
5964 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5965
5966         * doc/sdccman.lyx: minor changes, minor changed
5967
5968 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5969
5970         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5971         which can't handle SDCC_NEWONEBYTEOPS,
5972         (geniCodeMultiply): removed conversion from mult to shift for pic14
5973         and pic16
5974
5975 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5976
5977         * src/hc08/gen.h,
5978         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5979         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5980         thus fixing bug #895406
5981
5982 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5983
5984         * device/lib/_modsint.c,
5985         * device/lib/_modslong.c: sign follows divisor only
5986         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5987         signs or signedness can be ignored
5988         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5989         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5990         added optimization for IFX,
5991         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5992         arguments;
5993         reenabled optimization for IFX, which was removed on 2004-01-11
5994         * src/SDCCast.h: added return type IFX
5995         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5996         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5997         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5998         SDCC_OLDONEBYTEOPS selects the old behaviour
5999         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6000         changed again and commented promotion rule
6001         * src/SDCCval.c (valDiv): promotion no longer necessary
6002         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6003         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6004         rewritten
6005         * support/regression/tests/onebyte.c: added
6006
6007 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6008
6009         * gen.c (genInline): reverted to old code for assemnling inline
6010         code because of bug reported James Chadd
6011
6012 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6013
6014         * ralloc.h: missing declarations from previous patch,
6015         seems that patch for ralloc.h was never applied, fixed
6016
6017 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6018            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6019
6020         * pcode.c,
6021         * pcode.h,
6022         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6023         indirect addressing. Marked FSR0 as deprecated
6024         * gen.c (pointerCode): commented out, not needed now
6025         (pic16_popGet2p): new MOVFF helper function
6026         (genGenPointerGet),
6027         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6028         (shiftRLong): removed duplicate debugging info
6029
6030 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6031
6032         * src/ds390/gen.c (genNearPointerGet),
6033         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6034         optimization with bits, but not bitfields.
6035         * src/ds390/ralloc.c (packRegisters),
6036         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6037
6038 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6039
6040         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6041
6042 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6043
6044         * src/SDCCsymt.h,
6045         * src/SDCCicode.c (operandFromSymbol),
6046         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6047         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6048         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6049         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6050         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6051         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6052         bug #892038
6053         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6054         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6055         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6056         * src/SDCCsymt.c (newSymbol),
6057         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6058         enumerator_list),
6059         * src/SDCCval.h,
6060         * src/SDCCval.c (newiList): fixed bug #885705
6061
6062 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6063
6064         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6065         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6066
6067 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6068
6069         * device/include/c8051f120.h,
6070         * device/include/c8051f300.h,
6071         * device/include/c8051f310.h: added/updated header files for Silicon
6072         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6073         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6074         in new section Submitting patches
6075
6076 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6077
6078         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6079         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6080         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6081         genGenPointerSet),
6082         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6083         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6084         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6085         genGenPointerSet),
6086         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6087         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6088         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6089         genGenPointerSet),
6090         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6091         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6092         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6093         genGenPointerSet): fixed bug #892400
6094         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6095         to eliminate build warnings.
6096         * src/SDCCast.c (processParms),
6097         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6098         fixed bug 751859
6099         * support/valdiag/valdiag.py: added GCC to the list of defines active
6100         when compiling with gcc
6101
6102 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6103
6104         * support/Util/SDCCerr.h,
6105         * support/Util/SDCCerr.c,
6106         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6107         with an incomplete type (fixed bug #883734)
6108         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6109
6110 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6111
6112         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6113
6114 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6115
6116         * src/SDCCast.c (decorateType),
6117         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6118         function pointer implementation
6119         * support/regression/tests/funptrs.c: added tests to verify both forms
6120         of function pointers work correctly. Added tests to verify parameters
6121         are passed in the correct order.
6122
6123 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6124
6125         * device.c (regCompare): registers are sorted by ascending
6126         address and increasing size,
6127         * main.c (_pic16_finaliseOptions): removed the declaration
6128         of compiler macro MCU. Now a macro of the format pic18fxxxx
6129         will be defined from the command line
6130
6131 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6132             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6133
6134         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6135         PCOP_RLCF was overwritten!
6136         * gen.c (genSkip): commented out calls to pic16_emitcode,
6137         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6138         * (genlshTwo),
6139         * (genRRC): added debugging info,
6140         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6141         overwritten while shifting,
6142         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6143         overwritten while shifting,
6144         * (AccLsh),
6145         * (AccRsh),
6146         * (shiftLLeftOrResult),
6147         * (shiftRLeftOrResult),
6148         * (shiftRLong),
6149         * (shiftLLong): Implemented with pic16_emitpcode
6150         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6151         * (genLeftShift): Fixed bug, operand for shift by variable always
6152         was "and"ed with 0x0f,
6153         * (genLeftShiftLiteral),
6154         * (genrshTwo),
6155         * (genRightShiftLiteral): added debugging info,
6156         * (genrshFour): added comment,
6157         * (genRightShift): determined signedness from operand "left"
6158         instead of "result"
6159
6160 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6161
6162         * src/SDCCicode.c (geniCodeParms),
6163         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6164         function pointers, fixed function pointer bugs #861242 and #861896
6165
6166 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6167
6168         * device/include/c8051f000.h,
6169         * device/include/c8051f120.h,
6170         * device/include/c8051f300.h: added header files for Silicon
6171         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6172
6173 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6174
6175         * src/SDCCast.c (processParams): added new type flow and restructured
6176         (gatherAutoInit): added new type flow
6177         (addCast): cosmetic changes
6178         (getLeftResultType): added new type flow for array indices, patch
6179         provided by Stas, see FR #877103
6180         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6181         array index patch by Stas
6182         * src/SDCCast.h: added prototype getResultTypeFromType()
6183         * src/SDCCval.h,
6184         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6185         * src/pic/glue.c (pic14emitStaticSeg),
6186         * src/pic16/glue.c (pic16emitStaticSeg),
6187         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6188         for initialization of symbols
6189         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6190         * support/Util/SDCCerr.h:
6191         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6192         * .version: bumped version number to 2.3.8
6193         * device/include/Makefile.in (install),
6194         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6195         avoid warnings
6196
6197 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6198
6199         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6200         Slade Rich fixed an optimization bug
6201         * src/pic/pcodepeep.c,
6202         * src/pic/pcoderegs.c
6203         * doc/Makefile (install): added test for directory
6204
6205 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6206
6207         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6208         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6209         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6210         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6211         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6212         * as/mcs51/asexpr.c (term),
6213         * as/hc08/asexpr.c (term): fixed bug #887146
6214
6215 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6216
6217         * src/z80/gen.c (genMult): handle single byte result product
6218         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6219         DUMMY_READ_VOLATILE (fixed bug #886367)
6220
6221 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6222
6223         * support/regression/tests/libmullong.c: fixed logic, on little endian
6224         hosts we ended without a mullong_wrapper()
6225
6226 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6227
6228         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6229         virus/worm forged address usage.
6230
6231 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6232
6233         Fixed promotion, it should be done on AST level:
6234         * src/SDCCast.c (addCast): added promotion to int
6235         (decorateType): updated call to upCast()
6236         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6237         usualUnaryConversions()
6238
6239 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6240
6241         * support/regression/tests/literalop.c (mulWrapper): Added a
6242         wrapper to remove integer overflow warnings.
6243
6244         * support/regression/tests/float_trans.c: Made work on host.
6245
6246         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6247         location of sz80.
6248
6249         * support/regression/generate-cases.py (main): Changed from inline
6250         to a main method.
6251
6252         * doc/Makefile (install): Changed to depth first to get rid of
6253         missing directory install warning.
6254
6255         * as/Makefile (install-doc): Made work on Mac.
6256
6257 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6258
6259         * src/SDCCast.c: added an additional type flow in decorateType() of
6260         opposite direction, see feature request #860006; it's enabled at runtime
6261         by setting the environment variable SDCC_NEWTYPEFLOW
6262         * src/SDCCast.h: changed prototype of decorateType()
6263         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6264         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6265         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6266         see feature request #877103
6267         * src/SDCCval.c: updated call of decorateType()
6268         (valBitwise): fixed bug #882876
6269         (valMinus): added promotion
6270         (valLogicAndOr): result is unsigned
6271         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6272         * src/SDCCsymt.c (computeType),
6273         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6274         must not cause an unsigned operation
6275         * src/pic/glue (pic14emitRegularMap),
6276         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6277
6278 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6279
6280         * src/pic/pcode.c (PCodeID): commented out left over debug code
6281
6282 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6283
6284         * support/valdiag/tests/overflow.c: added shift tests
6285         * src/pic/device.c,
6286         * src/pic/gen.c,
6287         * src/pic/gen.h,
6288         * src/pic/glue.c,
6289         * src/pic/main.c,
6290         * src/pic/pcode.c,
6291         * src/pic/pcode.h,
6292         * src/pic/pcodepeep.c,
6293         * src/pic/pcoderegs.c,
6294         * src/pic/ralloc.c,
6295         * src/pic/ralloc.h: applied patch from Slade Rich;
6296         added support for multiple code pages and multiple RAM banks on the
6297         PIC 14 port. The ASM files now no longer simply assume all the
6298         code / RAM are in the same page / bank. This means the linker can
6299         safely allocate code/RAM of separate ASM files to different pages/banks.
6300         * doc/sdccman.lyx: added Slade's tips
6301         * src/mcs51/peeph.def: fixed bug #880768
6302
6303 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6304
6305         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6306         * src/SDCCast.c (decorateType): fixed bug #880197
6307
6308 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6309
6310         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6311         getopt.h.
6312
6313         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6314         strtof is not part of C89 and isn't included with Mac OS X.
6315
6316 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6317
6318         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6319         shiftL2Left2Result): fixed bug #879326
6320         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6321         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6322         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6323         address fetch for clr instruction
6324         * device/lib/hc08/_mulint.c: created optimized assembly version
6325         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6326
6327 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6328
6329         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6330         proposed in FR #877103
6331
6332 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6333
6334         * src/SDCCval.c (cheapestVal): added missing checks
6335         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6336         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6337
6338 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6339
6340         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6341         equal operands
6342
6343 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6344
6345         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6346         loaded with the linker search paths (-L arguments) and the libraries
6347         to be linked with the current source (-l arguments). Changes
6348         currently will affect only the pic16 port.
6349         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6350         include path the port specific paths and port specific libraries,
6351         * gplink command now contains the $3 argument,
6352         * src/pic16/device.h,
6353         * src/pic16/device.c,: structure PIC_device is made public and
6354         renamed to PIC16_device, the same for variable Pics which is renamed
6355         to Pics16. Updated all references to them.
6356         * src/pic16/glue.c (pic16glue): corrected bug with code
6357         initialization which bypassed the variable initializations block.
6358
6359         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6360         COMPILE_FLAGS and added the --nostdinc option
6361
6362 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6363
6364         * device/include/mc68hc908jb8.h: Register defs for another member
6365         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6366
6367 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6368
6369         Documenting changes from previous commits.
6370         * configure.in (version 1.56),
6371         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6372         when generating output files to configure the pic16 library,
6373         but now I've commented it out, since gputils aren't installed in the
6374         SF compile farm, so library won't compile
6375
6376         * device/lib/Makefile.in (version 1.56): initially I've added in
6377         target 'all' the prerequestive 'model-pic16' so it compiled the
6378         pic16 library, but now I've commented it out for the same reasons
6379         above,
6380         * added targets 'model-pic16' and 'objects-pic16' to compile the
6381         library
6382         * added target 'port-specific-objects-pic16' to handle the
6383         generated libraries and copy them into the build/ directory
6384         * added target 'clean-intermediate-pic16' to clean intermediate
6385         files into pic16 directory
6386         * in target 'installdirs' added line to create directory pic16 in
6387         the installation path
6388
6389         * device/include/Makefile.in (version 1.11): in target 'install'
6390         added lines to copy all header files to installation path,
6391         * in target 'installdirs' added line create directory for pic16
6392         headers in the installation path
6393
6394 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6395
6396         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6397          a function call
6398
6399 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6400
6401         * configure,
6402         * device/lib/configure.in,
6403         * device/lib/configure: fixed for autoconf 2.57
6404
6405 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6406
6407         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6408         option so that it actually works. Made it specific to the z80, since
6409         the gbz80 doesn't have these kinds of I/O ports.
6410
6411 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6412
6413         * device/include/z180.h,
6414         * device/lib/_memcpy.c,
6415         * device/lib/_memmove.c,
6416         * device/lib/_mulint.c,
6417         * device/lib/ser_ir.c,
6418         * device/lib/ser_ir_cts_rts.c,
6419         * device/lib/_strcmp.c,
6420         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6421         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6422         portmode; added deprecation warning for bank= and protmode= forms.
6423         Also, guard against buffer overflow.
6424         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6425
6426 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6427
6428         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6429         changed interrupt vector table generation to only emit declared vectors.
6430         * device/include/Makefile.in: added missing backslash
6431         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6432
6433 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6434
6435         Mainly changes to support compilation of the device libraries
6436         * src/pic16/device.c: stack is allocated via symbol and not
6437         via literal number. The symbol is placed in the corresponding
6438         position of the data ram
6439         * (pic16_dump_section): relocatable and absolute uninitialized
6440         data are now emitted in sorted order to reduce section naming,
6441         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6442         weren't marked as being in the access bank,
6443
6444 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6445
6446         Added portion of GNU PIC Library under the directory
6447         device/include/pic16 and device/lib/pic16. These files
6448         contain the declarations of SFRs for the PIC18Fxx2 devices.
6449         The directory is initialized via configure from toplevel.
6450
6451 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6452
6453         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6454         the spilllocations to be compared correctly
6455
6456 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6457
6458         * src/SDCCast.c (decorateType): fixed bug introduced today
6459
6460 2004-01-12  Borut Razem <borut.razem AT siol.net>
6461
6462         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6463         doc/sdccman.lyx: upper case pragmas are deprecated
6464
6465 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6466
6467         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6468         in simpler and even better code
6469
6470 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6471
6472         * src/SDCCicode.c (operandOperation): fixed bug #874819
6473         * src/SDCCast.c (decorateType): fixed
6474         char foo (unsigned long ul) { return ul > 0; }
6475
6476 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6477
6478         * doc/sdccman.lyx: Moved and added some sections, small changes
6479         all over. Telling LaTeX to be less strict with word spacing
6480         to better keep the right margin. Changed some notes about
6481         maintainance of the ports in section 3.2.1 - is it OK like this?
6482
6483 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6484
6485         SDCC source changes:
6486         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6487         convilong): modified to inform the pic16 port that builtin functions
6488         are external
6489
6490         PIC16 PORT specific changes:
6491         * src/pic16/device.c pic16_dump_equates() added,
6492         processor registers declared internally by the port are emitted in
6493         the translation as equates,
6494         * src/pic16/gen.c: inline code is passed unprocessed to the
6495         translation,
6496         * (pic16_popGetLit2): fnuction modified to take second operand as
6497         pCodeOp pointer and not as literal,
6498         * (popRegFromIdx): prefixed with pic16_,
6499         * (pic16_popCombine2): modified to receive already allocated pCode
6500         operands,
6501         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6502         * (genFunction): initializes local stack frame and pushes on stack
6503         all the registers used by this function,
6504         * (genEndFunction): restores all registers from stack and restores
6505         stack frame,
6506         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6507         improvements,
6508         * (pic16glue): changed the program startup sequence,
6509         * added new dbName code 'A' for functions placed in absolute section
6510         * src/pic16/main.c: added function attribute _naked,
6511         * added pragma 'code' to place a fnuction at an absolute address,
6512         * added command line arguments --debug-ralloc and --pcode-verbose,
6513         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6514         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6515         * (pic16_newpCodeOpLit2): modified to take the second operand as
6516         pCodeOp pointer,
6517         * (pic16_printpBlock): modified to emit each function in a separate
6518         section,
6519         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6520         UPPER for immediate operands,
6521         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6522         instruction,
6523         * src/pic16/peeph.def: all peepholes with movff are commented out,
6524         because there is a problem in the pcode peep optimizer,
6525         * src/pic16/ralloc.c: the register allocator can now reuse local
6526         function symbols for another function. This saves register usage.
6527         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6528
6529         Added file src/pic16/NOTES with information about program writing on
6530         the current port version.
6531
6532 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6533
6534         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6535         and peephole 252 (array access)
6536
6537 2004-01-09  Borut Razem <borut.razem AT siol.net>
6538
6539         * src/SDCCmain.c : fixed #872250: -l command line defined library
6540           files are scanned before standard library files
6541
6542 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6543
6544         * src/SDCCast.c (decorateType): fixed bug #874046
6545
6546 2004-01-09  Borut Razem <borut.razem AT siol.net>
6547
6548         * support/scripts/sdcc.nsi: remove previous installation
6549
6550 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6551
6552         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6553         bytes for last interrupt vector (mcs51)
6554         * sdcc.spec: fixed typo
6555
6556 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6557
6558         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6559         gen51Code): more efficient parameter receive for --model-large
6560         ("bug" #845294)
6561
6562 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6563
6564         * src/ds390/main.c,
6565         * src/z80/main.c: added missed needLinkerScript flags (more than
6566         one port structure defined in these file)
6567         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6568         bug #795325
6569
6570 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6571
6572         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6573         * src/port.h: added flag needLinkerScript in port->linker
6574         structure to inform whether to create a .lnk file or not,
6575         * src/avr/main.c,
6576         * src/ds390/main.c,
6577         * src/hc08/main.c,
6578         * src/mcs51/main.c,
6579         * src/pic/main.c,
6580         * src/pic16/main.c,
6581         * src/xa51/main.c,
6582         * src/z80/main.c: changed appropriately to configure
6583         needLinkerScript flag
6584         * src/pic/gen.c,
6585         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6586         * src/pic/glue.c: added variable udata_section_name to
6587         override default uninitialized data segment definition for
6588         devices only with SHAREBANK memory (reported from Erik Epetrich)
6589         * (pic14emitOverlay): modified to emit a commented overlay segment
6590         directive when no overlay data exist
6591         * (picglue): modified to emit uninitialized data segment
6592         according to udata_section_name
6593         * src/pic/main.c (_pic14_parseOptions): added command line
6594         options --udata-section-name=[name] to override default
6595         udata definition name
6596         * modified _linkCmd and _asmCmd to include compiler passed
6597         arguments via -W option
6598         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6599         object file from '.rel' to '.o' in port->linker structure,
6600         changed size of fptr from 2 to 3 in port structure
6601
6602 2004-01-07  Borut Razem <borut.razem AT siol.net>
6603
6604         * support/scripts/sdcc.nsi: update PATH
6605         * support/scripts/sdcc.ico: craeted
6606
6607 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6608
6609         * device/include/Makefile.in: fix install
6610         * doc/Makefile: fix install
6611
6612 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6613
6614         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6615         in bug #860505
6616         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6617         how the function variable allocation summary is displayed; also
6618         include information about variables allocated to the overlay
6619         segment
6620
6621 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6622
6623         * as/mcs51/lkmain.c: Help about -Y option
6624         * as/mcs51/lkarea.c: Fixed gcc warnings
6625
6626 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6627
6628         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6629         fixed warning
6630         * support/valdiag/tests/overflow.c: added
6631         * src/SDCCast.c (decorateType),
6632         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6633         LEFT_OP (left shift)
6634
6635 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6636
6637         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6638         (default behaviour).
6639
6640 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6641
6642         A python script to validate compiler diagnostic messages. It can be
6643         used to verify that sdcc complains about bad c source code and
6644         gives a good location of the error.
6645         * support/valdiag/Makefile,
6646         * support/valdiag/valdiag.py,
6647         * support/valdiag/tests/*
6648
6649 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6650
6651         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6652         * src/SDCCsymt.c (newEnumType),
6653         * src/SDCCsymt.h
6654         * support/Util/SDCCerr.c,
6655         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6656         enum related bugs.
6657         * support/regression/tests/enum.c: added test for enum values that
6658         require at least 2 bytes of storage.
6659
6660 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6661
6662         * src/common.h: added ifndef/define/endif macros
6663         around the header file.
6664         Bug reported from Jesus Calvino-Fraga
6665
6666 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6667
6668         * sdcc.spec: updated
6669         * device/include/Makefile.in: don't install CVS directories
6670         * device/lib/Makefile.in: added removal of CVS directories after install
6671         * doc/Makefile: fixed install, added local_icons
6672         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6673         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6674         * src/ds390/gen.c (genRightShift): fixed bug #870788
6675         * src/SDCCast.c (decorateType): fixed bug #870781
6676
6677 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6678
6679         PIC16 port related changes:
6680         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6681         added variable stackPos,
6682
6683         * gen.c: genCall, assignResultValue: added support for
6684         pushing/retrieving function parameters to/from stack,
6685         genFunction,genEndFunction: setup stack frame for the
6686         generated function,
6687         genAddrOf: will be changed according to bug 863624
6688
6689         * added files genutils.c and genutils.h which contain gen*
6690         debugged and optimised functions extracted from gen.c
6691
6692         * glue.c: added variable 'externs' which holds extern symbols,
6693         pic16emitRegularMap: is modified to properly handle relocatable
6694          symbols under the new scheme,
6695         pic16createInterruptVect: is modified
6696         pic16printPublics: is modified to emit 'global' assembler directives,
6697         added pic16_printExterns to print extern symbols,
6698         pic16glue: initializes stack/frame pointer in the beginning of
6699         the assembly output. Temporary hack, will be corrected later,
6700         because gplink yet does not support stack and SDCC does not
6701         yet support a type of crt0.o object to create the final binary.
6702
6703         * Removed many lines that contain 8051 legacy code.
6704         * The code is finally placed under a 'code' directive.
6705         * Added port specific options.
6706
6707         * _process_pragma: simplified since now we do not need *special*
6708         include file to define SFR registers. But a separate header
6709         will be needed. This will be developed later.
6710         * _pic16_parseOptions: added, parses port specific options:
6711         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6712         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6713         --preplace-udata-with=
6714
6715         * _pic16_setDefaultOptions: modified to initialize section names,
6716         but hack is temporarly out of order since it needs improvement.
6717         * _pic16_genAssemblerPreamble: configuration words are emitted by
6718         their address instead of their name. This part is incomplete and
6719         supports only the 18Fxx2 devices. Other devices will emit an error
6720         during assembly since they do not contain the same set of config
6721         registers
6722         * _pic16_genIVT: is modified,
6723
6724         * pcode.c: added definitions for some hardware registers that are needed
6725         for stack support
6726         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6727         All PCI entries are updated. Now LFSR is supported.
6728         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6729         * added pic16_newpCodeOpLit2 to support instructions with
6730         two literal arguments
6731         * pic16_pCode2str: corrected code that emits assembler instructions
6732         with two literal operands and those that have an access bit modifier
6733         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6734         this fixes a bug which caused some labels to be lost, when an
6735         assembler directive was added, i.e. banksel,
6736         * pic16_FixRegisterBanking: improved logic that causes the insertion
6737         of bank switching,
6738         * InlineFunction: functions that are called once, are not any more
6739         inlined. This can be a port option in the future,
6740
6741         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6742
6743         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6744         hold the corresponding uninitialized symbols,
6745         * pic16_allocProcessorRegister: registers have explicit marked the
6746         accessBank field,
6747         * pic16_allocInternalRegister: registers are explicit marked as
6748         not used,
6749         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6750         processing list, so bit registers were lost,
6751         *
6752
6753         * ralloc.h: added field 'accessBank' and original symbol operand
6754         in register definition,
6755         * removed the field isMapped from register definition,
6756
6757         ** Several functions have been removed from various sources:
6758         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6759         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6760         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6761         pic16_assignRelocatableRegisters
6762
6763         ** others have been introduced:
6764         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6765         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6766
6767 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6768
6769         * support/scripts/inc2h.pl: changed definition of BIT_AT
6770         to emit 'sbit at' instead of 'bit at'. This was a request.
6771
6772         PIC16 port related preliminary changes:
6773         * gen.c: prefixed function popRegFromString with
6774         pic16_ and all references to it corrected
6775         * pcode.c: all pic16_pc_* hardware registers prefixed
6776         with underscore (_),
6777         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6778         * ralloc.c: newReg(): when register is REG_SFR then
6779         set address to rIdx,
6780         pic16_allocProcessorRegister(): marks register wasUsed=0
6781         pic16_writeUsedRegs(): added a call to assign processor
6782         registers via pic16_assignFixedRegisters
6783
6784 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6785
6786         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6787         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6788         variables in unused register banks.  Also the SSEG is placed
6789         wherever there is enough space for it, and IDATA can be anywhere
6790         in internal RAM.  For now compile using -Wl-Y[stack_size].
6791         The mem file is different for this option as well, since it
6792         makes no sense of talking about DSEG lenght.
6793
6794 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6795
6796         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6797         in certain cases, e.g. when ROM assignment, patch provided
6798         from Albert den Haan.
6799
6800 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6801
6802         Many signedness and type propagation fixes:
6803         * src/SDCCicode.c: made geniCodeCast() static
6804         replaced SPEC_ by IS_ (cosmetic)
6805         (operandOperation): fixed div and mod operation
6806         (usualBinaryConversions): added support for promotion of char
6807         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6808         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6809         (geniCodeAdd): an array index will stay unsigned, even if promoted
6810         from char to int
6811         (geniCodeArray): ditto
6812         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6813         * src/SDCCsymt.c (computeType): added more support for char;
6814         promotion of char is selectable by promoteCharToInt, fixed signedness
6815         for all cases
6816         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6817         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6818         * src/SDCCval (val*): replaced signedness calculation by
6819         computeType()
6820         rearranged if-branches (cosmetic)
6821         (valShift): added warning W_SHIFT_CHANGED
6822         (valCompare): fixed problem with different types
6823         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6824         * support/regression/tests/literalop.c: added many cases
6825         * support/regression/tests/ast_constant_folding.c: changed finally to
6826         'unsigned int'
6827         * .version: new year, new version: 2.3.7
6828         * src/SDCCmain.c (main): applied patch #866468
6829         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6830         provided by Scott Bronson
6831         * doc/sdccman.lyx: updated documentation for sdcdb
6832         updated and added chapter tips
6833
6834 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6835
6836         * src/SDCCsymt.h: missing from yesterday's commits
6837
6838 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6839
6840         * src/SDCC.y (struct_or_union_specifier),
6841         * support/Util/SDCCerr.c,
6842         * support/Util/SDCCerr.h: verify that struct & union tags are used
6843         as declared.
6844
6845 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6846
6847         * src/SDCCglobl.h: missing from yesterday's commits
6848
6849 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6850
6851         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6852         sft_attributes, struct_declaration, parameter_declaration,
6853         type_name, start_block, declaration_list),
6854         * src/SDCC.lex (check_type): support redefinition of typedef names
6855
6856 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6857
6858         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6859         aligned xdata arrays. Erik helped me with the if clause.
6860
6861 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6862
6863         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6864         warning
6865
6866 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6867
6868         * src/SDCCast.h,
6869         * src/SDCCast.c (newAst_),
6870         * src/SDCCicode.h,
6871         * src/SDCCicode.c (ast2iCode, newiCode),
6872         * src/SDCCglobl.h,
6873         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6874         expr, statement, expression_statement, selection_statement,
6875         iteration_statement, expr_opt, jump_statement): foundation for tracking
6876         sequence points
6877         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6878         point code too)
6879
6880 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6881
6882         * support/Util/SDCCerr.c,
6883         * src/SDCCast.h,
6884         * src/SDCCast.c (createCase, createDefault, decorateType),
6885         * src/SDCClabel.c (labelUnreach),
6886         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6887         to error messages.
6888         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6889         (with thanks to Stas Sergeev)
6890         * device/include/time.h,
6891         * device/lib/time.c (CheckTime): suppress unreachable code warning
6892
6893 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6894
6895         * src/SDCCast.c (createIvalCharPtr),
6896         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6897         bug #753752)
6898         * support/regression/tests/nullstring.c: tests for these two bugs
6899
6900 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6901
6902         * support/Util/SDCCerr.h,
6903         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6904         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6905         about storage class and 'at' used inside struct or union
6906         * src/SDCCBBlock.c (iCodeFromeBBlock),
6907         * src/SDCCcse.c (ifxOptimize),
6908         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6909         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6910         printIval, emitStaticSeg, emitOverlay),
6911         * src/SDCClabel.c (deleteIfx),
6912         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6913         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6914         gatherAutoInit, processParms),
6915         * support/Util/SDCCerr.h,
6916         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6917         reporting for post-parse errors.
6918
6919 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6920
6921         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6922         implicit casts via union; they don't work on big endian systems
6923         (possible fix for bug #861138)
6924
6925 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6926
6927         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6928         * src/mcs51/main.c: fixed the fix for bug #737001
6929
6930 2003-12-15  Borut Razem <borut.razem AT siol.net>
6931
6932         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6933
6934 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6935
6936         * support/makebin/makebin.c: put output in binary mode
6937
6938 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6939
6940         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6941         xdata and data memory on startup. Set the environment variable
6942         SDCC_NOGENRAMCLEAR to disable this.
6943         * src/mcs51/peephole.def,
6944         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6945         (allows non-interrupt and interrupt code to safely compete for a resource
6946         without the non-interrupt code having to disable interrupts)
6947
6948 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6949
6950         * src/SDCCicode.c (geniCodeAdd),
6951         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6952         with valFromType if type might be a pointer and host is big endian).
6953         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6954         types, not just integer types.
6955         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6956         multiply defined with mismatching "at" address.
6957
6958 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6959
6960         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6961         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6962         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6963         with embedded nulls (fixed bug #753752)
6964
6965 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6966
6967         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6968         Apparently this did not see much testing (endless loop)
6969
6970 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6971
6972         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6973
6974 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6975
6976         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6977         gracefully handle NULL memmap pointers
6978
6979 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6980
6981         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6982         instead of deleting the iCode when an operand is volatile
6983         * src/z80/gen.c (genDummyRead),
6984         * src/mcs51/gen.c (genDummyRead),
6985         * src/ds390/gen.c (genDummyRead),
6986         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6987         not just IC_RIGHT
6988         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6989         * src/SDCC.y: fixed bug #850420
6990
6991 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6992
6993         Applied z80 i/o port patch from Peter Townson and fixed some operators
6994         to better handle operands in A register.
6995         * device/include/z180.h
6996         * src/SDCC.y
6997         * src/SDCCglue.c
6998         * src/z80/gen.c
6999         * src/z80/gen.h
7000         * src/z80/main.c
7001         * src/z80/peeph-z80.def
7002         * src/z80/peeph.def
7003         * src/z80/z80.h
7004
7005 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7006
7007         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7008
7009 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7010
7011         * device/lib/hc08/_mullong.c: Removed extra #endif
7012
7013 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7014
7015         * sim/ucsim/hc08.src/inst.cc,
7016         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7017         carries from x to h
7018         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7019         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7020         * device/include/stdarg.h: fixed varargs for hc08
7021         * device/lib/Makefile.in,
7022         * device/lib/hc08/Makefile,
7023         * device/lib/hc08/_mulint.c,
7024         * device/lib/hc08/_mullong.c: fixed some endian problems
7025
7026 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7027
7028         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7029         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7030         * device/lib/_gptrget.c,
7031         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7032
7033 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7034
7035         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7036         * src/SDCCast.c (astErrors): fixed bug #846007
7037         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7038
7039 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7040
7041         * src/SDCCast.c (decorateType): disabled a transformation I added in
7042         revision 1.188 (access to fields of a structure at an absolute address);
7043         it breaks with bitfields, extern declarations, and gcse analysis.
7044         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7045         could be assigned through a pointer, so don't complain.
7046         * src/SDCCast.c (astErrors),
7047         * src/SDCCast.h,
7048         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7049
7050 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7051
7052         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7053         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7054         output of __config directives, since gpasm now supports them
7055         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7056         pre-processor macro, i.e. -DMCU=p18f452
7057         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7058         and modified to handle 'cast' icode similarly to '=' icode
7059         * src/pic16/device.h (typedef struct PIC_device): added field
7060         'extMIface' to indicate that chip has external memory interface
7061         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7062         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7063         18F8720
7064
7065 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7066
7067         * src/SDCC.y (pointer): fixed bug #846006
7068         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7069         * src/SDCCast.c (decorateType): fixed bug #846009
7070         * src/ds390/peeph.def,
7071         * src/ds390/gen.c (genAnd, genOr),
7072         * src/mcs51/peeph.def,
7073         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7074
7075 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7076
7077         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7078         * src/SDCCdflow.c
7079         * src/SDCCcse.c
7080         * src/SDCCcse.h
7081         * src/SDCCBBlock.h
7082         * src/SDCCBBlock.c
7083
7084 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7085
7086         fixed bug #845089
7087         * src/SDCCbitv.h,
7088         * src/SDCCbitv.c: added function to free a bitvector
7089         * src/SDCClrange.h,
7090         * src/SDCClrange.c: added function to recompute the liveranges
7091         * src/avr/ralloc.c,
7092         * src/ds390/ralloc.c,
7093         * src/hc08/ralloc.c,
7094         * src/mcs51/ralloc.c,
7095         * src/pic/ralloc.c,
7096         * src/pic16/ralloc.c,
7097         * src/xa51/ralloc.c,
7098         * src/z80/ralloc.c: recompute the liveranges after register packing
7099
7100 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7101
7102         * src/SDCCloop.c (newInduction): fixed bug #845630
7103
7104 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7105
7106         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7107         inadvertantly left behind from my 2003-11-12 change
7108
7109 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7110
7111         Updated headers I neglected to commit yesterday.
7112         * src/SDCClrange.h,
7113         * src/SDCCicode.h
7114
7115 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7116
7117         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7118         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7119         * src/SDCCopt.c (eBBlockFromiCode),
7120         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7121         the creation of the key hash table from the sequencing so it can be used
7122         earlier (for some GCSE bug fixes still pending)
7123
7124 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7125
7126         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7127         * support/regression/tests/addsub.c: testing genPlus shortcut
7128
7129 2003-11-15  Borut Razem <borut.razem AT siol.net>
7130
7131         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7132
7133 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7134
7135         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7136         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7137         ordering is immaterial.
7138         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7139
7140 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7141
7142         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7143         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7144         (SIGSEV) of bug #840381
7145         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7146         unlink new file before rename if new and old filenames are the same)
7147
7148 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7149
7150         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7151         uninitialized variables) for the mcs51. Set environment variable
7152         SDCC_GENRAMCLEAR to test.
7153         xdata initialization slightly shorter
7154
7155 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7156
7157         * src/SDCCsymt.h,
7158         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7159         #838241 & 780691 (basicly the same bug)
7160         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7161         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7162
7163 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7164
7165         * src/SDCCmain.c (linkEdit): "fix" #834252
7166
7167 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7168
7169         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7170         * src/SDCCast.h,
7171         * src/SDCC.y: fixed bug #819403
7172
7173 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7174
7175         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7176         the reentrant attribute.
7177         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7178         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7179         simulation
7180         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7181         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7182         erroneously reduced to a literal.
7183         * src/hc08/ralloc.c (packRegisters, rematStr),
7184         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7185         some cases
7186
7187 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7188
7189         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7190         * doc/sdccman.lyx: changed from 'article' to 'book'
7191         * doc/Makefile: readded test_suite_spec and cdbfileformat
7192
7193 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7194
7195         * device/include/stdlib.h: include malloc.h to comply with ANSI
7196         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7197
7198 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7199
7200         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7201         * doc/clean.mk: also remove *.out files
7202         * doc/sdccman.lyx: some additions, larger top/bottom margins
7203
7204 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7205
7206         * src/SDCC.y: fixed bug #837365
7207         * support/regression/tests/bitopcse.c
7208         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7209         a symbol (might be valop instead)
7210         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7211         * device/lib/clean.mk: added hc08 to the cleaning list
7212
7213 2003-11-04  Borut Razem <borut.razem AT siol.net>
7214
7215         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7216           made 2003-11-04
7217         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7218           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7219           malloc is declared in standard stdlib.h
7220
7221 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7222
7223         * device/lib/hc08/Makefile: need to clean .rel not .o files
7224         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7225
7226 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7227
7228         * src/port.h,
7229         * src/hc08/main.c,
7230         * src/mcs51/main.c,
7231         * src/ds390/main.c,
7232         * src/z80/main.c,
7233         * src/avr/main.c,
7234         * src/pic/main.c,
7235         * src/pic16/main.c,
7236         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7237         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7238         tests (which uses the port's oclsExpense function)
7239         * src/SDCC.y,
7240         * src/SDCCast.c,
7241         * src/SDCCicode.c,
7242         * src/hc08/gen.c,
7243         * src/ds390/gen.c,
7244         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7245
7246 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7247
7248         * src/SDCCcse.c (ifxOptimize),
7249         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7250         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7251         deleting the IFX iCode.
7252         * src/hc08/ralloc.c: reduced unneeded slocs
7253         * src/hc08/gen.c: fixed bug in asmopToBoolean
7254
7255 2003-11-04  Borut Razem <borut.razem AT siol.net>
7256
7257         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7258           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7259           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7260           transferred to configure
7261
7262 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7263
7264         Use headers defined in the C[++] standards:
7265         * sim/ucsim/gui.src/serio.src/fileio.cc
7266         * sim/ucsim/gui.src/serio.src/frontend.cc
7267         * sim/ucsim/gui.src/serio.src/main.cc
7268         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7269         * support/Util/NewAlloc.c
7270         * as/hc08/lklibr.c
7271         * as/mcs51/lklibr.c
7272         * as/z80/aslist.c
7273         * as/z80/assym.c
7274
7275 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7276
7277         * Added MSVC projects for hc08 assembler and linker:
7278         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7279         /as/hc08/link_hc08.dsp
7280
7281 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7282
7283         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7284
7285 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7286
7287         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7288
7289 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7290
7291         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7292
7293 2003-10-31  Borut Razem <borut.razem AT siol.net>
7294
7295         * support/cpp2/cpplib.h,
7296           support/cpp2/cpplib.c,
7297           support/cpp2/cpplex.c,
7298           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7299           to switch _asm block preprocessing on / off. Default is
7300           #pragma preproc_asm +
7301
7302 2003-10-31  Borut Razem <borut.razem AT siol.net>
7303
7304         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7305           when outputting comment blocks (when executed with -C option) and
7306           _asm (SDCPP specific) blocks
7307
7308 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7309
7310         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7311
7312 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7313
7314         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7315
7316 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7317
7318         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7319         * src/SDCCast.c (decorateType): fixed bug #832664
7320
7321 2003-10-31  Borut Razem <borut.razem AT siol.net>
7322
7323         * support\cpp2\cpplex.c: fixed for SDCPP:
7324           comments(when executed with -C option) and _asm blocks
7325           were included even if they where in skipped #if block.
7326           Applied solution from GCC cpp 3.3.2
7327
7328 2003-10-31  Borut Razem <borut.razem AT siol.net>
7329
7330         * src/SDCC.lex: sdcc now understands both formats:
7331           '# <line_number> <file_name>' and
7332           '#line <line_number> <file_name>'
7333         * support/cpp2/cppmain.c: sdcpp now generates the standard
7334           '# <line_number> <file_name>' instead of former
7335           '#line <line_number> <file_name>'
7336
7337 2003-10-30  Borut Razem <borut.razem AT siol.net>
7338
7339         * support/cpp2/cpphash.h,
7340         * support/cpp2/cpplib.h
7341         * support/cpp2/cpplex.c,
7342         * support/cpp2/cppmain.c,
7343         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7344
7345 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7346
7347         Fixed a number of problems revealed by bug #827883.
7348         * src/SDCCloop.c (loopInvariants): Spill location of the
7349         result operand should be recomputed if extracted from
7350         a loop. Also, don't extract assignments of an iTemp
7351         from a literal.
7352         * src/SDCCast.c (isConformingBody): loop reversal should
7353         not occur if the control variable is involved with a
7354         relational operator.
7355
7356 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7357
7358         * .version: bumped to 2.3.6 to reflect the big improvements
7359         made by Erik and Klaus. Thanks!
7360
7361 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7362
7363         Replaced the livrange code.
7364         * src/SDCClrange.c: added new LR code
7365         * src/SDCCloop.c,
7366         * src/SDCCBBlock.h: removed remainig parts from old LR code
7367         * src/ds390/ralloc.c,
7368         * src/ds390/gen.c: minor fixes to make it work with new code
7369
7370 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7371
7372         * as/hc08/asm.h,
7373         * as/hc08/lkrloc.c,
7374         * src/hc08/gen.c,
7375         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7376         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7377         (tweaked fix for bug #818696)
7378
7379 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7380
7381         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7382
7383 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7384
7385         * src/SDCCmain.c,
7386         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7387         * src/mcs51/gen.c (gencjneshort),
7388         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7389         more efficient (per Scott Bronson's suggestion)
7390
7391 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7392
7393         Extended the semantics of the critical keyword to include
7394         individual statements. See RFE #827755 and #799831
7395         * src/SDCC.y
7396         * src/SDCCicode.c
7397         * src/SDCCopt.c
7398         * src/SDCCast.c
7399         * support/Util/SDCCerr.c
7400         * support/Util/SDCCerr.h
7401         * src/mcs51/gen.c
7402         * src/ds390/gen.c
7403         * src/hc08/gen.c
7404
7405 2003-10-19  Borut Razem <borut.razem AT siol.net>
7406
7407         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7408
7409 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7410
7411         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7412         Fixed bug #818696
7413         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7414         and predecrement operand is displayed
7415
7416 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7417
7418         * src/SDCCval.c (valMinus): fixed bug #826041
7419
7420 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7421
7422         Some hc08 related updates that I missed earlier
7423         * sim/ucsim/stypes.h
7424         * support/regression/ports/hc08/spec.mk
7425
7426 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7427
7428         New target "hc08" for the Motorola 68hc08 family of micros
7429
7430         * configure
7431         * configure.in
7432         * Makefile
7433         * src/hc08/*
7434         * src/SDCCmain.c
7435         * src/port.h
7436         * sim/ucsim/hc08.src/*
7437         * sim/ucsim/configure.in
7438         * src/ucsim/configure
7439         * sim/ucsim/packages_in.mk
7440         * as/hc08/*
7441         * as/Makefile
7442         * device/include/mc68hc908qy.h
7443         * device/lib/hc08/*
7444         * device/lib/Makefile.in
7445         * support/regression/ports/hc08/*
7446         * support/regression/Makefile
7447
7448 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7449
7450         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7451         regression test
7452         * src/ds390/gen.c (genCast): fixed bug #821957
7453
7454 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7455
7456         * device/lib/logf.c: "fixed" overlay bug
7457         * support/regression/ports/host/spec.mk: added m library
7458         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7459         * support/regression/tests/float_trans: added (for Eric)
7460
7461 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7462
7463         * src/mcs51/gen.c (genCpl): fixed bug
7464         http://sf.net/mailarchive/message.php?msg_id=6263915
7465
7466 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7467
7468         * src/SDCCast.c (decorateType): added extended constant folding
7469         * src/SDCCsymt.c (computeType): cleanup
7470         * src/SDCCval.c (valShift): minor optimization
7471         * support/regression/tests/ast_constant_folding.c: added
7472
7473 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7474
7475         * src/SDCCmain.c: removed some unintended changes
7476
7477 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7478
7479         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7480         * src/z80/gen.c: fixed part of bug #817589
7481         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7482
7483 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7484
7485         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7486         * src/SDCCcflow.c
7487         * src/SDCCcse.c
7488         * src/SDCCdflow.c
7489         * src/SDCClabel.c
7490         * src/SDCClrange.c
7491         * src/SDCCmem.c
7492         * src/SDCCopt.c
7493         * src/SDCCpeeph.c
7494         * src/SDCCset.c
7495         * src/avr/ralloc.c
7496         * src/ds390/ralloc.c
7497         * src/izt/ralloc.c
7498         * src/mcs51/ralloc.c
7499         * src/pic/ralloc.c
7500         * src/pic16/ralloc.c
7501         * src/xa51/ralloc.c
7502         * src/z80/ralloc.c
7503         * src/z80/gen.c: removed unused label "release:"
7504
7505 2003-10-06  Borut Razem <borut.razem AT siol.net>
7506
7507         * src/SDCC.lex: removed definition of unused variables
7508           save_optimize and save_options
7509
7510 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7511
7512         * clean.mk: removed '=' in "-maxdepth=1"
7513         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7514         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7515
7516 2003-10-06  Borut Razem <borut.razem AT siol.net>
7517
7518         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7519           my_unput() replaced by unput()
7520
7521 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7522
7523         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7524         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7525         type-punned pointer will break strict-aliasing rules"
7526         Old LR behaviour is again default; Klaus' LR can be choosen by
7527         defining the environment variable LRKLAUS
7528         * src/SDCCBBlock.h
7529         * src/SDCCloop.c
7530         * src/SDCClrange.c
7531         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7532         * clean.mk: fixed removal of files in bin/CVS/
7533         * device/lib/clean.mk: fixed removal of directories small and large
7534         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7535         * src/SDCCicode.c,
7536         * src/SDCCval.c: removed superflous test for pedantic
7537
7538 2003-10-05  Borut Razem <borut.razem AT siol.net>
7539
7540         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7541           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7542           message "unmatched #pragma SAVE and #pragma RESTORE"
7543
7544 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7545
7546         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7547           assembly, critical functions, atomic, nojtbound)
7548
7549 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7550
7551         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7552         * src/SDCCBBlock.h
7553         * src/SDCCloop.c
7554         * src/SDCCloop.h
7555         * src/SDCClrange.c
7556
7557 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7558
7559         * src/z80/gen.h,
7560         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7561         * src/mcs51/gen.h
7562         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7563         * src/ds390/gen.h
7564         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7565         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7566         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7567
7568 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7569
7570         * src/z80/gen.c (genRet): fixed bug #524753
7571         * src/z80/gen.c (genCast): fixed internal error on cast from
7572         pointer to long
7573         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7574         fix for bug #477835 to the z80
7575         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7576         for tracking iCodes in the peephole optimizer for z80
7577
7578 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7579
7580         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7581         the other part of bug #814548
7582         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7583
7584 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7585
7586         * src/SDCCcse.c: fixed part of bug #814548
7587
7588 2003-09-28  Borut Razem <borut.razem AT siol.net>
7589
7590         * src/asm.c: rewrite of printILine() to use temporary file instead
7591           a pipe
7592         * src/xa51/main.c: commented out declaration of int rewinds
7593
7594 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7595
7596         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7597
7598 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7599
7600         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7601         * src/asm.c (printILine): Fixed bug #811015
7602
7603 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7604
7605         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7606         freeing.
7607
7608 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7609
7610         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7611         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7612         to correctly handle general case of AOP_PAIRPTR
7613         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7614
7615 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7616
7617         * src/mcs51/ralloc.c (fillGaps),
7618         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7619         register positioning bug)
7620
7621 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7622
7623         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7624
7625 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7626
7627         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7628         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7629         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7630         (ralloc doesn't intentionally do this now, but perhaps later)
7631         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7632         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7633         register positioning bugs (Fixed bug #762602 and #795325)
7634         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7635         (Fixed bug #808779)
7636         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7637         lines that --i-code-in-asm generates
7638
7639 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7640
7641         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7642         trying to fclose a FILE* that was already closed.
7643
7644 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7645
7646         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7647         of const struct should be treated as if const themselves)
7648
7649 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7650
7651         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7652
7653 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7654
7655         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7656         Unix (/n) and DOS (/r/n) line terminations.
7657
7658 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7659
7660         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7661         bug #613775
7662
7663 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7664
7665         * src/mcs51/gen.c (genFunction, genEndFunction),
7666         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7667         and restore of EA so that stack offsets to parameters are
7668         correct when using both critical and reentrant/stack-auto.
7669         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7670         size (can be triggered in error if sloc is shared between
7671         different sized objects)
7672         * device/include/float.h: fixed macros to explicitly use
7673         unsigned long where needed
7674
7675 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7676
7677         Feature req. 799831: added code to allow nesting of critical functions
7678         * src/mcs51/gen.c (genFunction, genEndFunction)
7679         * src/ds390/gen.c (genFunction, genEndFunction)
7680
7681 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7682
7683         * src/SDCCsymt.c (sclsFromPtr),
7684         * src/SDCCsymt.h,
7685         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7686         support for standard C idiom of memory mapped variables; for
7687         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7688         to xdata int at 0x1234 tempvar = 1.
7689         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7690         provided by Akiya ISHIDA
7691
7692 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7693
7694         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7695         * src/SDCCval.c (constVal): added reduction from int to char
7696         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7697         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7698         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7699         to ignore the sign
7700         * support/regression/tests/shifts.c: fixed
7701
7702 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7703
7704         * src/z80/gen.c (genXor): Fixed bug #805445
7705
7706 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7707
7708         Fixed bug #621531 (const & volatile confusion in the type chain).
7709         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7710         refer to the const or volatile state of the pointer itself.
7711
7712         * src/SDCCast.c
7713         * src/SDCCglue.c
7714         * src/SDCCicode.c
7715         * src/SDCCsymt.c
7716         * src/SDCCval.c
7717         * src/SDCC.y
7718         * src/SDCCsymt.h
7719         * src/pic/gen.c
7720         * src/pic/ralloc.c
7721         * src/pic16/gen.c
7722         * src/pic16/ralloc.c
7723         * support/regression/tests/const.c
7724
7725 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7726
7727         When checking for duplicated modules, use absolute paths
7728         instead of relative paths.  Files changed:
7729
7730         * as/mcs51/lklib.c
7731         * link/z80/lklib.c
7732
7733 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7734
7735         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7736
7737 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7738
7739         * device/include/string.h: added size_t typedef, changed
7740         prototypes to use size_t, eliminated separate reentrant and
7741         non-reentrant declarations, added _memmove declaration
7742         * device/lib/_memcpy.c: changed to use size_t instead of int,
7743         changed /4 to >>2 to avoid division library call
7744         * device/lib/_memcmp.c,
7745         * device/lib/_memset.c,
7746         * device/lib/_strncat.c,
7747         * device/lib/_strncpy.c,
7748         * device/lib/_strncmp.c: changed to use size_t instead of int
7749         * device/lib/_memmove.c: new file (fixed bug #772294)
7750         * device/lib/Makefile.in: added _memmove.c
7751         * device/lib/z80/asm_strings.s: fixed bug #772290
7752         * support/regression/tests/bitfields.c: attempt to fix host assertion
7753         failure on amd64-unknown-linux2.2
7754
7755 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7756
7757         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7758         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7759         * as/z80/asmain.c (main): fixed bug #801766
7760
7761 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7762
7763         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7764         compilers
7765
7766 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7767
7768         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7769         reported in bug #800609
7770
7771 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7772
7773         * Top header beautifications in src/pic16 directory:
7774           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7775           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7776           pcoderegs.h, ralloc.c, ralloc.h
7777         * main.c: added top header and GPL license notice
7778         * pcode.c: fixed the if-conditional warning
7779
7780 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7781
7782         * device/lib/_mullong.c: replaced int by short for gcc
7783
7784 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7785
7786         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7787         and JUMPTABLE iCodes properly now (worked by accident before)
7788         * src/mcs51/gen.c (leftRightUseAcc),
7789         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7790         iCode properly now. Use getSize instead of nRegs since a & b
7791         aren't part of the nRegs tally.
7792
7793 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7794
7795         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7796         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7797           before instructions that use the _STATUS register
7798
7799 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7800
7801         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7802         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7803         fetching of the pointer
7804         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7805         copied from genNearPointerSet()
7806         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7807         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7808         If they pop r0/r1 they must be called in the opposite order than aopOp().
7809         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7810         (resp. --stack-auto), prepared for --xstack
7811
7812 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7813
7814         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7815
7816 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7817
7818         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7819         these ports have their own __sdcc_external_start()
7820
7821 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7822
7823         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7824         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7825         type for bits was changed. It resulted in bit variables becoming
7826         global, which is not permitted in PIC 14 assembly output.
7827
7828 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7829
7830         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7831
7832 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7833
7834         Z80 and MCS51 linkers complaint if a public symbol is defined
7835         in more than one library module:
7836
7837         * as/mcs51/lklib.c
7838         * link/z80/lklib.c
7839         * as/mcs51/Makefile.in
7840
7841 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7842
7843         A few small changes that speed up the peephole optimizer.
7844
7845         * src/SDCCpeeph.c
7846
7847 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7848
7849         Try to make the peephole optimizer smarter by maintaining
7850         an association between the assembly source code and the
7851         iCodes that originated them. Put this information to use
7852         with a new peephole rule condition "notVolatile" so that
7853         the rules can be aggressive yet still safe.
7854
7855         * src/SDCCpeeph.c
7856         * src/SDCCpeeph.h
7857         * src/mcs51/gen.c
7858         * src/mcs51/peeph.def
7859
7860 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7861
7862         Fixed bug #741761
7863
7864         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7865         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7866         if the left or right operand symbols have the accuse flag set.
7867
7868 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7869
7870         Changed the type of the result of the ! (NOT) operator to char;
7871         previously it returned the same type as the source. This allows
7872         us to eliminate all the genFloatNot functions (all of its target
7873         implementations were very buggy) since !float can use the same
7874         code as !long now.
7875
7876         * src/SDCCicode.c (ast2iCode): ! returns char
7877         * src/mcs51/gen.c (genNot, genNotFloat),
7878         * src/ds390/gen.c (genNot, genNotFloat),
7879         * src/z80/gen.c (genNot, genNotFloat),
7880         * src/pic/gen.c (genNot, genNotFloat),
7881         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7882
7883 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7884
7885         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7886         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7887            during interrupts. Ensure WSAVE is located at a shared bank address.
7888         2. Fixed page selection in some places
7889         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7890            the registers name strings.
7891         4. Fixed "signed / unsigned compare" compiler warnings.
7892         5. The PIC port manages its own allocation of the general purpose
7893            registers, but makes no attempt to reuse them. As a result when
7894            compiling it soon runs out of general purpose registers. Some
7895            additional code was added to the files pcode.c and device.c to walk
7896            through the function call tree and rename the registers so that they
7897            get reused.
7898
7899         * src/pic/device.c
7900         * src/pic/gen.c
7901         * src/pic/glue.c
7902         * src/pic/pcode.c
7903         * src/pic/pcode.h
7904         * src/pic/ralloc.c
7905         * src/pic/ralloc.h
7906         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7907         genPlus() & genMinus() when the result is the same as left or right
7908
7909 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7910
7911         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7912
7913 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7914
7915         Made bitfield a distinct type from bit so that bitfields
7916         convert as per ANSI C and bits retain their traditional
7917         boolean style behaviour. Implemented bitfield support in
7918         the z80 port.
7919
7920         * src/SDCCsymt.h,
7921         * src/SDCCsymt.c,
7922         * src/SDCCast.c,
7923         * src/cdbFile.c,
7924         * src/mcs51/gen.c,
7925         * src/ds390/gen.c: bit v bitfield split
7926         * src/z80/gen.c: New support for bitfields
7927         * support/regression/tests/bitfields.c: reenabled z80,
7928         added more tests
7929
7930 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7931
7932         Rules 246.x, 247.x relate to bitfields, the others speed up
7933         access to xdata mapped I/O devices.
7934
7935         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7936
7937 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7938
7939         Cleaned up genPackBits and genUnpackBits and added two helper
7940         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7941         for literal assignments in genPackBits (thanks to Frieder for
7942         reminding me).
7943
7944         * src/mcs51/gen.c
7945         * src/ds390/gen.c
7946
7947 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7948
7949         Fixed bug #748310 (pointer to function type mishandled when the
7950         function name is omitted). Also fixed a SIGSEGV when a function
7951         attribute (reentrant, etc) is used on a non-function or on a
7952         function but misplaced before the parameter list.
7953
7954         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7955         bug #748310
7956         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7957         * support/Util/SDCCerr.h,
7958         * support/Util/SDCCerr.c: Added func attr misuse error msg
7959
7960 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7961
7962         Fixed bug #787649 by anonymous
7963         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7964         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7965
7966 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7967
7968         Fixed numerous bitfield problems.
7969
7970         * src/SDCC.y: More bitfield related error checking
7971         * src/SDCCsymt.h,
7972         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7973         * support/Util/SDCCerr.h,
7974         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7975         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7976         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7977         * support/regression/tests/bitfields.c: tests added
7978
7979 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7980
7981         Made the constant following the "interrupt" keyword optional. If
7982         omitted, the function will not automatically be given an entry
7983         in the interrupt vector table (similar to #pragma NOIV, but
7984         less syntacticly kludgy). The interrupt number is also now
7985         range checked. Also fixed a bug in the high order bit example
7986         in the manual.
7987
7988         * src/SDCC.y
7989         * src/SDCCmem.c
7990         * src/SDCCglue.c
7991         * src/SDCCsymt.h
7992         * support/Util/SDCCerr.c
7993         * support/Util/SDCCerr.h
7994         * doc/sdccman.lyx
7995
7996 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7997
7998         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7999         * src/SDCCicode.c (operandOperation): rewritten some ops
8000         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8001         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8002         other type
8003         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8004         be re-activated by defining REDUCE_LITERALS)
8005         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8006         unsigned, but are signed by default
8007         * src/SDCCval.c (constVal): rearranged
8008         * src/SDCCval.c (valMod): preliminary fix
8009         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8010         * support/regression/literalop.c: added, work in progress
8011
8012 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8013
8014         Generate warnings for useless declarations like "char data;"
8015         that don't do what new users expect.
8016
8017         * src/SDCC.y
8018         * support/Util/SDCCerr.h
8019         * support/Util/SDCCerr.c
8020
8021 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8022
8023         * src/SDCCval.c (valMult): fix overflow detection of negative int
8024
8025 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8026
8027         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8028
8029         Changes to support big endian targets:
8030
8031         * src/ports.h
8032         * src/SDCCglue.c
8033         * src/avr/main.c
8034         * src/ds390/main.c
8035         * src/izt/i186.c
8036         * src/mcs51/main.c
8037         * src/pic/main.c
8038         * src/pic16/main.c
8039         * src/xa51/main.c
8040         * src/z80/main.c
8041
8042 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8043
8044         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8045         * device/lib/time.c: fixed warning "integer overflow in expression"
8046
8047 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8048
8049         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8050         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8051         constants are unsigned; added recognition of "u" flag for unsigned
8052         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8053         * src/SDCCval.c (valDiv, valMod): fixed signdness
8054         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8055         signedness of modulo, left and right shift
8056         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8057         * support/Util/SDCCerr.h: added warning W_INT_OVL
8058         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8059         * src/SDCCast.c (ast_print): improved output of constants
8060
8061 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8062
8063         Fixed some warnings when building with MSVC:
8064
8065         * as\mcs51\asdata.c
8066         * as\z80\asdata.c
8067         * as\mcs51\asm.h
8068         * as\z80\asm.h
8069         * link\z80\aslink.h
8070         * link\z80\lkdata.c
8071         * link\z80\lkeval.c
8072         * link\z80\lkgb.c
8073         * link\z80\lkihx.c
8074         * link\z80\lks19.c
8075         * link\z80\lksym.c
8076         * support\cpp2\cpplib.c
8077         * src\ds390\gen.c
8078         * src\mcs51\gen.c
8079
8080 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8081
8082         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8083
8084 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8085
8086         * support\librarian\clean.mk: Do not remove Makefile.
8087         * support\librarian\Makefile: added.
8088
8089 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8090
8091         Added librarian to MSVC build:
8092         * all.dsp
8093         * sdcc.dsw
8094         * support\librarian\librarian.dsp
8095
8096         'configure' not needed for librarian, removed:
8097         * support\librarian\configure
8098         * support\librarian\configure.in
8099         * support\librarian\config_in.h
8100         * support\librarian\Makefile.in
8101
8102         Hopefully these ones built the librarian and the rest of sdcc properly:
8103         * Makefile
8104         * Makefile.common.in
8105
8106         Messed up 'configure', so revert to previous version:
8107         * configure
8108         * configure.in
8109
8110 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8111
8112         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8113         there, while the mantissa of a double is "only" 53 bits wide.
8114
8115 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8116
8117         Adding sdcclib to the build.  MSVC project coming soon.
8118         Files added/changed:
8119
8120         * support\librarian\clean.mk
8121         * support\librarian\configure
8122         * support\librarian\configure.in
8123         * support\librarian\config_in.h
8124         * support\librarian\Makefile.bcc
8125         * support\librarian\Makefile.in
8126         * support\librarian\sdcclib.c
8127         * Makefile.bcc
8128         * Makefile
8129         * Makefile.common.in
8130         * configure
8131         * configure.in
8132
8133 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8134
8135         Linker now complaints if linked modules have conflicting options, for
8136         example, one compiled using --model-large and another one compiled with
8137         --model-small.  The following files were modified:
8138
8139         * as\mcs51\asdata.c
8140         * as\mcs51\aslink.h
8141         * as\mcs51\asm.h
8142         * as\mcs51\asmain.c
8143         * as\mcs51\asout.c
8144         * as\mcs51\i51pst.c
8145         * as\mcs51\lkdata.c
8146         * as\mcs51\lklibr.c
8147         * as\mcs51\lkmain.c
8148         * as\z80\asdata.c
8149         * as\z80\asm.h
8150         * as\z80\asmain.c
8151         * as\z80\asout.c
8152         * as\z80\z80pst.c
8153         * link\z80\aslink.h
8154         * link\z80\lkdata.c
8155         * link\z80\lklibr.c
8156         * link\z80\lkmain.c
8157         * src\SDCCglue.c
8158
8159 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8160
8161         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8162         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8163
8164 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8165
8166         * src/z80/mappings.i: fix _mul[us][int,long] entries
8167
8168 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8169
8170         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8171
8172 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8173
8174         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8175         * support/regression/tests/bitopcse.c: added
8176         fixed warning:
8177         * src/avr/gen.c:
8178         * src/pic/gen.c:
8179         * src/pic16/gen.c:
8180         * src/z80/gen.c:
8181         * src/xa51/gen.c:
8182
8183 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8184
8185         added support for new library format to z80, gbz80 linkers:
8186         *link/z80/aslink.h
8187         *link/z80/lklex.c
8188         *link/z80/lklib.c
8189         *link/z80/lklist.c
8190
8191 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8192
8193         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8194         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8195
8196 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8197
8198         added DUMMY_READ_VOLATILE:
8199         * src/SDCC.y:
8200         * src/avr/gen.c:
8201         * src/xa51/gen.c:
8202         * src/z80/gen.c:
8203         * src/pic/gen.c:
8204         * src/pic16/gen.c:
8205         * src/mcs51/gen.c:
8206         * src/ds390/gen.c:
8207         * src/SDCCcse.c (algebraicOpts): many improvements
8208         * src/SDCCcse.h: removed algebraicOpts()
8209         * src/SDCCicode.c (picDummyRead): added
8210
8211 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8212
8213         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8214         "Insufficient space in data memory".
8215
8216 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8217
8218         * src/mcs51/gen.c: fixed bug #771358
8219         * src/z80/gen.c: fixed bug #759087
8220
8221 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8222
8223         * src/pic16/glue.c: minor cleanup by Vangelis
8224
8225 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8226
8227         * device/include/regc515c.h: fixed #758477
8228         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8229         * device/lib/_gptrput.c: saved a few bytes
8230         * my tab spacing is 8, yours too?)
8231         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8232         * device/lib/serial.c: process RX bytes earlier than TX bytes
8233         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8234
8235 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8236
8237         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8238
8239 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8240
8241     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8242
8243 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8244
8245         * device/lib/Makefile.in: bad fix, reverted to 1.43
8246
8247 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8248
8249         * device/lib/Makefile.in: added missing z80 object files
8250
8251 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8252
8253         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8254         pic16 progress by Vangelis:
8255         * src/SDCCglobl.h:
8256         * src/SDCCmain.c:
8257         * src/pic/Makefile:
8258         * src/pic:
8259         * pic/Makefile:
8260         * pic16/device.c:
8261         * pic16/device.h:
8262         * pic16/gen.c:
8263         * pic16/gen.h:
8264         * pic16/genarith.c:
8265         * pic16/glue.c:
8266         * pic16/main.c:
8267         * pic16/pcode.c:
8268         * pic16/pcode.h:
8269         * pic16/pcodepeep.c:
8270         * pic16/peeph.def:
8271
8272 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8273
8274     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8275
8276 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8277
8278     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8279     added gbz80 build to MSVC project.
8280     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8281     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8282     from 8051 stuff and setup so it links using a .lnk file.
8283
8284 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8285
8286     * support/librarian/sdcclib.c: sdcc librarian.
8287     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8288     with sdcclib.
8289
8290 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8291
8292     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8293
8294 2003-07-02  Borut Razem <borut.razem AT siol.net>
8295
8296         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8297         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8298         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8299         src/xa51/main.c, src/z80/main.c:
8300         virtualization of glue() function: each port has it's own glue function,
8301         which is accessed by do_glue function pointer in PORT.general structure
8302
8303 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8304
8305         * DS800C400 fun, improved ROM interface and tinibios.
8306
8307 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8308
8309         * More support for DS80C400. Now includes beginning of interface to ROM.
8310
8311 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8312
8313         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8314
8315 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8316
8317         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8318
8319 2003-06-19  Borut Razem <borut.razem AT siol.net>
8320
8321         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8322
8323 2003-06-19  Borut Razem <borut.razem AT siol.net>
8324
8325         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8326         fixed Z80 port - crt0.o: cannot open.
8327
8328 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8329
8330         * support/Util/MySystem.c (merge_command): revert bad fix
8331
8332 2003-06-18  Borut Razem <borut.razem AT siol.net>
8333
8334         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8335
8336 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8337
8338         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8339         option --use-stdout sends errors to stdout instead of stderr.
8340
8341 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8342
8343         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8344
8345 2003-06-15  Borut Razem <borut.razem AT siol.net>
8346
8347         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8348         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8349         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8350         fixed width array of pointers replaced with sets;
8351         multiple include and lib paths ared transferred to preprocessor and linker
8352         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8353         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8354         fixed width array of pointers
8355         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8356         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8357         fixupPath(), getPathDifference()
8358         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8359         fixed width array of pointers
8360
8361 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8362
8363         * src/pic16/ralloc.c: fix warnings
8364         * src/pic16/pcode.c: fix warning
8365
8366 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8367
8368          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8369         know all the details, but essentially this set of changes enable
8370         the pic16 port to generate movff instructions and generate assembler
8371         directives,
8372         * src/SDCCmain.c:
8373         * src/pic16/gen.c:
8374         * src/pic16/glue.c:
8375         * src/pic16/pcode.c:
8376         * src/pic16/device.c:
8377         * src/pic16/main.c:
8378         * src/pic16/pcode.h:
8379         * src/pic16/pcoderegs.c:
8380         * src/pic16/ralloc.c:
8381         * src/pic16/ralloc.h:
8382
8383 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8384
8385         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8386         added option --vc, so sdcc errors and warnings are compatible with
8387         Microsoft Visual Studio.
8388
8389 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8390
8391         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8392           device/lib/libfloat.lib: added atof function.
8393
8394 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8395
8396         * doc/sdccman.lyx: updated to Lyx 1.3
8397         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8398         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8399         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8400
8401 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8402
8403         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8404
8405 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8406
8407         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8408           additions to the "related tools/documentation" section
8409
8410 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8411
8412         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8413
8414 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8415
8416         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8417         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8418
8419 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8420
8421         * doc/sdccman.lyx: fix double dash and other minor things
8422         * doc/Makefile: fix double dash
8423
8424 2003-05-28  Karl Bongers(patches from Martin Helmling)
8425         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8426           condition and ignore commands.
8427
8428 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8429
8430         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8431           is in parts still quite out of date, I did changes as far as I felt makes sense
8432           for a non-native english speaker.
8433           Please feel free to add to the manual or to correct my changes.
8434         * doc/Makefile: undid touching the date of intermediate tex files.
8435
8436 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8437
8438         * doc/sdccman.lyx: Manual has an index now
8439
8440 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8441
8442         Finalize muluint/mulsint and mululong/mulslong merging:
8443         * device/lib/_mulint.c
8444         * device/lib/_mullong.c
8445         * device/lib/gbz80/mul.s
8446         * device/lib/gbz80/stubs.s
8447         * device/lib/z80/mul.s
8448         * device/lib/z80/stubs.s
8449         * src/SDCCsymt.c (initCSupport)
8450
8451 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8452
8453         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8454         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8455           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8456           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8457           instead of /Zm500.
8458
8459 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8460
8461         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8462           the regression tests I'm not brave enough to enable 245.b, 245.c
8463         * doc/sdccman.lyx: added latex preamble for hyperref package.
8464           Using pdflatex this will give you a hyperlinked pdf file with
8465           bookmarks. (prepend '%' before /usepackage if this breaks something)
8466
8467 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8468
8469          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8470
8471 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8472
8473         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8474
8475 2003-05-21    <johan AT balder>
8476
8477         * src/SDCCglue.c (printIval): fixed bug #739934
8478
8479 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8480
8481         Applied patch from bug 737905 (renamed yylineo to mylineno):
8482         * src/altlex.c
8483         * src/SDCCast.c
8484         * src/SDCglobl.h
8485         * src/SDCC.lex
8486         * src/SDCCsymt.c
8487         * src/SDCCval.c
8488         * src/pic16/pcode.c: Cleaned warnings
8489         * src/pic16/pcodeflow.c: Cleaned warnings
8490         * src/pic16/pcoderegs.c: Cleaned warnings
8491
8492 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8493
8494         * src/pic16/pcode.c: Cleaned warnings
8495         * src/pic16/pcodepeep.c: Cleaned warnings
8496         * src/pic16/ralloc.c: Cleaned warnings
8497
8498 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8499
8500         * doc/sdccman.lyx: fixed bug 739745
8501         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8502
8503 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8504
8505         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8506         it can be defined with CFLAGS when running configure
8507         * src/SDCCmain.c: fixed compiling + linking with object files
8508
8509 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8510
8511         * configure.in: configure for pic16 port,
8512             added --disable-pic16-port
8513         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8514         * src/SDCCmain.c: linkOptions is changed to set *,
8515             added if/endif conditional macros to remove options help
8516             messages from optionsTable when a port is not configured, added
8517             support for the PIc16 port in the ports table, when executing
8518             the compiler with no port specified on command line, a default
8519             port is selected with the new macro DEFAULT_PORT which is
8520             defined in port.h, in setDefaultOptions() linkOptions is removed
8521             from initialization assignment, since now it is a set,
8522             parseCmdLine uses setParseWithComma for linkOptions, in
8523             linkEdit() linkOptions are accessed with new function indexSet()
8524             which returns the i'th item of a set variable. See SDCCset.c, in
8525             linkEdit() when calling buildCmdLine(), added linkOptions as
8526             last argument. Now users can pass arguments to gplink via the
8527             -Wl option, main() uses pic16glue() to glue up pic16 programs
8528         * src/SDCCpeeph.c: various changes to support pic16
8529         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8530             return the i'th item of the set
8531         * src/SDCCset.h: added function prototype for indexSet()
8532         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8533         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8534         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8535             added macro DEFAULT_PORT
8536         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8537         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8538             generated
8539         * src/pic16/glue.c: commented out some error producing lines
8540         * src/pic16/main.c: __config directives are commented out to stop
8541             gpasm complaining and test the linkage with gplink, _linkCmd and
8542             _asmCmd changed to be more gplink and gpasm friendly
8543         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8544             produced an error when parsed, peep rule 12 is added to utilize
8545             movff, but it is commented out since the pCode does not support
8546             yet a command with 2 address arguments
8547
8548 2003-05-18    <johan AT balder>
8549
8550         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8551         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8552 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8553
8554         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8555   Added feature to script commands from file.
8556
8557 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8558
8559         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8560         * src/SDCCutil.c: include ctype.h for win32
8561
8562 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8563
8564         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8565
8566 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8567
8568         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8569   Fixed so you can set breakpoints prior to run, run does not stop
8570   on entry now.  Add tbreak.  Other enhancements and fixes for use
8571   with ddd.
8572
8573 2003-05-12  Borut Razem <borut.razem AT siol.net>
8574
8575         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8576
8577 2003-05-11  Borut Razem <borut.razem AT siol.net>
8578
8579         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8580         the path of bin directory, so that PATH is the only env. variable, which has to be set
8581         in case of standard installation.
8582         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8583         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8584         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8585
8586 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8587
8588         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8589         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8590         temp files are in the port dir; clean the gen/test directory when
8591         generating new test.c
8592         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8593         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8594         * support/regression/tests/zeropad.c: added
8595
8596 2003-05-09    <johan AT balder>
8597
8598         * src/SDCCglue.c: fixed bug #597940
8599
8600 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8601
8602         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8603   cache sfr, optimize next,step, fix off by one sourceline,
8604   support ddd list function.
8605         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8606
8607 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8608
8609         * support/regression/HTMLgen.py: added compare_s2f()
8610         * support/regression/Makefile: redo 1.27
8611         * support/regression/generate-cases.py: redo 1.5
8612
8613 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8614
8615         * support/regression/tests/float.c: workaround 33 bit hex constant
8616         * support/regression/tests/simplefloat.c: fix division for host
8617
8618 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8619
8620         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8621         that tame's the PIC's over-aggressive optimizer.
8622
8623 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8624
8625          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8626          support for MSVC.
8627
8628 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8629
8630         Initial support for DS80C400. "Hello world" runs on TINIm400
8631         (with polled I/O).
8632
8633 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8634
8635          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8636          * Some notes on ddd usage added in debugger/README
8637          Martin Helmling adding more features and fixes for ddd GUI debugger.
8638          Code added for nexti, stepi, up, down, and other adjustments.
8639
8640 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8641
8642         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8643         * src/pic/peeph.def Added two rules to optimize carry manipulation
8644         * src/pic/* removed debug printfs
8645
8646 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8647
8648         * debugger/mcs51/cmd.c: added header newalloc.h
8649
8650 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8651
8652         * as/Makefile: new EXEEXT
8653         * as/z80/Makefile: remove trailing slash of BUILDIR
8654         * as/z80/clean.mk: new EXEEXT
8655         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8656         * support/cpp2/Makefile.in: new EXEEXT
8657         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8658
8659 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8660
8661         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8662         EXEEXT was introduced to fix all related problems with targets
8663         "clean", "install" and "uninstall"; a couple of further flaws
8664         especially with "clean" have been fixed too
8665         * as/mcs51/Makefile.in
8666         * as/mcs51/clean.mk
8667         * as/z80/Makefile
8668         * Makefile
8669         * clean.mk
8670         * debugger/mcs51/Makefile.in
8671         * debugger/mcs51/clean.mk
8672         * link/z80/Makefile
8673         * link/z80/Makefile.in
8674         * link/z80/clean.mk
8675         * link/Makefile
8676         * packihx/Makefile.in
8677         * packihx/clean.mk
8678         * sim/ucsim/Makefile
8679         * sim/ucsim/clean.mk
8680         * sim/ucsim/avr.src/Makefile.in
8681         * sim/ucsim/avr.src/clean.mk
8682         * sim/ucsim/s51.src/Makefile.in
8683         * sim/ucsim/s51.src/clean.mk
8684         * sim/ucsim/xa.src/Makefile.in
8685         * sim/ucsim/xa.src/clean.mk
8686         * sim/ucsim/z80.src/Makefile.in
8687         * sim/ucsim/z80.src/clean.mk
8688         * sim/ucsim/main_in.mk
8689         * sim/ucsim/packages_in.mk
8690         * sim/ucsim/gui.src/Makefile.in
8691         * sim/ucsim/gui.src/serio.src/Makefile.in
8692         * sim/ucsim/gui.src/serio.src/clean.mk
8693         * src/Makefile.in
8694         * src/clean.mk
8695         * support/cpp2/Makefile.in
8696         * support/cpp2/clean.mk
8697         * support/makebin/Makefile
8698         * support/makebin/clean.mk
8699         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8700         * doc/sdccman.lyx: --program-suffix no longer needed
8701
8702 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8703
8704          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8705          Martin Helmling added support for ddd GUI debugger.
8706          Code added to display assembly, set variables, and other commands
8707          to interface to ddd.
8708
8709 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8710
8711         * as/Makefile: fix target clean
8712         * as/clean.mk: fix target clean
8713         * as/z80/clean.mk: fix target clean
8714
8715 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8716
8717         * Makefile.common.in: added  AT EXEEXT AT
8718         * configure.in: removed all mingw32 stuff
8719         * configure: rebuilt from configure.in
8720         * doc/sdccman.lyx: updated section "installation"
8721         * support/scripts/sdcc_mingw32: adapted to configure
8722         * support/scripts/sdcc_cygwin_mingw32: added
8723
8724 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8725
8726         * src/pic Added object file support for the PIC port
8727         * src/pic Applied patch from Craig Franklin (this started the object file support)
8728         * src/regression Updated the PIC regression tests for object files
8729
8730 2003-04-20  Borut Razem <borut.razem AT siol.net>
8731
8732         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8733           lklex.c: In function `getfid':
8734           lklex.c:203: warning: array subscript has type `char'
8735         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8736           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8737         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8738           stack handling macros
8739
8740 2003-04-19  Borut Razem <borut.razem AT siol.net>
8741
8742         * "handling space characters in file path" task:
8743         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8744         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8745         * support/Util/MySystem.h: make it self-sufficient
8746         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8747           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8748           handling space characters in file path
8749         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8750           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8751         * support/Util/MySystem.c: handling space characters in executable's path
8752
8753 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8754
8755         * as/z80/Makefile: fix permanent rebuild of z80
8756         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8757         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8758
8759 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8760
8761         * src/SDCCopt.c: add special case optimization to replace modulo by
8762           a power of two with a bitwise AND.
8763
8764 2003-04-18    <johan AT balder>
8765
8766         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8767
8768 2003-04-17    <johan AT balder>
8769
8770         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8771         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8772
8773 2003-04-13  Borut Razem <borut.razem AT siol.net>
8774
8775         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8776         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8777           fixed mingw problem in adl_NORMALIZE_PATH
8778
8779 2003-04-12  Borut Razem <borut.razem AT siol.net>
8780
8781         * fixed "#pragma SAVE/RESTORE can not be nested":
8782         * src/SDCC.lex: reworked pragma handling functions
8783         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8784         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8785
8786 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8787
8788         * src/SDCCutil.c (pathEquivalent): defined but not used
8789         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8790         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8791         * configure: rebuilt from configure.in
8792         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8793         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8794         * device/include/Makefile.in: replace sdcc_datadir
8795         * device/lib/Makefile.in: replace sdcc_datadir
8796         * Makefile.common.in: add LDFLAGS from configure
8797         * packihx/Makefile.in: use LDFLAGS
8798         * src/Makefile.in: use LDFLAGS
8799         * support/cpp2/Makefile.in: add LDFLAGS from configure
8800         * support/makebin/Makefile: use LDFLAGS
8801         * .version: bumped version number to 2.3.5
8802
8803 2003-04-12  Borut Razem <borut.razem AT siol.net>
8804
8805         * completed "different paths" task:
8806         * src/SDCCmacro.c: fixed bug in handling quotes
8807         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8808         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8809
8810 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8811
8812         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8813
8814 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8815
8816         * ds390/gen.c ds390/peeph.def: fix bug 706781
8817
8818 2003-04-11  Borut Razem <borut.razem AT siol.net>
8819
8820         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8821
8822 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8823
8824         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8825         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8826          set - this bit used to not be set...).
8827         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8828           bad code in PIC Port
8829         * src/regression/and2.c added to test bug 609268
8830         * src/regression/Makefile added and2.c to regression test
8831
8832
8833 2003-04-08    <johan AT CP255758-A>
8834
8835         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8836         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8837         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8838
8839 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8840
8841         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8842         fix bug #487815
8843         * support/cpp2/Makefile.in: fix bug #487815
8844         * configure: rebuilt from configure.in
8845         * Makefile.common.in: docdir changed, new path suffixes
8846         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8847         * sdcc_vc_in.h: reflect changes from sdccconf.h
8848         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8849         * src/SDCCutil.h: remove BINDIR hack
8850         * doc/sdccman.lyx: update new path hierarchy
8851
8852 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8853
8854         * src/SDCCpeeph.c: added okToRemoveSLOC test
8855
8856 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8857
8858         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8859
8860 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8861
8862         * src/SDCCpeeph.c: added labelIsReturnOnly test
8863         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8864
8865 2003-04-05    <johan AT balder>
8866
8867         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8868         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8869         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8870         * src/SDCCast.c: fixed a warning
8871         * src/SDCCast.h: fixed a warning
8872         * src/SDCCicode.c (operandFromAst): fixed a warning
8873
8874 2003-04-04    <johan AT balder>
8875
8876         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8877         * src/SDCCast.c (decorateType): fixed bug #715076
8878         * src/SDCC.y: fixed bug #702907
8879
8880 2003-04-03    <johan AT balder>
8881
8882         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8883         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8884         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8885         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8886         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8887
8888 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8889
8890         * _decdptr.c: fix return values
8891         * _gptrget.c: fix return values
8892         * _gptrgetc.c: fix return values
8893         * _gptrput.c: fix return values
8894         * _mulint.c: fix return values
8895         * as/z80/Makefile: fix 'make -j' problem
8896
8897 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8898
8899         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8900         * configure.in: big cleanup, updated to autoconf 2.5x
8901         * configure: rebuilt from configure.in
8902         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8903         * sdcc_vc_in.h: reflect changes from sdccconf.h
8904         * doc/Makefile: fixed a flaw in "make install"
8905
8906 2003-04-02    <johan AT balder>
8907
8908         * src/ds390/gen.c (genCmp): no comments
8909         * src/mcs51/gen.c (genCmp): no comments
8910         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8911         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8912
8913 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8914
8915         * support/regression/generate-cases.py: place generated file in given sub directory
8916         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8917         * support/regression/Makefile: improvements for 'make -j';
8918         side effect: it's simpler and faster now
8919
8920 2003-03-31  Borut Razem <borut.razem AT siol.net>
8921
8922         * src/z80/main.c: link-{port} and as-{port} defined without path
8923         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8924
8925 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8926
8927         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8928
8929 2003-03-30  Borut Razem <borut.razem AT siol.net>
8930
8931         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8932           changed type of list parameter to set
8933         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8934         * src/port.h: changed type of do_assemble() parameter to set
8935         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8936           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8937           definition of "cppoutfilename" macro with NULL value in preProcess()
8938         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8939         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8940         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8941           replaced with set *binPathSet
8942         * shash_add() deallocates the item, if allready exsists, before adding the new one
8943         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8944
8945 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8946
8947         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8948           a nested for loop bug in the PIC port
8949         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8950           for loops
8951
8952 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8953
8954         * support/Util/dbuf.h: remove C++ stuff to make it portable
8955
8956 2003-03-28  Borut Razem <borut.razem AT siol.net>
8957
8958         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8959           literal strings in stringLiteral()
8960         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8961         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8962           to the project
8963
8964 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8965
8966         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8967
8968 2003-03-26    <johan AT balder>
8969
8970         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8971         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8972         * src/SDCCast.c (decorateType): fixed " -v < 3"
8973
8974 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8975
8976         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8977         Added Lenny Story's debug infrastructure changes:
8978         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8979         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8980         * src/cdbFile.c: added
8981         * src/SDCCdebug.c: added
8982         * src/SDCCdebug.h: added
8983         * src/SDCCast.c (createFunction)
8984         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8985         * src/SDCCmain.c (parseCmdLine, main)
8986         * src/SDCCmem.c (redoStackOffsets)
8987         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8988         * src/SDCCsymt.h
8989         * src/common.h
8990         * src/avr/gen.c (genAVRCode)
8991         * src/ds390/gen.c (gen390Code)
8992         * src/mcs51/gen.c (gen51Code)
8993         * src/pic/gen.c (genpic14Code)
8994         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8995         * src/xa51/gen.c (genXA51Code)
8996         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8997
8998 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8999
9000         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9001         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9002
9003 2003-03-22    <johan AT balder>
9004
9005         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9006
9007 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9008
9009         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9010         * doc/cdbfileformat.lyx: added, written by Lenny Story
9011         * doc/Makefile: added cdbfileformat.lyx
9012         * doc/clean.mk: added cdbfileformat.lyx
9013
9014 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9015
9016         * src/mcs51/peeph.def: fix bug #705773
9017
9018 2003-03-20    <johan AT balder>
9019
9020         An sfr/sbit can have an "at #" AND an initializer
9021         * src/SDCCsymt.c (checkSClass):
9022         * src/SDCCmem.c (allocGlobal):
9023         * src/SDCCmem.c (allocLocal):
9024         * src/SDCCast.c (createBlock):
9025
9026 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9027
9028         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9029
9030 2003-03-16    <johan AT balder>
9031
9032         Undid the hackup of const and volatile, the problem is much bigger
9033         * src/SDCC.y:1.65
9034         * src/SDCCast.c:1.171
9035         * src/SDCCglue.c:1.138
9036         * src/SDCCicode.c:1.146
9037         * src/SDCCsymt.c:1.150
9038         * src/SDCCval.c:1.65
9039
9040 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9041
9042         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9043         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9044
9045 2003-03-13    <johan AT balder>
9046
9047         Hackup const and volatile modifiers in type chains a bit:
9048         * src/SDCC.y:1.63
9049         * src/SDCCast.c:1.169
9050         * src/SDCCglue.c:1.136
9051         * src/SDCCicode.c:1.143
9052         * src/SDCCsymt.c1.146
9053         * src/SDCCsymt.h1.59
9054         * src/SDCCval.c:1.63
9055
9056 2003-03-12    <johan AT balder>
9057
9058         * src/SDCCBBlock.h: more LRH debugging junk
9059         * src/SDCCcflow.h: more LRH debugging junk
9060         * src/SDCCloop.c: more LRH debugging junk
9061         * src/SDCC.y (struct_declaration): fixed bug #697590
9062         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9063         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9064         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9065
9066 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9067         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9068         test function names must now match exactly).
9069         * src/SDCCcse.c: added special case in findCheaperOp to allow
9070         extending a short integer. Makes less awful code for bug 700121 test case.
9071
9072 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9073
9074         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9075         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9076
9077 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9078
9079         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9080         actually called (operandsNotEqual() was called for all
9081         operandsNotEqualX tests).
9082
9083 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9084
9085         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9086         with shorter literals. Fixes bug 700121.
9087
9088 2003-03-11    <johan AT balder>
9089
9090         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9091
9092 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9093
9094         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9095         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9096
9097 2003-03-10  Borut Razem <borut.razem AT siol.net>
9098
9099         * src/SDCCmain.c: pipe preprocessor's output
9100         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9101         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9102         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9103         which closes all pipes in pipeSet set
9104         * src/SDCCset.c: free deleted item in function deleteSetItem()
9105         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9106         moved from z80 to src subproject
9107         * .version: increased version number to 2.3.4
9108
9109 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9110
9111         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9112         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9113         * support/regression/ports/xa51/spec.mk: fix typo
9114
9115 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9116
9117         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9118
9119 2003-03-09  Borut Razem <borut.razem AT siol.net>
9120
9121         * src/SDCCmain.c: pipe preprocessor's output
9122         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9123         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9124         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9125         which closes all pipes in pipeSet set
9126         * src/SDCCset.c: free deleted item in function deleteSetItem()
9127         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9128         moved from z80 to src subproject
9129
9130 2003-03-09  Borut Razem <borut.razem AT siol.net>
9131
9132         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9133         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9134         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9135         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9136         * src/SDCCglobl.h: unification of WIN32 native definitions
9137
9138 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9139
9140         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9141
9142 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9143
9144         * src/configure.in:   check for endianess (even while cross-compiling)
9145         * src/configure:      check for endianess (even while cross-compiling)
9146         * src/configure_in.h: check for endianess (even while cross-compiling)
9147         * src/avr/gen.c:        remove old endianess stuff
9148         * src/mcs51/gen.c:      remove old endianess stuff
9149         * src/ds390/gen.c:      remove old endianess stuff
9150         * src/pic/gen.c:        remove old endianess stuff
9151         * src/pic/genarith.c:   remove old endianess stuff
9152         * src/pic/glue.c:       fix endianess check
9153         * src/pic16/gen.c:      remove old endianess stuff
9154         * src/pic16/genarith.c: remove old endianess stuff
9155         * src/pic16/glue.c:     fix endianess check
9156         * src/xa51/gen.c:       remove old endianess stuff
9157         * src/z80/gen.c:        fix endianess check
9158         * src/SDCCglue.c:       fix endianess check
9159         * src/ds390/peeph.def: fix bug 700036
9160
9161 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9162
9163         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9164         * src/configure: find appropriate data-types on host for SDCC's int and long
9165         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9166         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9167         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9168
9169 2003-03-07    <johan AT balder>
9170
9171         Just a big NOOP:
9172                 some minor cleanups before the big shot
9173                 OP_DEFS and OP_USES now use Kevin's protection
9174                 new option --nolabelopt
9175
9176         * src/SDCCBBlock.c:
9177         * src/SDCCast.c,:
9178         * src/SDCCcflow.c:
9179         * src/SDCCcse.c:
9180         * src/SDCCicode.c:
9181         * src/SDCCicode.h:
9182         * src/SDCClabel.c:
9183         * src/SDCCloop.c:
9184         * src/SDCCmain.c:
9185         * src/ds390/ralloc.c:
9186         * src/mcs51/ralloc.c:
9187         * src/pic/ralloc.c:
9188         * src/xa51/ralloc.c:
9189         * src/z80/ralloc.c:
9190
9191 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9192
9193         * src/pic/pcode.c (get_op): fix 64 bit warnings
9194         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9195         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9196         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9197         * support/regression/tests/malloc.c: fix 64 bit warnings
9198
9199 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9200
9201         * src/mcs51/gen.c (genMinus): fixed bug 696436
9202
9203 2003-03-02  Borut Razem <borut.razem AT siol.net>
9204
9205         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9206
9207 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9208
9209         * configure.in: test for mkstemp
9210         * sdccconf_in.h: add HAVE_MKSTEMP
9211
9212 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9213
9214         * device/include/ctype.h: removed warning while using --stack-auto
9215         * device/include/malloc.h: removed warning while using --stack-auto
9216         * device/include/string.h: removed warning while using --stack-auto
9217
9218 2003-02-23  Borut Razem <borut.razem AT siol.net>
9219
9220         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9221         because NDEBUG is defined (see man assert)
9222         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9223
9224 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9225
9226         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9227         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9228
9229 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9230
9231         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9232         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9233
9234 2003-02-18    <johan AT balder>
9235
9236         * as/mcs51/asmain.c (asmbl): module can start with a digit
9237         * as/z80/asmain.c (asmbl): module can start with a digit
9238
9239 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9240
9241         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9242         * src/asm.c: fix pipe() for Mingw32
9243
9244 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9245
9246         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9247         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9248         make -V work again; --c1mode reads now from stdin
9249         * doc/sdccman.lyx: added --c1mode
9250         * support/Util/SDCCerr.c: new messages for c1 mode
9251         * support/Util/SDCCerr.h: new messages for c1 mode
9252         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9253
9254 2003-02-15    <johan AT balder>
9255
9256         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9257
9258 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9259
9260         * doc/sdccman.lyx: Environment variables, -o and other minor things
9261
9262 2003-02-14    <johan AT balder>
9263
9264         * src/xa51/main.c: before anyone really tries to use it :)
9265
9266         * Install doc's in share/sdcc/doc
9267         * removed some obsolete files
9268         * Do a proper make distclean and uninstall
9269         M Makefile.common.in
9270         R sdccbuild.sh
9271         M as/Makefile
9272         M device/include/Makefile.in
9273         M device/lib/Makefile.in
9274         M doc/sdccman.lyx
9275         M link/Makefile
9276         M sim/ucsim/doc/Makefile.in
9277         M src/clean.mk
9278         R src/avr/peeph.rul
9279         R src/xa51/peeph.rul
9280         M support/cpp2/Makefile.in
9281         M support/makebin/Makefile
9282
9283
9284 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9285
9286         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9287
9288 2003-02-10  Borut Razem <borut.razem AT siol.net>
9289
9290         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9291         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9292         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9293         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9294         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9295         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9296         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9297         src/z80/Makefile.bcc: Borland Makefile cleanup
9298         * as/z80/Makefile.bcc: Added Borland Makefile
9299         * support/cpp2/borland.h: Removed
9300
9301 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9302
9303         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9304         * src/SDCC.lex: new pragma NOIV
9305         * src/SDCCglobl.h: new pragma NOIV
9306         * src/SDCCmem.c: new pragma NOIV
9307
9308 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9309
9310         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9311
9312 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9313
9314         * src/SDCCmain.c: signal handling is switched off by --debug
9315         * doc/Makefile: small fix for install; use clean.mk again
9316         * doc/clean.mk: clean *.pdf and *.html too
9317
9318 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9319
9320         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9321         * device/lib/printfl.c: fix a ds390 bug by making it portable
9322         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9323         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9324         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9325         * debugger/mcs51/cmd.c: converted multi-line string literals
9326         * sim/ucsim/globals.cc: converted multi-line string literals
9327         * src/SDCCmain.c: introduced signal handler to remove temp files
9328         * doc/Makefile: small tweaks, implement clean
9329         * doc: removed generated files
9330
9331 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9332
9333         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9334         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9335         Address Record is not correctly generated for DS390."
9336
9337 2003-02-02  Borut Razem <borut.razem AT siol.net>
9338
9339         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9340         * as/mcs51/asm.h: fixed compilation with Borland C
9341         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9342         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9343         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9344         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9345         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9346         src/z80/Makefile.bcc: delete $(LIB) only if exist
9347         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9348
9349 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9350
9351         * device/include/malloc.h: introduced NULL
9352         * device/include/string.h: introduced NULL
9353         * device/include/stdlib.h: introduced NULL
9354         * device/lib/_memcpy.c: removed NULL
9355         * device/lib/_strcat.c: removed NULL
9356         * device/lib/_strchr.c: removed NULL
9357         * device/lib/_strcmp.c: removed NULL
9358         * device/lib/_strcpy.c: removed NULL
9359         * device/lib/_strcspn.c: removed NULL
9360         * device/lib/_strlen.c: removed NULL
9361         * device/lib/_strncat.c: removed NULL
9362         * device/lib/_strncmp.c: removed NULL
9363         * device/lib/_strncpy.c: removed NULL
9364         * device/lib/_strpbrk.c: removed NULL
9365         * device/lib/_strrchr.c: removed NULL
9366         * device/lib/_strspn.c: removed NULL
9367         * device/lib/_strstr.c: removed NULL
9368         * device/lib/_strtok.c: removed NULL
9369         * device/lib/malloc.c: removed NULL, include own header
9370
9371 2003-02-02    <johan AT balder>
9372
9373         * 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
9374         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9375         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9376         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9377         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9378         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9379
9380 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9381
9382         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9383         area 'DATA'"
9384
9385 2003-02-01    <johan AT balder>
9386
9387         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9388
9389 2003-01-31    <johan AT CP255758-A>
9390
9391         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9392
9393 2003-01-30    <johan AT balder>
9394
9395         * src/SDCCBBlock.c: automatic bug detection
9396         * src/SDCCicode.c: automatic bug detection
9397
9398 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9399
9400         * src/SDCCglobl.h:   now --xram-size 0 works
9401         * src/SDCCmain.c:    now --xram-size 0 works
9402
9403 2003-01-29    <johan AT balder>
9404
9405         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9406
9407 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9408
9409         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9410         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9411         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9412         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9413         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9414         * src/SDCCmain.c:    Added options --xram-size and --code-size
9415
9416 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9417
9418         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9419         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9420
9421 2003-01-27    <johan AT balder>
9422
9423         * src/SDCC.y: fixed bug #613764
9424
9425 2003-01-26    <johan AT balder>
9426
9427         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9428         * src/SDCCsymt.h: fixed bug #673374
9429         * src/SDCCglue.c: fixed bug #661910
9430         * src/SDCCast.c: fixed bug #458099 and 673374
9431
9432 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9433
9434         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9435         * as/mcs51/strcmpi.h: added
9436         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9437         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9438         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9439         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9440         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9441         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9442         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9443         * as/mcs51/Makefile.aslink: new module strcmpi
9444         * as/mcs51/Makefile.asx8051: new module strcmpi
9445         * as/mcs51/Makefil.bcc: new module strcmpi
9446         * as/mcs51/Makefile.in: new module strcmpi
9447         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9448
9449 2003-01-26    <johan AT balder>
9450
9451         * src/SDCCglue.c: reverted back to 1.124
9452         * src/SDCCast.c: reverted back to 1.156
9453         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9454
9455 2003-01-25    <johan AT balder>
9456
9457         * src/SDCCglue.c: A better fix for bug #661910
9458         * src/SDCCast.c: A better fix for bug #661910
9459         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9460
9461 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9462
9463         * src/Makefile.in: remove spawn.o
9464         * src/SDCCmain.c: remove spawn.h
9465         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9466         * src/spawn.c: removed
9467         * src/spawn.h: removed
9468         * support/regression/ports/ds390/spec.mk: link with -r
9469
9470 2003-01-24    <johan AT CP255758-A>
9471
9472         * src/ds390/gen.c (aopOp): fixed bug #667458
9473         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9474         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9475         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9476
9477 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9478
9479         * src/mcs51/peeph.def: better assembler identation by Frieder
9480         * src/mcs51/gen.c: better assembler identation by Frieder
9481
9482 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9483
9484         * as/z80/string.h: removed for gcc 3.2
9485         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9486         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9487
9488 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9489
9490         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9491         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9492         * support/regression/Makefile: separate temp files for ports
9493         * support/regression/generate-cases.py: separate temp files for ports
9494         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9495         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9496
9497 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9498
9499         * moved tinitalk to device/examples/ds390
9500
9501 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9502
9503         * as/mcs51/lkmem.c: rflag is for DS390
9504         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9505         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9506                          (linkEdit): move mem- and map-files the same way as ihx-files
9507         * src/z80/main.c (_setDefaultOptions): removed --generic
9508         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9509         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9510         * src/pic/glue.c (picglue): --c1mode works again
9511         * src/pic16/glue.c (pic16glue): --c1mode works again
9512         * src/asm.c (printCLine): fix #660034
9513
9514 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9515
9516         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9517         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9518         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9519         * as/mcs51/lkmem (summary): better fix for sp problem
9520         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9521         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9522         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9523                                               remove --stack-after-data
9524
9525 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9526
9527         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9528         * src/SDCCutil.c (join): ugly bug: missing '\0'
9529         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9530
9531 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9532
9533         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9534         * src/port.h: typo
9535         * src/pic/main.c (_asmCmd): gpasm supports -o
9536         * src/z80/main.c: more general macros
9537         * device/lib/Makefile.in: remove intermediate files
9538
9539 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9540
9541         * .version: Bumped version number to 2.3.3
9542         * src/SDCCBBlock.c: new option -o
9543         * src/SDCCglobl.h: new option -o
9544         * src/SDCCglue.c: new option -o
9545         * src/SDCCmain.c: new option -o
9546         * src/asm.c: new option -o
9547         * src/ds390/main.c: new option -o
9548         * src/pic/glue.c: new option -o
9549         * src/pic/pcode.c: new option -o
9550         * src/pic/ralloc.c: new option -o
9551         * src/pic16/glue.c: new option -o
9552         * src/pic16/pcode.c: new option -o
9553         * src/pic16/ralloc.c: new option -o
9554         * src/z80/main.c: new option -o
9555         * device/lib/Makefile.in: use -o
9556         * support/regression/ports/ds390/spec.mk: use -o
9557         * support/regression/ports/gbz80/spec.mk: use -o
9558         * support/regression/ports/mcs51/spec.mk: use -o
9559         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9560         * support/regression/ports/z80/spec.mk: use -o
9561         * support/regression/ports/ucz80/spec.mk: use -o
9562         * support/regression/ports/xa51/spec.mk: use -o
9563         * support/regression/fwk/lib/timeout.c: fix usage string
9564
9565 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9566         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9567
9568 2003-01-07    <johan AT balder>
9569
9570         * src/SDCCast.c (decorateType): fixed bug #600035
9571
9572 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9573         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9574         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9575         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9576         * src/pic/pcode.c: outcommented unused variable to remove warnings
9577         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9578
9579 2003-01-06    <karl AT turbobit.com>
9580         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9581    regression tests.
9582
9583 2003-01-06    <johan AT balder>
9584
9585         * src/SDCCicode.c: fixed array add
9586
9587 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9588         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9589         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9590
9591 2003-01-04    <johan AT balder>
9592
9593         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9594
9595 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9596         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9597
9598 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9599         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9600         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9601
9602 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9603         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9604
9605 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9606         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9607
9608 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9609         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9610
9611 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9612
9613     * in \sdcc\as\mcs51\ changed these files in order to create an
9614     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9615     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9616     following files to include the previous two files: aslink.dsp,
9617     Makefile.aslink, Makefile.bcc, and Makefile.in.
9618
9619     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9620     .adb instead of .cdb
9621
9622 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9623
9624         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9625         value from option --iram-size.
9626
9627 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9628
9629         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9630         dram[] array.
9631
9632 2002-09-18    <wiml AT hhhh.org>
9633
9634         * SDCClrange.h: exposed setFromRange() and setToRange()
9635         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9636           packRegsForAccUse() (bug 542397)
9637         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9638           multiple times and emitting the fetch operations more than once
9639           added aopGetUsesAcc() function to allow binary operators to
9640           fetch their operands in the correct order; made genMinus() emit
9641           compact code for X = LITERAL - Y
9642
9643 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9644         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9645         sprintf() in line 1267.
9646
9647 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9648         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9649         like ports.
9650
9651 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9652         Changes to aslink (All the changes are marked with 'JCF'):
9653
9654         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9655         summary().
9656
9657         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9658         area BSEG.  Also moves, if possible, the DATA area down into the internal
9659         ram so more space is available.
9660
9661         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9662         sflag.
9663
9664         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9665         not bytes.  Function summary() which creates a memory usage summary
9666         file with extension .mem.  Reports of overlaping stack and small stack
9667         size.  If the space for the stack is less than 16 bytes aslink trows a
9668         warning.
9669
9670         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9671         the 8051.  Option 'y' for memory summary output file.
9672
9673         Changes to sdcc (All the changes are marked with 'JCF'):
9674
9675         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9676
9677         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9678         overlaying area for it (uses RegBankUsed[4]).
9679
9680         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9681         bank zero as used by default.  By default aslink locates the stack
9682         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9683         the creation of the .mem file.  Delegates the allocation of data area
9684         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9685         the begining of the stack area to aslink.
9686
9687         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9688         glue() in SDCCglue.c creates an area for it.
9689
9690 2002-09-03  Borut Razem <borut.razem AT siol.net>
9691         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9692         sdcc/src/pic/glue.c:
9693         introduced atexit() handler for teporay files removal in case of
9694         errors, assertions, ...
9695
9696 2002-08-29  Borut Razem <borut.razem AT siol.net>
9697         * sdcc/support/cpp2/auto-host_vc_in.h:
9698         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9699         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9700         Maybe there is a similar problem with BORLANDC? It should be checked!
9701
9702         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9703         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9704         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9705         was not executed, and the compiler (cl) launched a warning:
9706         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9707
9708 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9709         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9710
9711 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9712         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9713
9714         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9715           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9716           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9717           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9718           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9719           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9720           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9721         - added Release configuration in VS projects
9722         - review of compiler an linker options
9723         - VC .exe files are generated in bin_vc directory, not to interfere
9724           with binaries generated from other projects (cygwin, mingw, bcc ...)
9725
9726         * sdcc/src/yacc.dsp: added
9727
9728         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9729         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9730         and insert the version number definitions from .version
9731
9732         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9733
9734         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9735         added - genarate auto-host.h using auto-host_vc_in.h as template
9736
9737         * sdcc/sdcc_vc.h,
9738         removed from CVS, generated automatically
9739
9740 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9741         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9742
9743 2002-08-11  Borut Razem <borut.razem AT siol.net>
9744         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9745
9746 2002-08-10  Borut Razem <borut.razem AT siol.net>
9747         * src/SDCCmain.c (main):
9748         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9749         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9750         The consequence was that some temporary files were not removed.
9751
9752         * src/SDCCglue.c:
9753         unification of code in functions tempfilename() and tempfile():
9754         function tempnam() is defined in Visual Studio 6.0 and .NET
9755
9756         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9757
9758         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9759           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9760         - removed compiler command line option /WX: Treats all warnings as errors
9761         - update a list of source files, included into the project
9762
9763         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9764           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9765         changed project type to Generic Project so that can be correcly converted to VS.NET project
9766
9767         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9768
9769         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9770
9771         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9772
9773         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9774         added return 0 statements after assert() to make compiler happy
9775
9776         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9777         added newline in the def file to keep MSC compiler satisfied
9778
9779         * sdcc/src/z80/gen.c:
9780         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9781           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9782         - solved MSC error in function aopDump()
9783
9784         * sdcc_vc.h: define PREFIX as "\\sdcc"
9785
9786 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9787         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9788
9789 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9790         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9791         - Rewrote the register banking algorithm.
9792         - Added pCode live-range analysis to registers (for now, only non-used and
9793         singly-used registers optimized away)
9794
9795         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9796
9797         * 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.
9798
9799 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9800         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9801
9802 2002-04-22  Michael Hope  <michaelh AT vroom>
9803
9804         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9805
9806         * configure.in (DD_COPT): Added include support required for gbdk.
9807
9808         * .version: Bumped version number just to increase it.
9809
9810         * src/SDCCmain.c: Added -nostdinc to the default options.
9811
9812 2002-04-15  Michael Hope  <michaelh AT vroom>
9813
9814         * device/lib/z80/printf.c (sprintf): Added.
9815
9816         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9817
9818         * src/z80/peeph.def: Added transpose redundent load rule.
9819
9820         * src/z80/main.c: Added force callee saves for jaune.
9821
9822         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9823
9824         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9825
9826 2002-03-28  Johan Knol  <johan AT balder>
9827
9828         * src/SDCCval.c: fixed bug #532436
9829
9830 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9831         * /src/port.h:
9832         Added "char *Processor" field to the port structure.
9833
9834         * /src/SDCCmain.c:
9835         Added -p option. Allows port dependent processor to be specified.
9836
9837         * all ports:
9838         Initialized the new field char *Processor field to NULL in all ports
9839
9840         * /src/pic/*:
9841         Compiler generated registers for interrupt context saving
9842         were not getting allocated.
9843
9844 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9845
9846         * /src/SDCCast.c:
9847         Fixed left shift. Will promote the left side of a left shift
9848         if a) left shifting more than size of operand or b) when assigned
9849         to something size > size of left side
9850
9851 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9852         * src/pic/*
9853         tons of changes. Register allocation has been
9854         rewritten. Added customization for the various PICs. Flow
9855         analysis is restructured. ...
9856
9857         * src/pic/device.h:
9858         Added
9859
9860         * src/pic/device.c:
9861         Added. device.c is a PIC port hack to accomodate variations
9862         in PIC devices.
9863
9864 2002-03-13  Michael Hope  <michaelh AT vroom>
9865
9866         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9867
9868 2002-03-04  johanknol  <johanknol AT manik>
9869
9870         * /src/SDCCval.c: fixed
9871
9872         const unsigned char arr[][2] = { { 0, 1 } };
9873         t18.c:1: error: Initializer element is not constant
9874
9875 2002-03-04  bela  <bela AT manik>
9876
9877         * /device/include/mcs51reg.h:
9878         ds89c420 register definition update
9879
9880 2002-03-03    <johan AT FRIJA>
9881
9882         * support/Util/SDCCerr.c: did something, but don't no why anymore
9883
9884         * support/regression/tests/bug-524691.c: made it a little less shy
9885
9886         * src/SDCCast.c (decorateType): fixed bug #524697
9887
9888         * src/SDCCast.c: made some lineno improvements
9889
9890         * src/SDCCval.c (getNelements): changed warning to error
9891
9892         * src/SDCCglue.c (printIvalArray): changed warning to error
9893
9894         * src/SDCCicode.c: fixed a warning for mingw
9895
9896         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9897
9898         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9899
9900 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9901
9902         * src/ds390/peeph.def:
9903         Added some more peephole rules
9904
9905         * src/ds390/gen.c: Various fixes & enhancements
9906
9907         * src/SDCClrange.c, src/SDCClrange.h:
9908         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9909
9910         * src/ds390/ralloc.c:
9911         various fixes & enhancements (ds390) specific
9912
9913         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9914         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9915         from rallocs.
9916
9917         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9918
9919 2002-03-02    <johan AT FRIJA>
9920
9921         * src/SDCCast.c (decorateType): fixed bug #524708
9922
9923         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9924
9925         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9926
9927 2002-03-01  Michael Hope  <michaelh AT vroom>
9928
9929         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9930
9931         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9932
9933 2002-03-01    <johan AT FRIJA>
9934
9935         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9936
9937         * src/SDCCast.c (decorateType): fixed bug #524209
9938
9939         * src/SDCCval.c (valNot): fixed bug #524195
9940
9941 2002-02-26    <johan AT balder>
9942
9943         * src/xa51/gen.c: fixed a warning
9944
9945         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9946
9947         * src/SDCCast.c (decorateType): fixed bug #522534
9948
9949 2002-02-23    <johan AT balder>
9950
9951         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9952
9953 2002-02-22    <johan AT balder>
9954
9955         * src/SDCCast.c: fixed bug #514865
9956
9957         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9958
9959 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9960
9961         * sdcc/src/SDCCloop.c:
9962         Previous fix was not good. basic blocks that have "break" or "return" are
9963         not really partof a loop , but live ranges used in these blocks should
9964         be live thru the entire loop, so set partOfLoop but don't add them to
9965         loop region
9966
9967 2002-02-21    <johan AT FRIJA>
9968
9969         * src/SDCCcse.c: fixed bug #514308
9970
9971 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9972
9973         * src/SDCCloop.c:
9974         Fixed BUG #519583. If a conditional block ended in a return/break
9975         statement inside a loop, it was not being considered part of the loop.
9976
9977         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9978
9979 2002-02-10  Karl Bongers <karl AT turbobit.com>
9980
9981         * debugger/*:
9982         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9983         with lots of comments and notes.
9984
9985         * device/examples/test2.c:
9986         Fix bug, "red" variable not being initialized(compiler complained).
9987
9988         * device/examples/Makefile, examples/test3.c:
9989         Add Makefile in device/examples folder, compiles test3.c
9990         for use as a multiple module SDCDB test case.
9991
9992         * sim/ucsim/cmd.src/cmdset.cc:
9993         Took out debug printfs in ucsim "next" command.
9994
9995         * sim/ucsim/xa.src:
9996         Karl and Johan start ucsim XA support.  Most dissassembly working,
9997         about 75% emulation done(plenty of work remaining).
9998
9999         * sim/ucsim/z80.src:
10000         Add Z80 support to ucsim, add test-ucz80 regression test,
10001         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10002         Notice z80 compiler fails on examples/test3.c/crc code.
10003
10004 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10005
10006         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10007         Added support for --parms-in-bank1
10008
10009         * src/ds390/peeph.def:
10010         added a few more peephole optimzations
10011
10012         * src/ds390/main.c:
10013         1) added __builtin_inp & __builtin_outp used to read in data of given length
10014            from a memory mapped port
10015         2) added __builtin_memcmp
10016         3) added __builtin_swapw swap bytes of a short
10017
10018         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10019         1) handle multiple send & receives from register bank1
10020         2) ralloc can now allocate DPTR1 to some liveRanges
10021
10022         * src/SDCCsymt.c, src/SDCCsymt.h:
10023         changes to handle multiple sends & receives
10024
10025         * src/SDCCptropt.h:
10026         added some pointer arithmetic optimization
10027
10028         * src/SDCCptropt.c:
10029         added some pointer arithmetic optimizations but not stable yet so not
10030         called from anywhere (will get this working shortly)
10031
10032         * src/SDCCopt.c: fixed for multiple sends & receives
10033
10034         * src/SDCCmain.c:
10035         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10036         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10037            set preprocessor defines (depending on options)
10038
10039         * src/SDCCicode.c, src/SDCCicode.h:
10040         changes made to handle multiple sends & receives
10041
10042         * src/SDCCglobl.h:
10043         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10044
10045         * src/SDCCcse.c, src/SDCCcse.h:
10046         added function findbackward def (to be used in upcoming optimization)
10047
10048         * src/SDCCcflow.c, src/SDCCcflow.h:
10049         added function returnAtEnd - to determine if a basic block terminates with
10050         a RETURN iCode
10051
10052         * src/SDCCast.c, src/SDCCast.h:
10053         added option parms-in-bank1
10054
10055         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10056         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10057         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10058         adjusted for --parms-in-bank1 option
10059
10060         * device/include/string.h:
10061         donot redefine "reentrant" keyword
10062
10063         * device/include/ds80c390.h: Added some more SFRs
10064
10065 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10066
10067         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10068
10069 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10070
10071         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10072
10073 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10074
10075         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10076
10077 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10078
10079         * Added --xram-movc option
10080
10081 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10082
10083         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10084
10085 2002-01-11  Johan Knol
10086
10087         * Added math lib of Jesus Calvino-Fraga
10088
10089 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10090
10091         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10092         * support/regression/Makefile: new target test-mcs51-stack-auto
10093         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10094
10095 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10096
10097         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10098
10099 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10100
10101         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10102
10103 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10104
10105         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10106
10107         * src/SDCCglue.h: add definition for printIvalChar()
10108
10109 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10110
10111         * src/SDCCast.c: fix #498138 by Johan
10112
10113         * src/SDCCglue.c: fix #498138 by Johan
10114
10115 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10116
10117         * support/regression/Makefile: fix clean
10118
10119         * support/regression/ports/ds390/support.c: fix transmission of last character
10120
10121 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10122
10123         * /sdcc/src/ds390/gen.c:
10124         a) improved computing address of stack variable
10125         b) took out some #if 0 code
10126         c) improved parmBytes adjustment
10127         d) improved genPlusIncr & genMinusIncr
10128         e) genCmp could generate bad code (when left assigned to DPTR)
10129         f) Fixed bug in hasInc
10130
10131         * /sdcc/src/ds390/ralloc.c:
10132         a) packRegsForSupport could mess up live information (Fixed)
10133         b) packRegsDPTRuse could be incorrect for left & right shift
10134
10135         * /sdcc/src/mcs51/ralloc.c:
10136         packRegsForSupport could mess up the live information (Fixed)
10137
10138         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10139
10140         * /sdcc/src/SDCCast.c:
10141         can reverse a loop even if function call is present as long
10142         as the loop control variable is local & is not passed as parameter
10143
10144 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10145
10146         * /sdcc/ChangeLog: *** empty log message ***
10147
10148         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10149         More builtin function additions for TININative
10150
10151         * /sdcc/src/ds390/ralloc.c:
10152         Had broken the regression testsuite
10153
10154         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10155
10156         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10157         Added funcattr hasStackParms will be set for reentrant functions when there
10158         are paramteres on the stack, this helps in minimizing frame pointer generation
10159         typeFromStr can handle function pointers now
10160
10161         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10162         *** empty log message ***
10163
10164 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10165
10166         * /src/ds390/gen.c, /src/ds390/main.c:
10167         More builtin function additions for TININative
10168
10169         * /src/ds390/ralloc.c:
10170         Had broken the regression testsuite
10171
10172         * /src/SDCCast.c: Fixed a bug in dumptree
10173
10174         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10175         Added funcattr hasStackParms will be set for reentrant functions when there
10176         are paramteres on the stack, this helps in minimizing frame pointer generation
10177         typeFromStr can handle function pointers now
10178
10179         * /doc/builtins.txt, /doc/TININative.txt:
10180         *** empty log message ***
10181
10182
10183 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10184
10185         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10186         ALPHA version for -mTININative
10187
10188         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10189         updated to reflect changes in the port structure
10190
10191         * /src/port.h:
10192         added function do_assemble (similar to do_link) if non-null this function
10193         will be called to do assembly (-mTININative) requires a multi command
10194         assembly
10195         added function genAssemblerEnd will be called to generate assembler Epilogue
10196
10197         * /src/SDCCsymt.c:
10198         added _JavaNative to debug info printing
10199
10200         * /src/SDCCmain.c: added option --tini-libid
10201         added port->do_assemble function (-mTININative) has a multi command assemble
10202
10203         * /src/SDCCglue.c: Disabled "constExpr" check
10204         added port->genAssemblerEnd function
10205
10206         * /src/SDCCglobl.h: Added option --tini-libid value
10207
10208         * /src/SDCCast.h:
10209         tookout optimizeCompare from the header (has no external references)
10210
10211         * /src/SDCCast.c: made one more function "static"
10212
10213 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10214
10215         * src/z80/mappings.i: Added z80asm support.
10216
10217         * src/z80/main.c: Added z80asm support on --asm=z80asm
10218
10219         * src/z80/gen.c: Fixed asm portability issues.
10220
10221         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10222
10223         * src/SDCCglue.c (printExterns): Added global/extern split.
10224
10225 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10226
10227         * support/regression/Makefile: added test for mcs51 model large
10228
10229         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10230
10231         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10232
10233 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10234
10235         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10236
10237 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10238
10239         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10240
10241         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10242
10243 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10244
10245         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10246
10247         * support/regression/tests/simplefloat.c: Port to mcs51.
10248
10249 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10250         * support/regression/tests/bug-485362.c: Added.
10251
10252         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10253
10254         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10255
10256         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10257
10258         * src/z80/gen.c (aopDump): Added a dump function.
10259
10260 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10261         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10262
10263         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10264
10265         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10266
10267         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10268
10269         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10270
10271         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10272
10273         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10274
10275         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10276
10277         * support/regression/ports/ds390/support.c: Use tinibios.
10278
10279         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10280
10281 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10282
10283         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10284         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10285
10286         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10287
10288         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10289
10290 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10291
10292         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10293
10294         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10295         (packRegsForIYUse): Created and optimised.
10296
10297 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10298
10299         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10300 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10301
10302         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10303
10304         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10305
10306         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10307
10308 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10309
10310         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10311
10312         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10313
10314 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10315
10316         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10317
10318         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10319
10320         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10321
10322 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10323
10324         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10325         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10326         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10327
10328         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10329
10330         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10331         (genNotFloat): Added.
10332         (genUminusFloat): Added.
10333
10334         * device/lib/z80/Makefile: Added floating pt stubs.
10335
10336         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10337
10338         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10339
10340         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10341
10342 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10343
10344         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10345
10346         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10347
10348         * sdcc/support/regression/Makefile: Add port ds390.
10349
10350         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10351
10352         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10353
10354         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10355
10356         * sdcc/support/regression/ports/ds390/support.c: Added.
10357
10358         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10359
10360         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10361
10362         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10363
10364 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10365
10366         * device/include/malloc.h: Added z80 and gbz80 support.
10367
10368         * device/lib/gbz80/heap.s: Added.
10369
10370         * device/lib/z80/heap.s: Added.
10371
10372         * device/lib/malloc.c: Added z80 and gbz80 support.
10373
10374         * support/regression/tests/malloc.c (testMalloc): Added.
10375
10376         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10377
10378         * support/regression/tests/bug-478094.c: Added.
10379
10380         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10381
10382 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10383
10384         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10385
10386         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10387
10388         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10389
10390         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10391
10392         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10393
10394 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10395
10396         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10397
10398 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10399
10400         * support/regression/tests/bug-477927.c: Added.
10401
10402         * src/z80/peeph.def: Added minor rules.
10403
10404         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10405
10406         * src/z80/peeph.def: Added jump optimisation modification.
10407
10408 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10409
10410         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10411
10412 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10413
10414         * support/regression/tests/funptrs.c: Added.
10415
10416 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10417
10418         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10419
10420 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10421
10422         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10423
10424         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10425
10426         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10427         (movLeft2ResultLong): Created.
10428
10429         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10430         (joinPushes): Added.  Joins two char pushes into a word push.
10431
10432 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10433
10434         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10435
10436         * support/makebin/Makefile (install): Added creation of dest dir.
10437
10438 2001-10-24 Karl Bongers <karl AT turbobit.com>
10439
10440         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10441
10442 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10443
10444         * src/z80/ralloc.c: Turned off faulty pack for one use.
10445
10446         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10447
10448         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10449
10450 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10451
10452         * support/regression/Makefile: Improved clean
10453
10454         * support/regression/ports/gbz80/spec.mk: Added clean
10455
10456         * support/regression/ports/host/spec.mk: Added clean
10457
10458         * support/regression/ports/z80/spec.mk: Added clean
10459
10460         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10461
10462         * support/regression/ports/mcs51/timeout.c: little improvements
10463
10464 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10465
10466         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10467
10468         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10469
10470         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10471
10472 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10473
10474         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10475
10476         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10477
10478 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10479         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10480
10481         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10482
10483         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10484
10485         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10486
10487         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10488
10489         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10490
10491         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10492
10493         * support/regression/tests/longor.c: Added.
10494
10495 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10496
10497         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10498
10499         * as/mcs51/aslink.h: define PATH_MAX
10500
10501         * as/mcs51/asm.h: define PATH_MAX
10502
10503         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10504
10505         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10506
10507         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10508
10509         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10510
10511         * src/SDCCglobl.h: define PATH_MAX
10512
10513         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10514
10515         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10516
10517 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10518
10519         * src/z80/gen.c (gencjneshort): Fixed
10520
10521         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10522
10523 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10524
10525         * support/regression/tests/bug-469671.c: Added.
10526
10527         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10528
10529 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10530
10531         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10532
10533         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10534
10535 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10536
10537         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10538
10539         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10540
10541         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10542
10543         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10544
10545         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10546
10547         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10548
10549         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10550
10551 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10552
10553         * 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.
10554
10555         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10556
10557         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10558
10559 2001-10-07    <johan AT FRIJA>
10560
10561         * device/lib/gets.c (gets): fixed the return value.
10562
10563 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10564         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10565
10566         * 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.
10567
10568         * 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.
10569
10570         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10571
10572         * src/pic/gen.c: Removed Safe_strdup.
10573
10574         * configure.in: Added option to enable libgc support.
10575
10576         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10577         (bitVectUnion): Optimised.
10578         (bitVectIntersect): Optimised.
10579         (bitVectBitsInCommon): Optimised.
10580         (bitVectCplAnd): Optimised.
10581
10582         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10583
10584 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10585
10586         * src/SDCCmain.c: distinguish between assembler debug and plain options
10587
10588         * src/avr/main.c:   remove standard assembler options
10589
10590         * src/ds390/main.c: remove standard assembler options
10591
10592         * src/mcs51/main.c: remove standard assembler options
10593
10594         * src/port.h: removed "PENDING" comment
10595
10596 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10597
10598         * src/device/lib/_mulint.c  : new, with assember functions
10599
10600         * src/device/lib/_mullong.c : new, with assember functions
10601
10602         * src/device/lib/_divuint.c : with assember functions
10603
10604         * src/device/lib/_divsint.c : with assember functions
10605
10606         * src/device/lib/_divulong.c: with assember functions
10607
10608         * src/device/lib/_divslong.c: with assember functions
10609
10610         * src/device/lib/_moduint.c : with assember functions
10611
10612         * src/device/lib/_modsint.c : with assember functions
10613
10614         * src/device/lib/_modulong.c: with assember functions
10615
10616         * src/device/lib/_modslong.c: with assember functions
10617
10618         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10619
10620         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10621
10622         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10623                                       replaced _mululong.c and _mulslong.c by _mullong.c
10624
10625 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10626
10627         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10628
10629 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10630
10631         * src/SDCCglue.c: test, if win32api is available for MINGW
10632
10633 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10634
10635         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10636         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10637         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10638         * support/regression/ports/host/spec.mk: removed GENERIC
10639         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10640         * support/regression/ports/z80/spec.mk: removed GENERIC
10641
10642 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10643
10644         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10645
10646         * support/regression/tests/bug-467035.c: Created.
10647
10648 2001-10-01    <johan AT FRIJA>
10649
10650         * src/SDCC.y: fixed bug #466586 part 1
10651
10652 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10653
10654         * SDCCicode.c: z80 has no generic pointers
10655         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10656
10657 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10658
10659         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10660
10661 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10662
10663         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10664
10665         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10666
10667 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10668
10669         * configure.in: Fixed up so that ucsim is only configured once.
10670
10671         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10672
10673         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10674         (getPathDifference): As above.
10675
10676         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10677
10678         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10679
10680 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10681         * .version: Updated to 2.3.1
10682
10683         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10684         Added copyright header.
10685
10686         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10687         (assemble): Added support for macro based assembler commands.
10688         (linkEdit): Added support for macro based linker commands.
10689         (preProcess): Changed the pre-processor to use macros.
10690         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10691         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10692
10693         * device/lib/z80/crt0.s: Added module name for debugging.
10694
10695 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10696
10697         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10698
10699         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10700
10701         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10702
10703         * src/Makefile.in: Added SDCCmacro and SDCCutil
10704
10705 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10706
10707         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10708
10709 2001-09-16    <johan AT FRIJA>
10710
10711         * 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.
10712
10713 2001-09-15    <johan AT FRIJA>
10714
10715         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10716         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10717
10718 2001-09-11    <johan AT FRIJA>
10719
10720         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10721
10722 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10723
10724         * support/regression/tests/bug-460444.c: Added test case.
10725
10726         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10727         (genCast): Added justification for all of the asserts.
10728
10729 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10730
10731         * support/regression/support.c: _xdata replaced by xdata
10732
10733         * support/regression/spec.mk: removed _generic
10734
10735 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10736
10737         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10738
10739         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10740         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10741
10742         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10743
10744         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10745
10746         * support/regression/tests/bug-460010.c: Added test case.
10747
10748         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10749
10750 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10751
10752         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10753
10754         * support/regression/testfwk.c: removed workaround for bug #436344
10755
10756         * support/regression/tests/bp.c: use less memory with mcs51
10757
10758         * support/regression/tests/bug-441448.c: use less memory
10759
10760         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10761
10762         * support/regression/collate-results.py: typo
10763
10764 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10765
10766         * support/regression/tests/fetchoverlap.c: Added new test case.
10767
10768         * support/regression/tests/bp.c: Added new test case.
10769
10770         * support/regression/tests/bug-448984.c: Added new test case.
10771
10772         * support/regression/tests/pow2shifts.c: Added new test case.
10773
10774         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10775         (genlshTwo): Fixed right shift for count > 8.
10776
10777         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10778
10779 2001-09-08    <johan AT FRIJA>
10780
10781         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10782
10783 2001-09-07    <johan AT FRIJA>
10784
10785         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10786
10787         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10788
10789 2001-09-06    <johan AT FRIJA>
10790
10791         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10792         * bernhard noted me at this: "() equals to (void)" (1.38)
10793
10794 2001-09-05    <johan AT FRIJA>
10795
10796         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10797
10798 2001-09-04    <johan AT FRIJA>
10799
10800         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10801
10802
10803 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10804
10805         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10806
10807 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10808
10809         * link/z80/aslink.h: Fixed path for PATH_MAX
10810
10811 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10812
10813         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10814
10815         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10816
10817         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10818
10819         * 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.
10820
10821 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10822
10823         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10824         (genCmp): Fixed up genCmp for the GB with longs.
10825
10826         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10827
10828         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10829
10830         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10831
10832         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10833
10834 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10835
10836         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10837
10838 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10839
10840         * 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.
10841
10842         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10843
10844 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10845
10846         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10847
10848         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10849
10850 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10851
10852   * sim/ucsim/configure:    little improvement of Cygwin-detection
10853   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10854   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10855   * support/regression/tests/bug-221100.c: small changes for mcs51
10856   * support/regression/tests/bug-221168.c: small changes for mcs51
10857   * support/regression/tests/bug-227710.c: small changes for mcs51
10858   * support/regression/tests/staticinit.c: small changes for mcs51
10859   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10860   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10861   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10862
10863 $Revision$