ChangeLog: fixed my cut and paste error within the ChangeLog
[fw/sdcc] / ChangeLog
1 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2
3         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
4
5 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
6
7         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
8         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
9         * support/regression/bug1464657.c: added, new test
10
11 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
12
13         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
14           version number
15
16 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
17
18         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
19           --no-peep and --peep-file <file> are used don't use default rules but
20           do use the <file>
21
22 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
23
24         * src/mcs51/gen.c (genCall): fixed bug 1457608
25
26 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
27
28         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
29         changes seem to cause (trigger?) problems with the build system.
30
31 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
32
33         * src/SDCCpeeph.c (operandsLiteral): new, added,
34           (callFuncByName): inserted operandsLiteral
35         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
36
37 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
38
39         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
40         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
41
42 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
43
44         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
45           implemented patch 1120823 Thanks to Willy De la Court (normal
46           interrupts need an interrupt number now if they are made critical),
47           and enabled nesting of critical functions though not for gbz80
48           (genCritical, genEndCritical): added functions
49           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
50         * src/z80/mappings.i: added "ei" to all mappings
51
52 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
53
54         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
55         submitted by the Debian SDCC maintainer Aurelien Jarno:
56         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
57         archive with gcc 4.1 on mips and wrote the patch"
58
59 2006-03-16 Raphael Neider <rneider AT web.de>
60
61         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
62           the left operand is shorter than the result (c* = lit-c* + int),
63           fixes bug #1450796
64         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
65           OP_SYMBOL
66
67 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
68
69         * src/.version: increased version number to 2.5.5
70         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
71         linking is done manually in pic16 port's _linkEdit,
72         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
73         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
74         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
75         allocate asmop as AOP_ACC,
76         (aopForRemat): added parameter 'bool result' in function declaration,
77         (pic16_aopGet): return AOP_ACC when accessing WREG,
78         (pic16_popGetTempReg): minor modification,
79         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
80         'pic16_allocWithIdx',
81         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
82         calling function in absolute addresses,
83         (genAssign): take into account AOP_ACC asmop,
84         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
85         * src/pic16/pcoderegs.c: some debug functions and lines added,
86         * src/pic16/ralloc.c (decodeRegType): added but commented out,
87         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
88         register too,
89         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
90         call to allocReg, not by manually allocating a new one,
91         (pic16_assignRegisters): now before going through the register
92         allocating functions mark all registers as free. This eliminates some
93         side effects resulting from peephole parser done earlier in the backbone
94
95 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
96
97         * src/SDCCicode.c (geniCodeLogic),
98         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
99
100 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
101
102         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
103           (genSend): bugfix, do not allocate and free twice,
104           (shiftRLong): handle partially overlapping aops
105         * support/regression/tests/bitopcse.c: fixed warning redefined idata
106
107 2006-03-08 Borut Razem <borut.razem AT siol.net>
108
109         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
110           for pic16
111
112 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
113
114         * support/regression/tests/bug1409955.c: new, added
115         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
116         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
117           (aopForSym, aopOp): increment asmop.allocated if reused,
118           (freeAsmop): decrement asmop.allocated and check for zero instead of
119           using asmop.freed,
120           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
121           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
122            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
123            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
124            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
125            genSignedRightShift, genRightShift, genDataPointerGet,
126            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
127            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
128             in reverse order from allocation,
129           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
130             added swappedLR to keep track
131         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
132           pdata & code for GCC, z80, gbz80 & hc08
133         * support/regression/tests/zeropad.c: moved defines to testfwk.h
134
135 2006-03-08 Raphael Neider <rneider AT web.de>
136
137         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
138
139 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
140
141         * device/include/mcs51/c8051f410.h: new SiLabs mcu
142         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
143         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
144
145 2006-03-06 Borut Razem <borut.razem AT siol.net>
146
147         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
148           made the linker quiet
149
150 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
151
152         * src/pic16/gen.c (genPcall): fixed bug #1443644
153         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
154         which dumps before the function entry point a data byte which represents
155         the number of the local variables used by the specified function, added
156         'xinst' for initial support for Extended Instruction Support,
157         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
158         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
159         port->fun_prefix anymore (may change later),
160         (genFunction, genEndFunction): do not store/restore local registers for
161         _main (this should take care the --main-return command line option in
162         the future),
163         (genOr): removed some legacy pic-port instructions,
164         * src/pic16/genarith.c (genAddLit): re-enabled old code because
165         performing operations with SFR's causes data to be written more than
166         once to each SFR. Perhaps SFRs should be handled in special cases...
167         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
168         pcode.h
169         * src/pic16/main.c (_process_pragma): stack bound checking did not take
170         into account for stack starting position,
171         (struct OPTIONS pic16_optionsTable): added command line argument
172         --extended or -y for Extended Instruction Support,
173         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
174         (deassignLRs): *** perhaps the most important change, old 'for' code
175         (commented out for reference), didn't account for some registers which
176         were left marked 'not free' after a pointer operation. The change
177         reduces register usage a lot in some cases
178
179 2006-03-04 Borut Razem <borut.razem AT siol.net>
180
181         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
182           _clean
183         * support/regression/tests/bug-524697.c: decreased array size for
184           mcs51 to fit into the internal RAM
185         * support/regression/Makefile.in: a little bit more verbose
186
187 2006-03-03 Borut Razem <borut.razem AT siol.net>
188
189         * support/regression/fwk/lib/testfwk.c,
190           support/regression/fwk/include/testfwk.h: introduced function
191           _prints(), nonrecursive _printn(), call _initEmu() from main()
192         * support/regression/ports/gbz80/support.asm,
193           support/regression/ports/ucz80/support.asm,
194           support/regression/ports/z80/support.asm,
195           support/regression/ports/ds390/support.c,
196           support/regression/ports/hc08/support.c,
197           support/regression/ports/host/support.c,
198           support/regression/ports/mcs51/support.c,
199           support/regression/ports/xa51/support.c: added empty _initEmu()
200           function
201         * support/regression/ports/pic16/gpsim.cmd,
202           support/regression/ports/pic16/spec.mk,
203           support/regression/ports/pic16/support.c,
204           support/regression/Makefile.in: added pic16 regression test
205
206 2006-03-01 Raphael Neider <rneider AT web.de>
207
208         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
209           genConstPointerGet): use safe way of generating MOVFF to cover
210             literals as well as registers, fixes bug #1440527
211         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
212             dereference
213           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
214             more correctly, fixes bug #1232186
215           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
216         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
217             gplink guess the correct processor in more cases, applied patch
218             from Till Riedel attached to and fixing bug #1436552
219
220 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
221
222         * support/regression/tests/array.c: added, contains check for #1434401
223         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
224
225 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
226
227         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
228         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
229         * device/include/mcs51/c8051f326.h,
230         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
231         * device/include/mcs51/c8051f000.h,
232         * device/include/mcs51/c8051f018.h,
233         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
234           PCON_IDLE,PCON_STOP and added sfr16 definitions
235
236 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
237
238         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
239           genGetWord): fixed bug 1409955
240
241 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
242
243         * device/include/hc08/mc68hc908gp32.h,
244         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
245
246 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
247
248         * src/SDCCast.c (constExprValue): return NULL if not a value
249         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
250         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
251         * support/regression/tests/bitfields.c: enabled signed bitfield for all
252
253 2006-02-13 Borut Razem <borut.razem AT siol.net>
254
255         * src/regression/ptrarg.c: added, fails due to bug #1430967
256         * src/regression/Makefile: ptrarg.c added, ...
257
258 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
259
260         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
261         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
262
263 2006-02-11 Borut Razem <borut.razem AT siol.net>
264
265         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
266           print "Processor: xxx" message to stdout only if --verbose
267
268 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
269
270         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
271         * support/regression/tests/bug1426356.c: added
272         * support/regression/tests/bitfields.c: removed 2 tests
273
274 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
275
276         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
277         * device/include/mcs51/c8051f330.h,
278         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
279           PCON_IDLE,PCON_STOP and added sfr16 definitions
280         * device/lib/_divsint.c,
281         * device/lib/_divuint.c,
282         * device/lib/_divulong.c,
283         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
284           register bank bug for small stackauto
285
286 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
287
288         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
289
290 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
291
292         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
293         * all.dsp: corrected several bin paths
294         * device/include/mcs51/c8051f120.h,
295         * device/include/mcs51/c8051f300.h,
296         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
297           to PCON_IDLE,PCON_STOP
298         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
299         * device/lib/printf_large.c (output_float): fixed bug 1388703
300         * support/regression/tests/bug1057979.c: added test for bug 1388703
301
302 2006-02-08 Raphael Neider <rneider AT web.de>
303
304         * src/pic/pcode.c (pciTRIS): fixed typo,
305           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
306           (LinkFlow): fixed handling of flows that end in a call,
307           (ReuseReg): perform safety check earlier
308         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
309             to work with flows at the beginning of a pBlock,
310             fixes #1426557 (Symbol not previously defined),
311           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
312             usage information
313           (RemoveUnusedRegisters): update register usage info
314         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
315             created, reuse existing ones instead
316         * src/pic/gen.c (genPcall): fixed #1424719
317
318 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
319
320         * link/z80/lkmain.c,
321         * link/z80/lklex.c,
322         * link/z80/lkdata.c,
323         * link/z80/aslink.h: fixed build on current cygwin:
324         replaced getline() by lk_getline()
325
326 2006-02-01 Borut Razem <borut.razem AT siol.net>
327
328         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
329           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
330           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
331           src/regression/bool1.c, src/regression/bool2.c,
332           src/regression/bool3.c, src/regression/call1.c,
333           src/regression/compare.c, src/regression/compare10.c,
334           src/regression/compare2.c, src/regression/compare3.c,
335           src/regression/compare4.c, src/regression/compare5.c,
336           src/regression/compare6.c, src/regression/compare7.c,
337           src/regression/compare8.c, src/regression/compare9.c,
338           src/regression/configword.c, src/regression/for.c,
339           src/regression/inline.c, src/regression/mult1.c,
340           src/regression/nestfor.c, src/regression/or1.c,
341           src/regression/pointer1.c, src/regression/ptrfunc.c,
342           src/regression/rotate1.c, src/regression/rotate2.c,
343           src/regression/rotate3.c, src/regression/rotate4.c,
344           src/regression/rotate5.c, src/regression/rotate6.c,
345           src/regression/rotate7.c, src/regression/string1.c,
346           src/regression/struct1.c, src/regression/sub.c,
347           src/regression/sub2.c, src/regression/switch1.c,
348           src/regression/while.c, src/regression/xor.c,
349           src/regression/create_stc, src/regression/simulate,
350           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
351           regression tests
352         * src/regression/gpsim_assert.h: added
353
354 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
355
356         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
357         ((void (code *) (void)) 0) ();
358         * as/hc08/aslex.c,
359         * as/hc08/aslink.h,
360         * as/hc08/asm.h,
361         * as/hc08/asmain.c,
362         * as/hc08/lkdata.c,
363         * as/hc08/lklex.c,
364         * as/hc08/lkmain.c,
365         * as/mcs51/aslex.c,
366         * as/mcs51/aslink.h,
367         * as/mcs51/asm.h,
368         * as/mcs51/asmain.c,
369         * as/mcs51/lkdata.c,
370         * as/mcs51/lklex.c,
371         * as/mcs51/lkmain.c,
372         * as/z80/aslex.c,
373         * as/z80/asm.h,
374         * as/z80/asmain.c: fixed build on current cygwin:
375         replaced getline() by as_getline()
376
377 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
378
379         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
380         declarator in the symbol chain
381         * src/SDCCsymt.h,
382         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
383         parameter list for function pointers
384         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
385         * support/regression/tests/bug-716242.c: added
386
387 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
388
389         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
390         offset if possible
391         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
392
393 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
394
395         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
396         inifinitely recurseable, added static
397         * support/regression/tests/bug-1408066.c: added
398
399 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
400
401         * src/SDCCicode.h,
402         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
403         renamed, added possibility to create "postLoopLbl"-labels
404         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
405         newiTempLoopHeaderLabel
406         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
407         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
408         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
409         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
410         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
411         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
412         (basicInduction): fixed bug #136564, made static,
413         (loopInduction): changed parameter of basicInduction, made static,
414         (addPostLoopBlock): added
415         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
416         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
417         findLoopEndSeq
418         * support/regression/tests/bug-136564.c: added
419         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
420         --std-sdcc99 to LIBSDCCFLAGS
421
422 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
423
424         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
425         while loop
426         * support/regression/tests/bug-1406131.c: added
427
428 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
429
430         * src/SDCCast.c (decorateType): fix promotion of unary minus
431         * src/SDCCsymt.c (computeType): beautified
432         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
433         (valUnaryPM, valComplement): fix sign and promotion,
434         (valNot): ANSI: result type is int (SDCC: unsigned char)
435         * support/regression/tests/uminus.c: speedup by removing superflous
436         test case 'int'
437         * support/regression/tests/onebyte.c: added promotion and signedness
438         tests for unary minus
439         * support/regressions/tests/bug-477927.c: disable warning about
440         uninitialized variables
441         * support/regression/tests/not.c: added
442
443 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
444
445         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
446         * src/mcs51/gen.c (gen51Code): show final register usage after
447         fillGaps in asm with --i-code-in-asm
448         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
449         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
450         incUsed, rliveClear, adjustIChain): made static,
451         (setFromRange): excluded because it's unused,
452         (findPrevUseSym, markWholeLoop): added,
453         (findPrevUse): rewritten; fixes bug 895992; now a complete search
454         through all branches of predecessors enables sdcc to emit the warning
455         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
456         (rlivePoint): made static, added parameter emitWarnings which is only
457         true during the first run out of two,
458         (findRecursiveSucc, findRecursivePred): removed,
459         (computeLiveRanges): made static, added parameter emitWarnings,
460         (dumpIcRlive): added for debugging only
461         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
462         removed prototype of setFromRange()
463         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
464         in call of computeLiveRanges()
465         * support/regression/tests/bug-895992.c: added
466         * support/regression/tests/bug-971834.c: added
467         * support/valdiag/tests/bug-895992.c: added
468         * support/valdiag/tests/bug-971834.c: added
469
470 2005-12-18 Raphael Neider <rneider AT web.de>
471
472         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
473           (genUnpackBits): improved code for direct operands,
474           (genPackBits): improved code for literal assignment to bitfields
475             and for direct destination operands (no FSR indirection),
476             prevented redundant AND, fixes #1362800,
477           (AccLsh): added parameter to disable masking of the result
478         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
479           skip instructions with side-effects (like incfsz),
480           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
481         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
482         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
483           fixes #1375263
484
485 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
486
487         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
488         volatile variables as spill location
489
490 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
491
492         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
493         replacing literals
494         * support/regression/tests/bug-1376320.c: added
495
496 2005-12-08 Raphael Neider <rneider AT web.de>
497
498         * src/pic/device.c: renamed is_shared to pic14_is_shared
499         * src/pic/gen.c (genIfx): re-enabled handling of sbits
500         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
501           (is_valid_identifier): added for above workaround
502
503 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
504
505         * device/lib/Makefile.in: fixed to enable port-specific-objects
506         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
507           char, thanks Hubert Sack
508         * doc/sdccman.lyx: documented --xstack-loc,
509           elaborated a bit more on interrupts and pitfalls,
510           removed "setjmp/longjmp unsupported",
511           documented some unsupported C99 features
512         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
513         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
514           if, thanks Hubert Sack
515         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
516         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
517           make make_library
518         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
519           regression tests can report resource usage (rfe 700441)
520         * support/regression/collate-results.py: report resource usage
521         * support/regression/ports/ds390/spec.mk,
522         * support/regression/ports/hc08/spec.mk,
523         * support/regression/ports/mcs51/spec.mk,
524         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
525         * support/regression/ports/ds390/uCsim.cmd,
526         * support/regression/ports/hc08/uCsim.cmd,
527         * support/regression/ports/mcs51/uCsim.cmd,
528         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
529         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
530           library, use the default one
531         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
532           building the library
533
534 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
535
536         * config.dsp: added dependency on .version and configure_vc.awk
537         * device/include/setjmp.h: updated for --stack-auto and --xstack
538         * device/include/mcs51/at89c51snd1c.h: corrected line endings
539         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
540         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
541         * device/lib/libsdcc.lib: added _setjmp
542         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
543           (decorateType): fixed bug 1372851,
544           (optimizeGetHbit): fixed warning
545         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
546           array initialisation
547         * support/regression/tests/bug1057979.c: added test for bug 1358192
548         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
549
550 2005-12-03 Borut Razem <borut.razem AT siol.net>
551
552         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
553           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
554
555 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
556
557         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
558         createIval): implement symbol independant "flexible array member",
559         (createIvalCharPtr): implemented flexible array initialisation with a
560         string
561         * src/SDCCsymt.c (copyStruct): removed,
562         (getSize): fixed misleading comment,
563         (getAllocSize): removed, the additional allocation size is now in
564         sym->flexArrayLength,
565         (checkStructFlexArray): new, syntax checks for flexible array members,
566         (compStructSize): added syntax checks for "flexible array members"
567         (copyStruct): removed,
568         (copyLinkChain): removed inefficient fix for bug 770487
569         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
570         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
571         symbol->flexArrayLength
572         * src/SDCCerr.c,
573         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
574         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
575         * support/regression/tests/structflexarray.c: added
576         * support/valdiag/tests/structflexiblearray.c: added
577
578 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
579
580         * src/SDCCast.c (decorateType): fixed bug 1368489
581         * support/Util/SDCCerr.c,
582         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
583
584 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
585
586         * device/include/mcs51/at89c51snd1c.h: added file submitted by
587           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
588
589 2005-11-27 Borut Razem <borut.razem AT siol.net>
590
591         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
592           support/cpp2/mkdeps.h: added command line option
593           -obj-ext=<extension> to SDCPP to define object file externion, used
594           for generation of make dependencies (-M)
595         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
596
597 2005-11-26 Borut Razem <borut.razem AT siol.net>
598
599         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
600           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
601           added pic and pic16 libraries
602
603 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
604
605         * device/include/float.h: Corrected typo in prototype of __fsgt
606
607 2005-11-25 Borut Razem <borut.razem AT siol.net>
608
609         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
610           added creation of model-mcs51-stack-auto libraries
611
612 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
613
614         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
615         and fields-list too
616         * src/SDCCast.c (createIvalArray): removed obsolete comment
617
618 2005-11-24 Borut Razem <borut.razem AT siol.net>
619
620         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
621           added missing device/lib/mcs51/crt*.asm sources
622
623 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
624
625         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
626
627 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
628
629         * device/lib/_fs2schar.c,
630         * device/lib/_fs2sint.c,
631         * device/lib/_fs2slong.c: optimized inline asm
632
633 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
634
635         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
636           Better handling of floats between -1.0 and 0.0.
637
638 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
639
640         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
641           (the missing "if"s prohibited removal of redundant labels)
642
643 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
644
645         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
646           Properly convert floats between -1.0 and 0.0 to long, int, and char
647           types (max integer value of negative floats tends to zero).
648         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
649           Removed changes made so to work properly with floats between
650           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
651           and _fs2char.c
652
653 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
654
655         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
656         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
657         (genCast) cosmetic change
658         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
659         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
660         from mcs51
661         * support/regression/tests/bitfields (testSignedBitfields): added
662
663 2005-11-18 Borut Razem <borut.razem AT siol.net>
664
665         * sdcc/device/lib/Makefile.in: remove all unnecessary files
666         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
667           introduced SILENT option to make building of pic16 libraries less
668
669 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
670
671         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
672           Now they work properly with floats between -1.0 and 0.0
673         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
674
675 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
676
677         * src/SDCCicode.c (printOperand): added missing else
678
679 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
680
681         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
682         reformatted for better readability
683         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
684         signed bitfields
685
686 2005-11-17 Borut Razem <borut.razem AT siol.net>
687
688         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
689           introduced SILENT option to make building of pic16 libraries less
690           verbose - used for nightly snapshot build
691         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
692           available on Win32 platforms.
693         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
694           medium, large, pic and pic16
695
696 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
697
698         * device/lib/printf_large.c: Temporary patch for bug 1358192:
699           printf("%f"...) sets fraction to zero.
700
701 2005-11-16 Raphael Neider <rneider AT web.de>
702
703         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
704           fixes #1357221
705         * src/pic/gen.c (genIfx): implemented for CARRY bit
706         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
707           to generic pointers, fixes #1357332,
708           (pic16_movLit2f): NEW,
709           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
710
711 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
712
713         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
714
715 2005-11-11 Raphael Neider <rneider AT web.de>
716
717         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
718         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
719           compute pointer's type from operand,
720           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
721           improved single bit reads, fixes bug #1353379
722
723 2005-11-09 Borut Razem <borut.razem AT siol.net>
724
725         * support/scripts/sdcc.nsi: added lib/pic to the package
726
727 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
728
729         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
730
731 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
732
733         * support/regression/tests/bug1348008.c: added
734         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
735         * support/regression/tests/bug1337835.c: updated comment
736
737 2005-11-06 Borut Razem <borut.razem AT siol.net>
738
739         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
740           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
741           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
742           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
743           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
744           dynamic construction of cl_error_class and derivates - 2.nd try
745
746 2005-11-05 Borut Razem <borut.razem AT siol.net>
747
748         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
749           bug, which caused Bus Errors on sparc solaris
750
751 2005-11-04 Borut Razem <borut.razem AT siol.net>
752
753         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
754           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
755           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
756           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
757           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
758           and derivates to resolve the initialization problem on OSX
759
760 2005-11-02 Borut Razem <borut.razem AT siol.net>
761
762         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
763           corrected typo - #include <winsock2.h>
764
765 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
766
767         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
768           (_asxxxx_mapping): added org directive for future enhancements
769
770 2005-11-01 Borut Razem <borut.razem AT siol.net>
771
772         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
773           enabled sockets on WIN32
774         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
775
776 2005-10-31 Borut Razem <borut.razem AT siol.net>
777
778         * support/regression/generate-cases.py: escape backslashes in {testcase}:
779           WIN32 backslash path delimiters should be escaped when used in C strings
780         * support/regression/tests/bitfields.c: exclude failing assertions for
781           __CYGWIN32__ and __MINGW32__ hosts
782
783 2005-10-30 Borut Razem <borut.razem AT siol.net>
784
785         * src/SDCCutil.c: corrected double comparison typo
786
787 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
788
789         * device/lib/medium/Makefile: added for new memory model medium
790         * device/include/asm/mcs51/features.h: updated for medium/pdata
791         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
792           added Multiply & Accumulate sbit's and MAC0_PAGE define
793         * device/include/mcs51/c8051f300.h: added sfr16 definitions
794         * device/include/mcs51/c8051f310.h: added sfr16 definitions
795         * device/lib/_mullong.c: update for medium model
796         * device/lib/incl.mk: added medium model
797         * doc/sdccman.lyx: documented medium model
798         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
799         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
800         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
801         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
802           (allocParms): set SCLS and OCLS to pdata for medium model
803         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
804           for pdata,
805           (powof2): return <0 if not power of 2
806         * src/avr/gen.c (genBitWise): use updated powof2
807         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
808           (shiftR2Left2Result): small optimization in setup, save acc when storing,
809           (shiftLLeftOrResult): use B if necessary
810         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
811         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
812         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
813         * support/regression/Makefile.in: added test-mcs51-medium
814         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
815
816 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
817
818         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
819         specifier unsigned
820         * device/lib/time.c (mktime): fixed bug 1334315
821
822 2005-10-28 Raphael Neider <rneider AT web.de>
823
824         * device/include/pic/p16f_common.inc: added common declarations
825         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
826
827 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
828
829         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
830           (aopPutUsesAcc): added to predict accumulator use,
831           (assignResultValue): save acc if necessary,
832           (genMinusDec): store result if indirectly addressed,
833           (genDivOneByte):  save acc if necessary,
834           (movLeft2Result): bugfix if left already in acc,
835           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
836             attention to accumulator use (esp. pdata),
837           (genReceive): receive pdata correctly
838         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
839         * src/SDCCicode.h: added isOperandInPagedSpace prototype
840
841 2005-10-27 Raphael Neider <rneider AT web.de>
842
843         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
844
845 2005-10-27 Raphael Neider <rneider AT web.de>
846
847         * .version: changed version to 2.5.4
848         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
849         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
850           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
851             arithmetics support routines
852         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
853         * device/lib/Makefile.in: also create installdir for pic
854
855         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
856           pic14 port as well
857         * src/pic/device.c (dump_sfr): rewritten to delegate register
858           placement to the linker (use `extern sym' rather than sym EQU addr),
859           (validAddress): fixed to check last specified address
860         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
861           (popGetLit): truncate literal value to 8 bit,
862           (popGet): moved assert to more appropriate place
863           (popGetExternal): create pCode operand from and mark the according
864             symbol as being `extern'
865           (popGetAddr): added sanity check on immediate's offset, provide
866             GPOINTER tag on demand
867           (aopPut): fixed for immediates,
868           (mov2w_op): move operand's address or contents to WREG (depending on
869             operand type), safer variant of mov2w,
870           (movwf,call_libraryfunc): NEW, handy abbreviations,
871           (get_argument_pcop,get_return_val_pcop,pass_argument,
872           get_returnvalue): interface for accessing function parameters and
873             return values,
874           (assignResultValuei,genRet): use new parameter/return value interface
875           (pic14_getDataSize): back to old version handling generic pointers,
876           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
877             provided implementation and/or fixed old one,
878           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
879             calls, removed legacy 8051 reference code
880           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
881           (loadSignToC): NEW, move the operands sign bit to CARRY,
882           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
883             genRightShiftSigned, accepts negative shift counts,
884           (setup_fsr): load FSR and adjust IRP (indirect memory access),
885           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
886             generic pointers, __data pointers and __code pointers,
887           (genUnpackBits,genPackBits): rewritten to work with generic pointers
888             and signed bitfields, limit bitfields to 8 bit,
889           (genDataPointerGet): fixed number of bytes read,
890           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
891           (genPointerGet,genPointerSet): fixed handling of __code pointers,
892             pointers to constant data are no longer assumed to point to __code
893             space, removed invalid pointer types,
894           (bitpatternFromVal): retrieve the PICs representation of an integer
895             or float literal,
896           (genDataPointerSet): fixed assigning to po_immediate operands,
897           (genGenPointerSet): implemented as library call,
898           (genIfx): fixed incorrect condition,
899           (genAddrOf): limit generic pointers' addresses to 2 bytes,
900             provide GPOINTER tag according to destination's storage class,
901           (genCast): added code to handle casting to generic pointers, added
902             sign-/zero extension of the result
903           (aop_isLitLike,op_isLitLike): fixed handling of immediates
904         * src/pic/gen.h: added macros to access IRP bit in STATUS register
905         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
906           extend the result
907         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
908           address/register resides in the shared banks
909           (emitSymbolToFile): improved to handle global and `pinned' symbols,
910             put all variables into separate sections (have the linker arrange
911             them)
912           (picglue): put init code and interrupt handlers in separate sections
913         * src/pic/main.c: added port specific options table, modified to PORT
914           structure to make GPOINTERs 3 byte, added pic14_options
915           (_pic14_do_link): private linking routine (update paths to libraries,
916             add libsdcc.lib by default)
917         * src/pic/main.h: declare pic14_options
918         * src/pic/pcode.c: fixed instructions i/o relations,
919           (RegCond): reverted to correct version,
920           (newpCodeOpLit): truncate literals to 8 bit,
921           (genericPrint): added debug output,
922           (getRegFromInstruction): fixed for various operand types, simplified
923           (BuildFlow): fixed broken handling of isntructions with labels
924           (LinkFlow): start at last instruction in flow (skip trailing comments),
925             pass the flow on to the next instruction after CALL
926           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
927           (insertPCodeInstruction): fixed inserting after a skip instruction,
928           (DoBankSelect): fixed for labeled instructions
929           (OptimizepBlock): honor --nopeep switch
930           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
931         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
932         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
933           (pCodeOptime2pCodes): allow disabling this optimization via
934             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
935             but is still buggy), started implementation of a dataflow based
936             pCode optimization (CSE + dead code elimination)
937           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
938         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
939           names are independant of the stack location and therefore portable across
940           devices
941
942 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
943
944         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
945           (selectSpil): fixed bug 1337835 by not spilling bit variables
946         * support/regression/tests/bug1337835.c: added test for this bug
947         * src/mcs51/peeph.def: restart after rule 3.c,
948           addded rules 263.x to optimize loading constants
949
950 2005-10-26 Raphael Neider <rneider AT web.de>
951
952         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
953         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
954           (genAssign): emit warning when casting literals to generic pointer
955             type, also applies when taking the address of a fixed variable,
956           (genCast): improved casting to generic pointers
957         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
958           extern variables, added verbose error message
959         * device/include/pic16/{string.h,errno.h}: added #pragma library c
960
961 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
962
963         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
964         carry must be complemented too
965         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
966         could be emitted by genMinus
967         * src/SDCCval.c (constVal): fixed bug 1305065
968
969 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
970
971         * src/SDCCast.c (addCast): added promotion for bit variables
972         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
973         promotion casts + optimisation
974         (optimizeGetWord): fix warning 'i' might be used uninitialized
975         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
976         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
977
978 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
979
980         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
981         all chars are promoted to int; promotion should be handled in SDCCast.c
982
983 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
984
985         * device/lib/_strcmp.c: Fixed bug 1326457
986
987 2005-10-11 Raphael Neider <rneider AT web.de>
988
989         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
990         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
991
992 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
993
994         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
995         * support/regression/tests/sfr16.c: added test for the sfr32 bug
996
997 2005-10-04 Raphael Neider <rneider AT web.de>
998
999         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1000           device/lib/pic16/pics.all: added pic18f1320
1001         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1002
1003 2005-09-30 Raphael Neider <rneider AT web.de>
1004
1005         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1006         * src/pic16/devices.inc: NEW, provides device descriptions
1007         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1008
1009 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1010
1011         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1012           GETHBIT
1013
1014 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1015
1016         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1017           documented Any Order Bit, Higher Order Byte and Higher Order Word
1018         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1019         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1020           (optimizeGetAbit): new, to get any bit, not only the high bit,
1021           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1022           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1023           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1024           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1025             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1026             GETABIT, GETBYTE, GETWORD: decorate them,
1027           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1028           (ast_print): added GETABIT, GETBYTE, GETWORD
1029         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1030         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1031           (geniCodeBinary): new generic binary icode,
1032           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1033         * src/port.h: updated comment for PORT.hasExtBitOp
1034         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1035           (genGetByte): new, to get a single byte,
1036           (genGetWord): new, to get a word from a long,
1037           (gen51Code): added GETABIT, GETBYTE, GETWORD
1038         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1039
1040 2005-09-23 Raphael Neider <rneider AT web.de>
1041
1042         * configure.in, configure: have device/lib/pic configured
1043         * device/lib/Makefile.in: added model-pic14
1044         * device/lib/clean.mk: added pic/ to clean rule
1045         * device/lib/pic: added rudimentary pic14 library providing support
1046           functions for multiplication/division/generic pointer access
1047         * src/SDCCopt.c (convilong): mark support functions as extern
1048           for pic14 port as well
1049         * src/pic/gen.c (genMult): added assertions,
1050           (genpic14Code): emit warning on unhandled iCodes
1051         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1052         * src/pic/pcode.c (pCodeOpCopy),
1053         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1054           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1055           SFR_REGISTER}), made safe for future extensions
1056         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1057           instructions even if preceeded by SKIP instructions (also remove
1058           them); removed unused code
1059         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1060           prevents leaving parts of the structure uninitialized after copying
1061
1062 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1063
1064         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1065           ago by me
1066         * support/regression/tests/addsub.c: added test for the bug
1067
1068 2005-09-21 Raphael Neider <rneider AT web.de>
1069
1070         * device/include/pic16/pic18f1220.h,
1071           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1072         * device/lib/pic16/Makefile.rules: added missing opening paren
1073         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1074           are provided in genutils.c,
1075           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1076           operand/result sizes,
1077           (genCmp): assert on NULL pointers first, then check deref'ed values
1078         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1079           result size
1080
1081 2005-09-18 Raphael Neider <rneider AT web.de>
1082
1083         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1084           as these are now unused,
1085           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1086         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1087           local, avoids uninitialized pointer dereference on r->name
1088         * src/pic16/ralloc.c (newReg): fixed indentation
1089
1090 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1091
1092         * src/SDCCval.c (constVal): fixed bug 730366
1093         * support/Util/SDCCerr.c,
1094         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1095
1096 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1097
1098         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1099
1100 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1101
1102         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1103
1104 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1105
1106         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1107           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1108         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1109           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1110         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1111         * packihx/packihx.c (hexDigit): made c unsigned char
1112         * as/mcs51/lklibr.c (fndsym),
1113         * link/z80/lkgb.c (gb),
1114         * link/z80/lklibr.c (fndsym),
1115         * link/z80/lkrloc.c (relr),
1116         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1117         * src/SDCC.lex (checkCurrFile, process_pragma),
1118         * src/SDCCglue.c (spacesToUnderscores),
1119         * src/SDCCmain.c (setParseWithComma, processFile),
1120         * src/asm.c (tvsprintf, printCLine),
1121         * src/avr/gen.c (emitcode, aopPut),
1122         * src/ds390/gen.c (emitcode),
1123         * src/hc08/gen.c (emitcode, emitinline),
1124         * src/mcs51/gen.c (emitcode, genInline),
1125         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1126           tokenizeLineNode),
1127         * src/pic/ralloc.c (debugLog),
1128         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1129           tokenizeLineNode),
1130         * src/pic16/ralloc.c (debugLog),
1131         * src/z80/main.c (_process_pragma):
1132            made all ctype.h function calls safe
1133         * src/SDCCopt.c: include math.h for fabs
1134         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1135           and used them throughout the code to make ctype.h function calls safe
1136         * src/ds390/main.c (asmLineNodeFromLineNode),
1137         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1138         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1139            unsigned char*
1140         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1141           (newpCodeAsmDir): made ctype.h function calls safe
1142         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1143           pic16_emitcode):  made lbp unsigned char*
1144         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1145           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1146         * src/xa51/gen.c (emitcode),
1147         * src/z80/gen.c (_emit2): made lbp unsigned char*
1148         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1149            char*
1150
1151 2005-09-05 Raphael Neider <rneider AT web.de>
1152
1153         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1154           access bank splitpoint
1155
1156 2005-09-05 Raphael Neider <rneider AT web.de>
1157
1158         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1159
1160 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1161
1162         * .version: changed to version 2.5.3
1163         * doc/sdccman.lyx: changed version to 2.5.3,
1164           documented --codeseg and --constseg and pragma codeseg and constseg,
1165           documented bit parameters (reentrant) and bit returning
1166         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1167            currFunc->recvSize, but is this ok for all ports?
1168           (ast2iCode): result of ~ on unsigned char must be cast to int for
1169            bool to work
1170         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1171           function pointers in bit space
1172         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1173           (processFuncArgs): call port.reg_parm() with reentrancy info
1174         * src/port.h,
1175         * src/avr/main.c,
1176         * src/ds390/main.c,
1177         * src/hc08/main.c,
1178         * src/pic/main.c,
1179         * src/pic16/main.c,
1180         * src/xa51/main.c,
1181         * src/z80/main.c: port.reg_parm prototype extended with
1182           "bool reentrant" parameter
1183         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1184           options.stackAuto for allocating bit register parameters
1185         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1186           (genSend): set BitBankUsed if it is,
1187           (selectRegBank): factored out of genCall for use in genPcall,
1188           (genCall): removed redundant dtype assignmen, use selectRegBank,
1189           (genPcall): handle returning in Carry properly, save in F0 if needed,
1190           (genReceive): handle bit register parameters
1191         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1192           (mcs51_assignRegisters): enable bit registers for all reentrant
1193            functions and don't set BitBankUsed unconditionally
1194         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1195         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1196         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1197
1198 2005-08-27 Borut Razem <borut.razem AT siol.net>
1199
1200         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1201         ppc-osx (Darwin) does not support -u option. It seems that it is
1202         supported only on Linux - GNU cp
1203
1204 2005-08-25 Borut Razem <borut.razem AT siol.net>
1205
1206         * sim/ucsim/gui.src/serio.src/Makefile.in,
1207           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1208           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1209           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1210           install and strip, since the strip at /usr/ccs/bin should be used
1211           on solaris
1212
1213 2005-08-24 Borut Razem <borut.razem AT siol.net>
1214
1215         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1216
1217 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1218
1219         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1220         ffffffffu
1221
1222 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1223
1224         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1225         * as/mcs51/lkmain.c (link_main): fixed warning
1226         * device/include/stdbool.h: ds390 has no advanced bit support yet
1227         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1228         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1229         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1230           and updated their macros
1231         * src/SDCCval.c (constVal): updated comment for renamed b_long
1232
1233 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1234
1235         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1236         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1237           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1238           (oprio): set priority for '['
1239         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1240            and adb_24_bit
1241         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1242         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1243         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1244         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1245           added overlayable BIT_BANK area
1246         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1247           (summary2): explain 'T' in legenda
1248         * as/mcs51/lkrloc.c: replaced old K&R style,
1249           (relr): added R_BIT processing,
1250           (errmsg): added "Bit-addressable relocation error",
1251           (adb_bit): added for converting from byte- to bit-addressable space,
1252           (adb_24_bit): added for converting from byte- to bit-addressable space
1253         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1254            used in reentrant functions now even as return value
1255         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1256         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1257           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1258         * src/SDCCglobl.h: added indicator BitBankUsed
1259         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1260            the bit registers b0-b7
1261         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1262           (geniCodeCast): fixed bug 1263853,
1263           (geniCodeLogicAndOr): put result in bool or char,
1264           (geniCodeReceive): added parameter func for accessing the return type,
1265           (geniCodeFunctionBody): pass func to geniCodeReceive
1266         * src/SDCCmain.c: added indicator BitBankUsed
1267         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1268         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1269           (checkSClass): don't put automatic bool/bit on stack,
1270           (checkFunction): removed check on function cannot return bit
1271         * src/SDCCsymt.h: added newBoolLink prototype
1272         * src/mcs51/gen.c (rb1regs): added bit registers,
1273           (movc): created for assigning to carry,
1274           (pushReg, popReg): created for pushing registers,
1275           (sameRegs): check both AOP_REG and AOP_CRY types,
1276           (aopOp): handle bit registers,
1277           (aopPut): optimization no self-assign,
1278           (saveRegisters): push reg->base (bits) only once for bit registers,
1279            and use pushReg,
1280           (unsaveRegisters): pop reg->base only once and use popReg,
1281           (assignResultValue): added parameter func and return in carry for bits,
1282           (genIpush): optimization no reload in A if not changed,
1283           (genSend): bit parameters in reentrant functions are passed in bit
1284            registers by first assigning to bits in B, then save registers and
1285            copy B to bits,
1286           (genCall): handle returning in Carry properly, save it in F0 if needed,
1287           (genPcall): updated assignResultValue call, this is not safe yet for bit
1288            returning function !!!
1289           (genFunction): don't generate equ's for bit registers and use pushReg,
1290           (genEndFunction): take care of bit returning functions and use popReg,
1291           (genRet): return bit in Carry,
1292           (genIfx): optimize bit registers and other directly addressable bits,
1293           (genReceive): updated assignResultValue call
1294         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1295           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1296            registers when using stack-auto
1297         * src/mcs51/ralloc.c (_G): added allBitregs,
1298           (regs8051): added the bit registers,
1299           (createStackSpil): use macro IS_BIT,
1300           (getRegBit): added to allocate a bit register, else spill,
1301           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1302           (updateRegUsage): factored out to ease stepping while debugging,
1303           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1304            also allocate bit registers,
1305           (fillGaps): handle bit registers,
1306           (findAllBitregs): added to create bit vector with all bit registers,
1307           (mcs51_allBitregs): returns this bit vector,
1308           (mcs51_assignRegisters): when using stack-auto use bit registers for
1309            passing parameters and creating local variables
1310         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1311
1312 2005-08-22 Borut Razem <borut.razem AT siol.net>
1313
1314         * device/lib/Makefile.in: replaced find option -or with -o
1315           to make it run on solaris
1316
1317 2005-08-22 Raphael Neider <rneider AT web.de>
1318
1319         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1320           fixes #1265442 (crash on Solaris)
1321
1322 2005-08-20 Borut Razem <borut.razem AT siol.net>
1323
1324         * configure, configure.in: added tests for libsocket and libnsl libraries,
1325           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1326           from support/regression/Makefile.in
1327         * support/regression/Makefile.in: added
1328         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1329         * sim/ucsim/libtool: regenerated on sparc-solaris
1330         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1331           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1332           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1333           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1334           sparc-solaris, which doesn't use GNU ld linker
1335         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1336         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1337
1338 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1339
1340         * src/mcs51/peeph.def: updated comments
1341
1342 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1343
1344         * device/lib/_gptrget.c,
1345         * device/lib/_gptrput.c: slightly shorter
1346         * doc/sdccman.lyx: incremented version
1347         * src/mcs51/peeph.def: moved peephole comments to the line of first
1348           change to better keep line correlation, reanimated 186.e
1349         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1350
1351 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1352
1353         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1354           David Saxton with quotes around file name.
1355
1356 2005-08-15 Borut Razem <borut.razem AT siol.net>
1357
1358         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1359           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1360           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1361           make tests run on x86_64 platform
1362
1363 2005-08-13 Raphael Neider <rneider AT web.de>
1364
1365         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1366           as it might be executed DURING a build (parallel make is wonderful)
1367
1368 2005-08-13 Raphael Neider <rneider AT web.de>
1369
1370         * device/lib/Makefile.in (port-specific-objects-pic16):
1371           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1372         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1373           dependency
1374         * device/lib/pic16/Makefile.rules: build subdirs before creating
1375           the library, removed builddir rule, create $(builddir) early in
1376           recurse rule, use empty recurse rule for leaf directories
1377         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1378           mkdir errors (race condition), removed duplicate suffix "hex"
1379           from clean rules
1380         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1381         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1382           prevents mkdir -p from aborting on Alpha
1383
1384 2005-08-12 Raphael Neider <rneider AT web.de>
1385
1386         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1387           db-statements in order to allow for arrays of pointers in code
1388           sections to be placed without interspersed 0-padding, fixes
1389           bug #1256215
1390         * (emitStatistics): fixed division by zero for pic18f1220
1391         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1392           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1393         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1394         * (pic16_pCodeConstString): keep track of already emitted string
1395           literals to prevent "duplicate definitions of symbol _str_NR"
1396         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1397           debug message
1398         * device/lib/Makefile.in: ignore failing PIC16 library builds
1399         * device/lib/pic16/Makefile: do not build if gputils are missing
1400         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1401
1402 2005-08-10 Raphael Neider <rneider AT web.de>
1403
1404         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1405           my last commit)
1406
1407 2005-08-10 Raphael Neider <rneider AT web.de>
1408
1409         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1410           Rokas' patch to add the new fixed point type "__fixed16x16"
1411         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1412           functions for __fixed16x16 arithmetics
1413         * device/lib/pic16: reimplemented the build system to support
1414           a separate build directory, better handling of libio (create
1415           the library in a separate subdir for each architecture) and
1416           easier configuration (centralized in Makefile.common)
1417
1418 2005-08-07 Raphael Neider <rneider AT web.de>
1419
1420         * src/pic16/gen.c (genrshTwo): fixed sign extension
1421         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1422         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1423           added T0CONbits
1424         * device/include/pic16/pic18f4220.h: NEW, header for
1425           pic18f4220 and pic18f4320
1426         * device/include/pic16/pic18fregs.h: added new devices,
1427           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1428         * device/include/pic16/signal.h: resolved name clashes
1429           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1430           to also allow testing for interrupt enable bits, added
1431           comments on how to use the macros
1432         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1433         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1434           register definitions for the devices
1435         * device/lib/pic16/pics.all: added new devices
1436         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1437           allocated memory
1438         * device/lib/pic16/libc/stdlib/memfree: do not count
1439           the block header as free memory
1440         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1441           simplified and added missing end-of-blocklist-marker
1442           (reported by Peter Onion, fixes #1252814)
1443         * (_mergeHeapBlock): fixed loop condition
1444         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1445           len==0, restructured code
1446         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1447           up a bit, reduced bitfield accesses, prevent endless loops
1448           in case of heap corruption
1449         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1450           "unreferenced arguments/must return a value" warnings
1451         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1452           replaced BAUDREG with SPBRG
1453         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1454           device/lib/pic16/debug/gstack/gstack.c: replaced
1455           _naked, _asm, _endasm with __naked, __asm, __endasm
1456
1457 2005-08-05 Raphael Neider <rneider AT web.de>
1458
1459         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1460           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1461
1462 2005-08-05 Borut Razem <borut.razem AT siol.net>
1463
1464         * device/lib/Makefile.in: added missing ';'
1465         * configure: removed ^M characters
1466
1467 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1468
1469         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1470           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1471           License
1472
1473 2005-08-04 Borut Razem <borut.razem AT siol.net>
1474
1475         * configure.in: pic16 libraries build 2nd try - enable running
1476           configure in device/lib/pic16
1477         * configure: regenerated from configure.in
1478         * device/lib/Makefile.in: create $(PORT)/bin directory
1479
1480 2005-08-03 Raphael Neider <rneider AT web.de>
1481
1482         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1483           to get/set values via pointers
1484         * (genUnpackBits,genPackBits): changed detection of
1485           ptr->bitfield vs. sym.bitfield, fixed access via generic
1486           pointers, removed dead (wrong) code for multibyte bitfields
1487         * (genNearPointerGet, genGenPointerGet): removed useless code,
1488           fixed bitfield detection, fixes #1250594
1489         * (genNearPointerSet): removed useless code
1490         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1491           and introduced macro pic16_emitpcode that conditionally emits
1492           the origin of the following pCode (useful for debugging SDCC)
1493         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1494         * (createDefmap): fixed handling of LFSR for --optimize-df
1495
1496 2005-08-02 Borut Razem <borut.razem AT siol.net>
1497
1498         * device/lib/Makefile.in: pic16 libraries build enabled since
1499           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1500
1501 2005-08-02 Raphael Neider <rneider AT web.de>
1502
1503         * src/pic16/gen.c (genPackBits): removed deprecated warning
1504         * (genGenPointerSet): fixed bitfield detection
1505
1506 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1507
1508         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1509
1510 2005-07-31 Raphael Neider <rneider AT web.de>
1511
1512         * device/lib/pic16/libdev/pic18f458.c,
1513           device/include/pic16/pic18f458.h: added missing T0CONbits
1514
1515 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1516
1517         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1518
1519 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1520
1521         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1522
1523 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1524
1525         * device/include/mcs51/at89c51ed2.h: added.
1526
1527 2005-07-23 Raphael Neider <rneider AT web.de>
1528
1529         * src/pic/gen.h: added emitpcode macro for debugging
1530         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1531           and replace by macro adding debug information on demand
1532         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1533         * (gencjne): tried to fix; replaced with correct (slower) code
1534         * (gen{Unp,P}ackBits): fixed single bit access
1535         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1536         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1537           previous instruction
1538         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1539           register has to be handled with care (forbidding movement
1540           of assignments/uses, removing assignments completely, ...)
1541         * (pCodeOptime2pCodes): make use of regIsSpecial
1542         * added lots of debugging output (commented out)
1543         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1544           from being reused as result UNLESS it is known to work
1545
1546 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1547
1548         * support/Util/dbuf.h: include <stddef.h> for size_t
1549         * .version: changed to version 2.5.2
1550
1551 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1552
1553         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1554
1555 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1556
1557         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1558           (genModOneByte): removed needless psha/pula
1559
1560 2005-07-22 Raphael Neider <rneider AT web.de>
1561
1562         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1563           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1564         * src/pic/gen.c (resolveIfx): do not "invent" labels
1565         * (genSkipc): changed to positive logic
1566         * (genSkipCond): removed as no longer needed
1567         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1568           backport from PIC16
1569         * (genLeftShift): check operands are in different registers
1570         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1571           INCF does not update CARRY...
1572         * src/pic/main.c: fixed _linkCmd
1573         * src/pic/pcode.c (unlinkpCode): added inactive code
1574         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1575           alive (do not assign result and operand overlapping registers)
1576
1577 2005-07-22 Raphael Neider <rneider AT web.de>
1578
1579         * src/pic/device.c (dump_sfr): replaced register declaration with
1580           call to emitSymbolToFile() to avoid duplicate symbols
1581         * (assignRelocatableRegisters): do not declare external symbols
1582         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1583           right (take size of type, not etype)
1584         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1585         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1586         * (packRegsForAccUse): disabled assignment of WREG as
1587           the result reg to prevent occurence of just fixed #1235003,
1588           fixes #1242954
1589         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1590           symbols (avoids duplicate symbols in .asm file)
1591         * (pic14emitRegularMap): use emitSymbolToFile()
1592         * src/pic/gen.c (aopOp): fixed spillLocation handling
1593         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1594         * (genDataPointerSet): removed unneccessary variables/output
1595
1596 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1597
1598         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1599         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1600
1601 2005-07-21 Raphael Neider <rneider AT web.de>
1602
1603         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1604           architecture cannot handle them efficiently, fixes bug #1235003
1605         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1606           check for empty sets before using them (fixes bug #1232190)
1607
1608 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1609
1610         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1611           (lnksect2): generate warnings for memory overlap
1612         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1613           constseg to set the name of these segments so you can instruct the linker
1614           to place them in banks
1615         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1616         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1617           added code_seg and const_seg to options
1618         * src/SDCCglue.c (emitMaps): use options.const_seg,
1619           (createInterruptVect): put interrupt vectors in segment HOME,
1620           (glue): put HOME before static segment and put the main glue in HOME,
1621           (glue): use options.code_seg
1622         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1623         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1624           these segments so you can instruct the linker to place them in banks
1625           (linkEdit): use code_loc for HOME segment which should be the first
1626           segment in code memory now
1627         * src/SDCCmem.c: fixed more stuff like bug 1238386
1628         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1629           (changePointer): don't change function pointers to code pointers for
1630           banked functions,
1631           (compareType): added exceptional check for banked function pointers
1632         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1633         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1634           after static in code memory
1635         * src/mcs51/gen.c: added aopLiteralLong prototype,
1636           (aopForSym): use getSize for functions,
1637           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1638           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1639           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1640           the segment,
1641           (genPcall): use call for literal function pointers and generate banked
1642           calls over the one trampoline so there's only one place for the user to
1643           modify according to his/hers hardware,
1644           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1645           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1646         * src/mcs51/main.c: added keyword banked,
1647           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1648         * support/Util/SDCCerr.c,
1649         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1650           needed for passing the bank and address to the trampoline
1651         * device/lib/mcs51/crtbank.asm: added for bankswitching
1652         * device/lib/mcs51/Makefile: added crtbank
1653
1654 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1655
1656         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1657           for fields at offset 0 of a struct or union as reported
1658           on 2005-07-07 in the developer mailing list.
1659
1660 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1661
1662         * src/SDCCmem.c: fixed bug 1238386
1663
1664 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1665
1666         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1667           (patch #1144962), added peephole 300, enabled 259.x
1668         * doc/sdccman.lyx: removed screenshot and provided link instead
1669
1670 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1671
1672         * doc/sdccman.lyx: added section about debugging with ddd
1673         * doc/figures/ddd_example.eps: screenshot of debugging session
1674
1675 2005-07-04 Raphael Neider <rneider AT web.de>
1676
1677         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1678           like CODE pointers, fixes #1115683
1679         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1680           call, fixes bugs #1232211, #1228110,
1681           fixed wrong casts to pCodeFlow from pCodeInstructions
1682
1683 2005-07-04 Raphael Neider <rneider AT web.de>
1684
1685         * src/pic/gen.c (popGet): changed assert to allow for
1686           bit operands
1687         * (popGetAddr): changed signature to provide
1688           an additional index, patched all call sites
1689         * (genCmpEq): handle literal-like operands correctly
1690         * (genAddrOf): added sanity checks on __code/__data pointers
1691         * (genAssign): added handling of symbols from __code section
1692         * (gencjne): do not generate code for comparisons whose result
1693           is neither stored nor used, fixes bug #1171114
1694         * (AccLsh, AccRsh): operate on operand instead of WREG
1695         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1696           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1697           by known count
1698         * rewrote complete shift-by-literal logic, commented unused
1699           functions out
1700         * (genConstPointerGet): get multiple bytes (if result size > 1),
1701           fixed handling of non-immediate addresses
1702         * (genPointerGet): handle CODE pointers like CONST pointers
1703         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1704         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1705           operand is to be treated as a literal or not
1706         * (mov2w,genPcall,genCmpEq),
1707           src/pic/genarith.c: use aop_isLitLike() to decide between
1708           literal/register contents
1709         * (addSign): added missing offset
1710         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1711           only emit comment in debug-mode,
1712           use {aop,op}_isLitLike throughout the file
1713         * src/pic/glue.c: fix initializers for pointers (work in progress)
1714         * src/pic/pcode.c (get_op): honor index on _const symbols
1715         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1716         * (dumppBlock): added pCode size estimation
1717         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1718           check for IS_SYMOP before OP_SYMBOL'ing
1719         * fixed indentation, compacted switch-statements
1720         * (allocReg): find free register and allocate it instead of
1721           allocating new registers all the time
1722         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1723           registers as its operands (necessary only for multibyte GETs)
1724
1725 2005-07-01 Raphael Neider <rneider AT web.de>
1726
1727         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1728           debugging .asm-output macros FENTRY + FEXIT
1729         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1730           way... I wonder...
1731         * (emitpComment): NEW, printf to pCode
1732         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1733           offset handling
1734         * (popGetAddr): NEW, variant of popGet to access an immediates
1735           high(er) bytes instead of the n'th byte of memory they reference,
1736           replaced popGet with popGetAddr where neccessary
1737         * (genDataPointerGet): reactivated and fixed implementation
1738         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1739           accesses
1740         * (genDataPointerSet): fixed multibyte assignments
1741         * (genpic14Code): fixed --i-code-in-asm handling
1742         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1743         * (genPlus): fixed index-out-of-bounds error
1744         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1745         * src/pic/ralloc.c: added debugging output macro FENTRY2
1746         * (spillThis): fixed indentation, enbraced for-body for clarity
1747         * (rematStr): commented out as now unused
1748         * (regTypeNum): commented out special spill case (overwrites
1749           arbitrary values)
1750         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1751
1752 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1753
1754         * doc/sdccman.lyx: documented sfr16/sfr32,
1755           added example for using storage class with function pointers
1756         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1757
1758 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1759
1760         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1761         * device/lib/_itoa.c,
1762         * device/lib/_ltoa.c: optimized codesize
1763         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1764           but don't know how to suppress the double warning.
1765         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1766         * support/Util/SDCCerr.c,
1767         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1768
1769 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1770
1771         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1772           fixed old K&R prototypes
1773         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1774         * device/lib/_gptrget.c,
1775         * device/lib/_gptrgetc.c,
1776         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1777           also new versions for small generic pointers and banked generic pointers
1778         * src/port.h: added const_name
1779         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1780         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1781         * src/SDCCcse.c (findPrevIc): check all associative operators
1782         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1783         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1784         * src/SDCCmem.c: updated comments,
1785           set far-space to 0 for pdata, results in optimized code
1786         * src/SDCCmem.h: added macro CONST_NAME
1787         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1788           moving the info into the highest bits, see also gptrget/gptrput
1789         * src/src.dsp: added sdcc.ico to project files
1790         * src/avr/gen.c (genCast): fixed bug 0x%d
1791         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1792         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1793           relation between ptr_type and DCL_TYPE,
1794           (genCast): fixed bug 0x%d
1795         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1796           (CODE)" for const_name
1797         * src/hc08/gen.c (genCast): fixed bug 0x%d
1798         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1799           (hc08_port): added "CONST (CODE)" for const_name
1800         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1801           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1802           between ptr_type and DCL_TYPE,
1803           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1804           operand* and took AOP() inside function so sfr-ness can be checked,
1805           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1806           new prototype,
1807           (genFunction, genEndFunction): optimized stack setup,
1808           (genMinus): optimized for literals with ending zeroes (in bytes),
1809           (genCast): fixed bug 0x%d
1810         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1811           (mcs51_port): added "CONST (CODE)" for const_name
1812         * src/mcs51/peeph.def: made rule 226 more generic
1813         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1814         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1815         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1816         * src/z80/main.c (z80_port): added NULL for const_name,
1817           (gbz80_port): added NULL for const_name
1818         * support/regression/tests/bug663539.c,
1819         * support/regression/tests/sfr16.c: new tests
1820
1821 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1822
1823         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1824
1825 2005-06-24 Raphael Neider <rneider AT web.de>
1826
1827         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1828           corrected typos...
1829         * device/include/pic16/signal.h: added USBIF
1830           and SIG_USB
1831
1832 2005-06-24 Raphael Neider <rneider AT web.de>
1833
1834         * device/lib/pic16/libdev/pic18f2455.c,
1835           device/include/pic16/pic18f2455.h: NEW
1836         * device/include/pic16/pic18fregs.h,
1837           device/lib/pic16/pics.all,
1838           src/pic16/device.c: added 18f2455
1839         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1840           device/include/pic16/{pic18f[68][567].h,usart.h}:
1841           replaced MULTIPLE_USARTS define with more relaible
1842           compatibility sfrs (for USART access)
1843
1844 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1845
1846         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1847           and the output asm file line is printed on two lines.
1848
1849 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1850
1851         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1852           BGT, BLE, BHI, and BLS instructions
1853         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1854           genCmpEq): removed
1855         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1856           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1857           fixes bug #1216342
1858         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1859
1860 2005-06-15 Raphael Neider <rneider AT web.de>
1861
1862         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1863         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1864         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1865           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1866           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1867
1868 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1869
1870         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1871           Marcel Telka in bug #1215704
1872
1873 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1874
1875         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1876           located in shared memory bank.
1877
1878 2005-05-31 Raphael Neider <rneider AT web.de>
1879
1880         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1881           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1882           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1883
1884 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1885
1886         * device/lib/_strncpy.c: fixed the fix
1887
1888 2005-05-26 Raphael Neider <rneider AT web.de>
1889
1890         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1891           initializers with \0, bug #1208187
1892         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1893           intializers with \0, bug #1208187
1894
1895 2005-05-26 Raphael Neider <rneider AT web.de>
1896
1897         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1898           initializers with \0, bug #1208187
1899         * src/pic16/main.c (_process_pragma): added sanity checks
1900           for stack position and size, emit warnings when appropriate
1901
1902 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1903
1904         * device/lib/_strncpy.c: fixed not filling with \0
1905
1906 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1907
1908         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1909           createFunction),
1910         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1911           compound_statement),
1912         * src/SDCCsymt.h,
1913         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1914
1915 2005-05-24 Raphael Neider <rneider AT web.de>
1916
1917         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1918
1919 2005-05-24 Raphael Neider <rneider AT web.de>
1920
1921         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1922           TRISE definitions, closes bug #1162453
1923
1924 2005-05-22 Raphael Neider <rneider AT web.de>
1925
1926         * src/pic16/main.c (_process_pragma): check for missing
1927           arguments to pragmas code and udata
1928         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1929           consistency fixes to match other headers (thanks to Jim Paris)
1930         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1931
1932 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1933
1934         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1935
1936 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1937
1938         * support/regression/tests/bug1198642.c: new test
1939         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1940         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1941         * support/scripts/resource.h,
1942         * support/scripts/resource.rc,
1943         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1944         * support/scripts/sdcc.ico: added 32x32 icon
1945
1946 2005-05-18 Raphael Neider <rneider AT web.de>
1947
1948         * device/lib/pic16/libdev/pic18f*.c,
1949         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1950           keywords to "__sfr" and "__at (X)"
1951         * device/include/pic16/pic18fregs.h: added pic18f4520
1952         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1953           #1203088 (MPLAB compatibility)
1954
1955 2005-05-17 Raphael Neider <rneider AT web.de>
1956
1957         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1958         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1959         * device/lib/pic16/pics.all: added new devices
1960         * src/pic16/device.c: added support for pic18f4520
1961
1962 2005-05-16 Raphael Neider <rneider AT web.de>
1963         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1964         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1965         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1966           convenience function for bit access
1967
1968 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1969
1970         * device/lib/printf_large.c: fixed bug 1193299
1971         * support/regression/tests/bug1057979.c: added test %3.3s
1972
1973 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1974
1975         * device/include/mcs51/8051.h,
1976         * device/include/mcs51/8052.h: made parseable with lint
1977         * device/include/mcs51/lint.h: added include file for (sp)lint
1978         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1979         * doc/cdbfileformat.lyx,
1980         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1981
1982 2005-05-14 Raphael Neider <rneider AT web.de>
1983
1984         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1985         * device/lib/pic16/libc/stdlib/itoa.c (new)
1986         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1987         * device/lib/pic16/libio/Makefile: exclude subdir according to
1988           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1989         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1990         * src/pic16/gen.c (genFunction): prevent annoying warning
1991         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1992           nameclashes on BeOS
1993         * support/cpp2/cppmain.c (cpp_output_string): new
1994         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1995           fixes bug 1116802
1996
1997 2005-05-13 Borut Razem <borut.razem AT siol.net>
1998
1999         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2000
2001 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2002
2003         * .version: changed to version 2.5.1; back to bleeding edge development
2004
2005 2005-05-11 Borut Razem <borut.razem AT siol.net>
2006
2007         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2008           generate PDF version 1.3 documents
2009
2010 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2011
2012         * .version: changed to version 2.5.0
2013
2014 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2015
2016         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2017
2018 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2019
2020         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2021         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2022         well as many smaller updates.
2023         * .version: changed to version 2.5.0-pre1
2024
2025 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2026
2027         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2028
2029 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2030
2031         * support/regression/tests/bug1185672.c: added
2032         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2033           bug 1185672
2034         * src/mcs51/gen.c (genCall): added comments, made it look safer
2035         * src/mcs51/gen.c (genEndFunction): simplified
2036
2037 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2038
2039         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2040
2041 2005-04-14 Borut Razem <borut.razem AT siol.net>
2042
2043         * fixed bug 1045046 - SIGSEGV with really simple code?:
2044           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2045           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2046
2047 2005-04-14 Borut Razem <borut.razem AT siol.net>
2048
2049         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2050           src/pic16/device.h: temporarily disabled experimental #inline pragma
2051           for 2.5.0 release
2052
2053 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2054
2055         * device/include/z80/stdio.h,
2056         * device/include/z80/string.h: removed these highly incomplete files so
2057           SDCC can use the default ones in device/include/
2058
2059 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2060
2061         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2062         gcc warning.
2063         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2064         fix sdcpp warnings.
2065
2066 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2067
2068         * device/include/malloc.h: removed redundant __reentrant prototypes
2069         * device/lib/_mullong.c: added working xstack variant in asm (C version
2070           doesn't pass regression tests)
2071         * device/lib/bpx.c: used __data and made bpx char for mcs51
2072         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2073           (createFunction): fixed bug with xstackPtr
2074         * src/SDCCcse.c: corrected comments
2075         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2076           (killDeadCode, eBBlockFromiCode): removed unused code
2077         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2078           corrected comments
2079         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2080           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2081           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2082           (genModOneByte): fixed warning in MSVC
2083         * src/mcs51/main.c (): added comments
2084         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2085
2086 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2087
2088         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2089
2090 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2091
2092         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2093
2094 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2095
2096         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2097         characters arrays of larger size than the declared one.
2098
2099 2005-04-10 Borut Razem <borut.razem AT siol.net>
2100
2101         * src/pic/gen.c (genInline),
2102           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2103           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2104           (findNextInstruction), (findPrevInstruction),
2105           (findInstructionUsingLabel),
2106           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2107         * src/pic/pcode.c (findLabel): added missing '\n'
2108         * src/src.dsp: added SDCCdwarf2.c to the project
2109
2110 2005-04-09 Borut Razem <borut.razem AT siol.net>
2111
2112         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2113
2114 2005-04-08 Raphael Neider <rneider AT web.de>
2115
2116         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2117           into the chain after a given one) and mergeDefmapSymbols (combine
2118           defmap entries for each symbol per pcode)
2119         * (createDefmap): have defmap entries merged in the end
2120         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2121           a symbol before replacing one access type's symbol, merge symbols in
2122           the end (replacement symbol might already have an entry)
2123         * (assignValnums): keep reference to written WREG intact
2124
2125 2005-04-08 Raphael Neider <rneider AT web.de>
2126
2127         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2128           Alpha)
2129
2130 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2131
2132         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2133         bytes
2134
2135 2005-04-07 Raphael Neider <rneider AT web.de>
2136
2137         * device/include/pic16/usart.h: added compatibility defines for
2138           devices with more than one USART
2139         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2140
2141 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2142
2143         * device/lib/Makefile.in: updated for port specific include
2144
2145 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2146
2147         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2148
2149 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2150
2151         * device/include/8051.h,
2152         * device/include/8052.h,
2153         * device/include/at89S8252.h,
2154         * device/include/at89c55.h,
2155         * device/include/at89x051.h,
2156         * device/include/at89x51.h,
2157         * device/include/at89x52.h,
2158         * device/include/mcs51reg.h,
2159         * device/include/reg51.h,
2160         * device/include/reg764.h,
2161         * device/include/regc515c.h,
2162         * device/include/sab80515.h: (re)moved these 12 files
2163         * device/include/mcs51/8051.h,
2164         * device/include/mcs51/8052.h,
2165         * device/include/mcs51/at89S8252.h,
2166         * device/include/mcs51/at89c55.h,
2167         * device/include/mcs51/at89x051.h,
2168         * device/include/mcs51/at89x51.h,
2169         * device/include/mcs51/at89x52.h,
2170         * device/include/mcs51/mcs51reg.h,
2171         * device/include/mcs51/reg51.h,
2172         * device/include/mcs51/reg764.h,
2173         * device/include/mcs51/regc515c.h,
2174         * device/include/mcs51/sab80515.h: and added them here
2175
2176 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2177
2178         * device/include/stdarg.h: changed SDCC specific keywords to double
2179           underlined form.
2180         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2181           mcs51 and ds390.
2182         * device/include/hc08/mc68hc908gp32.h,
2183         * device/include/hc08/mc68hc908jb8.h,
2184         * device/include/hc08/mc68hc908jkjl.h,
2185         * device/include/hc08/mc68hc908qy.h: fixed comments
2186         * device/include/mcs51/README: updated
2187         * device/include/mcs51/c8051f120.h: added PINRSF
2188         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2189         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2190           amidst code. Also inline is not supported.
2191
2192 2005-04-06 Raphael Neider <rneider AT web.de>
2193
2194         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2195         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2196           callers stack/frame pointers
2197
2198 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2199
2200         * device/include/pic16/usart.h: added, missing in previous commit,
2201         * device/include/pic16/adc.h: fixed typo,
2202         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2203         commit,
2204         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2205         <p18fxxx.inc>
2206         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2207         uninitialized because a bug appears with gplink
2208         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2209         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2210         complains for unrecognised option
2211
2212 2005-04-05 Raphael Neider <rneider AT web.de>
2213
2214         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2215           structs as well (using memcpy)
2216         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2217           on ISRs (GOTO has no label)
2218         * src/pic16/device.h: added OF_OPTIMIZE_DF
2219         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2220           new data flow analysis/optimization
2221         * src/pic16/pcode.c: added (prototypes for and implementation of)
2222           dataflow analysis functions, fixed pCodeInstructions' inCond and
2223           outCond values, made RCALL a branch instruction
2224         * (pic16_unlinkpCode): keep C line if possible
2225         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2226           C line moved if possible
2227         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2228         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2229           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2230         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2231           new flow)
2232         * (pic16_getJumptabpCode): NEW, needed in...
2233         * (LinkFlow): fixed handling of jumptables, calls and conditional
2234           branches
2235         * (pic16_InsertCommentAfter): NEW
2236         * (pic16_pCodeReplace): made verbose and flow preserving
2237         * (AnalyzeFlow): added call to data flow analysis
2238         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2239         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2240         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2241
2242 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2243
2244         * src/SDCCast.c (decorateType): fixed bug #1105626
2245
2246 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2247
2248         * device/include/asm/pic16/features.h,
2249         * pic18f*.h headers,
2250         * device/include/pic16/adc.h,
2251         * device/include/pic16/delay.h,
2252         * device/include/pic16/i2c.h,
2253         * device/include/pic16/malloc.h,
2254         * device/include/pic16/stdio.h,
2255         * device/include/pic16/stdlib.h,
2256         * device/include/pic16/string.h,
2257         * device/lib/pic16/libc/stdio/printf_tiny.c,
2258         * device/lib/pic16/libc/stdio/printf_small.c,
2259         * device/lib/pic16/libc/stdio/strmgpsim.c,
2260         * device/lib/pic16/libc/stdio/strmmssp.c,
2261         * device/lib/pic16/libc/stdio/strmusart.c,
2262         * device/lib/pic16/libc/stdio/vfprintf.c,
2263         * device/lib/pic16/libc/stdlib/ltoa.c,
2264         * device/lib/pic16/libc/stdlib/putchar.c,
2265         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2266         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2267         * device/lib/pic16/libc/stdlib/memchrram.c,
2268         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2269         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2270         * device/lib/pic16/libio/adc/adcbusy.c,
2271         * device/lib/pic16/libio/adc/adcread.c,
2272         * device/lib/pic16/libio/adc/adcsetch.c,
2273         * device/lib/pic16/libio/usart/ubaud.c,
2274         * device/lib/pic16/libio/usart/ubusy.c,
2275         * device/lib/pic16/libio/usart/udrdy.c,
2276         * device/lib/pic16/libio/usart/uopen.c,
2277         * device/lib/pic16/libio/usart/uputc.c,
2278         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2279         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2280         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2281         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2282         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2283         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2284         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2285         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2286         specific keywords to double underlined form,
2287         * device/lib/pic16/libc/Makefile.rules,
2288         * device/lib/pic16/libsdcc/Makefile.rules,
2289         * device/lib/pic16/libm/Makefile,
2290         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2291         to compile with C standard set in Makefile.common
2292         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2293         rand.c and crc.c in compilation process,
2294         * device/lib/pic16/libsdcc/int/divuint.c,
2295         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2296         `c' from signed to unsigned,
2297         * device/lib/pic16/startup/crt0.c,
2298         * device/lib/pic16/startup/crt0i.c,
2299         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2300         keywords to double underlined form, bug fixes in _do_cinit function
2301         which prevented the correct initialization of the .idata segment,
2302         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2303         core to enter a infinite loop
2304         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2305
2306 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2307
2308         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2309
2310 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2311
2312         * device/include/Makefile.in: add support for hc08 subdirectory
2313         * device/include/hc08/: new subdirectory
2314         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2315         Lucas Loizaga, thanks!
2316         * device/include/hc08/mc68hc908qy.h,
2317         * device/include/hc08/mc68hc908gp32.h,
2318         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2319         their own directory. Changed internal macro names to use the compiler
2320         reserved namespace. Changed SDCC specific keywords to double
2321         underlined form.
2322         * device/include/math.h,
2323         * device/include/malloc.h,
2324         * device/include/stdarg.h,
2325         * device/include/stdbool.h
2326         * device/include/string.h,
2327         * device/include/tinibios.h,
2328         * device/include/ds400rom.h,
2329         * device/include/8051.h,
2330         * device/include/8052.h,
2331         * device/include/80c51xa.h,
2332         * device/include/at89c55.h,
2333         * device/include/at89S8252.h,
2334         * device/include/at89x51.h,
2335         * device/include/at89x52.h,
2336         * device/include/ds80c390.h,
2337         * device/include/reg764.h,
2338         * device/include/regc515c.h,
2339         * device/include/sab80515.h,
2340         * device/include/mcs51/c8051f000.h,
2341         * device/include/mcs51/c8051f018.h,
2342         * device/include/mcs51/c8051f020.h,
2343         * device/include/mcs51/c8051f040.h,
2344         * device/include/mcs51/c8051f060.h,
2345         * device/include/mcs51/c8051f120.h,
2346         * device/include/mcs51/c8051f300.h,
2347         * device/include/mcs51/c8051f310.h,
2348         * device/include/mcs51/c8051f320.h,
2349         * device/include/mcs51/c8051f330.h,
2350         * device/include/mcs51/c8051f350.h,
2351         * device/include/z180.h: Changed SDCC specific keywords to double
2352         underlined form.
2353
2354 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2355
2356         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2357         18F4455,
2358         * (pic16_assignConfigWordValue): disable testing of configuration
2359         register value with config mask,
2360         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2361         function with port->fun_prefix,
2362         * (genFunction): when generating a naked interrupt function never
2363         create an absolute segment placed in interrupt vector address, place
2364         the actual interrupt function at IVA instead, when an interrupt
2365         function is generated with unspecified interrupt then do not create
2366         the absolute section,
2367         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2368         code for generating a call to generic pointer get/put function with
2369         a call to function pic16_callGenericPointer(),
2370         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2371         the call to the generic pointer get/put functions with prefixing the
2372         function name with port->fun_prefix,
2373         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2374         * src/pic16/main.c (_process_pragma): prefix function with
2375         port->fun_prefix,
2376         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2377         calling assembler, old 18Fxxxx macro is deprecated,
2378         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2379         PC_ASMDIR in while condition,
2380         * (findInstruction): add PC_ASMDIR in while condition,
2381         * (buildCallTree): prefix main with port->fun_prefix,
2382         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2383         identifier for variable with banked access in instructions BTFSS,
2384         BTFSC, BCF, BSF, BTG
2385         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2386         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2387         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2388         perform optimization when enviroment variable NO_REG_OPT is set,
2389         * (insideLRBlock): NEW, return 1 if register is inside an
2390         INF_LOCALREGS block,
2391         * (RemoveRegFromLRBlock): remove a register that is completely
2392         eliminated by register optimization, but it is still left in local
2393         register store/restore in/from stack block,
2394         * (Remove2pcodes): after removing register, check to see if it
2395         should be removed from local register store/restore in/from stack
2396         block,
2397         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2398         DUMMY_READ_VOLATILE,
2399
2400         * device/include/pic16/adc.h: minor prototype modifications and
2401         update,
2402         * device/include/pic16/malloc.h: added GPL notice various
2403         modifications,
2404         * device/include/pic16/stdint.h: NEW, standard header for ints
2405         * device/include/pic16/delay.h: NEW, header for delay functions,
2406         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2407         delay1mtcy,
2408         * device/include/pic16/signal.h: NEW, header providing helper macros
2409         for implementing signal handlers,
2410         * device/include/pic16/stdio.h: added prototypes for functions,
2411         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2412         prototypes for stdin and stdout, added macro PUTCHAR to
2413         automatically implement putchar function prototype,
2414         * device/include/pic16/usart.h: modified and updated USART library,
2415         * device/lib/pic16/libio/adc/,
2416         * device/lib/pic16/libio/i2c: some modifications to improve library
2417         performance,
2418         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2419         family of functions,
2420         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2421         family of functions and other sources,
2422         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2423         of the PIC18Fxx[28] devices,
2424         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2425         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2426         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2427         _do_cinit function, because the previous failed when local variables
2428         where not placed in the same memory bank,
2429         * device/lib/pic16/libsdcc/char/: various modifications to improve
2430         library performance,
2431         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2432         information on the new functions of the c library and more...
2433
2434 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2435
2436         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2437
2438 2005-03-26 Raphael Neider <rneider AT web.de>
2439
2440         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2441           if condition == CARRY)
2442         * (genCmp): adapted to new genSkipc semantics
2443         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2444           on rIfx (genCmp was broken)
2445
2446 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2447
2448         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2449         * src/z80/main.c (_keywords[]),
2450         * src/SDCCglobal.h (struct options),
2451         * src/SDCC.y,
2452         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2453         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2454         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2455         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2456         always available in leading double underscore form. The C99 support is
2457         mostly missing, but it's a start.
2458         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2459         reserved identifier "__data".
2460
2461 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2462
2463         * src/mcs51/peeph.def: fixed bug 1170013
2464
2465 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2466
2467         * device/include/mcs51reg.h: fixed bug 842007
2468
2469 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2470
2471         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2472         last time.
2473
2474 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2475
2476         * src/port.h (struct PORT),
2477         * src/avr/ralloc.c (avr_assignRegisters),
2478         * src/avr/main.c,
2479         * src/ds390/ralloc.c (ds390_assignRegisters),
2480         * src/ds390/main.c,
2481         * src/hc08/ralloc.c (hc08_assignRegisters),
2482         * src/hc08/main.c,
2483         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2484         * src/mcs51/main.c,
2485         * src/pic/ralloc.c (pic14_assignRegisters),
2486         * src/pic/main.c,
2487         * src/pic16/ralloc.c (pic16_assignRegisters),
2488         * src/pic16/main.c,
2489         * src/xa51/ralloc.c (xa51_assignRegisters),
2490         * src/xa51/main.c,
2491         * src/z80/ralloc.c (z80_assignRegisters),
2492         * src/z80/ralloc.h,
2493         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2494         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2495         * src/SDCCcse.h,
2496         * src/SDCCdflow.c (computeDataFlow),
2497         * src/SDCCdflow.h,
2498         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2499         * src/SDCCloop.h,
2500         * src/SDCCcflow.c (*),
2501         * src/SDCCcflow.h,
2502         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2503         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2504         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2505         immedDom() returning wrong block; probably fixes bug #1160833)
2506
2507 2005-03-20 Borut Razem <borut.razem AT siol.net>
2508
2509         * support/scripts/inc2h.pl: WIN32 port
2510
2511 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2512
2513         * device/lib/makefile.in: added abs.c and labs.c
2514
2515 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2516
2517         * device/include/stdint.h: added
2518         * device/lib/abs.c: added
2519         * device/lib/labs.c: added
2520         * device/include/stdlib.h: added abs() and labs() prototypes
2521         * device/lib/libsdcc.lib: added abs and labs
2522         * device/include/float.h,
2523         * device/lib/_fsmul.c,
2524         * device/lib/printf_fast.c,
2525         * device/lib/printf_tiny.c: updated comments
2526
2527 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2528
2529         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2530         bug #1164313
2531
2532 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2533
2534         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2535         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2536
2537 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2538
2539         * device/lib/printf_large.c: removed inline assembly for portability and
2540           readability. Use printf_fast if speed or size are more important.
2541         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2542         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2543
2544 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2545
2546         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2547         prevent compiler warning
2548
2549 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2550
2551         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2552         moved to level 0 and declared as static. Also they are explicit
2553         placed in access bank. This was necessery because some times they
2554         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2555         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2556         optimizations. Currently only compare to unsigned char is implemented,
2557         * src/pic16/gen.c: added fReturnIdx array,
2558         * (struct resolvedIfx) is moved to gen.h and made public,
2559         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2560         * (aopForSym): added an optimization to directly store in stack of
2561         the operand of a SEND iCode,
2562         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2563         but as registers instead (AOP_REG) using the fReturnIdx array,
2564         * (pic16_freeAsmop): remove the freed register from the
2565         _G.sregsAlloc field,
2566         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2567         a compare of 'WREG',
2568         * (pic16_popGetTempRegCond): changed function prototype, now
2569         function takes also a bitVector argument v which holds the current
2570         set of registers that are allocated for stack access by aopForSym,
2571         registers allocated in aopForSym for accessing stack symbols are not
2572         any more part of the functions usedRegs field,
2573         * (genCall): some times aopOp is called for a stack variable to be
2574         send, aopForSym might perform the push, if this is true make sure
2575         that genCall doesn't push the variable twice by testing _G.resDirect,
2576         * (genFunction): changed testing for unspecified interrupt number
2577         from 256 to INTNO_UNSPEC,
2578         * modified selection scheme of frame pointer generation. Previously
2579         if function did use local registers a frame pointer was generated,
2580         now a frame pointer is generated only if function has arguments
2581         (that need PLUSW2 register access), or has stack arguments, or the
2582         compiler is not instructed to omit the frame pointer,
2583         * (genEndFunction): before restoring local registers that were saved
2584         in the function preamble, also restore the registers that *might*
2585         have been allocated for stack access,
2586         * (genRet): removed some old comments,
2587         * (genCmp, the active (RN's) version): added a call to the
2588         pic16_genCmp_special function to perform the compare with a more
2589         robust and optimized way,
2590         * (genInline): a feature has been added in inline code generation,
2591         which allows a wildcard variable substitution when writing inline
2592         assembly. Code is incomplete and experimental therefore undocumented,
2593         * (genCast): changed order of aopOp for result and right to allow
2594         aopForSym to directly load the result if possible,
2595         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2596         perform an optimized compare on some selected special occasions,
2597         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2598         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2599         generate an IVT any more,
2600         * src/pic16/main.c (pic16_optionsTable): added command line option
2601         --optimize-cmp,
2602         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2603         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2604         macros,
2605         * src/pic16/NOTES: Raphael Neider added in list of active developers
2606         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2607         jumptable_end to prevent bug #,
2608         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2609         inCond and outCond fields,
2610         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2611         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2612         turn off register spilling,
2613         * (packRegsForOneUse): synced with other ports' versions although it
2614         is not used currently,
2615         * (pic16_packRegisters): added an optimization while reading
2616         structure bitfields, some registers may be saved (malloc code is
2617         decreased by 80 bytes)
2618
2619 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2620
2621         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2622         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2623         this can be optimized more?
2624
2625 2005-03-10 Raphael Neider <rneider AT web.de>
2626
2627         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2628           genNearPointerGet): (hopefully) fixed access to bitfields via
2629           pointers (p->bitN = x; and x = p->bitN; failed)
2630
2631 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2632
2633         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2634
2635 2005-03-09 Raphael Neider <rneider AT web.de>
2636
2637         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2638
2639 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2640
2641         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2642         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2643           (regTypeNum): set REG_BIT type if necessary
2644         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2645         * support/regression/tests/critical.c: check bug 1144613
2646
2647 2005-03-02 Raphael Neider <rneider AT web.de>
2648
2649         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2650
2651 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2652
2653         * src/avr/ralloc.c (serialRegAssign),
2654         * src/ds390/ralloc.c (serialRegAssign),
2655         * src/hc08/ralloc.c (serialRegAssign),
2656         * src/mcs51/ralloc.c (serialRegAssign),
2657         * src/pic/ralloc.c (serialRegAssign),
2658         * src/pic16/ralloc.c (serialRegAssign),
2659         * src/xa51/ralloc.c (serialRegAssign),
2660         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2661
2662 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2663
2664         * src/SDCCast.c (decorateType): fixed bug 1124787
2665
2666 2005-02-20 Hubert Sack <sack AT digiplan.de>
2667         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2668
2669         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2670         patch #1121755
2671
2672 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2673
2674         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2675         to keep the correct label reference count when adding/removing references
2676         to labels. A peephole file using this is appended to patch #1144962.
2677
2678 2005-02-14 Raphael Neider <rneider AT web.de>
2679
2680         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2681         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2682         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2683           retrievals of result operand's value on assignment
2684
2685 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2686
2687         * device/include/pic16/string.h: modified prototype for memccpy()
2688         to memccpy(void *, void *, char, size_t)
2689         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2690         check whether to omit frame pointer or not,
2691         * (genInline): convert all occurences of "\n" to LF in inline
2692         assembler blocks, this helps formatting the inline text,
2693         * (pic16_loadFSR0): modified prototype,
2694         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2695         removed some 8051 legacy code,
2696         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2697         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2698         before allocating temporary registers in functions,
2699
2700 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2701
2702         * support/regression/tests/bitvars.c: corrected the "fix"
2703
2704 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2705
2706         * support/regression/tests/bitvars.c,
2707         * support/regression/tests/bitwise.c,
2708         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2709
2710 2005-02-10 Raphael Neider <rneider AT web.de>
2711
2712         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2713           different size for Alpha
2714         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2715
2716 2005-02-09 Raphael Neider <rneider AT web.de>
2717
2718         * src/SDCC.lex(doPragma) : save and restore warning options as well
2719           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2720         * have #pragma less_pedantic set the errorlevel to WARNING
2721           (fixes #1117001)
2722         * (cloneOptimize) : fixed wrong malloc's size
2723         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2724           facilitate correct handling of #pragma (save|restore)
2725
2726 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2727
2728         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2729
2730 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2731
2732         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2733
2734 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2735
2736         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2737
2738 2005-02-02 Raphael Neider <rneider AT web.de>
2739
2740         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2741         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2742         * (pic16_storeForReturn): fixed to allow returning function pointers
2743         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2744         * device/include/pic16/{stddef.h,stdbool.h}: added
2745
2746 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2747
2748         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2749
2750 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2751
2752         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2753         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2754          appeared to be required
2755
2756 2005-01-31 Borut Razem <borut.razem AT siol.net>
2757
2758         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2759           include/mcs51 and include/z80 directories to the package
2760
2761 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2762
2763         * src/hc08/gen.c (genFunction): fixed bug #1112752
2764
2765 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2766
2767         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2768
2769 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2770
2771         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2772
2773 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2774
2775         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2776
2777 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2778
2779         * device/include/c8051fxxx.h: removed these 6 files
2780         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2781
2782 2005-01-26 Raphael Neider <rneider AT web.de>
2783
2784         * src/pic16/gen.c (genAssign): fixed assignment from longs
2785           in codespace (were cut to three bytes)
2786         * (genDummyRead): implemented (except for CODESPACE...),
2787           fixed bug #1108575
2788         * src/pic16/glue.c (emitStatistics): beautified
2789         * device/lib/pic16/libm/Makefile: added include path
2790
2791 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2792
2793         * src/z80/gen.c (aopPut): fixed bug #1103902
2794
2795 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2796
2797         * device/lib/expf.c: fixed bug #1095792
2798
2799 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2800
2801         * device/lib/pic16/libm: added Math library sources
2802
2803 2005-01-24 Raphael Neider <rneider AT web.de>
2804
2805         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2806           to enable upcast to pCodeOpReg2 (there is no type tag to
2807           differenciate the two and pic16_popGet2p cast into PCOR2)
2808         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2809           (sizeof(sectNames) changed to sizeof(sectName))
2810           Both patches fix segfaults under MinGW.
2811
2812 2005-01-23 Raphael Neider <rneider AT web.de>
2813
2814         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2815           Safe_[mc]?alloc()'ed variables
2816         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2817           of (byte sized) temporaries (assign them to WREG for now)
2818         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2819           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2820           this might fix SIGSEGVs on MinGW...
2821         * src/SDCCopt.c (killDeadCode): restored original behaviour
2822           (volatile operands might get thrown away though)
2823
2824 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2825
2826         * src/pic16/gen.c: fixed bug #1106975,
2827         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2828         pointer update, INTCON is saved, global interrupts are disabled and
2829         restored after updateing TOS.
2830         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2831         * added function attribute 'shadowregs' to take advantage of shadow
2832         registers,
2833         * added function attribute 'wparam' as an alternative to the wparam
2834         pragma,
2835         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2836         user declares a non-ISR function as 'shadowregs',
2837         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2838
2839 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2840
2841         * .version: bumped version number to 2.4.8
2842         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2843         pic16 port,
2844         * device/lib/pic16/libio/i2c/: I2C module support library,
2845         * device/include/pic16/i2c.h: I2C support library header,
2846         * device/lib/pic16/libc/stdio/: standard IO support sources,
2847         * (printf_small.c): printf_small() source, supports float print,
2848         * (printf_tiny.c): printf_tiny() source, does not support floats,
2849         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2850         enable global optimizations for entire library source, other
2851         Makefiles in the source tree are also modified to reflect this,
2852         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2853         function,
2854         * doc/sdccman.lyx: updated to reflect new changes,
2855         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2856         sym->onStack if-case,
2857         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2858         sbit, idata, _idata, xdata, _xdata,
2859         * added pragma library, to link an external library, (see doc),
2860         * removed command line options, --pomit-config-words, --pomit-ivt,
2861         --pleave-reset-vector,
2862         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2863         when calling assembler to reflect memory model used, also define
2864         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2865         reflect stack model used,
2866         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2867         on stack return NULL,
2868
2869 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2870
2871         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2872           of the operands is volatile. Fixes #1020220
2873
2874 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2875
2876         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2877         * (OptimizeRegUsage): make sure that there is really no other flow where
2878           the first pCode is used
2879
2880 2005-01-22 Raphael Neider <rneider AT web.de>
2881
2882         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2883           to fix #1106967 (pCode->seq are not set up correctly)
2884
2885 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2886
2887         * src/SDCCglue.c (glue): make sure code area is declared before the
2888         static initialization area.
2889
2890 2005-01-21 Raphael Neider <rneider AT web.de>
2891
2892         * device/lib/Makefile.in: fixed test for pic16 install dir
2893         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2894           optimizations
2895         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2896           added --optimize-goto compiler switch and pragma wparam documentation
2897         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2898         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2899           and PRODH closing bug #1071770 (peephole optimizer)
2900
2901 2005-01-19 Raphael Neider <rneider AT web.de>
2902
2903         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2904           cmdLine buffers (used when calling sdcpp...) are large enough
2905           (MAX_PATH=256 truncates arguments leading to system halts when
2906           used in MinGW...)
2907         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2908         * (genUminus): rewritten to for efficiency
2909         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2910           used uninitialized in some cases)
2911         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2912           copy the third byte from the int -- now assumes 0x80 (data memory)
2913         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2914           operands (genAddLit expects the iCode's operands to swapped as
2915           well), fixed leftover bytes (crashed for short left operands)
2916         * (pic16_genMinusDec): performance improvements, removed false
2917           PIC14 emitSKPNCs
2918         * (pic16_genMinus): fixed to cope with differently sized operands
2919         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2920           for --obanksel > 1
2921         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2922         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2923           new banksel optimization
2924         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2925           analysis for temporary registers (segfaults...)
2926         * src/pic16/peeph.def: added rule
2927
2928 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2929
2930         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2931         which converts a float number to its ASCII representation
2932         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2933         functions to convert the fractional and integer part of a float to ASCII,
2934         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2935         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2936         ram
2937         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2938         _STATMEM macros,
2939         * device/include/pic16/adc.h: added GPL info,
2940         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2941         a pCodeOp as tested operand,
2942         * (genNearPointerGet): optimized bit testing, does not use
2943         intermediate register for bit value, test directly instead with
2944         BTFSS, BTFSC, works only for single bits,
2945         * (genpic16Code): dump the name of the iCode in the asm,
2946         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2947         renamed to pic16_decodeOp,
2948         * (serialRegAssign): do not allocate a temporary register for iCode
2949         sequences that test a single bit for 1/0
2950
2951 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2952
2953         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2954         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2955         access stack and frame pointers. They are initially assigned to
2956         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2957         accessing SFRs. Updated all occurences of modification of stack or
2958         frame pointer in gen.c and pcode.c,
2959         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2960         assigning of a literal value to pointers,
2961         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2962         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2963         selected
2964
2965 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2966
2967         * doc/sdccman.lyx: update documentation about stack pragma, added
2968         some info for stack memory models
2969
2970 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2971
2972         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2973
2974 2005-01-08 Raphael Neider <rneider AT web.de>
2975
2976         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2977           udata sections to fix bug #1097823
2978
2979 2005-01-05 Raphael Neider <rneider AT web.de>
2980
2981         * src/pic16/gen.c (genGenericShift): added handling of differently
2982           sized left operand and result
2983
2984 2005-01-04 Raphael Neider <rneider AT web.de>
2985
2986         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2987         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2988           to hold the condition bit)
2989         * added new version of genCmp (old code available via #define)
2990         * added new version of genShiftLeft/genShiftRight in a generic
2991           way, now supports shifting by negative values
2992         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2993           shiftCount (expected by genGenericShift)
2994         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2995         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2996           dump
2997         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2998           is an invalid literal too...)
2999
3000 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3001
3002         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3003         from Raphael Neider,
3004         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3005         for 8-bit literals. This fixes some literal operands which are sign
3006         extended to 16-bits ints when instruction needs only 8-bits.
3007
3008 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3009
3010         * device/lib/logf.c: added mcs51 assembly version
3011         * device/lib/expf.c: added mcs51 assembly version
3012         * device/lib/_logexpf.c: new shared asm code for expf and logf
3013         * device/include/math.h: add defines for assembly math library
3014         * device/lib/Makefile.in: build new _logexpf.c
3015         * device/lib/libfloat.lib: use new _logexpf.c
3016
3017 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3018
3019         * src/pic/device.c
3020         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3021           device types which have less than 0x7f registers.
3022
3023 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3024
3025         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3026
3027 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3028
3029         * device/lib/printf_fast.c: only build on supported arch.
3030         * device/lib/printf_tiny.c: only build on supported arch.
3031         * device/lib/printf_fast_f.c: only build if asm float lib
3032         * device/lib/_fsget1arg.c: only build if asm float lib
3033         * device/lib/_fsget2args.c: only build if asm float lib
3034         * device/lib/_fsnormalize.c: only build if asm float lib
3035         * device/lib/_fsreturnval.c: only build if asm float lib
3036         * device/lib/_fsrshift.c: only build if asm float lib
3037         * device/lib/_fsswapargs.c: only build if asm float lib
3038         * device/include/stdio.h: don't provide print_fast,
3039           print_fast_f, print_tiny prototypes if --xstack used
3040
3041 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3042
3043         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3044         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3045           to the SOURCES
3046
3047 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3048
3049         * device/lib/printf_fast_f.c: same as printf_fast, but
3050           with floating point enabled
3051         * device/lib/printf_fast.c: minor tweaks
3052         * device/include/stdio.h: add printf_fast_f
3053
3054 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3055
3056         * src/SDCCmain.c: make --float-reent default for mcs51
3057         * device/lib/_fsadd.c: added mcs51 assembly version
3058         * device/lib/_fssub.c: added mcs51 assembly version
3059         * device/lib/_fsmul.c: added mcs51 assembly version
3060         * device/lib/_fsdiv.c: added mcs51 assembly version
3061         * device/lib/_fseq.c: added mcs51 assembly version
3062         * device/lib/_fsneq.c: added mcs51 assembly version
3063         * device/lib/_fsgt.c: added mcs51 assembly version
3064         * device/lib/_fslt.c: added mcs51 assembly version
3065         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3066         * device/lib/Makefile.in: add _fscmp to build
3067         * device/lib/libfloat.lib: add _fscmp to build
3068
3069 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3070
3071         * device/lib/_fs2slong.c: added mcs51 assembly version
3072         * device/lib/_fs2sint.c: added mcs51 assembly version
3073         * device/lib/_fs2schar.c: added mcs51 assembly version
3074         * device/lib/_fs2ulong.c: added mcs51 assembly version
3075         * device/lib/_fs2uint.c: added mcs51 assembly version
3076         * device/lib/_fs2uchar.c: added mcs51 assembly version
3077         * device/lib/_slong2fs.c: added mcs51 assembly version
3078         * device/lib/_sint2fs.c: added mcs51 assembly version
3079         * device/lib/_schar2fs.c: added mcs51 assembly version
3080         * device/lib/_ulong2fs.c: added mcs51 assembly version
3081         * device/lib/_uint2fs.c: added mcs51 assembly version
3082         * device/lib/_uchar2fs.c: added mcs51 assembly version
3083         * device/include/float.h: added #define to select asm vs c
3084
3085 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3086
3087         * device/lib/printf_fast.c: improvements to float output
3088         * device/include/float.h: add defines for assembly float library
3089         * device/lib/_fsget1arg.c: receive 1 float arg
3090         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3091         * device/lib/_fsnormalize.c: normalize a float
3092         * device/lib/_fsreturnval.c: return float, various helper routines
3093         * device/lib/_fsrshift.c: right shift a float's mantissa
3094         * device/lib/_fsswapargs.c: swap 2 floats
3095         * device/lib/Makefile.in: build these 6 new files for mcs51
3096         * device/lib/libfloat.lib: add these 6 files to the library
3097
3098 2004-12-26 Borut Razem <borut.razem AT siol.net>
3099
3100         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3101           built by gcc 3.4.2
3102
3103 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3104
3105         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3106           and fully reentrant and register bank neutral.
3107         * device/lib/printf_fast.c: added float (not enabled by default),
3108           added compact/slower integer (also not enabled by default),
3109           improved size/speed of fast integer code, other minor changes
3110         * device/include/stdio.h, device/lib/Makefile.in,
3111           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3112
3113 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3114
3115         * src/pic16/pcode.c: declaring variables other than at the start of a
3116           block is not supported in C by VC6.
3117
3118 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3119
3120         * applied a previous patch from Raphael Neider that wasn't included
3121         in the previous commits, which fixes infinite loops within jumptable
3122         improvements,
3123         * made some fixes that previous patches introduced
3124
3125 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3126
3127         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3128         that fixes an issue with AOP_PCODE asmop's offset,
3129         * (pic16_popCopyReg): update instance field too,
3130         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3131         function of pic port,
3132         * (genCmp, genAnd, genAssign),
3133         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3134
3135 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3136
3137         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3138         variables initial values to idata section,
3139         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3140         variables in some functions. This utilizes parmBytes field of iCode
3141         structure to hold the offset of the variable in stack. (might be
3142         able to use the stack field too?)
3143         * applied patch from Raphael Neider # ### , # ###
3144         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3145         variable initial values in idata section,
3146         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3147         for static variables with initial value
3148         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3149         applied fix in while loop from Raphael Neider.
3150
3151 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3152
3153         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3154         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3155         * src/ds390/ralloc.c (serialRegAssign): spill bits
3156         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3157         * support/Util/SDCCerr.c,
3158         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3159         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3160         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3161
3162 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3163
3164         * device/include/sdcc-lib.h: inserted LGPL, added includes
3165           asm/ds390/features.h and asm/mcs51/features.h
3166         * device/include/asm/default/features.h,
3167         * device/include/asm/gbz80/features.h,
3168         * device/include/asm/z80/features.h: added empty _AUTOMEM
3169           and _STATMEM
3170         * device/include/asm/ds390/features.h,
3171         * device/include/asm/mcs51/features.h: added files with defines for
3172           _AUTOMEM and _STATMEM indicating automatic and static storage class
3173         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3174         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3175         * src/SDCCicode.c (geniCodeCast),
3176         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3177         * src/SDCCloop.c (loopInduction): removed unused variable lr
3178         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3179           to convertToFcall to include char modulo (RFE 1065037), added check
3180           if left operand is unsigned and use abs of literal value
3181         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3182           as it doesn't work after conversion from peephole.def to peephole.rul
3183         * src/mcs51/gen.c (toBoolean): added check for size,
3184           (genModOneByte): optimized code for signed char modulo a literal
3185           power of 2 (thanks to Hubert Sack),
3186           (genRRC): removed unnecessary "clr c",
3187           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3188         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3189           jump optimization,
3190           swapped rules 256.c and 256.d,
3191           extended 256.d by using new multiple checks (thanks Erik),
3192           added rules 256.e and 256.f,
3193           updated rule 261.a and 261.b to new generated code
3194         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3195
3196 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3197
3198         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3199           induction related bugs, including first part of bug #1074377
3200
3201 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3202
3203         * applied patch from bug-report #1076292,
3204         * applied patches for genAnd and Goto-optimizations for Raphael
3205         Neider,
3206         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3207         dump a less iCode information,
3208         * src/pic16/device.h (pic16_options_t): added field debgen,
3209         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3210         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3211         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3212         puclic,
3213         * (various functions): added macros FENTRY and FENTRY2 to functions,
3214         to emit function prologue,
3215         * (various functions): fixed indentation,
3216         * (genNearPointerGet): fixed loading of FSR0,
3217         * (genPackBits): applied patch from Raphael Neider to fix updating
3218         of FSR0 and touching only the modified bits,
3219         * src/pic16/genarith.c (various functions): added macros FENTRY to
3220         emit function prologue in comments,
3221         * src/pic16/pcode.h: added functions debugf2, debugf3,
3222         * src/pic16/ralloc.c: partial fix for packForPush caused
3223         segmentation fault,
3224
3225 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3226
3227         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3228           <stsp AT users.sourceforge.net> with reversed byte order
3229         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3230
3231 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3232
3233         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3234           bug #1074377
3235         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3236         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3237
3238 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3239
3240         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3241
3242 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3243
3244         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3245           conditions,
3246           (setFromConditionArgs): friendly operand parser for peephole rules,
3247           (operandBaseName, operandsNotRelated): new peephole condition
3248           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3249           architecture specific register naming into account, handles n-way
3250           comparisons, and supports quoted literals
3251         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3252
3253 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3254
3255         * src/mcs51/peeph.def: fixed bug #1076940
3256
3257 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3258
3259         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3260
3261 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3262
3263         Adding support for replacing ljmps with sjmps in jumptables
3264         generated for switch statements. For now you need to set the
3265         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3266         Now 4 algorithms for mcs51 jumptable generation are used:
3267         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3268         addresses loaded pc-relative for up to 112 cases and stack-pushing
3269         target addresses loaded with offset from dptr for up to 256 cases.
3270
3271         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3272         * src/mcs51/main.c: adapted constants for switch table generation
3273         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3274
3275 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3276
3277         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3278         * support/regression/tests/bug1057979.c: added test for bug 1073386
3279
3280 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3281
3282         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3283         compilers
3284
3285 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3286
3287         * src/pic16/device.h,
3288         * src/pic16/genarith.c,
3289         * src/pic16/glue.c,
3290         * src/pic16/main.c,
3291         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3292
3293 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3294
3295         Large cummulative patch for pic16 port.
3296         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3297         to call when a stack overflow occurs,
3298         * (malloc.h): added CVS Id tag,
3299         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3300         variable,
3301         * added libc directory. The current version of LibC contains string
3302         functions, ctype functions and macros and some functions of the
3303         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3304         be extensively tested in the future. Standard disclaimer here.
3305         Library is not automatically build yet. But one can build it by
3306         invoking 'make' inside the libc directory.
3307         * added ADC library under libio. Preliminary version yet.
3308
3309         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3310         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3311         aopForRemat() now and not by pic16_aopOp(),
3312         * (pic16_popGetTempReg): removed warning messgae when allocating
3313         temporary registers, its a buggy feature and will be removed,
3314         * (pic16_popGet): set register instance field in AOP_CRY,
3315         * (pic16_outBitC): fixed for results in size greater than 1,
3316         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3317         * (pic16_storeForReturn): optimized return of 0,
3318         * (genCmp): experimental code for new genCmp which uses PIC18's
3319         special compare&skip instructions. Initial tests fail some times
3320         with variables grater than 1 byte in size, so new code is disabled,
3321         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3322         a single bit,
3323         * (genCast): began a fix to optimize the casting of a bit to another
3324         bit, now assigning a bitfield to another bitfield will fail, sorry,
3325         * src/pic16/main.c: disabled the use of lr-support feature,
3326         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3327         * added some function prototypes, added function _debugf prototype,
3328         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3329         bits with offset (case PO_GPR_BIT),
3330         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3331         command line,
3332         * (isBankInstruction): modified to return 0 for no banking instruction,
3333         and 1 for banking instruction,
3334         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3335         caused stop processing pCodes after a inline assembly block,
3336         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3337         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3338         registers when it shouldn't,
3339         * src/pic16/ralloc.c (allocReg): add preliminary support for
3340         supporting a limited set of temporary registers,
3341
3342 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3343
3344         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3345           genDataPointerSet): ensure assignments always copy in MSB to LSB
3346           order,
3347           (loadRegFromAop): recognize CLRH optimization,
3348           (genFunction): optimize RECEIVE iCodes in reentrant functions
3349
3350 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3351
3352         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3353           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3354           selected.
3355         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3356         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3357           contiguous with data
3358
3359 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3360
3361         * device/lib/_gptrget.c (_gptrget),
3362         * device/lib/_gptrgetc.c (_gptrgetc),
3363         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3364           instead of sjmp to ret
3365         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3366           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3367
3368 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3369
3370         * .version: bumped version to 2.4.7
3371         * device/lib/_gptrget.c (_gptrget): is now _naked
3372         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3373         * device/lib/_gptrput.c (_gptrput): is now _naked
3374         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3375           (createFunction): fixed xstack
3376         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3377         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3378           or bit either,
3379           (geniCodeCritical): store original interrupt state in an iTemp bit
3380           var unless stack-auto
3381         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3382         * src/SDCCmain.c (setIncludePath): added include/target to search path
3383         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3384         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3385           prototype,
3386           (processFuncArgs): put bit vars in bit area
3387         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3388           unsaveRBank): fixed xstack,
3389           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3390           (genFunction, genEndFunction): fixed xstack,
3391           (genAssign): optimization don't walk backwards through mem
3392         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3393         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3394         * support/regression/Makefile: also make library (for stack-auto) when
3395           making "all" and added "test-mcs51-xstack-auto"
3396         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3397         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3398         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3399         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3400         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3401           make-library by MAKE_LIBRARY
3402         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3403           regression tests for xstack
3404         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3405         * support/regression/tests/critical.c: test for critical on mcs51
3406
3407 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3408
3409         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3410           built version of sdcc instead of installed version
3411
3412 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3413
3414         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3415         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3416           vprintf.c now
3417         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3418         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3419           WARNING: remove device/lib/build/z80/printf.o by hand when
3420           updating from previous build!
3421         * device/lib/z80/printf.c: updated comment
3422         * support/regression/tests/bug1057979.c: test all ports now
3423         * support/regression/tests/bug1065458.c: file added
3424
3425 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3426
3427         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3428           *_start and *_end symbols for static functions
3429
3430 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3431
3432         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3433           and search crt0.o in all library paths,
3434           (setIncludePath): proper handling of --nostdinc,
3435           (setLibPath): proper handling of --nostdlib
3436         * support/regression/Makefile,
3437         * support/regression/ports/ds390/spec.mk,
3438         * support/regression/ports/gbz80/spec.mk,
3439         * support/regression/ports/hc08/spec.mk,
3440         * support/regression/ports/mcs51/spec.mk,
3441         * support/regression/ports/mcs51-large/spec.mk,
3442         * support/regression/ports/mcs51-stack-auto/spec.mk,
3443         * support/regression/ports/z80/spec.mk: use include and lib files from
3444           built version of sdcc instead of installed version
3445         * doc/sdccman.lyx: fixed typo in --nostdinc
3446
3447 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3448
3449         * src/pic/pcode.c,
3450         * src/pic/device.c,
3451         * src/pic/ralloc.c,
3452         * src/pic/gen.c : added support to generate code for struct bit fields.
3453
3454 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3455
3456         * as/xa51/xa_version.h,
3457         * device/include/errno.h,
3458         * device/include/regc515c.h,
3459         * device/lib/_itoa.c,
3460         * device/lib/_ltoa.c,
3461         * device/lib/ser_ir_cts_rts.c,
3462         * sim/ucsim/xa.src/glob.cc,
3463         * sim/ucsim/xa.src/inst_gen.cc,
3464         * sim/ucsim/xa.src/xa_bit.cc,
3465         * sim/ucsim/xa.src/xa_sfr.cc,
3466         * sim/ucsim/z80.src/inst_dd.cc,
3467         * sim/ucsim/z80.src/inst_fdcb.cc,
3468         * support/scripts/keil2sdcc.pl,
3469         * src/pic16/pic16.dsp,
3470         * src/pic16/pic16a.dsp: corrected cvs line endings
3471         * device/lib/printf_large.c: fixed bug 1057979
3472         * src/pic16/gen.c: fixed non-C standard code
3473         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3474         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3475         * support/regression/ports/mcs51/support.c: reload T1 asap
3476         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3477           pdata use and clear idata startup behaviour
3478         * support/regression/tests/bug1057979.c: added
3479
3480 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3481
3482         * device/examples/ds390/ow390/ad26.h,
3483         * device/examples/ds390/ow390/cnt1d.h,
3484         * device/examples/ds390/ow390/crcutil.c,
3485         * device/examples/ds390/ow390/ownet.h,
3486         * device/examples/ds390/ow390/owsesu.c,
3487         * device/examples/ds390/ow390/swt12.h,
3488         * device/examples/ds390/ow390/swtoper.c,
3489         * device/examples/ds390/ow390/temp10.h,
3490         * device/examples/ds390/ow390/thermodl.c,
3491         * device/examples/ds390/tinitalk/tinitalk.dsp,
3492         * device/examples/ds390/tinitalk/tinitalk.dsw,
3493         * device/examples/mcs51/clock/hw.h,
3494         * device/examples/mcs51/simple2/go.bat,
3495         * device/examples/serialcomm/windows/serial.h,
3496         * device/examples/xa51/dummy.c,
3497         * device/examples/xa51/hello.c,
3498         * device/include/80c51xa.h,
3499         * device/include/at89x051.h: corrected cvs line endings
3500
3501 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3502
3503         * src/pic16/main.c (options): added command line --gstack, to trace
3504         stack over/under flows,
3505         * added pragma 'wparam' to allow passing first byte of function
3506         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3507         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3508         call to __gstack_test function and sets up the symbol as extern,
3509         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3510         * popaop): added call to pic16_testStackOverflow,
3511         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3512         wparamList list,
3513         * (genCall, genPcall): now all parameters are passed via stack
3514         except in functions that are pass to wparam pragma in which WREG is
3515         used too,
3516         * (genPcall): REENTRANT flag is checked to see if variable prototype
3517         contains reentrant keyword, don't call a non-reentrant function, via
3518         a reentrant function pointer or vice versa, functions are never
3519         passed via WREG,
3520         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3521         D.Winkler,
3522         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3523         SIGSEGV when accessing a NULL register stucture,
3524         * (pic16_printGPointerType): modified to handle UPPER modifier for
3525         function initializers, changed prototype of function to simpler one,
3526         * (pic16_printIvalFuncPtr): check to see if function is already
3527         added in externs list,
3528         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3529         optimized a move from W to SFR with a move to the same register
3530         later after a CALL,
3531         * device/lib/pic16/debug: NEW directory, contains debug features
3532         which are enabled when linking with libdebug.lib, currently command
3533         line option --gstack enables stack pointer tracing for over/under
3534         flow, corresponding sources are in debug/gstack
3535
3536 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3537
3538         * doc/sdccman.lyx: updated SDCC version,
3539         * (PIC16 port): update list of command line options,
3540         * src/pic16/device.h (structure pic16_options_t): added field gstack
3541         to enable stack overflow tracing on push/pops,
3542         * src/pic16/device.c (statistics structure): added statistics
3543         structure,
3544         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3545         pic16_dump_int_registers): increase statistics counters for each
3546         * variable which is encountered
3547         * (pic16_dump_usection): emit each .udata variable to its own udata
3548         section,
3549         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3550         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3551         parameters via stack, otherwise use old scheme,
3552         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3553         assembler output file,
3554         * src/pic16/main.c: added command line options --gstack to enable
3555         push/pop tracing for stack overflow,
3556         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3557         instructions): added size of each instruction,
3558         * (pic16_countInstruction): estimate size of instructions in
3559         the_pFile list, inline assembly blocks are not counted,
3560         * (pic16_FixRegisterBanking): trace previous register usage, when
3561         banksel optimizations is greater than 0, don't emit a redudant
3562         banksel directive,
3563
3564 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3565
3566         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3567         * src/pic16/ralloc.c : applied same fix for pic16.
3568         * src/pic/gen.c : tidied it up a little.
3569
3570 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3571
3572         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3573         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3574
3575 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3576
3577         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3578
3579 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3580
3581         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3582         non-reentrant function __modsint in the interrupt function (thus
3583         corrupting math operations during serial I/O)
3584         * device/lib/ser_ir.c: as above, changed buffersize
3585         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3586         256.c,d for zeroing
3587         * doc/Makefile: added option -t for rsync
3588
3589 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3590
3591         * src/SDCCast.h (struct ast),
3592         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3593
3594 2004-10-20 Borut Razem <borut.razem AT siol.net>
3595
3596         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3597         package
3598
3599 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3600
3601         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3602         makefile targets,
3603         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3604         support functions to replace long sequences of MOVFF's from access
3605         bank registers to stack and vice versa,
3606         * src/pic16/device.h: added new field opt_flags, where optimization
3607         flags can be set to enable certain features,
3608         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3609         * pBlock, (genFunction, genEndFunction): surroung loop for
3610         saving/loading used registers in stack with PC_INFO pCodes,
3611         INF_LREGS. Code in between can then be optimized by pCode optimizer
3612         to support function calls,
3613         * (genDataPointerSet): fixed bug which loaded float fields in
3614         structures with corrupt data,
3615         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3616         in a standard way debug info on stderr. Feature used for developing
3617         and debugging only,
3618         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3619         obsolete chunks of code,
3620         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3621         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3622         * pic16/src/pcode.c (pic16_newpCodeInfo,
3623         * (pic16_newpCodeOpLocalRegs),
3624         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3625         feature,
3626         * (pic16_pCodeConstString): printing of the initial value of a
3627         symbol as a comment is inhibited since parsing was already done by
3628         copyStr and output is corrupt,
3629         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3630
3631 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3632
3633         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3634
3635 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3636
3637         * as/mcs51/lkarea.c: removed old K&R style,
3638           (lnksect): changed check on boundary error,
3639           (lnksect2): changed check on boundary error,
3640           (lnksect2): extend XSTK to end of page if size = 1
3641         * as/mcs51/lkmain.c: removed old K&R style,
3642           (Areas51): create l_IRAM symbol
3643         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3644         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3645           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3646         * device/lib/_mullong.c: added version to be compiled with xstack
3647         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3648         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3649         * device/lib/mcs51/crtxstack.asm: fixed comment
3650         * src/SDCCglue.c: maxInterrupts defaults to 0,
3651           (emitMaps): added pdata,
3652           (createInterruptVect): (re)moved default,
3653           (glue): added pdata,
3654           (glue): moved __start__xstack to XSTK with default size 1
3655         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3656           and options.float_rent when options.stackAuto is set,
3657           (linkEdit): only write XDATA_NAME if provided on command line
3658         * src/SDCCmem.h,
3659         * src/SDCCmem.c: added pdata
3660         * src/port.h: added pdata_name to PORT
3661         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3662           (saveRegisters, unsaveRegisters): removed usage of B,
3663           (genMinus): fixed accumulator clash,
3664           (genJumpTab): added comment, this needs another look
3665         * src/mcs51/gen.c: added check for "B in use" paranoia,
3666           added pushB() and popB()
3667         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3668           chance
3669         * src/avr/main.c,
3670         * src/ds390/main.c,
3671         * src/hc08/main.c,
3672         * src/mcs51/main.c,
3673         * src/pic/main.c,
3674         * src/pic16/main.c,
3675         * src/xa51/main.c,
3676         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3677           added PSEG (PAG,XDATA) or NULL to port specifier
3678         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3679         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3680           (_mcs51_genInitStartup): removed __start__xstack equ,
3681           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3682         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3683         * src/z80/gen.c (_rleAppend): fixed warnings
3684         * support/regression/tests/zeropad.c: added pdata test
3685         * .version: bumped to 2.4.6
3686
3687 2004-10-17 Borut Razem <borut.razem AT siol.net>
3688
3689         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3690         as a part of nightly build
3691
3692 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3693
3694         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3695         WREG holds the first byte function parameters,
3696         * (aopForSym): take special case for symbols which are in FARSPACE
3697         but in CODESPACE too,
3698         * (assignResultValue): modified to take into account _G.useWreg,
3699         * (genCall): don't use wreg for parameter passing when function is
3700         declared as reentrant, too, added optimization INCF to stack
3701         pointer when stack parameter count is 1,
3702         * (genFunction, genEndFunction): refurnished and fixed to not using
3703         wreg for passing parameters when function has varargs or is
3704         reentrant, fixed bug with symbol name compare for generating
3705         functions in absolute address,
3706         * (pic16_storeForReturn): refurnished,
3707         * (genCmp): began writing a new version of the function, not ready
3708         yet, therefore it is disabled,
3709         * (genAssign): do not read code memory when assigning a function to
3710         a pointer function,
3711         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3712         array of characters, not pointer,
3713         * (pic16initialComments): in debug mode emit an .ident directive for
3714         the assembler,
3715         * (_process_pragma): emit a new warning type (internal to pic16)
3716         when setting stack to default length, emit a similar warning when
3717         placing a function at absolute address and address is not word aligned
3718         * (_pic16_parseOptions): added 'return TRUE' statement,
3719         * (_pic16_linkEdit): if compiling a source, then add the source's
3720         file object, first in the list of objects to link,
3721
3722 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3723
3724         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3725         * src/pic/main.c : removed VC warning.
3726         * src/pic/gen.c : changed comment.
3727
3728 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3729
3730         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3731         reference to a deprecated symbol _GPTRREG was causing failure to
3732         link. Thanks G. M. Gallant for the info.
3733
3734 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3735
3736         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3737         comments for Bugs item #954788.
3738
3739 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3740
3741         * src/pic16/device.c (pic16_dump_gsection,
3742         * pic16_groupRegistersInSection): handle symbols declared to be in
3743         access bank differently,
3744         * src/pic16/gen.c (struct _G): added field resDirect,
3745         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3746         send values read from stack directly to result and don't allocate
3747         temporary values,
3748         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3749         same registers,
3750         * (pic16_sameRegsOfs): NEW,
3751         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3752         free because they were not allocated from temporary pool,
3753         * pic16_popRegFromString): workaround to fix a problem with
3754         allocating variables twice or never,
3755         * (genGenPointerGet): using PRODL instead of FSR0H,
3756         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3757         instead of FSR0H,
3758         * (genAssign): take advantage of the _G.resDirect flag,
3759         * (genCast): around line 11844, use mov2f instead of directly
3760         MOVFF'ing between operands to account for literal values,
3761         * src/pic16/genutils.c: some new debug functions for gpsim have been
3762         added,
3763         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3764         float with integer part only,
3765         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3766         place variables in access bank
3767         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3768         updated sources to reflect recent changes in gen.c
3769
3770 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3771
3772         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3773         sources that searched for headers in installation path, now the
3774         device/include/pic16 is used,
3775         * src/pic16/glue.c (pic16glue),
3776         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3777         .line directives if not in debug mode, this suppresses assembler's
3778         warnings for ignored directives
3779
3780 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3781
3782         * src/port.h: made reset_regparms prototype void parameter explicit.
3783         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3784         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3785         * doc/sdccman.lyx: documented warning disabling and how to use
3786           printf_large to make it print floats.
3787         * device/include/stdbool.h: NEW
3788         * device/lib/_atof.c,
3789         * device/lib/_divuint.c,
3790         * device/lib/_divulong.c,
3791         * device/lib/expf.c,
3792         * device/lib/printf_large.c,
3793         * device/lib/sincosf.c,
3794         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3795         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3796           a completely reentrant lib.
3797
3798 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3799
3800         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3801         * device/include/pic16/stdio.h: fixed bug with colon
3802
3803 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3804
3805         * device/include/pic16/stdio.h,
3806         * device/include/pic16/stdlib.h,
3807         * device/include/pic16/math.h: NEW
3808         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3809         declared as _naked to reduce overhead
3810         * device/lib/Makefile.in (target port-specific-objects-pic16):
3811         changed * to *.* so to ignore the CVS directory,
3812         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3813         stacked variables back in stack,
3814         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3815         corruption
3816
3817 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3818
3819         * .version: bumped version number to 2.4.5
3820         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3821         * support/Util/SDCCerr.c (messages structure): added entry for
3822         W_POSSBUG2
3823
3824         Large cumulative patch for pic16 port and libraries.
3825         * device/include/pic16/sdcc-lib.h,
3826         * device/include/pic16/stdarg.h,
3827         * device/include/asm/pic16/features.h,
3828         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3829         * device/include/pic16/float.h: changes reentrant keyword with
3830         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3831         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3832         updated target build-libraries to include objects from gptr,
3833         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3834         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3835         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3836         all function headings,
3837         * src/SDCCmain.c: added global parameter userIncDirsSet,
3838         * (parseCmdLine): when option -I is encountered add directory to
3839         userIncDirsSet too,
3840         * src/version.awk: added space between control and long,
3841         * src/pic16/NOTES: added some notes for the port,
3842         * src/pic16/gen.c: added prototype for mov2fp function,
3843         * (fReturnpic16[]): properly named return value registers,
3844         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3845         * (aopForSym): added code to handle symbols with onStack flag set,
3846         symbols onStack are allocated PTRSIZE bytes,
3847         * (aopFreeAsmop): handles special case where asmops are stack objects,
3848         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3849         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3850         added argument lock to trace flaws in allocating temporary registers
3851         when developing port,
3852         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3853         * (pic16_popRegFromString): reenabled allocating a direct register
3854         from string,
3855         * (assignResultValue): various beautifications,
3856         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3857         referenced function argument,
3858         * (genIpush): reenabled to allow stacked arguments, handles only
3859         ic->parmPush iCodes,
3860         * (genCall, genPcall): major changes to allow for variable argument
3861         functions, fixed a bug with falsely restoring stack pointer after
3862         returning from call,
3863         * (genFunction): pending code for critical function,
3864         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3865         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3866         * (genNearPointerGet): fixed bug with indirect reading, was always
3867         reading from INDF0
3868         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3869         pointers,
3870         * (genAddrOf): rewrote code to take address of a stacked function parameter
3871         * (genCast): fixed casting to generic pointer type,
3872         * src/pic16/gen.h: added AOP_STA,
3873         * (struct asmop): added field stk,
3874         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3875         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3876         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3877         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3878         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3879         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3880         generic pointers,
3881         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3882         and library paths,
3883         * (pic16_port structure): generic pointer size is set to 3,
3884         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3885         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3886         compiler warning,
3887         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3888         operand is an iTemp,
3889
3890 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3891
3892         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3893         * debugger/mcs51/simi.c: addapt new syntax of s51
3894
3895 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3896
3897         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3898         * src/pic16/pcode.c: commented out some calls to free() in order to
3899         fix bug #989576,
3900
3901 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3902
3903         * src/SDCCicode.h,
3904         * src/SDCCicode.c (isiCodeInFunctionCall),
3905         * src/avr/ralloc.c (selectSpil),
3906         * src/pic/ralloc.c (selectSpil),
3907         * src/pic16/ralloc.c (selectSpil),
3908         * src/ds390/ralloc.c (selectSpil),
3909         * src/hc08/ralloc.c (selectSpil),
3910         * src/xa51/ralloc.c (selectSpil),
3911         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3912         stack in the middle of a function call sequence (fixes bug #1020268)
3913         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3914         costs associated with the minimum switch case.
3915
3916 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3917
3918         * src/SDCC.lex: fixed bug #1030549
3919
3920 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3921
3922         * src/SDCCcse.h (struct cseDef),
3923         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3924         over a function call if the CSE is derived from a symbol whose
3925         address has been taken (fixes bug #1029883)
3926         * support/regression/tests/bug-1029883: a new regression test for
3927         this bug
3928
3929 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3930
3931         * src/hc08/gen.c (emitinline): fixed bug #1029778
3932         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3933         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3934         and starts toward RFE #905167)
3935
3936 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3937
3938         * src/pic16/gen.c (mov2f): New function to move an operand to
3939         another without considering if it is a literal or a register,
3940         * (pic16_sameRegs): don't check if they are both AOP_REG,
3941         * (AccRsh): removed andmask=0 lines,
3942         * (genLeftShift): duplicated to be improved in future versions,
3943         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3944         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3945         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3946         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3947         * (insertBankSwitch): fixed inserting banksel directives algorithm
3948         for instructions that follow a skip instruction, this fixes a report
3949         for broken subtraction code generation,
3950         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3951         iCode is a left op, just in case result and right share the same
3952         registers
3953
3954 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3955
3956         * src/hc08/main.c,
3957         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3958         preservation of HX
3959         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3960         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3961         on 2004-09-12; it was buggy
3962
3963 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3964
3965         * src/SDCCsymt.h: removed RESULT_CHECK
3966         * src/SDCCast.c,
3967         * src/SDCCglue.c,
3968         * src/SDCCval.c,
3969         * src/pic/glue.c,
3970         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3971
3972 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3973
3974         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3975         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3976         configuration values no more rejected by compiler, they are assigned
3977         to configuration registers with a warning message instead,
3978         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3979         the for-loop so last conf register is emitted too,
3980         * (_pic16_initPaths): link library libsdcc.lib by default,
3981         * (_hasNativeMulFor): modified test for multiplication according to
3982         Raphael Neider's remarks. Integer multiplication is also done with
3983         support functions,
3984         * device/include/pic16/pic18fregs.h: corrected type error in while
3985         testing and including 18f6720 header file
3986
3987 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3988
3989         * src/pic16/device.h (pic16_options): removed field use_crt,
3990         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3991         until an optimization to handle single bits is added,
3992         * (pic16_loadFSR0): moved before genUnpackBits,
3993         * (genAnd): some white lines removed,
3994         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3995         leave_reset flags in pic16_options when using crt modules,
3996
3997 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3998
3999         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4000           for bugs 898889 & 979599. Also used some safer print instructions.
4001
4002 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4003
4004         * src/pic16/device.h (pic16_options_t): added field use_crt,
4005         crt_name, no_crt,
4006         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4007         catch a probable future bug,
4008         * src/pic16/gen.c: aopIdx function commented out,
4009         * (genAssign): commented out old code which used aopIdx,
4010         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4011         code, added if conditionals to take into account the --use-crt
4012         command line options,
4013         * src/pic16/main.c (pic16_optionsTable): added new command line
4014         options, --use-crt= and --no-crt,
4015         * (_pic16_linkEdit): now the proper crt object is added in the
4016         linker command line except than when --no-crt is specified,
4017         * src/pic16/pcode.c,
4018         * src/pic16/pcode.h: added some structures and functions for a new
4019         optimization scheme to compansate for instruction overhead between
4020         same iCodes, this scheme is currently under development and is not
4021         working in any way,
4022         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4023         to && operator,
4024         * device/lib/pic16/startup/crt0i.c,
4025         * device/lib/pic16/startup/crt0iz.c: added global char variable
4026         __uflags to force the generation of an idata section
4027
4028 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4029
4030         * doc/Makefile,
4031         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4032         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4033
4034 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4035
4036         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4037         Frieder) and clarified the default code optimization mode
4038
4039 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4040
4041         * src/SDCC.lex (doPragma, process_pragma),
4042         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4043         "opt_code_size", and "opt_code_balanced"
4044         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4045         regrouped options by category, added support for category headers
4046         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4047         and "--opt-code-size"
4048         * doc/sdccman.lyx: documented these new options and pragmas
4049         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4050         preference into account
4051
4052 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4053
4054         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4055           geniCodePreDec): Fixed bug 904237 by generating a warning
4056         * src/SDCCerr.h,
4057         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4058
4059 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4060
4061         * src/pic/device.c : When no max ram set validate full memory range.
4062         * src/pic/pcode.c,
4063         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4064
4065 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4066
4067         * device/lib/_gptrget.c,
4068         * device/lib/_gptrput.c: updated comment
4069         * device/lib/calloc.c,
4070         * device/lib/free.c,
4071         * device/lib/malloc.c,
4072         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4073         * src/SDCCcse.c (cseBBlock),
4074         * src/SDCCicode.c (printOperand, geniCodeArray),
4075         * src/SDCCicode.h (struct operand): fixed bug 868103
4076         * support/regression/tests/bug-868103.c: added
4077         * src/SDCCast.c (searchLitOp),
4078         * src/SDCCcse.h (struct cseDef),
4079         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4080         * src/SDCCicode.h (struct operand),
4081         * src/SDCCsymt.h (struct sym_link),
4082         * src/avr/gen.c (hasInc),
4083         * src/ds390/gen.c (hasInc),
4084         * src/hc08/gen.c (genPlusIncr, hasInc),
4085         * src/mcs51/gen.c (hasInc),
4086         * src/pic16/glue.c (pic16_printIvalChar),
4087         * src/pic16/ralloc.c (regWithIdx),
4088         * src/xa51/gen.c (hasInc) : removed warnings
4089         * src/SDCCast.c (createBlock): added comment ???
4090         * src/hc08/ralloc.c: updated comments
4091
4092 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4093
4094         * doc/sdccman.lyx: updated section on switch statements, added
4095         section about semaphore locking
4096         * doc/Makefile: added option -info for latex2html
4097         * device/lib/_gptrget.c,
4098         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4099
4100 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4101
4102         * src/pic/device.h,
4103         * src/pic/device.c,
4104         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4105          maxram is less than 0x100.
4106
4107 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4108
4109         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4110
4111 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4112
4113         * src/port.h,
4114         * src/mcs51/main.c,
4115         * src/ds390/main.c,
4116         * src/z80/main.c,
4117         * src/hc08/main.c,
4118         * src/pic/main.c,
4119         * src/pic16/main.c,
4120         * src/avr/main.c,
4121         * src/xa51/main.c
4122         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4123         a jump table is the best form for a switch statement, including
4124         automatic insertion of missing cases to make the case range
4125         continuous. Developed in collaboration with Frieder Ferlemann.
4126
4127 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4128
4129         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4130         accumulator result if it needs sign extension
4131
4132 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4133
4134         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4135
4136 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4137
4138         * device/lib/gbz80/printf.c,
4139         * device/lib/z80/printf.c: removed define for NULL
4140
4141 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4142
4143         * as/xa51/xa_link.c,
4144         * device/examples/ds390/ow390/ad26.c,
4145         * device/examples/ds390/ow390/cnt1d.c,
4146         * device/examples/ds390/ow390/counter.c,
4147         * device/examples/ds390/ow390/ds2480.h,
4148         * device/examples/ds390/ow390/ds2480ut.c,
4149         * device/examples/ds390/ow390/findtype.c,
4150         * device/examples/ds390/ow390/gethumd.c,
4151         * device/examples/ds390/ow390/owllu.c,
4152         * device/examples/ds390/ow390/ownetu.c,
4153         * device/examples/ds390/ow390/swt12.c,
4154         * device/examples/ds390/ow390/swtloop.c,
4155         * device/examples/ds390/ow390/temp.c,
4156         * device/examples/ds390/ow390/temp10.c,
4157         * device/examples/ds390/ow390/thermo21.c,
4158         * device/examples/ds390/ow390/tinilnk.c,
4159         * device/examples/ds390/ow390/tstfind.c,
4160         * device/examples/serialcomm/windows/serial.cpp,
4161         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4162         * device/include/reg51.h: fixed line endings for cvs
4163
4164 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4165
4166         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4167         packRegsForAccUse, packRegisters): new accumulator register
4168         packing algorithm
4169         * support/regression/ports/hc08/support.c (_putchar): suppress
4170         warning of unused variable
4171         * src/SDCCicode.c: added SWAP entry to codeTable
4172
4173 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4174
4175         * device/lib/sprintf.c: forgot to add this file before previous commit
4176
4177 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4178
4179         * src/pic16/gen.c (genPackBits): added operand right in function
4180         parameters, load result directly if p_type is POINTER (that is
4181         called by genNearPointerSet)
4182         * (genUnPackBits): added operand left in function parameters,
4183         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4184         FSR0 if accessing bitfields,
4185
4186 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4187
4188         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4189           _print_format; updated printf, sprintf, vsprintf
4190         * device/include/asm/default/features.h: corrected comment/define
4191         * device/lib/Makefile.in: added sprintf.c
4192         * device/lib/libsdcc.lib: added sprintf module
4193         * device/lib/printf_large.c,
4194         * device/lib/vprintf.c,
4195         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4196           into these 3 files
4197         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4198         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4199         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4200           hc08 test
4201         * support/regression/tests/zeropad.c: define idata as data for hc08
4202
4203 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4204
4205         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4206         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4207         labels are referenced at least once (even if a reference is not found)
4208         * src/hc08/gen.c (emitcode): set isComment flag for comments
4209         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4210         loads), rules 6a..6b (optimize jumps to return)
4211
4212 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4213
4214         * device/lib/acosf.c (acosf),
4215         * device/lib/asinf.c (asinf),
4216         * device/lib/atanf.c (atanf),
4217         * device/lib/ceilf.c (ceilf),
4218         * device/lib/cosf.c (cosf),
4219         * device/lib/coshf.c (coshf),
4220         * device/lib/cotf.c (cotf),
4221         * device/lib/fabsf.c (fabsf),
4222         * device/lib/floorf.c (floorf),
4223         * device/lib/log10f.c (log10f),
4224         * device/lib/logf.c (logf),
4225         * device/lib/sinf.c (sinf),
4226         * device/lib/sinhf.c (sinhf),
4227         * device/lib/sqrtf.c (sqrtf),
4228         * device/lib/tanf.c (tanf),
4229         * device/lib/tanhf.c (tanhf),
4230         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4231         replaced all instances of "reentrant" in the library functions
4232         defined in math.h with this macro.
4233         * support/regression/tests/float_trans.c: reenabled test for hc08
4234
4235 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4236
4237         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4238         erroneously deleted
4239
4240 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4241
4242         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4243         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4244         multi-byte volatile operands are used
4245         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4246         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4247         initialization to area GSINIT0 so that it would always precede
4248         any static initializers in GSINIT
4249         * support/regression/tests/zeropad.c: fixed idata define for hc08
4250         * support/regression/tests/bug-927659.c,
4251         * support/regression/tests/float_trans.c: disabled tests for hc08
4252         pending missing library routines
4253         * .version: increased version number to 2.4.4 - hc08 port now passes
4254         regression tests
4255
4256
4257 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4258
4259         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4260         * Makefile.common.in,
4261         * as/Makefile,
4262         * as/hc08/Makefile.in,
4263         * as/mcs51/Makefile.in,
4264         * as/z80/Makefile.in,
4265         * debugger/mcs51/Makefile.in,
4266         * device/include/Makefile.in,
4267         * device/lib/Makefile.in,
4268         * doc/Makefile,
4269         * link/Makefile,
4270         * link/z80/Makefile.in,
4271         * packihx/Makefile.in,
4272         * sim/ucsim/main_in.mk,
4273         * sim/ucsim/avr.src/Makefile.in,
4274         * sim/ucsim/doc/Makefile.in,
4275         * sim/ucsim/gui.src/serio.src/Makefile.in,
4276         * sim/ucsim/hc08.src/Makefile.in,
4277         * sim/ucsim/s51.src/Makefile.in,
4278         * sim/ucsim/xa.src/Makefile.in,
4279         * sim/ucsim/z80.src/Makefile.in,
4280         * src/Makefile.in,
4281         * support/cpp2/Makefile.in,
4282         * support/librarian/Makefile,
4283         * support/makebin/Makefile: added DESTDIR to the install path proposed
4284         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4285         * doc/sdccman.lyx: added DESTDIR documentation
4286
4287 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4288
4289         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4290         instruction for interrupt handlers, use fast returns when returning
4291         from high priority interrupts
4292
4293 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4294
4295         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4296         code generation
4297         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4298         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4299         bugs, ported much of Bernhard's code from mcs51
4300         * src/mcs51/gen.c (genSend),
4301         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4302         than one when calling a reentrant function
4303         * device/lib/_mullong.c: defined an alternate struct layout for big
4304         endian ports (hc08)
4305
4306 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4307
4308         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4309         test
4310
4311 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4312
4313         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4314         are sane and complete before asking the port its prefered parameter
4315         passing method (fixes bug #1017633)
4316         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4317         and _ret3
4318
4319 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4320
4321         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4322         problem in bitfields >= 8 bits.
4323
4324 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4325
4326         * src/SDCCsymt.c: undid changes that were not meant to be committed
4327
4328 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4329
4330         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4331
4332 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4333
4334         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4335           copied and wrong bit got inverted
4336
4337 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4338
4339         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4340         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4341         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4342         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4343         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4344         assignments to bitfields at known addresses
4345         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4346         reads from bitfields at known addresses
4347         * src/hc08/ralloc.c (packRegisters),
4348         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4349         genhc08Code): optimize pointer get values used as conditionals
4350         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4351         and branch
4352
4353 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4354
4355         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4356         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4357         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4358         as conditionals
4359
4360 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4361
4362         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4363
4364 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4365
4366         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4367         related problems
4368
4369 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4370
4371         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4372
4373 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4374
4375         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4376         mcs51 port
4377
4378 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4379
4380         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4381
4382 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4383
4384         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4385         cases use more compact code.
4386
4387 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4388
4389         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4390
4391 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4392
4393         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4394
4395 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4396
4397         * src/SDCCsymt.h,
4398         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4399         parameter of changePointer() from symbol* to sym_link*
4400         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4401         * src/SDCCsymt.c (compareType): void* type is castable to other
4402         pointers, but not necesarily an exact match.
4403         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4404         is no longer blindly treated as an exact match.
4405         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4406
4407 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4408
4409         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4410
4411 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4412
4413         * src/pic/gen.c,
4414         * src/pic/pcode.c,
4415         * src/pic/ralloc.h,
4416         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4417
4418 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4419
4420         * src/pic/device.c,
4421         * src/pic/device.h,
4422         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4423
4424 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4425
4426         * src/mcs51/gen.c (emitcode): fixed bug #992819
4427
4428 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4429
4430         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4431           there's no need to make it worse
4432
4433 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4434
4435         * src/mcs51/ralloc.c (deassignLR),
4436         * src/ds390/ralloc.c (deassignLR),
4437         * src/hc08/ralloc.c (deassignLR),
4438         * src/z80/ralloc.c (deassignLR),
4439         * src/pic/ralloc.c (deassignLR),
4440         * src/pic16/ralloc.c (deassignLR),
4441         * src/avr/ralloc.c (deassignLR),
4442         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4443         rlivePoint): fixed another part of bug #971834
4444
4445 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4446
4447         * src/z80/main.c: enabled "critical" keyword
4448         * src/z80/mappings.i,
4449         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4450         functions (fixes bug #979646)
4451         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4452
4453 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4454
4455         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4456           such as c:\mydir.
4457
4458 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4459
4460         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4461           doesn't disable too much optimizations
4462
4463 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4464
4465         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4466
4467 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4468
4469         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4470
4471 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4472
4473         * src/pic/gen.c tidied up tabs
4474         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4475         * src/pic/main.c tidied up tabs
4476         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4477         * src/pic/pcoderegs.c tidied up tabs
4478         * src/pic/ralloc.c tidied up tabs
4479
4480 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4481
4482         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4483         to S_FIXED for pic16 port and when symbol is not in level 0,
4484         allocate for S_REGISTER storage class and pic16 port, too,
4485         * src/pic16/device.h: prototype for checkSym,
4486         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4487         * (pic16_assignConfigWordValue): test the value and the mask to
4488         validate that the value is suitable for the configuration word,
4489         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4490         collect extern declared symbols, don't emit symbol twice, check
4491         first if symbol is in publics set first,
4492         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4493         * added command line '--fstack' which enables an experimental
4494         feature for stack access, too buggy to be used yet...
4495         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4496         * (pic16_allocDirReg): when register has storage class S_REGISTER
4497         allocate in pic16_dynAccessRegs,
4498         * device/include/pic16/pic18f????.h: modified configuration word
4499         naming convention, words started as CONFIG0H but should be CONFIG1H
4500
4501 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4502
4503         * device/include/mcs51reg.h: fixed bug 970993
4504
4505 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4506
4507         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4508         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4509         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4510         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4511         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4512         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4513           error/warning numbers,
4514           added function setWarningDisabled()
4515         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4516         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4517           _memcmp.c _memmove.c calloc.c realloc.c free.c
4518         * support/regression/tests/malloc.c: added tests for new functionality
4519         * support/regression/tests/zeropad.c: added tests for truncated initializers
4520           and initialized char arrays starting with '\x0'
4521         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4522
4523 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4524
4525         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4526
4527 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4528
4529         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4530         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4531         peephole 177.e. Thanks to anonymous
4532
4533 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4534
4535         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4536         function isn't used in the source but referenced as a
4537         variable initializer then declare it as extern in .asm file
4538
4539 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4540
4541         * .version: increased version number to 2.4.3
4542
4543         Adding version extension according to ChangeLog CVS revision
4544         * src/Makefile.in (target all): added dependency 'version.h'
4545         * (rule version.h): added rule to create version.h from ChangeLog,
4546         * (rule dep): added dependency version.h,
4547         * src/version.awk: AWK script to create version.h
4548         * src/SDCCdwarf2.c (dwWriteModule),
4549         * src/SDCCglue.c (initialComments),
4550         * src/SDCCmain.c (printVersionInfo): modified to write after
4551         version string the version extension number,
4552         * src/SDCCutil.c: included "version.h"
4553         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4554         number,
4555         * src/SDCCutil.h: added prototype for getBuildNumber
4556
4557         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4558         includeDirsSet, too,
4559         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4560         const char [] is found in function prototype...
4561
4562         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4563         moving to WREG with source is already in WREG,
4564         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4565         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4566         * (aopForSym): stack'ed symbols are partially supported, added
4567         if-clause to support symbols in FARSPACE,
4568         * (sameRegs): added test for AOP_ACC to see if registers are same,
4569         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4570         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4571         * (pic16_popRegFromString): will not allocate a new register if it
4572         doesn't find one by name, bug may have introduced...
4573         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4574         * (genIpush): revived to use pic16 port's stack,
4575         * (genAddrOf): added incomplete case for stack'ed operand,
4576         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4577         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4578         can handle multibyte operands,
4579         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4580         * (pic16initialComments): added message for MPLAB compatibility
4581         mode enabled,
4582         * src/pic16/main.h: prototype for pic16_mplab_comp,
4583         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4584         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4585         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4586         because of increased complexity of procedure,
4587         * (_process_pragma): stack pragma changed to format 'stack pos len',
4588         emit symbol '_stack_end' to conform with gplink,
4589         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4590         to search for register,
4591         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4592         PO_GPR_REGISTER,
4593         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4594         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4595         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4596         case for PO_GPR_REGISTER,
4597         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4598         dies, the new era is ahead !...
4599         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4600         pic16_dynInternalRegs,
4601         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4602         * (pic16_allocDirReg): minor optimizations and bug fixes,
4603         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4604
4605         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4606         load stack and frame pointer with address of 'stack_end' symbol
4607
4608 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4609
4610         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4611         without source code but only variable initializers
4612
4613 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4614
4615         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4616         external are not declared as extern to reduce overhead while linking
4617
4618 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4619
4620         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4621
4622 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4623
4624         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4625           Yee Keat for the patch
4626         * src/SDCCast.c (decorateType): fixed bug #979599
4627         * src/ds390/gen.h: removed local fReturnSizeDS390
4628         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4629         * src/ds390/gen.c (genAnd, genOr, genXor),
4630         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4631
4632 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4633
4634         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4635         add relFilesSet to $3, manipulate $2 to handle linking of object
4636         files without source files in command line,
4637         * device/include/pic16 (all headers): added ID location macros,
4638         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4639         entries for ID location bytes,
4640         * (pic16_assignIdByteValue): NEW,
4641         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4642         added field dumpcalltree to pic16_options_t,
4643         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4644         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4645         emitting rFalseIfx label after check_carry label,
4646         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4647         pic16_emitDIRegs), NEW
4648         * (pic16glue): dump .calltree file when option --calltree found,
4649         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4650         * (_pic16_genAssemblerPreamble): emit ID locations after
4651         configuration registers,
4652         * (pic16_linkCmd): modifications of the link command,
4653         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4654         * (pic16_pCodeInitRegisters): don't init stack registers,
4655         * (pic16_findPrevInstruction): fixed bug,
4656         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4657         bug with immediate registers,
4658         * (buildCallTree): traces stack push and pop,
4659         * (pct2): dump also stack usage for each function,
4660         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4661         * (pic16_allocDirReg): various modifications,
4662         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4663         fixed to 1,
4664
4665 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4666
4667         * src/pic16/pcode.c: removed buggy double colon
4668
4669 2004-07-01 Borut Razem <borut.razem AT siol.net>
4670
4671         * support/scripts/sdcc.nsi: added include/pic16 to setup
4672
4673 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4674
4675         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4676         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4677         target 'clean',
4678         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4679         specific command line arguments. Also added sample lkr script
4680         for placing a variable at a specific memory bank.
4681         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4682         at a specific memory bank,
4683         * (pic16_dump_isection): fixed bug which caused string literals to
4684         be omitted when dumping idata section,
4685         * (pic16_groupRegistersInSection): added code to handle registers
4686         in specific memory banks,
4687         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4688         public, all references are renamed too,
4689         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4690         AOP_DPTR2,
4691         * (pic16_storeForReturn): added case to handle when dest is WREG,
4692         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4693         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4694         pic16_rel_udata, check to see if that register is marked as being
4695         a member of a specific memory bank,
4696         * (pic16_printIvalCharPtr): added code to add string literals either
4697         to code or the idata sections,
4698         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4699         also accept the 'udata' pragma,
4700         * src/pic16/main.h: new structure types sectName and sectSym
4701         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4702         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4703         * (pic16_findPrevInstruction): fixed, it returned nothing,
4704         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4705         instruction combinations,
4706         * (pic16_FixRegisterBanking): heavily reorganised,
4707         * (pic16_AnalyzeBanking): if generating banksel directives is
4708         disabled, then don't call FixRegisterBanking at all,
4709         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4710         completely removed,
4711         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4712
4713 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4714
4715         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4716         Phuah Yee Keat <yk.phuah AT nestac.com>
4717
4718 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4719
4720         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4721         correctly the IVT even if it is relocated to some other location
4722
4723 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4724
4725         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4726         * device/include/pic16/pic18f2220.h: NEW,
4727         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4728         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4729         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4730         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4731         nodefaultlibs, ivt_loc is the location of the interrupt vector
4732         table, and nodefaultlibs signs that default libraries should not be
4733         linked in link stage,
4734         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4735         according to --ivt-loc argument,
4736         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4737         when pragma stack is found,
4738
4739 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4740
4741         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4742         256 (range check), 257 (do while), 258.a-f (bit banging
4743         f.e. on 3-wire SPI bus)
4744
4745 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4746
4747         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4748         variables used exclusively within a loop
4749
4750 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4751
4752         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4753
4754 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4755
4756         * src/SDCClrange.c (computeClash): fixed bug #971834
4757
4758 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4759
4760         * src/mcs51/gen.c (genCmp): fixed bug #975903
4761         * src/hc08/gen.c (operandsEqu),
4762         * src/ds390/gen.c (operandsEqu),
4763         * src/z80/gen.c (operandsEqu),
4764         * src/pic/gen.c (operandsEqu),
4765         * src/pic16/gen.c (operandsEqu),
4766         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4767         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4768
4769 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4770
4771         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4772
4773 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4774
4775         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4776         default case in switch statement,
4777         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4778         to eliminate problem with initialisation of pointers, but problem
4779         still exists,
4780         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4781         * (emitStaticSegment): removed various lines emitting debug info,
4782         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4783         added processor registers for utilizing EEPROM,
4784         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4785         configurable and set 8
4786
4787 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4788
4789         * .version: increased version number to 2.4.2,
4790
4791         Cumulative patch for pic16 port
4792         * src/pic16/device.c: changed scheme to dump initial values for
4793         variables in idata segment, all print_idata* functions were removed,
4794         now the pic16_printIval* will be called,
4795         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4796         * _pic16_printPointerType, pic16_printPointerType,
4797         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4798         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4799         NEW, similar to the respective functions in SDCCglue.c,
4800         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4801         way, emitting hex bytes,
4802         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4803
4804 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4805
4806         * src/avr/ralloc.c (serialRegAssign),
4807         * src/xa51/ralloc.c (serialRegAssign),
4808         * src/pic/ralloc.c (serialRegAssign),
4809         * src/pic16/ralloc.c (serialRegAssign),
4810         * src/hc08/ralloc.c (serialRegAssign),
4811         * src/z80/ralloc.c (serialRegAssign),
4812         * src/ds390/ralloc.c (serialRegAssign),
4813         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4814
4815 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4816
4817         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4818         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4819
4820 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4821
4822         Cumulative patch for pic16 port:
4823         * src/pic16/device.h (typedef PIC16_device) modified fields for
4824         defining microcontrollers,
4825         * src/pic16/device.c: added new info for all devices in Pics16 array,
4826         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4827         to be optimised out by the pCode optimiser,
4828         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4829         specially, bug reported by G.M. Gallant,
4830         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4831         as force'd so that cannot be optimised out by pCode optimiser,
4832         * src/pic16/pcode.c,
4833         * src/pic16/pcodepeeph.c,
4834         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4835         they are disabled by default, but can be enabled explicit with
4836         command argument --denable-peeps, for testing,
4837         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4838         --pomit-ivt in COMPILE_FLAGS
4839
4840 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4841
4842         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4843           compilation on MSVC
4844
4845 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4846
4847         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4848
4849 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4850
4851         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4852         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4853
4854 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4855
4856         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4857         would only assign 0x300001 register.
4858
4859 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4860
4861         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4862         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4863
4864 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4865
4866         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4867         for ds80c400
4868         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4869         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4870         added peephole 254 (left shift), 255 (jump table)
4871
4872 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4873
4874         * device/lib/Makefile.in: removed comment line with model-pic16,
4875         * (target port-specific-objects-pic16): the libraries and objects
4876         are copied to the build directory form the device/lib/pic16/bin
4877         directory
4878
4879         Cumulative patch concerning pic16 port:
4880         * library directory has been re-organized,
4881         * added support for PIC18F1220,
4882         * added headers and library sources for chips 18f1220,18f6520,
4883         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4884
4885         * configuration registers setting has changed, now each supported
4886         device has a complete description of the registers it uses,
4887         * all initialisations are moved to idata sections, these section
4888         can be absolute or relocatable,
4889         * fixed initialisation of codespace variables,
4890         * fixed warning about PCLATU and gpsim,
4891         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4892         * (genAssign): use table reads when assigning from variables in codespace,
4893         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4894         char/int variables placed in codespace,
4895         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4896         registers set in .asm file, no need for --pomit-config-words anymore,
4897         * (pic16glue): some 8051 legacy segments are commented out
4898         (to be removed completely),
4899         * added support for alternative assembler and linker with --asm=
4900         and --link= command line arguments,
4901         * peepholes are disabled automatically in the port, no need to
4902         specify on command line,
4903         * port supports natively char/int/long multiplication, but converts
4904         all divisions to support functions,
4905         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4906         to the file set in variable $2,
4907         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4908         strings in ASCII format and not in hex,
4909         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4910         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4911         allocate proper register if iCodes aren't temporary,
4912
4913 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4914
4915         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4916
4917 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4918
4919         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4920         is commented out
4921
4922 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4923
4924         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4925         computed address is reused
4926         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4927         multi-byte bitfields
4928
4929 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4930
4931         * src/z80/gen.c: (genArrayInit): must check for pointers too
4932
4933 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4934
4935         * support/regression/tests/zeropad.c: never meant to commit the
4936           nestedstruct test: removed, added check for GCC version
4937
4938 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4939
4940         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4941         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4942         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4943           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4944           bugs 928906 and 954082 half-empty initializers
4945         * src/SDCCsymt.h,
4946         * src/SDCCsymt.c (getAllocSize): added for above fix
4947         * src/z80/gen.c (genArrayInit): fixed bug 741044
4948         * support/regression/tests/zeropad.c: added tests
4949
4950 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4951
4952         * src/pic16/device.c (pic16_dump_section): corrected bug which
4953         caused some symbols of the libraries to be misplaced
4954
4955 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4956
4957         * src/pic16/glue.c,
4958         * src/pic16/ralloc.h,
4959         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4960         to fix conflict with pic port
4961
4962 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4963
4964         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4965         externs configuration variables,
4966         * src/pic16/ralloc.h,
4967         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4968         prototype in header, commented out some debug messages
4969
4970 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4971
4972         * src/pic16/glue.c,
4973         * src/pic16/main.c,
4974         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4975         for gpasm COFF object generation. Thanks to D. Hawkins for
4976         his patch info
4977
4978 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4979
4980         * src/ds390/main.c,
4981         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4982         Brock for spotting this)
4983         * src/ds390/gen.c (genEndFunction),
4984         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4985         interrupt handler and critical. Disable push/pop optimizations when
4986         peephole optimizations disabled.
4987
4988 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4989
4990         Updated pic16 library sources and headers.
4991         * device/lib/pic16/pic18f*/ ,
4992         * device/include/pic16/*.h: modified to handle structured SFR
4993         definitions
4994
4995 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4996
4997         * src/port.h (PORT structure): added hook initPaths, now each
4998         port can declare its own default search paths,
4999         which can been seen with the --print-search-dirs option,
5000         see pic16 port for example,
5001         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5002         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5003         * (doPrintSearchDirs): NEW, replaces in a central manner the
5004         printing of search dirs which was split in set*Paths functions,
5005         * (main): added call to port->initPaths and doPrintSearchDirs,
5006         * src/avr/main.c,
5007         * src/ds390/main.c,
5008         * src/hc08/main.c,
5009         * src/izt/i186.c,
5010         * src/izt/tlcs900h.c,
5011         * src/mcs51/main.c,
5012         * src/pic/main.c,
5013         * src/pic16/main.c: modified port structures to reflect addition of
5014         initPaths hook,
5015
5016         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5017         * (pic16_dump_section): for registers in same address reserve memory once,
5018         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5019         to no_banksel,
5020         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5021         result is greater in size than right or left,
5022         * (pic16_genUMult8X8_8): there are some cases where the result can
5023         be 16 bits size, so handle these,
5024         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5025         * (pic16_outBitC): modified to emit pcodes,
5026         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5027         or not,
5028         * (genDivOneByte): implemented algorithm to divide 8-bits,
5029         * (genCmp): uncommented goto, but issues still exist,
5030         * (genAnd): fixed a bug with variables >8bits,
5031         * (genPackBits): optimization added that uses BCF/BSF to change a
5032         single bit,
5033         * (genAssign): fixed bug when assigning floating point literals,
5034         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5035         __sdcc_gsinit_startup label,
5036         * src/pic16/main.c (_pic16_init): removed search directory
5037         initialisations,
5038         * (_pic16_initPaths): NEW, used to initialise search directories,
5039         * (_hasNativeMulFor): support functions for all except char/int
5040         multiplication, and char division,
5041         * (PIC16_port struct): modified entry for native mul support,
5042         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5043         no_banksel option,
5044         * (buildCallTree): call to register_usage is ifdef'ed out,
5045
5046 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5047
5048         * device/include/string.h: applied Stas Sergeev's patch to make this
5049         header file compatible with the preprocessor -Wundef option
5050         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5051         failure (fixes bug #941458)
5052
5053 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5054
5055         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5056         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5057         that the variable, not the function, should be static
5058         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5059         to be consistent with non-literal case
5060
5061 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5062
5063         * src/SDCCast.c (isConformingBody): fixed bug #949967
5064         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5065         convilong): fixed bug #952086
5066
5067 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5068
5069         * src/SDCCmem.c (allocVariables): fixed bug #955321
5070
5071 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5072
5073         * src/hc08/main.c (_hc08_genAssemblerEnd),
5074         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5075         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5076         completely eliminated the use of a temporary file
5077         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5078         when more than one file linked
5079         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5080
5081 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5082
5083         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5084         which fixes bug #543481
5085         * support/regression/tests/bug-751703.c: fixed comments left from a
5086         cut and paste error
5087         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5088         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5089         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5090         scopes
5091         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5092         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5093         are now changed to underscores in moduleName
5094
5095 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5096
5097         * as/mcs51/lkmem.c: better fix for bug #954173
5098
5099 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5100         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5101
5102         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5103         * device/include/c8051f000.h,
5104         * device/include/c8051f120.h,
5105         * device/include/c8051f300.h,
5106         * device/include/c8051f310.h,
5107         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5108         PWM16) and detab'ed
5109
5110 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5111
5112         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5113         and mailing lists, doc'ed --no-peep-comments, removed reference
5114         to knoppix (newest version has no LyX/LaTeX), other minor changes
5115         * src/SDCCglue.c (glue): save 2 bytes stack space with
5116         option --main-return. The ljmp could probably be avoided too
5117
5118 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5119
5120         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5121
5122 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5123
5124         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5125         * src/SDCCopt.c (isLocalWithoutDef),
5126         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5127         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5128         (credit to Maarten Brock for patch #949363, on which this is based)
5129         * support/regression/tests/bug-751703.c: some test cases of extern used
5130         within inner scopes.
5131
5132 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5133
5134         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5135         SPEC_STRUCT
5136         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5137         struct definitions
5138         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5139         dwWriteLabel): fix to create valid debugger symbols even when
5140         the module name has non-alphanumeric symbols in it
5141         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5142         when a variable's allocation has been optimized away
5143
5144
5145 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5146
5147         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5148         * src/hc08/main.c,
5149         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5150         * src/mcs51/main.c,
5151         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5152         * src/ds390/main.c,
5153         * src/z80/gen.c (z80_emitDebuggerSymbol),
5154         * src/z80/main.c,
5155         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5156         * src/pic/main.c,
5157         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5158         * src/pic16/main.c,
5159         * src/avr/gen.c (avr_emitDebuggerSymbol),
5160         * src/avr/main.c,
5161         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5162         * src/xa51/main.c,
5163         * src/SDCCdebug.c (emitDebuggerSymbol),
5164         * src/SDCCdebug.h,
5165         * src/port.h: added a debugger struct to the port struct. Added a
5166         callback for defining debugger symbols
5167
5168         * src/SDCCast.c (createLabel),
5169         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5170         with isitmp = 1
5171         * src/SDCCicode.h,
5172         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5173         iCode back to the ast for the function
5174
5175         * src/hc08/ralloc.c (hc08_assignRegisters),
5176         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5177         unneeded fields from the regs struct.
5178         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5179         pushReg() & pullReg() functions instead of emitcode()
5180
5181         * src/hc08/gen.c (genLabel, genhc08Code),
5182         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5183
5184         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5185         debugger hooks
5186
5187         * src/hc08/gen.c (genEndFunction, genhc08Code),
5188         * src/hc08/gen.h,
5189         * src/mcs51/gen.c (genEndFunction, gen51Code),
5190         * src/mcs51/gen.h,
5191         * src/ds390/gen.c (genEndFunction, gen390Code),
5192         * src/ds390/gen.h,
5193         * src/z80/gen.c (genEndFunction, genZ80Code),
5194         * src/z80/gen.h,
5195         * src/z80/z80.h,
5196         * src/pic/gen.c (genEndFunction, genpic14Code),
5197         * src/pic/gen.h,
5198         * src/pic16/gen.c (genEndFunction, genpic16Code),
5199         * src/pic16/gen.h,
5200         * src/avr/gen.c (genEndFunction, genAVRCode),
5201         * src/avr/gen.h,
5202         * src/xa51/gen.c (genEndFunction, genXA51Code),
5203         * src/xa51/gen.h,
5204         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5205         specific code to cdbFile.c and out of the backend code generators
5206
5207         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5208         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5209         starting address is now 0
5210
5211         * as/hc08/asm.h,
5212         * as/hc08/m08pst.c,
5213         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5214         assembler directive for DWARF support
5215         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5216
5217         * src/src.dsp,
5218         * src/Makefile.in,
5219         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5220
5221 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5222
5223         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5224         and inappropriate peephole optimization in jump tables
5225
5226 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5227
5228         * as/hc08/m08pst.c,
5229         * src/SDCCglue.c: sdccopt works for the hc08 port now
5230
5231 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5232
5233         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5234
5235 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5236
5237         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5238
5239 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5240
5241         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5242         rules
5243         * src/SDCCmain.c,
5244         * src/SDCCglobl.h,
5245         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5246         comments from the peephole optimizer replacement rules
5247         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5248         symbols
5249         * src/SDCCcse.c (updateSpillLocation),
5250         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5251         equivalents
5252         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5253         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5254         objects far pointers
5255
5256 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5257
5258         * src/SDCCsymt.h: a missing part of my last change
5259         * src/pic/ralloc.c (regTypeNum),
5260         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5261
5262 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5263
5264         * src/SDCCicode.h,
5265         * src/SDCCicode.c (aggrToPtrDclType),
5266         * src/SDCCptropt.h,
5267         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5268         ptrPseudoSymConvert),
5269         * src/pic/ralloc.c (regTypeNum),
5270         * src/pic16/ralloc.c (regTypeNum),
5271         * src/hc08/ralloc.c (regTypeNum),
5272         * src/ds390/ralloc.c (regTypeNum),
5273         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5274         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5275
5276 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5277
5278         * link/z80/lkmain.c (afile),
5279         * as/hc08/lkmain.c (afile),
5280         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5281         prevent a pointer problem when a filename has no directory and
5282         no extension specified.
5283
5284 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5285
5286         * link/z80/lkmain.c (afile): allow periods in directory names
5287         * link/z80/lkmain.c (afile),
5288         * as/mcs51/lkmain.c (afile),
5289         * as/hc08/lkmain.c (afile): allow linker script file to have an
5290         extension other than ".lnk"
5291         * link/z80/lklex.c (getfid),
5292         * link/z80/lkmain.c (parse),
5293         * as/mcs51/lklex.c (getfid),
5294         * as/mcs51/lkmain.c (parse),
5295         * as/hc08/lklex.c (getfid),
5296         * as/hc08/lkmain.c (parse): Support comments in the linker script
5297         file on lines by themselves and after filenames
5298
5299 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5300
5301         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5302
5303 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5304
5305         * src/z80/peeph-z80.def: removed some peephole rules that don't
5306         work with multibyte arithmetic (fixed bug #937126)
5307         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5308         to registers and not global variables
5309         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5310         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5311         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5312         checking for assignments not internally generated (fixed bug #931895)
5313         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5314         structure member (fixed bug #930072)
5315
5316 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5317
5318         * src/SDCCmain.c (linkEdit),
5319         * src/hc08/main.c (_hc08_parseOptions),
5320         * as/hc08/Makefile.in,
5321         * as/hc08/aslink.h,
5322         * as/hc08/asm.h,
5323         * as/hc08/m08pst.c,
5324         * as/hc08/lkrloc.c (relr, rele),
5325         * as/hc08/lkarea.c (lnkarea)
5326         * as/hc08/lkmain.c (afile, parse),
5327         * as/hc08/lkelf.c: support for ELF output
5328         * as/hc08/lks19.c (s19),
5329         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5330
5331 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5332
5333         * as/mcs51/lkihx.c: Fixed bug #899105.
5334
5335 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5336
5337         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5338         .dsp files from Unix to DOS.
5339
5340 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5341
5342         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5343         function pointers; we have been compliant for several months now.
5344         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5345         change that was accidently commented out
5346         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5347         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5348         bug #922319
5349
5350 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5351
5352         * src/hc08/gen.c: output of all of the internal debugging information
5353         is now controlled by the D() macro; it is disabled by default
5354
5355 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5356
5357         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5358         harder to keep the same registers during a CAST iCode
5359         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5360         long via int can be done in a single cast, if the signedness is
5361         correct.
5362         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5363         putchar() in tinibios.c in ds390's library
5364
5365 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5366
5367         * src/SDCCast.c (decorateType): fixed bug #898889,
5368         cast result of a literal complement too
5369         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5370         fixed check for bitfields
5371
5372 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5373
5374         * src/SDCCicode.c (geniCodeLogic): made it static,
5375         (geniCodeLogicAndOr): added in order to fix bug #905492,
5376         (ast2iCode): fixed bug #905492
5377         * support/regression/tests/bug-905492.c: added
5378         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5379         (processParms): fixed bug #927659: don't copy parms, this will clear
5380         decorated flag
5381         * support/regression/tests/bug-927659.c: added
5382
5383 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5384
5385         * src/SDCCast.c (addCast): don't cast float to char
5386         * device/lib/libsdcc.lib: added _memmove
5387
5388 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5389
5390         * device/lib/large/Makefile: fixed parallel execution by
5391         replacing `make` by `$(MAKE)`
5392
5393 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5394
5395         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5396         offsets (fixes bug #923936)
5397
5398 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5399
5400         * device/lib/small/Makefile: fixed parallel execution by
5401         replacing `make` by `$(MAKE)`
5402
5403 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5404
5405         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5406
5407 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5408
5409         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5410         * src/regression/Makefile: Regression test was not running.
5411
5412 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5413
5414         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5415         complement if possible
5416         * src/SDCCval.c (valComplement),
5417         * src/SDCCicode.c (operandOperation): fixed complement of literal
5418         * support/regression/tests/onebyte.c (testComplement): added
5419
5420 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5421
5422         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5423         return an optimized tree; actually replace actParm with the new tree
5424         * src/SDCCast.h: added some parantheses to remove side effects
5425         * support/regression/tests/bug-920866.c
5426
5427 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5428         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5429         Bit operands were not being handled properly in the pic14 port.
5430         (now src/regression/add.c passes again).
5431
5432 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5433
5434         * src/SDCC.y (labeled_statement): case and default no longer require
5435         a following statement (RFE #893037)
5436
5437 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5438
5439         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5440         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5441         disabled (fixes bug #916294)
5442         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5443         "mov a,acc"; patch provided by Lenny Story
5444         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5445
5446 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5447
5448         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5449         functions
5450         * src/ds390/gen.c (genFunction, genEndFunction),
5451         * src/ds390/ralloc.c (ds390_assignRegisters),
5452         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5453         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5454         pushed if there are parameters passed on the stack. Also, a cleaner
5455         way to decide if r0/r1 should be pushed/popped. (Together they fix
5456         bug #918693)
5457
5458 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5459
5460         * doc/sdccman.lyx,
5461         * device/lib/mcs51/crtpagesfr.asm,
5462         * device/lib/mcs51/crtxinit.asm,
5463         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5464         to avoid confusion with Si Lab's SFRPAGE register.
5465
5466 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5467
5468         * src/SDCCglue.c (emitMaps): allow public sfr variables
5469         * src/SDCCglue.c (initialComments): include compiler build date
5470         with compiler version and put the timestamp of the generated
5471         assembly file on a serperate line to be less confusing.
5472         * src/port.h: added genInitStartup hook
5473         * src/avr/main.c,
5474         * src/ds390/main.c,
5475         * src/hc08/main.c,
5476         * src/pic/main.c,
5477         * src/pic16/main.c,
5478         * src/xa51/main.c,
5479         * src/z80/main.c: genInitStartup initialize as NULL (default to
5480         historical behaviour)
5481         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5482         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5483         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5484         library instead of hard coding it into the compiler.
5485         * support/regression/ports/mcs51-stack-auto/spec.mk,
5486         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5487         * device/lib/mcs51/Makefile,
5488         * device/lib/small/Makefile,
5489         * device/lib/large/Makefile,
5490         * device/lib/mcs51/crtpagesfr.asm,
5491         * device/lib/mcs51/crtstart.asm,
5492         * device/lib/mcs51/crtxclear.asm,
5493         * device/lib/mcs51/crtxinit.asm,
5494         * device/lib/mcs51/crtclear.asm,
5495         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5496         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5497         and into user configurable files.
5498         * device/lib/clean.mk: clean mcs51 directory too
5499         * support/regression/tests/longlit.c: added static to T1 declaration
5500         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5501         accesses in the initialization code
5502
5503 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5504
5505         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5506         OSCTRIMVAL as noted in bug #916008
5507
5508 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5509
5510         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5511         in loops with multiple exits (reported as incorrect registers
5512         used by Martin Helmling in Sdcc-user list)
5513
5514 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5515
5516         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5517         made ds390 register extensions look less like error messages
5518
5519 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5520
5521         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5522         reported by Adam Wozniak in Sdcc-user list
5523
5524 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5525
5526         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5527         arithmetic optimizations, added debug output
5528
5529 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5530
5531         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5532         * sdcc.spec: updated and split sdcc into 3 rpms
5533         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5534         needed for literals of LEFT_OP and '+'
5535         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5536         introduced RESULT_TYPE_NOPROM
5537         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5538         left shift
5539         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5540         limited promotion to int only for '*'
5541         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5542
5543 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5544
5545         * src/pic16/gen.c (genSkip),
5546         (genc16bit2lit), (gencjneshort): commented out
5547         (is_LitOp): new helper function, checks operand type
5548         (genCmpEq): rewritten
5549
5550 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5551
5552         * support/regression/tests/bug-908454.c: added
5553
5554 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5555
5556         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5557         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5558         (geniCodeCast): cosmetic, don't preserve bit storage class
5559         (geniCodeLeftShift): added promotion
5560         (geniCodeLogic): fixed regression
5561         * src/SDCCsymt.c (computeTypeOr): accept bits too
5562         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5563
5564 2004-03-07  Borut Razem <borut.razem AT siol.net>
5565
5566         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5567
5568 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5569
5570         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5571         version of pic16_genPackRegisters which does not check if ic is a
5572         CAST operator,
5573         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5574         function cause string1.c regression test fails
5575
5576 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5577
5578         * sim/ucsim/configure.in,
5579         * sim/ucsim/configure,
5580         * sim/ucsim/doc/Makefile.in: use docdir
5581         * src/SDCC.y: fixed sbit atrributes
5582         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5583         * src/SDCCast.c (decorateType): |^& need special promotion handling
5584         * src/SDCCast.h,
5585         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5586         * src/SDCCsymt.h (computeType),
5587         * src/SDCCicode.c: computeType() needs op
5588         * src/SDCCsymt.c (checkTypeSanity),
5589         * doc/sddman.lyx: "plain" bitfields are unsigned
5590         * src/SDCCsymt.c (computeTypeOr): added
5591         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5592         |^& ops
5593         * src/SDCCval.c (val*): computeType() needs op
5594         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5595         * support/regression/tests/onebyte.c: added tests for |^&
5596
5597 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5598
5599         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5600         for writing icode into asm output.
5601
5602 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5603
5604         * src/pic16/device.c: added some debug lines enabled
5605         with macro DEBUG_CHECK,
5606         * src/pic16/genarith.c: more debug in genPlus,
5607         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5608         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5609         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5610         * (aopForSym): onStack symbols are re-placed in data memspace,
5611         and onStack flag is cleared,
5612         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5613         copy temporary pcodeop,
5614         * (genPcall): added warning for not updating PCLATU,
5615         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5616         always true for pic16 port,
5617         * (genMultOneWord): NEW, supports integer multiplication,
5618         * (genMult): modified to call genMultOneWord,
5619         * (ifxForOp): added warning when return NULL,
5620         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5621         flag is set before call to operandFromSymbol for implicit
5622         added structures,
5623         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5624         options.intlong_rent are set by default,
5625         * (_hasNativeMulFor): modified to allow port generation of integer
5626         multiplication,
5627         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5628         set regtype to REG_SFR for all registers, restricting seting the
5629         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5630
5631 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5632
5633         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5634         more than 500 times in the regression tests
5635
5636 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5637
5638         * support/Util/SDCCerr.h,
5639         * support/Util/SDCCerr.c,
5640         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5641         enumerator_list),
5642         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5643         for symbol conflicts.
5644         * support/valdiags/tests/enum.c,
5645         * support/valdiags/tests/tentdecl.c,
5646         * support/valdiags/tests/struct.c: expect possible error messages
5647         referring to original symbol definitions.
5648         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5649         * src/SDCCsymt.h,
5650         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5651
5652 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5653
5654         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5655
5656 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5657
5658         * src/pic16/ralloc.c (newReg): fixed bug #908929
5659
5660 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5661
5662         * src/ds390/gen.c: added missing #include "main.h"
5663
5664 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5665
5666         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5667         checking if symbol is already in set,
5668         * src/pic16/device.h: prototype for checkAddSym,
5669         * src/pic16/gen.c: (_G): added entry interruptvector,
5670         * (assignResultValue): removed some commented out lines,
5671         * (genFunction): check for ISR via sym->type, absolute section for
5672         interrupt code is created via a new pBlock, the goto instruction is
5673         placed now correctly at the interrupt vector position, changed all
5674         references from ivec to _G.interruptvector,
5675         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5676         is the interrupt is a high priority one, same for return from ISR,
5677         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5678         externs to calls of checkAddSym,
5679         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5680         pic16_pcode_verbose flag is set,
5681         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5682         * src/pic16/pcoderegs.c: message about how many registers are saved
5683         will only be emitted if pic16_pcode_verbose flag is set,
5684
5685 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5686
5687         * src/ds390/ralloc.h,
5688         * src/ds390/ralloc.c (ds390_regWithIdx),
5689         * src/ds390/gen.c (emitcode),
5690         * src/ds390/main.h,
5691         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5692         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5693         ds390operandCompare, getRegsRead, getRegsWritten,
5694         initializeAsmLineNode): customized instruction size calculation for
5695         ds390, started basis for some register optimizations
5696         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5697         corresponding assembly output
5698         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5699         missing push/pop of r0/r1. Optimized push/pops
5700
5701 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5702
5703         * src/mcs51/main.c (instructionSize): fixed ACALL size
5704         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5705
5706 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5707
5708         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5709         the sorting of rlist with NULL elements
5710         * (print_idataType, print_idata): NEW to create idata sections
5711         * src/pic16/device.h: idataSymSet new variable
5712         * src/pic16/gen.c (genFunction): fixed some bugs in string
5713         comparing, improved the absolute section creation for ISRs,
5714         added FSR0L/FSR0H in registers that are saved in an ISR,
5715         * (genInline): fixed the processing of inline snippets,
5716         now they undergo no process by the peephole optimizer
5717         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5718         are placed in idataSymSet,
5719         * (pic16emitStaticSeg): extern symbols are added in externs,
5720         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5721         switching when aboslute variables are placed in access bank memory
5722         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5723         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5724         commented out with #if,
5725         * (pic16_packRegisters): reintroduce the check for CAST because some
5726         symbols are not correctly handled,
5727         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5728         pCodeInstruction instead of pCode,
5729         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5730         pCodeAsmDir definition,
5731         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5732         directive, then the argument directive is emitted without the leading
5733         tab, hack for inline labels which must be in the first column,
5734         * (compareLabel,pic16_findNextInstruction),
5735         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5736         * (insertBankSwitch): modified for the new pCodeAsmDir,
5737
5738 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5739         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5740
5741         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5742         instance,
5743         * (pushSide): commented out with #if,
5744         * (assignResultValue): fixed some typos in saving
5745         registers,
5746         * (genPcall): FIXED and sync'ed with genCall,
5747         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5748         * (genNearPointerGet): fixed to handle some more cases,
5749         implementation scheme via table reads,
5750         * (genConstPointerGet): modified to access code memory correct,
5751         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5752         and improved to handle some cases
5753         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5754         instead of "RETLW" for init data
5755         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5756         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5757         variables are placed in access bank memory (<0x80 and >=0xf80),
5758         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5759         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5760         TBLWT_POSTDEC,TBLWT_PREINC
5761         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5762         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5763         directives
5764         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5765         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5766         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5767         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5768
5769 2004-02-29  Borut Razem <borut.razem AT siol.net>
5770
5771         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5772         support/Util/findme.h, support/Util/system.h: enhance binary relative
5773         search for lib and include by using findProgramPath()
5774
5775 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5776
5777         * src/SDCCpeeph.h,
5778         * src/SDCCpeeph.c (pcDistance),
5779         * src/port.h,
5780         * src/mcs51/ralloc.h,
5781         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5782         * src/mcs51/main.h,
5783         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5784         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5785         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5786         size calculation port specific, started basis for some register
5787         optimizations
5788         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5789         missing push/pop of r0/r1. Optimized push/pops
5790         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5791         * device/lib/_modsint.c (_modsint),
5792         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5793         and stack version so regression tests pass
5794
5795 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5796
5797         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5798         * src/SDCCast.c (decorateType): catch another small optimization
5799         with '?' operator
5800         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5801         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5802         modified to finally use computeType() all over SDCC,
5803         see Feature Request #877103
5804         * src/SDCCval.h: cosmetic
5805         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5806         valCompare(); regression tested in muldiv.c
5807         * support/regression/tests/muldiv.c (testMod): mod sign follows
5808         dividend only
5809
5810 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5811
5812         * src/SDCCast.c (decorateType): fixed bug #902362
5813         * doc/INSTALL.txt: fixed install instructions for win32
5814
5815 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5816
5817         * device/include/Makefile.in (install): fixed by replacing spaces
5818         by tabs
5819         * doc/README.txt,
5820         * doc/INSTALL.txt: updated for release
5821         * doc/sdccman.lyx: added warning for --xstack being buggy
5822
5823 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5824
5825         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5826         to eliminate build warnings.
5827         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5828
5829 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5830            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5831
5832         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5833         removed -penable-stack, added comment for stack pragma, added
5834         warning for not initializing the stack/frame registers, removed
5835         comment at interrupts section
5836
5837         Stack is made permanent, there is no ability to disable stack usage.
5838         * src/pic16/device.h,
5839         * src/pic16/device.c: removed all references to USE_STACK macro,
5840         * src/pic16/device.c (pic16_dump_section): when no elements in
5841         rlist, free rlist before return,
5842         * (pic16_dump_int_registers): NEW, internal registers are a new set
5843         of general purpose registers reused by each function,
5844         * (checkAddReg): returns 1 if registers is added to set,
5845         * (pic16_groupRegistersInSection): when a registers is of type
5846         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5847         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5848         SRCASECMP macro is moved here from device.c
5849         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5850         PO_PCLATU, PO_PRODL, PO_PRODH,
5851         * (pic16_pCodeOpType, genMinus,
5852         changed compares to "a" register, with AOP_ACC,
5853         * (pic16_genPlus): fixed some bugs and indented properly,
5854         * (pic16_addSign): changed size to size+offset in the MOVWF
5855         instruction,
5856         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5857         multiply 8-bit operand by literal, result is 8-bit,
5858         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5859         multiply 2 8-bit operand, result is 8-bit,
5860         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5861         genUMult8X*_16,
5862         * src/pic16/gen.c: changed accUse to contain WREG only,
5863         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5864         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5865         true, do not use immediate addressing any more unless sym is a
5866         pointer in codespace,
5867         * (aopForRemat): do not use immediate addressing when symbol not in
5868         codespace and when symbol's address is requested,
5869         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5870         accUse size (= 1),
5871         * (aopGet): added case for AOP_ACC and don't return "accumulator
5872         bug" but WREG instead,
5873         * (popGetTempReg): pushes contents of temporary register in stack,
5874         * (popReleaseTempReg): pops contents of temporary register from
5875         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5876         * (pic16_popGet): separated case AOP_ACC to return register WREG
5877         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5878         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5879         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5880         the use of immediate pointers to certain cases only.
5881
5882         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5883         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5884         * (assignResultValue, genCall, genRet): modified to use the new
5885         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5886         genPcall is still broken,
5887         * (genFunction): added code to create 'A' type pBlocks when
5888         interrupt functions are generated, code not extensively tested yet,
5889         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5890         * (genEndFunction): modified so ISRs pop stored registers from stack,
5891         * (genMultOneByte): cleanup,
5892         * (AccRsh): added flag andmask, to and result with appropriate mask,
5893         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5894         * (genDataPointerGet): fixed and reenabled its use,
5895         * (genNearDataPointerGet): bugs fixed,
5896         * (genDataPointerSet): bugs fixed,
5897         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5898         pic16_DumpSymbol, pic16_DumpOp,
5899         * src/pic16/genutils.h: function prototypes for the above functions,
5900         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5901         pointers,
5902         * (pic16emitRegularMap): many many many improvements, but needs a
5903         major cleanup,
5904         * src/pic16/main.c: enable_stack in pic16_options is removed,
5905         * (_pic16_parseOptions): removed command line options -penable-stack,
5906         * (_process_pragma): emit stack symbol only when stack pragma is
5907         processed,
5908         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5909         redirected to FSR0L/FSR0H pair,
5910         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5911         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5912         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5913         for immediates,
5914         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5915         * (dumpPicOptype): NEW,
5916         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5917         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5918         with movff instruction,
5919         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5920         added pic16_int_regs, some packRegsFor* functions are commented out,
5921         because produce errors,
5922         * src/pic16/NOTES: minor modifications
5923
5924 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5925
5926         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5927         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5928         --pack-iram.
5929         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5930         * as/mcs51/lkaomf51.c: fixed bug #895763
5931
5932 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5933
5934         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5935
5936 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5937
5938         * doc/sdccman.lyx: added details about the HC08 storage classes and
5939         interrupts, fixed the register usage info for z80 & gbz80
5940
5941 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5942
5943         * doc/sdccman.lyx: added more pic16 port documentation
5944         * device/include/pic16/: added header pic18fregs.h
5945
5946 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5947
5948         * doc/sdccman.lyx: added Vangelis' contribution
5949
5950 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5951
5952         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5953         extend to the next CALL or PCALL, not just to the next CALL.
5954
5955 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5956
5957         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5958
5959 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5960
5961         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5962         bug #895752 and a better fix for bug #716790
5963
5964 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5965
5966         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5967
5968 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5969
5970         * doc/sdccman.lyx: minor changes, minor changed
5971
5972 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5973
5974         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5975         which can't handle SDCC_NEWONEBYTEOPS,
5976         (geniCodeMultiply): removed conversion from mult to shift for pic14
5977         and pic16
5978
5979 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5980
5981         * src/hc08/gen.h,
5982         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5983         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5984         thus fixing bug #895406
5985
5986 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5987
5988         * device/lib/_modsint.c,
5989         * device/lib/_modslong.c: sign follows divisor only
5990         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5991         signs or signedness can be ignored
5992         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5993         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5994         added optimization for IFX,
5995         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5996         arguments;
5997         reenabled optimization for IFX, which was removed on 2004-01-11
5998         * src/SDCCast.h: added return type IFX
5999         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6000         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6001         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6002         SDCC_OLDONEBYTEOPS selects the old behaviour
6003         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6004         changed again and commented promotion rule
6005         * src/SDCCval.c (valDiv): promotion no longer necessary
6006         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6007         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6008         rewritten
6009         * support/regression/tests/onebyte.c: added
6010
6011 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6012
6013         * gen.c (genInline): reverted to old code for assemnling inline
6014         code because of bug reported James Chadd
6015
6016 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6017
6018         * ralloc.h: missing declarations from previous patch,
6019         seems that patch for ralloc.h was never applied, fixed
6020
6021 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6022            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6023
6024         * pcode.c,
6025         * pcode.h,
6026         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6027         indirect addressing. Marked FSR0 as deprecated
6028         * gen.c (pointerCode): commented out, not needed now
6029         (pic16_popGet2p): new MOVFF helper function
6030         (genGenPointerGet),
6031         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6032         (shiftRLong): removed duplicate debugging info
6033
6034 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6035
6036         * src/ds390/gen.c (genNearPointerGet),
6037         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6038         optimization with bits, but not bitfields.
6039         * src/ds390/ralloc.c (packRegisters),
6040         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6041
6042 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6043
6044         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6045
6046 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6047
6048         * src/SDCCsymt.h,
6049         * src/SDCCicode.c (operandFromSymbol),
6050         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6051         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6052         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6053         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6054         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6055         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6056         bug #892038
6057         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6058         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6059         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6060         * src/SDCCsymt.c (newSymbol),
6061         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6062         enumerator_list),
6063         * src/SDCCval.h,
6064         * src/SDCCval.c (newiList): fixed bug #885705
6065
6066 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6067
6068         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6069         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6070
6071 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6072
6073         * device/include/c8051f120.h,
6074         * device/include/c8051f300.h,
6075         * device/include/c8051f310.h: added/updated header files for Silicon
6076         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6077         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6078         in new section Submitting patches
6079
6080 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6081
6082         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6083         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6084         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6085         genGenPointerSet),
6086         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6087         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6088         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6089         genGenPointerSet),
6090         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6091         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6092         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6093         genGenPointerSet),
6094         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6095         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6096         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6097         genGenPointerSet): fixed bug #892400
6098         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6099         to eliminate build warnings.
6100         * src/SDCCast.c (processParms),
6101         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6102         fixed bug 751859
6103         * support/valdiag/valdiag.py: added GCC to the list of defines active
6104         when compiling with gcc
6105
6106 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6107
6108         * support/Util/SDCCerr.h,
6109         * support/Util/SDCCerr.c,
6110         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6111         with an incomplete type (fixed bug #883734)
6112         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6113
6114 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6115
6116         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6117
6118 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6119
6120         * src/SDCCast.c (decorateType),
6121         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6122         function pointer implementation
6123         * support/regression/tests/funptrs.c: added tests to verify both forms
6124         of function pointers work correctly. Added tests to verify parameters
6125         are passed in the correct order.
6126
6127 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6128
6129         * device.c (regCompare): registers are sorted by ascending
6130         address and increasing size,
6131         * main.c (_pic16_finaliseOptions): removed the declaration
6132         of compiler macro MCU. Now a macro of the format pic18fxxxx
6133         will be defined from the command line
6134
6135 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6136             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6137
6138         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6139         PCOP_RLCF was overwritten!
6140         * gen.c (genSkip): commented out calls to pic16_emitcode,
6141         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6142         * (genlshTwo),
6143         * (genRRC): added debugging info,
6144         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6145         overwritten while shifting,
6146         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6147         overwritten while shifting,
6148         * (AccLsh),
6149         * (AccRsh),
6150         * (shiftLLeftOrResult),
6151         * (shiftRLeftOrResult),
6152         * (shiftRLong),
6153         * (shiftLLong): Implemented with pic16_emitpcode
6154         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6155         * (genLeftShift): Fixed bug, operand for shift by variable always
6156         was "and"ed with 0x0f,
6157         * (genLeftShiftLiteral),
6158         * (genrshTwo),
6159         * (genRightShiftLiteral): added debugging info,
6160         * (genrshFour): added comment,
6161         * (genRightShift): determined signedness from operand "left"
6162         instead of "result"
6163
6164 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6165
6166         * src/SDCCicode.c (geniCodeParms),
6167         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6168         function pointers, fixed function pointer bugs #861242 and #861896
6169
6170 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6171
6172         * device/include/c8051f000.h,
6173         * device/include/c8051f120.h,
6174         * device/include/c8051f300.h: added header files for Silicon
6175         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6176
6177 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6178
6179         * src/SDCCast.c (processParams): added new type flow and restructured
6180         (gatherAutoInit): added new type flow
6181         (addCast): cosmetic changes
6182         (getLeftResultType): added new type flow for array indices, patch
6183         provided by Stas, see FR #877103
6184         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6185         array index patch by Stas
6186         * src/SDCCast.h: added prototype getResultTypeFromType()
6187         * src/SDCCval.h,
6188         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6189         * src/pic/glue.c (pic14emitStaticSeg),
6190         * src/pic16/glue.c (pic16emitStaticSeg),
6191         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6192         for initialization of symbols
6193         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6194         * support/Util/SDCCerr.h:
6195         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6196         * .version: bumped version number to 2.3.8
6197         * device/include/Makefile.in (install),
6198         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6199         avoid warnings
6200
6201 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6202
6203         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6204         Slade Rich fixed an optimization bug
6205         * src/pic/pcodepeep.c,
6206         * src/pic/pcoderegs.c
6207         * doc/Makefile (install): added test for directory
6208
6209 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6210
6211         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6212         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6213         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6214         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6215         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6216         * as/mcs51/asexpr.c (term),
6217         * as/hc08/asexpr.c (term): fixed bug #887146
6218
6219 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6220
6221         * src/z80/gen.c (genMult): handle single byte result product
6222         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6223         DUMMY_READ_VOLATILE (fixed bug #886367)
6224
6225 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6226
6227         * support/regression/tests/libmullong.c: fixed logic, on little endian
6228         hosts we ended without a mullong_wrapper()
6229
6230 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6231
6232         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6233         virus/worm forged address usage.
6234
6235 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6236
6237         Fixed promotion, it should be done on AST level:
6238         * src/SDCCast.c (addCast): added promotion to int
6239         (decorateType): updated call to upCast()
6240         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6241         usualUnaryConversions()
6242
6243 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6244
6245         * support/regression/tests/literalop.c (mulWrapper): Added a
6246         wrapper to remove integer overflow warnings.
6247
6248         * support/regression/tests/float_trans.c: Made work on host.
6249
6250         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6251         location of sz80.
6252
6253         * support/regression/generate-cases.py (main): Changed from inline
6254         to a main method.
6255
6256         * doc/Makefile (install): Changed to depth first to get rid of
6257         missing directory install warning.
6258
6259         * as/Makefile (install-doc): Made work on Mac.
6260
6261 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6262
6263         * src/SDCCast.c: added an additional type flow in decorateType() of
6264         opposite direction, see feature request #860006; it's enabled at runtime
6265         by setting the environment variable SDCC_NEWTYPEFLOW
6266         * src/SDCCast.h: changed prototype of decorateType()
6267         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6268         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6269         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6270         see feature request #877103
6271         * src/SDCCval.c: updated call of decorateType()
6272         (valBitwise): fixed bug #882876
6273         (valMinus): added promotion
6274         (valLogicAndOr): result is unsigned
6275         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6276         * src/SDCCsymt.c (computeType),
6277         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6278         must not cause an unsigned operation
6279         * src/pic/glue (pic14emitRegularMap),
6280         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6281
6282 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6283
6284         * src/pic/pcode.c (PCodeID): commented out left over debug code
6285
6286 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6287
6288         * support/valdiag/tests/overflow.c: added shift tests
6289         * src/pic/device.c,
6290         * src/pic/gen.c,
6291         * src/pic/gen.h,
6292         * src/pic/glue.c,
6293         * src/pic/main.c,
6294         * src/pic/pcode.c,
6295         * src/pic/pcode.h,
6296         * src/pic/pcodepeep.c,
6297         * src/pic/pcoderegs.c,
6298         * src/pic/ralloc.c,
6299         * src/pic/ralloc.h: applied patch from Slade Rich;
6300         added support for multiple code pages and multiple RAM banks on the
6301         PIC 14 port. The ASM files now no longer simply assume all the
6302         code / RAM are in the same page / bank. This means the linker can
6303         safely allocate code/RAM of separate ASM files to different pages/banks.
6304         * doc/sdccman.lyx: added Slade's tips
6305         * src/mcs51/peeph.def: fixed bug #880768
6306
6307 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6308
6309         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6310         * src/SDCCast.c (decorateType): fixed bug #880197
6311
6312 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6313
6314         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6315         getopt.h.
6316
6317         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6318         strtof is not part of C89 and isn't included with Mac OS X.
6319
6320 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6321
6322         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6323         shiftL2Left2Result): fixed bug #879326
6324         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6325         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6326         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6327         address fetch for clr instruction
6328         * device/lib/hc08/_mulint.c: created optimized assembly version
6329         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6330
6331 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6332
6333         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6334         proposed in FR #877103
6335
6336 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6337
6338         * src/SDCCval.c (cheapestVal): added missing checks
6339         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6340         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6341
6342 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6343
6344         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6345         equal operands
6346
6347 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6348
6349         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6350         loaded with the linker search paths (-L arguments) and the libraries
6351         to be linked with the current source (-l arguments). Changes
6352         currently will affect only the pic16 port.
6353         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6354         include path the port specific paths and port specific libraries,
6355         * gplink command now contains the $3 argument,
6356         * src/pic16/device.h,
6357         * src/pic16/device.c,: structure PIC_device is made public and
6358         renamed to PIC16_device, the same for variable Pics which is renamed
6359         to Pics16. Updated all references to them.
6360         * src/pic16/glue.c (pic16glue): corrected bug with code
6361         initialization which bypassed the variable initializations block.
6362
6363         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6364         COMPILE_FLAGS and added the --nostdinc option
6365
6366 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6367
6368         * device/include/mc68hc908jb8.h: Register defs for another member
6369         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6370
6371 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6372
6373         Documenting changes from previous commits.
6374         * configure.in (version 1.56),
6375         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6376         when generating output files to configure the pic16 library,
6377         but now I've commented it out, since gputils aren't installed in the
6378         SF compile farm, so library won't compile
6379
6380         * device/lib/Makefile.in (version 1.56): initially I've added in
6381         target 'all' the prerequestive 'model-pic16' so it compiled the
6382         pic16 library, but now I've commented it out for the same reasons
6383         above,
6384         * added targets 'model-pic16' and 'objects-pic16' to compile the
6385         library
6386         * added target 'port-specific-objects-pic16' to handle the
6387         generated libraries and copy them into the build/ directory
6388         * added target 'clean-intermediate-pic16' to clean intermediate
6389         files into pic16 directory
6390         * in target 'installdirs' added line to create directory pic16 in
6391         the installation path
6392
6393         * device/include/Makefile.in (version 1.11): in target 'install'
6394         added lines to copy all header files to installation path,
6395         * in target 'installdirs' added line create directory for pic16
6396         headers in the installation path
6397
6398 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6399
6400         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6401          a function call
6402
6403 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6404
6405         * configure,
6406         * device/lib/configure.in,
6407         * device/lib/configure: fixed for autoconf 2.57
6408
6409 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6410
6411         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6412         option so that it actually works. Made it specific to the z80, since
6413         the gbz80 doesn't have these kinds of I/O ports.
6414
6415 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6416
6417         * device/include/z180.h,
6418         * device/lib/_memcpy.c,
6419         * device/lib/_memmove.c,
6420         * device/lib/_mulint.c,
6421         * device/lib/ser_ir.c,
6422         * device/lib/ser_ir_cts_rts.c,
6423         * device/lib/_strcmp.c,
6424         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6425         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6426         portmode; added deprecation warning for bank= and protmode= forms.
6427         Also, guard against buffer overflow.
6428         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6429
6430 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6431
6432         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6433         changed interrupt vector table generation to only emit declared vectors.
6434         * device/include/Makefile.in: added missing backslash
6435         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6436
6437 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6438
6439         Mainly changes to support compilation of the device libraries
6440         * src/pic16/device.c: stack is allocated via symbol and not
6441         via literal number. The symbol is placed in the corresponding
6442         position of the data ram
6443         * (pic16_dump_section): relocatable and absolute uninitialized
6444         data are now emitted in sorted order to reduce section naming,
6445         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6446         weren't marked as being in the access bank,
6447
6448 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6449
6450         Added portion of GNU PIC Library under the directory
6451         device/include/pic16 and device/lib/pic16. These files
6452         contain the declarations of SFRs for the PIC18Fxx2 devices.
6453         The directory is initialized via configure from toplevel.
6454
6455 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6456
6457         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6458         the spilllocations to be compared correctly
6459
6460 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6461
6462         * src/SDCCast.c (decorateType): fixed bug introduced today
6463
6464 2004-01-12  Borut Razem <borut.razem AT siol.net>
6465
6466         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6467         doc/sdccman.lyx: upper case pragmas are deprecated
6468
6469 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6470
6471         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6472         in simpler and even better code
6473
6474 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6475
6476         * src/SDCCicode.c (operandOperation): fixed bug #874819
6477         * src/SDCCast.c (decorateType): fixed
6478         char foo (unsigned long ul) { return ul > 0; }
6479
6480 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6481
6482         * doc/sdccman.lyx: Moved and added some sections, small changes
6483         all over. Telling LaTeX to be less strict with word spacing
6484         to better keep the right margin. Changed some notes about
6485         maintainance of the ports in section 3.2.1 - is it OK like this?
6486
6487 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6488
6489         SDCC source changes:
6490         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6491         convilong): modified to inform the pic16 port that builtin functions
6492         are external
6493
6494         PIC16 PORT specific changes:
6495         * src/pic16/device.c pic16_dump_equates() added,
6496         processor registers declared internally by the port are emitted in
6497         the translation as equates,
6498         * src/pic16/gen.c: inline code is passed unprocessed to the
6499         translation,
6500         * (pic16_popGetLit2): fnuction modified to take second operand as
6501         pCodeOp pointer and not as literal,
6502         * (popRegFromIdx): prefixed with pic16_,
6503         * (pic16_popCombine2): modified to receive already allocated pCode
6504         operands,
6505         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6506         * (genFunction): initializes local stack frame and pushes on stack
6507         all the registers used by this function,
6508         * (genEndFunction): restores all registers from stack and restores
6509         stack frame,
6510         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6511         improvements,
6512         * (pic16glue): changed the program startup sequence,
6513         * added new dbName code 'A' for functions placed in absolute section
6514         * src/pic16/main.c: added function attribute _naked,
6515         * added pragma 'code' to place a fnuction at an absolute address,
6516         * added command line arguments --debug-ralloc and --pcode-verbose,
6517         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6518         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6519         * (pic16_newpCodeOpLit2): modified to take the second operand as
6520         pCodeOp pointer,
6521         * (pic16_printpBlock): modified to emit each function in a separate
6522         section,
6523         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6524         UPPER for immediate operands,
6525         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6526         instruction,
6527         * src/pic16/peeph.def: all peepholes with movff are commented out,
6528         because there is a problem in the pcode peep optimizer,
6529         * src/pic16/ralloc.c: the register allocator can now reuse local
6530         function symbols for another function. This saves register usage.
6531         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6532
6533         Added file src/pic16/NOTES with information about program writing on
6534         the current port version.
6535
6536 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6537
6538         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6539         and peephole 252 (array access)
6540
6541 2004-01-09  Borut Razem <borut.razem AT siol.net>
6542
6543         * src/SDCCmain.c : fixed #872250: -l command line defined library
6544           files are scanned before standard library files
6545
6546 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6547
6548         * src/SDCCast.c (decorateType): fixed bug #874046
6549
6550 2004-01-09  Borut Razem <borut.razem AT siol.net>
6551
6552         * support/scripts/sdcc.nsi: remove previous installation
6553
6554 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6555
6556         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6557         bytes for last interrupt vector (mcs51)
6558         * sdcc.spec: fixed typo
6559
6560 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6561
6562         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6563         gen51Code): more efficient parameter receive for --model-large
6564         ("bug" #845294)
6565
6566 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6567
6568         * src/ds390/main.c,
6569         * src/z80/main.c: added missed needLinkerScript flags (more than
6570         one port structure defined in these file)
6571         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6572         bug #795325
6573
6574 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6575
6576         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6577         * src/port.h: added flag needLinkerScript in port->linker
6578         structure to inform whether to create a .lnk file or not,
6579         * src/avr/main.c,
6580         * src/ds390/main.c,
6581         * src/hc08/main.c,
6582         * src/mcs51/main.c,
6583         * src/pic/main.c,
6584         * src/pic16/main.c,
6585         * src/xa51/main.c,
6586         * src/z80/main.c: changed appropriately to configure
6587         needLinkerScript flag
6588         * src/pic/gen.c,
6589         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6590         * src/pic/glue.c: added variable udata_section_name to
6591         override default uninitialized data segment definition for
6592         devices only with SHAREBANK memory (reported from Erik Epetrich)
6593         * (pic14emitOverlay): modified to emit a commented overlay segment
6594         directive when no overlay data exist
6595         * (picglue): modified to emit uninitialized data segment
6596         according to udata_section_name
6597         * src/pic/main.c (_pic14_parseOptions): added command line
6598         options --udata-section-name=[name] to override default
6599         udata definition name
6600         * modified _linkCmd and _asmCmd to include compiler passed
6601         arguments via -W option
6602         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6603         object file from '.rel' to '.o' in port->linker structure,
6604         changed size of fptr from 2 to 3 in port structure
6605
6606 2004-01-07  Borut Razem <borut.razem AT siol.net>
6607
6608         * support/scripts/sdcc.nsi: update PATH
6609         * support/scripts/sdcc.ico: craeted
6610
6611 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6612
6613         * device/include/Makefile.in: fix install
6614         * doc/Makefile: fix install
6615
6616 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6617
6618         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6619         in bug #860505
6620         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6621         how the function variable allocation summary is displayed; also
6622         include information about variables allocated to the overlay
6623         segment
6624
6625 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6626
6627         * as/mcs51/lkmain.c: Help about -Y option
6628         * as/mcs51/lkarea.c: Fixed gcc warnings
6629
6630 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6631
6632         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6633         fixed warning
6634         * support/valdiag/tests/overflow.c: added
6635         * src/SDCCast.c (decorateType),
6636         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6637         LEFT_OP (left shift)
6638
6639 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6640
6641         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6642         (default behaviour).
6643
6644 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6645
6646         A python script to validate compiler diagnostic messages. It can be
6647         used to verify that sdcc complains about bad c source code and
6648         gives a good location of the error.
6649         * support/valdiag/Makefile,
6650         * support/valdiag/valdiag.py,
6651         * support/valdiag/tests/*
6652
6653 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6654
6655         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6656         * src/SDCCsymt.c (newEnumType),
6657         * src/SDCCsymt.h
6658         * support/Util/SDCCerr.c,
6659         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6660         enum related bugs.
6661         * support/regression/tests/enum.c: added test for enum values that
6662         require at least 2 bytes of storage.
6663
6664 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6665
6666         * src/common.h: added ifndef/define/endif macros
6667         around the header file.
6668         Bug reported from Jesus Calvino-Fraga
6669
6670 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6671
6672         * sdcc.spec: updated
6673         * device/include/Makefile.in: don't install CVS directories
6674         * device/lib/Makefile.in: added removal of CVS directories after install
6675         * doc/Makefile: fixed install, added local_icons
6676         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6677         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6678         * src/ds390/gen.c (genRightShift): fixed bug #870788
6679         * src/SDCCast.c (decorateType): fixed bug #870781
6680
6681 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6682
6683         PIC16 port related changes:
6684         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6685         added variable stackPos,
6686
6687         * gen.c: genCall, assignResultValue: added support for
6688         pushing/retrieving function parameters to/from stack,
6689         genFunction,genEndFunction: setup stack frame for the
6690         generated function,
6691         genAddrOf: will be changed according to bug 863624
6692
6693         * added files genutils.c and genutils.h which contain gen*
6694         debugged and optimised functions extracted from gen.c
6695
6696         * glue.c: added variable 'externs' which holds extern symbols,
6697         pic16emitRegularMap: is modified to properly handle relocatable
6698          symbols under the new scheme,
6699         pic16createInterruptVect: is modified
6700         pic16printPublics: is modified to emit 'global' assembler directives,
6701         added pic16_printExterns to print extern symbols,
6702         pic16glue: initializes stack/frame pointer in the beginning of
6703         the assembly output. Temporary hack, will be corrected later,
6704         because gplink yet does not support stack and SDCC does not
6705         yet support a type of crt0.o object to create the final binary.
6706
6707         * Removed many lines that contain 8051 legacy code.
6708         * The code is finally placed under a 'code' directive.
6709         * Added port specific options.
6710
6711         * _process_pragma: simplified since now we do not need *special*
6712         include file to define SFR registers. But a separate header
6713         will be needed. This will be developed later.
6714         * _pic16_parseOptions: added, parses port specific options:
6715         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6716         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6717         --preplace-udata-with=
6718
6719         * _pic16_setDefaultOptions: modified to initialize section names,
6720         but hack is temporarly out of order since it needs improvement.
6721         * _pic16_genAssemblerPreamble: configuration words are emitted by
6722         their address instead of their name. This part is incomplete and
6723         supports only the 18Fxx2 devices. Other devices will emit an error
6724         during assembly since they do not contain the same set of config
6725         registers
6726         * _pic16_genIVT: is modified,
6727
6728         * pcode.c: added definitions for some hardware registers that are needed
6729         for stack support
6730         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6731         All PCI entries are updated. Now LFSR is supported.
6732         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6733         * added pic16_newpCodeOpLit2 to support instructions with
6734         two literal arguments
6735         * pic16_pCode2str: corrected code that emits assembler instructions
6736         with two literal operands and those that have an access bit modifier
6737         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6738         this fixes a bug which caused some labels to be lost, when an
6739         assembler directive was added, i.e. banksel,
6740         * pic16_FixRegisterBanking: improved logic that causes the insertion
6741         of bank switching,
6742         * InlineFunction: functions that are called once, are not any more
6743         inlined. This can be a port option in the future,
6744
6745         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6746
6747         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6748         hold the corresponding uninitialized symbols,
6749         * pic16_allocProcessorRegister: registers have explicit marked the
6750         accessBank field,
6751         * pic16_allocInternalRegister: registers are explicit marked as
6752         not used,
6753         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6754         processing list, so bit registers were lost,
6755         *
6756
6757         * ralloc.h: added field 'accessBank' and original symbol operand
6758         in register definition,
6759         * removed the field isMapped from register definition,
6760
6761         ** Several functions have been removed from various sources:
6762         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6763         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6764         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6765         pic16_assignRelocatableRegisters
6766
6767         ** others have been introduced:
6768         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6769         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6770
6771 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6772
6773         * support/scripts/inc2h.pl: changed definition of BIT_AT
6774         to emit 'sbit at' instead of 'bit at'. This was a request.
6775
6776         PIC16 port related preliminary changes:
6777         * gen.c: prefixed function popRegFromString with
6778         pic16_ and all references to it corrected
6779         * pcode.c: all pic16_pc_* hardware registers prefixed
6780         with underscore (_),
6781         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6782         * ralloc.c: newReg(): when register is REG_SFR then
6783         set address to rIdx,
6784         pic16_allocProcessorRegister(): marks register wasUsed=0
6785         pic16_writeUsedRegs(): added a call to assign processor
6786         registers via pic16_assignFixedRegisters
6787
6788 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6789
6790         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6791         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6792         variables in unused register banks.  Also the SSEG is placed
6793         wherever there is enough space for it, and IDATA can be anywhere
6794         in internal RAM.  For now compile using -Wl-Y[stack_size].
6795         The mem file is different for this option as well, since it
6796         makes no sense of talking about DSEG lenght.
6797
6798 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6799
6800         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6801         in certain cases, e.g. when ROM assignment, patch provided
6802         from Albert den Haan.
6803
6804 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6805
6806         Many signedness and type propagation fixes:
6807         * src/SDCCicode.c: made geniCodeCast() static
6808         replaced SPEC_ by IS_ (cosmetic)
6809         (operandOperation): fixed div and mod operation
6810         (usualBinaryConversions): added support for promotion of char
6811         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6812         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6813         (geniCodeAdd): an array index will stay unsigned, even if promoted
6814         from char to int
6815         (geniCodeArray): ditto
6816         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6817         * src/SDCCsymt.c (computeType): added more support for char;
6818         promotion of char is selectable by promoteCharToInt, fixed signedness
6819         for all cases
6820         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6821         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6822         * src/SDCCval (val*): replaced signedness calculation by
6823         computeType()
6824         rearranged if-branches (cosmetic)
6825         (valShift): added warning W_SHIFT_CHANGED
6826         (valCompare): fixed problem with different types
6827         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6828         * support/regression/tests/literalop.c: added many cases
6829         * support/regression/tests/ast_constant_folding.c: changed finally to
6830         'unsigned int'
6831         * .version: new year, new version: 2.3.7
6832         * src/SDCCmain.c (main): applied patch #866468
6833         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6834         provided by Scott Bronson
6835         * doc/sdccman.lyx: updated documentation for sdcdb
6836         updated and added chapter tips
6837
6838 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6839
6840         * src/SDCCsymt.h: missing from yesterday's commits
6841
6842 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6843
6844         * src/SDCC.y (struct_or_union_specifier),
6845         * support/Util/SDCCerr.c,
6846         * support/Util/SDCCerr.h: verify that struct & union tags are used
6847         as declared.
6848
6849 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6850
6851         * src/SDCCglobl.h: missing from yesterday's commits
6852
6853 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6854
6855         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6856         sft_attributes, struct_declaration, parameter_declaration,
6857         type_name, start_block, declaration_list),
6858         * src/SDCC.lex (check_type): support redefinition of typedef names
6859
6860 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6861
6862         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6863         aligned xdata arrays. Erik helped me with the if clause.
6864
6865 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6866
6867         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6868         warning
6869
6870 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6871
6872         * src/SDCCast.h,
6873         * src/SDCCast.c (newAst_),
6874         * src/SDCCicode.h,
6875         * src/SDCCicode.c (ast2iCode, newiCode),
6876         * src/SDCCglobl.h,
6877         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6878         expr, statement, expression_statement, selection_statement,
6879         iteration_statement, expr_opt, jump_statement): foundation for tracking
6880         sequence points
6881         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6882         point code too)
6883
6884 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6885
6886         * support/Util/SDCCerr.c,
6887         * src/SDCCast.h,
6888         * src/SDCCast.c (createCase, createDefault, decorateType),
6889         * src/SDCClabel.c (labelUnreach),
6890         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6891         to error messages.
6892         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6893         (with thanks to Stas Sergeev)
6894         * device/include/time.h,
6895         * device/lib/time.c (CheckTime): suppress unreachable code warning
6896
6897 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6898
6899         * src/SDCCast.c (createIvalCharPtr),
6900         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6901         bug #753752)
6902         * support/regression/tests/nullstring.c: tests for these two bugs
6903
6904 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6905
6906         * support/Util/SDCCerr.h,
6907         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6908         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6909         about storage class and 'at' used inside struct or union
6910         * src/SDCCBBlock.c (iCodeFromeBBlock),
6911         * src/SDCCcse.c (ifxOptimize),
6912         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6913         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6914         printIval, emitStaticSeg, emitOverlay),
6915         * src/SDCClabel.c (deleteIfx),
6916         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6917         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6918         gatherAutoInit, processParms),
6919         * support/Util/SDCCerr.h,
6920         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6921         reporting for post-parse errors.
6922
6923 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6924
6925         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6926         implicit casts via union; they don't work on big endian systems
6927         (possible fix for bug #861138)
6928
6929 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6930
6931         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6932         * src/mcs51/main.c: fixed the fix for bug #737001
6933
6934 2003-12-15  Borut Razem <borut.razem AT siol.net>
6935
6936         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6937
6938 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6939
6940         * support/makebin/makebin.c: put output in binary mode
6941
6942 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6943
6944         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6945         xdata and data memory on startup. Set the environment variable
6946         SDCC_NOGENRAMCLEAR to disable this.
6947         * src/mcs51/peephole.def,
6948         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6949         (allows non-interrupt and interrupt code to safely compete for a resource
6950         without the non-interrupt code having to disable interrupts)
6951
6952 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6953
6954         * src/SDCCicode.c (geniCodeAdd),
6955         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6956         with valFromType if type might be a pointer and host is big endian).
6957         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6958         types, not just integer types.
6959         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6960         multiply defined with mismatching "at" address.
6961
6962 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6963
6964         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6965         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6966         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6967         with embedded nulls (fixed bug #753752)
6968
6969 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6970
6971         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6972         Apparently this did not see much testing (endless loop)
6973
6974 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6975
6976         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6977
6978 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6979
6980         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6981         gracefully handle NULL memmap pointers
6982
6983 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6984
6985         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6986         instead of deleting the iCode when an operand is volatile
6987         * src/z80/gen.c (genDummyRead),
6988         * src/mcs51/gen.c (genDummyRead),
6989         * src/ds390/gen.c (genDummyRead),
6990         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6991         not just IC_RIGHT
6992         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6993         * src/SDCC.y: fixed bug #850420
6994
6995 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6996
6997         Applied z80 i/o port patch from Peter Townson and fixed some operators
6998         to better handle operands in A register.
6999         * device/include/z180.h
7000         * src/SDCC.y
7001         * src/SDCCglue.c
7002         * src/z80/gen.c
7003         * src/z80/gen.h
7004         * src/z80/main.c
7005         * src/z80/peeph-z80.def
7006         * src/z80/peeph.def
7007         * src/z80/z80.h
7008
7009 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7010
7011         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7012
7013 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7014
7015         * device/lib/hc08/_mullong.c: Removed extra #endif
7016
7017 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7018
7019         * sim/ucsim/hc08.src/inst.cc,
7020         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7021         carries from x to h
7022         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7023         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7024         * device/include/stdarg.h: fixed varargs for hc08
7025         * device/lib/Makefile.in,
7026         * device/lib/hc08/Makefile,
7027         * device/lib/hc08/_mulint.c,
7028         * device/lib/hc08/_mullong.c: fixed some endian problems
7029
7030 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7031
7032         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7033         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7034         * device/lib/_gptrget.c,
7035         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7036
7037 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7038
7039         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7040         * src/SDCCast.c (astErrors): fixed bug #846007
7041         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7042
7043 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7044
7045         * src/SDCCast.c (decorateType): disabled a transformation I added in
7046         revision 1.188 (access to fields of a structure at an absolute address);
7047         it breaks with bitfields, extern declarations, and gcse analysis.
7048         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7049         could be assigned through a pointer, so don't complain.
7050         * src/SDCCast.c (astErrors),
7051         * src/SDCCast.h,
7052         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7053
7054 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7055
7056         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7057         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7058         output of __config directives, since gpasm now supports them
7059         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7060         pre-processor macro, i.e. -DMCU=p18f452
7061         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7062         and modified to handle 'cast' icode similarly to '=' icode
7063         * src/pic16/device.h (typedef struct PIC_device): added field
7064         'extMIface' to indicate that chip has external memory interface
7065         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7066         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7067         18F8720
7068
7069 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7070
7071         * src/SDCC.y (pointer): fixed bug #846006
7072         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7073         * src/SDCCast.c (decorateType): fixed bug #846009
7074         * src/ds390/peeph.def,
7075         * src/ds390/gen.c (genAnd, genOr),
7076         * src/mcs51/peeph.def,
7077         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7078
7079 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7080
7081         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7082         * src/SDCCdflow.c
7083         * src/SDCCcse.c
7084         * src/SDCCcse.h
7085         * src/SDCCBBlock.h
7086         * src/SDCCBBlock.c
7087
7088 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7089
7090         fixed bug #845089
7091         * src/SDCCbitv.h,
7092         * src/SDCCbitv.c: added function to free a bitvector
7093         * src/SDCClrange.h,
7094         * src/SDCClrange.c: added function to recompute the liveranges
7095         * src/avr/ralloc.c,
7096         * src/ds390/ralloc.c,
7097         * src/hc08/ralloc.c,
7098         * src/mcs51/ralloc.c,
7099         * src/pic/ralloc.c,
7100         * src/pic16/ralloc.c,
7101         * src/xa51/ralloc.c,
7102         * src/z80/ralloc.c: recompute the liveranges after register packing
7103
7104 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7105
7106         * src/SDCCloop.c (newInduction): fixed bug #845630
7107
7108 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7109
7110         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7111         inadvertantly left behind from my 2003-11-12 change
7112
7113 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7114
7115         Updated headers I neglected to commit yesterday.
7116         * src/SDCClrange.h,
7117         * src/SDCCicode.h
7118
7119 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7120
7121         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7122         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7123         * src/SDCCopt.c (eBBlockFromiCode),
7124         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7125         the creation of the key hash table from the sequencing so it can be used
7126         earlier (for some GCSE bug fixes still pending)
7127
7128 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7129
7130         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7131         * support/regression/tests/addsub.c: testing genPlus shortcut
7132
7133 2003-11-15  Borut Razem <borut.razem AT siol.net>
7134
7135         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7136
7137 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7138
7139         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7140         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7141         ordering is immaterial.
7142         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7143
7144 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7145
7146         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7147         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7148         (SIGSEV) of bug #840381
7149         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7150         unlink new file before rename if new and old filenames are the same)
7151
7152 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7153
7154         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7155         uninitialized variables) for the mcs51. Set environment variable
7156         SDCC_GENRAMCLEAR to test.
7157         xdata initialization slightly shorter
7158
7159 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7160
7161         * src/SDCCsymt.h,
7162         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7163         #838241 & 780691 (basicly the same bug)
7164         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7165         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7166
7167 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7168
7169         * src/SDCCmain.c (linkEdit): "fix" #834252
7170
7171 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7172
7173         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7174         * src/SDCCast.h,
7175         * src/SDCC.y: fixed bug #819403
7176
7177 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7178
7179         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7180         the reentrant attribute.
7181         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7182         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7183         simulation
7184         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7185         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7186         erroneously reduced to a literal.
7187         * src/hc08/ralloc.c (packRegisters, rematStr),
7188         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7189         some cases
7190
7191 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7192
7193         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7194         * doc/sdccman.lyx: changed from 'article' to 'book'
7195         * doc/Makefile: readded test_suite_spec and cdbfileformat
7196
7197 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7198
7199         * device/include/stdlib.h: include malloc.h to comply with ANSI
7200         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7201
7202 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7203
7204         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7205         * doc/clean.mk: also remove *.out files
7206         * doc/sdccman.lyx: some additions, larger top/bottom margins
7207
7208 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7209
7210         * src/SDCC.y: fixed bug #837365
7211         * support/regression/tests/bitopcse.c
7212         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7213         a symbol (might be valop instead)
7214         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7215         * device/lib/clean.mk: added hc08 to the cleaning list
7216
7217 2003-11-04  Borut Razem <borut.razem AT siol.net>
7218
7219         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7220           made 2003-11-04
7221         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7222           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7223           malloc is declared in standard stdlib.h
7224
7225 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7226
7227         * device/lib/hc08/Makefile: need to clean .rel not .o files
7228         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7229
7230 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7231
7232         * src/port.h,
7233         * src/hc08/main.c,
7234         * src/mcs51/main.c,
7235         * src/ds390/main.c,
7236         * src/z80/main.c,
7237         * src/avr/main.c,
7238         * src/pic/main.c,
7239         * src/pic16/main.c,
7240         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7241         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7242         tests (which uses the port's oclsExpense function)
7243         * src/SDCC.y,
7244         * src/SDCCast.c,
7245         * src/SDCCicode.c,
7246         * src/hc08/gen.c,
7247         * src/ds390/gen.c,
7248         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7249
7250 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7251
7252         * src/SDCCcse.c (ifxOptimize),
7253         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7254         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7255         deleting the IFX iCode.
7256         * src/hc08/ralloc.c: reduced unneeded slocs
7257         * src/hc08/gen.c: fixed bug in asmopToBoolean
7258
7259 2003-11-04  Borut Razem <borut.razem AT siol.net>
7260
7261         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7262           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7263           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7264           transferred to configure
7265
7266 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7267
7268         Use headers defined in the C[++] standards:
7269         * sim/ucsim/gui.src/serio.src/fileio.cc
7270         * sim/ucsim/gui.src/serio.src/frontend.cc
7271         * sim/ucsim/gui.src/serio.src/main.cc
7272         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7273         * support/Util/NewAlloc.c
7274         * as/hc08/lklibr.c
7275         * as/mcs51/lklibr.c
7276         * as/z80/aslist.c
7277         * as/z80/assym.c
7278
7279 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7280
7281         * Added MSVC projects for hc08 assembler and linker:
7282         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7283         /as/hc08/link_hc08.dsp
7284
7285 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7286
7287         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7288
7289 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7290
7291         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7292
7293 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7294
7295         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7296
7297 2003-10-31  Borut Razem <borut.razem AT siol.net>
7298
7299         * support/cpp2/cpplib.h,
7300           support/cpp2/cpplib.c,
7301           support/cpp2/cpplex.c,
7302           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7303           to switch _asm block preprocessing on / off. Default is
7304           #pragma preproc_asm +
7305
7306 2003-10-31  Borut Razem <borut.razem AT siol.net>
7307
7308         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7309           when outputting comment blocks (when executed with -C option) and
7310           _asm (SDCPP specific) blocks
7311
7312 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7313
7314         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7315
7316 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7317
7318         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7319
7320 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7321
7322         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7323         * src/SDCCast.c (decorateType): fixed bug #832664
7324
7325 2003-10-31  Borut Razem <borut.razem AT siol.net>
7326
7327         * support\cpp2\cpplex.c: fixed for SDCPP:
7328           comments(when executed with -C option) and _asm blocks
7329           were included even if they where in skipped #if block.
7330           Applied solution from GCC cpp 3.3.2
7331
7332 2003-10-31  Borut Razem <borut.razem AT siol.net>
7333
7334         * src/SDCC.lex: sdcc now understands both formats:
7335           '# <line_number> <file_name>' and
7336           '#line <line_number> <file_name>'
7337         * support/cpp2/cppmain.c: sdcpp now generates the standard
7338           '# <line_number> <file_name>' instead of former
7339           '#line <line_number> <file_name>'
7340
7341 2003-10-30  Borut Razem <borut.razem AT siol.net>
7342
7343         * support/cpp2/cpphash.h,
7344         * support/cpp2/cpplib.h
7345         * support/cpp2/cpplex.c,
7346         * support/cpp2/cppmain.c,
7347         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7348
7349 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7350
7351         Fixed a number of problems revealed by bug #827883.
7352         * src/SDCCloop.c (loopInvariants): Spill location of the
7353         result operand should be recomputed if extracted from
7354         a loop. Also, don't extract assignments of an iTemp
7355         from a literal.
7356         * src/SDCCast.c (isConformingBody): loop reversal should
7357         not occur if the control variable is involved with a
7358         relational operator.
7359
7360 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7361
7362         * .version: bumped to 2.3.6 to reflect the big improvements
7363         made by Erik and Klaus. Thanks!
7364
7365 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7366
7367         Replaced the livrange code.
7368         * src/SDCClrange.c: added new LR code
7369         * src/SDCCloop.c,
7370         * src/SDCCBBlock.h: removed remainig parts from old LR code
7371         * src/ds390/ralloc.c,
7372         * src/ds390/gen.c: minor fixes to make it work with new code
7373
7374 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7375
7376         * as/hc08/asm.h,
7377         * as/hc08/lkrloc.c,
7378         * src/hc08/gen.c,
7379         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7380         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7381         (tweaked fix for bug #818696)
7382
7383 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7384
7385         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7386
7387 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7388
7389         * src/SDCCmain.c,
7390         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7391         * src/mcs51/gen.c (gencjneshort),
7392         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7393         more efficient (per Scott Bronson's suggestion)
7394
7395 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7396
7397         Extended the semantics of the critical keyword to include
7398         individual statements. See RFE #827755 and #799831
7399         * src/SDCC.y
7400         * src/SDCCicode.c
7401         * src/SDCCopt.c
7402         * src/SDCCast.c
7403         * support/Util/SDCCerr.c
7404         * support/Util/SDCCerr.h
7405         * src/mcs51/gen.c
7406         * src/ds390/gen.c
7407         * src/hc08/gen.c
7408
7409 2003-10-19  Borut Razem <borut.razem AT siol.net>
7410
7411         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7412
7413 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7414
7415         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7416         Fixed bug #818696
7417         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7418         and predecrement operand is displayed
7419
7420 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7421
7422         * src/SDCCval.c (valMinus): fixed bug #826041
7423
7424 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7425
7426         Some hc08 related updates that I missed earlier
7427         * sim/ucsim/stypes.h
7428         * support/regression/ports/hc08/spec.mk
7429
7430 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7431
7432         New target "hc08" for the Motorola 68hc08 family of micros
7433
7434         * configure
7435         * configure.in
7436         * Makefile
7437         * src/hc08/*
7438         * src/SDCCmain.c
7439         * src/port.h
7440         * sim/ucsim/hc08.src/*
7441         * sim/ucsim/configure.in
7442         * src/ucsim/configure
7443         * sim/ucsim/packages_in.mk
7444         * as/hc08/*
7445         * as/Makefile
7446         * device/include/mc68hc908qy.h
7447         * device/lib/hc08/*
7448         * device/lib/Makefile.in
7449         * support/regression/ports/hc08/*
7450         * support/regression/Makefile
7451
7452 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7453
7454         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7455         regression test
7456         * src/ds390/gen.c (genCast): fixed bug #821957
7457
7458 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7459
7460         * device/lib/logf.c: "fixed" overlay bug
7461         * support/regression/ports/host/spec.mk: added m library
7462         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7463         * support/regression/tests/float_trans: added (for Eric)
7464
7465 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7466
7467         * src/mcs51/gen.c (genCpl): fixed bug
7468         http://sf.net/mailarchive/message.php?msg_id=6263915
7469
7470 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7471
7472         * src/SDCCast.c (decorateType): added extended constant folding
7473         * src/SDCCsymt.c (computeType): cleanup
7474         * src/SDCCval.c (valShift): minor optimization
7475         * support/regression/tests/ast_constant_folding.c: added
7476
7477 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7478
7479         * src/SDCCmain.c: removed some unintended changes
7480
7481 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7482
7483         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7484         * src/z80/gen.c: fixed part of bug #817589
7485         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7486
7487 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7488
7489         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7490         * src/SDCCcflow.c
7491         * src/SDCCcse.c
7492         * src/SDCCdflow.c
7493         * src/SDCClabel.c
7494         * src/SDCClrange.c
7495         * src/SDCCmem.c
7496         * src/SDCCopt.c
7497         * src/SDCCpeeph.c
7498         * src/SDCCset.c
7499         * src/avr/ralloc.c
7500         * src/ds390/ralloc.c
7501         * src/izt/ralloc.c
7502         * src/mcs51/ralloc.c
7503         * src/pic/ralloc.c
7504         * src/pic16/ralloc.c
7505         * src/xa51/ralloc.c
7506         * src/z80/ralloc.c
7507         * src/z80/gen.c: removed unused label "release:"
7508
7509 2003-10-06  Borut Razem <borut.razem AT siol.net>
7510
7511         * src/SDCC.lex: removed definition of unused variables
7512           save_optimize and save_options
7513
7514 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7515
7516         * clean.mk: removed '=' in "-maxdepth=1"
7517         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7518         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7519
7520 2003-10-06  Borut Razem <borut.razem AT siol.net>
7521
7522         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7523           my_unput() replaced by unput()
7524
7525 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7526
7527         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7528         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7529         type-punned pointer will break strict-aliasing rules"
7530         Old LR behaviour is again default; Klaus' LR can be choosen by
7531         defining the environment variable LRKLAUS
7532         * src/SDCCBBlock.h
7533         * src/SDCCloop.c
7534         * src/SDCClrange.c
7535         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7536         * clean.mk: fixed removal of files in bin/CVS/
7537         * device/lib/clean.mk: fixed removal of directories small and large
7538         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7539         * src/SDCCicode.c,
7540         * src/SDCCval.c: removed superflous test for pedantic
7541
7542 2003-10-05  Borut Razem <borut.razem AT siol.net>
7543
7544         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7545           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7546           message "unmatched #pragma SAVE and #pragma RESTORE"
7547
7548 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7549
7550         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7551           assembly, critical functions, atomic, nojtbound)
7552
7553 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7554
7555         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7556         * src/SDCCBBlock.h
7557         * src/SDCCloop.c
7558         * src/SDCCloop.h
7559         * src/SDCClrange.c
7560
7561 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7562
7563         * src/z80/gen.h,
7564         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7565         * src/mcs51/gen.h
7566         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7567         * src/ds390/gen.h
7568         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7569         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7570         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7571
7572 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7573
7574         * src/z80/gen.c (genRet): fixed bug #524753
7575         * src/z80/gen.c (genCast): fixed internal error on cast from
7576         pointer to long
7577         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7578         fix for bug #477835 to the z80
7579         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7580         for tracking iCodes in the peephole optimizer for z80
7581
7582 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7583
7584         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7585         the other part of bug #814548
7586         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7587
7588 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7589
7590         * src/SDCCcse.c: fixed part of bug #814548
7591
7592 2003-09-28  Borut Razem <borut.razem AT siol.net>
7593
7594         * src/asm.c: rewrite of printILine() to use temporary file instead
7595           a pipe
7596         * src/xa51/main.c: commented out declaration of int rewinds
7597
7598 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7599
7600         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7601
7602 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7603
7604         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7605         * src/asm.c (printILine): Fixed bug #811015
7606
7607 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7608
7609         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7610         freeing.
7611
7612 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7613
7614         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7615         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7616         to correctly handle general case of AOP_PAIRPTR
7617         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7618
7619 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7620
7621         * src/mcs51/ralloc.c (fillGaps),
7622         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7623         register positioning bug)
7624
7625 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7626
7627         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7628
7629 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7630
7631         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7632         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7633         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7634         (ralloc doesn't intentionally do this now, but perhaps later)
7635         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7636         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7637         register positioning bugs (Fixed bug #762602 and #795325)
7638         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7639         (Fixed bug #808779)
7640         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7641         lines that --i-code-in-asm generates
7642
7643 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7644
7645         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7646         trying to fclose a FILE* that was already closed.
7647
7648 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7649
7650         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7651         of const struct should be treated as if const themselves)
7652
7653 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7654
7655         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7656
7657 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7658
7659         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7660         Unix (/n) and DOS (/r/n) line terminations.
7661
7662 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7663
7664         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7665         bug #613775
7666
7667 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7668
7669         * src/mcs51/gen.c (genFunction, genEndFunction),
7670         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7671         and restore of EA so that stack offsets to parameters are
7672         correct when using both critical and reentrant/stack-auto.
7673         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7674         size (can be triggered in error if sloc is shared between
7675         different sized objects)
7676         * device/include/float.h: fixed macros to explicitly use
7677         unsigned long where needed
7678
7679 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7680
7681         Feature req. 799831: added code to allow nesting of critical functions
7682         * src/mcs51/gen.c (genFunction, genEndFunction)
7683         * src/ds390/gen.c (genFunction, genEndFunction)
7684
7685 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7686
7687         * src/SDCCsymt.c (sclsFromPtr),
7688         * src/SDCCsymt.h,
7689         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7690         support for standard C idiom of memory mapped variables; for
7691         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7692         to xdata int at 0x1234 tempvar = 1.
7693         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7694         provided by Akiya ISHIDA
7695
7696 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7697
7698         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7699         * src/SDCCval.c (constVal): added reduction from int to char
7700         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7701         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7702         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7703         to ignore the sign
7704         * support/regression/tests/shifts.c: fixed
7705
7706 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7707
7708         * src/z80/gen.c (genXor): Fixed bug #805445
7709
7710 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7711
7712         Fixed bug #621531 (const & volatile confusion in the type chain).
7713         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7714         refer to the const or volatile state of the pointer itself.
7715
7716         * src/SDCCast.c
7717         * src/SDCCglue.c
7718         * src/SDCCicode.c
7719         * src/SDCCsymt.c
7720         * src/SDCCval.c
7721         * src/SDCC.y
7722         * src/SDCCsymt.h
7723         * src/pic/gen.c
7724         * src/pic/ralloc.c
7725         * src/pic16/gen.c
7726         * src/pic16/ralloc.c
7727         * support/regression/tests/const.c
7728
7729 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7730
7731         When checking for duplicated modules, use absolute paths
7732         instead of relative paths.  Files changed:
7733
7734         * as/mcs51/lklib.c
7735         * link/z80/lklib.c
7736
7737 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7738
7739         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7740
7741 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7742
7743         * device/include/string.h: added size_t typedef, changed
7744         prototypes to use size_t, eliminated separate reentrant and
7745         non-reentrant declarations, added _memmove declaration
7746         * device/lib/_memcpy.c: changed to use size_t instead of int,
7747         changed /4 to >>2 to avoid division library call
7748         * device/lib/_memcmp.c,
7749         * device/lib/_memset.c,
7750         * device/lib/_strncat.c,
7751         * device/lib/_strncpy.c,
7752         * device/lib/_strncmp.c: changed to use size_t instead of int
7753         * device/lib/_memmove.c: new file (fixed bug #772294)
7754         * device/lib/Makefile.in: added _memmove.c
7755         * device/lib/z80/asm_strings.s: fixed bug #772290
7756         * support/regression/tests/bitfields.c: attempt to fix host assertion
7757         failure on amd64-unknown-linux2.2
7758
7759 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7760
7761         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7762         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7763         * as/z80/asmain.c (main): fixed bug #801766
7764
7765 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7766
7767         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7768         compilers
7769
7770 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7771
7772         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7773         reported in bug #800609
7774
7775 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7776
7777         * Top header beautifications in src/pic16 directory:
7778           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7779           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7780           pcoderegs.h, ralloc.c, ralloc.h
7781         * main.c: added top header and GPL license notice
7782         * pcode.c: fixed the if-conditional warning
7783
7784 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7785
7786         * device/lib/_mullong.c: replaced int by short for gcc
7787
7788 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7789
7790         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7791         and JUMPTABLE iCodes properly now (worked by accident before)
7792         * src/mcs51/gen.c (leftRightUseAcc),
7793         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7794         iCode properly now. Use getSize instead of nRegs since a & b
7795         aren't part of the nRegs tally.
7796
7797 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7798
7799         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7800         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7801           before instructions that use the _STATUS register
7802
7803 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7804
7805         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7806         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7807         fetching of the pointer
7808         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7809         copied from genNearPointerSet()
7810         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7811         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7812         If they pop r0/r1 they must be called in the opposite order than aopOp().
7813         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7814         (resp. --stack-auto), prepared for --xstack
7815
7816 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7817
7818         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7819
7820 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7821
7822         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7823         these ports have their own __sdcc_external_start()
7824
7825 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7826
7827         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7828         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7829         type for bits was changed. It resulted in bit variables becoming
7830         global, which is not permitted in PIC 14 assembly output.
7831
7832 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7833
7834         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7835
7836 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7837
7838         Z80 and MCS51 linkers complaint if a public symbol is defined
7839         in more than one library module:
7840
7841         * as/mcs51/lklib.c
7842         * link/z80/lklib.c
7843         * as/mcs51/Makefile.in
7844
7845 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7846
7847         A few small changes that speed up the peephole optimizer.
7848
7849         * src/SDCCpeeph.c
7850
7851 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7852
7853         Try to make the peephole optimizer smarter by maintaining
7854         an association between the assembly source code and the
7855         iCodes that originated them. Put this information to use
7856         with a new peephole rule condition "notVolatile" so that
7857         the rules can be aggressive yet still safe.
7858
7859         * src/SDCCpeeph.c
7860         * src/SDCCpeeph.h
7861         * src/mcs51/gen.c
7862         * src/mcs51/peeph.def
7863
7864 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7865
7866         Fixed bug #741761
7867
7868         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7869         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7870         if the left or right operand symbols have the accuse flag set.
7871
7872 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7873
7874         Changed the type of the result of the ! (NOT) operator to char;
7875         previously it returned the same type as the source. This allows
7876         us to eliminate all the genFloatNot functions (all of its target
7877         implementations were very buggy) since !float can use the same
7878         code as !long now.
7879
7880         * src/SDCCicode.c (ast2iCode): ! returns char
7881         * src/mcs51/gen.c (genNot, genNotFloat),
7882         * src/ds390/gen.c (genNot, genNotFloat),
7883         * src/z80/gen.c (genNot, genNotFloat),
7884         * src/pic/gen.c (genNot, genNotFloat),
7885         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7886
7887 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7888
7889         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7890         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7891            during interrupts. Ensure WSAVE is located at a shared bank address.
7892         2. Fixed page selection in some places
7893         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7894            the registers name strings.
7895         4. Fixed "signed / unsigned compare" compiler warnings.
7896         5. The PIC port manages its own allocation of the general purpose
7897            registers, but makes no attempt to reuse them. As a result when
7898            compiling it soon runs out of general purpose registers. Some
7899            additional code was added to the files pcode.c and device.c to walk
7900            through the function call tree and rename the registers so that they
7901            get reused.
7902
7903         * src/pic/device.c
7904         * src/pic/gen.c
7905         * src/pic/glue.c
7906         * src/pic/pcode.c
7907         * src/pic/pcode.h
7908         * src/pic/ralloc.c
7909         * src/pic/ralloc.h
7910         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7911         genPlus() & genMinus() when the result is the same as left or right
7912
7913 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7914
7915         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7916
7917 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7918
7919         Made bitfield a distinct type from bit so that bitfields
7920         convert as per ANSI C and bits retain their traditional
7921         boolean style behaviour. Implemented bitfield support in
7922         the z80 port.
7923
7924         * src/SDCCsymt.h,
7925         * src/SDCCsymt.c,
7926         * src/SDCCast.c,
7927         * src/cdbFile.c,
7928         * src/mcs51/gen.c,
7929         * src/ds390/gen.c: bit v bitfield split
7930         * src/z80/gen.c: New support for bitfields
7931         * support/regression/tests/bitfields.c: reenabled z80,
7932         added more tests
7933
7934 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7935
7936         Rules 246.x, 247.x relate to bitfields, the others speed up
7937         access to xdata mapped I/O devices.
7938
7939         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7940
7941 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7942
7943         Cleaned up genPackBits and genUnpackBits and added two helper
7944         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7945         for literal assignments in genPackBits (thanks to Frieder for
7946         reminding me).
7947
7948         * src/mcs51/gen.c
7949         * src/ds390/gen.c
7950
7951 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7952
7953         Fixed bug #748310 (pointer to function type mishandled when the
7954         function name is omitted). Also fixed a SIGSEGV when a function
7955         attribute (reentrant, etc) is used on a non-function or on a
7956         function but misplaced before the parameter list.
7957
7958         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7959         bug #748310
7960         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7961         * support/Util/SDCCerr.h,
7962         * support/Util/SDCCerr.c: Added func attr misuse error msg
7963
7964 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7965
7966         Fixed bug #787649 by anonymous
7967         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7968         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7969
7970 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7971
7972         Fixed numerous bitfield problems.
7973
7974         * src/SDCC.y: More bitfield related error checking
7975         * src/SDCCsymt.h,
7976         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7977         * support/Util/SDCCerr.h,
7978         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7979         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7980         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7981         * support/regression/tests/bitfields.c: tests added
7982
7983 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7984
7985         Made the constant following the "interrupt" keyword optional. If
7986         omitted, the function will not automatically be given an entry
7987         in the interrupt vector table (similar to #pragma NOIV, but
7988         less syntacticly kludgy). The interrupt number is also now
7989         range checked. Also fixed a bug in the high order bit example
7990         in the manual.
7991
7992         * src/SDCC.y
7993         * src/SDCCmem.c
7994         * src/SDCCglue.c
7995         * src/SDCCsymt.h
7996         * support/Util/SDCCerr.c
7997         * support/Util/SDCCerr.h
7998         * doc/sdccman.lyx
7999
8000 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8001
8002         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8003         * src/SDCCicode.c (operandOperation): rewritten some ops
8004         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8005         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8006         other type
8007         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8008         be re-activated by defining REDUCE_LITERALS)
8009         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8010         unsigned, but are signed by default
8011         * src/SDCCval.c (constVal): rearranged
8012         * src/SDCCval.c (valMod): preliminary fix
8013         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8014         * support/regression/literalop.c: added, work in progress
8015
8016 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8017
8018         Generate warnings for useless declarations like "char data;"
8019         that don't do what new users expect.
8020
8021         * src/SDCC.y
8022         * support/Util/SDCCerr.h
8023         * support/Util/SDCCerr.c
8024
8025 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8026
8027         * src/SDCCval.c (valMult): fix overflow detection of negative int
8028
8029 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8030
8031         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8032
8033         Changes to support big endian targets:
8034
8035         * src/ports.h
8036         * src/SDCCglue.c
8037         * src/avr/main.c
8038         * src/ds390/main.c
8039         * src/izt/i186.c
8040         * src/mcs51/main.c
8041         * src/pic/main.c
8042         * src/pic16/main.c
8043         * src/xa51/main.c
8044         * src/z80/main.c
8045
8046 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8047
8048         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8049         * device/lib/time.c: fixed warning "integer overflow in expression"
8050
8051 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8052
8053         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8054         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8055         constants are unsigned; added recognition of "u" flag for unsigned
8056         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8057         * src/SDCCval.c (valDiv, valMod): fixed signdness
8058         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8059         signedness of modulo, left and right shift
8060         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8061         * support/Util/SDCCerr.h: added warning W_INT_OVL
8062         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8063         * src/SDCCast.c (ast_print): improved output of constants
8064
8065 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8066
8067         Fixed some warnings when building with MSVC:
8068
8069         * as\mcs51\asdata.c
8070         * as\z80\asdata.c
8071         * as\mcs51\asm.h
8072         * as\z80\asm.h
8073         * link\z80\aslink.h
8074         * link\z80\lkdata.c
8075         * link\z80\lkeval.c
8076         * link\z80\lkgb.c
8077         * link\z80\lkihx.c
8078         * link\z80\lks19.c
8079         * link\z80\lksym.c
8080         * support\cpp2\cpplib.c
8081         * src\ds390\gen.c
8082         * src\mcs51\gen.c
8083
8084 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8085
8086         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8087
8088 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8089
8090         * support\librarian\clean.mk: Do not remove Makefile.
8091         * support\librarian\Makefile: added.
8092
8093 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8094
8095         Added librarian to MSVC build:
8096         * all.dsp
8097         * sdcc.dsw
8098         * support\librarian\librarian.dsp
8099
8100         'configure' not needed for librarian, removed:
8101         * support\librarian\configure
8102         * support\librarian\configure.in
8103         * support\librarian\config_in.h
8104         * support\librarian\Makefile.in
8105
8106         Hopefully these ones built the librarian and the rest of sdcc properly:
8107         * Makefile
8108         * Makefile.common.in
8109
8110         Messed up 'configure', so revert to previous version:
8111         * configure
8112         * configure.in
8113
8114 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8115
8116         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8117         there, while the mantissa of a double is "only" 53 bits wide.
8118
8119 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8120
8121         Adding sdcclib to the build.  MSVC project coming soon.
8122         Files added/changed:
8123
8124         * support\librarian\clean.mk
8125         * support\librarian\configure
8126         * support\librarian\configure.in
8127         * support\librarian\config_in.h
8128         * support\librarian\Makefile.bcc
8129         * support\librarian\Makefile.in
8130         * support\librarian\sdcclib.c
8131         * Makefile.bcc
8132         * Makefile
8133         * Makefile.common.in
8134         * configure
8135         * configure.in
8136
8137 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8138
8139         Linker now complaints if linked modules have conflicting options, for
8140         example, one compiled using --model-large and another one compiled with
8141         --model-small.  The following files were modified:
8142
8143         * as\mcs51\asdata.c
8144         * as\mcs51\aslink.h
8145         * as\mcs51\asm.h
8146         * as\mcs51\asmain.c
8147         * as\mcs51\asout.c
8148         * as\mcs51\i51pst.c
8149         * as\mcs51\lkdata.c
8150         * as\mcs51\lklibr.c
8151         * as\mcs51\lkmain.c
8152         * as\z80\asdata.c
8153         * as\z80\asm.h
8154         * as\z80\asmain.c
8155         * as\z80\asout.c
8156         * as\z80\z80pst.c
8157         * link\z80\aslink.h
8158         * link\z80\lkdata.c
8159         * link\z80\lklibr.c
8160         * link\z80\lkmain.c
8161         * src\SDCCglue.c
8162
8163 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8164
8165         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8166         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8167
8168 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8169
8170         * src/z80/mappings.i: fix _mul[us][int,long] entries
8171
8172 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8173
8174         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8175
8176 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8177
8178         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8179         * support/regression/tests/bitopcse.c: added
8180         fixed warning:
8181         * src/avr/gen.c:
8182         * src/pic/gen.c:
8183         * src/pic16/gen.c:
8184         * src/z80/gen.c:
8185         * src/xa51/gen.c:
8186
8187 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8188
8189         added support for new library format to z80, gbz80 linkers:
8190         *link/z80/aslink.h
8191         *link/z80/lklex.c
8192         *link/z80/lklib.c
8193         *link/z80/lklist.c
8194
8195 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8196
8197         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8198         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8199
8200 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8201
8202         added DUMMY_READ_VOLATILE:
8203         * src/SDCC.y:
8204         * src/avr/gen.c:
8205         * src/xa51/gen.c:
8206         * src/z80/gen.c:
8207         * src/pic/gen.c:
8208         * src/pic16/gen.c:
8209         * src/mcs51/gen.c:
8210         * src/ds390/gen.c:
8211         * src/SDCCcse.c (algebraicOpts): many improvements
8212         * src/SDCCcse.h: removed algebraicOpts()
8213         * src/SDCCicode.c (picDummyRead): added
8214
8215 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8216
8217         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8218         "Insufficient space in data memory".
8219
8220 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8221
8222         * src/mcs51/gen.c: fixed bug #771358
8223         * src/z80/gen.c: fixed bug #759087
8224
8225 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8226
8227         * src/pic16/glue.c: minor cleanup by Vangelis
8228
8229 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8230
8231         * device/include/regc515c.h: fixed #758477
8232         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8233         * device/lib/_gptrput.c: saved a few bytes
8234         * my tab spacing is 8, yours too?)
8235         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8236         * device/lib/serial.c: process RX bytes earlier than TX bytes
8237         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8238
8239 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8240
8241         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8242
8243 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8244
8245     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8246
8247 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8248
8249         * device/lib/Makefile.in: bad fix, reverted to 1.43
8250
8251 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8252
8253         * device/lib/Makefile.in: added missing z80 object files
8254
8255 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8256
8257         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8258         pic16 progress by Vangelis:
8259         * src/SDCCglobl.h:
8260         * src/SDCCmain.c:
8261         * src/pic/Makefile:
8262         * src/pic:
8263         * pic/Makefile:
8264         * pic16/device.c:
8265         * pic16/device.h:
8266         * pic16/gen.c:
8267         * pic16/gen.h:
8268         * pic16/genarith.c:
8269         * pic16/glue.c:
8270         * pic16/main.c:
8271         * pic16/pcode.c:
8272         * pic16/pcode.h:
8273         * pic16/pcodepeep.c:
8274         * pic16/peeph.def:
8275
8276 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8277
8278     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8279
8280 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8281
8282     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8283     added gbz80 build to MSVC project.
8284     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8285     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8286     from 8051 stuff and setup so it links using a .lnk file.
8287
8288 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8289
8290     * support/librarian/sdcclib.c: sdcc librarian.
8291     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8292     with sdcclib.
8293
8294 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8295
8296     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8297
8298 2003-07-02  Borut Razem <borut.razem AT siol.net>
8299
8300         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8301         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8302         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8303         src/xa51/main.c, src/z80/main.c:
8304         virtualization of glue() function: each port has it's own glue function,
8305         which is accessed by do_glue function pointer in PORT.general structure
8306
8307 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8308
8309         * DS800C400 fun, improved ROM interface and tinibios.
8310
8311 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8312
8313         * More support for DS80C400. Now includes beginning of interface to ROM.
8314
8315 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8316
8317         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8318
8319 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8320
8321         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8322
8323 2003-06-19  Borut Razem <borut.razem AT siol.net>
8324
8325         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8326
8327 2003-06-19  Borut Razem <borut.razem AT siol.net>
8328
8329         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8330         fixed Z80 port - crt0.o: cannot open.
8331
8332 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8333
8334         * support/Util/MySystem.c (merge_command): revert bad fix
8335
8336 2003-06-18  Borut Razem <borut.razem AT siol.net>
8337
8338         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8339
8340 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8341
8342         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8343         option --use-stdout sends errors to stdout instead of stderr.
8344
8345 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8346
8347         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8348
8349 2003-06-15  Borut Razem <borut.razem AT siol.net>
8350
8351         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8352         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8353         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8354         fixed width array of pointers replaced with sets;
8355         multiple include and lib paths ared transferred to preprocessor and linker
8356         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8357         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8358         fixed width array of pointers
8359         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8360         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8361         fixupPath(), getPathDifference()
8362         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8363         fixed width array of pointers
8364
8365 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8366
8367         * src/pic16/ralloc.c: fix warnings
8368         * src/pic16/pcode.c: fix warning
8369
8370 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8371
8372          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8373         know all the details, but essentially this set of changes enable
8374         the pic16 port to generate movff instructions and generate assembler
8375         directives,
8376         * src/SDCCmain.c:
8377         * src/pic16/gen.c:
8378         * src/pic16/glue.c:
8379         * src/pic16/pcode.c:
8380         * src/pic16/device.c:
8381         * src/pic16/main.c:
8382         * src/pic16/pcode.h:
8383         * src/pic16/pcoderegs.c:
8384         * src/pic16/ralloc.c:
8385         * src/pic16/ralloc.h:
8386
8387 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8388
8389         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8390         added option --vc, so sdcc errors and warnings are compatible with
8391         Microsoft Visual Studio.
8392
8393 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8394
8395         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8396           device/lib/libfloat.lib: added atof function.
8397
8398 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8399
8400         * doc/sdccman.lyx: updated to Lyx 1.3
8401         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8402         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8403         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8404
8405 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8406
8407         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8408
8409 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8410
8411         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8412           additions to the "related tools/documentation" section
8413
8414 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8415
8416         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8417
8418 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8419
8420         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8421         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8422
8423 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8424
8425         * doc/sdccman.lyx: fix double dash and other minor things
8426         * doc/Makefile: fix double dash
8427
8428 2003-05-28  Karl Bongers(patches from Martin Helmling)
8429         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8430           condition and ignore commands.
8431
8432 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8433
8434         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8435           is in parts still quite out of date, I did changes as far as I felt makes sense
8436           for a non-native english speaker.
8437           Please feel free to add to the manual or to correct my changes.
8438         * doc/Makefile: undid touching the date of intermediate tex files.
8439
8440 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8441
8442         * doc/sdccman.lyx: Manual has an index now
8443
8444 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8445
8446         Finalize muluint/mulsint and mululong/mulslong merging:
8447         * device/lib/_mulint.c
8448         * device/lib/_mullong.c
8449         * device/lib/gbz80/mul.s
8450         * device/lib/gbz80/stubs.s
8451         * device/lib/z80/mul.s
8452         * device/lib/z80/stubs.s
8453         * src/SDCCsymt.c (initCSupport)
8454
8455 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8456
8457         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8458         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8459           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8460           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8461           instead of /Zm500.
8462
8463 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8464
8465         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8466           the regression tests I'm not brave enough to enable 245.b, 245.c
8467         * doc/sdccman.lyx: added latex preamble for hyperref package.
8468           Using pdflatex this will give you a hyperlinked pdf file with
8469           bookmarks. (prepend '%' before /usepackage if this breaks something)
8470
8471 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8472
8473          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8474
8475 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8476
8477         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8478
8479 2003-05-21    <johan AT balder>
8480
8481         * src/SDCCglue.c (printIval): fixed bug #739934
8482
8483 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8484
8485         Applied patch from bug 737905 (renamed yylineo to mylineno):
8486         * src/altlex.c
8487         * src/SDCCast.c
8488         * src/SDCglobl.h
8489         * src/SDCC.lex
8490         * src/SDCCsymt.c
8491         * src/SDCCval.c
8492         * src/pic16/pcode.c: Cleaned warnings
8493         * src/pic16/pcodeflow.c: Cleaned warnings
8494         * src/pic16/pcoderegs.c: Cleaned warnings
8495
8496 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8497
8498         * src/pic16/pcode.c: Cleaned warnings
8499         * src/pic16/pcodepeep.c: Cleaned warnings
8500         * src/pic16/ralloc.c: Cleaned warnings
8501
8502 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8503
8504         * doc/sdccman.lyx: fixed bug 739745
8505         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8506
8507 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8508
8509         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8510         it can be defined with CFLAGS when running configure
8511         * src/SDCCmain.c: fixed compiling + linking with object files
8512
8513 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8514
8515         * configure.in: configure for pic16 port,
8516             added --disable-pic16-port
8517         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8518         * src/SDCCmain.c: linkOptions is changed to set *,
8519             added if/endif conditional macros to remove options help
8520             messages from optionsTable when a port is not configured, added
8521             support for the PIc16 port in the ports table, when executing
8522             the compiler with no port specified on command line, a default
8523             port is selected with the new macro DEFAULT_PORT which is
8524             defined in port.h, in setDefaultOptions() linkOptions is removed
8525             from initialization assignment, since now it is a set,
8526             parseCmdLine uses setParseWithComma for linkOptions, in
8527             linkEdit() linkOptions are accessed with new function indexSet()
8528             which returns the i'th item of a set variable. See SDCCset.c, in
8529             linkEdit() when calling buildCmdLine(), added linkOptions as
8530             last argument. Now users can pass arguments to gplink via the
8531             -Wl option, main() uses pic16glue() to glue up pic16 programs
8532         * src/SDCCpeeph.c: various changes to support pic16
8533         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8534             return the i'th item of the set
8535         * src/SDCCset.h: added function prototype for indexSet()
8536         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8537         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8538         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8539             added macro DEFAULT_PORT
8540         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8541         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8542             generated
8543         * src/pic16/glue.c: commented out some error producing lines
8544         * src/pic16/main.c: __config directives are commented out to stop
8545             gpasm complaining and test the linkage with gplink, _linkCmd and
8546             _asmCmd changed to be more gplink and gpasm friendly
8547         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8548             produced an error when parsed, peep rule 12 is added to utilize
8549             movff, but it is commented out since the pCode does not support
8550             yet a command with 2 address arguments
8551
8552 2003-05-18    <johan AT balder>
8553
8554         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8555         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8556 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8557
8558         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8559   Added feature to script commands from file.
8560
8561 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8562
8563         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8564         * src/SDCCutil.c: include ctype.h for win32
8565
8566 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8567
8568         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8569
8570 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8571
8572         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8573   Fixed so you can set breakpoints prior to run, run does not stop
8574   on entry now.  Add tbreak.  Other enhancements and fixes for use
8575   with ddd.
8576
8577 2003-05-12  Borut Razem <borut.razem AT siol.net>
8578
8579         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8580
8581 2003-05-11  Borut Razem <borut.razem AT siol.net>
8582
8583         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8584         the path of bin directory, so that PATH is the only env. variable, which has to be set
8585         in case of standard installation.
8586         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8587         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8588         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8589
8590 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8591
8592         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8593         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8594         temp files are in the port dir; clean the gen/test directory when
8595         generating new test.c
8596         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8597         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8598         * support/regression/tests/zeropad.c: added
8599
8600 2003-05-09    <johan AT balder>
8601
8602         * src/SDCCglue.c: fixed bug #597940
8603
8604 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8605
8606         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8607   cache sfr, optimize next,step, fix off by one sourceline,
8608   support ddd list function.
8609         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8610
8611 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8612
8613         * support/regression/HTMLgen.py: added compare_s2f()
8614         * support/regression/Makefile: redo 1.27
8615         * support/regression/generate-cases.py: redo 1.5
8616
8617 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8618
8619         * support/regression/tests/float.c: workaround 33 bit hex constant
8620         * support/regression/tests/simplefloat.c: fix division for host
8621
8622 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8623
8624         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8625         that tame's the PIC's over-aggressive optimizer.
8626
8627 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8628
8629          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8630          support for MSVC.
8631
8632 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8633
8634         Initial support for DS80C400. "Hello world" runs on TINIm400
8635         (with polled I/O).
8636
8637 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8638
8639          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8640          * Some notes on ddd usage added in debugger/README
8641          Martin Helmling adding more features and fixes for ddd GUI debugger.
8642          Code added for nexti, stepi, up, down, and other adjustments.
8643
8644 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8645
8646         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8647         * src/pic/peeph.def Added two rules to optimize carry manipulation
8648         * src/pic/* removed debug printfs
8649
8650 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8651
8652         * debugger/mcs51/cmd.c: added header newalloc.h
8653
8654 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8655
8656         * as/Makefile: new EXEEXT
8657         * as/z80/Makefile: remove trailing slash of BUILDIR
8658         * as/z80/clean.mk: new EXEEXT
8659         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8660         * support/cpp2/Makefile.in: new EXEEXT
8661         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8662
8663 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8664
8665         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8666         EXEEXT was introduced to fix all related problems with targets
8667         "clean", "install" and "uninstall"; a couple of further flaws
8668         especially with "clean" have been fixed too
8669         * as/mcs51/Makefile.in
8670         * as/mcs51/clean.mk
8671         * as/z80/Makefile
8672         * Makefile
8673         * clean.mk
8674         * debugger/mcs51/Makefile.in
8675         * debugger/mcs51/clean.mk
8676         * link/z80/Makefile
8677         * link/z80/Makefile.in
8678         * link/z80/clean.mk
8679         * link/Makefile
8680         * packihx/Makefile.in
8681         * packihx/clean.mk
8682         * sim/ucsim/Makefile
8683         * sim/ucsim/clean.mk
8684         * sim/ucsim/avr.src/Makefile.in
8685         * sim/ucsim/avr.src/clean.mk
8686         * sim/ucsim/s51.src/Makefile.in
8687         * sim/ucsim/s51.src/clean.mk
8688         * sim/ucsim/xa.src/Makefile.in
8689         * sim/ucsim/xa.src/clean.mk
8690         * sim/ucsim/z80.src/Makefile.in
8691         * sim/ucsim/z80.src/clean.mk
8692         * sim/ucsim/main_in.mk
8693         * sim/ucsim/packages_in.mk
8694         * sim/ucsim/gui.src/Makefile.in
8695         * sim/ucsim/gui.src/serio.src/Makefile.in
8696         * sim/ucsim/gui.src/serio.src/clean.mk
8697         * src/Makefile.in
8698         * src/clean.mk
8699         * support/cpp2/Makefile.in
8700         * support/cpp2/clean.mk
8701         * support/makebin/Makefile
8702         * support/makebin/clean.mk
8703         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8704         * doc/sdccman.lyx: --program-suffix no longer needed
8705
8706 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8707
8708          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8709          Martin Helmling added support for ddd GUI debugger.
8710          Code added to display assembly, set variables, and other commands
8711          to interface to ddd.
8712
8713 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8714
8715         * as/Makefile: fix target clean
8716         * as/clean.mk: fix target clean
8717         * as/z80/clean.mk: fix target clean
8718
8719 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8720
8721         * Makefile.common.in: added  AT EXEEXT AT
8722         * configure.in: removed all mingw32 stuff
8723         * configure: rebuilt from configure.in
8724         * doc/sdccman.lyx: updated section "installation"
8725         * support/scripts/sdcc_mingw32: adapted to configure
8726         * support/scripts/sdcc_cygwin_mingw32: added
8727
8728 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8729
8730         * src/pic Added object file support for the PIC port
8731         * src/pic Applied patch from Craig Franklin (this started the object file support)
8732         * src/regression Updated the PIC regression tests for object files
8733
8734 2003-04-20  Borut Razem <borut.razem AT siol.net>
8735
8736         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8737           lklex.c: In function `getfid':
8738           lklex.c:203: warning: array subscript has type `char'
8739         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8740           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8741         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8742           stack handling macros
8743
8744 2003-04-19  Borut Razem <borut.razem AT siol.net>
8745
8746         * "handling space characters in file path" task:
8747         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8748         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8749         * support/Util/MySystem.h: make it self-sufficient
8750         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8751           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8752           handling space characters in file path
8753         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8754           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8755         * support/Util/MySystem.c: handling space characters in executable's path
8756
8757 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8758
8759         * as/z80/Makefile: fix permanent rebuild of z80
8760         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8761         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8762
8763 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8764
8765         * src/SDCCopt.c: add special case optimization to replace modulo by
8766           a power of two with a bitwise AND.
8767
8768 2003-04-18    <johan AT balder>
8769
8770         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8771
8772 2003-04-17    <johan AT balder>
8773
8774         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8775         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8776
8777 2003-04-13  Borut Razem <borut.razem AT siol.net>
8778
8779         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8780         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8781           fixed mingw problem in adl_NORMALIZE_PATH
8782
8783 2003-04-12  Borut Razem <borut.razem AT siol.net>
8784
8785         * fixed "#pragma SAVE/RESTORE can not be nested":
8786         * src/SDCC.lex: reworked pragma handling functions
8787         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8788         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8789
8790 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8791
8792         * src/SDCCutil.c (pathEquivalent): defined but not used
8793         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8794         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8795         * configure: rebuilt from configure.in
8796         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8797         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8798         * device/include/Makefile.in: replace sdcc_datadir
8799         * device/lib/Makefile.in: replace sdcc_datadir
8800         * Makefile.common.in: add LDFLAGS from configure
8801         * packihx/Makefile.in: use LDFLAGS
8802         * src/Makefile.in: use LDFLAGS
8803         * support/cpp2/Makefile.in: add LDFLAGS from configure
8804         * support/makebin/Makefile: use LDFLAGS
8805         * .version: bumped version number to 2.3.5
8806
8807 2003-04-12  Borut Razem <borut.razem AT siol.net>
8808
8809         * completed "different paths" task:
8810         * src/SDCCmacro.c: fixed bug in handling quotes
8811         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8812         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8813
8814 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8815
8816         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8817
8818 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8819
8820         * ds390/gen.c ds390/peeph.def: fix bug 706781
8821
8822 2003-04-11  Borut Razem <borut.razem AT siol.net>
8823
8824         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8825
8826 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8827
8828         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8829         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8830          set - this bit used to not be set...).
8831         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8832           bad code in PIC Port
8833         * src/regression/and2.c added to test bug 609268
8834         * src/regression/Makefile added and2.c to regression test
8835
8836
8837 2003-04-08    <johan AT CP255758-A>
8838
8839         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8840         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8841         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8842
8843 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8844
8845         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8846         fix bug #487815
8847         * support/cpp2/Makefile.in: fix bug #487815
8848         * configure: rebuilt from configure.in
8849         * Makefile.common.in: docdir changed, new path suffixes
8850         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8851         * sdcc_vc_in.h: reflect changes from sdccconf.h
8852         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8853         * src/SDCCutil.h: remove BINDIR hack
8854         * doc/sdccman.lyx: update new path hierarchy
8855
8856 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8857
8858         * src/SDCCpeeph.c: added okToRemoveSLOC test
8859
8860 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8861
8862         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8863
8864 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8865
8866         * src/SDCCpeeph.c: added labelIsReturnOnly test
8867         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8868
8869 2003-04-05    <johan AT balder>
8870
8871         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8872         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8873         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8874         * src/SDCCast.c: fixed a warning
8875         * src/SDCCast.h: fixed a warning
8876         * src/SDCCicode.c (operandFromAst): fixed a warning
8877
8878 2003-04-04    <johan AT balder>
8879
8880         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8881         * src/SDCCast.c (decorateType): fixed bug #715076
8882         * src/SDCC.y: fixed bug #702907
8883
8884 2003-04-03    <johan AT balder>
8885
8886         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8887         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8888         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8889         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8890         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8891
8892 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8893
8894         * _decdptr.c: fix return values
8895         * _gptrget.c: fix return values
8896         * _gptrgetc.c: fix return values
8897         * _gptrput.c: fix return values
8898         * _mulint.c: fix return values
8899         * as/z80/Makefile: fix 'make -j' problem
8900
8901 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8902
8903         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8904         * configure.in: big cleanup, updated to autoconf 2.5x
8905         * configure: rebuilt from configure.in
8906         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8907         * sdcc_vc_in.h: reflect changes from sdccconf.h
8908         * doc/Makefile: fixed a flaw in "make install"
8909
8910 2003-04-02    <johan AT balder>
8911
8912         * src/ds390/gen.c (genCmp): no comments
8913         * src/mcs51/gen.c (genCmp): no comments
8914         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8915         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8916
8917 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8918
8919         * support/regression/generate-cases.py: place generated file in given sub directory
8920         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8921         * support/regression/Makefile: improvements for 'make -j';
8922         side effect: it's simpler and faster now
8923
8924 2003-03-31  Borut Razem <borut.razem AT siol.net>
8925
8926         * src/z80/main.c: link-{port} and as-{port} defined without path
8927         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8928
8929 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8930
8931         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8932
8933 2003-03-30  Borut Razem <borut.razem AT siol.net>
8934
8935         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8936           changed type of list parameter to set
8937         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8938         * src/port.h: changed type of do_assemble() parameter to set
8939         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8940           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8941           definition of "cppoutfilename" macro with NULL value in preProcess()
8942         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8943         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8944         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8945           replaced with set *binPathSet
8946         * shash_add() deallocates the item, if allready exsists, before adding the new one
8947         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8948
8949 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8950
8951         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8952           a nested for loop bug in the PIC port
8953         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8954           for loops
8955
8956 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8957
8958         * support/Util/dbuf.h: remove C++ stuff to make it portable
8959
8960 2003-03-28  Borut Razem <borut.razem AT siol.net>
8961
8962         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8963           literal strings in stringLiteral()
8964         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8965         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8966           to the project
8967
8968 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8969
8970         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8971
8972 2003-03-26    <johan AT balder>
8973
8974         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8975         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8976         * src/SDCCast.c (decorateType): fixed " -v < 3"
8977
8978 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8979
8980         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8981         Added Lenny Story's debug infrastructure changes:
8982         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8983         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8984         * src/cdbFile.c: added
8985         * src/SDCCdebug.c: added
8986         * src/SDCCdebug.h: added
8987         * src/SDCCast.c (createFunction)
8988         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8989         * src/SDCCmain.c (parseCmdLine, main)
8990         * src/SDCCmem.c (redoStackOffsets)
8991         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8992         * src/SDCCsymt.h
8993         * src/common.h
8994         * src/avr/gen.c (genAVRCode)
8995         * src/ds390/gen.c (gen390Code)
8996         * src/mcs51/gen.c (gen51Code)
8997         * src/pic/gen.c (genpic14Code)
8998         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8999         * src/xa51/gen.c (genXA51Code)
9000         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9001
9002 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9003
9004         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9005         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9006
9007 2003-03-22    <johan AT balder>
9008
9009         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9010
9011 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9012
9013         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9014         * doc/cdbfileformat.lyx: added, written by Lenny Story
9015         * doc/Makefile: added cdbfileformat.lyx
9016         * doc/clean.mk: added cdbfileformat.lyx
9017
9018 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9019
9020         * src/mcs51/peeph.def: fix bug #705773
9021
9022 2003-03-20    <johan AT balder>
9023
9024         An sfr/sbit can have an "at #" AND an initializer
9025         * src/SDCCsymt.c (checkSClass):
9026         * src/SDCCmem.c (allocGlobal):
9027         * src/SDCCmem.c (allocLocal):
9028         * src/SDCCast.c (createBlock):
9029
9030 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9031
9032         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9033
9034 2003-03-16    <johan AT balder>
9035
9036         Undid the hackup of const and volatile, the problem is much bigger
9037         * src/SDCC.y:1.65
9038         * src/SDCCast.c:1.171
9039         * src/SDCCglue.c:1.138
9040         * src/SDCCicode.c:1.146
9041         * src/SDCCsymt.c:1.150
9042         * src/SDCCval.c:1.65
9043
9044 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9045
9046         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9047         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9048
9049 2003-03-13    <johan AT balder>
9050
9051         Hackup const and volatile modifiers in type chains a bit:
9052         * src/SDCC.y:1.63
9053         * src/SDCCast.c:1.169
9054         * src/SDCCglue.c:1.136
9055         * src/SDCCicode.c:1.143
9056         * src/SDCCsymt.c1.146
9057         * src/SDCCsymt.h1.59
9058         * src/SDCCval.c:1.63
9059
9060 2003-03-12    <johan AT balder>
9061
9062         * src/SDCCBBlock.h: more LRH debugging junk
9063         * src/SDCCcflow.h: more LRH debugging junk
9064         * src/SDCCloop.c: more LRH debugging junk
9065         * src/SDCC.y (struct_declaration): fixed bug #697590
9066         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9067         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9068         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9069
9070 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9071         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9072         test function names must now match exactly).
9073         * src/SDCCcse.c: added special case in findCheaperOp to allow
9074         extending a short integer. Makes less awful code for bug 700121 test case.
9075
9076 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9077
9078         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9079         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9080
9081 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9082
9083         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9084         actually called (operandsNotEqual() was called for all
9085         operandsNotEqualX tests).
9086
9087 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9088
9089         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9090         with shorter literals. Fixes bug 700121.
9091
9092 2003-03-11    <johan AT balder>
9093
9094         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9095
9096 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9097
9098         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9099         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9100
9101 2003-03-10  Borut Razem <borut.razem AT siol.net>
9102
9103         * src/SDCCmain.c: pipe preprocessor's output
9104         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9105         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9106         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9107         which closes all pipes in pipeSet set
9108         * src/SDCCset.c: free deleted item in function deleteSetItem()
9109         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9110         moved from z80 to src subproject
9111         * .version: increased version number to 2.3.4
9112
9113 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9114
9115         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9116         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9117         * support/regression/ports/xa51/spec.mk: fix typo
9118
9119 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9120
9121         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9122
9123 2003-03-09  Borut Razem <borut.razem AT siol.net>
9124
9125         * src/SDCCmain.c: pipe preprocessor's output
9126         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9127         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9128         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9129         which closes all pipes in pipeSet set
9130         * src/SDCCset.c: free deleted item in function deleteSetItem()
9131         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9132         moved from z80 to src subproject
9133
9134 2003-03-09  Borut Razem <borut.razem AT siol.net>
9135
9136         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9137         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9138         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9139         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9140         * src/SDCCglobl.h: unification of WIN32 native definitions
9141
9142 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9143
9144         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9145
9146 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9147
9148         * src/configure.in:   check for endianess (even while cross-compiling)
9149         * src/configure:      check for endianess (even while cross-compiling)
9150         * src/configure_in.h: check for endianess (even while cross-compiling)
9151         * src/avr/gen.c:        remove old endianess stuff
9152         * src/mcs51/gen.c:      remove old endianess stuff
9153         * src/ds390/gen.c:      remove old endianess stuff
9154         * src/pic/gen.c:        remove old endianess stuff
9155         * src/pic/genarith.c:   remove old endianess stuff
9156         * src/pic/glue.c:       fix endianess check
9157         * src/pic16/gen.c:      remove old endianess stuff
9158         * src/pic16/genarith.c: remove old endianess stuff
9159         * src/pic16/glue.c:     fix endianess check
9160         * src/xa51/gen.c:       remove old endianess stuff
9161         * src/z80/gen.c:        fix endianess check
9162         * src/SDCCglue.c:       fix endianess check
9163         * src/ds390/peeph.def: fix bug 700036
9164
9165 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9166
9167         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9168         * src/configure: find appropriate data-types on host for SDCC's int and long
9169         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9170         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9171         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9172
9173 2003-03-07    <johan AT balder>
9174
9175         Just a big NOOP:
9176                 some minor cleanups before the big shot
9177                 OP_DEFS and OP_USES now use Kevin's protection
9178                 new option --nolabelopt
9179
9180         * src/SDCCBBlock.c:
9181         * src/SDCCast.c,:
9182         * src/SDCCcflow.c:
9183         * src/SDCCcse.c:
9184         * src/SDCCicode.c:
9185         * src/SDCCicode.h:
9186         * src/SDCClabel.c:
9187         * src/SDCCloop.c:
9188         * src/SDCCmain.c:
9189         * src/ds390/ralloc.c:
9190         * src/mcs51/ralloc.c:
9191         * src/pic/ralloc.c:
9192         * src/xa51/ralloc.c:
9193         * src/z80/ralloc.c:
9194
9195 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9196
9197         * src/pic/pcode.c (get_op): fix 64 bit warnings
9198         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9199         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9200         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9201         * support/regression/tests/malloc.c: fix 64 bit warnings
9202
9203 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9204
9205         * src/mcs51/gen.c (genMinus): fixed bug 696436
9206
9207 2003-03-02  Borut Razem <borut.razem AT siol.net>
9208
9209         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9210
9211 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9212
9213         * configure.in: test for mkstemp
9214         * sdccconf_in.h: add HAVE_MKSTEMP
9215
9216 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9217
9218         * device/include/ctype.h: removed warning while using --stack-auto
9219         * device/include/malloc.h: removed warning while using --stack-auto
9220         * device/include/string.h: removed warning while using --stack-auto
9221
9222 2003-02-23  Borut Razem <borut.razem AT siol.net>
9223
9224         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9225         because NDEBUG is defined (see man assert)
9226         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9227
9228 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9229
9230         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9231         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9232
9233 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9234
9235         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9236         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9237
9238 2003-02-18    <johan AT balder>
9239
9240         * as/mcs51/asmain.c (asmbl): module can start with a digit
9241         * as/z80/asmain.c (asmbl): module can start with a digit
9242
9243 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9244
9245         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9246         * src/asm.c: fix pipe() for Mingw32
9247
9248 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9249
9250         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9251         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9252         make -V work again; --c1mode reads now from stdin
9253         * doc/sdccman.lyx: added --c1mode
9254         * support/Util/SDCCerr.c: new messages for c1 mode
9255         * support/Util/SDCCerr.h: new messages for c1 mode
9256         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9257
9258 2003-02-15    <johan AT balder>
9259
9260         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9261
9262 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9263
9264         * doc/sdccman.lyx: Environment variables, -o and other minor things
9265
9266 2003-02-14    <johan AT balder>
9267
9268         * src/xa51/main.c: before anyone really tries to use it :)
9269
9270         * Install doc's in share/sdcc/doc
9271         * removed some obsolete files
9272         * Do a proper make distclean and uninstall
9273         M Makefile.common.in
9274         R sdccbuild.sh
9275         M as/Makefile
9276         M device/include/Makefile.in
9277         M device/lib/Makefile.in
9278         M doc/sdccman.lyx
9279         M link/Makefile
9280         M sim/ucsim/doc/Makefile.in
9281         M src/clean.mk
9282         R src/avr/peeph.rul
9283         R src/xa51/peeph.rul
9284         M support/cpp2/Makefile.in
9285         M support/makebin/Makefile
9286
9287
9288 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9289
9290         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9291
9292 2003-02-10  Borut Razem <borut.razem AT siol.net>
9293
9294         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9295         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9296         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9297         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9298         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9299         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9300         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9301         src/z80/Makefile.bcc: Borland Makefile cleanup
9302         * as/z80/Makefile.bcc: Added Borland Makefile
9303         * support/cpp2/borland.h: Removed
9304
9305 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9306
9307         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9308         * src/SDCC.lex: new pragma NOIV
9309         * src/SDCCglobl.h: new pragma NOIV
9310         * src/SDCCmem.c: new pragma NOIV
9311
9312 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9313
9314         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9315
9316 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9317
9318         * src/SDCCmain.c: signal handling is switched off by --debug
9319         * doc/Makefile: small fix for install; use clean.mk again
9320         * doc/clean.mk: clean *.pdf and *.html too
9321
9322 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9323
9324         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9325         * device/lib/printfl.c: fix a ds390 bug by making it portable
9326         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9327         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9328         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9329         * debugger/mcs51/cmd.c: converted multi-line string literals
9330         * sim/ucsim/globals.cc: converted multi-line string literals
9331         * src/SDCCmain.c: introduced signal handler to remove temp files
9332         * doc/Makefile: small tweaks, implement clean
9333         * doc: removed generated files
9334
9335 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9336
9337         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9338         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9339         Address Record is not correctly generated for DS390."
9340
9341 2003-02-02  Borut Razem <borut.razem AT siol.net>
9342
9343         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9344         * as/mcs51/asm.h: fixed compilation with Borland C
9345         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9346         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9347         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9348         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9349         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9350         src/z80/Makefile.bcc: delete $(LIB) only if exist
9351         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9352
9353 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9354
9355         * device/include/malloc.h: introduced NULL
9356         * device/include/string.h: introduced NULL
9357         * device/include/stdlib.h: introduced NULL
9358         * device/lib/_memcpy.c: removed NULL
9359         * device/lib/_strcat.c: removed NULL
9360         * device/lib/_strchr.c: removed NULL
9361         * device/lib/_strcmp.c: removed NULL
9362         * device/lib/_strcpy.c: removed NULL
9363         * device/lib/_strcspn.c: removed NULL
9364         * device/lib/_strlen.c: removed NULL
9365         * device/lib/_strncat.c: removed NULL
9366         * device/lib/_strncmp.c: removed NULL
9367         * device/lib/_strncpy.c: removed NULL
9368         * device/lib/_strpbrk.c: removed NULL
9369         * device/lib/_strrchr.c: removed NULL
9370         * device/lib/_strspn.c: removed NULL
9371         * device/lib/_strstr.c: removed NULL
9372         * device/lib/_strtok.c: removed NULL
9373         * device/lib/malloc.c: removed NULL, include own header
9374
9375 2003-02-02    <johan AT balder>
9376
9377         * 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
9378         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9379         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9380         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9381         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9382         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9383
9384 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9385
9386         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9387         area 'DATA'"
9388
9389 2003-02-01    <johan AT balder>
9390
9391         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9392
9393 2003-01-31    <johan AT CP255758-A>
9394
9395         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9396
9397 2003-01-30    <johan AT balder>
9398
9399         * src/SDCCBBlock.c: automatic bug detection
9400         * src/SDCCicode.c: automatic bug detection
9401
9402 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9403
9404         * src/SDCCglobl.h:   now --xram-size 0 works
9405         * src/SDCCmain.c:    now --xram-size 0 works
9406
9407 2003-01-29    <johan AT balder>
9408
9409         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9410
9411 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9412
9413         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9414         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9415         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9416         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9417         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9418         * src/SDCCmain.c:    Added options --xram-size and --code-size
9419
9420 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9421
9422         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9423         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9424
9425 2003-01-27    <johan AT balder>
9426
9427         * src/SDCC.y: fixed bug #613764
9428
9429 2003-01-26    <johan AT balder>
9430
9431         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9432         * src/SDCCsymt.h: fixed bug #673374
9433         * src/SDCCglue.c: fixed bug #661910
9434         * src/SDCCast.c: fixed bug #458099 and 673374
9435
9436 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9437
9438         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9439         * as/mcs51/strcmpi.h: added
9440         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9441         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9442         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9443         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9444         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9445         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9446         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9447         * as/mcs51/Makefile.aslink: new module strcmpi
9448         * as/mcs51/Makefile.asx8051: new module strcmpi
9449         * as/mcs51/Makefil.bcc: new module strcmpi
9450         * as/mcs51/Makefile.in: new module strcmpi
9451         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9452
9453 2003-01-26    <johan AT balder>
9454
9455         * src/SDCCglue.c: reverted back to 1.124
9456         * src/SDCCast.c: reverted back to 1.156
9457         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9458
9459 2003-01-25    <johan AT balder>
9460
9461         * src/SDCCglue.c: A better fix for bug #661910
9462         * src/SDCCast.c: A better fix for bug #661910
9463         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9464
9465 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9466
9467         * src/Makefile.in: remove spawn.o
9468         * src/SDCCmain.c: remove spawn.h
9469         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9470         * src/spawn.c: removed
9471         * src/spawn.h: removed
9472         * support/regression/ports/ds390/spec.mk: link with -r
9473
9474 2003-01-24    <johan AT CP255758-A>
9475
9476         * src/ds390/gen.c (aopOp): fixed bug #667458
9477         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9478         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9479         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9480
9481 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9482
9483         * src/mcs51/peeph.def: better assembler identation by Frieder
9484         * src/mcs51/gen.c: better assembler identation by Frieder
9485
9486 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9487
9488         * as/z80/string.h: removed for gcc 3.2
9489         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9490         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9491
9492 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9493
9494         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9495         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9496         * support/regression/Makefile: separate temp files for ports
9497         * support/regression/generate-cases.py: separate temp files for ports
9498         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9499         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9500
9501 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9502
9503         * moved tinitalk to device/examples/ds390
9504
9505 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9506
9507         * as/mcs51/lkmem.c: rflag is for DS390
9508         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9509         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9510                          (linkEdit): move mem- and map-files the same way as ihx-files
9511         * src/z80/main.c (_setDefaultOptions): removed --generic
9512         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9513         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9514         * src/pic/glue.c (picglue): --c1mode works again
9515         * src/pic16/glue.c (pic16glue): --c1mode works again
9516         * src/asm.c (printCLine): fix #660034
9517
9518 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9519
9520         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9521         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9522         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9523         * as/mcs51/lkmem (summary): better fix for sp problem
9524         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9525         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9526         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9527                                               remove --stack-after-data
9528
9529 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9530
9531         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9532         * src/SDCCutil.c (join): ugly bug: missing '\0'
9533         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9534
9535 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9536
9537         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9538         * src/port.h: typo
9539         * src/pic/main.c (_asmCmd): gpasm supports -o
9540         * src/z80/main.c: more general macros
9541         * device/lib/Makefile.in: remove intermediate files
9542
9543 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9544
9545         * .version: Bumped version number to 2.3.3
9546         * src/SDCCBBlock.c: new option -o
9547         * src/SDCCglobl.h: new option -o
9548         * src/SDCCglue.c: new option -o
9549         * src/SDCCmain.c: new option -o
9550         * src/asm.c: new option -o
9551         * src/ds390/main.c: new option -o
9552         * src/pic/glue.c: new option -o
9553         * src/pic/pcode.c: new option -o
9554         * src/pic/ralloc.c: new option -o
9555         * src/pic16/glue.c: new option -o
9556         * src/pic16/pcode.c: new option -o
9557         * src/pic16/ralloc.c: new option -o
9558         * src/z80/main.c: new option -o
9559         * device/lib/Makefile.in: use -o
9560         * support/regression/ports/ds390/spec.mk: use -o
9561         * support/regression/ports/gbz80/spec.mk: use -o
9562         * support/regression/ports/mcs51/spec.mk: use -o
9563         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9564         * support/regression/ports/z80/spec.mk: use -o
9565         * support/regression/ports/ucz80/spec.mk: use -o
9566         * support/regression/ports/xa51/spec.mk: use -o
9567         * support/regression/fwk/lib/timeout.c: fix usage string
9568
9569 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9570         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9571
9572 2003-01-07    <johan AT balder>
9573
9574         * src/SDCCast.c (decorateType): fixed bug #600035
9575
9576 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9577         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9578         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9579         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9580         * src/pic/pcode.c: outcommented unused variable to remove warnings
9581         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9582
9583 2003-01-06    <karl AT turbobit.com>
9584         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9585    regression tests.
9586
9587 2003-01-06    <johan AT balder>
9588
9589         * src/SDCCicode.c: fixed array add
9590
9591 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9592         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9593         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9594
9595 2003-01-04    <johan AT balder>
9596
9597         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9598
9599 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9600         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9601
9602 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9603         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9604         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9605
9606 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9607         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9608
9609 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9610         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9611
9612 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9613         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9614
9615 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9616
9617     * in \sdcc\as\mcs51\ changed these files in order to create an
9618     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9619     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9620     following files to include the previous two files: aslink.dsp,
9621     Makefile.aslink, Makefile.bcc, and Makefile.in.
9622
9623     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9624     .adb instead of .cdb
9625
9626 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9627
9628         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9629         value from option --iram-size.
9630
9631 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9632
9633         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9634         dram[] array.
9635
9636 2002-09-18    <wiml AT hhhh.org>
9637
9638         * SDCClrange.h: exposed setFromRange() and setToRange()
9639         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9640           packRegsForAccUse() (bug 542397)
9641         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9642           multiple times and emitting the fetch operations more than once
9643           added aopGetUsesAcc() function to allow binary operators to
9644           fetch their operands in the correct order; made genMinus() emit
9645           compact code for X = LITERAL - Y
9646
9647 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9648         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9649         sprintf() in line 1267.
9650
9651 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9652         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9653         like ports.
9654
9655 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9656         Changes to aslink (All the changes are marked with 'JCF'):
9657
9658         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9659         summary().
9660
9661         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9662         area BSEG.  Also moves, if possible, the DATA area down into the internal
9663         ram so more space is available.
9664
9665         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9666         sflag.
9667
9668         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9669         not bytes.  Function summary() which creates a memory usage summary
9670         file with extension .mem.  Reports of overlaping stack and small stack
9671         size.  If the space for the stack is less than 16 bytes aslink trows a
9672         warning.
9673
9674         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9675         the 8051.  Option 'y' for memory summary output file.
9676
9677         Changes to sdcc (All the changes are marked with 'JCF'):
9678
9679         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9680
9681         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9682         overlaying area for it (uses RegBankUsed[4]).
9683
9684         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9685         bank zero as used by default.  By default aslink locates the stack
9686         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9687         the creation of the .mem file.  Delegates the allocation of data area
9688         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9689         the begining of the stack area to aslink.
9690
9691         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9692         glue() in SDCCglue.c creates an area for it.
9693
9694 2002-09-03  Borut Razem <borut.razem AT siol.net>
9695         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9696         sdcc/src/pic/glue.c:
9697         introduced atexit() handler for teporay files removal in case of
9698         errors, assertions, ...
9699
9700 2002-08-29  Borut Razem <borut.razem AT siol.net>
9701         * sdcc/support/cpp2/auto-host_vc_in.h:
9702         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9703         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9704         Maybe there is a similar problem with BORLANDC? It should be checked!
9705
9706         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9707         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9708         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9709         was not executed, and the compiler (cl) launched a warning:
9710         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9711
9712 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9713         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9714
9715 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9716         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9717
9718         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9719           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9720           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9721           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9722           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9723           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9724           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9725         - added Release configuration in VS projects
9726         - review of compiler an linker options
9727         - VC .exe files are generated in bin_vc directory, not to interfere
9728           with binaries generated from other projects (cygwin, mingw, bcc ...)
9729
9730         * sdcc/src/yacc.dsp: added
9731
9732         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9733         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9734         and insert the version number definitions from .version
9735
9736         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9737
9738         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9739         added - genarate auto-host.h using auto-host_vc_in.h as template
9740
9741         * sdcc/sdcc_vc.h,
9742         removed from CVS, generated automatically
9743
9744 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9745         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9746
9747 2002-08-11  Borut Razem <borut.razem AT siol.net>
9748         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9749
9750 2002-08-10  Borut Razem <borut.razem AT siol.net>
9751         * src/SDCCmain.c (main):
9752         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9753         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9754         The consequence was that some temporary files were not removed.
9755
9756         * src/SDCCglue.c:
9757         unification of code in functions tempfilename() and tempfile():
9758         function tempnam() is defined in Visual Studio 6.0 and .NET
9759
9760         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9761
9762         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9763           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9764         - removed compiler command line option /WX: Treats all warnings as errors
9765         - update a list of source files, included into the project
9766
9767         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9768           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9769         changed project type to Generic Project so that can be correcly converted to VS.NET project
9770
9771         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9772
9773         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9774
9775         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9776
9777         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9778         added return 0 statements after assert() to make compiler happy
9779
9780         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9781         added newline in the def file to keep MSC compiler satisfied
9782
9783         * sdcc/src/z80/gen.c:
9784         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9785           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9786         - solved MSC error in function aopDump()
9787
9788         * sdcc_vc.h: define PREFIX as "\\sdcc"
9789
9790 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9791         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9792
9793 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9794         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9795         - Rewrote the register banking algorithm.
9796         - Added pCode live-range analysis to registers (for now, only non-used and
9797         singly-used registers optimized away)
9798
9799         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9800
9801         * 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.
9802
9803 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9804         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9805
9806 2002-04-22  Michael Hope  <michaelh AT vroom>
9807
9808         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9809
9810         * configure.in (DD_COPT): Added include support required for gbdk.
9811
9812         * .version: Bumped version number just to increase it.
9813
9814         * src/SDCCmain.c: Added -nostdinc to the default options.
9815
9816 2002-04-15  Michael Hope  <michaelh AT vroom>
9817
9818         * device/lib/z80/printf.c (sprintf): Added.
9819
9820         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9821
9822         * src/z80/peeph.def: Added transpose redundent load rule.
9823
9824         * src/z80/main.c: Added force callee saves for jaune.
9825
9826         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9827
9828         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9829
9830 2002-03-28  Johan Knol  <johan AT balder>
9831
9832         * src/SDCCval.c: fixed bug #532436
9833
9834 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9835         * /src/port.h:
9836         Added "char *Processor" field to the port structure.
9837
9838         * /src/SDCCmain.c:
9839         Added -p option. Allows port dependent processor to be specified.
9840
9841         * all ports:
9842         Initialized the new field char *Processor field to NULL in all ports
9843
9844         * /src/pic/*:
9845         Compiler generated registers for interrupt context saving
9846         were not getting allocated.
9847
9848 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9849
9850         * /src/SDCCast.c:
9851         Fixed left shift. Will promote the left side of a left shift
9852         if a) left shifting more than size of operand or b) when assigned
9853         to something size > size of left side
9854
9855 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9856         * src/pic/*
9857         tons of changes. Register allocation has been
9858         rewritten. Added customization for the various PICs. Flow
9859         analysis is restructured. ...
9860
9861         * src/pic/device.h:
9862         Added
9863
9864         * src/pic/device.c:
9865         Added. device.c is a PIC port hack to accomodate variations
9866         in PIC devices.
9867
9868 2002-03-13  Michael Hope  <michaelh AT vroom>
9869
9870         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9871
9872 2002-03-04  johanknol  <johanknol AT manik>
9873
9874         * /src/SDCCval.c: fixed
9875
9876         const unsigned char arr[][2] = { { 0, 1 } };
9877         t18.c:1: error: Initializer element is not constant
9878
9879 2002-03-04  bela  <bela AT manik>
9880
9881         * /device/include/mcs51reg.h:
9882         ds89c420 register definition update
9883
9884 2002-03-03    <johan AT FRIJA>
9885
9886         * support/Util/SDCCerr.c: did something, but don't no why anymore
9887
9888         * support/regression/tests/bug-524691.c: made it a little less shy
9889
9890         * src/SDCCast.c (decorateType): fixed bug #524697
9891
9892         * src/SDCCast.c: made some lineno improvements
9893
9894         * src/SDCCval.c (getNelements): changed warning to error
9895
9896         * src/SDCCglue.c (printIvalArray): changed warning to error
9897
9898         * src/SDCCicode.c: fixed a warning for mingw
9899
9900         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9901
9902         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9903
9904 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9905
9906         * src/ds390/peeph.def:
9907         Added some more peephole rules
9908
9909         * src/ds390/gen.c: Various fixes & enhancements
9910
9911         * src/SDCClrange.c, src/SDCClrange.h:
9912         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9913
9914         * src/ds390/ralloc.c:
9915         various fixes & enhancements (ds390) specific
9916
9917         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9918         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9919         from rallocs.
9920
9921         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9922
9923 2002-03-02    <johan AT FRIJA>
9924
9925         * src/SDCCast.c (decorateType): fixed bug #524708
9926
9927         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9928
9929         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9930
9931 2002-03-01  Michael Hope  <michaelh AT vroom>
9932
9933         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9934
9935         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9936
9937 2002-03-01    <johan AT FRIJA>
9938
9939         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9940
9941         * src/SDCCast.c (decorateType): fixed bug #524209
9942
9943         * src/SDCCval.c (valNot): fixed bug #524195
9944
9945 2002-02-26    <johan AT balder>
9946
9947         * src/xa51/gen.c: fixed a warning
9948
9949         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9950
9951         * src/SDCCast.c (decorateType): fixed bug #522534
9952
9953 2002-02-23    <johan AT balder>
9954
9955         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9956
9957 2002-02-22    <johan AT balder>
9958
9959         * src/SDCCast.c: fixed bug #514865
9960
9961         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9962
9963 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9964
9965         * sdcc/src/SDCCloop.c:
9966         Previous fix was not good. basic blocks that have "break" or "return" are
9967         not really partof a loop , but live ranges used in these blocks should
9968         be live thru the entire loop, so set partOfLoop but don't add them to
9969         loop region
9970
9971 2002-02-21    <johan AT FRIJA>
9972
9973         * src/SDCCcse.c: fixed bug #514308
9974
9975 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9976
9977         * src/SDCCloop.c:
9978         Fixed BUG #519583. If a conditional block ended in a return/break
9979         statement inside a loop, it was not being considered part of the loop.
9980
9981         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9982
9983 2002-02-10  Karl Bongers <karl AT turbobit.com>
9984
9985         * debugger/*:
9986         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9987         with lots of comments and notes.
9988
9989         * device/examples/test2.c:
9990         Fix bug, "red" variable not being initialized(compiler complained).
9991
9992         * device/examples/Makefile, examples/test3.c:
9993         Add Makefile in device/examples folder, compiles test3.c
9994         for use as a multiple module SDCDB test case.
9995
9996         * sim/ucsim/cmd.src/cmdset.cc:
9997         Took out debug printfs in ucsim "next" command.
9998
9999         * sim/ucsim/xa.src:
10000         Karl and Johan start ucsim XA support.  Most dissassembly working,
10001         about 75% emulation done(plenty of work remaining).
10002
10003         * sim/ucsim/z80.src:
10004         Add Z80 support to ucsim, add test-ucz80 regression test,
10005         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10006         Notice z80 compiler fails on examples/test3.c/crc code.
10007
10008 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10009
10010         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10011         Added support for --parms-in-bank1
10012
10013         * src/ds390/peeph.def:
10014         added a few more peephole optimzations
10015
10016         * src/ds390/main.c:
10017         1) added __builtin_inp & __builtin_outp used to read in data of given length
10018            from a memory mapped port
10019         2) added __builtin_memcmp
10020         3) added __builtin_swapw swap bytes of a short
10021
10022         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10023         1) handle multiple send & receives from register bank1
10024         2) ralloc can now allocate DPTR1 to some liveRanges
10025
10026         * src/SDCCsymt.c, src/SDCCsymt.h:
10027         changes to handle multiple sends & receives
10028
10029         * src/SDCCptropt.h:
10030         added some pointer arithmetic optimization
10031
10032         * src/SDCCptropt.c:
10033         added some pointer arithmetic optimizations but not stable yet so not
10034         called from anywhere (will get this working shortly)
10035
10036         * src/SDCCopt.c: fixed for multiple sends & receives
10037
10038         * src/SDCCmain.c:
10039         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10040         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10041            set preprocessor defines (depending on options)
10042
10043         * src/SDCCicode.c, src/SDCCicode.h:
10044         changes made to handle multiple sends & receives
10045
10046         * src/SDCCglobl.h:
10047         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10048
10049         * src/SDCCcse.c, src/SDCCcse.h:
10050         added function findbackward def (to be used in upcoming optimization)
10051
10052         * src/SDCCcflow.c, src/SDCCcflow.h:
10053         added function returnAtEnd - to determine if a basic block terminates with
10054         a RETURN iCode
10055
10056         * src/SDCCast.c, src/SDCCast.h:
10057         added option parms-in-bank1
10058
10059         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10060         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10061         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10062         adjusted for --parms-in-bank1 option
10063
10064         * device/include/string.h:
10065         donot redefine "reentrant" keyword
10066
10067         * device/include/ds80c390.h: Added some more SFRs
10068
10069 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10070
10071         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10072
10073 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10074
10075         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10076
10077 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10078
10079         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10080
10081 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10082
10083         * Added --xram-movc option
10084
10085 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10086
10087         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10088
10089 2002-01-11  Johan Knol
10090
10091         * Added math lib of Jesus Calvino-Fraga
10092
10093 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10094
10095         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10096         * support/regression/Makefile: new target test-mcs51-stack-auto
10097         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10098
10099 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10100
10101         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10102
10103 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10104
10105         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10106
10107 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10108
10109         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10110
10111         * src/SDCCglue.h: add definition for printIvalChar()
10112
10113 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10114
10115         * src/SDCCast.c: fix #498138 by Johan
10116
10117         * src/SDCCglue.c: fix #498138 by Johan
10118
10119 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10120
10121         * support/regression/Makefile: fix clean
10122
10123         * support/regression/ports/ds390/support.c: fix transmission of last character
10124
10125 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10126
10127         * /sdcc/src/ds390/gen.c:
10128         a) improved computing address of stack variable
10129         b) took out some #if 0 code
10130         c) improved parmBytes adjustment
10131         d) improved genPlusIncr & genMinusIncr
10132         e) genCmp could generate bad code (when left assigned to DPTR)
10133         f) Fixed bug in hasInc
10134
10135         * /sdcc/src/ds390/ralloc.c:
10136         a) packRegsForSupport could mess up live information (Fixed)
10137         b) packRegsDPTRuse could be incorrect for left & right shift
10138
10139         * /sdcc/src/mcs51/ralloc.c:
10140         packRegsForSupport could mess up the live information (Fixed)
10141
10142         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10143
10144         * /sdcc/src/SDCCast.c:
10145         can reverse a loop even if function call is present as long
10146         as the loop control variable is local & is not passed as parameter
10147
10148 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10149
10150         * /sdcc/ChangeLog: *** empty log message ***
10151
10152         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10153         More builtin function additions for TININative
10154
10155         * /sdcc/src/ds390/ralloc.c:
10156         Had broken the regression testsuite
10157
10158         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10159
10160         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10161         Added funcattr hasStackParms will be set for reentrant functions when there
10162         are paramteres on the stack, this helps in minimizing frame pointer generation
10163         typeFromStr can handle function pointers now
10164
10165         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10166         *** empty log message ***
10167
10168 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10169
10170         * /src/ds390/gen.c, /src/ds390/main.c:
10171         More builtin function additions for TININative
10172
10173         * /src/ds390/ralloc.c:
10174         Had broken the regression testsuite
10175
10176         * /src/SDCCast.c: Fixed a bug in dumptree
10177
10178         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10179         Added funcattr hasStackParms will be set for reentrant functions when there
10180         are paramteres on the stack, this helps in minimizing frame pointer generation
10181         typeFromStr can handle function pointers now
10182
10183         * /doc/builtins.txt, /doc/TININative.txt:
10184         *** empty log message ***
10185
10186
10187 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10188
10189         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10190         ALPHA version for -mTININative
10191
10192         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10193         updated to reflect changes in the port structure
10194
10195         * /src/port.h:
10196         added function do_assemble (similar to do_link) if non-null this function
10197         will be called to do assembly (-mTININative) requires a multi command
10198         assembly
10199         added function genAssemblerEnd will be called to generate assembler Epilogue
10200
10201         * /src/SDCCsymt.c:
10202         added _JavaNative to debug info printing
10203
10204         * /src/SDCCmain.c: added option --tini-libid
10205         added port->do_assemble function (-mTININative) has a multi command assemble
10206
10207         * /src/SDCCglue.c: Disabled "constExpr" check
10208         added port->genAssemblerEnd function
10209
10210         * /src/SDCCglobl.h: Added option --tini-libid value
10211
10212         * /src/SDCCast.h:
10213         tookout optimizeCompare from the header (has no external references)
10214
10215         * /src/SDCCast.c: made one more function "static"
10216
10217 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10218
10219         * src/z80/mappings.i: Added z80asm support.
10220
10221         * src/z80/main.c: Added z80asm support on --asm=z80asm
10222
10223         * src/z80/gen.c: Fixed asm portability issues.
10224
10225         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10226
10227         * src/SDCCglue.c (printExterns): Added global/extern split.
10228
10229 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10230
10231         * support/regression/Makefile: added test for mcs51 model large
10232
10233         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10234
10235         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10236
10237 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10238
10239         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10240
10241 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10242
10243         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10244
10245         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10246
10247 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10248
10249         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10250
10251         * support/regression/tests/simplefloat.c: Port to mcs51.
10252
10253 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10254         * support/regression/tests/bug-485362.c: Added.
10255
10256         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10257
10258         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10259
10260         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10261
10262         * src/z80/gen.c (aopDump): Added a dump function.
10263
10264 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10265         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10266
10267         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10268
10269         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10270
10271         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10272
10273         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10274
10275         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10276
10277         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10278
10279         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10280
10281         * support/regression/ports/ds390/support.c: Use tinibios.
10282
10283         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10284
10285 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10286
10287         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10288         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10289
10290         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10291
10292         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10293
10294 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10295
10296         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10297
10298         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10299         (packRegsForIYUse): Created and optimised.
10300
10301 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10302
10303         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10304 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10305
10306         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10307
10308         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10309
10310         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10311
10312 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10313
10314         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10315
10316         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10317
10318 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10319
10320         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10321
10322         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10323
10324         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10325
10326 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10327
10328         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10329         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10330         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10331
10332         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10333
10334         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10335         (genNotFloat): Added.
10336         (genUminusFloat): Added.
10337
10338         * device/lib/z80/Makefile: Added floating pt stubs.
10339
10340         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10341
10342         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10343
10344         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10345
10346 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10347
10348         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10349
10350         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10351
10352         * sdcc/support/regression/Makefile: Add port ds390.
10353
10354         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10355
10356         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10357
10358         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10359
10360         * sdcc/support/regression/ports/ds390/support.c: Added.
10361
10362         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10363
10364         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10365
10366         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10367
10368 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10369
10370         * device/include/malloc.h: Added z80 and gbz80 support.
10371
10372         * device/lib/gbz80/heap.s: Added.
10373
10374         * device/lib/z80/heap.s: Added.
10375
10376         * device/lib/malloc.c: Added z80 and gbz80 support.
10377
10378         * support/regression/tests/malloc.c (testMalloc): Added.
10379
10380         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10381
10382         * support/regression/tests/bug-478094.c: Added.
10383
10384         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10385
10386 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10387
10388         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10389
10390         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10391
10392         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10393
10394         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10395
10396         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10397
10398 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10399
10400         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10401
10402 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10403
10404         * support/regression/tests/bug-477927.c: Added.
10405
10406         * src/z80/peeph.def: Added minor rules.
10407
10408         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10409
10410         * src/z80/peeph.def: Added jump optimisation modification.
10411
10412 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10413
10414         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10415
10416 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10417
10418         * support/regression/tests/funptrs.c: Added.
10419
10420 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10421
10422         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10423
10424 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10425
10426         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10427
10428         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10429
10430         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10431         (movLeft2ResultLong): Created.
10432
10433         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10434         (joinPushes): Added.  Joins two char pushes into a word push.
10435
10436 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10437
10438         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10439
10440         * support/makebin/Makefile (install): Added creation of dest dir.
10441
10442 2001-10-24 Karl Bongers <karl AT turbobit.com>
10443
10444         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10445
10446 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10447
10448         * src/z80/ralloc.c: Turned off faulty pack for one use.
10449
10450         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10451
10452         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10453
10454 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10455
10456         * support/regression/Makefile: Improved clean
10457
10458         * support/regression/ports/gbz80/spec.mk: Added clean
10459
10460         * support/regression/ports/host/spec.mk: Added clean
10461
10462         * support/regression/ports/z80/spec.mk: Added clean
10463
10464         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10465
10466         * support/regression/ports/mcs51/timeout.c: little improvements
10467
10468 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10469
10470         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10471
10472         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10473
10474         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10475
10476 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10477
10478         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10479
10480         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10481
10482 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10483         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10484
10485         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10486
10487         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10488
10489         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10490
10491         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10492
10493         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10494
10495         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10496
10497         * support/regression/tests/longor.c: Added.
10498
10499 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10500
10501         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10502
10503         * as/mcs51/aslink.h: define PATH_MAX
10504
10505         * as/mcs51/asm.h: define PATH_MAX
10506
10507         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10508
10509         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10510
10511         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10512
10513         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10514
10515         * src/SDCCglobl.h: define PATH_MAX
10516
10517         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10518
10519         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10520
10521 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10522
10523         * src/z80/gen.c (gencjneshort): Fixed
10524
10525         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10526
10527 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10528
10529         * support/regression/tests/bug-469671.c: Added.
10530
10531         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10532
10533 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10534
10535         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10536
10537         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10538
10539 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10540
10541         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10542
10543         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10544
10545         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10546
10547         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10548
10549         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10550
10551         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10552
10553         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10554
10555 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10556
10557         * 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.
10558
10559         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10560
10561         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10562
10563 2001-10-07    <johan AT FRIJA>
10564
10565         * device/lib/gets.c (gets): fixed the return value.
10566
10567 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10568         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10569
10570         * 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.
10571
10572         * 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.
10573
10574         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10575
10576         * src/pic/gen.c: Removed Safe_strdup.
10577
10578         * configure.in: Added option to enable libgc support.
10579
10580         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10581         (bitVectUnion): Optimised.
10582         (bitVectIntersect): Optimised.
10583         (bitVectBitsInCommon): Optimised.
10584         (bitVectCplAnd): Optimised.
10585
10586         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10587
10588 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10589
10590         * src/SDCCmain.c: distinguish between assembler debug and plain options
10591
10592         * src/avr/main.c:   remove standard assembler options
10593
10594         * src/ds390/main.c: remove standard assembler options
10595
10596         * src/mcs51/main.c: remove standard assembler options
10597
10598         * src/port.h: removed "PENDING" comment
10599
10600 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10601
10602         * src/device/lib/_mulint.c  : new, with assember functions
10603
10604         * src/device/lib/_mullong.c : new, with assember functions
10605
10606         * src/device/lib/_divuint.c : with assember functions
10607
10608         * src/device/lib/_divsint.c : with assember functions
10609
10610         * src/device/lib/_divulong.c: with assember functions
10611
10612         * src/device/lib/_divslong.c: with assember functions
10613
10614         * src/device/lib/_moduint.c : with assember functions
10615
10616         * src/device/lib/_modsint.c : with assember functions
10617
10618         * src/device/lib/_modulong.c: with assember functions
10619
10620         * src/device/lib/_modslong.c: with assember functions
10621
10622         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10623
10624         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10625
10626         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10627                                       replaced _mululong.c and _mulslong.c by _mullong.c
10628
10629 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10630
10631         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10632
10633 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10634
10635         * src/SDCCglue.c: test, if win32api is available for MINGW
10636
10637 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10638
10639         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10640         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10641         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10642         * support/regression/ports/host/spec.mk: removed GENERIC
10643         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10644         * support/regression/ports/z80/spec.mk: removed GENERIC
10645
10646 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10647
10648         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10649
10650         * support/regression/tests/bug-467035.c: Created.
10651
10652 2001-10-01    <johan AT FRIJA>
10653
10654         * src/SDCC.y: fixed bug #466586 part 1
10655
10656 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10657
10658         * SDCCicode.c: z80 has no generic pointers
10659         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10660
10661 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10662
10663         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10664
10665 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10666
10667         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10668
10669         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10670
10671 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10672
10673         * configure.in: Fixed up so that ucsim is only configured once.
10674
10675         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10676
10677         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10678         (getPathDifference): As above.
10679
10680         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10681
10682         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10683
10684 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10685         * .version: Updated to 2.3.1
10686
10687         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10688         Added copyright header.
10689
10690         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10691         (assemble): Added support for macro based assembler commands.
10692         (linkEdit): Added support for macro based linker commands.
10693         (preProcess): Changed the pre-processor to use macros.
10694         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10695         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10696
10697         * device/lib/z80/crt0.s: Added module name for debugging.
10698
10699 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10700
10701         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10702
10703         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10704
10705         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10706
10707         * src/Makefile.in: Added SDCCmacro and SDCCutil
10708
10709 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10710
10711         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10712
10713 2001-09-16    <johan AT FRIJA>
10714
10715         * 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.
10716
10717 2001-09-15    <johan AT FRIJA>
10718
10719         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10720         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10721
10722 2001-09-11    <johan AT FRIJA>
10723
10724         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10725
10726 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10727
10728         * support/regression/tests/bug-460444.c: Added test case.
10729
10730         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10731         (genCast): Added justification for all of the asserts.
10732
10733 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10734
10735         * support/regression/support.c: _xdata replaced by xdata
10736
10737         * support/regression/spec.mk: removed _generic
10738
10739 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10740
10741         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10742
10743         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10744         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10745
10746         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10747
10748         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10749
10750         * support/regression/tests/bug-460010.c: Added test case.
10751
10752         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10753
10754 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10755
10756         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10757
10758         * support/regression/testfwk.c: removed workaround for bug #436344
10759
10760         * support/regression/tests/bp.c: use less memory with mcs51
10761
10762         * support/regression/tests/bug-441448.c: use less memory
10763
10764         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10765
10766         * support/regression/collate-results.py: typo
10767
10768 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10769
10770         * support/regression/tests/fetchoverlap.c: Added new test case.
10771
10772         * support/regression/tests/bp.c: Added new test case.
10773
10774         * support/regression/tests/bug-448984.c: Added new test case.
10775
10776         * support/regression/tests/pow2shifts.c: Added new test case.
10777
10778         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10779         (genlshTwo): Fixed right shift for count > 8.
10780
10781         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10782
10783 2001-09-08    <johan AT FRIJA>
10784
10785         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10786
10787 2001-09-07    <johan AT FRIJA>
10788
10789         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10790
10791         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10792
10793 2001-09-06    <johan AT FRIJA>
10794
10795         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10796         * bernhard noted me at this: "() equals to (void)" (1.38)
10797
10798 2001-09-05    <johan AT FRIJA>
10799
10800         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10801
10802 2001-09-04    <johan AT FRIJA>
10803
10804         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10805
10806
10807 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10808
10809         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10810
10811 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10812
10813         * link/z80/aslink.h: Fixed path for PATH_MAX
10814
10815 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10816
10817         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10818
10819         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10820
10821         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10822
10823         * 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.
10824
10825 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10826
10827         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10828         (genCmp): Fixed up genCmp for the GB with longs.
10829
10830         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10831
10832         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10833
10834         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10835
10836         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10837
10838 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10839
10840         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10841
10842 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10843
10844         * 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.
10845
10846         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10847
10848 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10849
10850         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10851
10852         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10853
10854 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10855
10856   * sim/ucsim/configure:    little improvement of Cygwin-detection
10857   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10858   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10859   * support/regression/tests/bug-221100.c: small changes for mcs51
10860   * support/regression/tests/bug-221168.c: small changes for mcs51
10861   * support/regression/tests/bug-227710.c: small changes for mcs51
10862   * support/regression/tests/staticinit.c: small changes for mcs51
10863   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10864   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10865   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10866
10867 $Revision$