d6ec4c3a1a2e6f5d0adbecafb2977a063a03bdf8
[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
27         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
28         changes seem to cause (trigger?) problems with the build system.
29
30 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
31
32         * src/SDCCpeeph.c (operandsLiteral): new, added,
33           (callFuncByName): inserted operandsLiteral
34         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
35
36 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
37
38         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
39         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
40
41 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
42
43         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
44           implemented patch 1120823 Thanks to Willy De la Court (normal
45           interrupts need an interrupt number now if they are made critical),
46           and enabled nesting of critical functions though not for gbz80
47           (genCritical, genEndCritical): added functions
48           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
49         * src/z80/mappings.i: added "ei" to all mappings
50
51 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
52
53         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
54         submitted by the Debian SDCC maintainer Aurelien Jarno:
55         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
56         archive with gcc 4.1 on mips and wrote the patch"
57
58 2006-03-16 Raphael Neider <rneider AT web.de>
59
60         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
61           the left operand is shorter than the result (c* = lit-c* + int),
62           fixes bug #1450796
63         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
64           OP_SYMBOL
65
66 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
67
68         * src/.version: increased version number to 2.5.5
69         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
70         linking is done manually in pic16 port's _linkEdit,
71         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
72         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
73         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
74         allocate asmop as AOP_ACC,
75         (aopForRemat): added parameter 'bool result' in function declaration,
76         (pic16_aopGet): return AOP_ACC when accessing WREG,
77         (pic16_popGetTempReg): minor modification,
78         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
79         'pic16_allocWithIdx',
80         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
81         calling function in absolute addresses,
82         (genAssign): take into account AOP_ACC asmop,
83         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
84         * src/pic16/pcoderegs.c: some debug functions and lines added,
85         * src/pic16/ralloc.c (decodeRegType): added but commented out,
86         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
87         register too,
88         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
89         call to allocReg, not by manually allocating a new one,
90         (pic16_assignRegisters): now before going through the register
91         allocating functions mark all registers as free. This eliminates some
92         side effects resulting from peephole parser done earlier in the backbone
93
94 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
95
96         * src/SDCCicode.c (geniCodeLogic),
97         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
98
99 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
100
101         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
102           (genSend): bugfix, do not allocate and free twice,
103           (shiftRLong): handle partially overlapping aops
104         * support/regression/tests/bitopcse.c: fixed warning redefined idata
105
106 2006-03-08 Borut Razem <borut.razem AT siol.net>
107
108         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
109           for pic16
110
111 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
112
113         * support/regression/tests/bug1409955.c: new, added
114         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
115         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
116           (aopForSym, aopOp): increment asmop.allocated if reused,
117           (freeAsmop): decrement asmop.allocated and check for zero instead of
118           using asmop.freed,
119           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
120           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
121            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
122            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
123            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
124            genSignedRightShift, genRightShift, genDataPointerGet,
125            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
126            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
127             in reverse order from allocation,
128           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
129             added swappedLR to keep track
130         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
131           pdata & code for GCC, z80, gbz80 & hc08
132         * support/regression/tests/zeropad.c: moved defines to testfwk.h
133
134 2006-03-08 Raphael Neider <rneider AT web.de>
135
136         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
137
138 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
139
140         * device/include/mcs51/c8051f410.h: new SiLabs mcu
141         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
142         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
143
144 2006-03-06 Borut Razem <borut.razem AT siol.net>
145
146         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
147           made the linker quiet
148
149 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
150
151         * src/pic16/gen.c (genPcall): fixed bug #1443644
152         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
153         which dumps before the function entry point a data byte which represents
154         the number of the local variables used by the specified function, added
155         'xinst' for initial support for Extended Instruction Support,
156         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
157         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
158         port->fun_prefix anymore (may change later),
159         (genFunction, genEndFunction): do not store/restore local registers for
160         _main (this should take care the --main-return command line option in
161         the future),
162         (genOr): removed some legacy pic-port instructions,
163         * src/pic16/genarith.c (genAddLit): re-enabled old code because
164         performing operations with SFR's causes data to be written more than
165         once to each SFR. Perhaps SFRs should be handled in special cases...
166         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
167         pcode.h
168         * src/pic16/main.c (_process_pragma): stack bound checking did not take
169         into account for stack starting position,
170         (struct OPTIONS pic16_optionsTable): added command line argument
171         --extended or -y for Extended Instruction Support,
172         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
173         (deassignLRs): *** perhaps the most important change, old 'for' code
174         (commented out for reference), didn't account for some registers which
175         were left marked 'not free' after a pointer operation. The change
176         reduces register usage a lot in some cases
177
178 2006-03-04 Borut Razem <borut.razem AT siol.net>
179
180         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
181           _clean
182         * support/regression/tests/bug-524697.c: decreased array size for
183           mcs51 to fit into the internal RAM
184         * support/regression/Makefile.in: a little bit more verbose
185
186 2006-03-03 Borut Razem <borut.razem AT siol.net>
187
188         * support/regression/fwk/lib/testfwk.c,
189           support/regression/fwk/include/testfwk.h: introduced function
190           _prints(), nonrecursive _printn(), call _initEmu() from main()
191         * support/regression/ports/gbz80/support.asm,
192           support/regression/ports/ucz80/support.asm,
193           support/regression/ports/z80/support.asm,
194           support/regression/ports/ds390/support.c,
195           support/regression/ports/hc08/support.c,
196           support/regression/ports/host/support.c,
197           support/regression/ports/mcs51/support.c,
198           support/regression/ports/xa51/support.c: added empty _initEmu()
199           function
200         * support/regression/ports/pic16/gpsim.cmd,
201           support/regression/ports/pic16/spec.mk,
202           support/regression/ports/pic16/support.c,
203           support/regression/Makefile.in: added pic16 regression test
204
205 2006-03-01 Raphael Neider <rneider AT web.de>
206
207         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
208           genConstPointerGet): use safe way of generating MOVFF to cover
209             literals as well as registers, fixes bug #1440527
210         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
211             dereference
212           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
213             more correctly, fixes bug #1232186
214           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
215         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
216             gplink guess the correct processor in more cases, applied patch
217             from Till Riedel attached to and fixing bug #1436552
218
219 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
220
221         * support/regression/tests/array.c: added, contains check for #1434401
222         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
223
224 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
225
226         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
227         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
228         * device/include/mcs51/c8051f326.h,
229         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
230         * device/include/mcs51/c8051f000.h,
231         * device/include/mcs51/c8051f018.h,
232         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
233           PCON_IDLE,PCON_STOP and added sfr16 definitions
234
235 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
236
237         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
238           genGetWord): fixed bug 1409955
239
240 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
241
242         * device/include/hc08/mc68hc908gp32.h,
243         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
244
245 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
246
247         * src/SDCCast.c (constExprValue): return NULL if not a value
248         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
249         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
250         * support/regression/tests/bitfields.c: enabled signed bitfield for all
251
252 2006-02-13 Borut Razem <borut.razem AT siol.net>
253
254         * src/regression/ptrarg.c: added, fails due to bug #1430967
255         * src/regression/Makefile: ptrarg.c added, ...
256
257 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
258
259         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
260         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
261
262 2006-02-11 Borut Razem <borut.razem AT siol.net>
263
264         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
265           print "Processor: xxx" message to stdout only if --verbose
266
267 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
268
269         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
270         * support/regression/tests/bug1426356.c: added
271         * support/regression/tests/bitfields.c: removed 2 tests
272
273 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
274
275         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
276         * device/include/mcs51/c8051f330.h,
277         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
278           PCON_IDLE,PCON_STOP and added sfr16 definitions
279         * device/lib/_divsint.c,
280         * device/lib/_divuint.c,
281         * device/lib/_divulong.c,
282         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
283           register bank bug for small stackauto
284
285 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
286
287         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
288
289 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
290
291         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
292         * all.dsp: corrected several bin paths
293         * device/include/mcs51/c8051f120.h,
294         * device/include/mcs51/c8051f300.h,
295         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
296           to PCON_IDLE,PCON_STOP
297         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
298         * device/lib/printf_large.c (output_float): fixed bug 1388703
299         * support/regression/tests/bug1057979.c: added test for bug 1388703
300
301 2006-02-08 Raphael Neider <rneider AT web.de>
302
303         * src/pic/pcode.c (pciTRIS): fixed typo,
304           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
305           (LinkFlow): fixed handling of flows that end in a call,
306           (ReuseReg): perform safety check earlier
307         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
308             to work with flows at the beginning of a pBlock,
309             fixes #1426557 (Symbol not previously defined),
310           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
311             usage information
312           (RemoveUnusedRegisters): update register usage info
313         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
314             created, reuse existing ones instead
315         * src/pic/gen.c (genPcall): fixed #1424719
316
317 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
318
319         * link/z80/lkmain.c,
320         * link/z80/lklex.c,
321         * link/z80/lkdata.c,
322         * link/z80/aslink.h: fixed build on current cygwin:
323         replaced getline() by lk_getline()
324
325 2006-02-01 Borut Razem <borut.razem AT siol.net>
326
327         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
328           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
329           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
330           src/regression/bool1.c, src/regression/bool2.c,
331           src/regression/bool3.c, src/regression/call1.c,
332           src/regression/compare.c, src/regression/compare10.c,
333           src/regression/compare2.c, src/regression/compare3.c,
334           src/regression/compare4.c, src/regression/compare5.c,
335           src/regression/compare6.c, src/regression/compare7.c,
336           src/regression/compare8.c, src/regression/compare9.c,
337           src/regression/configword.c, src/regression/for.c,
338           src/regression/inline.c, src/regression/mult1.c,
339           src/regression/nestfor.c, src/regression/or1.c,
340           src/regression/pointer1.c, src/regression/ptrfunc.c,
341           src/regression/rotate1.c, src/regression/rotate2.c,
342           src/regression/rotate3.c, src/regression/rotate4.c,
343           src/regression/rotate5.c, src/regression/rotate6.c,
344           src/regression/rotate7.c, src/regression/string1.c,
345           src/regression/struct1.c, src/regression/sub.c,
346           src/regression/sub2.c, src/regression/switch1.c,
347           src/regression/while.c, src/regression/xor.c,
348           src/regression/create_stc, src/regression/simulate,
349           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
350           regression tests
351         * src/regression/gpsim_assert.h: added
352
353 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
354
355         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
356         ((void (code *) (void)) 0) ();
357         * as/hc08/aslex.c,
358         * as/hc08/aslink.h,
359         * as/hc08/asm.h,
360         * as/hc08/asmain.c,
361         * as/hc08/lkdata.c,
362         * as/hc08/lklex.c,
363         * as/hc08/lkmain.c,
364         * as/mcs51/aslex.c,
365         * as/mcs51/aslink.h,
366         * as/mcs51/asm.h,
367         * as/mcs51/asmain.c,
368         * as/mcs51/lkdata.c,
369         * as/mcs51/lklex.c,
370         * as/mcs51/lkmain.c,
371         * as/z80/aslex.c,
372         * as/z80/asm.h,
373         * as/z80/asmain.c: fixed build on current cygwin:
374         replaced getline() by as_getline()
375
376 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
377
378         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
379         declarator in the symbol chain
380         * src/SDCCsymt.h,
381         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
382         parameter list for function pointers
383         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
384         * support/regression/tests/bug-716242.c: added
385
386 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
387
388         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
389         offset if possible
390         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
391
392 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
393
394         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
395         inifinitely recurseable, added static
396         * support/regression/tests/bug-1408066.c: added
397
398 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
399
400         * src/SDCCicode.h,
401         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
402         renamed, added possibility to create "postLoopLbl"-labels
403         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
404         newiTempLoopHeaderLabel
405         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
406         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
407         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
408         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
409         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
410         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
411         (basicInduction): fixed bug #136564, made static,
412         (loopInduction): changed parameter of basicInduction, made static,
413         (addPostLoopBlock): added
414         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
415         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
416         findLoopEndSeq
417         * support/regression/tests/bug-136564.c: added
418         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
419         --std-sdcc99 to LIBSDCCFLAGS
420
421 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
422
423         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
424         while loop
425         * support/regression/tests/bug-1406131.c: added
426
427 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
428
429         * src/SDCCast.c (decorateType): fix promotion of unary minus
430         * src/SDCCsymt.c (computeType): beautified
431         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
432         (valUnaryPM, valComplement): fix sign and promotion,
433         (valNot): ANSI: result type is int (SDCC: unsigned char)
434         * support/regression/tests/uminus.c: speedup by removing superflous
435         test case 'int'
436         * support/regression/tests/onebyte.c: added promotion and signedness
437         tests for unary minus
438         * support/regressions/tests/bug-477927.c: disable warning about
439         uninitialized variables
440         * support/regression/tests/not.c: added
441
442 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
443
444         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
445         * src/mcs51/gen.c (gen51Code): show final register usage after
446         fillGaps in asm with --i-code-in-asm
447         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
448         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
449         incUsed, rliveClear, adjustIChain): made static,
450         (setFromRange): excluded because it's unused,
451         (findPrevUseSym, markWholeLoop): added,
452         (findPrevUse): rewritten; fixes bug 895992; now a complete search
453         through all branches of predecessors enables sdcc to emit the warning
454         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
455         (rlivePoint): made static, added parameter emitWarnings which is only
456         true during the first run out of two,
457         (findRecursiveSucc, findRecursivePred): removed,
458         (computeLiveRanges): made static, added parameter emitWarnings,
459         (dumpIcRlive): added for debugging only
460         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
461         removed prototype of setFromRange()
462         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
463         in call of computeLiveRanges()
464         * support/regression/tests/bug-895992.c: added
465         * support/regression/tests/bug-971834.c: added
466         * support/valdiag/tests/bug-895992.c: added
467         * support/valdiag/tests/bug-971834.c: added
468
469 2005-12-18 Raphael Neider <rneider AT web.de>
470
471         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
472           (genUnpackBits): improved code for direct operands,
473           (genPackBits): improved code for literal assignment to bitfields
474             and for direct destination operands (no FSR indirection),
475             prevented redundant AND, fixes #1362800,
476           (AccLsh): added parameter to disable masking of the result
477         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
478           skip instructions with side-effects (like incfsz),
479           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
480         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
481         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
482           fixes #1375263
483
484 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
485
486         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
487         volatile variables as spill location
488
489 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
490
491         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
492         replacing literals
493         * support/regression/tests/bug-1376320.c: added
494
495 2005-12-08 Raphael Neider <rneider AT web.de>
496
497         * src/pic/device.c: renamed is_shared to pic14_is_shared
498         * src/pic/gen.c (genIfx): re-enabled handling of sbits
499         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
500           (is_valid_identifier): added for above workaround
501
502 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
503
504         * device/lib/Makefile.in: fixed to enable port-specific-objects
505         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
506           char, thanks Hubert Sack
507         * doc/sdccman.lyx: documented --xstack-loc,
508           elaborated a bit more on interrupts and pitfalls,
509           removed "setjmp/longjmp unsupported",
510           documented some unsupported C99 features
511         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
512         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
513           if, thanks Hubert Sack
514         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
515         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
516           make make_library
517         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
518           regression tests can report resource usage (rfe 700441)
519         * support/regression/collate-results.py: report resource usage
520         * support/regression/ports/ds390/spec.mk,
521         * support/regression/ports/hc08/spec.mk,
522         * support/regression/ports/mcs51/spec.mk,
523         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
524         * support/regression/ports/ds390/uCsim.cmd,
525         * support/regression/ports/hc08/uCsim.cmd,
526         * support/regression/ports/mcs51/uCsim.cmd,
527         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
528         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
529           library, use the default one
530         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
531           building the library
532
533 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
534
535         * config.dsp: added dependency on .version and configure_vc.awk
536         * device/include/setjmp.h: updated for --stack-auto and --xstack
537         * device/include/mcs51/at89c51snd1c.h: corrected line endings
538         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
539         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
540         * device/lib/libsdcc.lib: added _setjmp
541         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
542           (decorateType): fixed bug 1372851,
543           (optimizeGetHbit): fixed warning
544         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
545           array initialisation
546         * support/regression/tests/bug1057979.c: added test for bug 1358192
547         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
548
549 2005-12-03 Borut Razem <borut.razem AT siol.net>
550
551         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
552           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
553
554 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
555
556         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
557         createIval): implement symbol independant "flexible array member",
558         (createIvalCharPtr): implemented flexible array initialisation with a
559         string
560         * src/SDCCsymt.c (copyStruct): removed,
561         (getSize): fixed misleading comment,
562         (getAllocSize): removed, the additional allocation size is now in
563         sym->flexArrayLength,
564         (checkStructFlexArray): new, syntax checks for flexible array members,
565         (compStructSize): added syntax checks for "flexible array members"
566         (copyStruct): removed,
567         (copyLinkChain): removed inefficient fix for bug 770487
568         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
569         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
570         symbol->flexArrayLength
571         * src/SDCCerr.c,
572         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
573         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
574         * support/regression/tests/structflexarray.c: added
575         * support/valdiag/tests/structflexiblearray.c: added
576
577 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
578
579         * src/SDCCast.c (decorateType): fixed bug 1368489
580         * support/Util/SDCCerr.c,
581         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
582
583 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
584
585         * device/include/mcs51/at89c51snd1c.h: added file submitted by
586           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
587
588 2005-11-27 Borut Razem <borut.razem AT siol.net>
589
590         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
591           support/cpp2/mkdeps.h: added command line option
592           -obj-ext=<extension> to SDCPP to define object file externion, used
593           for generation of make dependencies (-M)
594         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
595
596 2005-11-26 Borut Razem <borut.razem AT siol.net>
597
598         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
599           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
600           added pic and pic16 libraries
601
602 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
603
604         * device/include/float.h: Corrected typo in prototype of __fsgt
605
606 2005-11-25 Borut Razem <borut.razem AT siol.net>
607
608         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
609           added creation of model-mcs51-stack-auto libraries
610
611 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
612
613         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
614         and fields-list too
615         * src/SDCCast.c (createIvalArray): removed obsolete comment
616
617 2005-11-24 Borut Razem <borut.razem AT siol.net>
618
619         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
620           added missing device/lib/mcs51/crt*.asm sources
621
622 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
623
624         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
625
626 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
627
628         * device/lib/_fs2schar.c,
629         * device/lib/_fs2sint.c,
630         * device/lib/_fs2slong.c: optimized inline asm
631
632 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
633
634         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
635           Better handling of floats between -1.0 and 0.0.
636
637 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
638
639         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
640           (the missing "if"s prohibited removal of redundant labels)
641
642 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
643
644         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
645           Properly convert floats between -1.0 and 0.0 to long, int, and char
646           types (max integer value of negative floats tends to zero).
647         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
648           Removed changes made so to work properly with floats between
649           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
650           and _fs2char.c
651
652 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
653
654         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
655         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
656         (genCast) cosmetic change
657         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
658         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
659         from mcs51
660         * support/regression/tests/bitfields (testSignedBitfields): added
661
662 2005-11-18 Borut Razem <borut.razem AT siol.net>
663
664         * sdcc/device/lib/Makefile.in: remove all unnecessary files
665         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
666           introduced SILENT option to make building of pic16 libraries less
667
668 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
669
670         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
671           Now they work properly with floats between -1.0 and 0.0
672         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
673
674 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
675
676         * src/SDCCicode.c (printOperand): added missing else
677
678 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
679
680         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
681         reformatted for better readability
682         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
683         signed bitfields
684
685 2005-11-17 Borut Razem <borut.razem AT siol.net>
686
687         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
688           introduced SILENT option to make building of pic16 libraries less
689           verbose - used for nightly snapshot build
690         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
691           available on Win32 platforms.
692         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
693           medium, large, pic and pic16
694
695 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
696
697         * device/lib/printf_large.c: Temporary patch for bug 1358192:
698           printf("%f"...) sets fraction to zero.
699
700 2005-11-16 Raphael Neider <rneider AT web.de>
701
702         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
703           fixes #1357221
704         * src/pic/gen.c (genIfx): implemented for CARRY bit
705         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
706           to generic pointers, fixes #1357332,
707           (pic16_movLit2f): NEW,
708           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
709
710 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
711
712         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
713
714 2005-11-11 Raphael Neider <rneider AT web.de>
715
716         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
717         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
718           compute pointer's type from operand,
719           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
720           improved single bit reads, fixes bug #1353379
721
722 2005-11-09 Borut Razem <borut.razem AT siol.net>
723
724         * support/scripts/sdcc.nsi: added lib/pic to the package
725
726 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
727
728         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
729
730 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
731
732         * support/regression/tests/bug1348008.c: added
733         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
734         * support/regression/tests/bug1337835.c: updated comment
735
736 2005-11-06 Borut Razem <borut.razem AT siol.net>
737
738         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
739           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
740           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
741           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
742           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
743           dynamic construction of cl_error_class and derivates - 2.nd try
744
745 2005-11-05 Borut Razem <borut.razem AT siol.net>
746
747         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
748           bug, which caused Bus Errors on sparc solaris
749
750 2005-11-04 Borut Razem <borut.razem AT siol.net>
751
752         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
753           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
754           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
755           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
756           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
757           and derivates to resolve the initialization problem on OSX
758
759 2005-11-02 Borut Razem <borut.razem AT siol.net>
760
761         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
762           corrected typo - #include <winsock2.h>
763
764 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
765
766         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
767           (_asxxxx_mapping): added org directive for future enhancements
768
769 2005-11-01 Borut Razem <borut.razem AT siol.net>
770
771         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
772           enabled sockets on WIN32
773         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
774
775 2005-10-31 Borut Razem <borut.razem AT siol.net>
776
777         * support/regression/generate-cases.py: escape backslashes in {testcase}:
778           WIN32 backslash path delimiters should be escaped when used in C strings
779         * support/regression/tests/bitfields.c: exclude failing assertions for
780           __CYGWIN32__ and __MINGW32__ hosts
781
782 2005-10-30 Borut Razem <borut.razem AT siol.net>
783
784         * src/SDCCutil.c: corrected double comparison typo
785
786 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
787
788         * device/lib/medium/Makefile: added for new memory model medium
789         * device/include/asm/mcs51/features.h: updated for medium/pdata
790         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
791           added Multiply & Accumulate sbit's and MAC0_PAGE define
792         * device/include/mcs51/c8051f300.h: added sfr16 definitions
793         * device/include/mcs51/c8051f310.h: added sfr16 definitions
794         * device/lib/_mullong.c: update for medium model
795         * device/lib/incl.mk: added medium model
796         * doc/sdccman.lyx: documented medium model
797         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
798         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
799         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
800         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
801           (allocParms): set SCLS and OCLS to pdata for medium model
802         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
803           for pdata,
804           (powof2): return <0 if not power of 2
805         * src/avr/gen.c (genBitWise): use updated powof2
806         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
807           (shiftR2Left2Result): small optimization in setup, save acc when storing,
808           (shiftLLeftOrResult): use B if necessary
809         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
810         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
811         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
812         * support/regression/Makefile.in: added test-mcs51-medium
813         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
814
815 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
816
817         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
818         specifier unsigned
819         * device/lib/time.c (mktime): fixed bug 1334315
820
821 2005-10-28 Raphael Neider <rneider AT web.de>
822
823         * device/include/pic/p16f_common.inc: added common declarations
824         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
825
826 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
827
828         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
829           (aopPutUsesAcc): added to predict accumulator use,
830           (assignResultValue): save acc if necessary,
831           (genMinusDec): store result if indirectly addressed,
832           (genDivOneByte):  save acc if necessary,
833           (movLeft2Result): bugfix if left already in acc,
834           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
835             attention to accumulator use (esp. pdata),
836           (genReceive): receive pdata correctly
837         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
838         * src/SDCCicode.h: added isOperandInPagedSpace prototype
839
840 2005-10-27 Raphael Neider <rneider AT web.de>
841
842         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
843
844 2005-10-27 Raphael Neider <rneider AT web.de>
845
846         * .version: changed version to 2.5.4
847         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
848         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
849           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
850             arithmetics support routines
851         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
852         * device/lib/Makefile.in: also create installdir for pic
853
854         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
855           pic14 port as well
856         * src/pic/device.c (dump_sfr): rewritten to delegate register
857           placement to the linker (use `extern sym' rather than sym EQU addr),
858           (validAddress): fixed to check last specified address
859         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
860           (popGetLit): truncate literal value to 8 bit,
861           (popGet): moved assert to more appropriate place
862           (popGetExternal): create pCode operand from and mark the according
863             symbol as being `extern'
864           (popGetAddr): added sanity check on immediate's offset, provide
865             GPOINTER tag on demand
866           (aopPut): fixed for immediates,
867           (mov2w_op): move operand's address or contents to WREG (depending on
868             operand type), safer variant of mov2w,
869           (movwf,call_libraryfunc): NEW, handy abbreviations,
870           (get_argument_pcop,get_return_val_pcop,pass_argument,
871           get_returnvalue): interface for accessing function parameters and
872             return values,
873           (assignResultValuei,genRet): use new parameter/return value interface
874           (pic14_getDataSize): back to old version handling generic pointers,
875           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
876             provided implementation and/or fixed old one,
877           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
878             calls, removed legacy 8051 reference code
879           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
880           (loadSignToC): NEW, move the operands sign bit to CARRY,
881           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
882             genRightShiftSigned, accepts negative shift counts,
883           (setup_fsr): load FSR and adjust IRP (indirect memory access),
884           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
885             generic pointers, __data pointers and __code pointers,
886           (genUnpackBits,genPackBits): rewritten to work with generic pointers
887             and signed bitfields, limit bitfields to 8 bit,
888           (genDataPointerGet): fixed number of bytes read,
889           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
890           (genPointerGet,genPointerSet): fixed handling of __code pointers,
891             pointers to constant data are no longer assumed to point to __code
892             space, removed invalid pointer types,
893           (bitpatternFromVal): retrieve the PICs representation of an integer
894             or float literal,
895           (genDataPointerSet): fixed assigning to po_immediate operands,
896           (genGenPointerSet): implemented as library call,
897           (genIfx): fixed incorrect condition,
898           (genAddrOf): limit generic pointers' addresses to 2 bytes,
899             provide GPOINTER tag according to destination's storage class,
900           (genCast): added code to handle casting to generic pointers, added
901             sign-/zero extension of the result
902           (aop_isLitLike,op_isLitLike): fixed handling of immediates
903         * src/pic/gen.h: added macros to access IRP bit in STATUS register
904         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
905           extend the result
906         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
907           address/register resides in the shared banks
908           (emitSymbolToFile): improved to handle global and `pinned' symbols,
909             put all variables into separate sections (have the linker arrange
910             them)
911           (picglue): put init code and interrupt handlers in separate sections
912         * src/pic/main.c: added port specific options table, modified to PORT
913           structure to make GPOINTERs 3 byte, added pic14_options
914           (_pic14_do_link): private linking routine (update paths to libraries,
915             add libsdcc.lib by default)
916         * src/pic/main.h: declare pic14_options
917         * src/pic/pcode.c: fixed instructions i/o relations,
918           (RegCond): reverted to correct version,
919           (newpCodeOpLit): truncate literals to 8 bit,
920           (genericPrint): added debug output,
921           (getRegFromInstruction): fixed for various operand types, simplified
922           (BuildFlow): fixed broken handling of isntructions with labels
923           (LinkFlow): start at last instruction in flow (skip trailing comments),
924             pass the flow on to the next instruction after CALL
925           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
926           (insertPCodeInstruction): fixed inserting after a skip instruction,
927           (DoBankSelect): fixed for labeled instructions
928           (OptimizepBlock): honor --nopeep switch
929           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
930         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
931         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
932           (pCodeOptime2pCodes): allow disabling this optimization via
933             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
934             but is still buggy), started implementation of a dataflow based
935             pCode optimization (CSE + dead code elimination)
936           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
937         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
938           names are independant of the stack location and therefore portable across
939           devices
940
941 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
942
943         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
944           (selectSpil): fixed bug 1337835 by not spilling bit variables
945         * support/regression/tests/bug1337835.c: added test for this bug
946         * src/mcs51/peeph.def: restart after rule 3.c,
947           addded rules 263.x to optimize loading constants
948
949 2005-10-26 Raphael Neider <rneider AT web.de>
950
951         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
952         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
953           (genAssign): emit warning when casting literals to generic pointer
954             type, also applies when taking the address of a fixed variable,
955           (genCast): improved casting to generic pointers
956         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
957           extern variables, added verbose error message
958         * device/include/pic16/{string.h,errno.h}: added #pragma library c
959
960 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
961
962         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
963         carry must be complemented too
964         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
965         could be emitted by genMinus
966         * src/SDCCval.c (constVal): fixed bug 1305065
967
968 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
969
970         * src/SDCCast.c (addCast): added promotion for bit variables
971         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
972         promotion casts + optimisation
973         (optimizeGetWord): fix warning 'i' might be used uninitialized
974         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
975         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
976
977 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
978
979         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
980         all chars are promoted to int; promotion should be handled in SDCCast.c
981
982 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
983
984         * device/lib/_strcmp.c: Fixed bug 1326457
985
986 2005-10-11 Raphael Neider <rneider AT web.de>
987
988         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
989         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
990
991 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
992
993         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
994         * support/regression/tests/sfr16.c: added test for the sfr32 bug
995
996 2005-10-04 Raphael Neider <rneider AT web.de>
997
998         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
999           device/lib/pic16/pics.all: added pic18f1320
1000         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1001
1002 2005-09-30 Raphael Neider <rneider AT web.de>
1003
1004         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1005         * src/pic16/devices.inc: NEW, provides device descriptions
1006         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1007
1008 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1009
1010         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1011           GETHBIT
1012
1013 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1014
1015         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1016           documented Any Order Bit, Higher Order Byte and Higher Order Word
1017         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1018         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1019           (optimizeGetAbit): new, to get any bit, not only the high bit,
1020           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1021           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1022           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1023           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1024             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1025             GETABIT, GETBYTE, GETWORD: decorate them,
1026           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1027           (ast_print): added GETABIT, GETBYTE, GETWORD
1028         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1029         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1030           (geniCodeBinary): new generic binary icode,
1031           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1032         * src/port.h: updated comment for PORT.hasExtBitOp
1033         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1034           (genGetByte): new, to get a single byte,
1035           (genGetWord): new, to get a word from a long,
1036           (gen51Code): added GETABIT, GETBYTE, GETWORD
1037         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1038
1039 2005-09-23 Raphael Neider <rneider AT web.de>
1040
1041         * configure.in, configure: have device/lib/pic configured
1042         * device/lib/Makefile.in: added model-pic14
1043         * device/lib/clean.mk: added pic/ to clean rule
1044         * device/lib/pic: added rudimentary pic14 library providing support
1045           functions for multiplication/division/generic pointer access
1046         * src/SDCCopt.c (convilong): mark support functions as extern
1047           for pic14 port as well
1048         * src/pic/gen.c (genMult): added assertions,
1049           (genpic14Code): emit warning on unhandled iCodes
1050         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1051         * src/pic/pcode.c (pCodeOpCopy),
1052         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1053           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1054           SFR_REGISTER}), made safe for future extensions
1055         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1056           instructions even if preceeded by SKIP instructions (also remove
1057           them); removed unused code
1058         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1059           prevents leaving parts of the structure uninitialized after copying
1060
1061 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1062
1063         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1064           ago by me
1065         * support/regression/tests/addsub.c: added test for the bug
1066
1067 2005-09-21 Raphael Neider <rneider AT web.de>
1068
1069         * device/include/pic16/pic18f1220.h,
1070           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1071         * device/lib/pic16/Makefile.rules: added missing opening paren
1072         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1073           are provided in genutils.c,
1074           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1075           operand/result sizes,
1076           (genCmp): assert on NULL pointers first, then check deref'ed values
1077         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1078           result size
1079
1080 2005-09-18 Raphael Neider <rneider AT web.de>
1081
1082         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1083           as these are now unused,
1084           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1085         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1086           local, avoids uninitialized pointer dereference on r->name
1087         * src/pic16/ralloc.c (newReg): fixed indentation
1088
1089 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1090
1091         * src/SDCCval.c (constVal): fixed bug 730366
1092         * support/Util/SDCCerr.c,
1093         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1094
1095 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1096
1097         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1098
1099 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1100
1101         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1102
1103 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1104
1105         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1106           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1107         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1108           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1109         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1110         * packihx/packihx.c (hexDigit): made c unsigned char
1111         * as/mcs51/lklibr.c (fndsym),
1112         * link/z80/lkgb.c (gb),
1113         * link/z80/lklibr.c (fndsym),
1114         * link/z80/lkrloc.c (relr),
1115         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1116         * src/SDCC.lex (checkCurrFile, process_pragma),
1117         * src/SDCCglue.c (spacesToUnderscores),
1118         * src/SDCCmain.c (setParseWithComma, processFile),
1119         * src/asm.c (tvsprintf, printCLine),
1120         * src/avr/gen.c (emitcode, aopPut),
1121         * src/ds390/gen.c (emitcode),
1122         * src/hc08/gen.c (emitcode, emitinline),
1123         * src/mcs51/gen.c (emitcode, genInline),
1124         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1125           tokenizeLineNode),
1126         * src/pic/ralloc.c (debugLog),
1127         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1128           tokenizeLineNode),
1129         * src/pic16/ralloc.c (debugLog),
1130         * src/z80/main.c (_process_pragma):
1131            made all ctype.h function calls safe
1132         * src/SDCCopt.c: include math.h for fabs
1133         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1134           and used them throughout the code to make ctype.h function calls safe
1135         * src/ds390/main.c (asmLineNodeFromLineNode),
1136         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1137         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1138            unsigned char*
1139         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1140           (newpCodeAsmDir): made ctype.h function calls safe
1141         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1142           pic16_emitcode):  made lbp unsigned char*
1143         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1144           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1145         * src/xa51/gen.c (emitcode),
1146         * src/z80/gen.c (_emit2): made lbp unsigned char*
1147         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1148            char*
1149
1150 2005-09-05 Raphael Neider <rneider AT web.de>
1151
1152         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1153           access bank splitpoint
1154
1155 2005-09-05 Raphael Neider <rneider AT web.de>
1156
1157         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1158
1159 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1160
1161         * .version: changed to version 2.5.3
1162         * doc/sdccman.lyx: changed version to 2.5.3,
1163           documented --codeseg and --constseg and pragma codeseg and constseg,
1164           documented bit parameters (reentrant) and bit returning
1165         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1166            currFunc->recvSize, but is this ok for all ports?
1167           (ast2iCode): result of ~ on unsigned char must be cast to int for
1168            bool to work
1169         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1170           function pointers in bit space
1171         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1172           (processFuncArgs): call port.reg_parm() with reentrancy info
1173         * src/port.h,
1174         * src/avr/main.c,
1175         * src/ds390/main.c,
1176         * src/hc08/main.c,
1177         * src/pic/main.c,
1178         * src/pic16/main.c,
1179         * src/xa51/main.c,
1180         * src/z80/main.c: port.reg_parm prototype extended with
1181           "bool reentrant" parameter
1182         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1183           options.stackAuto for allocating bit register parameters
1184         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1185           (genSend): set BitBankUsed if it is,
1186           (selectRegBank): factored out of genCall for use in genPcall,
1187           (genCall): removed redundant dtype assignmen, use selectRegBank,
1188           (genPcall): handle returning in Carry properly, save in F0 if needed,
1189           (genReceive): handle bit register parameters
1190         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1191           (mcs51_assignRegisters): enable bit registers for all reentrant
1192            functions and don't set BitBankUsed unconditionally
1193         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1194         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1195         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1196
1197 2005-08-27 Borut Razem <borut.razem AT siol.net>
1198
1199         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1200         ppc-osx (Darwin) does not support -u option. It seems that it is
1201         supported only on Linux - GNU cp
1202
1203 2005-08-25 Borut Razem <borut.razem AT siol.net>
1204
1205         * sim/ucsim/gui.src/serio.src/Makefile.in,
1206           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1207           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1208           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1209           install and strip, since the strip at /usr/ccs/bin should be used
1210           on solaris
1211
1212 2005-08-24 Borut Razem <borut.razem AT siol.net>
1213
1214         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1215
1216 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1217
1218         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1219         ffffffffu
1220
1221 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1222
1223         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1224         * as/mcs51/lkmain.c (link_main): fixed warning
1225         * device/include/stdbool.h: ds390 has no advanced bit support yet
1226         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1227         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1228         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1229           and updated their macros
1230         * src/SDCCval.c (constVal): updated comment for renamed b_long
1231
1232 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1233
1234         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1235         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1236           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1237           (oprio): set priority for '['
1238         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1239            and adb_24_bit
1240         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1241         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1242         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1243         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1244           added overlayable BIT_BANK area
1245         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1246           (summary2): explain 'T' in legenda
1247         * as/mcs51/lkrloc.c: replaced old K&R style,
1248           (relr): added R_BIT processing,
1249           (errmsg): added "Bit-addressable relocation error",
1250           (adb_bit): added for converting from byte- to bit-addressable space,
1251           (adb_24_bit): added for converting from byte- to bit-addressable space
1252         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1253            used in reentrant functions now even as return value
1254         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1255         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1256           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1257         * src/SDCCglobl.h: added indicator BitBankUsed
1258         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1259            the bit registers b0-b7
1260         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1261           (geniCodeCast): fixed bug 1263853,
1262           (geniCodeLogicAndOr): put result in bool or char,
1263           (geniCodeReceive): added parameter func for accessing the return type,
1264           (geniCodeFunctionBody): pass func to geniCodeReceive
1265         * src/SDCCmain.c: added indicator BitBankUsed
1266         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1267         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1268           (checkSClass): don't put automatic bool/bit on stack,
1269           (checkFunction): removed check on function cannot return bit
1270         * src/SDCCsymt.h: added newBoolLink prototype
1271         * src/mcs51/gen.c (rb1regs): added bit registers,
1272           (movc): created for assigning to carry,
1273           (pushReg, popReg): created for pushing registers,
1274           (sameRegs): check both AOP_REG and AOP_CRY types,
1275           (aopOp): handle bit registers,
1276           (aopPut): optimization no self-assign,
1277           (saveRegisters): push reg->base (bits) only once for bit registers,
1278            and use pushReg,
1279           (unsaveRegisters): pop reg->base only once and use popReg,
1280           (assignResultValue): added parameter func and return in carry for bits,
1281           (genIpush): optimization no reload in A if not changed,
1282           (genSend): bit parameters in reentrant functions are passed in bit
1283            registers by first assigning to bits in B, then save registers and
1284            copy B to bits,
1285           (genCall): handle returning in Carry properly, save it in F0 if needed,
1286           (genPcall): updated assignResultValue call, this is not safe yet for bit
1287            returning function !!!
1288           (genFunction): don't generate equ's for bit registers and use pushReg,
1289           (genEndFunction): take care of bit returning functions and use popReg,
1290           (genRet): return bit in Carry,
1291           (genIfx): optimize bit registers and other directly addressable bits,
1292           (genReceive): updated assignResultValue call
1293         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1294           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1295            registers when using stack-auto
1296         * src/mcs51/ralloc.c (_G): added allBitregs,
1297           (regs8051): added the bit registers,
1298           (createStackSpil): use macro IS_BIT,
1299           (getRegBit): added to allocate a bit register, else spill,
1300           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1301           (updateRegUsage): factored out to ease stepping while debugging,
1302           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1303            also allocate bit registers,
1304           (fillGaps): handle bit registers,
1305           (findAllBitregs): added to create bit vector with all bit registers,
1306           (mcs51_allBitregs): returns this bit vector,
1307           (mcs51_assignRegisters): when using stack-auto use bit registers for
1308            passing parameters and creating local variables
1309         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1310
1311 2005-08-22 Borut Razem <borut.razem AT siol.net>
1312
1313         * device/lib/Makefile.in: replaced find option -or with -o
1314           to make it run on solaris
1315
1316 2005-08-22 Raphael Neider <rneider AT web.de>
1317
1318         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1319           fixes #1265442 (crash on Solaris)
1320
1321 2005-08-20 Borut Razem <borut.razem AT siol.net>
1322
1323         * configure, configure.in: added tests for libsocket and libnsl libraries,
1324           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1325           from support/regression/Makefile.in
1326         * support/regression/Makefile.in: added
1327         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1328         * sim/ucsim/libtool: regenerated on sparc-solaris
1329         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1330           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1331           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1332           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1333           sparc-solaris, which doesn't use GNU ld linker
1334         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1335         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1336
1337 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1338
1339         * src/mcs51/peeph.def: updated comments
1340
1341 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1342
1343         * device/lib/_gptrget.c,
1344         * device/lib/_gptrput.c: slightly shorter
1345         * doc/sdccman.lyx: incremented version
1346         * src/mcs51/peeph.def: moved peephole comments to the line of first
1347           change to better keep line correlation, reanimated 186.e
1348         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1349
1350 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1351
1352         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1353           David Saxton with quotes around file name.
1354
1355 2005-08-15 Borut Razem <borut.razem AT siol.net>
1356
1357         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1358           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1359           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1360           make tests run on x86_64 platform
1361
1362 2005-08-13 Raphael Neider <rneider AT web.de>
1363
1364         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1365           as it might be executed DURING a build (parallel make is wonderful)
1366
1367 2005-08-13 Raphael Neider <rneider AT web.de>
1368
1369         * device/lib/Makefile.in (port-specific-objects-pic16):
1370           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1371         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1372           dependency
1373         * device/lib/pic16/Makefile.rules: build subdirs before creating
1374           the library, removed builddir rule, create $(builddir) early in
1375           recurse rule, use empty recurse rule for leaf directories
1376         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1377           mkdir errors (race condition), removed duplicate suffix "hex"
1378           from clean rules
1379         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1380         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1381           prevents mkdir -p from aborting on Alpha
1382
1383 2005-08-12 Raphael Neider <rneider AT web.de>
1384
1385         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1386           db-statements in order to allow for arrays of pointers in code
1387           sections to be placed without interspersed 0-padding, fixes
1388           bug #1256215
1389         * (emitStatistics): fixed division by zero for pic18f1220
1390         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1391           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1392         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1393         * (pic16_pCodeConstString): keep track of already emitted string
1394           literals to prevent "duplicate definitions of symbol _str_NR"
1395         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1396           debug message
1397         * device/lib/Makefile.in: ignore failing PIC16 library builds
1398         * device/lib/pic16/Makefile: do not build if gputils are missing
1399         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1400
1401 2005-08-10 Raphael Neider <rneider AT web.de>
1402
1403         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1404           my last commit)
1405
1406 2005-08-10 Raphael Neider <rneider AT web.de>
1407
1408         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1409           Rokas' patch to add the new fixed point type "__fixed16x16"
1410         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1411           functions for __fixed16x16 arithmetics
1412         * device/lib/pic16: reimplemented the build system to support
1413           a separate build directory, better handling of libio (create
1414           the library in a separate subdir for each architecture) and
1415           easier configuration (centralized in Makefile.common)
1416
1417 2005-08-07 Raphael Neider <rneider AT web.de>
1418
1419         * src/pic16/gen.c (genrshTwo): fixed sign extension
1420         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1421         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1422           added T0CONbits
1423         * device/include/pic16/pic18f4220.h: NEW, header for
1424           pic18f4220 and pic18f4320
1425         * device/include/pic16/pic18fregs.h: added new devices,
1426           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1427         * device/include/pic16/signal.h: resolved name clashes
1428           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1429           to also allow testing for interrupt enable bits, added
1430           comments on how to use the macros
1431         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1432         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1433           register definitions for the devices
1434         * device/lib/pic16/pics.all: added new devices
1435         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1436           allocated memory
1437         * device/lib/pic16/libc/stdlib/memfree: do not count
1438           the block header as free memory
1439         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1440           simplified and added missing end-of-blocklist-marker
1441           (reported by Peter Onion, fixes #1252814)
1442         * (_mergeHeapBlock): fixed loop condition
1443         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1444           len==0, restructured code
1445         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1446           up a bit, reduced bitfield accesses, prevent endless loops
1447           in case of heap corruption
1448         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1449           "unreferenced arguments/must return a value" warnings
1450         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1451           replaced BAUDREG with SPBRG
1452         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1453           device/lib/pic16/debug/gstack/gstack.c: replaced
1454           _naked, _asm, _endasm with __naked, __asm, __endasm
1455
1456 2005-08-05 Raphael Neider <rneider AT web.de>
1457
1458         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1459           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1460
1461 2005-08-05 Borut Razem <borut.razem AT siol.net>
1462
1463         * device/lib/Makefile.in: added missing ';'
1464         * configure: removed ^M characters
1465
1466 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1467
1468         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1469           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1470           License
1471
1472 2005-08-04 Borut Razem <borut.razem AT siol.net>
1473
1474         * configure.in: pic16 libraries build 2nd try - enable running
1475           configure in device/lib/pic16
1476         * configure: regenerated from configure.in
1477         * device/lib/Makefile.in: create $(PORT)/bin directory
1478
1479 2005-08-03 Raphael Neider <rneider AT web.de>
1480
1481         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1482           to get/set values via pointers
1483         * (genUnpackBits,genPackBits): changed detection of
1484           ptr->bitfield vs. sym.bitfield, fixed access via generic
1485           pointers, removed dead (wrong) code for multibyte bitfields
1486         * (genNearPointerGet, genGenPointerGet): removed useless code,
1487           fixed bitfield detection, fixes #1250594
1488         * (genNearPointerSet): removed useless code
1489         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1490           and introduced macro pic16_emitpcode that conditionally emits
1491           the origin of the following pCode (useful for debugging SDCC)
1492         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1493         * (createDefmap): fixed handling of LFSR for --optimize-df
1494
1495 2005-08-02 Borut Razem <borut.razem AT siol.net>
1496
1497         * device/lib/Makefile.in: pic16 libraries build enabled since
1498           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1499
1500 2005-08-02 Raphael Neider <rneider AT web.de>
1501
1502         * src/pic16/gen.c (genPackBits): removed deprecated warning
1503         * (genGenPointerSet): fixed bitfield detection
1504
1505 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1506
1507         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1508
1509 2005-07-31 Raphael Neider <rneider AT web.de>
1510
1511         * device/lib/pic16/libdev/pic18f458.c,
1512           device/include/pic16/pic18f458.h: added missing T0CONbits
1513
1514 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1515
1516         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1517
1518 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1519
1520         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1521
1522 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1523
1524         * device/include/mcs51/at89c51ed2.h: added.
1525
1526 2005-07-23 Raphael Neider <rneider AT web.de>
1527
1528         * src/pic/gen.h: added emitpcode macro for debugging
1529         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1530           and replace by macro adding debug information on demand
1531         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1532         * (gencjne): tried to fix; replaced with correct (slower) code
1533         * (gen{Unp,P}ackBits): fixed single bit access
1534         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1535         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1536           previous instruction
1537         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1538           register has to be handled with care (forbidding movement
1539           of assignments/uses, removing assignments completely, ...)
1540         * (pCodeOptime2pCodes): make use of regIsSpecial
1541         * added lots of debugging output (commented out)
1542         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1543           from being reused as result UNLESS it is known to work
1544
1545 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1546
1547         * support/Util/dbuf.h: include <stddef.h> for size_t
1548         * .version: changed to version 2.5.2
1549
1550 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1551
1552         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1553
1554 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1555
1556         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1557           (genModOneByte): removed needless psha/pula
1558
1559 2005-07-22 Raphael Neider <rneider AT web.de>
1560
1561         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1562           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1563         * src/pic/gen.c (resolveIfx): do not "invent" labels
1564         * (genSkipc): changed to positive logic
1565         * (genSkipCond): removed as no longer needed
1566         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1567           backport from PIC16
1568         * (genLeftShift): check operands are in different registers
1569         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1570           INCF does not update CARRY...
1571         * src/pic/main.c: fixed _linkCmd
1572         * src/pic/pcode.c (unlinkpCode): added inactive code
1573         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1574           alive (do not assign result and operand overlapping registers)
1575
1576 2005-07-22 Raphael Neider <rneider AT web.de>
1577
1578         * src/pic/device.c (dump_sfr): replaced register declaration with
1579           call to emitSymbolToFile() to avoid duplicate symbols
1580         * (assignRelocatableRegisters): do not declare external symbols
1581         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1582           right (take size of type, not etype)
1583         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1584         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1585         * (packRegsForAccUse): disabled assignment of WREG as
1586           the result reg to prevent occurence of just fixed #1235003,
1587           fixes #1242954
1588         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1589           symbols (avoids duplicate symbols in .asm file)
1590         * (pic14emitRegularMap): use emitSymbolToFile()
1591         * src/pic/gen.c (aopOp): fixed spillLocation handling
1592         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1593         * (genDataPointerSet): removed unneccessary variables/output
1594
1595 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1596
1597         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1598         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1599
1600 2005-07-21 Raphael Neider <rneider AT web.de>
1601
1602         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1603           architecture cannot handle them efficiently, fixes bug #1235003
1604         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1605           check for empty sets before using them (fixes bug #1232190)
1606
1607 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1608
1609         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1610           (lnksect2): generate warnings for memory overlap
1611         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1612           constseg to set the name of these segments so you can instruct the linker
1613           to place them in banks
1614         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1615         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1616           added code_seg and const_seg to options
1617         * src/SDCCglue.c (emitMaps): use options.const_seg,
1618           (createInterruptVect): put interrupt vectors in segment HOME,
1619           (glue): put HOME before static segment and put the main glue in HOME,
1620           (glue): use options.code_seg
1621         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1622         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1623           these segments so you can instruct the linker to place them in banks
1624           (linkEdit): use code_loc for HOME segment which should be the first
1625           segment in code memory now
1626         * src/SDCCmem.c: fixed more stuff like bug 1238386
1627         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1628           (changePointer): don't change function pointers to code pointers for
1629           banked functions,
1630           (compareType): added exceptional check for banked function pointers
1631         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1632         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1633           after static in code memory
1634         * src/mcs51/gen.c: added aopLiteralLong prototype,
1635           (aopForSym): use getSize for functions,
1636           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1637           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1638           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1639           the segment,
1640           (genPcall): use call for literal function pointers and generate banked
1641           calls over the one trampoline so there's only one place for the user to
1642           modify according to his/hers hardware,
1643           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1644           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1645         * src/mcs51/main.c: added keyword banked,
1646           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1647         * support/Util/SDCCerr.c,
1648         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1649           needed for passing the bank and address to the trampoline
1650         * device/lib/mcs51/crtbank.asm: added for bankswitching
1651         * device/lib/mcs51/Makefile: added crtbank
1652
1653 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1654
1655         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1656           for fields at offset 0 of a struct or union as reported
1657           on 2005-07-07 in the developer mailing list.
1658
1659 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1660
1661         * src/SDCCmem.c: fixed bug 1238386
1662
1663 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1664
1665         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1666           (patch #1144962), added peephole 300, enabled 259.x
1667         * doc/sdccman.lyx: removed screenshot and provided link instead
1668
1669 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1670
1671         * doc/sdccman.lyx: added section about debugging with ddd
1672         * doc/figures/ddd_example.eps: screenshot of debugging session
1673
1674 2005-07-04 Raphael Neider <rneider AT web.de>
1675
1676         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1677           like CODE pointers, fixes #1115683
1678         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1679           call, fixes bugs #1232211, #1228110,
1680           fixed wrong casts to pCodeFlow from pCodeInstructions
1681
1682 2005-07-04 Raphael Neider <rneider AT web.de>
1683
1684         * src/pic/gen.c (popGet): changed assert to allow for
1685           bit operands
1686         * (popGetAddr): changed signature to provide
1687           an additional index, patched all call sites
1688         * (genCmpEq): handle literal-like operands correctly
1689         * (genAddrOf): added sanity checks on __code/__data pointers
1690         * (genAssign): added handling of symbols from __code section
1691         * (gencjne): do not generate code for comparisons whose result
1692           is neither stored nor used, fixes bug #1171114
1693         * (AccLsh, AccRsh): operate on operand instead of WREG
1694         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1695           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1696           by known count
1697         * rewrote complete shift-by-literal logic, commented unused
1698           functions out
1699         * (genConstPointerGet): get multiple bytes (if result size > 1),
1700           fixed handling of non-immediate addresses
1701         * (genPointerGet): handle CODE pointers like CONST pointers
1702         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1703         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1704           operand is to be treated as a literal or not
1705         * (mov2w,genPcall,genCmpEq),
1706           src/pic/genarith.c: use aop_isLitLike() to decide between
1707           literal/register contents
1708         * (addSign): added missing offset
1709         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1710           only emit comment in debug-mode,
1711           use {aop,op}_isLitLike throughout the file
1712         * src/pic/glue.c: fix initializers for pointers (work in progress)
1713         * src/pic/pcode.c (get_op): honor index on _const symbols
1714         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1715         * (dumppBlock): added pCode size estimation
1716         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1717           check for IS_SYMOP before OP_SYMBOL'ing
1718         * fixed indentation, compacted switch-statements
1719         * (allocReg): find free register and allocate it instead of
1720           allocating new registers all the time
1721         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1722           registers as its operands (necessary only for multibyte GETs)
1723
1724 2005-07-01 Raphael Neider <rneider AT web.de>
1725
1726         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1727           debugging .asm-output macros FENTRY + FEXIT
1728         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1729           way... I wonder...
1730         * (emitpComment): NEW, printf to pCode
1731         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1732           offset handling
1733         * (popGetAddr): NEW, variant of popGet to access an immediates
1734           high(er) bytes instead of the n'th byte of memory they reference,
1735           replaced popGet with popGetAddr where neccessary
1736         * (genDataPointerGet): reactivated and fixed implementation
1737         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1738           accesses
1739         * (genDataPointerSet): fixed multibyte assignments
1740         * (genpic14Code): fixed --i-code-in-asm handling
1741         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1742         * (genPlus): fixed index-out-of-bounds error
1743         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1744         * src/pic/ralloc.c: added debugging output macro FENTRY2
1745         * (spillThis): fixed indentation, enbraced for-body for clarity
1746         * (rematStr): commented out as now unused
1747         * (regTypeNum): commented out special spill case (overwrites
1748           arbitrary values)
1749         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1750
1751 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1752
1753         * doc/sdccman.lyx: documented sfr16/sfr32,
1754           added example for using storage class with function pointers
1755         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1756
1757 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1758
1759         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1760         * device/lib/_itoa.c,
1761         * device/lib/_ltoa.c: optimized codesize
1762         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1763           but don't know how to suppress the double warning.
1764         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1765         * support/Util/SDCCerr.c,
1766         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1767
1768 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1769
1770         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1771           fixed old K&R prototypes
1772         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1773         * device/lib/_gptrget.c,
1774         * device/lib/_gptrgetc.c,
1775         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1776           also new versions for small generic pointers and banked generic pointers
1777         * src/port.h: added const_name
1778         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1779         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1780         * src/SDCCcse.c (findPrevIc): check all associative operators
1781         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1782         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1783         * src/SDCCmem.c: updated comments,
1784           set far-space to 0 for pdata, results in optimized code
1785         * src/SDCCmem.h: added macro CONST_NAME
1786         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1787           moving the info into the highest bits, see also gptrget/gptrput
1788         * src/src.dsp: added sdcc.ico to project files
1789         * src/avr/gen.c (genCast): fixed bug 0x%d
1790         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1791         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1792           relation between ptr_type and DCL_TYPE,
1793           (genCast): fixed bug 0x%d
1794         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1795           (CODE)" for const_name
1796         * src/hc08/gen.c (genCast): fixed bug 0x%d
1797         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1798           (hc08_port): added "CONST (CODE)" for const_name
1799         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1800           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1801           between ptr_type and DCL_TYPE,
1802           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1803           operand* and took AOP() inside function so sfr-ness can be checked,
1804           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1805           new prototype,
1806           (genFunction, genEndFunction): optimized stack setup,
1807           (genMinus): optimized for literals with ending zeroes (in bytes),
1808           (genCast): fixed bug 0x%d
1809         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1810           (mcs51_port): added "CONST (CODE)" for const_name
1811         * src/mcs51/peeph.def: made rule 226 more generic
1812         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1813         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1814         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1815         * src/z80/main.c (z80_port): added NULL for const_name,
1816           (gbz80_port): added NULL for const_name
1817         * support/regression/tests/bug663539.c,
1818         * support/regression/tests/sfr16.c: new tests
1819
1820 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1821
1822         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1823
1824 2005-06-24 Raphael Neider <rneider AT web.de>
1825
1826         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1827           corrected typos...
1828         * device/include/pic16/signal.h: added USBIF
1829           and SIG_USB
1830
1831 2005-06-24 Raphael Neider <rneider AT web.de>
1832
1833         * device/lib/pic16/libdev/pic18f2455.c,
1834           device/include/pic16/pic18f2455.h: NEW
1835         * device/include/pic16/pic18fregs.h,
1836           device/lib/pic16/pics.all,
1837           src/pic16/device.c: added 18f2455
1838         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1839           device/include/pic16/{pic18f[68][567].h,usart.h}:
1840           replaced MULTIPLE_USARTS define with more relaible
1841           compatibility sfrs (for USART access)
1842
1843 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1844
1845         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1846           and the output asm file line is printed on two lines.
1847
1848 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1849
1850         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1851           BGT, BLE, BHI, and BLS instructions
1852         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1853           genCmpEq): removed
1854         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1855           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1856           fixes bug #1216342
1857         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1858
1859 2005-06-15 Raphael Neider <rneider AT web.de>
1860
1861         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1862         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1863         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1864           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1865           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1866
1867 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1868
1869         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1870           Marcel Telka in bug #1215704
1871
1872 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1873
1874         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1875           located in shared memory bank.
1876
1877 2005-05-31 Raphael Neider <rneider AT web.de>
1878
1879         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1880           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1881           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1882
1883 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1884
1885         * device/lib/_strncpy.c: fixed the fix
1886
1887 2005-05-26 Raphael Neider <rneider AT web.de>
1888
1889         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1890           initializers with \0, bug #1208187
1891         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1892           intializers with \0, bug #1208187
1893
1894 2005-05-26 Raphael Neider <rneider AT web.de>
1895
1896         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1897           initializers with \0, bug #1208187
1898         * src/pic16/main.c (_process_pragma): added sanity checks
1899           for stack position and size, emit warnings when appropriate
1900
1901 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1902
1903         * device/lib/_strncpy.c: fixed not filling with \0
1904
1905 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1906
1907         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1908           createFunction),
1909         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1910           compound_statement),
1911         * src/SDCCsymt.h,
1912         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1913
1914 2005-05-24 Raphael Neider <rneider AT web.de>
1915
1916         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1917
1918 2005-05-24 Raphael Neider <rneider AT web.de>
1919
1920         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1921           TRISE definitions, closes bug #1162453
1922
1923 2005-05-22 Raphael Neider <rneider AT web.de>
1924
1925         * src/pic16/main.c (_process_pragma): check for missing
1926           arguments to pragmas code and udata
1927         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1928           consistency fixes to match other headers (thanks to Jim Paris)
1929         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1930
1931 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1932
1933         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1934
1935 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1936
1937         * support/regression/tests/bug1198642.c: new test
1938         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1939         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1940         * support/scripts/resource.h,
1941         * support/scripts/resource.rc,
1942         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1943         * support/scripts/sdcc.ico: added 32x32 icon
1944
1945 2005-05-18 Raphael Neider <rneider AT web.de>
1946
1947         * device/lib/pic16/libdev/pic18f*.c,
1948         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1949           keywords to "__sfr" and "__at (X)"
1950         * device/include/pic16/pic18fregs.h: added pic18f4520
1951         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1952           #1203088 (MPLAB compatibility)
1953
1954 2005-05-17 Raphael Neider <rneider AT web.de>
1955
1956         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1957         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1958         * device/lib/pic16/pics.all: added new devices
1959         * src/pic16/device.c: added support for pic18f4520
1960
1961 2005-05-16 Raphael Neider <rneider AT web.de>
1962         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1963         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1964         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1965           convenience function for bit access
1966
1967 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1968
1969         * device/lib/printf_large.c: fixed bug 1193299
1970         * support/regression/tests/bug1057979.c: added test %3.3s
1971
1972 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1973
1974         * device/include/mcs51/8051.h,
1975         * device/include/mcs51/8052.h: made parseable with lint
1976         * device/include/mcs51/lint.h: added include file for (sp)lint
1977         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1978         * doc/cdbfileformat.lyx,
1979         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1980
1981 2005-05-14 Raphael Neider <rneider AT web.de>
1982
1983         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1984         * device/lib/pic16/libc/stdlib/itoa.c (new)
1985         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1986         * device/lib/pic16/libio/Makefile: exclude subdir according to
1987           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1988         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1989         * src/pic16/gen.c (genFunction): prevent annoying warning
1990         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1991           nameclashes on BeOS
1992         * support/cpp2/cppmain.c (cpp_output_string): new
1993         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1994           fixes bug 1116802
1995
1996 2005-05-13 Borut Razem <borut.razem AT siol.net>
1997
1998         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1999
2000 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2001
2002         * .version: changed to version 2.5.1; back to bleeding edge development
2003
2004 2005-05-11 Borut Razem <borut.razem AT siol.net>
2005
2006         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2007           generate PDF version 1.3 documents
2008
2009 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2010
2011         * .version: changed to version 2.5.0
2012
2013 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2014
2015         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2016
2017 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2018
2019         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2020         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2021         well as many smaller updates.
2022         * .version: changed to version 2.5.0-pre1
2023
2024 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2025
2026         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2027
2028 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2029
2030         * support/regression/tests/bug1185672.c: added
2031         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2032           bug 1185672
2033         * src/mcs51/gen.c (genCall): added comments, made it look safer
2034         * src/mcs51/gen.c (genEndFunction): simplified
2035
2036 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2037
2038         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2039
2040 2005-04-14 Borut Razem <borut.razem AT siol.net>
2041
2042         * fixed bug 1045046 - SIGSEGV with really simple code?:
2043           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2044           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2045
2046 2005-04-14 Borut Razem <borut.razem AT siol.net>
2047
2048         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2049           src/pic16/device.h: temporarily disabled experimental #inline pragma
2050           for 2.5.0 release
2051
2052 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2053
2054         * device/include/z80/stdio.h,
2055         * device/include/z80/string.h: removed these highly incomplete files so
2056           SDCC can use the default ones in device/include/
2057
2058 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2059
2060         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2061         gcc warning.
2062         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2063         fix sdcpp warnings.
2064
2065 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2066
2067         * device/include/malloc.h: removed redundant __reentrant prototypes
2068         * device/lib/_mullong.c: added working xstack variant in asm (C version
2069           doesn't pass regression tests)
2070         * device/lib/bpx.c: used __data and made bpx char for mcs51
2071         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2072           (createFunction): fixed bug with xstackPtr
2073         * src/SDCCcse.c: corrected comments
2074         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2075           (killDeadCode, eBBlockFromiCode): removed unused code
2076         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2077           corrected comments
2078         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2079           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2080           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2081           (genModOneByte): fixed warning in MSVC
2082         * src/mcs51/main.c (): added comments
2083         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2084
2085 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2086
2087         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2088
2089 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2090
2091         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2092
2093 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2094
2095         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2096         characters arrays of larger size than the declared one.
2097
2098 2005-04-10 Borut Razem <borut.razem AT siol.net>
2099
2100         * src/pic/gen.c (genInline),
2101           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2102           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2103           (findNextInstruction), (findPrevInstruction),
2104           (findInstructionUsingLabel),
2105           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2106         * src/pic/pcode.c (findLabel): added missing '\n'
2107         * src/src.dsp: added SDCCdwarf2.c to the project
2108
2109 2005-04-09 Borut Razem <borut.razem AT siol.net>
2110
2111         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2112
2113 2005-04-08 Raphael Neider <rneider AT web.de>
2114
2115         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2116           into the chain after a given one) and mergeDefmapSymbols (combine
2117           defmap entries for each symbol per pcode)
2118         * (createDefmap): have defmap entries merged in the end
2119         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2120           a symbol before replacing one access type's symbol, merge symbols in
2121           the end (replacement symbol might already have an entry)
2122         * (assignValnums): keep reference to written WREG intact
2123
2124 2005-04-08 Raphael Neider <rneider AT web.de>
2125
2126         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2127           Alpha)
2128
2129 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2130
2131         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2132         bytes
2133
2134 2005-04-07 Raphael Neider <rneider AT web.de>
2135
2136         * device/include/pic16/usart.h: added compatibility defines for
2137           devices with more than one USART
2138         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2139
2140 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2141
2142         * device/lib/Makefile.in: updated for port specific include
2143
2144 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2145
2146         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2147
2148 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2149
2150         * device/include/8051.h,
2151         * device/include/8052.h,
2152         * device/include/at89S8252.h,
2153         * device/include/at89c55.h,
2154         * device/include/at89x051.h,
2155         * device/include/at89x51.h,
2156         * device/include/at89x52.h,
2157         * device/include/mcs51reg.h,
2158         * device/include/reg51.h,
2159         * device/include/reg764.h,
2160         * device/include/regc515c.h,
2161         * device/include/sab80515.h: (re)moved these 12 files
2162         * device/include/mcs51/8051.h,
2163         * device/include/mcs51/8052.h,
2164         * device/include/mcs51/at89S8252.h,
2165         * device/include/mcs51/at89c55.h,
2166         * device/include/mcs51/at89x051.h,
2167         * device/include/mcs51/at89x51.h,
2168         * device/include/mcs51/at89x52.h,
2169         * device/include/mcs51/mcs51reg.h,
2170         * device/include/mcs51/reg51.h,
2171         * device/include/mcs51/reg764.h,
2172         * device/include/mcs51/regc515c.h,
2173         * device/include/mcs51/sab80515.h: and added them here
2174
2175 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2176
2177         * device/include/stdarg.h: changed SDCC specific keywords to double
2178           underlined form.
2179         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2180           mcs51 and ds390.
2181         * device/include/hc08/mc68hc908gp32.h,
2182         * device/include/hc08/mc68hc908jb8.h,
2183         * device/include/hc08/mc68hc908jkjl.h,
2184         * device/include/hc08/mc68hc908qy.h: fixed comments
2185         * device/include/mcs51/README: updated
2186         * device/include/mcs51/c8051f120.h: added PINRSF
2187         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2188         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2189           amidst code. Also inline is not supported.
2190
2191 2005-04-06 Raphael Neider <rneider AT web.de>
2192
2193         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2194         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2195           callers stack/frame pointers
2196
2197 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2198
2199         * device/include/pic16/usart.h: added, missing in previous commit,
2200         * device/include/pic16/adc.h: fixed typo,
2201         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2202         commit,
2203         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2204         <p18fxxx.inc>
2205         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2206         uninitialized because a bug appears with gplink
2207         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2208         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2209         complains for unrecognised option
2210
2211 2005-04-05 Raphael Neider <rneider AT web.de>
2212
2213         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2214           structs as well (using memcpy)
2215         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2216           on ISRs (GOTO has no label)
2217         * src/pic16/device.h: added OF_OPTIMIZE_DF
2218         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2219           new data flow analysis/optimization
2220         * src/pic16/pcode.c: added (prototypes for and implementation of)
2221           dataflow analysis functions, fixed pCodeInstructions' inCond and
2222           outCond values, made RCALL a branch instruction
2223         * (pic16_unlinkpCode): keep C line if possible
2224         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2225           C line moved if possible
2226         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2227         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2228           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2229         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2230           new flow)
2231         * (pic16_getJumptabpCode): NEW, needed in...
2232         * (LinkFlow): fixed handling of jumptables, calls and conditional
2233           branches
2234         * (pic16_InsertCommentAfter): NEW
2235         * (pic16_pCodeReplace): made verbose and flow preserving
2236         * (AnalyzeFlow): added call to data flow analysis
2237         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2238         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2239         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2240
2241 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2242
2243         * src/SDCCast.c (decorateType): fixed bug #1105626
2244
2245 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2246
2247         * device/include/asm/pic16/features.h,
2248         * pic18f*.h headers,
2249         * device/include/pic16/adc.h,
2250         * device/include/pic16/delay.h,
2251         * device/include/pic16/i2c.h,
2252         * device/include/pic16/malloc.h,
2253         * device/include/pic16/stdio.h,
2254         * device/include/pic16/stdlib.h,
2255         * device/include/pic16/string.h,
2256         * device/lib/pic16/libc/stdio/printf_tiny.c,
2257         * device/lib/pic16/libc/stdio/printf_small.c,
2258         * device/lib/pic16/libc/stdio/strmgpsim.c,
2259         * device/lib/pic16/libc/stdio/strmmssp.c,
2260         * device/lib/pic16/libc/stdio/strmusart.c,
2261         * device/lib/pic16/libc/stdio/vfprintf.c,
2262         * device/lib/pic16/libc/stdlib/ltoa.c,
2263         * device/lib/pic16/libc/stdlib/putchar.c,
2264         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2265         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2266         * device/lib/pic16/libc/stdlib/memchrram.c,
2267         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2268         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2269         * device/lib/pic16/libio/adc/adcbusy.c,
2270         * device/lib/pic16/libio/adc/adcread.c,
2271         * device/lib/pic16/libio/adc/adcsetch.c,
2272         * device/lib/pic16/libio/usart/ubaud.c,
2273         * device/lib/pic16/libio/usart/ubusy.c,
2274         * device/lib/pic16/libio/usart/udrdy.c,
2275         * device/lib/pic16/libio/usart/uopen.c,
2276         * device/lib/pic16/libio/usart/uputc.c,
2277         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2278         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2279         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2280         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2281         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2282         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2283         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2284         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2285         specific keywords to double underlined form,
2286         * device/lib/pic16/libc/Makefile.rules,
2287         * device/lib/pic16/libsdcc/Makefile.rules,
2288         * device/lib/pic16/libm/Makefile,
2289         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2290         to compile with C standard set in Makefile.common
2291         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2292         rand.c and crc.c in compilation process,
2293         * device/lib/pic16/libsdcc/int/divuint.c,
2294         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2295         `c' from signed to unsigned,
2296         * device/lib/pic16/startup/crt0.c,
2297         * device/lib/pic16/startup/crt0i.c,
2298         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2299         keywords to double underlined form, bug fixes in _do_cinit function
2300         which prevented the correct initialization of the .idata segment,
2301         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2302         core to enter a infinite loop
2303         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2304
2305 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2306
2307         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2308
2309 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2310
2311         * device/include/Makefile.in: add support for hc08 subdirectory
2312         * device/include/hc08/: new subdirectory
2313         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2314         Lucas Loizaga, thanks!
2315         * device/include/hc08/mc68hc908qy.h,
2316         * device/include/hc08/mc68hc908gp32.h,
2317         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2318         their own directory. Changed internal macro names to use the compiler
2319         reserved namespace. Changed SDCC specific keywords to double
2320         underlined form.
2321         * device/include/math.h,
2322         * device/include/malloc.h,
2323         * device/include/stdarg.h,
2324         * device/include/stdbool.h
2325         * device/include/string.h,
2326         * device/include/tinibios.h,
2327         * device/include/ds400rom.h,
2328         * device/include/8051.h,
2329         * device/include/8052.h,
2330         * device/include/80c51xa.h,
2331         * device/include/at89c55.h,
2332         * device/include/at89S8252.h,
2333         * device/include/at89x51.h,
2334         * device/include/at89x52.h,
2335         * device/include/ds80c390.h,
2336         * device/include/reg764.h,
2337         * device/include/regc515c.h,
2338         * device/include/sab80515.h,
2339         * device/include/mcs51/c8051f000.h,
2340         * device/include/mcs51/c8051f018.h,
2341         * device/include/mcs51/c8051f020.h,
2342         * device/include/mcs51/c8051f040.h,
2343         * device/include/mcs51/c8051f060.h,
2344         * device/include/mcs51/c8051f120.h,
2345         * device/include/mcs51/c8051f300.h,
2346         * device/include/mcs51/c8051f310.h,
2347         * device/include/mcs51/c8051f320.h,
2348         * device/include/mcs51/c8051f330.h,
2349         * device/include/mcs51/c8051f350.h,
2350         * device/include/z180.h: Changed SDCC specific keywords to double
2351         underlined form.
2352
2353 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2354
2355         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2356         18F4455,
2357         * (pic16_assignConfigWordValue): disable testing of configuration
2358         register value with config mask,
2359         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2360         function with port->fun_prefix,
2361         * (genFunction): when generating a naked interrupt function never
2362         create an absolute segment placed in interrupt vector address, place
2363         the actual interrupt function at IVA instead, when an interrupt
2364         function is generated with unspecified interrupt then do not create
2365         the absolute section,
2366         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2367         code for generating a call to generic pointer get/put function with
2368         a call to function pic16_callGenericPointer(),
2369         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2370         the call to the generic pointer get/put functions with prefixing the
2371         function name with port->fun_prefix,
2372         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2373         * src/pic16/main.c (_process_pragma): prefix function with
2374         port->fun_prefix,
2375         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2376         calling assembler, old 18Fxxxx macro is deprecated,
2377         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2378         PC_ASMDIR in while condition,
2379         * (findInstruction): add PC_ASMDIR in while condition,
2380         * (buildCallTree): prefix main with port->fun_prefix,
2381         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2382         identifier for variable with banked access in instructions BTFSS,
2383         BTFSC, BCF, BSF, BTG
2384         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2385         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2386         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2387         perform optimization when enviroment variable NO_REG_OPT is set,
2388         * (insideLRBlock): NEW, return 1 if register is inside an
2389         INF_LOCALREGS block,
2390         * (RemoveRegFromLRBlock): remove a register that is completely
2391         eliminated by register optimization, but it is still left in local
2392         register store/restore in/from stack block,
2393         * (Remove2pcodes): after removing register, check to see if it
2394         should be removed from local register store/restore in/from stack
2395         block,
2396         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2397         DUMMY_READ_VOLATILE,
2398
2399         * device/include/pic16/adc.h: minor prototype modifications and
2400         update,
2401         * device/include/pic16/malloc.h: added GPL notice various
2402         modifications,
2403         * device/include/pic16/stdint.h: NEW, standard header for ints
2404         * device/include/pic16/delay.h: NEW, header for delay functions,
2405         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2406         delay1mtcy,
2407         * device/include/pic16/signal.h: NEW, header providing helper macros
2408         for implementing signal handlers,
2409         * device/include/pic16/stdio.h: added prototypes for functions,
2410         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2411         prototypes for stdin and stdout, added macro PUTCHAR to
2412         automatically implement putchar function prototype,
2413         * device/include/pic16/usart.h: modified and updated USART library,
2414         * device/lib/pic16/libio/adc/,
2415         * device/lib/pic16/libio/i2c: some modifications to improve library
2416         performance,
2417         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2418         family of functions,
2419         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2420         family of functions and other sources,
2421         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2422         of the PIC18Fxx[28] devices,
2423         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2424         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2425         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2426         _do_cinit function, because the previous failed when local variables
2427         where not placed in the same memory bank,
2428         * device/lib/pic16/libsdcc/char/: various modifications to improve
2429         library performance,
2430         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2431         information on the new functions of the c library and more...
2432
2433 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2434
2435         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2436
2437 2005-03-26 Raphael Neider <rneider AT web.de>
2438
2439         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2440           if condition == CARRY)
2441         * (genCmp): adapted to new genSkipc semantics
2442         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2443           on rIfx (genCmp was broken)
2444
2445 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2446
2447         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2448         * src/z80/main.c (_keywords[]),
2449         * src/SDCCglobal.h (struct options),
2450         * src/SDCC.y,
2451         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2452         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2453         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2454         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2455         always available in leading double underscore form. The C99 support is
2456         mostly missing, but it's a start.
2457         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2458         reserved identifier "__data".
2459
2460 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2461
2462         * src/mcs51/peeph.def: fixed bug 1170013
2463
2464 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2465
2466         * device/include/mcs51reg.h: fixed bug 842007
2467
2468 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2469
2470         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2471         last time.
2472
2473 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2474
2475         * src/port.h (struct PORT),
2476         * src/avr/ralloc.c (avr_assignRegisters),
2477         * src/avr/main.c,
2478         * src/ds390/ralloc.c (ds390_assignRegisters),
2479         * src/ds390/main.c,
2480         * src/hc08/ralloc.c (hc08_assignRegisters),
2481         * src/hc08/main.c,
2482         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2483         * src/mcs51/main.c,
2484         * src/pic/ralloc.c (pic14_assignRegisters),
2485         * src/pic/main.c,
2486         * src/pic16/ralloc.c (pic16_assignRegisters),
2487         * src/pic16/main.c,
2488         * src/xa51/ralloc.c (xa51_assignRegisters),
2489         * src/xa51/main.c,
2490         * src/z80/ralloc.c (z80_assignRegisters),
2491         * src/z80/ralloc.h,
2492         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2493         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2494         * src/SDCCcse.h,
2495         * src/SDCCdflow.c (computeDataFlow),
2496         * src/SDCCdflow.h,
2497         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2498         * src/SDCCloop.h,
2499         * src/SDCCcflow.c (*),
2500         * src/SDCCcflow.h,
2501         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2502         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2503         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2504         immedDom() returning wrong block; probably fixes bug #1160833)
2505
2506 2005-03-20 Borut Razem <borut.razem AT siol.net>
2507
2508         * support/scripts/inc2h.pl: WIN32 port
2509
2510 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2511
2512         * device/lib/makefile.in: added abs.c and labs.c
2513
2514 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2515
2516         * device/include/stdint.h: added
2517         * device/lib/abs.c: added
2518         * device/lib/labs.c: added
2519         * device/include/stdlib.h: added abs() and labs() prototypes
2520         * device/lib/libsdcc.lib: added abs and labs
2521         * device/include/float.h,
2522         * device/lib/_fsmul.c,
2523         * device/lib/printf_fast.c,
2524         * device/lib/printf_tiny.c: updated comments
2525
2526 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2527
2528         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2529         bug #1164313
2530
2531 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2532
2533         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2534         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2535
2536 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2537
2538         * device/lib/printf_large.c: removed inline assembly for portability and
2539           readability. Use printf_fast if speed or size are more important.
2540         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2541         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2542
2543 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2544
2545         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2546         prevent compiler warning
2547
2548 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2549
2550         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2551         moved to level 0 and declared as static. Also they are explicit
2552         placed in access bank. This was necessery because some times they
2553         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2554         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2555         optimizations. Currently only compare to unsigned char is implemented,
2556         * src/pic16/gen.c: added fReturnIdx array,
2557         * (struct resolvedIfx) is moved to gen.h and made public,
2558         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2559         * (aopForSym): added an optimization to directly store in stack of
2560         the operand of a SEND iCode,
2561         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2562         but as registers instead (AOP_REG) using the fReturnIdx array,
2563         * (pic16_freeAsmop): remove the freed register from the
2564         _G.sregsAlloc field,
2565         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2566         a compare of 'WREG',
2567         * (pic16_popGetTempRegCond): changed function prototype, now
2568         function takes also a bitVector argument v which holds the current
2569         set of registers that are allocated for stack access by aopForSym,
2570         registers allocated in aopForSym for accessing stack symbols are not
2571         any more part of the functions usedRegs field,
2572         * (genCall): some times aopOp is called for a stack variable to be
2573         send, aopForSym might perform the push, if this is true make sure
2574         that genCall doesn't push the variable twice by testing _G.resDirect,
2575         * (genFunction): changed testing for unspecified interrupt number
2576         from 256 to INTNO_UNSPEC,
2577         * modified selection scheme of frame pointer generation. Previously
2578         if function did use local registers a frame pointer was generated,
2579         now a frame pointer is generated only if function has arguments
2580         (that need PLUSW2 register access), or has stack arguments, or the
2581         compiler is not instructed to omit the frame pointer,
2582         * (genEndFunction): before restoring local registers that were saved
2583         in the function preamble, also restore the registers that *might*
2584         have been allocated for stack access,
2585         * (genRet): removed some old comments,
2586         * (genCmp, the active (RN's) version): added a call to the
2587         pic16_genCmp_special function to perform the compare with a more
2588         robust and optimized way,
2589         * (genInline): a feature has been added in inline code generation,
2590         which allows a wildcard variable substitution when writing inline
2591         assembly. Code is incomplete and experimental therefore undocumented,
2592         * (genCast): changed order of aopOp for result and right to allow
2593         aopForSym to directly load the result if possible,
2594         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2595         perform an optimized compare on some selected special occasions,
2596         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2597         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2598         generate an IVT any more,
2599         * src/pic16/main.c (pic16_optionsTable): added command line option
2600         --optimize-cmp,
2601         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2602         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2603         macros,
2604         * src/pic16/NOTES: Raphael Neider added in list of active developers
2605         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2606         jumptable_end to prevent bug #,
2607         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2608         inCond and outCond fields,
2609         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2610         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2611         turn off register spilling,
2612         * (packRegsForOneUse): synced with other ports' versions although it
2613         is not used currently,
2614         * (pic16_packRegisters): added an optimization while reading
2615         structure bitfields, some registers may be saved (malloc code is
2616         decreased by 80 bytes)
2617
2618 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2619
2620         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2621         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2622         this can be optimized more?
2623
2624 2005-03-10 Raphael Neider <rneider AT web.de>
2625
2626         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2627           genNearPointerGet): (hopefully) fixed access to bitfields via
2628           pointers (p->bitN = x; and x = p->bitN; failed)
2629
2630 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2631
2632         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2633
2634 2005-03-09 Raphael Neider <rneider AT web.de>
2635
2636         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2637
2638 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2639
2640         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2641         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2642           (regTypeNum): set REG_BIT type if necessary
2643         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2644         * support/regression/tests/critical.c: check bug 1144613
2645
2646 2005-03-02 Raphael Neider <rneider AT web.de>
2647
2648         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2649
2650 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2651
2652         * src/avr/ralloc.c (serialRegAssign),
2653         * src/ds390/ralloc.c (serialRegAssign),
2654         * src/hc08/ralloc.c (serialRegAssign),
2655         * src/mcs51/ralloc.c (serialRegAssign),
2656         * src/pic/ralloc.c (serialRegAssign),
2657         * src/pic16/ralloc.c (serialRegAssign),
2658         * src/xa51/ralloc.c (serialRegAssign),
2659         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2660
2661 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2662
2663         * src/SDCCast.c (decorateType): fixed bug 1124787
2664
2665 2005-02-20 Hubert Sack <sack AT digiplan.de>
2666         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2667
2668         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2669         patch #1121755
2670
2671 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2672
2673         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2674         to keep the correct label reference count when adding/removing references
2675         to labels. A peephole file using this is appended to patch #1144962.
2676
2677 2005-02-14 Raphael Neider <rneider AT web.de>
2678
2679         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2680         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2681         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2682           retrievals of result operand's value on assignment
2683
2684 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2685
2686         * device/include/pic16/string.h: modified prototype for memccpy()
2687         to memccpy(void *, void *, char, size_t)
2688         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2689         check whether to omit frame pointer or not,
2690         * (genInline): convert all occurences of "\n" to LF in inline
2691         assembler blocks, this helps formatting the inline text,
2692         * (pic16_loadFSR0): modified prototype,
2693         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2694         removed some 8051 legacy code,
2695         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2696         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2697         before allocating temporary registers in functions,
2698
2699 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2700
2701         * support/regression/tests/bitvars.c: corrected the "fix"
2702
2703 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2704
2705         * support/regression/tests/bitvars.c,
2706         * support/regression/tests/bitwise.c,
2707         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2708
2709 2005-02-10 Raphael Neider <rneider AT web.de>
2710
2711         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2712           different size for Alpha
2713         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2714
2715 2005-02-09 Raphael Neider <rneider AT web.de>
2716
2717         * src/SDCC.lex(doPragma) : save and restore warning options as well
2718           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2719         * have #pragma less_pedantic set the errorlevel to WARNING
2720           (fixes #1117001)
2721         * (cloneOptimize) : fixed wrong malloc's size
2722         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2723           facilitate correct handling of #pragma (save|restore)
2724
2725 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2726
2727         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2728
2729 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2730
2731         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2732
2733 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2734
2735         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2736
2737 2005-02-02 Raphael Neider <rneider AT web.de>
2738
2739         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2740         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2741         * (pic16_storeForReturn): fixed to allow returning function pointers
2742         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2743         * device/include/pic16/{stddef.h,stdbool.h}: added
2744
2745 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2746
2747         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2748
2749 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2750
2751         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2752         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2753          appeared to be required
2754
2755 2005-01-31 Borut Razem <borut.razem AT siol.net>
2756
2757         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2758           include/mcs51 and include/z80 directories to the package
2759
2760 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2761
2762         * src/hc08/gen.c (genFunction): fixed bug #1112752
2763
2764 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2765
2766         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2767
2768 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2769
2770         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2771
2772 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2773
2774         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2775
2776 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2777
2778         * device/include/c8051fxxx.h: removed these 6 files
2779         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2780
2781 2005-01-26 Raphael Neider <rneider AT web.de>
2782
2783         * src/pic16/gen.c (genAssign): fixed assignment from longs
2784           in codespace (were cut to three bytes)
2785         * (genDummyRead): implemented (except for CODESPACE...),
2786           fixed bug #1108575
2787         * src/pic16/glue.c (emitStatistics): beautified
2788         * device/lib/pic16/libm/Makefile: added include path
2789
2790 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2791
2792         * src/z80/gen.c (aopPut): fixed bug #1103902
2793
2794 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2795
2796         * device/lib/expf.c: fixed bug #1095792
2797
2798 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2799
2800         * device/lib/pic16/libm: added Math library sources
2801
2802 2005-01-24 Raphael Neider <rneider AT web.de>
2803
2804         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2805           to enable upcast to pCodeOpReg2 (there is no type tag to
2806           differenciate the two and pic16_popGet2p cast into PCOR2)
2807         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2808           (sizeof(sectNames) changed to sizeof(sectName))
2809           Both patches fix segfaults under MinGW.
2810
2811 2005-01-23 Raphael Neider <rneider AT web.de>
2812
2813         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2814           Safe_[mc]?alloc()'ed variables
2815         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2816           of (byte sized) temporaries (assign them to WREG for now)
2817         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2818           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2819           this might fix SIGSEGVs on MinGW...
2820         * src/SDCCopt.c (killDeadCode): restored original behaviour
2821           (volatile operands might get thrown away though)
2822
2823 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2824
2825         * src/pic16/gen.c: fixed bug #1106975,
2826         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2827         pointer update, INTCON is saved, global interrupts are disabled and
2828         restored after updateing TOS.
2829         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2830         * added function attribute 'shadowregs' to take advantage of shadow
2831         registers,
2832         * added function attribute 'wparam' as an alternative to the wparam
2833         pragma,
2834         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2835         user declares a non-ISR function as 'shadowregs',
2836         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2837
2838 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2839
2840         * .version: bumped version number to 2.4.8
2841         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2842         pic16 port,
2843         * device/lib/pic16/libio/i2c/: I2C module support library,
2844         * device/include/pic16/i2c.h: I2C support library header,
2845         * device/lib/pic16/libc/stdio/: standard IO support sources,
2846         * (printf_small.c): printf_small() source, supports float print,
2847         * (printf_tiny.c): printf_tiny() source, does not support floats,
2848         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2849         enable global optimizations for entire library source, other
2850         Makefiles in the source tree are also modified to reflect this,
2851         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2852         function,
2853         * doc/sdccman.lyx: updated to reflect new changes,
2854         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2855         sym->onStack if-case,
2856         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2857         sbit, idata, _idata, xdata, _xdata,
2858         * added pragma library, to link an external library, (see doc),
2859         * removed command line options, --pomit-config-words, --pomit-ivt,
2860         --pleave-reset-vector,
2861         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2862         when calling assembler to reflect memory model used, also define
2863         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2864         reflect stack model used,
2865         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2866         on stack return NULL,
2867
2868 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2869
2870         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2871           of the operands is volatile. Fixes #1020220
2872
2873 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2874
2875         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2876         * (OptimizeRegUsage): make sure that there is really no other flow where
2877           the first pCode is used
2878
2879 2005-01-22 Raphael Neider <rneider AT web.de>
2880
2881         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2882           to fix #1106967 (pCode->seq are not set up correctly)
2883
2884 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2885
2886         * src/SDCCglue.c (glue): make sure code area is declared before the
2887         static initialization area.
2888
2889 2005-01-21 Raphael Neider <rneider AT web.de>
2890
2891         * device/lib/Makefile.in: fixed test for pic16 install dir
2892         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2893           optimizations
2894         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2895           added --optimize-goto compiler switch and pragma wparam documentation
2896         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2897         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2898           and PRODH closing bug #1071770 (peephole optimizer)
2899
2900 2005-01-19 Raphael Neider <rneider AT web.de>
2901
2902         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2903           cmdLine buffers (used when calling sdcpp...) are large enough
2904           (MAX_PATH=256 truncates arguments leading to system halts when
2905           used in MinGW...)
2906         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2907         * (genUminus): rewritten to for efficiency
2908         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2909           used uninitialized in some cases)
2910         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2911           copy the third byte from the int -- now assumes 0x80 (data memory)
2912         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2913           operands (genAddLit expects the iCode's operands to swapped as
2914           well), fixed leftover bytes (crashed for short left operands)
2915         * (pic16_genMinusDec): performance improvements, removed false
2916           PIC14 emitSKPNCs
2917         * (pic16_genMinus): fixed to cope with differently sized operands
2918         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2919           for --obanksel > 1
2920         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2921         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2922           new banksel optimization
2923         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2924           analysis for temporary registers (segfaults...)
2925         * src/pic16/peeph.def: added rule
2926
2927 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2928
2929         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2930         which converts a float number to its ASCII representation
2931         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2932         functions to convert the fractional and integer part of a float to ASCII,
2933         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2934         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2935         ram
2936         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2937         _STATMEM macros,
2938         * device/include/pic16/adc.h: added GPL info,
2939         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2940         a pCodeOp as tested operand,
2941         * (genNearPointerGet): optimized bit testing, does not use
2942         intermediate register for bit value, test directly instead with
2943         BTFSS, BTFSC, works only for single bits,
2944         * (genpic16Code): dump the name of the iCode in the asm,
2945         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2946         renamed to pic16_decodeOp,
2947         * (serialRegAssign): do not allocate a temporary register for iCode
2948         sequences that test a single bit for 1/0
2949
2950 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2951
2952         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2953         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2954         access stack and frame pointers. They are initially assigned to
2955         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2956         accessing SFRs. Updated all occurences of modification of stack or
2957         frame pointer in gen.c and pcode.c,
2958         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2959         assigning of a literal value to pointers,
2960         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2961         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2962         selected
2963
2964 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2965
2966         * doc/sdccman.lyx: update documentation about stack pragma, added
2967         some info for stack memory models
2968
2969 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2970
2971         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2972
2973 2005-01-08 Raphael Neider <rneider AT web.de>
2974
2975         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2976           udata sections to fix bug #1097823
2977
2978 2005-01-05 Raphael Neider <rneider AT web.de>
2979
2980         * src/pic16/gen.c (genGenericShift): added handling of differently
2981           sized left operand and result
2982
2983 2005-01-04 Raphael Neider <rneider AT web.de>
2984
2985         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2986         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2987           to hold the condition bit)
2988         * added new version of genCmp (old code available via #define)
2989         * added new version of genShiftLeft/genShiftRight in a generic
2990           way, now supports shifting by negative values
2991         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2992           shiftCount (expected by genGenericShift)
2993         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2994         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2995           dump
2996         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2997           is an invalid literal too...)
2998
2999 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3000
3001         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3002         from Raphael Neider,
3003         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3004         for 8-bit literals. This fixes some literal operands which are sign
3005         extended to 16-bits ints when instruction needs only 8-bits.
3006
3007 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3008
3009         * device/lib/logf.c: added mcs51 assembly version
3010         * device/lib/expf.c: added mcs51 assembly version
3011         * device/lib/_logexpf.c: new shared asm code for expf and logf
3012         * device/include/math.h: add defines for assembly math library
3013         * device/lib/Makefile.in: build new _logexpf.c
3014         * device/lib/libfloat.lib: use new _logexpf.c
3015
3016 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3017
3018         * src/pic/device.c
3019         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3020           device types which have less than 0x7f registers.
3021
3022 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3023
3024         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3025
3026 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3027
3028         * device/lib/printf_fast.c: only build on supported arch.
3029         * device/lib/printf_tiny.c: only build on supported arch.
3030         * device/lib/printf_fast_f.c: only build if asm float lib
3031         * device/lib/_fsget1arg.c: only build if asm float lib
3032         * device/lib/_fsget2args.c: only build if asm float lib
3033         * device/lib/_fsnormalize.c: only build if asm float lib
3034         * device/lib/_fsreturnval.c: only build if asm float lib
3035         * device/lib/_fsrshift.c: only build if asm float lib
3036         * device/lib/_fsswapargs.c: only build if asm float lib
3037         * device/include/stdio.h: don't provide print_fast,
3038           print_fast_f, print_tiny prototypes if --xstack used
3039
3040 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3041
3042         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3043         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3044           to the SOURCES
3045
3046 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3047
3048         * device/lib/printf_fast_f.c: same as printf_fast, but
3049           with floating point enabled
3050         * device/lib/printf_fast.c: minor tweaks
3051         * device/include/stdio.h: add printf_fast_f
3052
3053 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3054
3055         * src/SDCCmain.c: make --float-reent default for mcs51
3056         * device/lib/_fsadd.c: added mcs51 assembly version
3057         * device/lib/_fssub.c: added mcs51 assembly version
3058         * device/lib/_fsmul.c: added mcs51 assembly version
3059         * device/lib/_fsdiv.c: added mcs51 assembly version
3060         * device/lib/_fseq.c: added mcs51 assembly version
3061         * device/lib/_fsneq.c: added mcs51 assembly version
3062         * device/lib/_fsgt.c: added mcs51 assembly version
3063         * device/lib/_fslt.c: added mcs51 assembly version
3064         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3065         * device/lib/Makefile.in: add _fscmp to build
3066         * device/lib/libfloat.lib: add _fscmp to build
3067
3068 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3069
3070         * device/lib/_fs2slong.c: added mcs51 assembly version
3071         * device/lib/_fs2sint.c: added mcs51 assembly version
3072         * device/lib/_fs2schar.c: added mcs51 assembly version
3073         * device/lib/_fs2ulong.c: added mcs51 assembly version
3074         * device/lib/_fs2uint.c: added mcs51 assembly version
3075         * device/lib/_fs2uchar.c: added mcs51 assembly version
3076         * device/lib/_slong2fs.c: added mcs51 assembly version
3077         * device/lib/_sint2fs.c: added mcs51 assembly version
3078         * device/lib/_schar2fs.c: added mcs51 assembly version
3079         * device/lib/_ulong2fs.c: added mcs51 assembly version
3080         * device/lib/_uint2fs.c: added mcs51 assembly version
3081         * device/lib/_uchar2fs.c: added mcs51 assembly version
3082         * device/include/float.h: added #define to select asm vs c
3083
3084 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3085
3086         * device/lib/printf_fast.c: improvements to float output
3087         * device/include/float.h: add defines for assembly float library
3088         * device/lib/_fsget1arg.c: receive 1 float arg
3089         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3090         * device/lib/_fsnormalize.c: normalize a float
3091         * device/lib/_fsreturnval.c: return float, various helper routines
3092         * device/lib/_fsrshift.c: right shift a float's mantissa
3093         * device/lib/_fsswapargs.c: swap 2 floats
3094         * device/lib/Makefile.in: build these 6 new files for mcs51
3095         * device/lib/libfloat.lib: add these 6 files to the library
3096
3097 2004-12-26 Borut Razem <borut.razem AT siol.net>
3098
3099         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3100           built by gcc 3.4.2
3101
3102 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3103
3104         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3105           and fully reentrant and register bank neutral.
3106         * device/lib/printf_fast.c: added float (not enabled by default),
3107           added compact/slower integer (also not enabled by default),
3108           improved size/speed of fast integer code, other minor changes
3109         * device/include/stdio.h, device/lib/Makefile.in,
3110           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3111
3112 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3113
3114         * src/pic16/pcode.c: declaring variables other than at the start of a
3115           block is not supported in C by VC6.
3116
3117 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3118
3119         * applied a previous patch from Raphael Neider that wasn't included
3120         in the previous commits, which fixes infinite loops within jumptable
3121         improvements,
3122         * made some fixes that previous patches introduced
3123
3124 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3125
3126         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3127         that fixes an issue with AOP_PCODE asmop's offset,
3128         * (pic16_popCopyReg): update instance field too,
3129         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3130         function of pic port,
3131         * (genCmp, genAnd, genAssign),
3132         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3133
3134 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3135
3136         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3137         variables initial values to idata section,
3138         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3139         variables in some functions. This utilizes parmBytes field of iCode
3140         structure to hold the offset of the variable in stack. (might be
3141         able to use the stack field too?)
3142         * applied patch from Raphael Neider # ### , # ###
3143         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3144         variable initial values in idata section,
3145         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3146         for static variables with initial value
3147         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3148         applied fix in while loop from Raphael Neider.
3149
3150 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3151
3152         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3153         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3154         * src/ds390/ralloc.c (serialRegAssign): spill bits
3155         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3156         * support/Util/SDCCerr.c,
3157         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3158         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3159         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3160
3161 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3162
3163         * device/include/sdcc-lib.h: inserted LGPL, added includes
3164           asm/ds390/features.h and asm/mcs51/features.h
3165         * device/include/asm/default/features.h,
3166         * device/include/asm/gbz80/features.h,
3167         * device/include/asm/z80/features.h: added empty _AUTOMEM
3168           and _STATMEM
3169         * device/include/asm/ds390/features.h,
3170         * device/include/asm/mcs51/features.h: added files with defines for
3171           _AUTOMEM and _STATMEM indicating automatic and static storage class
3172         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3173         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3174         * src/SDCCicode.c (geniCodeCast),
3175         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3176         * src/SDCCloop.c (loopInduction): removed unused variable lr
3177         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3178           to convertToFcall to include char modulo (RFE 1065037), added check
3179           if left operand is unsigned and use abs of literal value
3180         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3181           as it doesn't work after conversion from peephole.def to peephole.rul
3182         * src/mcs51/gen.c (toBoolean): added check for size,
3183           (genModOneByte): optimized code for signed char modulo a literal
3184           power of 2 (thanks to Hubert Sack),
3185           (genRRC): removed unnecessary "clr c",
3186           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3187         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3188           jump optimization,
3189           swapped rules 256.c and 256.d,
3190           extended 256.d by using new multiple checks (thanks Erik),
3191           added rules 256.e and 256.f,
3192           updated rule 261.a and 261.b to new generated code
3193         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3194
3195 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3196
3197         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3198           induction related bugs, including first part of bug #1074377
3199
3200 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3201
3202         * applied patch from bug-report #1076292,
3203         * applied patches for genAnd and Goto-optimizations for Raphael
3204         Neider,
3205         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3206         dump a less iCode information,
3207         * src/pic16/device.h (pic16_options_t): added field debgen,
3208         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3209         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3210         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3211         puclic,
3212         * (various functions): added macros FENTRY and FENTRY2 to functions,
3213         to emit function prologue,
3214         * (various functions): fixed indentation,
3215         * (genNearPointerGet): fixed loading of FSR0,
3216         * (genPackBits): applied patch from Raphael Neider to fix updating
3217         of FSR0 and touching only the modified bits,
3218         * src/pic16/genarith.c (various functions): added macros FENTRY to
3219         emit function prologue in comments,
3220         * src/pic16/pcode.h: added functions debugf2, debugf3,
3221         * src/pic16/ralloc.c: partial fix for packForPush caused
3222         segmentation fault,
3223
3224 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3225
3226         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3227           <stsp AT users.sourceforge.net> with reversed byte order
3228         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3229
3230 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3231
3232         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3233           bug #1074377
3234         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3235         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3236
3237 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3238
3239         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3240
3241 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3242
3243         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3244           conditions,
3245           (setFromConditionArgs): friendly operand parser for peephole rules,
3246           (operandBaseName, operandsNotRelated): new peephole condition
3247           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3248           architecture specific register naming into account, handles n-way
3249           comparisons, and supports quoted literals
3250         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3251
3252 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3253
3254         * src/mcs51/peeph.def: fixed bug #1076940
3255
3256 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3257
3258         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3259
3260 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3261
3262         Adding support for replacing ljmps with sjmps in jumptables
3263         generated for switch statements. For now you need to set the
3264         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3265         Now 4 algorithms for mcs51 jumptable generation are used:
3266         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3267         addresses loaded pc-relative for up to 112 cases and stack-pushing
3268         target addresses loaded with offset from dptr for up to 256 cases.
3269
3270         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3271         * src/mcs51/main.c: adapted constants for switch table generation
3272         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3273
3274 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3275
3276         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3277         * support/regression/tests/bug1057979.c: added test for bug 1073386
3278
3279 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3280
3281         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3282         compilers
3283
3284 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3285
3286         * src/pic16/device.h,
3287         * src/pic16/genarith.c,
3288         * src/pic16/glue.c,
3289         * src/pic16/main.c,
3290         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3291
3292 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3293
3294         Large cummulative patch for pic16 port.
3295         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3296         to call when a stack overflow occurs,
3297         * (malloc.h): added CVS Id tag,
3298         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3299         variable,
3300         * added libc directory. The current version of LibC contains string
3301         functions, ctype functions and macros and some functions of the
3302         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3303         be extensively tested in the future. Standard disclaimer here.
3304         Library is not automatically build yet. But one can build it by
3305         invoking 'make' inside the libc directory.
3306         * added ADC library under libio. Preliminary version yet.
3307
3308         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3309         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3310         aopForRemat() now and not by pic16_aopOp(),
3311         * (pic16_popGetTempReg): removed warning messgae when allocating
3312         temporary registers, its a buggy feature and will be removed,
3313         * (pic16_popGet): set register instance field in AOP_CRY,
3314         * (pic16_outBitC): fixed for results in size greater than 1,
3315         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3316         * (pic16_storeForReturn): optimized return of 0,
3317         * (genCmp): experimental code for new genCmp which uses PIC18's
3318         special compare&skip instructions. Initial tests fail some times
3319         with variables grater than 1 byte in size, so new code is disabled,
3320         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3321         a single bit,
3322         * (genCast): began a fix to optimize the casting of a bit to another
3323         bit, now assigning a bitfield to another bitfield will fail, sorry,
3324         * src/pic16/main.c: disabled the use of lr-support feature,
3325         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3326         * added some function prototypes, added function _debugf prototype,
3327         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3328         bits with offset (case PO_GPR_BIT),
3329         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3330         command line,
3331         * (isBankInstruction): modified to return 0 for no banking instruction,
3332         and 1 for banking instruction,
3333         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3334         caused stop processing pCodes after a inline assembly block,
3335         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3336         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3337         registers when it shouldn't,
3338         * src/pic16/ralloc.c (allocReg): add preliminary support for
3339         supporting a limited set of temporary registers,
3340
3341 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3342
3343         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3344           genDataPointerSet): ensure assignments always copy in MSB to LSB
3345           order,
3346           (loadRegFromAop): recognize CLRH optimization,
3347           (genFunction): optimize RECEIVE iCodes in reentrant functions
3348
3349 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3350
3351         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3352           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3353           selected.
3354         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3355         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3356           contiguous with data
3357
3358 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3359
3360         * device/lib/_gptrget.c (_gptrget),
3361         * device/lib/_gptrgetc.c (_gptrgetc),
3362         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3363           instead of sjmp to ret
3364         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3365           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3366
3367 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3368
3369         * .version: bumped version to 2.4.7
3370         * device/lib/_gptrget.c (_gptrget): is now _naked
3371         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3372         * device/lib/_gptrput.c (_gptrput): is now _naked
3373         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3374           (createFunction): fixed xstack
3375         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3376         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3377           or bit either,
3378           (geniCodeCritical): store original interrupt state in an iTemp bit
3379           var unless stack-auto
3380         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3381         * src/SDCCmain.c (setIncludePath): added include/target to search path
3382         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3383         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3384           prototype,
3385           (processFuncArgs): put bit vars in bit area
3386         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3387           unsaveRBank): fixed xstack,
3388           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3389           (genFunction, genEndFunction): fixed xstack,
3390           (genAssign): optimization don't walk backwards through mem
3391         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3392         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3393         * support/regression/Makefile: also make library (for stack-auto) when
3394           making "all" and added "test-mcs51-xstack-auto"
3395         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3396         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3397         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3398         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3399         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3400           make-library by MAKE_LIBRARY
3401         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3402           regression tests for xstack
3403         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3404         * support/regression/tests/critical.c: test for critical on mcs51
3405
3406 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3407
3408         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3409           built version of sdcc instead of installed version
3410
3411 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3412
3413         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3414         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3415           vprintf.c now
3416         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3417         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3418           WARNING: remove device/lib/build/z80/printf.o by hand when
3419           updating from previous build!
3420         * device/lib/z80/printf.c: updated comment
3421         * support/regression/tests/bug1057979.c: test all ports now
3422         * support/regression/tests/bug1065458.c: file added
3423
3424 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3425
3426         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3427           *_start and *_end symbols for static functions
3428
3429 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3430
3431         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3432           and search crt0.o in all library paths,
3433           (setIncludePath): proper handling of --nostdinc,
3434           (setLibPath): proper handling of --nostdlib
3435         * support/regression/Makefile,
3436         * support/regression/ports/ds390/spec.mk,
3437         * support/regression/ports/gbz80/spec.mk,
3438         * support/regression/ports/hc08/spec.mk,
3439         * support/regression/ports/mcs51/spec.mk,
3440         * support/regression/ports/mcs51-large/spec.mk,
3441         * support/regression/ports/mcs51-stack-auto/spec.mk,
3442         * support/regression/ports/z80/spec.mk: use include and lib files from
3443           built version of sdcc instead of installed version
3444         * doc/sdccman.lyx: fixed typo in --nostdinc
3445
3446 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3447
3448         * src/pic/pcode.c,
3449         * src/pic/device.c,
3450         * src/pic/ralloc.c,
3451         * src/pic/gen.c : added support to generate code for struct bit fields.
3452
3453 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3454
3455         * as/xa51/xa_version.h,
3456         * device/include/errno.h,
3457         * device/include/regc515c.h,
3458         * device/lib/_itoa.c,
3459         * device/lib/_ltoa.c,
3460         * device/lib/ser_ir_cts_rts.c,
3461         * sim/ucsim/xa.src/glob.cc,
3462         * sim/ucsim/xa.src/inst_gen.cc,
3463         * sim/ucsim/xa.src/xa_bit.cc,
3464         * sim/ucsim/xa.src/xa_sfr.cc,
3465         * sim/ucsim/z80.src/inst_dd.cc,
3466         * sim/ucsim/z80.src/inst_fdcb.cc,
3467         * support/scripts/keil2sdcc.pl,
3468         * src/pic16/pic16.dsp,
3469         * src/pic16/pic16a.dsp: corrected cvs line endings
3470         * device/lib/printf_large.c: fixed bug 1057979
3471         * src/pic16/gen.c: fixed non-C standard code
3472         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3473         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3474         * support/regression/ports/mcs51/support.c: reload T1 asap
3475         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3476           pdata use and clear idata startup behaviour
3477         * support/regression/tests/bug1057979.c: added
3478
3479 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3480
3481         * device/examples/ds390/ow390/ad26.h,
3482         * device/examples/ds390/ow390/cnt1d.h,
3483         * device/examples/ds390/ow390/crcutil.c,
3484         * device/examples/ds390/ow390/ownet.h,
3485         * device/examples/ds390/ow390/owsesu.c,
3486         * device/examples/ds390/ow390/swt12.h,
3487         * device/examples/ds390/ow390/swtoper.c,
3488         * device/examples/ds390/ow390/temp10.h,
3489         * device/examples/ds390/ow390/thermodl.c,
3490         * device/examples/ds390/tinitalk/tinitalk.dsp,
3491         * device/examples/ds390/tinitalk/tinitalk.dsw,
3492         * device/examples/mcs51/clock/hw.h,
3493         * device/examples/mcs51/simple2/go.bat,
3494         * device/examples/serialcomm/windows/serial.h,
3495         * device/examples/xa51/dummy.c,
3496         * device/examples/xa51/hello.c,
3497         * device/include/80c51xa.h,
3498         * device/include/at89x051.h: corrected cvs line endings
3499
3500 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3501
3502         * src/pic16/main.c (options): added command line --gstack, to trace
3503         stack over/under flows,
3504         * added pragma 'wparam' to allow passing first byte of function
3505         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3506         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3507         call to __gstack_test function and sets up the symbol as extern,
3508         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3509         * popaop): added call to pic16_testStackOverflow,
3510         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3511         wparamList list,
3512         * (genCall, genPcall): now all parameters are passed via stack
3513         except in functions that are pass to wparam pragma in which WREG is
3514         used too,
3515         * (genPcall): REENTRANT flag is checked to see if variable prototype
3516         contains reentrant keyword, don't call a non-reentrant function, via
3517         a reentrant function pointer or vice versa, functions are never
3518         passed via WREG,
3519         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3520         D.Winkler,
3521         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3522         SIGSEGV when accessing a NULL register stucture,
3523         * (pic16_printGPointerType): modified to handle UPPER modifier for
3524         function initializers, changed prototype of function to simpler one,
3525         * (pic16_printIvalFuncPtr): check to see if function is already
3526         added in externs list,
3527         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3528         optimized a move from W to SFR with a move to the same register
3529         later after a CALL,
3530         * device/lib/pic16/debug: NEW directory, contains debug features
3531         which are enabled when linking with libdebug.lib, currently command
3532         line option --gstack enables stack pointer tracing for over/under
3533         flow, corresponding sources are in debug/gstack
3534
3535 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3536
3537         * doc/sdccman.lyx: updated SDCC version,
3538         * (PIC16 port): update list of command line options,
3539         * src/pic16/device.h (structure pic16_options_t): added field gstack
3540         to enable stack overflow tracing on push/pops,
3541         * src/pic16/device.c (statistics structure): added statistics
3542         structure,
3543         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3544         pic16_dump_int_registers): increase statistics counters for each
3545         * variable which is encountered
3546         * (pic16_dump_usection): emit each .udata variable to its own udata
3547         section,
3548         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3549         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3550         parameters via stack, otherwise use old scheme,
3551         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3552         assembler output file,
3553         * src/pic16/main.c: added command line options --gstack to enable
3554         push/pop tracing for stack overflow,
3555         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3556         instructions): added size of each instruction,
3557         * (pic16_countInstruction): estimate size of instructions in
3558         the_pFile list, inline assembly blocks are not counted,
3559         * (pic16_FixRegisterBanking): trace previous register usage, when
3560         banksel optimizations is greater than 0, don't emit a redudant
3561         banksel directive,
3562
3563 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3564
3565         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3566         * src/pic16/ralloc.c : applied same fix for pic16.
3567         * src/pic/gen.c : tidied it up a little.
3568
3569 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3570
3571         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3572         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3573
3574 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3575
3576         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3577
3578 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3579
3580         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3581         non-reentrant function __modsint in the interrupt function (thus
3582         corrupting math operations during serial I/O)
3583         * device/lib/ser_ir.c: as above, changed buffersize
3584         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3585         256.c,d for zeroing
3586         * doc/Makefile: added option -t for rsync
3587
3588 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3589
3590         * src/SDCCast.h (struct ast),
3591         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3592
3593 2004-10-20 Borut Razem <borut.razem AT siol.net>
3594
3595         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3596         package
3597
3598 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3599
3600         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3601         makefile targets,
3602         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3603         support functions to replace long sequences of MOVFF's from access
3604         bank registers to stack and vice versa,
3605         * src/pic16/device.h: added new field opt_flags, where optimization
3606         flags can be set to enable certain features,
3607         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3608         * pBlock, (genFunction, genEndFunction): surroung loop for
3609         saving/loading used registers in stack with PC_INFO pCodes,
3610         INF_LREGS. Code in between can then be optimized by pCode optimizer
3611         to support function calls,
3612         * (genDataPointerSet): fixed bug which loaded float fields in
3613         structures with corrupt data,
3614         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3615         in a standard way debug info on stderr. Feature used for developing
3616         and debugging only,
3617         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3618         obsolete chunks of code,
3619         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3620         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3621         * pic16/src/pcode.c (pic16_newpCodeInfo,
3622         * (pic16_newpCodeOpLocalRegs),
3623         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3624         feature,
3625         * (pic16_pCodeConstString): printing of the initial value of a
3626         symbol as a comment is inhibited since parsing was already done by
3627         copyStr and output is corrupt,
3628         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3629
3630 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3631
3632         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3633
3634 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3635
3636         * as/mcs51/lkarea.c: removed old K&R style,
3637           (lnksect): changed check on boundary error,
3638           (lnksect2): changed check on boundary error,
3639           (lnksect2): extend XSTK to end of page if size = 1
3640         * as/mcs51/lkmain.c: removed old K&R style,
3641           (Areas51): create l_IRAM symbol
3642         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3643         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3644           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3645         * device/lib/_mullong.c: added version to be compiled with xstack
3646         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3647         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3648         * device/lib/mcs51/crtxstack.asm: fixed comment
3649         * src/SDCCglue.c: maxInterrupts defaults to 0,
3650           (emitMaps): added pdata,
3651           (createInterruptVect): (re)moved default,
3652           (glue): added pdata,
3653           (glue): moved __start__xstack to XSTK with default size 1
3654         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3655           and options.float_rent when options.stackAuto is set,
3656           (linkEdit): only write XDATA_NAME if provided on command line
3657         * src/SDCCmem.h,
3658         * src/SDCCmem.c: added pdata
3659         * src/port.h: added pdata_name to PORT
3660         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3661           (saveRegisters, unsaveRegisters): removed usage of B,
3662           (genMinus): fixed accumulator clash,
3663           (genJumpTab): added comment, this needs another look
3664         * src/mcs51/gen.c: added check for "B in use" paranoia,
3665           added pushB() and popB()
3666         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3667           chance
3668         * src/avr/main.c,
3669         * src/ds390/main.c,
3670         * src/hc08/main.c,
3671         * src/mcs51/main.c,
3672         * src/pic/main.c,
3673         * src/pic16/main.c,
3674         * src/xa51/main.c,
3675         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3676           added PSEG (PAG,XDATA) or NULL to port specifier
3677         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3678         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3679           (_mcs51_genInitStartup): removed __start__xstack equ,
3680           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3681         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3682         * src/z80/gen.c (_rleAppend): fixed warnings
3683         * support/regression/tests/zeropad.c: added pdata test
3684         * .version: bumped to 2.4.6
3685
3686 2004-10-17 Borut Razem <borut.razem AT siol.net>
3687
3688         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3689         as a part of nightly build
3690
3691 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3692
3693         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3694         WREG holds the first byte function parameters,
3695         * (aopForSym): take special case for symbols which are in FARSPACE
3696         but in CODESPACE too,
3697         * (assignResultValue): modified to take into account _G.useWreg,
3698         * (genCall): don't use wreg for parameter passing when function is
3699         declared as reentrant, too, added optimization INCF to stack
3700         pointer when stack parameter count is 1,
3701         * (genFunction, genEndFunction): refurnished and fixed to not using
3702         wreg for passing parameters when function has varargs or is
3703         reentrant, fixed bug with symbol name compare for generating
3704         functions in absolute address,
3705         * (pic16_storeForReturn): refurnished,
3706         * (genCmp): began writing a new version of the function, not ready
3707         yet, therefore it is disabled,
3708         * (genAssign): do not read code memory when assigning a function to
3709         a pointer function,
3710         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3711         array of characters, not pointer,
3712         * (pic16initialComments): in debug mode emit an .ident directive for
3713         the assembler,
3714         * (_process_pragma): emit a new warning type (internal to pic16)
3715         when setting stack to default length, emit a similar warning when
3716         placing a function at absolute address and address is not word aligned
3717         * (_pic16_parseOptions): added 'return TRUE' statement,
3718         * (_pic16_linkEdit): if compiling a source, then add the source's
3719         file object, first in the list of objects to link,
3720
3721 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3722
3723         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3724         * src/pic/main.c : removed VC warning.
3725         * src/pic/gen.c : changed comment.
3726
3727 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3728
3729         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3730         reference to a deprecated symbol _GPTRREG was causing failure to
3731         link. Thanks G. M. Gallant for the info.
3732
3733 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3734
3735         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3736         comments for Bugs item #954788.
3737
3738 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3739
3740         * src/pic16/device.c (pic16_dump_gsection,
3741         * pic16_groupRegistersInSection): handle symbols declared to be in
3742         access bank differently,
3743         * src/pic16/gen.c (struct _G): added field resDirect,
3744         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3745         send values read from stack directly to result and don't allocate
3746         temporary values,
3747         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3748         same registers,
3749         * (pic16_sameRegsOfs): NEW,
3750         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3751         free because they were not allocated from temporary pool,
3752         * pic16_popRegFromString): workaround to fix a problem with
3753         allocating variables twice or never,
3754         * (genGenPointerGet): using PRODL instead of FSR0H,
3755         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3756         instead of FSR0H,
3757         * (genAssign): take advantage of the _G.resDirect flag,
3758         * (genCast): around line 11844, use mov2f instead of directly
3759         MOVFF'ing between operands to account for literal values,
3760         * src/pic16/genutils.c: some new debug functions for gpsim have been
3761         added,
3762         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3763         float with integer part only,
3764         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3765         place variables in access bank
3766         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3767         updated sources to reflect recent changes in gen.c
3768
3769 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3770
3771         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3772         sources that searched for headers in installation path, now the
3773         device/include/pic16 is used,
3774         * src/pic16/glue.c (pic16glue),
3775         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3776         .line directives if not in debug mode, this suppresses assembler's
3777         warnings for ignored directives
3778
3779 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3780
3781         * src/port.h: made reset_regparms prototype void parameter explicit.
3782         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3783         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3784         * doc/sdccman.lyx: documented warning disabling and how to use
3785           printf_large to make it print floats.
3786         * device/include/stdbool.h: NEW
3787         * device/lib/_atof.c,
3788         * device/lib/_divuint.c,
3789         * device/lib/_divulong.c,
3790         * device/lib/expf.c,
3791         * device/lib/printf_large.c,
3792         * device/lib/sincosf.c,
3793         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3794         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3795           a completely reentrant lib.
3796
3797 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3798
3799         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3800         * device/include/pic16/stdio.h: fixed bug with colon
3801
3802 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3803
3804         * device/include/pic16/stdio.h,
3805         * device/include/pic16/stdlib.h,
3806         * device/include/pic16/math.h: NEW
3807         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3808         declared as _naked to reduce overhead
3809         * device/lib/Makefile.in (target port-specific-objects-pic16):
3810         changed * to *.* so to ignore the CVS directory,
3811         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3812         stacked variables back in stack,
3813         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3814         corruption
3815
3816 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3817
3818         * .version: bumped version number to 2.4.5
3819         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3820         * support/Util/SDCCerr.c (messages structure): added entry for
3821         W_POSSBUG2
3822
3823         Large cumulative patch for pic16 port and libraries.
3824         * device/include/pic16/sdcc-lib.h,
3825         * device/include/pic16/stdarg.h,
3826         * device/include/asm/pic16/features.h,
3827         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3828         * device/include/pic16/float.h: changes reentrant keyword with
3829         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3830         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3831         updated target build-libraries to include objects from gptr,
3832         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3833         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3834         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3835         all function headings,
3836         * src/SDCCmain.c: added global parameter userIncDirsSet,
3837         * (parseCmdLine): when option -I is encountered add directory to
3838         userIncDirsSet too,
3839         * src/version.awk: added space between control and long,
3840         * src/pic16/NOTES: added some notes for the port,
3841         * src/pic16/gen.c: added prototype for mov2fp function,
3842         * (fReturnpic16[]): properly named return value registers,
3843         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3844         * (aopForSym): added code to handle symbols with onStack flag set,
3845         symbols onStack are allocated PTRSIZE bytes,
3846         * (aopFreeAsmop): handles special case where asmops are stack objects,
3847         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3848         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3849         added argument lock to trace flaws in allocating temporary registers
3850         when developing port,
3851         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3852         * (pic16_popRegFromString): reenabled allocating a direct register
3853         from string,
3854         * (assignResultValue): various beautifications,
3855         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3856         referenced function argument,
3857         * (genIpush): reenabled to allow stacked arguments, handles only
3858         ic->parmPush iCodes,
3859         * (genCall, genPcall): major changes to allow for variable argument
3860         functions, fixed a bug with falsely restoring stack pointer after
3861         returning from call,
3862         * (genFunction): pending code for critical function,
3863         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3864         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3865         * (genNearPointerGet): fixed bug with indirect reading, was always
3866         reading from INDF0
3867         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3868         pointers,
3869         * (genAddrOf): rewrote code to take address of a stacked function parameter
3870         * (genCast): fixed casting to generic pointer type,
3871         * src/pic16/gen.h: added AOP_STA,
3872         * (struct asmop): added field stk,
3873         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3874         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3875         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3876         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3877         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3878         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3879         generic pointers,
3880         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3881         and library paths,
3882         * (pic16_port structure): generic pointer size is set to 3,
3883         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3884         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3885         compiler warning,
3886         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3887         operand is an iTemp,
3888
3889 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3890
3891         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3892         * debugger/mcs51/simi.c: addapt new syntax of s51
3893
3894 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3895
3896         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3897         * src/pic16/pcode.c: commented out some calls to free() in order to
3898         fix bug #989576,
3899
3900 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3901
3902         * src/SDCCicode.h,
3903         * src/SDCCicode.c (isiCodeInFunctionCall),
3904         * src/avr/ralloc.c (selectSpil),
3905         * src/pic/ralloc.c (selectSpil),
3906         * src/pic16/ralloc.c (selectSpil),
3907         * src/ds390/ralloc.c (selectSpil),
3908         * src/hc08/ralloc.c (selectSpil),
3909         * src/xa51/ralloc.c (selectSpil),
3910         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3911         stack in the middle of a function call sequence (fixes bug #1020268)
3912         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3913         costs associated with the minimum switch case.
3914
3915 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3916
3917         * src/SDCC.lex: fixed bug #1030549
3918
3919 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3920
3921         * src/SDCCcse.h (struct cseDef),
3922         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3923         over a function call if the CSE is derived from a symbol whose
3924         address has been taken (fixes bug #1029883)
3925         * support/regression/tests/bug-1029883: a new regression test for
3926         this bug
3927
3928 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3929
3930         * src/hc08/gen.c (emitinline): fixed bug #1029778
3931         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3932         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3933         and starts toward RFE #905167)
3934
3935 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3936
3937         * src/pic16/gen.c (mov2f): New function to move an operand to
3938         another without considering if it is a literal or a register,
3939         * (pic16_sameRegs): don't check if they are both AOP_REG,
3940         * (AccRsh): removed andmask=0 lines,
3941         * (genLeftShift): duplicated to be improved in future versions,
3942         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3943         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3944         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3945         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3946         * (insertBankSwitch): fixed inserting banksel directives algorithm
3947         for instructions that follow a skip instruction, this fixes a report
3948         for broken subtraction code generation,
3949         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3950         iCode is a left op, just in case result and right share the same
3951         registers
3952
3953 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3954
3955         * src/hc08/main.c,
3956         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3957         preservation of HX
3958         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3959         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3960         on 2004-09-12; it was buggy
3961
3962 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3963
3964         * src/SDCCsymt.h: removed RESULT_CHECK
3965         * src/SDCCast.c,
3966         * src/SDCCglue.c,
3967         * src/SDCCval.c,
3968         * src/pic/glue.c,
3969         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3970
3971 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3972
3973         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3974         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3975         configuration values no more rejected by compiler, they are assigned
3976         to configuration registers with a warning message instead,
3977         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3978         the for-loop so last conf register is emitted too,
3979         * (_pic16_initPaths): link library libsdcc.lib by default,
3980         * (_hasNativeMulFor): modified test for multiplication according to
3981         Raphael Neider's remarks. Integer multiplication is also done with
3982         support functions,
3983         * device/include/pic16/pic18fregs.h: corrected type error in while
3984         testing and including 18f6720 header file
3985
3986 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3987
3988         * src/pic16/device.h (pic16_options): removed field use_crt,
3989         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3990         until an optimization to handle single bits is added,
3991         * (pic16_loadFSR0): moved before genUnpackBits,
3992         * (genAnd): some white lines removed,
3993         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3994         leave_reset flags in pic16_options when using crt modules,
3995
3996 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3997
3998         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3999           for bugs 898889 & 979599. Also used some safer print instructions.
4000
4001 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4002
4003         * src/pic16/device.h (pic16_options_t): added field use_crt,
4004         crt_name, no_crt,
4005         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4006         catch a probable future bug,
4007         * src/pic16/gen.c: aopIdx function commented out,
4008         * (genAssign): commented out old code which used aopIdx,
4009         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4010         code, added if conditionals to take into account the --use-crt
4011         command line options,
4012         * src/pic16/main.c (pic16_optionsTable): added new command line
4013         options, --use-crt= and --no-crt,
4014         * (_pic16_linkEdit): now the proper crt object is added in the
4015         linker command line except than when --no-crt is specified,
4016         * src/pic16/pcode.c,
4017         * src/pic16/pcode.h: added some structures and functions for a new
4018         optimization scheme to compansate for instruction overhead between
4019         same iCodes, this scheme is currently under development and is not
4020         working in any way,
4021         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4022         to && operator,
4023         * device/lib/pic16/startup/crt0i.c,
4024         * device/lib/pic16/startup/crt0iz.c: added global char variable
4025         __uflags to force the generation of an idata section
4026
4027 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4028
4029         * doc/Makefile,
4030         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4031         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4032
4033 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4034
4035         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4036         Frieder) and clarified the default code optimization mode
4037
4038 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4039
4040         * src/SDCC.lex (doPragma, process_pragma),
4041         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4042         "opt_code_size", and "opt_code_balanced"
4043         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4044         regrouped options by category, added support for category headers
4045         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4046         and "--opt-code-size"
4047         * doc/sdccman.lyx: documented these new options and pragmas
4048         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4049         preference into account
4050
4051 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4052
4053         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4054           geniCodePreDec): Fixed bug 904237 by generating a warning
4055         * src/SDCCerr.h,
4056         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4057
4058 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4059
4060         * src/pic/device.c : When no max ram set validate full memory range.
4061         * src/pic/pcode.c,
4062         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4063
4064 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4065
4066         * device/lib/_gptrget.c,
4067         * device/lib/_gptrput.c: updated comment
4068         * device/lib/calloc.c,
4069         * device/lib/free.c,
4070         * device/lib/malloc.c,
4071         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4072         * src/SDCCcse.c (cseBBlock),
4073         * src/SDCCicode.c (printOperand, geniCodeArray),
4074         * src/SDCCicode.h (struct operand): fixed bug 868103
4075         * support/regression/tests/bug-868103.c: added
4076         * src/SDCCast.c (searchLitOp),
4077         * src/SDCCcse.h (struct cseDef),
4078         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4079         * src/SDCCicode.h (struct operand),
4080         * src/SDCCsymt.h (struct sym_link),
4081         * src/avr/gen.c (hasInc),
4082         * src/ds390/gen.c (hasInc),
4083         * src/hc08/gen.c (genPlusIncr, hasInc),
4084         * src/mcs51/gen.c (hasInc),
4085         * src/pic16/glue.c (pic16_printIvalChar),
4086         * src/pic16/ralloc.c (regWithIdx),
4087         * src/xa51/gen.c (hasInc) : removed warnings
4088         * src/SDCCast.c (createBlock): added comment ???
4089         * src/hc08/ralloc.c: updated comments
4090
4091 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4092
4093         * doc/sdccman.lyx: updated section on switch statements, added
4094         section about semaphore locking
4095         * doc/Makefile: added option -info for latex2html
4096         * device/lib/_gptrget.c,
4097         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4098
4099 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4100
4101         * src/pic/device.h,
4102         * src/pic/device.c,
4103         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4104          maxram is less than 0x100.
4105
4106 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4107
4108         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4109
4110 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4111
4112         * src/port.h,
4113         * src/mcs51/main.c,
4114         * src/ds390/main.c,
4115         * src/z80/main.c,
4116         * src/hc08/main.c,
4117         * src/pic/main.c,
4118         * src/pic16/main.c,
4119         * src/avr/main.c,
4120         * src/xa51/main.c
4121         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4122         a jump table is the best form for a switch statement, including
4123         automatic insertion of missing cases to make the case range
4124         continuous. Developed in collaboration with Frieder Ferlemann.
4125
4126 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4127
4128         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4129         accumulator result if it needs sign extension
4130
4131 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4132
4133         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4134
4135 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4136
4137         * device/lib/gbz80/printf.c,
4138         * device/lib/z80/printf.c: removed define for NULL
4139
4140 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4141
4142         * as/xa51/xa_link.c,
4143         * device/examples/ds390/ow390/ad26.c,
4144         * device/examples/ds390/ow390/cnt1d.c,
4145         * device/examples/ds390/ow390/counter.c,
4146         * device/examples/ds390/ow390/ds2480.h,
4147         * device/examples/ds390/ow390/ds2480ut.c,
4148         * device/examples/ds390/ow390/findtype.c,
4149         * device/examples/ds390/ow390/gethumd.c,
4150         * device/examples/ds390/ow390/owllu.c,
4151         * device/examples/ds390/ow390/ownetu.c,
4152         * device/examples/ds390/ow390/swt12.c,
4153         * device/examples/ds390/ow390/swtloop.c,
4154         * device/examples/ds390/ow390/temp.c,
4155         * device/examples/ds390/ow390/temp10.c,
4156         * device/examples/ds390/ow390/thermo21.c,
4157         * device/examples/ds390/ow390/tinilnk.c,
4158         * device/examples/ds390/ow390/tstfind.c,
4159         * device/examples/serialcomm/windows/serial.cpp,
4160         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4161         * device/include/reg51.h: fixed line endings for cvs
4162
4163 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4164
4165         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4166         packRegsForAccUse, packRegisters): new accumulator register
4167         packing algorithm
4168         * support/regression/ports/hc08/support.c (_putchar): suppress
4169         warning of unused variable
4170         * src/SDCCicode.c: added SWAP entry to codeTable
4171
4172 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4173
4174         * device/lib/sprintf.c: forgot to add this file before previous commit
4175
4176 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4177
4178         * src/pic16/gen.c (genPackBits): added operand right in function
4179         parameters, load result directly if p_type is POINTER (that is
4180         called by genNearPointerSet)
4181         * (genUnPackBits): added operand left in function parameters,
4182         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4183         FSR0 if accessing bitfields,
4184
4185 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4186
4187         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4188           _print_format; updated printf, sprintf, vsprintf
4189         * device/include/asm/default/features.h: corrected comment/define
4190         * device/lib/Makefile.in: added sprintf.c
4191         * device/lib/libsdcc.lib: added sprintf module
4192         * device/lib/printf_large.c,
4193         * device/lib/vprintf.c,
4194         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4195           into these 3 files
4196         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4197         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4198         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4199           hc08 test
4200         * support/regression/tests/zeropad.c: define idata as data for hc08
4201
4202 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4203
4204         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4205         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4206         labels are referenced at least once (even if a reference is not found)
4207         * src/hc08/gen.c (emitcode): set isComment flag for comments
4208         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4209         loads), rules 6a..6b (optimize jumps to return)
4210
4211 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4212
4213         * device/lib/acosf.c (acosf),
4214         * device/lib/asinf.c (asinf),
4215         * device/lib/atanf.c (atanf),
4216         * device/lib/ceilf.c (ceilf),
4217         * device/lib/cosf.c (cosf),
4218         * device/lib/coshf.c (coshf),
4219         * device/lib/cotf.c (cotf),
4220         * device/lib/fabsf.c (fabsf),
4221         * device/lib/floorf.c (floorf),
4222         * device/lib/log10f.c (log10f),
4223         * device/lib/logf.c (logf),
4224         * device/lib/sinf.c (sinf),
4225         * device/lib/sinhf.c (sinhf),
4226         * device/lib/sqrtf.c (sqrtf),
4227         * device/lib/tanf.c (tanf),
4228         * device/lib/tanhf.c (tanhf),
4229         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4230         replaced all instances of "reentrant" in the library functions
4231         defined in math.h with this macro.
4232         * support/regression/tests/float_trans.c: reenabled test for hc08
4233
4234 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4235
4236         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4237         erroneously deleted
4238
4239 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4240
4241         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4242         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4243         multi-byte volatile operands are used
4244         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4245         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4246         initialization to area GSINIT0 so that it would always precede
4247         any static initializers in GSINIT
4248         * support/regression/tests/zeropad.c: fixed idata define for hc08
4249         * support/regression/tests/bug-927659.c,
4250         * support/regression/tests/float_trans.c: disabled tests for hc08
4251         pending missing library routines
4252         * .version: increased version number to 2.4.4 - hc08 port now passes
4253         regression tests
4254
4255
4256 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4257
4258         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4259         * Makefile.common.in,
4260         * as/Makefile,
4261         * as/hc08/Makefile.in,
4262         * as/mcs51/Makefile.in,
4263         * as/z80/Makefile.in,
4264         * debugger/mcs51/Makefile.in,
4265         * device/include/Makefile.in,
4266         * device/lib/Makefile.in,
4267         * doc/Makefile,
4268         * link/Makefile,
4269         * link/z80/Makefile.in,
4270         * packihx/Makefile.in,
4271         * sim/ucsim/main_in.mk,
4272         * sim/ucsim/avr.src/Makefile.in,
4273         * sim/ucsim/doc/Makefile.in,
4274         * sim/ucsim/gui.src/serio.src/Makefile.in,
4275         * sim/ucsim/hc08.src/Makefile.in,
4276         * sim/ucsim/s51.src/Makefile.in,
4277         * sim/ucsim/xa.src/Makefile.in,
4278         * sim/ucsim/z80.src/Makefile.in,
4279         * src/Makefile.in,
4280         * support/cpp2/Makefile.in,
4281         * support/librarian/Makefile,
4282         * support/makebin/Makefile: added DESTDIR to the install path proposed
4283         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4284         * doc/sdccman.lyx: added DESTDIR documentation
4285
4286 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4287
4288         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4289         instruction for interrupt handlers, use fast returns when returning
4290         from high priority interrupts
4291
4292 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4293
4294         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4295         code generation
4296         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4297         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4298         bugs, ported much of Bernhard's code from mcs51
4299         * src/mcs51/gen.c (genSend),
4300         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4301         than one when calling a reentrant function
4302         * device/lib/_mullong.c: defined an alternate struct layout for big
4303         endian ports (hc08)
4304
4305 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4306
4307         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4308         test
4309
4310 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4311
4312         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4313         are sane and complete before asking the port its prefered parameter
4314         passing method (fixes bug #1017633)
4315         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4316         and _ret3
4317
4318 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4319
4320         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4321         problem in bitfields >= 8 bits.
4322
4323 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4324
4325         * src/SDCCsymt.c: undid changes that were not meant to be committed
4326
4327 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4328
4329         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4330
4331 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4332
4333         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4334           copied and wrong bit got inverted
4335
4336 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4337
4338         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4339         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4340         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4341         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4342         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4343         assignments to bitfields at known addresses
4344         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4345         reads from bitfields at known addresses
4346         * src/hc08/ralloc.c (packRegisters),
4347         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4348         genhc08Code): optimize pointer get values used as conditionals
4349         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4350         and branch
4351
4352 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4353
4354         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4355         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4356         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4357         as conditionals
4358
4359 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4360
4361         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4362
4363 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4364
4365         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4366         related problems
4367
4368 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4369
4370         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4371
4372 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4373
4374         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4375         mcs51 port
4376
4377 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4378
4379         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4380
4381 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4382
4383         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4384         cases use more compact code.
4385
4386 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4387
4388         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4389
4390 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4391
4392         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4393
4394 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4395
4396         * src/SDCCsymt.h,
4397         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4398         parameter of changePointer() from symbol* to sym_link*
4399         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4400         * src/SDCCsymt.c (compareType): void* type is castable to other
4401         pointers, but not necesarily an exact match.
4402         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4403         is no longer blindly treated as an exact match.
4404         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4405
4406 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4407
4408         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4409
4410 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4411
4412         * src/pic/gen.c,
4413         * src/pic/pcode.c,
4414         * src/pic/ralloc.h,
4415         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4416
4417 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4418
4419         * src/pic/device.c,
4420         * src/pic/device.h,
4421         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4422
4423 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4424
4425         * src/mcs51/gen.c (emitcode): fixed bug #992819
4426
4427 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4428
4429         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4430           there's no need to make it worse
4431
4432 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4433
4434         * src/mcs51/ralloc.c (deassignLR),
4435         * src/ds390/ralloc.c (deassignLR),
4436         * src/hc08/ralloc.c (deassignLR),
4437         * src/z80/ralloc.c (deassignLR),
4438         * src/pic/ralloc.c (deassignLR),
4439         * src/pic16/ralloc.c (deassignLR),
4440         * src/avr/ralloc.c (deassignLR),
4441         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4442         rlivePoint): fixed another part of bug #971834
4443
4444 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4445
4446         * src/z80/main.c: enabled "critical" keyword
4447         * src/z80/mappings.i,
4448         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4449         functions (fixes bug #979646)
4450         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4451
4452 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4453
4454         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4455           such as c:\mydir.
4456
4457 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4458
4459         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4460           doesn't disable too much optimizations
4461
4462 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4463
4464         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4465
4466 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4467
4468         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4469
4470 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4471
4472         * src/pic/gen.c tidied up tabs
4473         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4474         * src/pic/main.c tidied up tabs
4475         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4476         * src/pic/pcoderegs.c tidied up tabs
4477         * src/pic/ralloc.c tidied up tabs
4478
4479 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4480
4481         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4482         to S_FIXED for pic16 port and when symbol is not in level 0,
4483         allocate for S_REGISTER storage class and pic16 port, too,
4484         * src/pic16/device.h: prototype for checkSym,
4485         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4486         * (pic16_assignConfigWordValue): test the value and the mask to
4487         validate that the value is suitable for the configuration word,
4488         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4489         collect extern declared symbols, don't emit symbol twice, check
4490         first if symbol is in publics set first,
4491         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4492         * added command line '--fstack' which enables an experimental
4493         feature for stack access, too buggy to be used yet...
4494         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4495         * (pic16_allocDirReg): when register has storage class S_REGISTER
4496         allocate in pic16_dynAccessRegs,
4497         * device/include/pic16/pic18f????.h: modified configuration word
4498         naming convention, words started as CONFIG0H but should be CONFIG1H
4499
4500 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4501
4502         * device/include/mcs51reg.h: fixed bug 970993
4503
4504 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4505
4506         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4507         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4508         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4509         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4510         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4511         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4512           error/warning numbers,
4513           added function setWarningDisabled()
4514         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4515         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4516           _memcmp.c _memmove.c calloc.c realloc.c free.c
4517         * support/regression/tests/malloc.c: added tests for new functionality
4518         * support/regression/tests/zeropad.c: added tests for truncated initializers
4519           and initialized char arrays starting with '\x0'
4520         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4521
4522 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4523
4524         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4525
4526 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4527
4528         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4529         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4530         peephole 177.e. Thanks to anonymous
4531
4532 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4533
4534         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4535         function isn't used in the source but referenced as a
4536         variable initializer then declare it as extern in .asm file
4537
4538 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4539
4540         * .version: increased version number to 2.4.3
4541
4542         Adding version extension according to ChangeLog CVS revision
4543         * src/Makefile.in (target all): added dependency 'version.h'
4544         * (rule version.h): added rule to create version.h from ChangeLog,
4545         * (rule dep): added dependency version.h,
4546         * src/version.awk: AWK script to create version.h
4547         * src/SDCCdwarf2.c (dwWriteModule),
4548         * src/SDCCglue.c (initialComments),
4549         * src/SDCCmain.c (printVersionInfo): modified to write after
4550         version string the version extension number,
4551         * src/SDCCutil.c: included "version.h"
4552         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4553         number,
4554         * src/SDCCutil.h: added prototype for getBuildNumber
4555
4556         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4557         includeDirsSet, too,
4558         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4559         const char [] is found in function prototype...
4560
4561         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4562         moving to WREG with source is already in WREG,
4563         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4564         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4565         * (aopForSym): stack'ed symbols are partially supported, added
4566         if-clause to support symbols in FARSPACE,
4567         * (sameRegs): added test for AOP_ACC to see if registers are same,
4568         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4569         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4570         * (pic16_popRegFromString): will not allocate a new register if it
4571         doesn't find one by name, bug may have introduced...
4572         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4573         * (genIpush): revived to use pic16 port's stack,
4574         * (genAddrOf): added incomplete case for stack'ed operand,
4575         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4576         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4577         can handle multibyte operands,
4578         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4579         * (pic16initialComments): added message for MPLAB compatibility
4580         mode enabled,
4581         * src/pic16/main.h: prototype for pic16_mplab_comp,
4582         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4583         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4584         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4585         because of increased complexity of procedure,
4586         * (_process_pragma): stack pragma changed to format 'stack pos len',
4587         emit symbol '_stack_end' to conform with gplink,
4588         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4589         to search for register,
4590         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4591         PO_GPR_REGISTER,
4592         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4593         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4594         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4595         case for PO_GPR_REGISTER,
4596         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4597         dies, the new era is ahead !...
4598         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4599         pic16_dynInternalRegs,
4600         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4601         * (pic16_allocDirReg): minor optimizations and bug fixes,
4602         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4603
4604         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4605         load stack and frame pointer with address of 'stack_end' symbol
4606
4607 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4608
4609         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4610         without source code but only variable initializers
4611
4612 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4613
4614         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4615         external are not declared as extern to reduce overhead while linking
4616
4617 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4618
4619         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4620
4621 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4622
4623         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4624           Yee Keat for the patch
4625         * src/SDCCast.c (decorateType): fixed bug #979599
4626         * src/ds390/gen.h: removed local fReturnSizeDS390
4627         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4628         * src/ds390/gen.c (genAnd, genOr, genXor),
4629         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4630
4631 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4632
4633         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4634         add relFilesSet to $3, manipulate $2 to handle linking of object
4635         files without source files in command line,
4636         * device/include/pic16 (all headers): added ID location macros,
4637         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4638         entries for ID location bytes,
4639         * (pic16_assignIdByteValue): NEW,
4640         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4641         added field dumpcalltree to pic16_options_t,
4642         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4643         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4644         emitting rFalseIfx label after check_carry label,
4645         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4646         pic16_emitDIRegs), NEW
4647         * (pic16glue): dump .calltree file when option --calltree found,
4648         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4649         * (_pic16_genAssemblerPreamble): emit ID locations after
4650         configuration registers,
4651         * (pic16_linkCmd): modifications of the link command,
4652         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4653         * (pic16_pCodeInitRegisters): don't init stack registers,
4654         * (pic16_findPrevInstruction): fixed bug,
4655         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4656         bug with immediate registers,
4657         * (buildCallTree): traces stack push and pop,
4658         * (pct2): dump also stack usage for each function,
4659         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4660         * (pic16_allocDirReg): various modifications,
4661         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4662         fixed to 1,
4663
4664 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4665
4666         * src/pic16/pcode.c: removed buggy double colon
4667
4668 2004-07-01 Borut Razem <borut.razem AT siol.net>
4669
4670         * support/scripts/sdcc.nsi: added include/pic16 to setup
4671
4672 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4673
4674         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4675         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4676         target 'clean',
4677         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4678         specific command line arguments. Also added sample lkr script
4679         for placing a variable at a specific memory bank.
4680         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4681         at a specific memory bank,
4682         * (pic16_dump_isection): fixed bug which caused string literals to
4683         be omitted when dumping idata section,
4684         * (pic16_groupRegistersInSection): added code to handle registers
4685         in specific memory banks,
4686         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4687         public, all references are renamed too,
4688         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4689         AOP_DPTR2,
4690         * (pic16_storeForReturn): added case to handle when dest is WREG,
4691         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4692         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4693         pic16_rel_udata, check to see if that register is marked as being
4694         a member of a specific memory bank,
4695         * (pic16_printIvalCharPtr): added code to add string literals either
4696         to code or the idata sections,
4697         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4698         also accept the 'udata' pragma,
4699         * src/pic16/main.h: new structure types sectName and sectSym
4700         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4701         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4702         * (pic16_findPrevInstruction): fixed, it returned nothing,
4703         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4704         instruction combinations,
4705         * (pic16_FixRegisterBanking): heavily reorganised,
4706         * (pic16_AnalyzeBanking): if generating banksel directives is
4707         disabled, then don't call FixRegisterBanking at all,
4708         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4709         completely removed,
4710         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4711
4712 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4713
4714         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4715         Phuah Yee Keat <yk.phuah AT nestac.com>
4716
4717 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4718
4719         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4720         correctly the IVT even if it is relocated to some other location
4721
4722 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4723
4724         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4725         * device/include/pic16/pic18f2220.h: NEW,
4726         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4727         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4728         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4729         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4730         nodefaultlibs, ivt_loc is the location of the interrupt vector
4731         table, and nodefaultlibs signs that default libraries should not be
4732         linked in link stage,
4733         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4734         according to --ivt-loc argument,
4735         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4736         when pragma stack is found,
4737
4738 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4739
4740         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4741         256 (range check), 257 (do while), 258.a-f (bit banging
4742         f.e. on 3-wire SPI bus)
4743
4744 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4745
4746         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4747         variables used exclusively within a loop
4748
4749 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4750
4751         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4752
4753 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4754
4755         * src/SDCClrange.c (computeClash): fixed bug #971834
4756
4757 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4758
4759         * src/mcs51/gen.c (genCmp): fixed bug #975903
4760         * src/hc08/gen.c (operandsEqu),
4761         * src/ds390/gen.c (operandsEqu),
4762         * src/z80/gen.c (operandsEqu),
4763         * src/pic/gen.c (operandsEqu),
4764         * src/pic16/gen.c (operandsEqu),
4765         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4766         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4767
4768 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4769
4770         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4771
4772 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4773
4774         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4775         default case in switch statement,
4776         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4777         to eliminate problem with initialisation of pointers, but problem
4778         still exists,
4779         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4780         * (emitStaticSegment): removed various lines emitting debug info,
4781         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4782         added processor registers for utilizing EEPROM,
4783         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4784         configurable and set 8
4785
4786 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4787
4788         * .version: increased version number to 2.4.2,
4789
4790         Cumulative patch for pic16 port
4791         * src/pic16/device.c: changed scheme to dump initial values for
4792         variables in idata segment, all print_idata* functions were removed,
4793         now the pic16_printIval* will be called,
4794         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4795         * _pic16_printPointerType, pic16_printPointerType,
4796         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4797         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4798         NEW, similar to the respective functions in SDCCglue.c,
4799         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4800         way, emitting hex bytes,
4801         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4802
4803 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4804
4805         * src/avr/ralloc.c (serialRegAssign),
4806         * src/xa51/ralloc.c (serialRegAssign),
4807         * src/pic/ralloc.c (serialRegAssign),
4808         * src/pic16/ralloc.c (serialRegAssign),
4809         * src/hc08/ralloc.c (serialRegAssign),
4810         * src/z80/ralloc.c (serialRegAssign),
4811         * src/ds390/ralloc.c (serialRegAssign),
4812         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4813
4814 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4815
4816         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4817         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4818
4819 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4820
4821         Cumulative patch for pic16 port:
4822         * src/pic16/device.h (typedef PIC16_device) modified fields for
4823         defining microcontrollers,
4824         * src/pic16/device.c: added new info for all devices in Pics16 array,
4825         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4826         to be optimised out by the pCode optimiser,
4827         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4828         specially, bug reported by G.M. Gallant,
4829         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4830         as force'd so that cannot be optimised out by pCode optimiser,
4831         * src/pic16/pcode.c,
4832         * src/pic16/pcodepeeph.c,
4833         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4834         they are disabled by default, but can be enabled explicit with
4835         command argument --denable-peeps, for testing,
4836         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4837         --pomit-ivt in COMPILE_FLAGS
4838
4839 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4840
4841         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4842           compilation on MSVC
4843
4844 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4845
4846         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4847
4848 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4849
4850         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4851         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4852
4853 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4854
4855         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4856         would only assign 0x300001 register.
4857
4858 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4859
4860         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4861         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4862
4863 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4864
4865         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4866         for ds80c400
4867         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4868         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4869         added peephole 254 (left shift), 255 (jump table)
4870
4871 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4872
4873         * device/lib/Makefile.in: removed comment line with model-pic16,
4874         * (target port-specific-objects-pic16): the libraries and objects
4875         are copied to the build directory form the device/lib/pic16/bin
4876         directory
4877
4878         Cumulative patch concerning pic16 port:
4879         * library directory has been re-organized,
4880         * added support for PIC18F1220,
4881         * added headers and library sources for chips 18f1220,18f6520,
4882         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4883
4884         * configuration registers setting has changed, now each supported
4885         device has a complete description of the registers it uses,
4886         * all initialisations are moved to idata sections, these section
4887         can be absolute or relocatable,
4888         * fixed initialisation of codespace variables,
4889         * fixed warning about PCLATU and gpsim,
4890         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4891         * (genAssign): use table reads when assigning from variables in codespace,
4892         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4893         char/int variables placed in codespace,
4894         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4895         registers set in .asm file, no need for --pomit-config-words anymore,
4896         * (pic16glue): some 8051 legacy segments are commented out
4897         (to be removed completely),
4898         * added support for alternative assembler and linker with --asm=
4899         and --link= command line arguments,
4900         * peepholes are disabled automatically in the port, no need to
4901         specify on command line,
4902         * port supports natively char/int/long multiplication, but converts
4903         all divisions to support functions,
4904         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4905         to the file set in variable $2,
4906         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4907         strings in ASCII format and not in hex,
4908         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4909         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4910         allocate proper register if iCodes aren't temporary,
4911
4912 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4913
4914         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4915
4916 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4917
4918         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4919         is commented out
4920
4921 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4922
4923         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4924         computed address is reused
4925         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4926         multi-byte bitfields
4927
4928 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4929
4930         * src/z80/gen.c: (genArrayInit): must check for pointers too
4931
4932 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4933
4934         * support/regression/tests/zeropad.c: never meant to commit the
4935           nestedstruct test: removed, added check for GCC version
4936
4937 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4938
4939         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4940         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4941         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4942           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4943           bugs 928906 and 954082 half-empty initializers
4944         * src/SDCCsymt.h,
4945         * src/SDCCsymt.c (getAllocSize): added for above fix
4946         * src/z80/gen.c (genArrayInit): fixed bug 741044
4947         * support/regression/tests/zeropad.c: added tests
4948
4949 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4950
4951         * src/pic16/device.c (pic16_dump_section): corrected bug which
4952         caused some symbols of the libraries to be misplaced
4953
4954 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4955
4956         * src/pic16/glue.c,
4957         * src/pic16/ralloc.h,
4958         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4959         to fix conflict with pic port
4960
4961 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4962
4963         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4964         externs configuration variables,
4965         * src/pic16/ralloc.h,
4966         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4967         prototype in header, commented out some debug messages
4968
4969 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4970
4971         * src/pic16/glue.c,
4972         * src/pic16/main.c,
4973         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4974         for gpasm COFF object generation. Thanks to D. Hawkins for
4975         his patch info
4976
4977 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4978
4979         * src/ds390/main.c,
4980         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4981         Brock for spotting this)
4982         * src/ds390/gen.c (genEndFunction),
4983         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4984         interrupt handler and critical. Disable push/pop optimizations when
4985         peephole optimizations disabled.
4986
4987 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4988
4989         Updated pic16 library sources and headers.
4990         * device/lib/pic16/pic18f*/ ,
4991         * device/include/pic16/*.h: modified to handle structured SFR
4992         definitions
4993
4994 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4995
4996         * src/port.h (PORT structure): added hook initPaths, now each
4997         port can declare its own default search paths,
4998         which can been seen with the --print-search-dirs option,
4999         see pic16 port for example,
5000         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5001         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5002         * (doPrintSearchDirs): NEW, replaces in a central manner the
5003         printing of search dirs which was split in set*Paths functions,
5004         * (main): added call to port->initPaths and doPrintSearchDirs,
5005         * src/avr/main.c,
5006         * src/ds390/main.c,
5007         * src/hc08/main.c,
5008         * src/izt/i186.c,
5009         * src/izt/tlcs900h.c,
5010         * src/mcs51/main.c,
5011         * src/pic/main.c,
5012         * src/pic16/main.c: modified port structures to reflect addition of
5013         initPaths hook,
5014
5015         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5016         * (pic16_dump_section): for registers in same address reserve memory once,
5017         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5018         to no_banksel,
5019         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5020         result is greater in size than right or left,
5021         * (pic16_genUMult8X8_8): there are some cases where the result can
5022         be 16 bits size, so handle these,
5023         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5024         * (pic16_outBitC): modified to emit pcodes,
5025         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5026         or not,
5027         * (genDivOneByte): implemented algorithm to divide 8-bits,
5028         * (genCmp): uncommented goto, but issues still exist,
5029         * (genAnd): fixed a bug with variables >8bits,
5030         * (genPackBits): optimization added that uses BCF/BSF to change a
5031         single bit,
5032         * (genAssign): fixed bug when assigning floating point literals,
5033         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5034         __sdcc_gsinit_startup label,
5035         * src/pic16/main.c (_pic16_init): removed search directory
5036         initialisations,
5037         * (_pic16_initPaths): NEW, used to initialise search directories,
5038         * (_hasNativeMulFor): support functions for all except char/int
5039         multiplication, and char division,
5040         * (PIC16_port struct): modified entry for native mul support,
5041         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5042         no_banksel option,
5043         * (buildCallTree): call to register_usage is ifdef'ed out,
5044
5045 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5046
5047         * device/include/string.h: applied Stas Sergeev's patch to make this
5048         header file compatible with the preprocessor -Wundef option
5049         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5050         failure (fixes bug #941458)
5051
5052 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5053
5054         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5055         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5056         that the variable, not the function, should be static
5057         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5058         to be consistent with non-literal case
5059
5060 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5061
5062         * src/SDCCast.c (isConformingBody): fixed bug #949967
5063         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5064         convilong): fixed bug #952086
5065
5066 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5067
5068         * src/SDCCmem.c (allocVariables): fixed bug #955321
5069
5070 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5071
5072         * src/hc08/main.c (_hc08_genAssemblerEnd),
5073         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5074         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5075         completely eliminated the use of a temporary file
5076         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5077         when more than one file linked
5078         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5079
5080 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5081
5082         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5083         which fixes bug #543481
5084         * support/regression/tests/bug-751703.c: fixed comments left from a
5085         cut and paste error
5086         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5087         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5088         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5089         scopes
5090         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5091         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5092         are now changed to underscores in moduleName
5093
5094 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5095
5096         * as/mcs51/lkmem.c: better fix for bug #954173
5097
5098 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5099         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5100
5101         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5102         * device/include/c8051f000.h,
5103         * device/include/c8051f120.h,
5104         * device/include/c8051f300.h,
5105         * device/include/c8051f310.h,
5106         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5107         PWM16) and detab'ed
5108
5109 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5110
5111         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5112         and mailing lists, doc'ed --no-peep-comments, removed reference
5113         to knoppix (newest version has no LyX/LaTeX), other minor changes
5114         * src/SDCCglue.c (glue): save 2 bytes stack space with
5115         option --main-return. The ljmp could probably be avoided too
5116
5117 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5118
5119         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5120
5121 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5122
5123         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5124         * src/SDCCopt.c (isLocalWithoutDef),
5125         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5126         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5127         (credit to Maarten Brock for patch #949363, on which this is based)
5128         * support/regression/tests/bug-751703.c: some test cases of extern used
5129         within inner scopes.
5130
5131 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5132
5133         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5134         SPEC_STRUCT
5135         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5136         struct definitions
5137         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5138         dwWriteLabel): fix to create valid debugger symbols even when
5139         the module name has non-alphanumeric symbols in it
5140         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5141         when a variable's allocation has been optimized away
5142
5143
5144 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5145
5146         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5147         * src/hc08/main.c,
5148         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5149         * src/mcs51/main.c,
5150         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5151         * src/ds390/main.c,
5152         * src/z80/gen.c (z80_emitDebuggerSymbol),
5153         * src/z80/main.c,
5154         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5155         * src/pic/main.c,
5156         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5157         * src/pic16/main.c,
5158         * src/avr/gen.c (avr_emitDebuggerSymbol),
5159         * src/avr/main.c,
5160         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5161         * src/xa51/main.c,
5162         * src/SDCCdebug.c (emitDebuggerSymbol),
5163         * src/SDCCdebug.h,
5164         * src/port.h: added a debugger struct to the port struct. Added a
5165         callback for defining debugger symbols
5166
5167         * src/SDCCast.c (createLabel),
5168         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5169         with isitmp = 1
5170         * src/SDCCicode.h,
5171         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5172         iCode back to the ast for the function
5173
5174         * src/hc08/ralloc.c (hc08_assignRegisters),
5175         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5176         unneeded fields from the regs struct.
5177         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5178         pushReg() & pullReg() functions instead of emitcode()
5179
5180         * src/hc08/gen.c (genLabel, genhc08Code),
5181         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5182
5183         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5184         debugger hooks
5185
5186         * src/hc08/gen.c (genEndFunction, genhc08Code),
5187         * src/hc08/gen.h,
5188         * src/mcs51/gen.c (genEndFunction, gen51Code),
5189         * src/mcs51/gen.h,
5190         * src/ds390/gen.c (genEndFunction, gen390Code),
5191         * src/ds390/gen.h,
5192         * src/z80/gen.c (genEndFunction, genZ80Code),
5193         * src/z80/gen.h,
5194         * src/z80/z80.h,
5195         * src/pic/gen.c (genEndFunction, genpic14Code),
5196         * src/pic/gen.h,
5197         * src/pic16/gen.c (genEndFunction, genpic16Code),
5198         * src/pic16/gen.h,
5199         * src/avr/gen.c (genEndFunction, genAVRCode),
5200         * src/avr/gen.h,
5201         * src/xa51/gen.c (genEndFunction, genXA51Code),
5202         * src/xa51/gen.h,
5203         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5204         specific code to cdbFile.c and out of the backend code generators
5205
5206         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5207         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5208         starting address is now 0
5209
5210         * as/hc08/asm.h,
5211         * as/hc08/m08pst.c,
5212         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5213         assembler directive for DWARF support
5214         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5215
5216         * src/src.dsp,
5217         * src/Makefile.in,
5218         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5219
5220 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5221
5222         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5223         and inappropriate peephole optimization in jump tables
5224
5225 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5226
5227         * as/hc08/m08pst.c,
5228         * src/SDCCglue.c: sdccopt works for the hc08 port now
5229
5230 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5231
5232         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5233
5234 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5235
5236         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5237
5238 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5239
5240         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5241         rules
5242         * src/SDCCmain.c,
5243         * src/SDCCglobl.h,
5244         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5245         comments from the peephole optimizer replacement rules
5246         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5247         symbols
5248         * src/SDCCcse.c (updateSpillLocation),
5249         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5250         equivalents
5251         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5252         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5253         objects far pointers
5254
5255 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5256
5257         * src/SDCCsymt.h: a missing part of my last change
5258         * src/pic/ralloc.c (regTypeNum),
5259         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5260
5261 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5262
5263         * src/SDCCicode.h,
5264         * src/SDCCicode.c (aggrToPtrDclType),
5265         * src/SDCCptropt.h,
5266         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5267         ptrPseudoSymConvert),
5268         * src/pic/ralloc.c (regTypeNum),
5269         * src/pic16/ralloc.c (regTypeNum),
5270         * src/hc08/ralloc.c (regTypeNum),
5271         * src/ds390/ralloc.c (regTypeNum),
5272         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5273         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5274
5275 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5276
5277         * link/z80/lkmain.c (afile),
5278         * as/hc08/lkmain.c (afile),
5279         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5280         prevent a pointer problem when a filename has no directory and
5281         no extension specified.
5282
5283 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5284
5285         * link/z80/lkmain.c (afile): allow periods in directory names
5286         * link/z80/lkmain.c (afile),
5287         * as/mcs51/lkmain.c (afile),
5288         * as/hc08/lkmain.c (afile): allow linker script file to have an
5289         extension other than ".lnk"
5290         * link/z80/lklex.c (getfid),
5291         * link/z80/lkmain.c (parse),
5292         * as/mcs51/lklex.c (getfid),
5293         * as/mcs51/lkmain.c (parse),
5294         * as/hc08/lklex.c (getfid),
5295         * as/hc08/lkmain.c (parse): Support comments in the linker script
5296         file on lines by themselves and after filenames
5297
5298 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5299
5300         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5301
5302 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5303
5304         * src/z80/peeph-z80.def: removed some peephole rules that don't
5305         work with multibyte arithmetic (fixed bug #937126)
5306         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5307         to registers and not global variables
5308         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5309         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5310         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5311         checking for assignments not internally generated (fixed bug #931895)
5312         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5313         structure member (fixed bug #930072)
5314
5315 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5316
5317         * src/SDCCmain.c (linkEdit),
5318         * src/hc08/main.c (_hc08_parseOptions),
5319         * as/hc08/Makefile.in,
5320         * as/hc08/aslink.h,
5321         * as/hc08/asm.h,
5322         * as/hc08/m08pst.c,
5323         * as/hc08/lkrloc.c (relr, rele),
5324         * as/hc08/lkarea.c (lnkarea)
5325         * as/hc08/lkmain.c (afile, parse),
5326         * as/hc08/lkelf.c: support for ELF output
5327         * as/hc08/lks19.c (s19),
5328         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5329
5330 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5331
5332         * as/mcs51/lkihx.c: Fixed bug #899105.
5333
5334 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5335
5336         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5337         .dsp files from Unix to DOS.
5338
5339 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5340
5341         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5342         function pointers; we have been compliant for several months now.
5343         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5344         change that was accidently commented out
5345         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5346         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5347         bug #922319
5348
5349 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5350
5351         * src/hc08/gen.c: output of all of the internal debugging information
5352         is now controlled by the D() macro; it is disabled by default
5353
5354 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5355
5356         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5357         harder to keep the same registers during a CAST iCode
5358         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5359         long via int can be done in a single cast, if the signedness is
5360         correct.
5361         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5362         putchar() in tinibios.c in ds390's library
5363
5364 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5365
5366         * src/SDCCast.c (decorateType): fixed bug #898889,
5367         cast result of a literal complement too
5368         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5369         fixed check for bitfields
5370
5371 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5372
5373         * src/SDCCicode.c (geniCodeLogic): made it static,
5374         (geniCodeLogicAndOr): added in order to fix bug #905492,
5375         (ast2iCode): fixed bug #905492
5376         * support/regression/tests/bug-905492.c: added
5377         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5378         (processParms): fixed bug #927659: don't copy parms, this will clear
5379         decorated flag
5380         * support/regression/tests/bug-927659.c: added
5381
5382 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5383
5384         * src/SDCCast.c (addCast): don't cast float to char
5385         * device/lib/libsdcc.lib: added _memmove
5386
5387 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5388
5389         * device/lib/large/Makefile: fixed parallel execution by
5390         replacing `make` by `$(MAKE)`
5391
5392 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5393
5394         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5395         offsets (fixes bug #923936)
5396
5397 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5398
5399         * device/lib/small/Makefile: fixed parallel execution by
5400         replacing `make` by `$(MAKE)`
5401
5402 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5403
5404         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5405
5406 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5407
5408         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5409         * src/regression/Makefile: Regression test was not running.
5410
5411 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5412
5413         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5414         complement if possible
5415         * src/SDCCval.c (valComplement),
5416         * src/SDCCicode.c (operandOperation): fixed complement of literal
5417         * support/regression/tests/onebyte.c (testComplement): added
5418
5419 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5420
5421         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5422         return an optimized tree; actually replace actParm with the new tree
5423         * src/SDCCast.h: added some parantheses to remove side effects
5424         * support/regression/tests/bug-920866.c
5425
5426 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5427         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5428         Bit operands were not being handled properly in the pic14 port.
5429         (now src/regression/add.c passes again).
5430
5431 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5432
5433         * src/SDCC.y (labeled_statement): case and default no longer require
5434         a following statement (RFE #893037)
5435
5436 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5437
5438         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5439         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5440         disabled (fixes bug #916294)
5441         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5442         "mov a,acc"; patch provided by Lenny Story
5443         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5444
5445 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5446
5447         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5448         functions
5449         * src/ds390/gen.c (genFunction, genEndFunction),
5450         * src/ds390/ralloc.c (ds390_assignRegisters),
5451         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5452         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5453         pushed if there are parameters passed on the stack. Also, a cleaner
5454         way to decide if r0/r1 should be pushed/popped. (Together they fix
5455         bug #918693)
5456
5457 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5458
5459         * doc/sdccman.lyx,
5460         * device/lib/mcs51/crtpagesfr.asm,
5461         * device/lib/mcs51/crtxinit.asm,
5462         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5463         to avoid confusion with Si Lab's SFRPAGE register.
5464
5465 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5466
5467         * src/SDCCglue.c (emitMaps): allow public sfr variables
5468         * src/SDCCglue.c (initialComments): include compiler build date
5469         with compiler version and put the timestamp of the generated
5470         assembly file on a serperate line to be less confusing.
5471         * src/port.h: added genInitStartup hook
5472         * src/avr/main.c,
5473         * src/ds390/main.c,
5474         * src/hc08/main.c,
5475         * src/pic/main.c,
5476         * src/pic16/main.c,
5477         * src/xa51/main.c,
5478         * src/z80/main.c: genInitStartup initialize as NULL (default to
5479         historical behaviour)
5480         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5481         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5482         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5483         library instead of hard coding it into the compiler.
5484         * support/regression/ports/mcs51-stack-auto/spec.mk,
5485         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5486         * device/lib/mcs51/Makefile,
5487         * device/lib/small/Makefile,
5488         * device/lib/large/Makefile,
5489         * device/lib/mcs51/crtpagesfr.asm,
5490         * device/lib/mcs51/crtstart.asm,
5491         * device/lib/mcs51/crtxclear.asm,
5492         * device/lib/mcs51/crtxinit.asm,
5493         * device/lib/mcs51/crtclear.asm,
5494         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5495         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5496         and into user configurable files.
5497         * device/lib/clean.mk: clean mcs51 directory too
5498         * support/regression/tests/longlit.c: added static to T1 declaration
5499         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5500         accesses in the initialization code
5501
5502 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5503
5504         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5505         OSCTRIMVAL as noted in bug #916008
5506
5507 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5508
5509         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5510         in loops with multiple exits (reported as incorrect registers
5511         used by Martin Helmling in Sdcc-user list)
5512
5513 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5514
5515         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5516         made ds390 register extensions look less like error messages
5517
5518 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5519
5520         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5521         reported by Adam Wozniak in Sdcc-user list
5522
5523 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5524
5525         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5526         arithmetic optimizations, added debug output
5527
5528 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5529
5530         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5531         * sdcc.spec: updated and split sdcc into 3 rpms
5532         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5533         needed for literals of LEFT_OP and '+'
5534         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5535         introduced RESULT_TYPE_NOPROM
5536         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5537         left shift
5538         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5539         limited promotion to int only for '*'
5540         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5541
5542 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5543
5544         * src/pic16/gen.c (genSkip),
5545         (genc16bit2lit), (gencjneshort): commented out
5546         (is_LitOp): new helper function, checks operand type
5547         (genCmpEq): rewritten
5548
5549 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5550
5551         * support/regression/tests/bug-908454.c: added
5552
5553 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5554
5555         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5556         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5557         (geniCodeCast): cosmetic, don't preserve bit storage class
5558         (geniCodeLeftShift): added promotion
5559         (geniCodeLogic): fixed regression
5560         * src/SDCCsymt.c (computeTypeOr): accept bits too
5561         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5562
5563 2004-03-07  Borut Razem <borut.razem AT siol.net>
5564
5565         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5566
5567 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5568
5569         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5570         version of pic16_genPackRegisters which does not check if ic is a
5571         CAST operator,
5572         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5573         function cause string1.c regression test fails
5574
5575 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5576
5577         * sim/ucsim/configure.in,
5578         * sim/ucsim/configure,
5579         * sim/ucsim/doc/Makefile.in: use docdir
5580         * src/SDCC.y: fixed sbit atrributes
5581         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5582         * src/SDCCast.c (decorateType): |^& need special promotion handling
5583         * src/SDCCast.h,
5584         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5585         * src/SDCCsymt.h (computeType),
5586         * src/SDCCicode.c: computeType() needs op
5587         * src/SDCCsymt.c (checkTypeSanity),
5588         * doc/sddman.lyx: "plain" bitfields are unsigned
5589         * src/SDCCsymt.c (computeTypeOr): added
5590         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5591         |^& ops
5592         * src/SDCCval.c (val*): computeType() needs op
5593         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5594         * support/regression/tests/onebyte.c: added tests for |^&
5595
5596 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5597
5598         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5599         for writing icode into asm output.
5600
5601 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5602
5603         * src/pic16/device.c: added some debug lines enabled
5604         with macro DEBUG_CHECK,
5605         * src/pic16/genarith.c: more debug in genPlus,
5606         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5607         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5608         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5609         * (aopForSym): onStack symbols are re-placed in data memspace,
5610         and onStack flag is cleared,
5611         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5612         copy temporary pcodeop,
5613         * (genPcall): added warning for not updating PCLATU,
5614         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5615         always true for pic16 port,
5616         * (genMultOneWord): NEW, supports integer multiplication,
5617         * (genMult): modified to call genMultOneWord,
5618         * (ifxForOp): added warning when return NULL,
5619         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5620         flag is set before call to operandFromSymbol for implicit
5621         added structures,
5622         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5623         options.intlong_rent are set by default,
5624         * (_hasNativeMulFor): modified to allow port generation of integer
5625         multiplication,
5626         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5627         set regtype to REG_SFR for all registers, restricting seting the
5628         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5629
5630 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5631
5632         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5633         more than 500 times in the regression tests
5634
5635 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5636
5637         * support/Util/SDCCerr.h,
5638         * support/Util/SDCCerr.c,
5639         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5640         enumerator_list),
5641         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5642         for symbol conflicts.
5643         * support/valdiags/tests/enum.c,
5644         * support/valdiags/tests/tentdecl.c,
5645         * support/valdiags/tests/struct.c: expect possible error messages
5646         referring to original symbol definitions.
5647         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5648         * src/SDCCsymt.h,
5649         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5650
5651 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5652
5653         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5654
5655 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5656
5657         * src/pic16/ralloc.c (newReg): fixed bug #908929
5658
5659 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5660
5661         * src/ds390/gen.c: added missing #include "main.h"
5662
5663 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5664
5665         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5666         checking if symbol is already in set,
5667         * src/pic16/device.h: prototype for checkAddSym,
5668         * src/pic16/gen.c: (_G): added entry interruptvector,
5669         * (assignResultValue): removed some commented out lines,
5670         * (genFunction): check for ISR via sym->type, absolute section for
5671         interrupt code is created via a new pBlock, the goto instruction is
5672         placed now correctly at the interrupt vector position, changed all
5673         references from ivec to _G.interruptvector,
5674         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5675         is the interrupt is a high priority one, same for return from ISR,
5676         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5677         externs to calls of checkAddSym,
5678         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5679         pic16_pcode_verbose flag is set,
5680         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5681         * src/pic16/pcoderegs.c: message about how many registers are saved
5682         will only be emitted if pic16_pcode_verbose flag is set,
5683
5684 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5685
5686         * src/ds390/ralloc.h,
5687         * src/ds390/ralloc.c (ds390_regWithIdx),
5688         * src/ds390/gen.c (emitcode),
5689         * src/ds390/main.h,
5690         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5691         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5692         ds390operandCompare, getRegsRead, getRegsWritten,
5693         initializeAsmLineNode): customized instruction size calculation for
5694         ds390, started basis for some register optimizations
5695         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5696         corresponding assembly output
5697         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5698         missing push/pop of r0/r1. Optimized push/pops
5699
5700 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5701
5702         * src/mcs51/main.c (instructionSize): fixed ACALL size
5703         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5704
5705 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5706
5707         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5708         the sorting of rlist with NULL elements
5709         * (print_idataType, print_idata): NEW to create idata sections
5710         * src/pic16/device.h: idataSymSet new variable
5711         * src/pic16/gen.c (genFunction): fixed some bugs in string
5712         comparing, improved the absolute section creation for ISRs,
5713         added FSR0L/FSR0H in registers that are saved in an ISR,
5714         * (genInline): fixed the processing of inline snippets,
5715         now they undergo no process by the peephole optimizer
5716         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5717         are placed in idataSymSet,
5718         * (pic16emitStaticSeg): extern symbols are added in externs,
5719         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5720         switching when aboslute variables are placed in access bank memory
5721         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5722         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5723         commented out with #if,
5724         * (pic16_packRegisters): reintroduce the check for CAST because some
5725         symbols are not correctly handled,
5726         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5727         pCodeInstruction instead of pCode,
5728         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5729         pCodeAsmDir definition,
5730         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5731         directive, then the argument directive is emitted without the leading
5732         tab, hack for inline labels which must be in the first column,
5733         * (compareLabel,pic16_findNextInstruction),
5734         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5735         * (insertBankSwitch): modified for the new pCodeAsmDir,
5736
5737 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5738         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5739
5740         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5741         instance,
5742         * (pushSide): commented out with #if,
5743         * (assignResultValue): fixed some typos in saving
5744         registers,
5745         * (genPcall): FIXED and sync'ed with genCall,
5746         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5747         * (genNearPointerGet): fixed to handle some more cases,
5748         implementation scheme via table reads,
5749         * (genConstPointerGet): modified to access code memory correct,
5750         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5751         and improved to handle some cases
5752         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5753         instead of "RETLW" for init data
5754         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5755         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5756         variables are placed in access bank memory (<0x80 and >=0xf80),
5757         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5758         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5759         TBLWT_POSTDEC,TBLWT_PREINC
5760         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5761         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5762         directives
5763         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5764         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5765         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5766         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5767
5768 2004-02-29  Borut Razem <borut.razem AT siol.net>
5769
5770         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5771         support/Util/findme.h, support/Util/system.h: enhance binary relative
5772         search for lib and include by using findProgramPath()
5773
5774 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5775
5776         * src/SDCCpeeph.h,
5777         * src/SDCCpeeph.c (pcDistance),
5778         * src/port.h,
5779         * src/mcs51/ralloc.h,
5780         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5781         * src/mcs51/main.h,
5782         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5783         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5784         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5785         size calculation port specific, started basis for some register
5786         optimizations
5787         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5788         missing push/pop of r0/r1. Optimized push/pops
5789         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5790         * device/lib/_modsint.c (_modsint),
5791         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5792         and stack version so regression tests pass
5793
5794 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5795
5796         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5797         * src/SDCCast.c (decorateType): catch another small optimization
5798         with '?' operator
5799         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5800         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5801         modified to finally use computeType() all over SDCC,
5802         see Feature Request #877103
5803         * src/SDCCval.h: cosmetic
5804         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5805         valCompare(); regression tested in muldiv.c
5806         * support/regression/tests/muldiv.c (testMod): mod sign follows
5807         dividend only
5808
5809 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5810
5811         * src/SDCCast.c (decorateType): fixed bug #902362
5812         * doc/INSTALL.txt: fixed install instructions for win32
5813
5814 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5815
5816         * device/include/Makefile.in (install): fixed by replacing spaces
5817         by tabs
5818         * doc/README.txt,
5819         * doc/INSTALL.txt: updated for release
5820         * doc/sdccman.lyx: added warning for --xstack being buggy
5821
5822 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5823
5824         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5825         to eliminate build warnings.
5826         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5827
5828 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5829            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5830
5831         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5832         removed -penable-stack, added comment for stack pragma, added
5833         warning for not initializing the stack/frame registers, removed
5834         comment at interrupts section
5835
5836         Stack is made permanent, there is no ability to disable stack usage.
5837         * src/pic16/device.h,
5838         * src/pic16/device.c: removed all references to USE_STACK macro,
5839         * src/pic16/device.c (pic16_dump_section): when no elements in
5840         rlist, free rlist before return,
5841         * (pic16_dump_int_registers): NEW, internal registers are a new set
5842         of general purpose registers reused by each function,
5843         * (checkAddReg): returns 1 if registers is added to set,
5844         * (pic16_groupRegistersInSection): when a registers is of type
5845         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5846         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5847         SRCASECMP macro is moved here from device.c
5848         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5849         PO_PCLATU, PO_PRODL, PO_PRODH,
5850         * (pic16_pCodeOpType, genMinus,
5851         changed compares to "a" register, with AOP_ACC,
5852         * (pic16_genPlus): fixed some bugs and indented properly,
5853         * (pic16_addSign): changed size to size+offset in the MOVWF
5854         instruction,
5855         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5856         multiply 8-bit operand by literal, result is 8-bit,
5857         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5858         multiply 2 8-bit operand, result is 8-bit,
5859         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5860         genUMult8X*_16,
5861         * src/pic16/gen.c: changed accUse to contain WREG only,
5862         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5863         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5864         true, do not use immediate addressing any more unless sym is a
5865         pointer in codespace,
5866         * (aopForRemat): do not use immediate addressing when symbol not in
5867         codespace and when symbol's address is requested,
5868         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5869         accUse size (= 1),
5870         * (aopGet): added case for AOP_ACC and don't return "accumulator
5871         bug" but WREG instead,
5872         * (popGetTempReg): pushes contents of temporary register in stack,
5873         * (popReleaseTempReg): pops contents of temporary register from
5874         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5875         * (pic16_popGet): separated case AOP_ACC to return register WREG
5876         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5877         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5878         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5879         the use of immediate pointers to certain cases only.
5880
5881         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5882         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5883         * (assignResultValue, genCall, genRet): modified to use the new
5884         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5885         genPcall is still broken,
5886         * (genFunction): added code to create 'A' type pBlocks when
5887         interrupt functions are generated, code not extensively tested yet,
5888         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5889         * (genEndFunction): modified so ISRs pop stored registers from stack,
5890         * (genMultOneByte): cleanup,
5891         * (AccRsh): added flag andmask, to and result with appropriate mask,
5892         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5893         * (genDataPointerGet): fixed and reenabled its use,
5894         * (genNearDataPointerGet): bugs fixed,
5895         * (genDataPointerSet): bugs fixed,
5896         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5897         pic16_DumpSymbol, pic16_DumpOp,
5898         * src/pic16/genutils.h: function prototypes for the above functions,
5899         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5900         pointers,
5901         * (pic16emitRegularMap): many many many improvements, but needs a
5902         major cleanup,
5903         * src/pic16/main.c: enable_stack in pic16_options is removed,
5904         * (_pic16_parseOptions): removed command line options -penable-stack,
5905         * (_process_pragma): emit stack symbol only when stack pragma is
5906         processed,
5907         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5908         redirected to FSR0L/FSR0H pair,
5909         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5910         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5911         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5912         for immediates,
5913         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5914         * (dumpPicOptype): NEW,
5915         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5916         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5917         with movff instruction,
5918         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5919         added pic16_int_regs, some packRegsFor* functions are commented out,
5920         because produce errors,
5921         * src/pic16/NOTES: minor modifications
5922
5923 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5924
5925         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5926         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5927         --pack-iram.
5928         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5929         * as/mcs51/lkaomf51.c: fixed bug #895763
5930
5931 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5932
5933         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5934
5935 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5936
5937         * doc/sdccman.lyx: added details about the HC08 storage classes and
5938         interrupts, fixed the register usage info for z80 & gbz80
5939
5940 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5941
5942         * doc/sdccman.lyx: added more pic16 port documentation
5943         * device/include/pic16/: added header pic18fregs.h
5944
5945 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5946
5947         * doc/sdccman.lyx: added Vangelis' contribution
5948
5949 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5950
5951         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5952         extend to the next CALL or PCALL, not just to the next CALL.
5953
5954 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5955
5956         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5957
5958 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5959
5960         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5961         bug #895752 and a better fix for bug #716790
5962
5963 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5964
5965         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5966
5967 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5968
5969         * doc/sdccman.lyx: minor changes, minor changed
5970
5971 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5972
5973         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5974         which can't handle SDCC_NEWONEBYTEOPS,
5975         (geniCodeMultiply): removed conversion from mult to shift for pic14
5976         and pic16
5977
5978 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5979
5980         * src/hc08/gen.h,
5981         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5982         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5983         thus fixing bug #895406
5984
5985 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5986
5987         * device/lib/_modsint.c,
5988         * device/lib/_modslong.c: sign follows divisor only
5989         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5990         signs or signedness can be ignored
5991         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5992         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5993         added optimization for IFX,
5994         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5995         arguments;
5996         reenabled optimization for IFX, which was removed on 2004-01-11
5997         * src/SDCCast.h: added return type IFX
5998         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5999         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6000         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6001         SDCC_OLDONEBYTEOPS selects the old behaviour
6002         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6003         changed again and commented promotion rule
6004         * src/SDCCval.c (valDiv): promotion no longer necessary
6005         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6006         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6007         rewritten
6008         * support/regression/tests/onebyte.c: added
6009
6010 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6011
6012         * gen.c (genInline): reverted to old code for assemnling inline
6013         code because of bug reported James Chadd
6014
6015 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6016
6017         * ralloc.h: missing declarations from previous patch,
6018         seems that patch for ralloc.h was never applied, fixed
6019
6020 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6021            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6022
6023         * pcode.c,
6024         * pcode.h,
6025         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6026         indirect addressing. Marked FSR0 as deprecated
6027         * gen.c (pointerCode): commented out, not needed now
6028         (pic16_popGet2p): new MOVFF helper function
6029         (genGenPointerGet),
6030         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6031         (shiftRLong): removed duplicate debugging info
6032
6033 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6034
6035         * src/ds390/gen.c (genNearPointerGet),
6036         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6037         optimization with bits, but not bitfields.
6038         * src/ds390/ralloc.c (packRegisters),
6039         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6040
6041 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6042
6043         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6044
6045 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6046
6047         * src/SDCCsymt.h,
6048         * src/SDCCicode.c (operandFromSymbol),
6049         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6050         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6051         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6052         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6053         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6054         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6055         bug #892038
6056         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6057         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6058         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6059         * src/SDCCsymt.c (newSymbol),
6060         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6061         enumerator_list),
6062         * src/SDCCval.h,
6063         * src/SDCCval.c (newiList): fixed bug #885705
6064
6065 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6066
6067         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6068         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6069
6070 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6071
6072         * device/include/c8051f120.h,
6073         * device/include/c8051f300.h,
6074         * device/include/c8051f310.h: added/updated header files for Silicon
6075         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6076         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6077         in new section Submitting patches
6078
6079 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6080
6081         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6082         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6083         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6084         genGenPointerSet),
6085         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6086         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6087         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6088         genGenPointerSet),
6089         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6090         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6091         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6092         genGenPointerSet),
6093         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6094         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6095         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6096         genGenPointerSet): fixed bug #892400
6097         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6098         to eliminate build warnings.
6099         * src/SDCCast.c (processParms),
6100         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6101         fixed bug 751859
6102         * support/valdiag/valdiag.py: added GCC to the list of defines active
6103         when compiling with gcc
6104
6105 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6106
6107         * support/Util/SDCCerr.h,
6108         * support/Util/SDCCerr.c,
6109         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6110         with an incomplete type (fixed bug #883734)
6111         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6112
6113 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6114
6115         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6116
6117 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6118
6119         * src/SDCCast.c (decorateType),
6120         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6121         function pointer implementation
6122         * support/regression/tests/funptrs.c: added tests to verify both forms
6123         of function pointers work correctly. Added tests to verify parameters
6124         are passed in the correct order.
6125
6126 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6127
6128         * device.c (regCompare): registers are sorted by ascending
6129         address and increasing size,
6130         * main.c (_pic16_finaliseOptions): removed the declaration
6131         of compiler macro MCU. Now a macro of the format pic18fxxxx
6132         will be defined from the command line
6133
6134 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6135             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6136
6137         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6138         PCOP_RLCF was overwritten!
6139         * gen.c (genSkip): commented out calls to pic16_emitcode,
6140         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6141         * (genlshTwo),
6142         * (genRRC): added debugging info,
6143         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6144         overwritten while shifting,
6145         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6146         overwritten while shifting,
6147         * (AccLsh),
6148         * (AccRsh),
6149         * (shiftLLeftOrResult),
6150         * (shiftRLeftOrResult),
6151         * (shiftRLong),
6152         * (shiftLLong): Implemented with pic16_emitpcode
6153         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6154         * (genLeftShift): Fixed bug, operand for shift by variable always
6155         was "and"ed with 0x0f,
6156         * (genLeftShiftLiteral),
6157         * (genrshTwo),
6158         * (genRightShiftLiteral): added debugging info,
6159         * (genrshFour): added comment,
6160         * (genRightShift): determined signedness from operand "left"
6161         instead of "result"
6162
6163 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6164
6165         * src/SDCCicode.c (geniCodeParms),
6166         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6167         function pointers, fixed function pointer bugs #861242 and #861896
6168
6169 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6170
6171         * device/include/c8051f000.h,
6172         * device/include/c8051f120.h,
6173         * device/include/c8051f300.h: added header files for Silicon
6174         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6175
6176 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6177
6178         * src/SDCCast.c (processParams): added new type flow and restructured
6179         (gatherAutoInit): added new type flow
6180         (addCast): cosmetic changes
6181         (getLeftResultType): added new type flow for array indices, patch
6182         provided by Stas, see FR #877103
6183         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6184         array index patch by Stas
6185         * src/SDCCast.h: added prototype getResultTypeFromType()
6186         * src/SDCCval.h,
6187         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6188         * src/pic/glue.c (pic14emitStaticSeg),
6189         * src/pic16/glue.c (pic16emitStaticSeg),
6190         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6191         for initialization of symbols
6192         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6193         * support/Util/SDCCerr.h:
6194         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6195         * .version: bumped version number to 2.3.8
6196         * device/include/Makefile.in (install),
6197         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6198         avoid warnings
6199
6200 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6201
6202         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6203         Slade Rich fixed an optimization bug
6204         * src/pic/pcodepeep.c,
6205         * src/pic/pcoderegs.c
6206         * doc/Makefile (install): added test for directory
6207
6208 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6209
6210         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6211         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6212         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6213         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6214         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6215         * as/mcs51/asexpr.c (term),
6216         * as/hc08/asexpr.c (term): fixed bug #887146
6217
6218 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6219
6220         * src/z80/gen.c (genMult): handle single byte result product
6221         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6222         DUMMY_READ_VOLATILE (fixed bug #886367)
6223
6224 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6225
6226         * support/regression/tests/libmullong.c: fixed logic, on little endian
6227         hosts we ended without a mullong_wrapper()
6228
6229 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6230
6231         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6232         virus/worm forged address usage.
6233
6234 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6235
6236         Fixed promotion, it should be done on AST level:
6237         * src/SDCCast.c (addCast): added promotion to int
6238         (decorateType): updated call to upCast()
6239         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6240         usualUnaryConversions()
6241
6242 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6243
6244         * support/regression/tests/literalop.c (mulWrapper): Added a
6245         wrapper to remove integer overflow warnings.
6246
6247         * support/regression/tests/float_trans.c: Made work on host.
6248
6249         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6250         location of sz80.
6251
6252         * support/regression/generate-cases.py (main): Changed from inline
6253         to a main method.
6254
6255         * doc/Makefile (install): Changed to depth first to get rid of
6256         missing directory install warning.
6257
6258         * as/Makefile (install-doc): Made work on Mac.
6259
6260 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6261
6262         * src/SDCCast.c: added an additional type flow in decorateType() of
6263         opposite direction, see feature request #860006; it's enabled at runtime
6264         by setting the environment variable SDCC_NEWTYPEFLOW
6265         * src/SDCCast.h: changed prototype of decorateType()
6266         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6267         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6268         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6269         see feature request #877103
6270         * src/SDCCval.c: updated call of decorateType()
6271         (valBitwise): fixed bug #882876
6272         (valMinus): added promotion
6273         (valLogicAndOr): result is unsigned
6274         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6275         * src/SDCCsymt.c (computeType),
6276         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6277         must not cause an unsigned operation
6278         * src/pic/glue (pic14emitRegularMap),
6279         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6280
6281 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6282
6283         * src/pic/pcode.c (PCodeID): commented out left over debug code
6284
6285 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6286
6287         * support/valdiag/tests/overflow.c: added shift tests
6288         * src/pic/device.c,
6289         * src/pic/gen.c,
6290         * src/pic/gen.h,
6291         * src/pic/glue.c,
6292         * src/pic/main.c,
6293         * src/pic/pcode.c,
6294         * src/pic/pcode.h,
6295         * src/pic/pcodepeep.c,
6296         * src/pic/pcoderegs.c,
6297         * src/pic/ralloc.c,
6298         * src/pic/ralloc.h: applied patch from Slade Rich;
6299         added support for multiple code pages and multiple RAM banks on the
6300         PIC 14 port. The ASM files now no longer simply assume all the
6301         code / RAM are in the same page / bank. This means the linker can
6302         safely allocate code/RAM of separate ASM files to different pages/banks.
6303         * doc/sdccman.lyx: added Slade's tips
6304         * src/mcs51/peeph.def: fixed bug #880768
6305
6306 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6307
6308         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6309         * src/SDCCast.c (decorateType): fixed bug #880197
6310
6311 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6312
6313         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6314         getopt.h.
6315
6316         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6317         strtof is not part of C89 and isn't included with Mac OS X.
6318
6319 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6320
6321         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6322         shiftL2Left2Result): fixed bug #879326
6323         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6324         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6325         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6326         address fetch for clr instruction
6327         * device/lib/hc08/_mulint.c: created optimized assembly version
6328         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6329
6330 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6331
6332         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6333         proposed in FR #877103
6334
6335 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6336
6337         * src/SDCCval.c (cheapestVal): added missing checks
6338         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6339         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6340
6341 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6342
6343         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6344         equal operands
6345
6346 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6347
6348         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6349         loaded with the linker search paths (-L arguments) and the libraries
6350         to be linked with the current source (-l arguments). Changes
6351         currently will affect only the pic16 port.
6352         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6353         include path the port specific paths and port specific libraries,
6354         * gplink command now contains the $3 argument,
6355         * src/pic16/device.h,
6356         * src/pic16/device.c,: structure PIC_device is made public and
6357         renamed to PIC16_device, the same for variable Pics which is renamed
6358         to Pics16. Updated all references to them.
6359         * src/pic16/glue.c (pic16glue): corrected bug with code
6360         initialization which bypassed the variable initializations block.
6361
6362         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6363         COMPILE_FLAGS and added the --nostdinc option
6364
6365 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6366
6367         * device/include/mc68hc908jb8.h: Register defs for another member
6368         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6369
6370 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6371
6372         Documenting changes from previous commits.
6373         * configure.in (version 1.56),
6374         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6375         when generating output files to configure the pic16 library,
6376         but now I've commented it out, since gputils aren't installed in the
6377         SF compile farm, so library won't compile
6378
6379         * device/lib/Makefile.in (version 1.56): initially I've added in
6380         target 'all' the prerequestive 'model-pic16' so it compiled the
6381         pic16 library, but now I've commented it out for the same reasons
6382         above,
6383         * added targets 'model-pic16' and 'objects-pic16' to compile the
6384         library
6385         * added target 'port-specific-objects-pic16' to handle the
6386         generated libraries and copy them into the build/ directory
6387         * added target 'clean-intermediate-pic16' to clean intermediate
6388         files into pic16 directory
6389         * in target 'installdirs' added line to create directory pic16 in
6390         the installation path
6391
6392         * device/include/Makefile.in (version 1.11): in target 'install'
6393         added lines to copy all header files to installation path,
6394         * in target 'installdirs' added line create directory for pic16
6395         headers in the installation path
6396
6397 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6398
6399         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6400          a function call
6401
6402 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6403
6404         * configure,
6405         * device/lib/configure.in,
6406         * device/lib/configure: fixed for autoconf 2.57
6407
6408 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6409
6410         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6411         option so that it actually works. Made it specific to the z80, since
6412         the gbz80 doesn't have these kinds of I/O ports.
6413
6414 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6415
6416         * device/include/z180.h,
6417         * device/lib/_memcpy.c,
6418         * device/lib/_memmove.c,
6419         * device/lib/_mulint.c,
6420         * device/lib/ser_ir.c,
6421         * device/lib/ser_ir_cts_rts.c,
6422         * device/lib/_strcmp.c,
6423         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6424         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6425         portmode; added deprecation warning for bank= and protmode= forms.
6426         Also, guard against buffer overflow.
6427         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6428
6429 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6430
6431         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6432         changed interrupt vector table generation to only emit declared vectors.
6433         * device/include/Makefile.in: added missing backslash
6434         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6435
6436 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6437
6438         Mainly changes to support compilation of the device libraries
6439         * src/pic16/device.c: stack is allocated via symbol and not
6440         via literal number. The symbol is placed in the corresponding
6441         position of the data ram
6442         * (pic16_dump_section): relocatable and absolute uninitialized
6443         data are now emitted in sorted order to reduce section naming,
6444         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6445         weren't marked as being in the access bank,
6446
6447 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6448
6449         Added portion of GNU PIC Library under the directory
6450         device/include/pic16 and device/lib/pic16. These files
6451         contain the declarations of SFRs for the PIC18Fxx2 devices.
6452         The directory is initialized via configure from toplevel.
6453
6454 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6455
6456         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6457         the spilllocations to be compared correctly
6458
6459 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6460
6461         * src/SDCCast.c (decorateType): fixed bug introduced today
6462
6463 2004-01-12  Borut Razem <borut.razem AT siol.net>
6464
6465         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6466         doc/sdccman.lyx: upper case pragmas are deprecated
6467
6468 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6469
6470         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6471         in simpler and even better code
6472
6473 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6474
6475         * src/SDCCicode.c (operandOperation): fixed bug #874819
6476         * src/SDCCast.c (decorateType): fixed
6477         char foo (unsigned long ul) { return ul > 0; }
6478
6479 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6480
6481         * doc/sdccman.lyx: Moved and added some sections, small changes
6482         all over. Telling LaTeX to be less strict with word spacing
6483         to better keep the right margin. Changed some notes about
6484         maintainance of the ports in section 3.2.1 - is it OK like this?
6485
6486 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6487
6488         SDCC source changes:
6489         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6490         convilong): modified to inform the pic16 port that builtin functions
6491         are external
6492
6493         PIC16 PORT specific changes:
6494         * src/pic16/device.c pic16_dump_equates() added,
6495         processor registers declared internally by the port are emitted in
6496         the translation as equates,
6497         * src/pic16/gen.c: inline code is passed unprocessed to the
6498         translation,
6499         * (pic16_popGetLit2): fnuction modified to take second operand as
6500         pCodeOp pointer and not as literal,
6501         * (popRegFromIdx): prefixed with pic16_,
6502         * (pic16_popCombine2): modified to receive already allocated pCode
6503         operands,
6504         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6505         * (genFunction): initializes local stack frame and pushes on stack
6506         all the registers used by this function,
6507         * (genEndFunction): restores all registers from stack and restores
6508         stack frame,
6509         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6510         improvements,
6511         * (pic16glue): changed the program startup sequence,
6512         * added new dbName code 'A' for functions placed in absolute section
6513         * src/pic16/main.c: added function attribute _naked,
6514         * added pragma 'code' to place a fnuction at an absolute address,
6515         * added command line arguments --debug-ralloc and --pcode-verbose,
6516         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6517         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6518         * (pic16_newpCodeOpLit2): modified to take the second operand as
6519         pCodeOp pointer,
6520         * (pic16_printpBlock): modified to emit each function in a separate
6521         section,
6522         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6523         UPPER for immediate operands,
6524         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6525         instruction,
6526         * src/pic16/peeph.def: all peepholes with movff are commented out,
6527         because there is a problem in the pcode peep optimizer,
6528         * src/pic16/ralloc.c: the register allocator can now reuse local
6529         function symbols for another function. This saves register usage.
6530         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6531
6532         Added file src/pic16/NOTES with information about program writing on
6533         the current port version.
6534
6535 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6536
6537         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6538         and peephole 252 (array access)
6539
6540 2004-01-09  Borut Razem <borut.razem AT siol.net>
6541
6542         * src/SDCCmain.c : fixed #872250: -l command line defined library
6543           files are scanned before standard library files
6544
6545 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6546
6547         * src/SDCCast.c (decorateType): fixed bug #874046
6548
6549 2004-01-09  Borut Razem <borut.razem AT siol.net>
6550
6551         * support/scripts/sdcc.nsi: remove previous installation
6552
6553 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6554
6555         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6556         bytes for last interrupt vector (mcs51)
6557         * sdcc.spec: fixed typo
6558
6559 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6560
6561         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6562         gen51Code): more efficient parameter receive for --model-large
6563         ("bug" #845294)
6564
6565 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6566
6567         * src/ds390/main.c,
6568         * src/z80/main.c: added missed needLinkerScript flags (more than
6569         one port structure defined in these file)
6570         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6571         bug #795325
6572
6573 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6574
6575         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6576         * src/port.h: added flag needLinkerScript in port->linker
6577         structure to inform whether to create a .lnk file or not,
6578         * src/avr/main.c,
6579         * src/ds390/main.c,
6580         * src/hc08/main.c,
6581         * src/mcs51/main.c,
6582         * src/pic/main.c,
6583         * src/pic16/main.c,
6584         * src/xa51/main.c,
6585         * src/z80/main.c: changed appropriately to configure
6586         needLinkerScript flag
6587         * src/pic/gen.c,
6588         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6589         * src/pic/glue.c: added variable udata_section_name to
6590         override default uninitialized data segment definition for
6591         devices only with SHAREBANK memory (reported from Erik Epetrich)
6592         * (pic14emitOverlay): modified to emit a commented overlay segment
6593         directive when no overlay data exist
6594         * (picglue): modified to emit uninitialized data segment
6595         according to udata_section_name
6596         * src/pic/main.c (_pic14_parseOptions): added command line
6597         options --udata-section-name=[name] to override default
6598         udata definition name
6599         * modified _linkCmd and _asmCmd to include compiler passed
6600         arguments via -W option
6601         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6602         object file from '.rel' to '.o' in port->linker structure,
6603         changed size of fptr from 2 to 3 in port structure
6604
6605 2004-01-07  Borut Razem <borut.razem AT siol.net>
6606
6607         * support/scripts/sdcc.nsi: update PATH
6608         * support/scripts/sdcc.ico: craeted
6609
6610 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6611
6612         * device/include/Makefile.in: fix install
6613         * doc/Makefile: fix install
6614
6615 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6616
6617         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6618         in bug #860505
6619         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6620         how the function variable allocation summary is displayed; also
6621         include information about variables allocated to the overlay
6622         segment
6623
6624 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6625
6626         * as/mcs51/lkmain.c: Help about -Y option
6627         * as/mcs51/lkarea.c: Fixed gcc warnings
6628
6629 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6630
6631         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6632         fixed warning
6633         * support/valdiag/tests/overflow.c: added
6634         * src/SDCCast.c (decorateType),
6635         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6636         LEFT_OP (left shift)
6637
6638 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6639
6640         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6641         (default behaviour).
6642
6643 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6644
6645         A python script to validate compiler diagnostic messages. It can be
6646         used to verify that sdcc complains about bad c source code and
6647         gives a good location of the error.
6648         * support/valdiag/Makefile,
6649         * support/valdiag/valdiag.py,
6650         * support/valdiag/tests/*
6651
6652 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6653
6654         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6655         * src/SDCCsymt.c (newEnumType),
6656         * src/SDCCsymt.h
6657         * support/Util/SDCCerr.c,
6658         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6659         enum related bugs.
6660         * support/regression/tests/enum.c: added test for enum values that
6661         require at least 2 bytes of storage.
6662
6663 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6664
6665         * src/common.h: added ifndef/define/endif macros
6666         around the header file.
6667         Bug reported from Jesus Calvino-Fraga
6668
6669 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6670
6671         * sdcc.spec: updated
6672         * device/include/Makefile.in: don't install CVS directories
6673         * device/lib/Makefile.in: added removal of CVS directories after install
6674         * doc/Makefile: fixed install, added local_icons
6675         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6676         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6677         * src/ds390/gen.c (genRightShift): fixed bug #870788
6678         * src/SDCCast.c (decorateType): fixed bug #870781
6679
6680 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6681
6682         PIC16 port related changes:
6683         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6684         added variable stackPos,
6685
6686         * gen.c: genCall, assignResultValue: added support for
6687         pushing/retrieving function parameters to/from stack,
6688         genFunction,genEndFunction: setup stack frame for the
6689         generated function,
6690         genAddrOf: will be changed according to bug 863624
6691
6692         * added files genutils.c and genutils.h which contain gen*
6693         debugged and optimised functions extracted from gen.c
6694
6695         * glue.c: added variable 'externs' which holds extern symbols,
6696         pic16emitRegularMap: is modified to properly handle relocatable
6697          symbols under the new scheme,
6698         pic16createInterruptVect: is modified
6699         pic16printPublics: is modified to emit 'global' assembler directives,
6700         added pic16_printExterns to print extern symbols,
6701         pic16glue: initializes stack/frame pointer in the beginning of
6702         the assembly output. Temporary hack, will be corrected later,
6703         because gplink yet does not support stack and SDCC does not
6704         yet support a type of crt0.o object to create the final binary.
6705
6706         * Removed many lines that contain 8051 legacy code.
6707         * The code is finally placed under a 'code' directive.
6708         * Added port specific options.
6709
6710         * _process_pragma: simplified since now we do not need *special*
6711         include file to define SFR registers. But a separate header
6712         will be needed. This will be developed later.
6713         * _pic16_parseOptions: added, parses port specific options:
6714         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6715         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6716         --preplace-udata-with=
6717
6718         * _pic16_setDefaultOptions: modified to initialize section names,
6719         but hack is temporarly out of order since it needs improvement.
6720         * _pic16_genAssemblerPreamble: configuration words are emitted by
6721         their address instead of their name. This part is incomplete and
6722         supports only the 18Fxx2 devices. Other devices will emit an error
6723         during assembly since they do not contain the same set of config
6724         registers
6725         * _pic16_genIVT: is modified,
6726
6727         * pcode.c: added definitions for some hardware registers that are needed
6728         for stack support
6729         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6730         All PCI entries are updated. Now LFSR is supported.
6731         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6732         * added pic16_newpCodeOpLit2 to support instructions with
6733         two literal arguments
6734         * pic16_pCode2str: corrected code that emits assembler instructions
6735         with two literal operands and those that have an access bit modifier
6736         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6737         this fixes a bug which caused some labels to be lost, when an
6738         assembler directive was added, i.e. banksel,
6739         * pic16_FixRegisterBanking: improved logic that causes the insertion
6740         of bank switching,
6741         * InlineFunction: functions that are called once, are not any more
6742         inlined. This can be a port option in the future,
6743
6744         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6745
6746         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6747         hold the corresponding uninitialized symbols,
6748         * pic16_allocProcessorRegister: registers have explicit marked the
6749         accessBank field,
6750         * pic16_allocInternalRegister: registers are explicit marked as
6751         not used,
6752         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6753         processing list, so bit registers were lost,
6754         *
6755
6756         * ralloc.h: added field 'accessBank' and original symbol operand
6757         in register definition,
6758         * removed the field isMapped from register definition,
6759
6760         ** Several functions have been removed from various sources:
6761         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6762         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6763         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6764         pic16_assignRelocatableRegisters
6765
6766         ** others have been introduced:
6767         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6768         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6769
6770 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6771
6772         * support/scripts/inc2h.pl: changed definition of BIT_AT
6773         to emit 'sbit at' instead of 'bit at'. This was a request.
6774
6775         PIC16 port related preliminary changes:
6776         * gen.c: prefixed function popRegFromString with
6777         pic16_ and all references to it corrected
6778         * pcode.c: all pic16_pc_* hardware registers prefixed
6779         with underscore (_),
6780         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6781         * ralloc.c: newReg(): when register is REG_SFR then
6782         set address to rIdx,
6783         pic16_allocProcessorRegister(): marks register wasUsed=0
6784         pic16_writeUsedRegs(): added a call to assign processor
6785         registers via pic16_assignFixedRegisters
6786
6787 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6788
6789         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6790         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6791         variables in unused register banks.  Also the SSEG is placed
6792         wherever there is enough space for it, and IDATA can be anywhere
6793         in internal RAM.  For now compile using -Wl-Y[stack_size].
6794         The mem file is different for this option as well, since it
6795         makes no sense of talking about DSEG lenght.
6796
6797 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6798
6799         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6800         in certain cases, e.g. when ROM assignment, patch provided
6801         from Albert den Haan.
6802
6803 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6804
6805         Many signedness and type propagation fixes:
6806         * src/SDCCicode.c: made geniCodeCast() static
6807         replaced SPEC_ by IS_ (cosmetic)
6808         (operandOperation): fixed div and mod operation
6809         (usualBinaryConversions): added support for promotion of char
6810         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6811         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6812         (geniCodeAdd): an array index will stay unsigned, even if promoted
6813         from char to int
6814         (geniCodeArray): ditto
6815         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6816         * src/SDCCsymt.c (computeType): added more support for char;
6817         promotion of char is selectable by promoteCharToInt, fixed signedness
6818         for all cases
6819         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6820         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6821         * src/SDCCval (val*): replaced signedness calculation by
6822         computeType()
6823         rearranged if-branches (cosmetic)
6824         (valShift): added warning W_SHIFT_CHANGED
6825         (valCompare): fixed problem with different types
6826         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6827         * support/regression/tests/literalop.c: added many cases
6828         * support/regression/tests/ast_constant_folding.c: changed finally to
6829         'unsigned int'
6830         * .version: new year, new version: 2.3.7
6831         * src/SDCCmain.c (main): applied patch #866468
6832         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6833         provided by Scott Bronson
6834         * doc/sdccman.lyx: updated documentation for sdcdb
6835         updated and added chapter tips
6836
6837 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6838
6839         * src/SDCCsymt.h: missing from yesterday's commits
6840
6841 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6842
6843         * src/SDCC.y (struct_or_union_specifier),
6844         * support/Util/SDCCerr.c,
6845         * support/Util/SDCCerr.h: verify that struct & union tags are used
6846         as declared.
6847
6848 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6849
6850         * src/SDCCglobl.h: missing from yesterday's commits
6851
6852 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6853
6854         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6855         sft_attributes, struct_declaration, parameter_declaration,
6856         type_name, start_block, declaration_list),
6857         * src/SDCC.lex (check_type): support redefinition of typedef names
6858
6859 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6860
6861         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6862         aligned xdata arrays. Erik helped me with the if clause.
6863
6864 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6865
6866         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6867         warning
6868
6869 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6870
6871         * src/SDCCast.h,
6872         * src/SDCCast.c (newAst_),
6873         * src/SDCCicode.h,
6874         * src/SDCCicode.c (ast2iCode, newiCode),
6875         * src/SDCCglobl.h,
6876         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6877         expr, statement, expression_statement, selection_statement,
6878         iteration_statement, expr_opt, jump_statement): foundation for tracking
6879         sequence points
6880         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6881         point code too)
6882
6883 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6884
6885         * support/Util/SDCCerr.c,
6886         * src/SDCCast.h,
6887         * src/SDCCast.c (createCase, createDefault, decorateType),
6888         * src/SDCClabel.c (labelUnreach),
6889         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6890         to error messages.
6891         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6892         (with thanks to Stas Sergeev)
6893         * device/include/time.h,
6894         * device/lib/time.c (CheckTime): suppress unreachable code warning
6895
6896 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6897
6898         * src/SDCCast.c (createIvalCharPtr),
6899         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6900         bug #753752)
6901         * support/regression/tests/nullstring.c: tests for these two bugs
6902
6903 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6904
6905         * support/Util/SDCCerr.h,
6906         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6907         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6908         about storage class and 'at' used inside struct or union
6909         * src/SDCCBBlock.c (iCodeFromeBBlock),
6910         * src/SDCCcse.c (ifxOptimize),
6911         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6912         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6913         printIval, emitStaticSeg, emitOverlay),
6914         * src/SDCClabel.c (deleteIfx),
6915         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6916         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6917         gatherAutoInit, processParms),
6918         * support/Util/SDCCerr.h,
6919         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6920         reporting for post-parse errors.
6921
6922 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6923
6924         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6925         implicit casts via union; they don't work on big endian systems
6926         (possible fix for bug #861138)
6927
6928 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6929
6930         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6931         * src/mcs51/main.c: fixed the fix for bug #737001
6932
6933 2003-12-15  Borut Razem <borut.razem AT siol.net>
6934
6935         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6936
6937 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6938
6939         * support/makebin/makebin.c: put output in binary mode
6940
6941 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6942
6943         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6944         xdata and data memory on startup. Set the environment variable
6945         SDCC_NOGENRAMCLEAR to disable this.
6946         * src/mcs51/peephole.def,
6947         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6948         (allows non-interrupt and interrupt code to safely compete for a resource
6949         without the non-interrupt code having to disable interrupts)
6950
6951 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6952
6953         * src/SDCCicode.c (geniCodeAdd),
6954         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6955         with valFromType if type might be a pointer and host is big endian).
6956         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6957         types, not just integer types.
6958         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6959         multiply defined with mismatching "at" address.
6960
6961 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6962
6963         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6964         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6965         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6966         with embedded nulls (fixed bug #753752)
6967
6968 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6969
6970         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6971         Apparently this did not see much testing (endless loop)
6972
6973 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6974
6975         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6976
6977 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6978
6979         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6980         gracefully handle NULL memmap pointers
6981
6982 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6983
6984         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6985         instead of deleting the iCode when an operand is volatile
6986         * src/z80/gen.c (genDummyRead),
6987         * src/mcs51/gen.c (genDummyRead),
6988         * src/ds390/gen.c (genDummyRead),
6989         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6990         not just IC_RIGHT
6991         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6992         * src/SDCC.y: fixed bug #850420
6993
6994 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6995
6996         Applied z80 i/o port patch from Peter Townson and fixed some operators
6997         to better handle operands in A register.
6998         * device/include/z180.h
6999         * src/SDCC.y
7000         * src/SDCCglue.c
7001         * src/z80/gen.c
7002         * src/z80/gen.h
7003         * src/z80/main.c
7004         * src/z80/peeph-z80.def
7005         * src/z80/peeph.def
7006         * src/z80/z80.h
7007
7008 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7009
7010         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7011
7012 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7013
7014         * device/lib/hc08/_mullong.c: Removed extra #endif
7015
7016 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7017
7018         * sim/ucsim/hc08.src/inst.cc,
7019         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7020         carries from x to h
7021         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7022         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7023         * device/include/stdarg.h: fixed varargs for hc08
7024         * device/lib/Makefile.in,
7025         * device/lib/hc08/Makefile,
7026         * device/lib/hc08/_mulint.c,
7027         * device/lib/hc08/_mullong.c: fixed some endian problems
7028
7029 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7030
7031         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7032         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7033         * device/lib/_gptrget.c,
7034         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7035
7036 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7037
7038         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7039         * src/SDCCast.c (astErrors): fixed bug #846007
7040         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7041
7042 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7043
7044         * src/SDCCast.c (decorateType): disabled a transformation I added in
7045         revision 1.188 (access to fields of a structure at an absolute address);
7046         it breaks with bitfields, extern declarations, and gcse analysis.
7047         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7048         could be assigned through a pointer, so don't complain.
7049         * src/SDCCast.c (astErrors),
7050         * src/SDCCast.h,
7051         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7052
7053 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7054
7055         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7056         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7057         output of __config directives, since gpasm now supports them
7058         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7059         pre-processor macro, i.e. -DMCU=p18f452
7060         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7061         and modified to handle 'cast' icode similarly to '=' icode
7062         * src/pic16/device.h (typedef struct PIC_device): added field
7063         'extMIface' to indicate that chip has external memory interface
7064         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7065         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7066         18F8720
7067
7068 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7069
7070         * src/SDCC.y (pointer): fixed bug #846006
7071         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7072         * src/SDCCast.c (decorateType): fixed bug #846009
7073         * src/ds390/peeph.def,
7074         * src/ds390/gen.c (genAnd, genOr),
7075         * src/mcs51/peeph.def,
7076         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7077
7078 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7079
7080         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7081         * src/SDCCdflow.c
7082         * src/SDCCcse.c
7083         * src/SDCCcse.h
7084         * src/SDCCBBlock.h
7085         * src/SDCCBBlock.c
7086
7087 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7088
7089         fixed bug #845089
7090         * src/SDCCbitv.h,
7091         * src/SDCCbitv.c: added function to free a bitvector
7092         * src/SDCClrange.h,
7093         * src/SDCClrange.c: added function to recompute the liveranges
7094         * src/avr/ralloc.c,
7095         * src/ds390/ralloc.c,
7096         * src/hc08/ralloc.c,
7097         * src/mcs51/ralloc.c,
7098         * src/pic/ralloc.c,
7099         * src/pic16/ralloc.c,
7100         * src/xa51/ralloc.c,
7101         * src/z80/ralloc.c: recompute the liveranges after register packing
7102
7103 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7104
7105         * src/SDCCloop.c (newInduction): fixed bug #845630
7106
7107 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7108
7109         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7110         inadvertantly left behind from my 2003-11-12 change
7111
7112 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7113
7114         Updated headers I neglected to commit yesterday.
7115         * src/SDCClrange.h,
7116         * src/SDCCicode.h
7117
7118 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7119
7120         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7121         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7122         * src/SDCCopt.c (eBBlockFromiCode),
7123         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7124         the creation of the key hash table from the sequencing so it can be used
7125         earlier (for some GCSE bug fixes still pending)
7126
7127 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7128
7129         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7130         * support/regression/tests/addsub.c: testing genPlus shortcut
7131
7132 2003-11-15  Borut Razem <borut.razem AT siol.net>
7133
7134         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7135
7136 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7137
7138         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7139         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7140         ordering is immaterial.
7141         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7142
7143 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7144
7145         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7146         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7147         (SIGSEV) of bug #840381
7148         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7149         unlink new file before rename if new and old filenames are the same)
7150
7151 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7152
7153         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7154         uninitialized variables) for the mcs51. Set environment variable
7155         SDCC_GENRAMCLEAR to test.
7156         xdata initialization slightly shorter
7157
7158 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7159
7160         * src/SDCCsymt.h,
7161         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7162         #838241 & 780691 (basicly the same bug)
7163         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7164         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7165
7166 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7167
7168         * src/SDCCmain.c (linkEdit): "fix" #834252
7169
7170 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7171
7172         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7173         * src/SDCCast.h,
7174         * src/SDCC.y: fixed bug #819403
7175
7176 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7177
7178         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7179         the reentrant attribute.
7180         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7181         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7182         simulation
7183         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7184         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7185         erroneously reduced to a literal.
7186         * src/hc08/ralloc.c (packRegisters, rematStr),
7187         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7188         some cases
7189
7190 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7191
7192         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7193         * doc/sdccman.lyx: changed from 'article' to 'book'
7194         * doc/Makefile: readded test_suite_spec and cdbfileformat
7195
7196 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7197
7198         * device/include/stdlib.h: include malloc.h to comply with ANSI
7199         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7200
7201 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7202
7203         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7204         * doc/clean.mk: also remove *.out files
7205         * doc/sdccman.lyx: some additions, larger top/bottom margins
7206
7207 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7208
7209         * src/SDCC.y: fixed bug #837365
7210         * support/regression/tests/bitopcse.c
7211         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7212         a symbol (might be valop instead)
7213         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7214         * device/lib/clean.mk: added hc08 to the cleaning list
7215
7216 2003-11-04  Borut Razem <borut.razem AT siol.net>
7217
7218         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7219           made 2003-11-04
7220         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7221           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7222           malloc is declared in standard stdlib.h
7223
7224 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7225
7226         * device/lib/hc08/Makefile: need to clean .rel not .o files
7227         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7228
7229 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7230
7231         * src/port.h,
7232         * src/hc08/main.c,
7233         * src/mcs51/main.c,
7234         * src/ds390/main.c,
7235         * src/z80/main.c,
7236         * src/avr/main.c,
7237         * src/pic/main.c,
7238         * src/pic16/main.c,
7239         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7240         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7241         tests (which uses the port's oclsExpense function)
7242         * src/SDCC.y,
7243         * src/SDCCast.c,
7244         * src/SDCCicode.c,
7245         * src/hc08/gen.c,
7246         * src/ds390/gen.c,
7247         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7248
7249 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7250
7251         * src/SDCCcse.c (ifxOptimize),
7252         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7253         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7254         deleting the IFX iCode.
7255         * src/hc08/ralloc.c: reduced unneeded slocs
7256         * src/hc08/gen.c: fixed bug in asmopToBoolean
7257
7258 2003-11-04  Borut Razem <borut.razem AT siol.net>
7259
7260         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7261           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7262           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7263           transferred to configure
7264
7265 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7266
7267         Use headers defined in the C[++] standards:
7268         * sim/ucsim/gui.src/serio.src/fileio.cc
7269         * sim/ucsim/gui.src/serio.src/frontend.cc
7270         * sim/ucsim/gui.src/serio.src/main.cc
7271         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7272         * support/Util/NewAlloc.c
7273         * as/hc08/lklibr.c
7274         * as/mcs51/lklibr.c
7275         * as/z80/aslist.c
7276         * as/z80/assym.c
7277
7278 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7279
7280         * Added MSVC projects for hc08 assembler and linker:
7281         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7282         /as/hc08/link_hc08.dsp
7283
7284 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7285
7286         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7287
7288 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7289
7290         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7291
7292 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7293
7294         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7295
7296 2003-10-31  Borut Razem <borut.razem AT siol.net>
7297
7298         * support/cpp2/cpplib.h,
7299           support/cpp2/cpplib.c,
7300           support/cpp2/cpplex.c,
7301           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7302           to switch _asm block preprocessing on / off. Default is
7303           #pragma preproc_asm +
7304
7305 2003-10-31  Borut Razem <borut.razem AT siol.net>
7306
7307         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7308           when outputting comment blocks (when executed with -C option) and
7309           _asm (SDCPP specific) blocks
7310
7311 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7312
7313         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7314
7315 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7316
7317         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7318
7319 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7320
7321         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7322         * src/SDCCast.c (decorateType): fixed bug #832664
7323
7324 2003-10-31  Borut Razem <borut.razem AT siol.net>
7325
7326         * support\cpp2\cpplex.c: fixed for SDCPP:
7327           comments(when executed with -C option) and _asm blocks
7328           were included even if they where in skipped #if block.
7329           Applied solution from GCC cpp 3.3.2
7330
7331 2003-10-31  Borut Razem <borut.razem AT siol.net>
7332
7333         * src/SDCC.lex: sdcc now understands both formats:
7334           '# <line_number> <file_name>' and
7335           '#line <line_number> <file_name>'
7336         * support/cpp2/cppmain.c: sdcpp now generates the standard
7337           '# <line_number> <file_name>' instead of former
7338           '#line <line_number> <file_name>'
7339
7340 2003-10-30  Borut Razem <borut.razem AT siol.net>
7341
7342         * support/cpp2/cpphash.h,
7343         * support/cpp2/cpplib.h
7344         * support/cpp2/cpplex.c,
7345         * support/cpp2/cppmain.c,
7346         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7347
7348 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7349
7350         Fixed a number of problems revealed by bug #827883.
7351         * src/SDCCloop.c (loopInvariants): Spill location of the
7352         result operand should be recomputed if extracted from
7353         a loop. Also, don't extract assignments of an iTemp
7354         from a literal.
7355         * src/SDCCast.c (isConformingBody): loop reversal should
7356         not occur if the control variable is involved with a
7357         relational operator.
7358
7359 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7360
7361         * .version: bumped to 2.3.6 to reflect the big improvements
7362         made by Erik and Klaus. Thanks!
7363
7364 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7365
7366         Replaced the livrange code.
7367         * src/SDCClrange.c: added new LR code
7368         * src/SDCCloop.c,
7369         * src/SDCCBBlock.h: removed remainig parts from old LR code
7370         * src/ds390/ralloc.c,
7371         * src/ds390/gen.c: minor fixes to make it work with new code
7372
7373 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7374
7375         * as/hc08/asm.h,
7376         * as/hc08/lkrloc.c,
7377         * src/hc08/gen.c,
7378         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7379         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7380         (tweaked fix for bug #818696)
7381
7382 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7383
7384         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7385
7386 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7387
7388         * src/SDCCmain.c,
7389         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7390         * src/mcs51/gen.c (gencjneshort),
7391         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7392         more efficient (per Scott Bronson's suggestion)
7393
7394 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7395
7396         Extended the semantics of the critical keyword to include
7397         individual statements. See RFE #827755 and #799831
7398         * src/SDCC.y
7399         * src/SDCCicode.c
7400         * src/SDCCopt.c
7401         * src/SDCCast.c
7402         * support/Util/SDCCerr.c
7403         * support/Util/SDCCerr.h
7404         * src/mcs51/gen.c
7405         * src/ds390/gen.c
7406         * src/hc08/gen.c
7407
7408 2003-10-19  Borut Razem <borut.razem AT siol.net>
7409
7410         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7411
7412 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7413
7414         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7415         Fixed bug #818696
7416         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7417         and predecrement operand is displayed
7418
7419 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7420
7421         * src/SDCCval.c (valMinus): fixed bug #826041
7422
7423 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7424
7425         Some hc08 related updates that I missed earlier
7426         * sim/ucsim/stypes.h
7427         * support/regression/ports/hc08/spec.mk
7428
7429 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7430
7431         New target "hc08" for the Motorola 68hc08 family of micros
7432
7433         * configure
7434         * configure.in
7435         * Makefile
7436         * src/hc08/*
7437         * src/SDCCmain.c
7438         * src/port.h
7439         * sim/ucsim/hc08.src/*
7440         * sim/ucsim/configure.in
7441         * src/ucsim/configure
7442         * sim/ucsim/packages_in.mk
7443         * as/hc08/*
7444         * as/Makefile
7445         * device/include/mc68hc908qy.h
7446         * device/lib/hc08/*
7447         * device/lib/Makefile.in
7448         * support/regression/ports/hc08/*
7449         * support/regression/Makefile
7450
7451 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7452
7453         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7454         regression test
7455         * src/ds390/gen.c (genCast): fixed bug #821957
7456
7457 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7458
7459         * device/lib/logf.c: "fixed" overlay bug
7460         * support/regression/ports/host/spec.mk: added m library
7461         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7462         * support/regression/tests/float_trans: added (for Eric)
7463
7464 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7465
7466         * src/mcs51/gen.c (genCpl): fixed bug
7467         http://sf.net/mailarchive/message.php?msg_id=6263915
7468
7469 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7470
7471         * src/SDCCast.c (decorateType): added extended constant folding
7472         * src/SDCCsymt.c (computeType): cleanup
7473         * src/SDCCval.c (valShift): minor optimization
7474         * support/regression/tests/ast_constant_folding.c: added
7475
7476 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7477
7478         * src/SDCCmain.c: removed some unintended changes
7479
7480 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7481
7482         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7483         * src/z80/gen.c: fixed part of bug #817589
7484         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7485
7486 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7487
7488         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7489         * src/SDCCcflow.c
7490         * src/SDCCcse.c
7491         * src/SDCCdflow.c
7492         * src/SDCClabel.c
7493         * src/SDCClrange.c
7494         * src/SDCCmem.c
7495         * src/SDCCopt.c
7496         * src/SDCCpeeph.c
7497         * src/SDCCset.c
7498         * src/avr/ralloc.c
7499         * src/ds390/ralloc.c
7500         * src/izt/ralloc.c
7501         * src/mcs51/ralloc.c
7502         * src/pic/ralloc.c
7503         * src/pic16/ralloc.c
7504         * src/xa51/ralloc.c
7505         * src/z80/ralloc.c
7506         * src/z80/gen.c: removed unused label "release:"
7507
7508 2003-10-06  Borut Razem <borut.razem AT siol.net>
7509
7510         * src/SDCC.lex: removed definition of unused variables
7511           save_optimize and save_options
7512
7513 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7514
7515         * clean.mk: removed '=' in "-maxdepth=1"
7516         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7517         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7518
7519 2003-10-06  Borut Razem <borut.razem AT siol.net>
7520
7521         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7522           my_unput() replaced by unput()
7523
7524 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7525
7526         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7527         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7528         type-punned pointer will break strict-aliasing rules"
7529         Old LR behaviour is again default; Klaus' LR can be choosen by
7530         defining the environment variable LRKLAUS
7531         * src/SDCCBBlock.h
7532         * src/SDCCloop.c
7533         * src/SDCClrange.c
7534         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7535         * clean.mk: fixed removal of files in bin/CVS/
7536         * device/lib/clean.mk: fixed removal of directories small and large
7537         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7538         * src/SDCCicode.c,
7539         * src/SDCCval.c: removed superflous test for pedantic
7540
7541 2003-10-05  Borut Razem <borut.razem AT siol.net>
7542
7543         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7544           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7545           message "unmatched #pragma SAVE and #pragma RESTORE"
7546
7547 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7548
7549         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7550           assembly, critical functions, atomic, nojtbound)
7551
7552 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7553
7554         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7555         * src/SDCCBBlock.h
7556         * src/SDCCloop.c
7557         * src/SDCCloop.h
7558         * src/SDCClrange.c
7559
7560 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7561
7562         * src/z80/gen.h,
7563         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7564         * src/mcs51/gen.h
7565         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7566         * src/ds390/gen.h
7567         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7568         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7569         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7570
7571 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7572
7573         * src/z80/gen.c (genRet): fixed bug #524753
7574         * src/z80/gen.c (genCast): fixed internal error on cast from
7575         pointer to long
7576         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7577         fix for bug #477835 to the z80
7578         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7579         for tracking iCodes in the peephole optimizer for z80
7580
7581 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7582
7583         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7584         the other part of bug #814548
7585         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7586
7587 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7588
7589         * src/SDCCcse.c: fixed part of bug #814548
7590
7591 2003-09-28  Borut Razem <borut.razem AT siol.net>
7592
7593         * src/asm.c: rewrite of printILine() to use temporary file instead
7594           a pipe
7595         * src/xa51/main.c: commented out declaration of int rewinds
7596
7597 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7598
7599         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7600
7601 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7602
7603         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7604         * src/asm.c (printILine): Fixed bug #811015
7605
7606 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7607
7608         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7609         freeing.
7610
7611 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7612
7613         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7614         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7615         to correctly handle general case of AOP_PAIRPTR
7616         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7617
7618 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7619
7620         * src/mcs51/ralloc.c (fillGaps),
7621         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7622         register positioning bug)
7623
7624 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7625
7626         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7627
7628 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7629
7630         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7631         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7632         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7633         (ralloc doesn't intentionally do this now, but perhaps later)
7634         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7635         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7636         register positioning bugs (Fixed bug #762602 and #795325)
7637         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7638         (Fixed bug #808779)
7639         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7640         lines that --i-code-in-asm generates
7641
7642 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7643
7644         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7645         trying to fclose a FILE* that was already closed.
7646
7647 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7648
7649         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7650         of const struct should be treated as if const themselves)
7651
7652 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7653
7654         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7655
7656 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7657
7658         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7659         Unix (/n) and DOS (/r/n) line terminations.
7660
7661 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7662
7663         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7664         bug #613775
7665
7666 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7667
7668         * src/mcs51/gen.c (genFunction, genEndFunction),
7669         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7670         and restore of EA so that stack offsets to parameters are
7671         correct when using both critical and reentrant/stack-auto.
7672         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7673         size (can be triggered in error if sloc is shared between
7674         different sized objects)
7675         * device/include/float.h: fixed macros to explicitly use
7676         unsigned long where needed
7677
7678 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7679
7680         Feature req. 799831: added code to allow nesting of critical functions
7681         * src/mcs51/gen.c (genFunction, genEndFunction)
7682         * src/ds390/gen.c (genFunction, genEndFunction)
7683
7684 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7685
7686         * src/SDCCsymt.c (sclsFromPtr),
7687         * src/SDCCsymt.h,
7688         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7689         support for standard C idiom of memory mapped variables; for
7690         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7691         to xdata int at 0x1234 tempvar = 1.
7692         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7693         provided by Akiya ISHIDA
7694
7695 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7696
7697         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7698         * src/SDCCval.c (constVal): added reduction from int to char
7699         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7700         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7701         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7702         to ignore the sign
7703         * support/regression/tests/shifts.c: fixed
7704
7705 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7706
7707         * src/z80/gen.c (genXor): Fixed bug #805445
7708
7709 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7710
7711         Fixed bug #621531 (const & volatile confusion in the type chain).
7712         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7713         refer to the const or volatile state of the pointer itself.
7714
7715         * src/SDCCast.c
7716         * src/SDCCglue.c
7717         * src/SDCCicode.c
7718         * src/SDCCsymt.c
7719         * src/SDCCval.c
7720         * src/SDCC.y
7721         * src/SDCCsymt.h
7722         * src/pic/gen.c
7723         * src/pic/ralloc.c
7724         * src/pic16/gen.c
7725         * src/pic16/ralloc.c
7726         * support/regression/tests/const.c
7727
7728 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7729
7730         When checking for duplicated modules, use absolute paths
7731         instead of relative paths.  Files changed:
7732
7733         * as/mcs51/lklib.c
7734         * link/z80/lklib.c
7735
7736 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7737
7738         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7739
7740 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7741
7742         * device/include/string.h: added size_t typedef, changed
7743         prototypes to use size_t, eliminated separate reentrant and
7744         non-reentrant declarations, added _memmove declaration
7745         * device/lib/_memcpy.c: changed to use size_t instead of int,
7746         changed /4 to >>2 to avoid division library call
7747         * device/lib/_memcmp.c,
7748         * device/lib/_memset.c,
7749         * device/lib/_strncat.c,
7750         * device/lib/_strncpy.c,
7751         * device/lib/_strncmp.c: changed to use size_t instead of int
7752         * device/lib/_memmove.c: new file (fixed bug #772294)
7753         * device/lib/Makefile.in: added _memmove.c
7754         * device/lib/z80/asm_strings.s: fixed bug #772290
7755         * support/regression/tests/bitfields.c: attempt to fix host assertion
7756         failure on amd64-unknown-linux2.2
7757
7758 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7759
7760         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7761         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7762         * as/z80/asmain.c (main): fixed bug #801766
7763
7764 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7765
7766         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7767         compilers
7768
7769 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7770
7771         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7772         reported in bug #800609
7773
7774 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7775
7776         * Top header beautifications in src/pic16 directory:
7777           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7778           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7779           pcoderegs.h, ralloc.c, ralloc.h
7780         * main.c: added top header and GPL license notice
7781         * pcode.c: fixed the if-conditional warning
7782
7783 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7784
7785         * device/lib/_mullong.c: replaced int by short for gcc
7786
7787 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7788
7789         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7790         and JUMPTABLE iCodes properly now (worked by accident before)
7791         * src/mcs51/gen.c (leftRightUseAcc),
7792         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7793         iCode properly now. Use getSize instead of nRegs since a & b
7794         aren't part of the nRegs tally.
7795
7796 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7797
7798         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7799         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7800           before instructions that use the _STATUS register
7801
7802 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7803
7804         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7805         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7806         fetching of the pointer
7807         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7808         copied from genNearPointerSet()
7809         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7810         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7811         If they pop r0/r1 they must be called in the opposite order than aopOp().
7812         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7813         (resp. --stack-auto), prepared for --xstack
7814
7815 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7816
7817         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7818
7819 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7820
7821         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7822         these ports have their own __sdcc_external_start()
7823
7824 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7825
7826         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7827         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7828         type for bits was changed. It resulted in bit variables becoming
7829         global, which is not permitted in PIC 14 assembly output.
7830
7831 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7832
7833         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7834
7835 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7836
7837         Z80 and MCS51 linkers complaint if a public symbol is defined
7838         in more than one library module:
7839
7840         * as/mcs51/lklib.c
7841         * link/z80/lklib.c
7842         * as/mcs51/Makefile.in
7843
7844 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7845
7846         A few small changes that speed up the peephole optimizer.
7847
7848         * src/SDCCpeeph.c
7849
7850 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7851
7852         Try to make the peephole optimizer smarter by maintaining
7853         an association between the assembly source code and the
7854         iCodes that originated them. Put this information to use
7855         with a new peephole rule condition "notVolatile" so that
7856         the rules can be aggressive yet still safe.
7857
7858         * src/SDCCpeeph.c
7859         * src/SDCCpeeph.h
7860         * src/mcs51/gen.c
7861         * src/mcs51/peeph.def
7862
7863 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7864
7865         Fixed bug #741761
7866
7867         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7868         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7869         if the left or right operand symbols have the accuse flag set.
7870
7871 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7872
7873         Changed the type of the result of the ! (NOT) operator to char;
7874         previously it returned the same type as the source. This allows
7875         us to eliminate all the genFloatNot functions (all of its target
7876         implementations were very buggy) since !float can use the same
7877         code as !long now.
7878
7879         * src/SDCCicode.c (ast2iCode): ! returns char
7880         * src/mcs51/gen.c (genNot, genNotFloat),
7881         * src/ds390/gen.c (genNot, genNotFloat),
7882         * src/z80/gen.c (genNot, genNotFloat),
7883         * src/pic/gen.c (genNot, genNotFloat),
7884         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7885
7886 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7887
7888         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7889         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7890            during interrupts. Ensure WSAVE is located at a shared bank address.
7891         2. Fixed page selection in some places
7892         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7893            the registers name strings.
7894         4. Fixed "signed / unsigned compare" compiler warnings.
7895         5. The PIC port manages its own allocation of the general purpose
7896            registers, but makes no attempt to reuse them. As a result when
7897            compiling it soon runs out of general purpose registers. Some
7898            additional code was added to the files pcode.c and device.c to walk
7899            through the function call tree and rename the registers so that they
7900            get reused.
7901
7902         * src/pic/device.c
7903         * src/pic/gen.c
7904         * src/pic/glue.c
7905         * src/pic/pcode.c
7906         * src/pic/pcode.h
7907         * src/pic/ralloc.c
7908         * src/pic/ralloc.h
7909         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7910         genPlus() & genMinus() when the result is the same as left or right
7911
7912 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7913
7914         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7915
7916 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7917
7918         Made bitfield a distinct type from bit so that bitfields
7919         convert as per ANSI C and bits retain their traditional
7920         boolean style behaviour. Implemented bitfield support in
7921         the z80 port.
7922
7923         * src/SDCCsymt.h,
7924         * src/SDCCsymt.c,
7925         * src/SDCCast.c,
7926         * src/cdbFile.c,
7927         * src/mcs51/gen.c,
7928         * src/ds390/gen.c: bit v bitfield split
7929         * src/z80/gen.c: New support for bitfields
7930         * support/regression/tests/bitfields.c: reenabled z80,
7931         added more tests
7932
7933 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7934
7935         Rules 246.x, 247.x relate to bitfields, the others speed up
7936         access to xdata mapped I/O devices.
7937
7938         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7939
7940 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7941
7942         Cleaned up genPackBits and genUnpackBits and added two helper
7943         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7944         for literal assignments in genPackBits (thanks to Frieder for
7945         reminding me).
7946
7947         * src/mcs51/gen.c
7948         * src/ds390/gen.c
7949
7950 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7951
7952         Fixed bug #748310 (pointer to function type mishandled when the
7953         function name is omitted). Also fixed a SIGSEGV when a function
7954         attribute (reentrant, etc) is used on a non-function or on a
7955         function but misplaced before the parameter list.
7956
7957         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7958         bug #748310
7959         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7960         * support/Util/SDCCerr.h,
7961         * support/Util/SDCCerr.c: Added func attr misuse error msg
7962
7963 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7964
7965         Fixed bug #787649 by anonymous
7966         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7967         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7968
7969 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7970
7971         Fixed numerous bitfield problems.
7972
7973         * src/SDCC.y: More bitfield related error checking
7974         * src/SDCCsymt.h,
7975         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7976         * support/Util/SDCCerr.h,
7977         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7978         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7979         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7980         * support/regression/tests/bitfields.c: tests added
7981
7982 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7983
7984         Made the constant following the "interrupt" keyword optional. If
7985         omitted, the function will not automatically be given an entry
7986         in the interrupt vector table (similar to #pragma NOIV, but
7987         less syntacticly kludgy). The interrupt number is also now
7988         range checked. Also fixed a bug in the high order bit example
7989         in the manual.
7990
7991         * src/SDCC.y
7992         * src/SDCCmem.c
7993         * src/SDCCglue.c
7994         * src/SDCCsymt.h
7995         * support/Util/SDCCerr.c
7996         * support/Util/SDCCerr.h
7997         * doc/sdccman.lyx
7998
7999 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8000
8001         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8002         * src/SDCCicode.c (operandOperation): rewritten some ops
8003         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8004         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8005         other type
8006         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8007         be re-activated by defining REDUCE_LITERALS)
8008         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8009         unsigned, but are signed by default
8010         * src/SDCCval.c (constVal): rearranged
8011         * src/SDCCval.c (valMod): preliminary fix
8012         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8013         * support/regression/literalop.c: added, work in progress
8014
8015 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8016
8017         Generate warnings for useless declarations like "char data;"
8018         that don't do what new users expect.
8019
8020         * src/SDCC.y
8021         * support/Util/SDCCerr.h
8022         * support/Util/SDCCerr.c
8023
8024 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8025
8026         * src/SDCCval.c (valMult): fix overflow detection of negative int
8027
8028 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8029
8030         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8031
8032         Changes to support big endian targets:
8033
8034         * src/ports.h
8035         * src/SDCCglue.c
8036         * src/avr/main.c
8037         * src/ds390/main.c
8038         * src/izt/i186.c
8039         * src/mcs51/main.c
8040         * src/pic/main.c
8041         * src/pic16/main.c
8042         * src/xa51/main.c
8043         * src/z80/main.c
8044
8045 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8046
8047         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8048         * device/lib/time.c: fixed warning "integer overflow in expression"
8049
8050 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8051
8052         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8053         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8054         constants are unsigned; added recognition of "u" flag for unsigned
8055         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8056         * src/SDCCval.c (valDiv, valMod): fixed signdness
8057         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8058         signedness of modulo, left and right shift
8059         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8060         * support/Util/SDCCerr.h: added warning W_INT_OVL
8061         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8062         * src/SDCCast.c (ast_print): improved output of constants
8063
8064 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8065
8066         Fixed some warnings when building with MSVC:
8067
8068         * as\mcs51\asdata.c
8069         * as\z80\asdata.c
8070         * as\mcs51\asm.h
8071         * as\z80\asm.h
8072         * link\z80\aslink.h
8073         * link\z80\lkdata.c
8074         * link\z80\lkeval.c
8075         * link\z80\lkgb.c
8076         * link\z80\lkihx.c
8077         * link\z80\lks19.c
8078         * link\z80\lksym.c
8079         * support\cpp2\cpplib.c
8080         * src\ds390\gen.c
8081         * src\mcs51\gen.c
8082
8083 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8084
8085         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8086
8087 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8088
8089         * support\librarian\clean.mk: Do not remove Makefile.
8090         * support\librarian\Makefile: added.
8091
8092 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8093
8094         Added librarian to MSVC build:
8095         * all.dsp
8096         * sdcc.dsw
8097         * support\librarian\librarian.dsp
8098
8099         'configure' not needed for librarian, removed:
8100         * support\librarian\configure
8101         * support\librarian\configure.in
8102         * support\librarian\config_in.h
8103         * support\librarian\Makefile.in
8104
8105         Hopefully these ones built the librarian and the rest of sdcc properly:
8106         * Makefile
8107         * Makefile.common.in
8108
8109         Messed up 'configure', so revert to previous version:
8110         * configure
8111         * configure.in
8112
8113 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8114
8115         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8116         there, while the mantissa of a double is "only" 53 bits wide.
8117
8118 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8119
8120         Adding sdcclib to the build.  MSVC project coming soon.
8121         Files added/changed:
8122
8123         * support\librarian\clean.mk
8124         * support\librarian\configure
8125         * support\librarian\configure.in
8126         * support\librarian\config_in.h
8127         * support\librarian\Makefile.bcc
8128         * support\librarian\Makefile.in
8129         * support\librarian\sdcclib.c
8130         * Makefile.bcc
8131         * Makefile
8132         * Makefile.common.in
8133         * configure
8134         * configure.in
8135
8136 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8137
8138         Linker now complaints if linked modules have conflicting options, for
8139         example, one compiled using --model-large and another one compiled with
8140         --model-small.  The following files were modified:
8141
8142         * as\mcs51\asdata.c
8143         * as\mcs51\aslink.h
8144         * as\mcs51\asm.h
8145         * as\mcs51\asmain.c
8146         * as\mcs51\asout.c
8147         * as\mcs51\i51pst.c
8148         * as\mcs51\lkdata.c
8149         * as\mcs51\lklibr.c
8150         * as\mcs51\lkmain.c
8151         * as\z80\asdata.c
8152         * as\z80\asm.h
8153         * as\z80\asmain.c
8154         * as\z80\asout.c
8155         * as\z80\z80pst.c
8156         * link\z80\aslink.h
8157         * link\z80\lkdata.c
8158         * link\z80\lklibr.c
8159         * link\z80\lkmain.c
8160         * src\SDCCglue.c
8161
8162 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8163
8164         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8165         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8166
8167 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8168
8169         * src/z80/mappings.i: fix _mul[us][int,long] entries
8170
8171 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8172
8173         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8174
8175 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8176
8177         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8178         * support/regression/tests/bitopcse.c: added
8179         fixed warning:
8180         * src/avr/gen.c:
8181         * src/pic/gen.c:
8182         * src/pic16/gen.c:
8183         * src/z80/gen.c:
8184         * src/xa51/gen.c:
8185
8186 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8187
8188         added support for new library format to z80, gbz80 linkers:
8189         *link/z80/aslink.h
8190         *link/z80/lklex.c
8191         *link/z80/lklib.c
8192         *link/z80/lklist.c
8193
8194 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8195
8196         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8197         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8198
8199 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8200
8201         added DUMMY_READ_VOLATILE:
8202         * src/SDCC.y:
8203         * src/avr/gen.c:
8204         * src/xa51/gen.c:
8205         * src/z80/gen.c:
8206         * src/pic/gen.c:
8207         * src/pic16/gen.c:
8208         * src/mcs51/gen.c:
8209         * src/ds390/gen.c:
8210         * src/SDCCcse.c (algebraicOpts): many improvements
8211         * src/SDCCcse.h: removed algebraicOpts()
8212         * src/SDCCicode.c (picDummyRead): added
8213
8214 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8215
8216         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8217         "Insufficient space in data memory".
8218
8219 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8220
8221         * src/mcs51/gen.c: fixed bug #771358
8222         * src/z80/gen.c: fixed bug #759087
8223
8224 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8225
8226         * src/pic16/glue.c: minor cleanup by Vangelis
8227
8228 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8229
8230         * device/include/regc515c.h: fixed #758477
8231         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8232         * device/lib/_gptrput.c: saved a few bytes
8233         * my tab spacing is 8, yours too?)
8234         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8235         * device/lib/serial.c: process RX bytes earlier than TX bytes
8236         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8237
8238 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8239
8240         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8241
8242 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8243
8244     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8245
8246 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8247
8248         * device/lib/Makefile.in: bad fix, reverted to 1.43
8249
8250 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8251
8252         * device/lib/Makefile.in: added missing z80 object files
8253
8254 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8255
8256         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8257         pic16 progress by Vangelis:
8258         * src/SDCCglobl.h:
8259         * src/SDCCmain.c:
8260         * src/pic/Makefile:
8261         * src/pic:
8262         * pic/Makefile:
8263         * pic16/device.c:
8264         * pic16/device.h:
8265         * pic16/gen.c:
8266         * pic16/gen.h:
8267         * pic16/genarith.c:
8268         * pic16/glue.c:
8269         * pic16/main.c:
8270         * pic16/pcode.c:
8271         * pic16/pcode.h:
8272         * pic16/pcodepeep.c:
8273         * pic16/peeph.def:
8274
8275 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8276
8277     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8278
8279 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8280
8281     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8282     added gbz80 build to MSVC project.
8283     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8284     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8285     from 8051 stuff and setup so it links using a .lnk file.
8286
8287 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8288
8289     * support/librarian/sdcclib.c: sdcc librarian.
8290     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8291     with sdcclib.
8292
8293 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8294
8295     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8296
8297 2003-07-02  Borut Razem <borut.razem AT siol.net>
8298
8299         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8300         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8301         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8302         src/xa51/main.c, src/z80/main.c:
8303         virtualization of glue() function: each port has it's own glue function,
8304         which is accessed by do_glue function pointer in PORT.general structure
8305
8306 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8307
8308         * DS800C400 fun, improved ROM interface and tinibios.
8309
8310 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8311
8312         * More support for DS80C400. Now includes beginning of interface to ROM.
8313
8314 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8315
8316         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8317
8318 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8319
8320         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8321
8322 2003-06-19  Borut Razem <borut.razem AT siol.net>
8323
8324         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8325
8326 2003-06-19  Borut Razem <borut.razem AT siol.net>
8327
8328         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8329         fixed Z80 port - crt0.o: cannot open.
8330
8331 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8332
8333         * support/Util/MySystem.c (merge_command): revert bad fix
8334
8335 2003-06-18  Borut Razem <borut.razem AT siol.net>
8336
8337         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8338
8339 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8340
8341         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8342         option --use-stdout sends errors to stdout instead of stderr.
8343
8344 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8345
8346         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8347
8348 2003-06-15  Borut Razem <borut.razem AT siol.net>
8349
8350         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8351         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8352         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8353         fixed width array of pointers replaced with sets;
8354         multiple include and lib paths ared transferred to preprocessor and linker
8355         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8356         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8357         fixed width array of pointers
8358         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8359         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8360         fixupPath(), getPathDifference()
8361         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8362         fixed width array of pointers
8363
8364 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8365
8366         * src/pic16/ralloc.c: fix warnings
8367         * src/pic16/pcode.c: fix warning
8368
8369 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8370
8371          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8372         know all the details, but essentially this set of changes enable
8373         the pic16 port to generate movff instructions and generate assembler
8374         directives,
8375         * src/SDCCmain.c:
8376         * src/pic16/gen.c:
8377         * src/pic16/glue.c:
8378         * src/pic16/pcode.c:
8379         * src/pic16/device.c:
8380         * src/pic16/main.c:
8381         * src/pic16/pcode.h:
8382         * src/pic16/pcoderegs.c:
8383         * src/pic16/ralloc.c:
8384         * src/pic16/ralloc.h:
8385
8386 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8387
8388         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8389         added option --vc, so sdcc errors and warnings are compatible with
8390         Microsoft Visual Studio.
8391
8392 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8393
8394         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8395           device/lib/libfloat.lib: added atof function.
8396
8397 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8398
8399         * doc/sdccman.lyx: updated to Lyx 1.3
8400         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8401         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8402         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8403
8404 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8405
8406         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8407
8408 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8409
8410         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8411           additions to the "related tools/documentation" section
8412
8413 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8414
8415         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8416
8417 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8418
8419         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8420         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8421
8422 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8423
8424         * doc/sdccman.lyx: fix double dash and other minor things
8425         * doc/Makefile: fix double dash
8426
8427 2003-05-28  Karl Bongers(patches from Martin Helmling)
8428         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8429           condition and ignore commands.
8430
8431 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8432
8433         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8434           is in parts still quite out of date, I did changes as far as I felt makes sense
8435           for a non-native english speaker.
8436           Please feel free to add to the manual or to correct my changes.
8437         * doc/Makefile: undid touching the date of intermediate tex files.
8438
8439 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8440
8441         * doc/sdccman.lyx: Manual has an index now
8442
8443 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8444
8445         Finalize muluint/mulsint and mululong/mulslong merging:
8446         * device/lib/_mulint.c
8447         * device/lib/_mullong.c
8448         * device/lib/gbz80/mul.s
8449         * device/lib/gbz80/stubs.s
8450         * device/lib/z80/mul.s
8451         * device/lib/z80/stubs.s
8452         * src/SDCCsymt.c (initCSupport)
8453
8454 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8455
8456         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8457         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8458           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8459           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8460           instead of /Zm500.
8461
8462 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8463
8464         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8465           the regression tests I'm not brave enough to enable 245.b, 245.c
8466         * doc/sdccman.lyx: added latex preamble for hyperref package.
8467           Using pdflatex this will give you a hyperlinked pdf file with
8468           bookmarks. (prepend '%' before /usepackage if this breaks something)
8469
8470 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8471
8472          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8473
8474 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8475
8476         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8477
8478 2003-05-21    <johan AT balder>
8479
8480         * src/SDCCglue.c (printIval): fixed bug #739934
8481
8482 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8483
8484         Applied patch from bug 737905 (renamed yylineo to mylineno):
8485         * src/altlex.c
8486         * src/SDCCast.c
8487         * src/SDCglobl.h
8488         * src/SDCC.lex
8489         * src/SDCCsymt.c
8490         * src/SDCCval.c
8491         * src/pic16/pcode.c: Cleaned warnings
8492         * src/pic16/pcodeflow.c: Cleaned warnings
8493         * src/pic16/pcoderegs.c: Cleaned warnings
8494
8495 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8496
8497         * src/pic16/pcode.c: Cleaned warnings
8498         * src/pic16/pcodepeep.c: Cleaned warnings
8499         * src/pic16/ralloc.c: Cleaned warnings
8500
8501 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8502
8503         * doc/sdccman.lyx: fixed bug 739745
8504         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8505
8506 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8507
8508         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8509         it can be defined with CFLAGS when running configure
8510         * src/SDCCmain.c: fixed compiling + linking with object files
8511
8512 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8513
8514         * configure.in: configure for pic16 port,
8515             added --disable-pic16-port
8516         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8517         * src/SDCCmain.c: linkOptions is changed to set *,
8518             added if/endif conditional macros to remove options help
8519             messages from optionsTable when a port is not configured, added
8520             support for the PIc16 port in the ports table, when executing
8521             the compiler with no port specified on command line, a default
8522             port is selected with the new macro DEFAULT_PORT which is
8523             defined in port.h, in setDefaultOptions() linkOptions is removed
8524             from initialization assignment, since now it is a set,
8525             parseCmdLine uses setParseWithComma for linkOptions, in
8526             linkEdit() linkOptions are accessed with new function indexSet()
8527             which returns the i'th item of a set variable. See SDCCset.c, in
8528             linkEdit() when calling buildCmdLine(), added linkOptions as
8529             last argument. Now users can pass arguments to gplink via the
8530             -Wl option, main() uses pic16glue() to glue up pic16 programs
8531         * src/SDCCpeeph.c: various changes to support pic16
8532         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8533             return the i'th item of the set
8534         * src/SDCCset.h: added function prototype for indexSet()
8535         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8536         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8537         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8538             added macro DEFAULT_PORT
8539         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8540         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8541             generated
8542         * src/pic16/glue.c: commented out some error producing lines
8543         * src/pic16/main.c: __config directives are commented out to stop
8544             gpasm complaining and test the linkage with gplink, _linkCmd and
8545             _asmCmd changed to be more gplink and gpasm friendly
8546         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8547             produced an error when parsed, peep rule 12 is added to utilize
8548             movff, but it is commented out since the pCode does not support
8549             yet a command with 2 address arguments
8550
8551 2003-05-18    <johan AT balder>
8552
8553         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8554         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8555 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8556
8557         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8558   Added feature to script commands from file.
8559
8560 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8561
8562         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8563         * src/SDCCutil.c: include ctype.h for win32
8564
8565 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8566
8567         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8568
8569 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8570
8571         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8572   Fixed so you can set breakpoints prior to run, run does not stop
8573   on entry now.  Add tbreak.  Other enhancements and fixes for use
8574   with ddd.
8575
8576 2003-05-12  Borut Razem <borut.razem AT siol.net>
8577
8578         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8579
8580 2003-05-11  Borut Razem <borut.razem AT siol.net>
8581
8582         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8583         the path of bin directory, so that PATH is the only env. variable, which has to be set
8584         in case of standard installation.
8585         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8586         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8587         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8588
8589 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8590
8591         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8592         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8593         temp files are in the port dir; clean the gen/test directory when
8594         generating new test.c
8595         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8596         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8597         * support/regression/tests/zeropad.c: added
8598
8599 2003-05-09    <johan AT balder>
8600
8601         * src/SDCCglue.c: fixed bug #597940
8602
8603 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8604
8605         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8606   cache sfr, optimize next,step, fix off by one sourceline,
8607   support ddd list function.
8608         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8609
8610 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8611
8612         * support/regression/HTMLgen.py: added compare_s2f()
8613         * support/regression/Makefile: redo 1.27
8614         * support/regression/generate-cases.py: redo 1.5
8615
8616 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8617
8618         * support/regression/tests/float.c: workaround 33 bit hex constant
8619         * support/regression/tests/simplefloat.c: fix division for host
8620
8621 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8622
8623         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8624         that tame's the PIC's over-aggressive optimizer.
8625
8626 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8627
8628          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8629          support for MSVC.
8630
8631 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8632
8633         Initial support for DS80C400. "Hello world" runs on TINIm400
8634         (with polled I/O).
8635
8636 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8637
8638          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8639          * Some notes on ddd usage added in debugger/README
8640          Martin Helmling adding more features and fixes for ddd GUI debugger.
8641          Code added for nexti, stepi, up, down, and other adjustments.
8642
8643 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8644
8645         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8646         * src/pic/peeph.def Added two rules to optimize carry manipulation
8647         * src/pic/* removed debug printfs
8648
8649 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8650
8651         * debugger/mcs51/cmd.c: added header newalloc.h
8652
8653 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8654
8655         * as/Makefile: new EXEEXT
8656         * as/z80/Makefile: remove trailing slash of BUILDIR
8657         * as/z80/clean.mk: new EXEEXT
8658         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8659         * support/cpp2/Makefile.in: new EXEEXT
8660         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8661
8662 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8663
8664         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8665         EXEEXT was introduced to fix all related problems with targets
8666         "clean", "install" and "uninstall"; a couple of further flaws
8667         especially with "clean" have been fixed too
8668         * as/mcs51/Makefile.in
8669         * as/mcs51/clean.mk
8670         * as/z80/Makefile
8671         * Makefile
8672         * clean.mk
8673         * debugger/mcs51/Makefile.in
8674         * debugger/mcs51/clean.mk
8675         * link/z80/Makefile
8676         * link/z80/Makefile.in
8677         * link/z80/clean.mk
8678         * link/Makefile
8679         * packihx/Makefile.in
8680         * packihx/clean.mk
8681         * sim/ucsim/Makefile
8682         * sim/ucsim/clean.mk
8683         * sim/ucsim/avr.src/Makefile.in
8684         * sim/ucsim/avr.src/clean.mk
8685         * sim/ucsim/s51.src/Makefile.in
8686         * sim/ucsim/s51.src/clean.mk
8687         * sim/ucsim/xa.src/Makefile.in
8688         * sim/ucsim/xa.src/clean.mk
8689         * sim/ucsim/z80.src/Makefile.in
8690         * sim/ucsim/z80.src/clean.mk
8691         * sim/ucsim/main_in.mk
8692         * sim/ucsim/packages_in.mk
8693         * sim/ucsim/gui.src/Makefile.in
8694         * sim/ucsim/gui.src/serio.src/Makefile.in
8695         * sim/ucsim/gui.src/serio.src/clean.mk
8696         * src/Makefile.in
8697         * src/clean.mk
8698         * support/cpp2/Makefile.in
8699         * support/cpp2/clean.mk
8700         * support/makebin/Makefile
8701         * support/makebin/clean.mk
8702         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8703         * doc/sdccman.lyx: --program-suffix no longer needed
8704
8705 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8706
8707          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8708          Martin Helmling added support for ddd GUI debugger.
8709          Code added to display assembly, set variables, and other commands
8710          to interface to ddd.
8711
8712 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8713
8714         * as/Makefile: fix target clean
8715         * as/clean.mk: fix target clean
8716         * as/z80/clean.mk: fix target clean
8717
8718 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8719
8720         * Makefile.common.in: added  AT EXEEXT AT
8721         * configure.in: removed all mingw32 stuff
8722         * configure: rebuilt from configure.in
8723         * doc/sdccman.lyx: updated section "installation"
8724         * support/scripts/sdcc_mingw32: adapted to configure
8725         * support/scripts/sdcc_cygwin_mingw32: added
8726
8727 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8728
8729         * src/pic Added object file support for the PIC port
8730         * src/pic Applied patch from Craig Franklin (this started the object file support)
8731         * src/regression Updated the PIC regression tests for object files
8732
8733 2003-04-20  Borut Razem <borut.razem AT siol.net>
8734
8735         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8736           lklex.c: In function `getfid':
8737           lklex.c:203: warning: array subscript has type `char'
8738         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8739           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8740         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8741           stack handling macros
8742
8743 2003-04-19  Borut Razem <borut.razem AT siol.net>
8744
8745         * "handling space characters in file path" task:
8746         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8747         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8748         * support/Util/MySystem.h: make it self-sufficient
8749         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8750           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8751           handling space characters in file path
8752         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8753           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8754         * support/Util/MySystem.c: handling space characters in executable's path
8755
8756 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8757
8758         * as/z80/Makefile: fix permanent rebuild of z80
8759         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8760         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8761
8762 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8763
8764         * src/SDCCopt.c: add special case optimization to replace modulo by
8765           a power of two with a bitwise AND.
8766
8767 2003-04-18    <johan AT balder>
8768
8769         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8770
8771 2003-04-17    <johan AT balder>
8772
8773         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8774         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8775
8776 2003-04-13  Borut Razem <borut.razem AT siol.net>
8777
8778         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8779         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8780           fixed mingw problem in adl_NORMALIZE_PATH
8781
8782 2003-04-12  Borut Razem <borut.razem AT siol.net>
8783
8784         * fixed "#pragma SAVE/RESTORE can not be nested":
8785         * src/SDCC.lex: reworked pragma handling functions
8786         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8787         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8788
8789 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8790
8791         * src/SDCCutil.c (pathEquivalent): defined but not used
8792         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8793         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8794         * configure: rebuilt from configure.in
8795         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8796         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8797         * device/include/Makefile.in: replace sdcc_datadir
8798         * device/lib/Makefile.in: replace sdcc_datadir
8799         * Makefile.common.in: add LDFLAGS from configure
8800         * packihx/Makefile.in: use LDFLAGS
8801         * src/Makefile.in: use LDFLAGS
8802         * support/cpp2/Makefile.in: add LDFLAGS from configure
8803         * support/makebin/Makefile: use LDFLAGS
8804         * .version: bumped version number to 2.3.5
8805
8806 2003-04-12  Borut Razem <borut.razem AT siol.net>
8807
8808         * completed "different paths" task:
8809         * src/SDCCmacro.c: fixed bug in handling quotes
8810         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8811         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8812
8813 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8814
8815         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8816
8817 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8818
8819         * ds390/gen.c ds390/peeph.def: fix bug 706781
8820
8821 2003-04-11  Borut Razem <borut.razem AT siol.net>
8822
8823         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8824
8825 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8826
8827         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8828         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8829          set - this bit used to not be set...).
8830         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8831           bad code in PIC Port
8832         * src/regression/and2.c added to test bug 609268
8833         * src/regression/Makefile added and2.c to regression test
8834
8835
8836 2003-04-08    <johan AT CP255758-A>
8837
8838         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8839         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8840         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8841
8842 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8843
8844         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8845         fix bug #487815
8846         * support/cpp2/Makefile.in: fix bug #487815
8847         * configure: rebuilt from configure.in
8848         * Makefile.common.in: docdir changed, new path suffixes
8849         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8850         * sdcc_vc_in.h: reflect changes from sdccconf.h
8851         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8852         * src/SDCCutil.h: remove BINDIR hack
8853         * doc/sdccman.lyx: update new path hierarchy
8854
8855 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8856
8857         * src/SDCCpeeph.c: added okToRemoveSLOC test
8858
8859 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8860
8861         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8862
8863 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8864
8865         * src/SDCCpeeph.c: added labelIsReturnOnly test
8866         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8867
8868 2003-04-05    <johan AT balder>
8869
8870         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8871         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8872         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8873         * src/SDCCast.c: fixed a warning
8874         * src/SDCCast.h: fixed a warning
8875         * src/SDCCicode.c (operandFromAst): fixed a warning
8876
8877 2003-04-04    <johan AT balder>
8878
8879         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8880         * src/SDCCast.c (decorateType): fixed bug #715076
8881         * src/SDCC.y: fixed bug #702907
8882
8883 2003-04-03    <johan AT balder>
8884
8885         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8886         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8887         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8888         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8889         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8890
8891 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8892
8893         * _decdptr.c: fix return values
8894         * _gptrget.c: fix return values
8895         * _gptrgetc.c: fix return values
8896         * _gptrput.c: fix return values
8897         * _mulint.c: fix return values
8898         * as/z80/Makefile: fix 'make -j' problem
8899
8900 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8901
8902         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8903         * configure.in: big cleanup, updated to autoconf 2.5x
8904         * configure: rebuilt from configure.in
8905         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8906         * sdcc_vc_in.h: reflect changes from sdccconf.h
8907         * doc/Makefile: fixed a flaw in "make install"
8908
8909 2003-04-02    <johan AT balder>
8910
8911         * src/ds390/gen.c (genCmp): no comments
8912         * src/mcs51/gen.c (genCmp): no comments
8913         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8914         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8915
8916 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8917
8918         * support/regression/generate-cases.py: place generated file in given sub directory
8919         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8920         * support/regression/Makefile: improvements for 'make -j';
8921         side effect: it's simpler and faster now
8922
8923 2003-03-31  Borut Razem <borut.razem AT siol.net>
8924
8925         * src/z80/main.c: link-{port} and as-{port} defined without path
8926         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8927
8928 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8929
8930         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8931
8932 2003-03-30  Borut Razem <borut.razem AT siol.net>
8933
8934         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8935           changed type of list parameter to set
8936         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8937         * src/port.h: changed type of do_assemble() parameter to set
8938         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8939           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8940           definition of "cppoutfilename" macro with NULL value in preProcess()
8941         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8942         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8943         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8944           replaced with set *binPathSet
8945         * shash_add() deallocates the item, if allready exsists, before adding the new one
8946         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8947
8948 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8949
8950         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8951           a nested for loop bug in the PIC port
8952         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8953           for loops
8954
8955 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8956
8957         * support/Util/dbuf.h: remove C++ stuff to make it portable
8958
8959 2003-03-28  Borut Razem <borut.razem AT siol.net>
8960
8961         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8962           literal strings in stringLiteral()
8963         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8964         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8965           to the project
8966
8967 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8968
8969         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8970
8971 2003-03-26    <johan AT balder>
8972
8973         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8974         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8975         * src/SDCCast.c (decorateType): fixed " -v < 3"
8976
8977 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8978
8979         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8980         Added Lenny Story's debug infrastructure changes:
8981         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8982         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8983         * src/cdbFile.c: added
8984         * src/SDCCdebug.c: added
8985         * src/SDCCdebug.h: added
8986         * src/SDCCast.c (createFunction)
8987         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8988         * src/SDCCmain.c (parseCmdLine, main)
8989         * src/SDCCmem.c (redoStackOffsets)
8990         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8991         * src/SDCCsymt.h
8992         * src/common.h
8993         * src/avr/gen.c (genAVRCode)
8994         * src/ds390/gen.c (gen390Code)
8995         * src/mcs51/gen.c (gen51Code)
8996         * src/pic/gen.c (genpic14Code)
8997         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8998         * src/xa51/gen.c (genXA51Code)
8999         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9000
9001 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9002
9003         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9004         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9005
9006 2003-03-22    <johan AT balder>
9007
9008         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9009
9010 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9011
9012         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9013         * doc/cdbfileformat.lyx: added, written by Lenny Story
9014         * doc/Makefile: added cdbfileformat.lyx
9015         * doc/clean.mk: added cdbfileformat.lyx
9016
9017 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9018
9019         * src/mcs51/peeph.def: fix bug #705773
9020
9021 2003-03-20    <johan AT balder>
9022
9023         An sfr/sbit can have an "at #" AND an initializer
9024         * src/SDCCsymt.c (checkSClass):
9025         * src/SDCCmem.c (allocGlobal):
9026         * src/SDCCmem.c (allocLocal):
9027         * src/SDCCast.c (createBlock):
9028
9029 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9030
9031         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9032
9033 2003-03-16    <johan AT balder>
9034
9035         Undid the hackup of const and volatile, the problem is much bigger
9036         * src/SDCC.y:1.65
9037         * src/SDCCast.c:1.171
9038         * src/SDCCglue.c:1.138
9039         * src/SDCCicode.c:1.146
9040         * src/SDCCsymt.c:1.150
9041         * src/SDCCval.c:1.65
9042
9043 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9044
9045         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9046         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9047
9048 2003-03-13    <johan AT balder>
9049
9050         Hackup const and volatile modifiers in type chains a bit:
9051         * src/SDCC.y:1.63
9052         * src/SDCCast.c:1.169
9053         * src/SDCCglue.c:1.136
9054         * src/SDCCicode.c:1.143
9055         * src/SDCCsymt.c1.146
9056         * src/SDCCsymt.h1.59
9057         * src/SDCCval.c:1.63
9058
9059 2003-03-12    <johan AT balder>
9060
9061         * src/SDCCBBlock.h: more LRH debugging junk
9062         * src/SDCCcflow.h: more LRH debugging junk
9063         * src/SDCCloop.c: more LRH debugging junk
9064         * src/SDCC.y (struct_declaration): fixed bug #697590
9065         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9066         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9067         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9068
9069 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9070         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9071         test function names must now match exactly).
9072         * src/SDCCcse.c: added special case in findCheaperOp to allow
9073         extending a short integer. Makes less awful code for bug 700121 test case.
9074
9075 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9076
9077         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9078         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9079
9080 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9081
9082         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9083         actually called (operandsNotEqual() was called for all
9084         operandsNotEqualX tests).
9085
9086 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9087
9088         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9089         with shorter literals. Fixes bug 700121.
9090
9091 2003-03-11    <johan AT balder>
9092
9093         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9094
9095 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9096
9097         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9098         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9099
9100 2003-03-10  Borut Razem <borut.razem AT siol.net>
9101
9102         * src/SDCCmain.c: pipe preprocessor's output
9103         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9104         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9105         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9106         which closes all pipes in pipeSet set
9107         * src/SDCCset.c: free deleted item in function deleteSetItem()
9108         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9109         moved from z80 to src subproject
9110         * .version: increased version number to 2.3.4
9111
9112 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9113
9114         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9115         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9116         * support/regression/ports/xa51/spec.mk: fix typo
9117
9118 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9119
9120         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9121
9122 2003-03-09  Borut Razem <borut.razem AT siol.net>
9123
9124         * src/SDCCmain.c: pipe preprocessor's output
9125         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9126         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9127         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9128         which closes all pipes in pipeSet set
9129         * src/SDCCset.c: free deleted item in function deleteSetItem()
9130         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9131         moved from z80 to src subproject
9132
9133 2003-03-09  Borut Razem <borut.razem AT siol.net>
9134
9135         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9136         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9137         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9138         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9139         * src/SDCCglobl.h: unification of WIN32 native definitions
9140
9141 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9142
9143         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9144
9145 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9146
9147         * src/configure.in:   check for endianess (even while cross-compiling)
9148         * src/configure:      check for endianess (even while cross-compiling)
9149         * src/configure_in.h: check for endianess (even while cross-compiling)
9150         * src/avr/gen.c:        remove old endianess stuff
9151         * src/mcs51/gen.c:      remove old endianess stuff
9152         * src/ds390/gen.c:      remove old endianess stuff
9153         * src/pic/gen.c:        remove old endianess stuff
9154         * src/pic/genarith.c:   remove old endianess stuff
9155         * src/pic/glue.c:       fix endianess check
9156         * src/pic16/gen.c:      remove old endianess stuff
9157         * src/pic16/genarith.c: remove old endianess stuff
9158         * src/pic16/glue.c:     fix endianess check
9159         * src/xa51/gen.c:       remove old endianess stuff
9160         * src/z80/gen.c:        fix endianess check
9161         * src/SDCCglue.c:       fix endianess check
9162         * src/ds390/peeph.def: fix bug 700036
9163
9164 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9165
9166         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9167         * src/configure: find appropriate data-types on host for SDCC's int and long
9168         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9169         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9170         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9171
9172 2003-03-07    <johan AT balder>
9173
9174         Just a big NOOP:
9175                 some minor cleanups before the big shot
9176                 OP_DEFS and OP_USES now use Kevin's protection
9177                 new option --nolabelopt
9178
9179         * src/SDCCBBlock.c:
9180         * src/SDCCast.c,:
9181         * src/SDCCcflow.c:
9182         * src/SDCCcse.c:
9183         * src/SDCCicode.c:
9184         * src/SDCCicode.h:
9185         * src/SDCClabel.c:
9186         * src/SDCCloop.c:
9187         * src/SDCCmain.c:
9188         * src/ds390/ralloc.c:
9189         * src/mcs51/ralloc.c:
9190         * src/pic/ralloc.c:
9191         * src/xa51/ralloc.c:
9192         * src/z80/ralloc.c:
9193
9194 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9195
9196         * src/pic/pcode.c (get_op): fix 64 bit warnings
9197         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9198         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9199         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9200         * support/regression/tests/malloc.c: fix 64 bit warnings
9201
9202 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9203
9204         * src/mcs51/gen.c (genMinus): fixed bug 696436
9205
9206 2003-03-02  Borut Razem <borut.razem AT siol.net>
9207
9208         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9209
9210 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9211
9212         * configure.in: test for mkstemp
9213         * sdccconf_in.h: add HAVE_MKSTEMP
9214
9215 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9216
9217         * device/include/ctype.h: removed warning while using --stack-auto
9218         * device/include/malloc.h: removed warning while using --stack-auto
9219         * device/include/string.h: removed warning while using --stack-auto
9220
9221 2003-02-23  Borut Razem <borut.razem AT siol.net>
9222
9223         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9224         because NDEBUG is defined (see man assert)
9225         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9226
9227 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9228
9229         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9230         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9231
9232 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9233
9234         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9235         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9236
9237 2003-02-18    <johan AT balder>
9238
9239         * as/mcs51/asmain.c (asmbl): module can start with a digit
9240         * as/z80/asmain.c (asmbl): module can start with a digit
9241
9242 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9243
9244         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9245         * src/asm.c: fix pipe() for Mingw32
9246
9247 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9248
9249         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9250         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9251         make -V work again; --c1mode reads now from stdin
9252         * doc/sdccman.lyx: added --c1mode
9253         * support/Util/SDCCerr.c: new messages for c1 mode
9254         * support/Util/SDCCerr.h: new messages for c1 mode
9255         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9256
9257 2003-02-15    <johan AT balder>
9258
9259         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9260
9261 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9262
9263         * doc/sdccman.lyx: Environment variables, -o and other minor things
9264
9265 2003-02-14    <johan AT balder>
9266
9267         * src/xa51/main.c: before anyone really tries to use it :)
9268
9269         * Install doc's in share/sdcc/doc
9270         * removed some obsolete files
9271         * Do a proper make distclean and uninstall
9272         M Makefile.common.in
9273         R sdccbuild.sh
9274         M as/Makefile
9275         M device/include/Makefile.in
9276         M device/lib/Makefile.in
9277         M doc/sdccman.lyx
9278         M link/Makefile
9279         M sim/ucsim/doc/Makefile.in
9280         M src/clean.mk
9281         R src/avr/peeph.rul
9282         R src/xa51/peeph.rul
9283         M support/cpp2/Makefile.in
9284         M support/makebin/Makefile
9285
9286
9287 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9288
9289         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9290
9291 2003-02-10  Borut Razem <borut.razem AT siol.net>
9292
9293         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9294         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9295         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9296         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9297         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9298         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9299         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9300         src/z80/Makefile.bcc: Borland Makefile cleanup
9301         * as/z80/Makefile.bcc: Added Borland Makefile
9302         * support/cpp2/borland.h: Removed
9303
9304 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9305
9306         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9307         * src/SDCC.lex: new pragma NOIV
9308         * src/SDCCglobl.h: new pragma NOIV
9309         * src/SDCCmem.c: new pragma NOIV
9310
9311 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9312
9313         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9314
9315 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9316
9317         * src/SDCCmain.c: signal handling is switched off by --debug
9318         * doc/Makefile: small fix for install; use clean.mk again
9319         * doc/clean.mk: clean *.pdf and *.html too
9320
9321 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9322
9323         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9324         * device/lib/printfl.c: fix a ds390 bug by making it portable
9325         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9326         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9327         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9328         * debugger/mcs51/cmd.c: converted multi-line string literals
9329         * sim/ucsim/globals.cc: converted multi-line string literals
9330         * src/SDCCmain.c: introduced signal handler to remove temp files
9331         * doc/Makefile: small tweaks, implement clean
9332         * doc: removed generated files
9333
9334 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9335
9336         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9337         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9338         Address Record is not correctly generated for DS390."
9339
9340 2003-02-02  Borut Razem <borut.razem AT siol.net>
9341
9342         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9343         * as/mcs51/asm.h: fixed compilation with Borland C
9344         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9345         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9346         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9347         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9348         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9349         src/z80/Makefile.bcc: delete $(LIB) only if exist
9350         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9351
9352 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9353
9354         * device/include/malloc.h: introduced NULL
9355         * device/include/string.h: introduced NULL
9356         * device/include/stdlib.h: introduced NULL
9357         * device/lib/_memcpy.c: removed NULL
9358         * device/lib/_strcat.c: removed NULL
9359         * device/lib/_strchr.c: removed NULL
9360         * device/lib/_strcmp.c: removed NULL
9361         * device/lib/_strcpy.c: removed NULL
9362         * device/lib/_strcspn.c: removed NULL
9363         * device/lib/_strlen.c: removed NULL
9364         * device/lib/_strncat.c: removed NULL
9365         * device/lib/_strncmp.c: removed NULL
9366         * device/lib/_strncpy.c: removed NULL
9367         * device/lib/_strpbrk.c: removed NULL
9368         * device/lib/_strrchr.c: removed NULL
9369         * device/lib/_strspn.c: removed NULL
9370         * device/lib/_strstr.c: removed NULL
9371         * device/lib/_strtok.c: removed NULL
9372         * device/lib/malloc.c: removed NULL, include own header
9373
9374 2003-02-02    <johan AT balder>
9375
9376         * 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
9377         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9378         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9379         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9380         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9381         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9382
9383 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9384
9385         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9386         area 'DATA'"
9387
9388 2003-02-01    <johan AT balder>
9389
9390         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9391
9392 2003-01-31    <johan AT CP255758-A>
9393
9394         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9395
9396 2003-01-30    <johan AT balder>
9397
9398         * src/SDCCBBlock.c: automatic bug detection
9399         * src/SDCCicode.c: automatic bug detection
9400
9401 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9402
9403         * src/SDCCglobl.h:   now --xram-size 0 works
9404         * src/SDCCmain.c:    now --xram-size 0 works
9405
9406 2003-01-29    <johan AT balder>
9407
9408         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9409
9410 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9411
9412         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9413         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9414         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9415         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9416         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9417         * src/SDCCmain.c:    Added options --xram-size and --code-size
9418
9419 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9420
9421         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9422         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9423
9424 2003-01-27    <johan AT balder>
9425
9426         * src/SDCC.y: fixed bug #613764
9427
9428 2003-01-26    <johan AT balder>
9429
9430         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9431         * src/SDCCsymt.h: fixed bug #673374
9432         * src/SDCCglue.c: fixed bug #661910
9433         * src/SDCCast.c: fixed bug #458099 and 673374
9434
9435 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9436
9437         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9438         * as/mcs51/strcmpi.h: added
9439         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9440         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9441         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9442         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9443         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9444         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9445         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9446         * as/mcs51/Makefile.aslink: new module strcmpi
9447         * as/mcs51/Makefile.asx8051: new module strcmpi
9448         * as/mcs51/Makefil.bcc: new module strcmpi
9449         * as/mcs51/Makefile.in: new module strcmpi
9450         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9451
9452 2003-01-26    <johan AT balder>
9453
9454         * src/SDCCglue.c: reverted back to 1.124
9455         * src/SDCCast.c: reverted back to 1.156
9456         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9457
9458 2003-01-25    <johan AT balder>
9459
9460         * src/SDCCglue.c: A better fix for bug #661910
9461         * src/SDCCast.c: A better fix for bug #661910
9462         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9463
9464 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9465
9466         * src/Makefile.in: remove spawn.o
9467         * src/SDCCmain.c: remove spawn.h
9468         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9469         * src/spawn.c: removed
9470         * src/spawn.h: removed
9471         * support/regression/ports/ds390/spec.mk: link with -r
9472
9473 2003-01-24    <johan AT CP255758-A>
9474
9475         * src/ds390/gen.c (aopOp): fixed bug #667458
9476         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9477         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9478         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9479
9480 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9481
9482         * src/mcs51/peeph.def: better assembler identation by Frieder
9483         * src/mcs51/gen.c: better assembler identation by Frieder
9484
9485 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9486
9487         * as/z80/string.h: removed for gcc 3.2
9488         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9489         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9490
9491 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9492
9493         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9494         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9495         * support/regression/Makefile: separate temp files for ports
9496         * support/regression/generate-cases.py: separate temp files for ports
9497         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9498         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9499
9500 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9501
9502         * moved tinitalk to device/examples/ds390
9503
9504 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9505
9506         * as/mcs51/lkmem.c: rflag is for DS390
9507         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9508         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9509                          (linkEdit): move mem- and map-files the same way as ihx-files
9510         * src/z80/main.c (_setDefaultOptions): removed --generic
9511         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9512         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9513         * src/pic/glue.c (picglue): --c1mode works again
9514         * src/pic16/glue.c (pic16glue): --c1mode works again
9515         * src/asm.c (printCLine): fix #660034
9516
9517 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9518
9519         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9520         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9521         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9522         * as/mcs51/lkmem (summary): better fix for sp problem
9523         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9524         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9525         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9526                                               remove --stack-after-data
9527
9528 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9529
9530         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9531         * src/SDCCutil.c (join): ugly bug: missing '\0'
9532         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9533
9534 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9535
9536         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9537         * src/port.h: typo
9538         * src/pic/main.c (_asmCmd): gpasm supports -o
9539         * src/z80/main.c: more general macros
9540         * device/lib/Makefile.in: remove intermediate files
9541
9542 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9543
9544         * .version: Bumped version number to 2.3.3
9545         * src/SDCCBBlock.c: new option -o
9546         * src/SDCCglobl.h: new option -o
9547         * src/SDCCglue.c: new option -o
9548         * src/SDCCmain.c: new option -o
9549         * src/asm.c: new option -o
9550         * src/ds390/main.c: new option -o
9551         * src/pic/glue.c: new option -o
9552         * src/pic/pcode.c: new option -o
9553         * src/pic/ralloc.c: new option -o
9554         * src/pic16/glue.c: new option -o
9555         * src/pic16/pcode.c: new option -o
9556         * src/pic16/ralloc.c: new option -o
9557         * src/z80/main.c: new option -o
9558         * device/lib/Makefile.in: use -o
9559         * support/regression/ports/ds390/spec.mk: use -o
9560         * support/regression/ports/gbz80/spec.mk: use -o
9561         * support/regression/ports/mcs51/spec.mk: use -o
9562         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9563         * support/regression/ports/z80/spec.mk: use -o
9564         * support/regression/ports/ucz80/spec.mk: use -o
9565         * support/regression/ports/xa51/spec.mk: use -o
9566         * support/regression/fwk/lib/timeout.c: fix usage string
9567
9568 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9569         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9570
9571 2003-01-07    <johan AT balder>
9572
9573         * src/SDCCast.c (decorateType): fixed bug #600035
9574
9575 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9576         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9577         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9578         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9579         * src/pic/pcode.c: outcommented unused variable to remove warnings
9580         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9581
9582 2003-01-06    <karl AT turbobit.com>
9583         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9584    regression tests.
9585
9586 2003-01-06    <johan AT balder>
9587
9588         * src/SDCCicode.c: fixed array add
9589
9590 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9591         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9592         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9593
9594 2003-01-04    <johan AT balder>
9595
9596         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9597
9598 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9599         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9600
9601 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9602         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9603         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9604
9605 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9606         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9607
9608 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9609         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9610
9611 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9612         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9613
9614 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9615
9616     * in \sdcc\as\mcs51\ changed these files in order to create an
9617     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9618     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9619     following files to include the previous two files: aslink.dsp,
9620     Makefile.aslink, Makefile.bcc, and Makefile.in.
9621
9622     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9623     .adb instead of .cdb
9624
9625 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9626
9627         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9628         value from option --iram-size.
9629
9630 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9631
9632         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9633         dram[] array.
9634
9635 2002-09-18    <wiml AT hhhh.org>
9636
9637         * SDCClrange.h: exposed setFromRange() and setToRange()
9638         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9639           packRegsForAccUse() (bug 542397)
9640         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9641           multiple times and emitting the fetch operations more than once
9642           added aopGetUsesAcc() function to allow binary operators to
9643           fetch their operands in the correct order; made genMinus() emit
9644           compact code for X = LITERAL - Y
9645
9646 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9647         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9648         sprintf() in line 1267.
9649
9650 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9651         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9652         like ports.
9653
9654 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9655         Changes to aslink (All the changes are marked with 'JCF'):
9656
9657         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9658         summary().
9659
9660         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9661         area BSEG.  Also moves, if possible, the DATA area down into the internal
9662         ram so more space is available.
9663
9664         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9665         sflag.
9666
9667         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9668         not bytes.  Function summary() which creates a memory usage summary
9669         file with extension .mem.  Reports of overlaping stack and small stack
9670         size.  If the space for the stack is less than 16 bytes aslink trows a
9671         warning.
9672
9673         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9674         the 8051.  Option 'y' for memory summary output file.
9675
9676         Changes to sdcc (All the changes are marked with 'JCF'):
9677
9678         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9679
9680         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9681         overlaying area for it (uses RegBankUsed[4]).
9682
9683         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9684         bank zero as used by default.  By default aslink locates the stack
9685         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9686         the creation of the .mem file.  Delegates the allocation of data area
9687         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9688         the begining of the stack area to aslink.
9689
9690         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9691         glue() in SDCCglue.c creates an area for it.
9692
9693 2002-09-03  Borut Razem <borut.razem AT siol.net>
9694         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9695         sdcc/src/pic/glue.c:
9696         introduced atexit() handler for teporay files removal in case of
9697         errors, assertions, ...
9698
9699 2002-08-29  Borut Razem <borut.razem AT siol.net>
9700         * sdcc/support/cpp2/auto-host_vc_in.h:
9701         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9702         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9703         Maybe there is a similar problem with BORLANDC? It should be checked!
9704
9705         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9706         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9707         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9708         was not executed, and the compiler (cl) launched a warning:
9709         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9710
9711 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9712         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9713
9714 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9715         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9716
9717         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9718           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9719           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9720           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9721           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9722           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9723           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9724         - added Release configuration in VS projects
9725         - review of compiler an linker options
9726         - VC .exe files are generated in bin_vc directory, not to interfere
9727           with binaries generated from other projects (cygwin, mingw, bcc ...)
9728
9729         * sdcc/src/yacc.dsp: added
9730
9731         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9732         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9733         and insert the version number definitions from .version
9734
9735         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9736
9737         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9738         added - genarate auto-host.h using auto-host_vc_in.h as template
9739
9740         * sdcc/sdcc_vc.h,
9741         removed from CVS, generated automatically
9742
9743 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9744         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9745
9746 2002-08-11  Borut Razem <borut.razem AT siol.net>
9747         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9748
9749 2002-08-10  Borut Razem <borut.razem AT siol.net>
9750         * src/SDCCmain.c (main):
9751         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9752         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9753         The consequence was that some temporary files were not removed.
9754
9755         * src/SDCCglue.c:
9756         unification of code in functions tempfilename() and tempfile():
9757         function tempnam() is defined in Visual Studio 6.0 and .NET
9758
9759         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9760
9761         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9762           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9763         - removed compiler command line option /WX: Treats all warnings as errors
9764         - update a list of source files, included into the project
9765
9766         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9767           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9768         changed project type to Generic Project so that can be correcly converted to VS.NET project
9769
9770         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9771
9772         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9773
9774         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9775
9776         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9777         added return 0 statements after assert() to make compiler happy
9778
9779         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9780         added newline in the def file to keep MSC compiler satisfied
9781
9782         * sdcc/src/z80/gen.c:
9783         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9784           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9785         - solved MSC error in function aopDump()
9786
9787         * sdcc_vc.h: define PREFIX as "\\sdcc"
9788
9789 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9790         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9791
9792 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9793         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9794         - Rewrote the register banking algorithm.
9795         - Added pCode live-range analysis to registers (for now, only non-used and
9796         singly-used registers optimized away)
9797
9798         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9799
9800         * 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.
9801
9802 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9803         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9804
9805 2002-04-22  Michael Hope  <michaelh AT vroom>
9806
9807         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9808
9809         * configure.in (DD_COPT): Added include support required for gbdk.
9810
9811         * .version: Bumped version number just to increase it.
9812
9813         * src/SDCCmain.c: Added -nostdinc to the default options.
9814
9815 2002-04-15  Michael Hope  <michaelh AT vroom>
9816
9817         * device/lib/z80/printf.c (sprintf): Added.
9818
9819         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9820
9821         * src/z80/peeph.def: Added transpose redundent load rule.
9822
9823         * src/z80/main.c: Added force callee saves for jaune.
9824
9825         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9826
9827         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9828
9829 2002-03-28  Johan Knol  <johan AT balder>
9830
9831         * src/SDCCval.c: fixed bug #532436
9832
9833 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9834         * /src/port.h:
9835         Added "char *Processor" field to the port structure.
9836
9837         * /src/SDCCmain.c:
9838         Added -p option. Allows port dependent processor to be specified.
9839
9840         * all ports:
9841         Initialized the new field char *Processor field to NULL in all ports
9842
9843         * /src/pic/*:
9844         Compiler generated registers for interrupt context saving
9845         were not getting allocated.
9846
9847 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9848
9849         * /src/SDCCast.c:
9850         Fixed left shift. Will promote the left side of a left shift
9851         if a) left shifting more than size of operand or b) when assigned
9852         to something size > size of left side
9853
9854 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9855         * src/pic/*
9856         tons of changes. Register allocation has been
9857         rewritten. Added customization for the various PICs. Flow
9858         analysis is restructured. ...
9859
9860         * src/pic/device.h:
9861         Added
9862
9863         * src/pic/device.c:
9864         Added. device.c is a PIC port hack to accomodate variations
9865         in PIC devices.
9866
9867 2002-03-13  Michael Hope  <michaelh AT vroom>
9868
9869         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9870
9871 2002-03-04  johanknol  <johanknol AT manik>
9872
9873         * /src/SDCCval.c: fixed
9874
9875         const unsigned char arr[][2] = { { 0, 1 } };
9876         t18.c:1: error: Initializer element is not constant
9877
9878 2002-03-04  bela  <bela AT manik>
9879
9880         * /device/include/mcs51reg.h:
9881         ds89c420 register definition update
9882
9883 2002-03-03    <johan AT FRIJA>
9884
9885         * support/Util/SDCCerr.c: did something, but don't no why anymore
9886
9887         * support/regression/tests/bug-524691.c: made it a little less shy
9888
9889         * src/SDCCast.c (decorateType): fixed bug #524697
9890
9891         * src/SDCCast.c: made some lineno improvements
9892
9893         * src/SDCCval.c (getNelements): changed warning to error
9894
9895         * src/SDCCglue.c (printIvalArray): changed warning to error
9896
9897         * src/SDCCicode.c: fixed a warning for mingw
9898
9899         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9900
9901         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9902
9903 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9904
9905         * src/ds390/peeph.def:
9906         Added some more peephole rules
9907
9908         * src/ds390/gen.c: Various fixes & enhancements
9909
9910         * src/SDCClrange.c, src/SDCClrange.h:
9911         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9912
9913         * src/ds390/ralloc.c:
9914         various fixes & enhancements (ds390) specific
9915
9916         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9917         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9918         from rallocs.
9919
9920         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9921
9922 2002-03-02    <johan AT FRIJA>
9923
9924         * src/SDCCast.c (decorateType): fixed bug #524708
9925
9926         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9927
9928         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9929
9930 2002-03-01  Michael Hope  <michaelh AT vroom>
9931
9932         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9933
9934         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9935
9936 2002-03-01    <johan AT FRIJA>
9937
9938         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9939
9940         * src/SDCCast.c (decorateType): fixed bug #524209
9941
9942         * src/SDCCval.c (valNot): fixed bug #524195
9943
9944 2002-02-26    <johan AT balder>
9945
9946         * src/xa51/gen.c: fixed a warning
9947
9948         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9949
9950         * src/SDCCast.c (decorateType): fixed bug #522534
9951
9952 2002-02-23    <johan AT balder>
9953
9954         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9955
9956 2002-02-22    <johan AT balder>
9957
9958         * src/SDCCast.c: fixed bug #514865
9959
9960         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9961
9962 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9963
9964         * sdcc/src/SDCCloop.c:
9965         Previous fix was not good. basic blocks that have "break" or "return" are
9966         not really partof a loop , but live ranges used in these blocks should
9967         be live thru the entire loop, so set partOfLoop but don't add them to
9968         loop region
9969
9970 2002-02-21    <johan AT FRIJA>
9971
9972         * src/SDCCcse.c: fixed bug #514308
9973
9974 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9975
9976         * src/SDCCloop.c:
9977         Fixed BUG #519583. If a conditional block ended in a return/break
9978         statement inside a loop, it was not being considered part of the loop.
9979
9980         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9981
9982 2002-02-10  Karl Bongers <karl AT turbobit.com>
9983
9984         * debugger/*:
9985         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9986         with lots of comments and notes.
9987
9988         * device/examples/test2.c:
9989         Fix bug, "red" variable not being initialized(compiler complained).
9990
9991         * device/examples/Makefile, examples/test3.c:
9992         Add Makefile in device/examples folder, compiles test3.c
9993         for use as a multiple module SDCDB test case.
9994
9995         * sim/ucsim/cmd.src/cmdset.cc:
9996         Took out debug printfs in ucsim "next" command.
9997
9998         * sim/ucsim/xa.src:
9999         Karl and Johan start ucsim XA support.  Most dissassembly working,
10000         about 75% emulation done(plenty of work remaining).
10001
10002         * sim/ucsim/z80.src:
10003         Add Z80 support to ucsim, add test-ucz80 regression test,
10004         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10005         Notice z80 compiler fails on examples/test3.c/crc code.
10006
10007 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10008
10009         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10010         Added support for --parms-in-bank1
10011
10012         * src/ds390/peeph.def:
10013         added a few more peephole optimzations
10014
10015         * src/ds390/main.c:
10016         1) added __builtin_inp & __builtin_outp used to read in data of given length
10017            from a memory mapped port
10018         2) added __builtin_memcmp
10019         3) added __builtin_swapw swap bytes of a short
10020
10021         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10022         1) handle multiple send & receives from register bank1
10023         2) ralloc can now allocate DPTR1 to some liveRanges
10024
10025         * src/SDCCsymt.c, src/SDCCsymt.h:
10026         changes to handle multiple sends & receives
10027
10028         * src/SDCCptropt.h:
10029         added some pointer arithmetic optimization
10030
10031         * src/SDCCptropt.c:
10032         added some pointer arithmetic optimizations but not stable yet so not
10033         called from anywhere (will get this working shortly)
10034
10035         * src/SDCCopt.c: fixed for multiple sends & receives
10036
10037         * src/SDCCmain.c:
10038         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10039         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10040            set preprocessor defines (depending on options)
10041
10042         * src/SDCCicode.c, src/SDCCicode.h:
10043         changes made to handle multiple sends & receives
10044
10045         * src/SDCCglobl.h:
10046         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10047
10048         * src/SDCCcse.c, src/SDCCcse.h:
10049         added function findbackward def (to be used in upcoming optimization)
10050
10051         * src/SDCCcflow.c, src/SDCCcflow.h:
10052         added function returnAtEnd - to determine if a basic block terminates with
10053         a RETURN iCode
10054
10055         * src/SDCCast.c, src/SDCCast.h:
10056         added option parms-in-bank1
10057
10058         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10059         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10060         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10061         adjusted for --parms-in-bank1 option
10062
10063         * device/include/string.h:
10064         donot redefine "reentrant" keyword
10065
10066         * device/include/ds80c390.h: Added some more SFRs
10067
10068 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10069
10070         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10071
10072 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10073
10074         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10075
10076 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10077
10078         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10079
10080 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10081
10082         * Added --xram-movc option
10083
10084 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10085
10086         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10087
10088 2002-01-11  Johan Knol
10089
10090         * Added math lib of Jesus Calvino-Fraga
10091
10092 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10093
10094         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10095         * support/regression/Makefile: new target test-mcs51-stack-auto
10096         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10097
10098 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10099
10100         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10101
10102 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10103
10104         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10105
10106 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10107
10108         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10109
10110         * src/SDCCglue.h: add definition for printIvalChar()
10111
10112 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10113
10114         * src/SDCCast.c: fix #498138 by Johan
10115
10116         * src/SDCCglue.c: fix #498138 by Johan
10117
10118 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10119
10120         * support/regression/Makefile: fix clean
10121
10122         * support/regression/ports/ds390/support.c: fix transmission of last character
10123
10124 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10125
10126         * /sdcc/src/ds390/gen.c:
10127         a) improved computing address of stack variable
10128         b) took out some #if 0 code
10129         c) improved parmBytes adjustment
10130         d) improved genPlusIncr & genMinusIncr
10131         e) genCmp could generate bad code (when left assigned to DPTR)
10132         f) Fixed bug in hasInc
10133
10134         * /sdcc/src/ds390/ralloc.c:
10135         a) packRegsForSupport could mess up live information (Fixed)
10136         b) packRegsDPTRuse could be incorrect for left & right shift
10137
10138         * /sdcc/src/mcs51/ralloc.c:
10139         packRegsForSupport could mess up the live information (Fixed)
10140
10141         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10142
10143         * /sdcc/src/SDCCast.c:
10144         can reverse a loop even if function call is present as long
10145         as the loop control variable is local & is not passed as parameter
10146
10147 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10148
10149         * /sdcc/ChangeLog: *** empty log message ***
10150
10151         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10152         More builtin function additions for TININative
10153
10154         * /sdcc/src/ds390/ralloc.c:
10155         Had broken the regression testsuite
10156
10157         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10158
10159         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10160         Added funcattr hasStackParms will be set for reentrant functions when there
10161         are paramteres on the stack, this helps in minimizing frame pointer generation
10162         typeFromStr can handle function pointers now
10163
10164         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10165         *** empty log message ***
10166
10167 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10168
10169         * /src/ds390/gen.c, /src/ds390/main.c:
10170         More builtin function additions for TININative
10171
10172         * /src/ds390/ralloc.c:
10173         Had broken the regression testsuite
10174
10175         * /src/SDCCast.c: Fixed a bug in dumptree
10176
10177         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10178         Added funcattr hasStackParms will be set for reentrant functions when there
10179         are paramteres on the stack, this helps in minimizing frame pointer generation
10180         typeFromStr can handle function pointers now
10181
10182         * /doc/builtins.txt, /doc/TININative.txt:
10183         *** empty log message ***
10184
10185
10186 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10187
10188         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10189         ALPHA version for -mTININative
10190
10191         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10192         updated to reflect changes in the port structure
10193
10194         * /src/port.h:
10195         added function do_assemble (similar to do_link) if non-null this function
10196         will be called to do assembly (-mTININative) requires a multi command
10197         assembly
10198         added function genAssemblerEnd will be called to generate assembler Epilogue
10199
10200         * /src/SDCCsymt.c:
10201         added _JavaNative to debug info printing
10202
10203         * /src/SDCCmain.c: added option --tini-libid
10204         added port->do_assemble function (-mTININative) has a multi command assemble
10205
10206         * /src/SDCCglue.c: Disabled "constExpr" check
10207         added port->genAssemblerEnd function
10208
10209         * /src/SDCCglobl.h: Added option --tini-libid value
10210
10211         * /src/SDCCast.h:
10212         tookout optimizeCompare from the header (has no external references)
10213
10214         * /src/SDCCast.c: made one more function "static"
10215
10216 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10217
10218         * src/z80/mappings.i: Added z80asm support.
10219
10220         * src/z80/main.c: Added z80asm support on --asm=z80asm
10221
10222         * src/z80/gen.c: Fixed asm portability issues.
10223
10224         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10225
10226         * src/SDCCglue.c (printExterns): Added global/extern split.
10227
10228 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10229
10230         * support/regression/Makefile: added test for mcs51 model large
10231
10232         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10233
10234         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10235
10236 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10237
10238         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10239
10240 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10241
10242         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10243
10244         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10245
10246 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10247
10248         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10249
10250         * support/regression/tests/simplefloat.c: Port to mcs51.
10251
10252 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10253         * support/regression/tests/bug-485362.c: Added.
10254
10255         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10256
10257         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10258
10259         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10260
10261         * src/z80/gen.c (aopDump): Added a dump function.
10262
10263 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10264         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10265
10266         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10267
10268         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10269
10270         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10271
10272         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10273
10274         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10275
10276         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10277
10278         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10279
10280         * support/regression/ports/ds390/support.c: Use tinibios.
10281
10282         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10283
10284 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10285
10286         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10287         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10288
10289         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10290
10291         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10292
10293 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10294
10295         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10296
10297         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10298         (packRegsForIYUse): Created and optimised.
10299
10300 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10301
10302         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10303 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10304
10305         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10306
10307         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10308
10309         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10310
10311 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10312
10313         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10314
10315         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10316
10317 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10318
10319         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10320
10321         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10322
10323         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10324
10325 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10326
10327         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10328         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10329         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10330
10331         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10332
10333         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10334         (genNotFloat): Added.
10335         (genUminusFloat): Added.
10336
10337         * device/lib/z80/Makefile: Added floating pt stubs.
10338
10339         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10340
10341         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10342
10343         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10344
10345 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10346
10347         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10348
10349         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10350
10351         * sdcc/support/regression/Makefile: Add port ds390.
10352
10353         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10354
10355         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10356
10357         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10358
10359         * sdcc/support/regression/ports/ds390/support.c: Added.
10360
10361         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10362
10363         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10364
10365         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10366
10367 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10368
10369         * device/include/malloc.h: Added z80 and gbz80 support.
10370
10371         * device/lib/gbz80/heap.s: Added.
10372
10373         * device/lib/z80/heap.s: Added.
10374
10375         * device/lib/malloc.c: Added z80 and gbz80 support.
10376
10377         * support/regression/tests/malloc.c (testMalloc): Added.
10378
10379         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10380
10381         * support/regression/tests/bug-478094.c: Added.
10382
10383         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10384
10385 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10386
10387         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10388
10389         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10390
10391         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10392
10393         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10394
10395         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10396
10397 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10398
10399         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10400
10401 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10402
10403         * support/regression/tests/bug-477927.c: Added.
10404
10405         * src/z80/peeph.def: Added minor rules.
10406
10407         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10408
10409         * src/z80/peeph.def: Added jump optimisation modification.
10410
10411 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10412
10413         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10414
10415 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10416
10417         * support/regression/tests/funptrs.c: Added.
10418
10419 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10420
10421         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10422
10423 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10424
10425         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10426
10427         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10428
10429         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10430         (movLeft2ResultLong): Created.
10431
10432         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10433         (joinPushes): Added.  Joins two char pushes into a word push.
10434
10435 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10436
10437         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10438
10439         * support/makebin/Makefile (install): Added creation of dest dir.
10440
10441 2001-10-24 Karl Bongers <karl AT turbobit.com>
10442
10443         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10444
10445 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10446
10447         * src/z80/ralloc.c: Turned off faulty pack for one use.
10448
10449         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10450
10451         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10452
10453 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10454
10455         * support/regression/Makefile: Improved clean
10456
10457         * support/regression/ports/gbz80/spec.mk: Added clean
10458
10459         * support/regression/ports/host/spec.mk: Added clean
10460
10461         * support/regression/ports/z80/spec.mk: Added clean
10462
10463         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10464
10465         * support/regression/ports/mcs51/timeout.c: little improvements
10466
10467 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10468
10469         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10470
10471         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10472
10473         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10474
10475 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10476
10477         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10478
10479         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10480
10481 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10482         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10483
10484         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10485
10486         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10487
10488         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10489
10490         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10491
10492         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10493
10494         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10495
10496         * support/regression/tests/longor.c: Added.
10497
10498 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10499
10500         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10501
10502         * as/mcs51/aslink.h: define PATH_MAX
10503
10504         * as/mcs51/asm.h: define PATH_MAX
10505
10506         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10507
10508         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10509
10510         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10511
10512         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10513
10514         * src/SDCCglobl.h: define PATH_MAX
10515
10516         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10517
10518         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10519
10520 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10521
10522         * src/z80/gen.c (gencjneshort): Fixed
10523
10524         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10525
10526 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10527
10528         * support/regression/tests/bug-469671.c: Added.
10529
10530         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10531
10532 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10533
10534         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10535
10536         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10537
10538 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10539
10540         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10541
10542         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10543
10544         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10545
10546         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10547
10548         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10549
10550         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10551
10552         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10553
10554 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10555
10556         * 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.
10557
10558         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10559
10560         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10561
10562 2001-10-07    <johan AT FRIJA>
10563
10564         * device/lib/gets.c (gets): fixed the return value.
10565
10566 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10567         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10568
10569         * 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.
10570
10571         * 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.
10572
10573         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10574
10575         * src/pic/gen.c: Removed Safe_strdup.
10576
10577         * configure.in: Added option to enable libgc support.
10578
10579         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10580         (bitVectUnion): Optimised.
10581         (bitVectIntersect): Optimised.
10582         (bitVectBitsInCommon): Optimised.
10583         (bitVectCplAnd): Optimised.
10584
10585         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10586
10587 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10588
10589         * src/SDCCmain.c: distinguish between assembler debug and plain options
10590
10591         * src/avr/main.c:   remove standard assembler options
10592
10593         * src/ds390/main.c: remove standard assembler options
10594
10595         * src/mcs51/main.c: remove standard assembler options
10596
10597         * src/port.h: removed "PENDING" comment
10598
10599 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10600
10601         * src/device/lib/_mulint.c  : new, with assember functions
10602
10603         * src/device/lib/_mullong.c : new, with assember functions
10604
10605         * src/device/lib/_divuint.c : with assember functions
10606
10607         * src/device/lib/_divsint.c : with assember functions
10608
10609         * src/device/lib/_divulong.c: with assember functions
10610
10611         * src/device/lib/_divslong.c: with assember functions
10612
10613         * src/device/lib/_moduint.c : with assember functions
10614
10615         * src/device/lib/_modsint.c : with assember functions
10616
10617         * src/device/lib/_modulong.c: with assember functions
10618
10619         * src/device/lib/_modslong.c: with assember functions
10620
10621         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10622
10623         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10624
10625         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10626                                       replaced _mululong.c and _mulslong.c by _mullong.c
10627
10628 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10629
10630         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10631
10632 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10633
10634         * src/SDCCglue.c: test, if win32api is available for MINGW
10635
10636 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10637
10638         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10639         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10640         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10641         * support/regression/ports/host/spec.mk: removed GENERIC
10642         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10643         * support/regression/ports/z80/spec.mk: removed GENERIC
10644
10645 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10646
10647         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10648
10649         * support/regression/tests/bug-467035.c: Created.
10650
10651 2001-10-01    <johan AT FRIJA>
10652
10653         * src/SDCC.y: fixed bug #466586 part 1
10654
10655 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10656
10657         * SDCCicode.c: z80 has no generic pointers
10658         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10659
10660 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10661
10662         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10663
10664 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10665
10666         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10667
10668         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10669
10670 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10671
10672         * configure.in: Fixed up so that ucsim is only configured once.
10673
10674         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10675
10676         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10677         (getPathDifference): As above.
10678
10679         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10680
10681         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10682
10683 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10684         * .version: Updated to 2.3.1
10685
10686         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10687         Added copyright header.
10688
10689         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10690         (assemble): Added support for macro based assembler commands.
10691         (linkEdit): Added support for macro based linker commands.
10692         (preProcess): Changed the pre-processor to use macros.
10693         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10694         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10695
10696         * device/lib/z80/crt0.s: Added module name for debugging.
10697
10698 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10699
10700         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10701
10702         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10703
10704         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10705
10706         * src/Makefile.in: Added SDCCmacro and SDCCutil
10707
10708 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10709
10710         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10711
10712 2001-09-16    <johan AT FRIJA>
10713
10714         * 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.
10715
10716 2001-09-15    <johan AT FRIJA>
10717
10718         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10719         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10720
10721 2001-09-11    <johan AT FRIJA>
10722
10723         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10724
10725 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10726
10727         * support/regression/tests/bug-460444.c: Added test case.
10728
10729         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10730         (genCast): Added justification for all of the asserts.
10731
10732 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10733
10734         * support/regression/support.c: _xdata replaced by xdata
10735
10736         * support/regression/spec.mk: removed _generic
10737
10738 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10739
10740         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10741
10742         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10743         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10744
10745         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10746
10747         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10748
10749         * support/regression/tests/bug-460010.c: Added test case.
10750
10751         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10752
10753 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10754
10755         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10756
10757         * support/regression/testfwk.c: removed workaround for bug #436344
10758
10759         * support/regression/tests/bp.c: use less memory with mcs51
10760
10761         * support/regression/tests/bug-441448.c: use less memory
10762
10763         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10764
10765         * support/regression/collate-results.py: typo
10766
10767 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10768
10769         * support/regression/tests/fetchoverlap.c: Added new test case.
10770
10771         * support/regression/tests/bp.c: Added new test case.
10772
10773         * support/regression/tests/bug-448984.c: Added new test case.
10774
10775         * support/regression/tests/pow2shifts.c: Added new test case.
10776
10777         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10778         (genlshTwo): Fixed right shift for count > 8.
10779
10780         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10781
10782 2001-09-08    <johan AT FRIJA>
10783
10784         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10785
10786 2001-09-07    <johan AT FRIJA>
10787
10788         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10789
10790         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10791
10792 2001-09-06    <johan AT FRIJA>
10793
10794         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10795         * bernhard noted me at this: "() equals to (void)" (1.38)
10796
10797 2001-09-05    <johan AT FRIJA>
10798
10799         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10800
10801 2001-09-04    <johan AT FRIJA>
10802
10803         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10804
10805
10806 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10807
10808         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10809
10810 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10811
10812         * link/z80/aslink.h: Fixed path for PATH_MAX
10813
10814 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10815
10816         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10817
10818         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10819
10820         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10821
10822         * 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.
10823
10824 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10825
10826         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10827         (genCmp): Fixed up genCmp for the GB with longs.
10828
10829         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10830
10831         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10832
10833         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10834
10835         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10836
10837 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10838
10839         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10840
10841 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10842
10843         * 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.
10844
10845         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10846
10847 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10848
10849         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10850
10851         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10852
10853 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10854
10855   * sim/ucsim/configure:    little improvement of Cygwin-detection
10856   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10857   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10858   * support/regression/tests/bug-221100.c: small changes for mcs51
10859   * support/regression/tests/bug-221168.c: small changes for mcs51
10860   * support/regression/tests/bug-227710.c: small changes for mcs51
10861   * support/regression/tests/staticinit.c: small changes for mcs51
10862   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10863   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10864   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10865
10866 $Revision$